ntdll: Use full registry key name in NtQueryLicenseValue.
[wine.git] / server / trace.c
bloba48f00258fe66ee423385abac671470811ed2724
1 /*
2 * Server request tracing
4 * Copyright (C) 1999 Alexandre Julliard
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #include "config.h"
23 #include <ctype.h>
24 #include <stdarg.h>
25 #include <stdio.h>
26 #include <sys/types.h>
28 #ifdef HAVE_SYS_UIO_H
29 #include <sys/uio.h>
30 #endif
32 #include "ntstatus.h"
33 #define WIN32_NO_STATUS
34 #include "windef.h"
35 #include "winbase.h"
36 #include "wincon.h"
37 #include "winternl.h"
38 #include "winuser.h"
39 #include "winioctl.h"
40 #include "wine/condrv.h"
41 #include "ddk/wdm.h"
42 #include "ddk/ntddser.h"
43 #define USE_WS_PREFIX
44 #include "winsock2.h"
45 #include "file.h"
46 #include "request.h"
47 #include "unicode.h"
49 static const void *cur_data;
50 static data_size_t cur_size;
52 static const char *get_status_name( unsigned int status );
54 /* utility functions */
56 static inline void remove_data( data_size_t size )
58 cur_data = (const char *)cur_data + size;
59 cur_size -= size;
62 static void dump_uints( const char *prefix, const unsigned int *ptr, int len )
64 fprintf( stderr, "%s{", prefix );
65 while (len > 0)
67 fprintf( stderr, "%08x", *ptr++ );
68 if (--len) fputc( ',', stderr );
70 fputc( '}', stderr );
73 static void dump_handles( const char *prefix, const obj_handle_t *data, data_size_t size )
75 data_size_t len = size / sizeof(*data);
77 fprintf( stderr,"%s{", prefix );
78 while (len > 0)
80 fprintf( stderr, "%04x", *data++ );
81 if (--len) fputc( ',', stderr );
83 fputc( '}', stderr );
86 static void dump_timeout( const char *prefix, const timeout_t *time )
88 fprintf( stderr, "%s%s", prefix, get_timeout_str(*time) );
91 static void dump_abstime( const char *prefix, const abstime_t *when )
93 timeout_t timeout = abstime_to_timeout( *when );
94 dump_timeout( prefix, &timeout );
97 static void dump_uint64( const char *prefix, const unsigned __int64 *val )
99 if ((unsigned int)*val != *val)
100 fprintf( stderr, "%s%x%08x", prefix, (unsigned int)(*val >> 32), (unsigned int)*val );
101 else
102 fprintf( stderr, "%s%08x", prefix, (unsigned int)*val );
105 static void dump_uint128( const char *prefix, const unsigned __int64 val[2] )
107 unsigned __int64 low = val[0], high = val[1];
109 if ((unsigned int)high != high)
110 fprintf( stderr, "%s%x%08x%08x%08x", prefix, (unsigned int)(high >> 32), (unsigned int)high,
111 (unsigned int)(low >> 32), (unsigned int)low );
112 else if (high)
113 fprintf( stderr, "%s%x%08x%08x", prefix, (unsigned int)high,
114 (unsigned int)(low >> 32), (unsigned int)low );
115 else if ((unsigned int)low != low)
116 fprintf( stderr, "%s%x%08x", prefix, (unsigned int)(low >> 32), (unsigned int)low );
117 else
118 fprintf( stderr, "%s%x", prefix, (unsigned int)low );
121 static void dump_rectangle( const char *prefix, const rectangle_t *rect )
123 fprintf( stderr, "%s{%d,%d;%d,%d}", prefix,
124 rect->left, rect->top, rect->right, rect->bottom );
127 static void dump_ioctl_code( const char *prefix, const ioctl_code_t *code )
129 switch(*code)
131 #define CASE(c) case c: fprintf( stderr, "%s%s", prefix, #c ); break
132 CASE(IOCTL_CONDRV_ACTIVATE);
133 CASE(IOCTL_CONDRV_BIND_PID);
134 CASE(IOCTL_CONDRV_CTRL_EVENT);
135 CASE(IOCTL_CONDRV_FILL_OUTPUT);
136 CASE(IOCTL_CONDRV_GET_INPUT_INFO);
137 CASE(IOCTL_CONDRV_GET_MODE);
138 CASE(IOCTL_CONDRV_GET_OUTPUT_INFO);
139 CASE(IOCTL_CONDRV_GET_TITLE);
140 CASE(IOCTL_CONDRV_PEEK);
141 CASE(IOCTL_CONDRV_READ_CONSOLE);
142 CASE(IOCTL_CONDRV_READ_INPUT);
143 CASE(IOCTL_CONDRV_READ_OUTPUT);
144 CASE(IOCTL_CONDRV_SET_MODE);
145 CASE(IOCTL_CONDRV_SET_OUTPUT_INFO);
146 CASE(IOCTL_CONDRV_SETUP_INPUT);
147 CASE(IOCTL_CONDRV_WRITE_CONSOLE);
148 CASE(IOCTL_CONDRV_WRITE_INPUT);
149 CASE(IOCTL_CONDRV_WRITE_OUTPUT);
150 CASE(FSCTL_DISMOUNT_VOLUME);
151 CASE(FSCTL_PIPE_DISCONNECT);
152 CASE(FSCTL_PIPE_LISTEN);
153 CASE(FSCTL_PIPE_PEEK);
154 CASE(FSCTL_PIPE_WAIT);
155 CASE(IOCTL_SERIAL_GET_TIMEOUTS);
156 CASE(IOCTL_SERIAL_GET_WAIT_MASK);
157 CASE(IOCTL_SERIAL_SET_TIMEOUTS);
158 CASE(IOCTL_SERIAL_SET_WAIT_MASK);
159 CASE(WS_SIO_ADDRESS_LIST_CHANGE);
160 default: fprintf( stderr, "%s%08x", prefix, *code ); break;
161 #undef CASE
165 static void dump_apc_call( const char *prefix, const apc_call_t *call )
167 fprintf( stderr, "%s{", prefix );
168 switch(call->type)
170 case APC_NONE:
171 fprintf( stderr, "APC_NONE" );
172 break;
173 case APC_USER:
174 dump_uint64( "APC_USER,func=", &call->user.func );
175 dump_uint64( ",args={", &call->user.args[0] );
176 dump_uint64( ",", &call->user.args[1] );
177 dump_uint64( ",", &call->user.args[2] );
178 fputc( '}', stderr );
179 break;
180 case APC_ASYNC_IO:
181 dump_uint64( "APC_ASYNC_IO,user=", &call->async_io.user );
182 dump_uint64( ",sb=", &call->async_io.sb );
183 fprintf( stderr, ",status=%s,result=%u", get_status_name(call->async_io.status), call->async_io.result );
184 break;
185 case APC_VIRTUAL_ALLOC:
186 dump_uint64( "APC_VIRTUAL_ALLOC,addr==", &call->virtual_alloc.addr );
187 dump_uint64( ",size=", &call->virtual_alloc.size );
188 dump_uint64( ",zero_bits=", &call->virtual_alloc.zero_bits );
189 fprintf( stderr, ",op_type=%x,prot=%x", call->virtual_alloc.op_type, call->virtual_alloc.prot );
190 break;
191 case APC_VIRTUAL_FREE:
192 dump_uint64( "APC_VIRTUAL_FREE,addr=", &call->virtual_free.addr );
193 dump_uint64( ",size=", &call->virtual_free.size );
194 fprintf( stderr, ",op_type=%x", call->virtual_free.op_type );
195 break;
196 case APC_VIRTUAL_QUERY:
197 dump_uint64( "APC_VIRTUAL_QUERY,addr=", &call->virtual_query.addr );
198 break;
199 case APC_VIRTUAL_PROTECT:
200 dump_uint64( "APC_VIRTUAL_PROTECT,addr=", &call->virtual_protect.addr );
201 dump_uint64( ",size=", &call->virtual_protect.size );
202 fprintf( stderr, ",prot=%x", call->virtual_protect.prot );
203 break;
204 case APC_VIRTUAL_FLUSH:
205 dump_uint64( "APC_VIRTUAL_FLUSH,addr=", &call->virtual_flush.addr );
206 dump_uint64( ",size=", &call->virtual_flush.size );
207 break;
208 case APC_VIRTUAL_LOCK:
209 dump_uint64( "APC_VIRTUAL_LOCK,addr=", &call->virtual_lock.addr );
210 dump_uint64( ",size=", &call->virtual_lock.size );
211 break;
212 case APC_VIRTUAL_UNLOCK:
213 dump_uint64( "APC_VIRTUAL_UNLOCK,addr=", &call->virtual_unlock.addr );
214 dump_uint64( ",size=", &call->virtual_unlock.size );
215 break;
216 case APC_MAP_VIEW:
217 fprintf( stderr, "APC_MAP_VIEW,handle=%04x", call->map_view.handle );
218 dump_uint64( ",addr=", &call->map_view.addr );
219 dump_uint64( ",size=", &call->map_view.size );
220 dump_uint64( ",offset=", &call->map_view.offset );
221 dump_uint64( ",zero_bits=", &call->map_view.zero_bits );
222 fprintf( stderr, ",alloc_type=%x,prot=%x", call->map_view.alloc_type, call->map_view.prot );
223 break;
224 case APC_UNMAP_VIEW:
225 dump_uint64( "APC_UNMAP_VIEW,addr=", &call->unmap_view.addr );
226 break;
227 case APC_CREATE_THREAD:
228 dump_uint64( "APC_CREATE_THREAD,func=", &call->create_thread.func );
229 dump_uint64( ",arg=", &call->create_thread.arg );
230 dump_uint64( ",zero_bits=", &call->create_thread.zero_bits );
231 dump_uint64( ",reserve=", &call->create_thread.reserve );
232 dump_uint64( ",commit=", &call->create_thread.commit );
233 fprintf( stderr, ",flags=%x", call->create_thread.flags );
234 break;
235 case APC_DUP_HANDLE:
236 fprintf( stderr, "APC_DUP_HANDLE,src_handle=%04x,dst_process=%04x,access=%x,attributes=%x,options=%x",
237 call->dup_handle.src_handle, call->dup_handle.dst_process, call->dup_handle.access,
238 call->dup_handle.attributes, call->dup_handle.options );
239 break;
240 default:
241 fprintf( stderr, "type=%u", call->type );
242 break;
244 fputc( '}', stderr );
247 static void dump_apc_result( const char *prefix, const apc_result_t *result )
249 fprintf( stderr, "%s{", prefix );
250 switch(result->type)
252 case APC_NONE:
253 break;
254 case APC_ASYNC_IO:
255 fprintf( stderr, "APC_ASYNC_IO,status=%s,total=%u",
256 get_status_name( result->async_io.status ), result->async_io.total );
257 break;
258 case APC_VIRTUAL_ALLOC:
259 fprintf( stderr, "APC_VIRTUAL_ALLOC,status=%s",
260 get_status_name( result->virtual_alloc.status ));
261 dump_uint64( ",addr=", &result->virtual_alloc.addr );
262 dump_uint64( ",size=", &result->virtual_alloc.size );
263 break;
264 case APC_VIRTUAL_FREE:
265 fprintf( stderr, "APC_VIRTUAL_FREE,status=%s",
266 get_status_name( result->virtual_free.status ));
267 dump_uint64( ",addr=", &result->virtual_free.addr );
268 dump_uint64( ",size=", &result->virtual_free.size );
269 break;
270 case APC_VIRTUAL_QUERY:
271 fprintf( stderr, "APC_VIRTUAL_QUERY,status=%s",
272 get_status_name( result->virtual_query.status ));
273 dump_uint64( ",base=", &result->virtual_query.base );
274 dump_uint64( ",alloc_base=", &result->virtual_query.alloc_base );
275 dump_uint64( ",size=", &result->virtual_query.size );
276 fprintf( stderr, ",state=%x,prot=%x,alloc_prot=%x,alloc_type=%x",
277 result->virtual_query.state, result->virtual_query.prot,
278 result->virtual_query.alloc_prot, result->virtual_query.alloc_type );
279 break;
280 case APC_VIRTUAL_PROTECT:
281 fprintf( stderr, "APC_VIRTUAL_PROTECT,status=%s",
282 get_status_name( result->virtual_protect.status ));
283 dump_uint64( ",addr=", &result->virtual_protect.addr );
284 dump_uint64( ",size=", &result->virtual_protect.size );
285 fprintf( stderr, ",prot=%x", result->virtual_protect.prot );
286 break;
287 case APC_VIRTUAL_FLUSH:
288 fprintf( stderr, "APC_VIRTUAL_FLUSH,status=%s",
289 get_status_name( result->virtual_flush.status ));
290 dump_uint64( ",addr=", &result->virtual_flush.addr );
291 dump_uint64( ",size=", &result->virtual_flush.size );
292 break;
293 case APC_VIRTUAL_LOCK:
294 fprintf( stderr, "APC_VIRTUAL_LOCK,status=%s",
295 get_status_name( result->virtual_lock.status ));
296 dump_uint64( ",addr=", &result->virtual_lock.addr );
297 dump_uint64( ",size=", &result->virtual_lock.size );
298 break;
299 case APC_VIRTUAL_UNLOCK:
300 fprintf( stderr, "APC_VIRTUAL_UNLOCK,status=%s",
301 get_status_name( result->virtual_unlock.status ));
302 dump_uint64( ",addr=", &result->virtual_unlock.addr );
303 dump_uint64( ",size=", &result->virtual_unlock.size );
304 break;
305 case APC_MAP_VIEW:
306 fprintf( stderr, "APC_MAP_VIEW,status=%s",
307 get_status_name( result->map_view.status ));
308 dump_uint64( ",addr=", &result->map_view.addr );
309 dump_uint64( ",size=", &result->map_view.size );
310 break;
311 case APC_UNMAP_VIEW:
312 fprintf( stderr, "APC_UNMAP_VIEW,status=%s",
313 get_status_name( result->unmap_view.status ) );
314 break;
315 case APC_CREATE_THREAD:
316 fprintf( stderr, "APC_CREATE_THREAD,status=%s,pid=%04x,tid=%04x,handle=%04x",
317 get_status_name( result->create_thread.status ),
318 result->create_thread.pid, result->create_thread.tid, result->create_thread.handle );
319 break;
320 case APC_DUP_HANDLE:
321 fprintf( stderr, "APC_DUP_HANDLE,status=%s,handle=%04x",
322 get_status_name( result->dup_handle.status ), result->dup_handle.handle );
323 break;
324 default:
325 fprintf( stderr, "type=%u", result->type );
326 break;
328 fputc( '}', stderr );
331 static void dump_async_data( const char *prefix, const async_data_t *data )
333 fprintf( stderr, "%s{handle=%04x,event=%04x", prefix, data->handle, data->event );
334 dump_uint64( ",iosb=", &data->iosb );
335 dump_uint64( ",user=", &data->user );
336 dump_uint64( ",apc=", &data->apc );
337 dump_uint64( ",apc_context=", &data->apc_context );
338 fputc( '}', stderr );
341 static void dump_irp_params( const char *prefix, const irp_params_t *data )
343 switch (data->type)
345 case IRP_CALL_NONE:
346 fprintf( stderr, "%s{NONE}", prefix );
347 break;
348 case IRP_CALL_CREATE:
349 fprintf( stderr, "%s{CREATE,access=%08x,sharing=%08x,options=%08x",
350 prefix, data->create.access, data->create.sharing, data->create.options );
351 dump_uint64( ",device=", &data->create.device );
352 fprintf( stderr, ",file=%08x}", data->create.file );
353 break;
354 case IRP_CALL_CLOSE:
355 fprintf( stderr, "%s{CLOSE", prefix );
356 dump_uint64( ",file=", &data->close.file );
357 fputc( '}', stderr );
358 break;
359 case IRP_CALL_READ:
360 fprintf( stderr, "%s{READ,key=%08x,out_size=%u", prefix, data->read.key,
361 data->read.out_size );
362 dump_uint64( ",pos=", &data->read.pos );
363 dump_uint64( ",file=", &data->read.file );
364 fputc( '}', stderr );
365 break;
366 case IRP_CALL_WRITE:
367 fprintf( stderr, "%s{WRITE,key=%08x", prefix, data->write.key );
368 dump_uint64( ",pos=", &data->write.pos );
369 dump_uint64( ",file=", &data->write.file );
370 fputc( '}', stderr );
371 break;
372 case IRP_CALL_FLUSH:
373 fprintf( stderr, "%s{FLUSH", prefix );
374 dump_uint64( ",file=", &data->flush.file );
375 fputc( '}', stderr );
376 break;
377 case IRP_CALL_IOCTL:
378 fprintf( stderr, "%s{IOCTL", prefix );
379 dump_ioctl_code( ",code=", &data->ioctl.code );
380 fprintf( stderr, ",out_size=%u", data->ioctl.out_size );
381 dump_uint64( ",file=", &data->ioctl.file );
382 fputc( '}', stderr );
383 break;
384 case IRP_CALL_VOLUME:
385 fprintf( stderr, "%s{VOLUME,class=%u,out_size=%u", prefix,
386 data->volume.info_class, data->volume.out_size );
387 dump_uint64( ",file=", &data->volume.file );
388 fputc( '}', stderr );
389 break;
390 case IRP_CALL_FREE:
391 fprintf( stderr, "%s{FREE", prefix );
392 dump_uint64( ",obj=", &data->free.obj );
393 fputc( '}', stderr );
394 break;
395 case IRP_CALL_CANCEL:
396 fprintf( stderr, "%s{CANCEL", prefix );
397 dump_uint64( ",irp=", &data->cancel.irp );
398 fputc( '}', stderr );
399 break;
403 static void dump_rawinput( const char *prefix, const union rawinput *rawinput )
405 switch (rawinput->type)
407 case RIM_TYPEMOUSE:
408 fprintf( stderr, "%s{type=MOUSE,x=%d,y=%d,data=%08x}", prefix, rawinput->mouse.x,
409 rawinput->mouse.y, rawinput->mouse.data );
410 break;
411 case RIM_TYPEKEYBOARD:
412 fprintf( stderr, "%s{type=KEYBOARD,message=%04x,vkey=%04hx,scan=%04hx}", prefix,
413 rawinput->kbd.message, rawinput->kbd.vkey, rawinput->kbd.scan );
414 break;
415 case RIM_TYPEHID:
416 fprintf( stderr, "%s{type=HID,device=%04x,param=%04x,page=%04hx,usage=%04hx,count=%u,length=%u}",
417 prefix, rawinput->hid.device, rawinput->hid.param, rawinput->hid.usage_page,
418 rawinput->hid.usage, rawinput->hid.count, rawinput->hid.length );
419 break;
420 default:
421 fprintf( stderr, "%s{type=%04x}", prefix, rawinput->type );
422 break;
426 static void dump_hw_input( const char *prefix, const hw_input_t *input )
428 switch (input->type)
430 case INPUT_MOUSE:
431 fprintf( stderr, "%s{type=MOUSE,x=%d,y=%d,data=%08x,flags=%08x,time=%u",
432 prefix, input->mouse.x, input->mouse.y, input->mouse.data, input->mouse.flags,
433 input->mouse.time );
434 dump_uint64( ",info=", &input->mouse.info );
435 fputc( '}', stderr );
436 break;
437 case INPUT_KEYBOARD:
438 fprintf( stderr, "%s{type=KEYBOARD,vkey=%04hx,scan=%04hx,flags=%08x,time=%u",
439 prefix, input->kbd.vkey, input->kbd.scan, input->kbd.flags, input->kbd.time );
440 dump_uint64( ",info=", &input->kbd.info );
441 fputc( '}', stderr );
442 break;
443 case INPUT_HARDWARE:
444 fprintf( stderr, "%s{type=HARDWARE,msg=%04x", prefix, input->hw.msg );
445 dump_uint64( ",lparam=", &input->hw.lparam );
446 switch (input->hw.msg)
448 case WM_INPUT:
449 case WM_INPUT_DEVICE_CHANGE:
450 dump_rawinput( ",rawinput=", &input->hw.rawinput );
452 fputc( '}', stderr );
453 break;
454 default:
455 fprintf( stderr, "%s{type=%04x}", prefix, input->type );
456 break;
460 static void dump_luid( const char *prefix, const luid_t *luid )
462 fprintf( stderr, "%s%d.%u", prefix, luid->high_part, luid->low_part );
465 static void dump_generic_map( const char *prefix, const generic_map_t *map )
467 fprintf( stderr, "%s{r=%08x,w=%08x,x=%08x,a=%08x}",
468 prefix, map->read, map->write, map->exec, map->all );
471 static void dump_varargs_ints( const char *prefix, data_size_t size )
473 const int *data = cur_data;
474 data_size_t len = size / sizeof(*data);
476 fprintf( stderr,"%s{", prefix );
477 while (len > 0)
479 fprintf( stderr, "%d", *data++ );
480 if (--len) fputc( ',', stderr );
482 fputc( '}', stderr );
483 remove_data( size );
486 static void dump_varargs_uints( const char *prefix, data_size_t size )
488 const unsigned int *data = cur_data;
490 dump_uints( prefix, data, size / sizeof(*data) );
491 remove_data( size );
494 static void dump_varargs_uints64( const char *prefix, data_size_t size )
496 const unsigned __int64 *data = cur_data;
497 data_size_t len = size / sizeof(*data);
499 fprintf( stderr,"%s{", prefix );
500 while (len > 0)
502 dump_uint64( "", data++ );
503 if (--len) fputc( ',', stderr );
505 fputc( '}', stderr );
506 remove_data( size );
509 static void dump_varargs_ushorts( const char *prefix, data_size_t size )
511 const unsigned short *data = cur_data;
512 data_size_t len = size / sizeof(*data);
514 fprintf( stderr, "%s{", prefix );
515 while (len > 0)
517 fprintf( stderr, "%04x", *data++ );
518 if (--len) fputc( ',', stderr );
520 fputc( '}', stderr );
521 remove_data( size );
524 static void dump_varargs_apc_result( const char *prefix, data_size_t size )
526 const apc_result_t *result = cur_data;
528 if (size >= sizeof(*result))
530 dump_apc_result( prefix, result );
531 size = sizeof(*result);
533 remove_data( size );
536 static void dump_varargs_select_op( const char *prefix, data_size_t size )
538 select_op_t data;
540 if (!size)
542 fprintf( stderr, "%s{}", prefix );
543 return;
545 memset( &data, 0, sizeof(data) );
546 memcpy( &data, cur_data, min( size, sizeof(data) ));
548 fprintf( stderr, "%s{", prefix );
549 switch (data.op)
551 case SELECT_NONE:
552 fprintf( stderr, "NONE" );
553 break;
554 case SELECT_WAIT:
555 case SELECT_WAIT_ALL:
556 fprintf( stderr, "%s", data.op == SELECT_WAIT ? "WAIT" : "WAIT_ALL" );
557 if (size > offsetof( select_op_t, wait.handles ))
558 dump_handles( ",handles=", data.wait.handles,
559 min( size, sizeof(data.wait) ) - offsetof( select_op_t, wait.handles ));
560 break;
561 case SELECT_SIGNAL_AND_WAIT:
562 fprintf( stderr, "SIGNAL_AND_WAIT,signal=%04x,wait=%04x",
563 data.signal_and_wait.signal, data.signal_and_wait.wait );
564 break;
565 case SELECT_KEYED_EVENT_WAIT:
566 case SELECT_KEYED_EVENT_RELEASE:
567 fprintf( stderr, "KEYED_EVENT_%s,handle=%04x",
568 data.op == SELECT_KEYED_EVENT_WAIT ? "WAIT" : "RELEASE",
569 data.keyed_event.handle );
570 dump_uint64( ",key=", &data.keyed_event.key );
571 break;
572 default:
573 fprintf( stderr, "op=%u", data.op );
574 break;
576 fputc( '}', stderr );
577 remove_data( size );
580 static void dump_varargs_user_handles( const char *prefix, data_size_t size )
582 const user_handle_t *data = cur_data;
583 data_size_t len = size / sizeof(*data);
585 fprintf( stderr,"%s{", prefix );
586 while (len > 0)
588 fprintf( stderr, "%08x", *data++ );
589 if (--len) fputc( ',', stderr );
591 fputc( '}', stderr );
592 remove_data( size );
595 static void dump_varargs_bytes( const char *prefix, data_size_t size )
597 const unsigned char *data = cur_data;
598 data_size_t len = min( 1024, size );
600 fprintf( stderr,"%s{", prefix );
601 while (len > 0)
603 fprintf( stderr, "%02x", *data++ );
604 if (--len) fputc( ',', stderr );
606 if (size > 1024) fprintf( stderr, "...(total %u)", size );
607 fputc( '}', stderr );
608 remove_data( size );
611 static void dump_varargs_string( const char *prefix, data_size_t size )
613 fprintf( stderr, "%s\"%.*s\"", prefix, (int)size, (const char *)cur_data );
614 remove_data( size );
617 static void dump_varargs_unicode_str( const char *prefix, data_size_t size )
619 fprintf( stderr, "%sL\"", prefix );
620 dump_strW( cur_data, size, stderr, "\"\"" );
621 fputc( '\"', stderr );
622 remove_data( size );
625 static void dump_varargs_context( const char *prefix, data_size_t size )
627 const context_t *context = cur_data;
628 context_t ctx;
629 unsigned int i;
631 if (!size)
633 fprintf( stderr, "%s{}", prefix );
634 return;
636 size = min( size, sizeof(ctx) );
637 memset( &ctx, 0, sizeof(ctx) );
638 memcpy( &ctx, context, size );
640 switch (ctx.machine)
642 case IMAGE_FILE_MACHINE_I386:
643 fprintf( stderr, "%s{machine=i386", prefix );
644 if (ctx.flags & SERVER_CTX_CONTROL)
645 fprintf( stderr, ",eip=%08x,esp=%08x,ebp=%08x,eflags=%08x,cs=%04x,ss=%04x",
646 ctx.ctl.i386_regs.eip, ctx.ctl.i386_regs.esp, ctx.ctl.i386_regs.ebp,
647 ctx.ctl.i386_regs.eflags, ctx.ctl.i386_regs.cs, ctx.ctl.i386_regs.ss );
648 if (ctx.flags & SERVER_CTX_SEGMENTS)
649 fprintf( stderr, ",ds=%04x,es=%04x,fs=%04x,gs=%04x",
650 ctx.seg.i386_regs.ds, ctx.seg.i386_regs.es,
651 ctx.seg.i386_regs.fs, ctx.seg.i386_regs.gs );
652 if (ctx.flags & SERVER_CTX_INTEGER)
653 fprintf( stderr, ",eax=%08x,ebx=%08x,ecx=%08x,edx=%08x,esi=%08x,edi=%08x",
654 ctx.integer.i386_regs.eax, ctx.integer.i386_regs.ebx, ctx.integer.i386_regs.ecx,
655 ctx.integer.i386_regs.edx, ctx.integer.i386_regs.esi, ctx.integer.i386_regs.edi );
656 if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
657 fprintf( stderr, ",dr0=%08x,dr1=%08x,dr2=%08x,dr3=%08x,dr6=%08x,dr7=%08x",
658 ctx.debug.i386_regs.dr0, ctx.debug.i386_regs.dr1, ctx.debug.i386_regs.dr2,
659 ctx.debug.i386_regs.dr3, ctx.debug.i386_regs.dr6, ctx.debug.i386_regs.dr7 );
660 if (ctx.flags & SERVER_CTX_FLOATING_POINT)
662 fprintf( stderr, ",fp.ctrl=%08x,fp.status=%08x,fp.tag=%08x,fp.err_off=%08x,fp.err_sel=%08x",
663 ctx.fp.i386_regs.ctrl, ctx.fp.i386_regs.status, ctx.fp.i386_regs.tag,
664 ctx.fp.i386_regs.err_off, ctx.fp.i386_regs.err_sel );
665 fprintf( stderr, ",fp.data_off=%08x,fp.data_sel=%08x,fp.cr0npx=%08x",
666 ctx.fp.i386_regs.data_off, ctx.fp.i386_regs.data_sel, ctx.fp.i386_regs.cr0npx );
667 for (i = 0; i < 8; i++)
669 unsigned __int64 reg[2];
670 memset( reg, 0, sizeof(reg) );
671 memcpy( reg, &ctx.fp.i386_regs.regs[10 * i], 10 );
672 fprintf( stderr, ",fp.reg%u=", i );
673 dump_uint128( "", reg );
676 if (ctx.flags & SERVER_CTX_EXTENDED_REGISTERS)
677 dump_uints( ",extended=", (const unsigned int *)ctx.ext.i386_regs,
678 sizeof(ctx.ext.i386_regs) / sizeof(int) );
679 if (ctx.flags & SERVER_CTX_YMM_REGISTERS)
680 for (i = 0; i < 16; i++)
682 fprintf( stderr, ",ymm%u=", i );
683 dump_uint128( "", (const unsigned __int64 *)&ctx.ymm.regs.ymm_high[i] );
685 break;
686 case IMAGE_FILE_MACHINE_AMD64:
687 fprintf( stderr, "%s{machine=x86_64", prefix );
688 if (ctx.flags & SERVER_CTX_CONTROL)
690 dump_uint64( ",rip=", &ctx.ctl.x86_64_regs.rip );
691 dump_uint64( ",rbp=", &ctx.ctl.x86_64_regs.rbp );
692 dump_uint64( ",rsp=", &ctx.ctl.x86_64_regs.rsp );
693 fprintf( stderr, ",cs=%04x,ss=%04x,flags=%08x",
694 ctx.ctl.x86_64_regs.cs, ctx.ctl.x86_64_regs.ss, ctx.ctl.x86_64_regs.flags );
696 if (ctx.flags & SERVER_CTX_INTEGER)
698 dump_uint64( ",rax=", &ctx.integer.x86_64_regs.rax );
699 dump_uint64( ",rbx=", &ctx.integer.x86_64_regs.rbx );
700 dump_uint64( ",rcx=", &ctx.integer.x86_64_regs.rcx );
701 dump_uint64( ",rdx=", &ctx.integer.x86_64_regs.rdx );
702 dump_uint64( ",rsi=", &ctx.integer.x86_64_regs.rsi );
703 dump_uint64( ",rdi=", &ctx.integer.x86_64_regs.rdi );
704 dump_uint64( ",r8=", &ctx.integer.x86_64_regs.r8 );
705 dump_uint64( ",r9=", &ctx.integer.x86_64_regs.r9 );
706 dump_uint64( ",r10=", &ctx.integer.x86_64_regs.r10 );
707 dump_uint64( ",r11=", &ctx.integer.x86_64_regs.r11 );
708 dump_uint64( ",r12=", &ctx.integer.x86_64_regs.r12 );
709 dump_uint64( ",r13=", &ctx.integer.x86_64_regs.r13 );
710 dump_uint64( ",r14=", &ctx.integer.x86_64_regs.r14 );
711 dump_uint64( ",r15=", &ctx.integer.x86_64_regs.r15 );
713 if (ctx.flags & SERVER_CTX_SEGMENTS)
714 fprintf( stderr, ",ds=%04x,es=%04x,fs=%04x,gs=%04x",
715 ctx.seg.x86_64_regs.ds, ctx.seg.x86_64_regs.es,
716 ctx.seg.x86_64_regs.fs, ctx.seg.x86_64_regs.gs );
717 if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
719 dump_uint64( ",dr0=", &ctx.debug.x86_64_regs.dr0 );
720 dump_uint64( ",dr1=", &ctx.debug.x86_64_regs.dr1 );
721 dump_uint64( ",dr2=", &ctx.debug.x86_64_regs.dr2 );
722 dump_uint64( ",dr3=", &ctx.debug.x86_64_regs.dr3 );
723 dump_uint64( ",dr6=", &ctx.debug.x86_64_regs.dr6 );
724 dump_uint64( ",dr7=", &ctx.debug.x86_64_regs.dr7 );
726 if (ctx.flags & SERVER_CTX_FLOATING_POINT)
727 for (i = 0; i < 32; i++)
729 fprintf( stderr, ",fp%u=", i );
730 dump_uint128( "", (const unsigned __int64 *)&ctx.fp.x86_64_regs.fpregs[i] );
732 if (ctx.flags & SERVER_CTX_YMM_REGISTERS)
733 for (i = 0; i < 16; i++)
735 fprintf( stderr, ",ymm%u=", i );
736 dump_uint128( "", (const unsigned __int64 *)&ctx.ymm.regs.ymm_high[i] );
738 break;
739 case IMAGE_FILE_MACHINE_ARMNT:
740 fprintf( stderr, "%s{machine=arm", prefix );
741 if (ctx.flags & SERVER_CTX_CONTROL)
742 fprintf( stderr, ",sp=%08x,lr=%08x,pc=%08x,cpsr=%08x",
743 ctx.ctl.arm_regs.sp, ctx.ctl.arm_regs.lr,
744 ctx.ctl.arm_regs.pc, ctx.ctl.arm_regs.cpsr );
745 if (ctx.flags & SERVER_CTX_INTEGER)
746 for (i = 0; i < 13; i++) fprintf( stderr, ",r%u=%08x", i, ctx.integer.arm_regs.r[i] );
747 if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
749 for (i = 0; i < 8; i++)
750 fprintf( stderr, ",bcr%u=%08x,bvr%u=%08x",
751 i, ctx.debug.arm_regs.bcr[i], i, ctx.debug.arm_regs.bvr[i] );
752 fprintf( stderr, ",wcr0=%08x,wvr0=%08x",
753 ctx.debug.arm_regs.wcr[0], ctx.debug.arm_regs.wvr[0] );
755 if (ctx.flags & SERVER_CTX_FLOATING_POINT)
757 for (i = 0; i < 32; i++)
759 fprintf( stderr, ",d%u=", i );
760 dump_uint64( "", &ctx.fp.arm_regs.d[i] );
762 fprintf( stderr, ",fpscr=%08x", ctx.fp.arm_regs.fpscr );
764 break;
765 case IMAGE_FILE_MACHINE_ARM64:
766 fprintf( stderr, "%s{machine=arm64", prefix );
767 if (ctx.flags & SERVER_CTX_CONTROL)
769 dump_uint64( ",sp=", &ctx.ctl.arm64_regs.sp );
770 dump_uint64( ",pc=", &ctx.ctl.arm64_regs.pc );
771 dump_uint64( ",pstate=", &ctx.ctl.arm64_regs.pstate );
773 if (ctx.flags & SERVER_CTX_INTEGER)
775 for (i = 0; i < 31; i++)
777 fprintf( stderr, ",x%u=", i );
778 dump_uint64( "", &ctx.integer.arm64_regs.x[i] );
781 if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
783 for (i = 0; i < 8; i++)
785 fprintf( stderr, ",bcr%u=%08x,bvr%u=", i, ctx.debug.arm64_regs.bcr[i], i );
786 dump_uint64( "", &ctx.debug.arm64_regs.bvr[i] );
788 for (i = 0; i < 2; i++)
790 fprintf( stderr, ",wcr%u=%08x,wvr%u=", i, ctx.debug.arm64_regs.wcr[i], i );
791 dump_uint64( "", &ctx.debug.arm64_regs.wvr[i] );
794 if (ctx.flags & SERVER_CTX_FLOATING_POINT)
796 for (i = 0; i < 32; i++)
798 fprintf( stderr, ",q%u=", i );
799 dump_uint64( "", &ctx.fp.arm64_regs.q[i].high );
800 dump_uint64( "", &ctx.fp.arm64_regs.q[i].low );
802 fprintf( stderr, ",fpcr=%08x,fpsr=%08x", ctx.fp.arm64_regs.fpcr, ctx.fp.arm64_regs.fpsr );
804 break;
805 default:
806 fprintf( stderr, "%s{machine=%04x", prefix, ctx.machine );
807 break;
809 fputc( '}', stderr );
810 remove_data( size );
813 static void dump_varargs_contexts( const char *prefix, data_size_t size )
815 if (!size)
817 fprintf( stderr, "%s{}", prefix );
818 return;
820 fprintf( stderr, "%s{", prefix );
821 while (cur_size)
823 dump_varargs_context( "", cur_size );
824 fputc( cur_size ? ',' : '}', stderr );
828 static void dump_varargs_debug_event( const char *prefix, data_size_t size )
830 debug_event_t event;
831 unsigned int i;
833 if (!size)
835 fprintf( stderr, "%s{}", prefix );
836 return;
838 size = min( size, sizeof(event) );
839 memset( &event, 0, sizeof(event) );
840 memcpy( &event, cur_data, size );
842 switch(event.code)
844 case DbgIdle:
845 fprintf( stderr, "%s{idle}", prefix );
846 break;
847 case DbgReplyPending:
848 fprintf( stderr, "%s{pending}", prefix );
849 break;
850 case DbgCreateThreadStateChange:
851 fprintf( stderr, "%s{create_thread,thread=%04x", prefix, event.create_thread.handle );
852 dump_uint64( ",start=", &event.create_thread.start );
853 fputc( '}', stderr );
854 break;
855 case DbgCreateProcessStateChange:
856 fprintf( stderr, "%s{create_process,file=%04x,process=%04x,thread=%04x", prefix,
857 event.create_process.file, event.create_process.process,
858 event.create_process.thread );
859 dump_uint64( ",base=", &event.create_process.base );
860 fprintf( stderr, ",offset=%d,size=%d",
861 event.create_process.dbg_offset, event.create_process.dbg_size );
862 dump_uint64( ",start=", &event.create_process.start );
863 fputc( '}', stderr );
864 break;
865 case DbgExitThreadStateChange:
866 fprintf( stderr, "%s{exit_thread,code=%d}", prefix, event.exit.exit_code );
867 break;
868 case DbgExitProcessStateChange:
869 fprintf( stderr, "%s{exit_process,code=%d}", prefix, event.exit.exit_code );
870 break;
871 case DbgExceptionStateChange:
872 case DbgBreakpointStateChange:
873 case DbgSingleStepStateChange:
874 fprintf( stderr, "%s{%s,first=%d,exc_code=%08x,flags=%08x", prefix,
875 event.code == DbgBreakpointStateChange ? "breakpoint" :
876 event.code == DbgSingleStepStateChange ? "singlestep" : "exception",
877 event.exception.first, event.exception.exc_code, event.exception.flags );
878 dump_uint64( ",record=", &event.exception.record );
879 dump_uint64( ",address=", &event.exception.address );
880 fprintf( stderr, ",params={" );
881 event.exception.nb_params = min( event.exception.nb_params, EXCEPTION_MAXIMUM_PARAMETERS );
882 for (i = 0; i < event.exception.nb_params; i++)
884 dump_uint64( "", &event.exception.params[i] );
885 if (i < event.exception.nb_params) fputc( ',', stderr );
887 fprintf( stderr, "}}" );
888 break;
889 case DbgLoadDllStateChange:
890 fprintf( stderr, "%s{load_dll,file=%04x", prefix, event.load_dll.handle );
891 dump_uint64( ",base=", &event.load_dll.base );
892 fprintf( stderr, ",offset=%d,size=%d",
893 event.load_dll.dbg_offset, event.load_dll.dbg_size );
894 dump_uint64( ",name=", &event.load_dll.name );
895 fputc( '}', stderr );
896 break;
897 case DbgUnloadDllStateChange:
898 fprintf( stderr, "%s{unload_dll", prefix );
899 dump_uint64( ",base=", &event.unload_dll.base );
900 fputc( '}', stderr );
901 break;
902 default:
903 fprintf( stderr, "%s{code=??? (%d)}", prefix, event.code );
904 break;
906 remove_data( size );
909 /* dump a unicode string contained in a buffer; helper for dump_varargs_startup_info */
910 static data_size_t dump_inline_unicode_string( const char *prefix, data_size_t pos, data_size_t len, data_size_t total_size )
912 fputs( prefix, stderr );
913 if (pos >= total_size) return pos;
914 if (len > total_size - pos) len = total_size - pos;
915 dump_strW( (const WCHAR *)cur_data + pos/sizeof(WCHAR), len, stderr, "\"\"" );
916 return pos + (len / sizeof(WCHAR)) * sizeof(WCHAR);
919 static void dump_varargs_startup_info( const char *prefix, data_size_t size )
921 startup_info_t info;
922 data_size_t pos = sizeof(info);
924 memset( &info, 0, sizeof(info) );
925 memcpy( &info, cur_data, min( size, sizeof(info) ));
927 fprintf( stderr,
928 "%s{debug_flags=%x,console_flags=%x,console=%04x,hstdin=%04x,hstdout=%04x,hstderr=%04x,"
929 "x=%u,y=%u,xsize=%u,ysize=%u,xchars=%u,ychars=%u,attribute=%02x,flags=%x,show=%u",
930 prefix, info.debug_flags, info.console_flags, info.console,
931 info.hstdin, info.hstdout, info.hstderr, info.x, info.y, info.xsize, info.ysize,
932 info.xchars, info.ychars, info.attribute, info.flags, info.show );
933 pos = dump_inline_unicode_string( ",curdir=L\"", pos, info.curdir_len, size );
934 pos = dump_inline_unicode_string( "\",dllpath=L\"", pos, info.dllpath_len, size );
935 pos = dump_inline_unicode_string( "\",imagepath=L\"", pos, info.imagepath_len, size );
936 pos = dump_inline_unicode_string( "\",cmdline=L\"", pos, info.cmdline_len, size );
937 pos = dump_inline_unicode_string( "\",title=L\"", pos, info.title_len, size );
938 pos = dump_inline_unicode_string( "\",desktop=L\"", pos, info.desktop_len, size );
939 pos = dump_inline_unicode_string( "\",shellinfo=L\"", pos, info.shellinfo_len, size );
940 pos = dump_inline_unicode_string( "\",runtime=L\"", pos, info.runtime_len, size );
941 fprintf( stderr, "\"}" );
942 remove_data( size );
945 static void dump_varargs_rectangles( const char *prefix, data_size_t size )
947 const rectangle_t *rect = cur_data;
948 data_size_t len = size / sizeof(*rect);
950 fprintf( stderr,"%s{", prefix );
951 while (len > 0)
953 dump_rectangle( "", rect++ );
954 if (--len) fputc( ',', stderr );
956 fputc( '}', stderr );
957 remove_data( size );
960 static void dump_varargs_cursor_positions( const char *prefix, data_size_t size )
962 const cursor_pos_t *pos = cur_data;
963 data_size_t len = size / sizeof(*pos);
965 fprintf( stderr, "%s{", prefix );
966 while (len > 0)
968 fprintf( stderr, "{x=%d,y=%d,time=%u", pos->x, pos->y, pos->time );
969 dump_uint64( ",info=", &pos->info );
970 fputc( '}', stderr );
971 pos++;
972 if (--len) fputc( ',', stderr );
974 fputc( '}', stderr );
975 remove_data( size );
978 static void dump_varargs_message_data( const char *prefix, data_size_t size )
980 /* FIXME: dump the structured data */
981 dump_varargs_bytes( prefix, size );
984 static void dump_varargs_properties( const char *prefix, data_size_t size )
986 const property_data_t *prop = cur_data;
987 data_size_t len = size / sizeof(*prop);
989 fprintf( stderr,"%s{", prefix );
990 while (len > 0)
992 fprintf( stderr, "{atom=%04x,str=%d", prop->atom, prop->string );
993 dump_uint64( ",data=", &prop->data );
994 fputc( '}', stderr );
995 prop++;
996 if (--len) fputc( ',', stderr );
998 fputc( '}', stderr );
999 remove_data( size );
1002 static void dump_varargs_LUID_AND_ATTRIBUTES( const char *prefix, data_size_t size )
1004 const LUID_AND_ATTRIBUTES *lat = cur_data;
1005 data_size_t len = size / sizeof(*lat);
1007 fprintf( stderr,"%s{", prefix );
1008 while (len > 0)
1010 fprintf( stderr, "{luid=%08x%08x,attr=%x}",
1011 lat->Luid.HighPart, lat->Luid.LowPart, lat->Attributes );
1012 lat++;
1013 if (--len) fputc( ',', stderr );
1015 fputc( '}', stderr );
1016 remove_data( size );
1019 static void dump_inline_sid( const char *prefix, const SID *sid, data_size_t size )
1021 DWORD i;
1023 /* security check */
1024 if ((FIELD_OFFSET(SID, SubAuthority[0]) > size) ||
1025 (FIELD_OFFSET(SID, SubAuthority[sid->SubAuthorityCount]) > size))
1027 fprintf( stderr, "<invalid sid>" );
1028 return;
1031 fprintf( stderr,"%s{", prefix );
1032 fprintf( stderr, "S-%u-%u", sid->Revision, MAKELONG(
1033 MAKEWORD( sid->IdentifierAuthority.Value[5],
1034 sid->IdentifierAuthority.Value[4] ),
1035 MAKEWORD( sid->IdentifierAuthority.Value[3],
1036 sid->IdentifierAuthority.Value[2] ) ) );
1037 for (i = 0; i < sid->SubAuthorityCount; i++)
1038 fprintf( stderr, "-%u", sid->SubAuthority[i] );
1039 fputc( '}', stderr );
1042 static void dump_varargs_SID( const char *prefix, data_size_t size )
1044 const SID *sid = cur_data;
1045 dump_inline_sid( prefix, sid, size );
1046 remove_data( size );
1049 static void dump_inline_acl( const char *prefix, const ACL *acl, data_size_t size )
1051 const ACE_HEADER *ace;
1052 ULONG i;
1054 fprintf( stderr,"%s{", prefix );
1055 if (size)
1057 if (size < sizeof(ACL))
1059 fprintf( stderr, "<invalid acl>}" );
1060 return;
1062 size -= sizeof(ACL);
1063 ace = (const ACE_HEADER *)(acl + 1);
1064 for (i = 0; i < acl->AceCount; i++)
1066 const SID *sid = NULL;
1067 data_size_t sid_size = 0;
1069 if (size < sizeof(ACE_HEADER) || size < ace->AceSize) break;
1070 size -= ace->AceSize;
1071 if (i != 0) fputc( ',', stderr );
1072 fprintf( stderr, "{AceType=" );
1073 switch (ace->AceType)
1075 case ACCESS_DENIED_ACE_TYPE:
1076 sid = (const SID *)&((const ACCESS_DENIED_ACE *)ace)->SidStart;
1077 sid_size = ace->AceSize - FIELD_OFFSET(ACCESS_DENIED_ACE, SidStart);
1078 fprintf( stderr, "ACCESS_DENIED_ACE_TYPE,Mask=%x",
1079 ((const ACCESS_DENIED_ACE *)ace)->Mask );
1080 break;
1081 case ACCESS_ALLOWED_ACE_TYPE:
1082 sid = (const SID *)&((const ACCESS_ALLOWED_ACE *)ace)->SidStart;
1083 sid_size = ace->AceSize - FIELD_OFFSET(ACCESS_ALLOWED_ACE, SidStart);
1084 fprintf( stderr, "ACCESS_ALLOWED_ACE_TYPE,Mask=%x",
1085 ((const ACCESS_ALLOWED_ACE *)ace)->Mask );
1086 break;
1087 case SYSTEM_AUDIT_ACE_TYPE:
1088 sid = (const SID *)&((const SYSTEM_AUDIT_ACE *)ace)->SidStart;
1089 sid_size = ace->AceSize - FIELD_OFFSET(SYSTEM_AUDIT_ACE, SidStart);
1090 fprintf( stderr, "SYSTEM_AUDIT_ACE_TYPE,Mask=%x",
1091 ((const SYSTEM_AUDIT_ACE *)ace)->Mask );
1092 break;
1093 case SYSTEM_ALARM_ACE_TYPE:
1094 sid = (const SID *)&((const SYSTEM_ALARM_ACE *)ace)->SidStart;
1095 sid_size = ace->AceSize - FIELD_OFFSET(SYSTEM_ALARM_ACE, SidStart);
1096 fprintf( stderr, "SYSTEM_ALARM_ACE_TYPE,Mask=%x",
1097 ((const SYSTEM_ALARM_ACE *)ace)->Mask );
1098 break;
1099 case SYSTEM_MANDATORY_LABEL_ACE_TYPE:
1100 sid = (const SID *)&((const SYSTEM_MANDATORY_LABEL_ACE *)ace)->SidStart;
1101 sid_size = ace->AceSize - FIELD_OFFSET(SYSTEM_MANDATORY_LABEL_ACE, SidStart);
1102 fprintf( stderr, "SYSTEM_MANDATORY_LABEL_ACE_TYPE,Mask=%x",
1103 ((const SYSTEM_MANDATORY_LABEL_ACE *)ace)->Mask );
1104 break;
1105 default:
1106 fprintf( stderr, "unknown<%d>", ace->AceType );
1107 break;
1109 fprintf( stderr, ",AceFlags=%x", ace->AceFlags );
1110 if (sid)
1111 dump_inline_sid( ",Sid=", sid, sid_size );
1112 ace = (const ACE_HEADER *)((const char *)ace + ace->AceSize);
1113 fputc( '}', stderr );
1116 fputc( '}', stderr );
1119 static void dump_varargs_ACL( const char *prefix, data_size_t size )
1121 const ACL *acl = cur_data;
1122 dump_inline_acl( prefix, acl, size );
1123 remove_data( size );
1126 static void dump_inline_security_descriptor( const char *prefix, const struct security_descriptor *sd, data_size_t size )
1128 fprintf( stderr,"%s{", prefix );
1129 if (size >= sizeof(struct security_descriptor))
1131 size_t offset = sizeof(struct security_descriptor);
1132 fprintf( stderr, "control=%08x", sd->control );
1133 if ((sd->owner_len > FIELD_OFFSET(SID, SubAuthority[255])) || (offset + sd->owner_len > size))
1134 return;
1135 if (sd->owner_len)
1136 dump_inline_sid( ",owner=", (const SID *)((const char *)sd + offset), sd->owner_len );
1137 else
1138 fprintf( stderr, ",owner=<not present>" );
1139 offset += sd->owner_len;
1140 if ((sd->group_len > FIELD_OFFSET(SID, SubAuthority[255])) || (offset + sd->group_len > size))
1141 return;
1142 if (sd->group_len)
1143 dump_inline_sid( ",group=", (const SID *)((const char *)sd + offset), sd->group_len );
1144 else
1145 fprintf( stderr, ",group=<not present>" );
1146 offset += sd->group_len;
1147 if ((sd->sacl_len >= MAX_ACL_LEN) || (offset + sd->sacl_len > size))
1148 return;
1149 dump_inline_acl( ",sacl=", (const ACL *)((const char *)sd + offset), sd->sacl_len );
1150 offset += sd->sacl_len;
1151 if ((sd->dacl_len >= MAX_ACL_LEN) || (offset + sd->dacl_len > size))
1152 return;
1153 dump_inline_acl( ",dacl=", (const ACL *)((const char *)sd + offset), sd->dacl_len );
1154 offset += sd->dacl_len;
1156 fputc( '}', stderr );
1159 static void dump_varargs_security_descriptor( const char *prefix, data_size_t size )
1161 const struct security_descriptor *sd = cur_data;
1162 dump_inline_security_descriptor( prefix, sd, size );
1163 remove_data( size );
1166 static void dump_varargs_token_groups( const char *prefix, data_size_t size )
1168 const struct token_groups *tg = cur_data;
1170 fprintf( stderr,"%s{", prefix );
1171 if (size >= sizeof(struct token_groups))
1173 size_t offset = sizeof(*tg);
1174 fprintf( stderr, "count=%08x,", tg->count );
1175 if (tg->count * sizeof(unsigned int) <= size)
1177 unsigned int i;
1178 const unsigned int *attr = (const unsigned int *)(tg + 1);
1180 offset += tg->count * sizeof(unsigned int);
1182 fputc( '[', stderr );
1183 for (i = 0; i < tg->count; i++)
1185 const SID *sid = (const SID *)((const char *)cur_data + offset);
1186 if (i != 0)
1187 fputc( ',', stderr );
1188 fputc( '{', stderr );
1189 fprintf( stderr, "attributes=%08x", attr[i] );
1190 dump_inline_sid( ",sid=", sid, size - offset );
1191 if ((offset + FIELD_OFFSET(SID, SubAuthority[0]) > size) ||
1192 (offset + FIELD_OFFSET(SID, SubAuthority[sid->SubAuthorityCount]) > size))
1193 break;
1194 offset += FIELD_OFFSET(SID, SubAuthority[sid->SubAuthorityCount]);
1195 fputc( '}', stderr );
1197 fputc( ']', stderr );
1200 fputc( '}', stderr );
1203 static void dump_varargs_process_info( const char *prefix, data_size_t size )
1205 data_size_t pos = 0;
1206 unsigned int i;
1208 fprintf( stderr,"%s{", prefix );
1210 while (size - pos >= sizeof(struct process_info))
1212 const struct process_info *process;
1213 pos = (pos + 7) & ~7;
1214 process = (const struct process_info *)((const char *)cur_data + pos);
1215 if (size - pos < sizeof(*process)) break;
1216 if (pos) fputc( ',', stderr );
1217 dump_timeout( "{start_time=", &process->start_time );
1218 fprintf( stderr, ",thread_count=%u,priority=%d,pid=%04x,parent_pid=%04x,session_id=%08x,handle_count=%u,unix_pid=%d,",
1219 process->thread_count, process->priority, process->pid,
1220 process->parent_pid, process->session_id, process->handle_count, process->unix_pid );
1221 pos += sizeof(*process);
1223 pos = dump_inline_unicode_string( "name=L\"", pos, process->name_len, size );
1225 pos = (pos + 7) & ~7;
1226 fprintf( stderr, "\",threads={" );
1227 for (i = 0; i < process->thread_count; i++)
1229 const struct thread_info *thread = (const struct thread_info *)((const char *)cur_data + pos);
1230 if (size - pos < sizeof(*thread)) break;
1231 if (i) fputc( ',', stderr );
1232 dump_timeout( "{start_time=", &thread->start_time );
1233 fprintf( stderr, ",tid=%04x,base_priority=%d,current_priority=%d,unix_tid=%d}",
1234 thread->tid, thread->base_priority, thread->current_priority, thread->unix_tid );
1235 pos += sizeof(*thread);
1237 fprintf( stderr, "}}" );
1239 fputc( '}', stderr );
1240 remove_data( size );
1243 static void dump_varargs_object_attributes( const char *prefix, data_size_t size )
1245 const struct object_attributes *objattr = cur_data;
1247 fprintf( stderr,"%s{", prefix );
1248 if (size)
1250 const WCHAR *str;
1252 if (size < sizeof(*objattr) ||
1253 (size - sizeof(*objattr) < objattr->sd_len) ||
1254 (size - sizeof(*objattr) - objattr->sd_len < objattr->name_len))
1256 fprintf( stderr, "***invalid***}" );
1257 remove_data( size );
1258 return;
1261 fprintf( stderr, "rootdir=%04x,attributes=%08x", objattr->rootdir, objattr->attributes );
1262 dump_inline_security_descriptor( ",sd=", (const struct security_descriptor *)(objattr + 1), objattr->sd_len );
1263 str = (const WCHAR *)objattr + (sizeof(*objattr) + objattr->sd_len) / sizeof(WCHAR);
1264 fprintf( stderr, ",name=L\"" );
1265 dump_strW( str, objattr->name_len, stderr, "\"\"" );
1266 fputc( '\"', stderr );
1267 remove_data( (sizeof(*objattr) + (objattr->sd_len & ~1) + (objattr->name_len & ~1) + 3) & ~3 );
1269 fputc( '}', stderr );
1272 static void dump_varargs_object_type_info( const char *prefix, data_size_t size )
1274 const struct object_type_info *info = cur_data;
1276 fprintf( stderr,"%s{", prefix );
1277 if (size)
1279 if (size < sizeof(*info) || (size - sizeof(*info) < info->name_len))
1281 fprintf( stderr, "***invalid***}" );
1282 remove_data( size );
1283 return;
1286 fprintf( stderr, "index=%u,obj_count=%u,handle_count=%u,obj_max=%u,handle_max=%u,valid=%08x",
1287 info->index,info->obj_count, info->handle_count, info->obj_max, info->handle_max,
1288 info->valid_access );
1289 dump_generic_map( ",access=", &info->mapping );
1290 fprintf( stderr, ",name=L\"" );
1291 dump_strW( (const WCHAR *)(info + 1), info->name_len, stderr, "\"\"" );
1292 fputc( '\"', stderr );
1293 remove_data( min( size, sizeof(*info) + ((info->name_len + 2) & ~3 )));
1295 fputc( '}', stderr );
1298 static void dump_varargs_object_types_info( const char *prefix, data_size_t size )
1300 fprintf( stderr,"%s{", prefix );
1301 while (cur_size) dump_varargs_object_type_info( ",", cur_size );
1302 fputc( '}', stderr );
1305 static void dump_varargs_filesystem_event( const char *prefix, data_size_t size )
1307 static const char * const actions[] = {
1308 NULL,
1309 "ADDED",
1310 "REMOVED",
1311 "MODIFIED",
1312 "RENAMED_OLD_NAME",
1313 "RENAMED_NEW_NAME",
1314 "ADDED_STREAM",
1315 "REMOVED_STREAM",
1316 "MODIFIED_STREAM"
1319 fprintf( stderr,"%s{", prefix );
1320 while (size)
1322 const struct filesystem_event *event = cur_data;
1323 data_size_t len = (offsetof( struct filesystem_event, name[event->len] ) + sizeof(int)-1)
1324 / sizeof(int) * sizeof(int);
1325 if (size < len) break;
1326 if (event->action < ARRAY_SIZE( actions ) && actions[event->action])
1327 fprintf( stderr, "{action=%s", actions[event->action] );
1328 else
1329 fprintf( stderr, "{action=%u", event->action );
1330 fprintf( stderr, ",name=\"%.*s\"}", event->len, event->name );
1331 size -= len;
1332 remove_data( len );
1333 if (size)fputc( ',', stderr );
1335 fputc( '}', stderr );
1338 static void dump_varargs_pe_image_info( const char *prefix, data_size_t size )
1340 pe_image_info_t info;
1342 if (!size)
1344 fprintf( stderr, "%s{}", prefix );
1345 return;
1347 memset( &info, 0, sizeof(info) );
1348 memcpy( &info, cur_data, min( size, sizeof(info) ));
1350 fprintf( stderr, "%s{", prefix );
1351 dump_uint64( "base=", &info.base );
1352 dump_uint64( ",stack_size=", &info.stack_size );
1353 dump_uint64( ",stack_commit=", &info.stack_commit );
1354 fprintf( stderr, ",entry_point=%08x,map_size=%08x,zerobits=%08x,subsystem=%08x,subsystem_minor=%04x,subsystem_major=%04x"
1355 ",osversion_major=%04x,osversion_minor=%04x,image_charact=%04x,dll_charact=%04x,machine=%04x"
1356 ",contains_code=%u,image_flags=%02x"
1357 ",loader_flags=%08x,header_size=%08x,file_size=%08x,checksum=%08x}",
1358 info.entry_point, info.map_size, info.zerobits, info.subsystem, info.subsystem_minor,
1359 info.subsystem_major, info.osversion_major, info.osversion_minor, info.image_charact,
1360 info.dll_charact, info.machine, info.contains_code, info.image_flags, info.loader_flags,
1361 info.header_size, info.file_size, info.checksum );
1362 remove_data( min( size, sizeof(info) ));
1365 static void dump_varargs_rawinput_devices(const char *prefix, data_size_t size )
1367 const struct rawinput_device *device;
1369 fprintf( stderr, "%s{", prefix );
1370 while (size >= sizeof(*device))
1372 device = cur_data;
1373 fprintf( stderr, "{usage_page=%04x,usage=%04x,flags=%08x,target=%08x}",
1374 device->usage_page, device->usage, device->flags, device->target );
1375 size -= sizeof(*device);
1376 remove_data( sizeof(*device) );
1377 if (size) fputc( ',', stderr );
1379 fputc( '}', stderr );
1382 static void dump_varargs_handle_infos( const char *prefix, data_size_t size )
1384 const struct handle_info *handle;
1386 fprintf( stderr, "%s{", prefix );
1387 while (size >= sizeof(*handle))
1389 handle = cur_data;
1390 fprintf( stderr, "{owner=%04x,handle=%04x,access=%08x,attributes=%08x,type=%u}",
1391 handle->owner, handle->handle, handle->access, handle->attributes, handle->type );
1392 size -= sizeof(*handle);
1393 remove_data( sizeof(*handle) );
1394 if (size) fputc( ',', stderr );
1396 fputc( '}', stderr );
1399 typedef void (*dump_func)( const void *req );
1401 /* Everything below this line is generated automatically by tools/make_requests */
1402 /* ### make_requests begin ### */
1404 static void dump_new_process_request( const struct new_process_request *req )
1406 fprintf( stderr, " token=%04x", req->token );
1407 fprintf( stderr, ", debug=%04x", req->debug );
1408 fprintf( stderr, ", parent_process=%04x", req->parent_process );
1409 fprintf( stderr, ", flags=%08x", req->flags );
1410 fprintf( stderr, ", socket_fd=%d", req->socket_fd );
1411 fprintf( stderr, ", access=%08x", req->access );
1412 fprintf( stderr, ", machine=%04x", req->machine );
1413 fprintf( stderr, ", info_size=%u", req->info_size );
1414 fprintf( stderr, ", handles_size=%u", req->handles_size );
1415 fprintf( stderr, ", jobs_size=%u", req->jobs_size );
1416 dump_varargs_object_attributes( ", objattr=", cur_size );
1417 dump_varargs_uints( ", handles=", min(cur_size,req->handles_size) );
1418 dump_varargs_uints( ", jobs=", min(cur_size,req->jobs_size) );
1419 dump_varargs_startup_info( ", info=", min(cur_size,req->info_size) );
1420 dump_varargs_unicode_str( ", env=", cur_size );
1423 static void dump_new_process_reply( const struct new_process_reply *req )
1425 fprintf( stderr, " info=%04x", req->info );
1426 fprintf( stderr, ", pid=%04x", req->pid );
1427 fprintf( stderr, ", handle=%04x", req->handle );
1430 static void dump_get_new_process_info_request( const struct get_new_process_info_request *req )
1432 fprintf( stderr, " info=%04x", req->info );
1435 static void dump_get_new_process_info_reply( const struct get_new_process_info_reply *req )
1437 fprintf( stderr, " success=%d", req->success );
1438 fprintf( stderr, ", exit_code=%d", req->exit_code );
1441 static void dump_new_thread_request( const struct new_thread_request *req )
1443 fprintf( stderr, " process=%04x", req->process );
1444 fprintf( stderr, ", access=%08x", req->access );
1445 fprintf( stderr, ", flags=%08x", req->flags );
1446 fprintf( stderr, ", request_fd=%d", req->request_fd );
1447 dump_varargs_object_attributes( ", objattr=", cur_size );
1450 static void dump_new_thread_reply( const struct new_thread_reply *req )
1452 fprintf( stderr, " tid=%04x", req->tid );
1453 fprintf( stderr, ", handle=%04x", req->handle );
1456 static void dump_get_startup_info_request( const struct get_startup_info_request *req )
1460 static void dump_get_startup_info_reply( const struct get_startup_info_reply *req )
1462 fprintf( stderr, " info_size=%u", req->info_size );
1463 dump_varargs_startup_info( ", info=", min(cur_size,req->info_size) );
1464 dump_varargs_unicode_str( ", env=", cur_size );
1467 static void dump_init_process_done_request( const struct init_process_done_request *req )
1469 dump_uint64( " teb=", &req->teb );
1470 dump_uint64( ", peb=", &req->peb );
1471 dump_uint64( ", ldt_copy=", &req->ldt_copy );
1474 static void dump_init_process_done_reply( const struct init_process_done_reply *req )
1476 dump_uint64( " entry=", &req->entry );
1477 fprintf( stderr, ", suspend=%d", req->suspend );
1480 static void dump_init_first_thread_request( const struct init_first_thread_request *req )
1482 fprintf( stderr, " unix_pid=%d", req->unix_pid );
1483 fprintf( stderr, ", unix_tid=%d", req->unix_tid );
1484 fprintf( stderr, ", debug_level=%d", req->debug_level );
1485 fprintf( stderr, ", reply_fd=%d", req->reply_fd );
1486 fprintf( stderr, ", wait_fd=%d", req->wait_fd );
1489 static void dump_init_first_thread_reply( const struct init_first_thread_reply *req )
1491 fprintf( stderr, " pid=%04x", req->pid );
1492 fprintf( stderr, ", tid=%04x", req->tid );
1493 dump_timeout( ", server_start=", &req->server_start );
1494 fprintf( stderr, ", session_id=%08x", req->session_id );
1495 fprintf( stderr, ", info_size=%u", req->info_size );
1496 dump_varargs_ushorts( ", machines=", cur_size );
1499 static void dump_init_thread_request( const struct init_thread_request *req )
1501 fprintf( stderr, " unix_tid=%d", req->unix_tid );
1502 fprintf( stderr, ", reply_fd=%d", req->reply_fd );
1503 fprintf( stderr, ", wait_fd=%d", req->wait_fd );
1504 dump_uint64( ", teb=", &req->teb );
1505 dump_uint64( ", entry=", &req->entry );
1508 static void dump_init_thread_reply( const struct init_thread_reply *req )
1510 fprintf( stderr, " suspend=%d", req->suspend );
1513 static void dump_terminate_process_request( const struct terminate_process_request *req )
1515 fprintf( stderr, " handle=%04x", req->handle );
1516 fprintf( stderr, ", exit_code=%d", req->exit_code );
1519 static void dump_terminate_process_reply( const struct terminate_process_reply *req )
1521 fprintf( stderr, " self=%d", req->self );
1524 static void dump_terminate_thread_request( const struct terminate_thread_request *req )
1526 fprintf( stderr, " handle=%04x", req->handle );
1527 fprintf( stderr, ", exit_code=%d", req->exit_code );
1530 static void dump_terminate_thread_reply( const struct terminate_thread_reply *req )
1532 fprintf( stderr, " self=%d", req->self );
1535 static void dump_get_process_info_request( const struct get_process_info_request *req )
1537 fprintf( stderr, " handle=%04x", req->handle );
1540 static void dump_get_process_info_reply( const struct get_process_info_reply *req )
1542 fprintf( stderr, " pid=%04x", req->pid );
1543 fprintf( stderr, ", ppid=%04x", req->ppid );
1544 dump_uint64( ", affinity=", &req->affinity );
1545 dump_uint64( ", peb=", &req->peb );
1546 dump_timeout( ", start_time=", &req->start_time );
1547 dump_timeout( ", end_time=", &req->end_time );
1548 fprintf( stderr, ", session_id=%08x", req->session_id );
1549 fprintf( stderr, ", exit_code=%d", req->exit_code );
1550 fprintf( stderr, ", priority=%d", req->priority );
1551 fprintf( stderr, ", machine=%04x", req->machine );
1552 dump_varargs_pe_image_info( ", image=", cur_size );
1555 static void dump_get_process_debug_info_request( const struct get_process_debug_info_request *req )
1557 fprintf( stderr, " handle=%04x", req->handle );
1560 static void dump_get_process_debug_info_reply( const struct get_process_debug_info_reply *req )
1562 fprintf( stderr, " debug=%04x", req->debug );
1563 fprintf( stderr, ", debug_children=%d", req->debug_children );
1564 dump_varargs_pe_image_info( ", image=", cur_size );
1567 static void dump_get_process_image_name_request( const struct get_process_image_name_request *req )
1569 fprintf( stderr, " handle=%04x", req->handle );
1570 fprintf( stderr, ", win32=%d", req->win32 );
1573 static void dump_get_process_image_name_reply( const struct get_process_image_name_reply *req )
1575 fprintf( stderr, " len=%u", req->len );
1576 dump_varargs_unicode_str( ", name=", cur_size );
1579 static void dump_get_process_vm_counters_request( const struct get_process_vm_counters_request *req )
1581 fprintf( stderr, " handle=%04x", req->handle );
1584 static void dump_get_process_vm_counters_reply( const struct get_process_vm_counters_reply *req )
1586 dump_uint64( " peak_virtual_size=", &req->peak_virtual_size );
1587 dump_uint64( ", virtual_size=", &req->virtual_size );
1588 dump_uint64( ", peak_working_set_size=", &req->peak_working_set_size );
1589 dump_uint64( ", working_set_size=", &req->working_set_size );
1590 dump_uint64( ", pagefile_usage=", &req->pagefile_usage );
1591 dump_uint64( ", peak_pagefile_usage=", &req->peak_pagefile_usage );
1594 static void dump_set_process_info_request( const struct set_process_info_request *req )
1596 fprintf( stderr, " handle=%04x", req->handle );
1597 fprintf( stderr, ", mask=%d", req->mask );
1598 fprintf( stderr, ", priority=%d", req->priority );
1599 dump_uint64( ", affinity=", &req->affinity );
1602 static void dump_get_thread_info_request( const struct get_thread_info_request *req )
1604 fprintf( stderr, " handle=%04x", req->handle );
1605 fprintf( stderr, ", access=%08x", req->access );
1608 static void dump_get_thread_info_reply( const struct get_thread_info_reply *req )
1610 fprintf( stderr, " pid=%04x", req->pid );
1611 fprintf( stderr, ", tid=%04x", req->tid );
1612 dump_uint64( ", teb=", &req->teb );
1613 dump_uint64( ", entry_point=", &req->entry_point );
1614 dump_uint64( ", affinity=", &req->affinity );
1615 fprintf( stderr, ", exit_code=%d", req->exit_code );
1616 fprintf( stderr, ", priority=%d", req->priority );
1617 fprintf( stderr, ", last=%d", req->last );
1618 fprintf( stderr, ", suspend_count=%d", req->suspend_count );
1619 fprintf( stderr, ", dbg_hidden=%d", req->dbg_hidden );
1620 fprintf( stderr, ", desc_len=%u", req->desc_len );
1621 dump_varargs_unicode_str( ", desc=", cur_size );
1624 static void dump_get_thread_times_request( const struct get_thread_times_request *req )
1626 fprintf( stderr, " handle=%04x", req->handle );
1629 static void dump_get_thread_times_reply( const struct get_thread_times_reply *req )
1631 dump_timeout( " creation_time=", &req->creation_time );
1632 dump_timeout( ", exit_time=", &req->exit_time );
1633 fprintf( stderr, ", unix_pid=%d", req->unix_pid );
1634 fprintf( stderr, ", unix_tid=%d", req->unix_tid );
1637 static void dump_set_thread_info_request( const struct set_thread_info_request *req )
1639 fprintf( stderr, " handle=%04x", req->handle );
1640 fprintf( stderr, ", mask=%d", req->mask );
1641 fprintf( stderr, ", priority=%d", req->priority );
1642 dump_uint64( ", affinity=", &req->affinity );
1643 dump_uint64( ", entry_point=", &req->entry_point );
1644 fprintf( stderr, ", token=%04x", req->token );
1645 dump_varargs_unicode_str( ", desc=", cur_size );
1648 static void dump_suspend_thread_request( const struct suspend_thread_request *req )
1650 fprintf( stderr, " handle=%04x", req->handle );
1653 static void dump_suspend_thread_reply( const struct suspend_thread_reply *req )
1655 fprintf( stderr, " count=%d", req->count );
1658 static void dump_resume_thread_request( const struct resume_thread_request *req )
1660 fprintf( stderr, " handle=%04x", req->handle );
1663 static void dump_resume_thread_reply( const struct resume_thread_reply *req )
1665 fprintf( stderr, " count=%d", req->count );
1668 static void dump_queue_apc_request( const struct queue_apc_request *req )
1670 fprintf( stderr, " handle=%04x", req->handle );
1671 dump_apc_call( ", call=", &req->call );
1674 static void dump_queue_apc_reply( const struct queue_apc_reply *req )
1676 fprintf( stderr, " handle=%04x", req->handle );
1677 fprintf( stderr, ", self=%d", req->self );
1680 static void dump_get_apc_result_request( const struct get_apc_result_request *req )
1682 fprintf( stderr, " handle=%04x", req->handle );
1685 static void dump_get_apc_result_reply( const struct get_apc_result_reply *req )
1687 dump_apc_result( " result=", &req->result );
1690 static void dump_close_handle_request( const struct close_handle_request *req )
1692 fprintf( stderr, " handle=%04x", req->handle );
1695 static void dump_set_handle_info_request( const struct set_handle_info_request *req )
1697 fprintf( stderr, " handle=%04x", req->handle );
1698 fprintf( stderr, ", flags=%d", req->flags );
1699 fprintf( stderr, ", mask=%d", req->mask );
1702 static void dump_set_handle_info_reply( const struct set_handle_info_reply *req )
1704 fprintf( stderr, " old_flags=%d", req->old_flags );
1707 static void dump_dup_handle_request( const struct dup_handle_request *req )
1709 fprintf( stderr, " src_process=%04x", req->src_process );
1710 fprintf( stderr, ", src_handle=%04x", req->src_handle );
1711 fprintf( stderr, ", dst_process=%04x", req->dst_process );
1712 fprintf( stderr, ", access=%08x", req->access );
1713 fprintf( stderr, ", attributes=%08x", req->attributes );
1714 fprintf( stderr, ", options=%08x", req->options );
1717 static void dump_dup_handle_reply( const struct dup_handle_reply *req )
1719 fprintf( stderr, " handle=%04x", req->handle );
1722 static void dump_compare_objects_request( const struct compare_objects_request *req )
1724 fprintf( stderr, " first=%04x", req->first );
1725 fprintf( stderr, ", second=%04x", req->second );
1728 static void dump_make_temporary_request( const struct make_temporary_request *req )
1730 fprintf( stderr, " handle=%04x", req->handle );
1733 static void dump_open_process_request( const struct open_process_request *req )
1735 fprintf( stderr, " pid=%04x", req->pid );
1736 fprintf( stderr, ", access=%08x", req->access );
1737 fprintf( stderr, ", attributes=%08x", req->attributes );
1740 static void dump_open_process_reply( const struct open_process_reply *req )
1742 fprintf( stderr, " handle=%04x", req->handle );
1745 static void dump_open_thread_request( const struct open_thread_request *req )
1747 fprintf( stderr, " tid=%04x", req->tid );
1748 fprintf( stderr, ", access=%08x", req->access );
1749 fprintf( stderr, ", attributes=%08x", req->attributes );
1752 static void dump_open_thread_reply( const struct open_thread_reply *req )
1754 fprintf( stderr, " handle=%04x", req->handle );
1757 static void dump_select_request( const struct select_request *req )
1759 fprintf( stderr, " flags=%d", req->flags );
1760 dump_uint64( ", cookie=", &req->cookie );
1761 dump_abstime( ", timeout=", &req->timeout );
1762 fprintf( stderr, ", size=%u", req->size );
1763 fprintf( stderr, ", prev_apc=%04x", req->prev_apc );
1764 dump_varargs_apc_result( ", result=", cur_size );
1765 dump_varargs_select_op( ", data=", min(cur_size,req->size) );
1766 dump_varargs_contexts( ", contexts=", cur_size );
1769 static void dump_select_reply( const struct select_reply *req )
1771 dump_apc_call( " call=", &req->call );
1772 fprintf( stderr, ", apc_handle=%04x", req->apc_handle );
1773 fprintf( stderr, ", signaled=%d", req->signaled );
1774 dump_varargs_contexts( ", contexts=", cur_size );
1777 static void dump_create_event_request( const struct create_event_request *req )
1779 fprintf( stderr, " access=%08x", req->access );
1780 fprintf( stderr, ", manual_reset=%d", req->manual_reset );
1781 fprintf( stderr, ", initial_state=%d", req->initial_state );
1782 dump_varargs_object_attributes( ", objattr=", cur_size );
1785 static void dump_create_event_reply( const struct create_event_reply *req )
1787 fprintf( stderr, " handle=%04x", req->handle );
1790 static void dump_event_op_request( const struct event_op_request *req )
1792 fprintf( stderr, " handle=%04x", req->handle );
1793 fprintf( stderr, ", op=%d", req->op );
1796 static void dump_event_op_reply( const struct event_op_reply *req )
1798 fprintf( stderr, " state=%d", req->state );
1801 static void dump_query_event_request( const struct query_event_request *req )
1803 fprintf( stderr, " handle=%04x", req->handle );
1806 static void dump_query_event_reply( const struct query_event_reply *req )
1808 fprintf( stderr, " manual_reset=%d", req->manual_reset );
1809 fprintf( stderr, ", state=%d", req->state );
1812 static void dump_open_event_request( const struct open_event_request *req )
1814 fprintf( stderr, " access=%08x", req->access );
1815 fprintf( stderr, ", attributes=%08x", req->attributes );
1816 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1817 dump_varargs_unicode_str( ", name=", cur_size );
1820 static void dump_open_event_reply( const struct open_event_reply *req )
1822 fprintf( stderr, " handle=%04x", req->handle );
1825 static void dump_create_keyed_event_request( const struct create_keyed_event_request *req )
1827 fprintf( stderr, " access=%08x", req->access );
1828 dump_varargs_object_attributes( ", objattr=", cur_size );
1831 static void dump_create_keyed_event_reply( const struct create_keyed_event_reply *req )
1833 fprintf( stderr, " handle=%04x", req->handle );
1836 static void dump_open_keyed_event_request( const struct open_keyed_event_request *req )
1838 fprintf( stderr, " access=%08x", req->access );
1839 fprintf( stderr, ", attributes=%08x", req->attributes );
1840 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1841 dump_varargs_unicode_str( ", name=", cur_size );
1844 static void dump_open_keyed_event_reply( const struct open_keyed_event_reply *req )
1846 fprintf( stderr, " handle=%04x", req->handle );
1849 static void dump_create_mutex_request( const struct create_mutex_request *req )
1851 fprintf( stderr, " access=%08x", req->access );
1852 fprintf( stderr, ", owned=%d", req->owned );
1853 dump_varargs_object_attributes( ", objattr=", cur_size );
1856 static void dump_create_mutex_reply( const struct create_mutex_reply *req )
1858 fprintf( stderr, " handle=%04x", req->handle );
1861 static void dump_release_mutex_request( const struct release_mutex_request *req )
1863 fprintf( stderr, " handle=%04x", req->handle );
1866 static void dump_release_mutex_reply( const struct release_mutex_reply *req )
1868 fprintf( stderr, " prev_count=%08x", req->prev_count );
1871 static void dump_open_mutex_request( const struct open_mutex_request *req )
1873 fprintf( stderr, " access=%08x", req->access );
1874 fprintf( stderr, ", attributes=%08x", req->attributes );
1875 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1876 dump_varargs_unicode_str( ", name=", cur_size );
1879 static void dump_open_mutex_reply( const struct open_mutex_reply *req )
1881 fprintf( stderr, " handle=%04x", req->handle );
1884 static void dump_query_mutex_request( const struct query_mutex_request *req )
1886 fprintf( stderr, " handle=%04x", req->handle );
1889 static void dump_query_mutex_reply( const struct query_mutex_reply *req )
1891 fprintf( stderr, " count=%08x", req->count );
1892 fprintf( stderr, ", owned=%d", req->owned );
1893 fprintf( stderr, ", abandoned=%d", req->abandoned );
1896 static void dump_create_semaphore_request( const struct create_semaphore_request *req )
1898 fprintf( stderr, " access=%08x", req->access );
1899 fprintf( stderr, ", initial=%08x", req->initial );
1900 fprintf( stderr, ", max=%08x", req->max );
1901 dump_varargs_object_attributes( ", objattr=", cur_size );
1904 static void dump_create_semaphore_reply( const struct create_semaphore_reply *req )
1906 fprintf( stderr, " handle=%04x", req->handle );
1909 static void dump_release_semaphore_request( const struct release_semaphore_request *req )
1911 fprintf( stderr, " handle=%04x", req->handle );
1912 fprintf( stderr, ", count=%08x", req->count );
1915 static void dump_release_semaphore_reply( const struct release_semaphore_reply *req )
1917 fprintf( stderr, " prev_count=%08x", req->prev_count );
1920 static void dump_query_semaphore_request( const struct query_semaphore_request *req )
1922 fprintf( stderr, " handle=%04x", req->handle );
1925 static void dump_query_semaphore_reply( const struct query_semaphore_reply *req )
1927 fprintf( stderr, " current=%08x", req->current );
1928 fprintf( stderr, ", max=%08x", req->max );
1931 static void dump_open_semaphore_request( const struct open_semaphore_request *req )
1933 fprintf( stderr, " access=%08x", req->access );
1934 fprintf( stderr, ", attributes=%08x", req->attributes );
1935 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1936 dump_varargs_unicode_str( ", name=", cur_size );
1939 static void dump_open_semaphore_reply( const struct open_semaphore_reply *req )
1941 fprintf( stderr, " handle=%04x", req->handle );
1944 static void dump_create_file_request( const struct create_file_request *req )
1946 fprintf( stderr, " access=%08x", req->access );
1947 fprintf( stderr, ", sharing=%08x", req->sharing );
1948 fprintf( stderr, ", create=%d", req->create );
1949 fprintf( stderr, ", options=%08x", req->options );
1950 fprintf( stderr, ", attrs=%08x", req->attrs );
1951 dump_varargs_object_attributes( ", objattr=", cur_size );
1952 dump_varargs_string( ", filename=", cur_size );
1955 static void dump_create_file_reply( const struct create_file_reply *req )
1957 fprintf( stderr, " handle=%04x", req->handle );
1960 static void dump_open_file_object_request( const struct open_file_object_request *req )
1962 fprintf( stderr, " access=%08x", req->access );
1963 fprintf( stderr, ", attributes=%08x", req->attributes );
1964 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1965 fprintf( stderr, ", sharing=%08x", req->sharing );
1966 fprintf( stderr, ", options=%08x", req->options );
1967 dump_varargs_unicode_str( ", filename=", cur_size );
1970 static void dump_open_file_object_reply( const struct open_file_object_reply *req )
1972 fprintf( stderr, " handle=%04x", req->handle );
1975 static void dump_alloc_file_handle_request( const struct alloc_file_handle_request *req )
1977 fprintf( stderr, " access=%08x", req->access );
1978 fprintf( stderr, ", attributes=%08x", req->attributes );
1979 fprintf( stderr, ", fd=%d", req->fd );
1982 static void dump_alloc_file_handle_reply( const struct alloc_file_handle_reply *req )
1984 fprintf( stderr, " handle=%04x", req->handle );
1987 static void dump_get_handle_unix_name_request( const struct get_handle_unix_name_request *req )
1989 fprintf( stderr, " handle=%04x", req->handle );
1992 static void dump_get_handle_unix_name_reply( const struct get_handle_unix_name_reply *req )
1994 fprintf( stderr, " name_len=%u", req->name_len );
1995 dump_varargs_string( ", name=", cur_size );
1998 static void dump_get_handle_fd_request( const struct get_handle_fd_request *req )
2000 fprintf( stderr, " handle=%04x", req->handle );
2003 static void dump_get_handle_fd_reply( const struct get_handle_fd_reply *req )
2005 fprintf( stderr, " type=%d", req->type );
2006 fprintf( stderr, ", cacheable=%d", req->cacheable );
2007 fprintf( stderr, ", access=%08x", req->access );
2008 fprintf( stderr, ", options=%08x", req->options );
2011 static void dump_get_directory_cache_entry_request( const struct get_directory_cache_entry_request *req )
2013 fprintf( stderr, " handle=%04x", req->handle );
2016 static void dump_get_directory_cache_entry_reply( const struct get_directory_cache_entry_reply *req )
2018 fprintf( stderr, " entry=%d", req->entry );
2019 dump_varargs_ints( ", free=", cur_size );
2022 static void dump_flush_request( const struct flush_request *req )
2024 dump_async_data( " async=", &req->async );
2027 static void dump_flush_reply( const struct flush_reply *req )
2029 fprintf( stderr, " event=%04x", req->event );
2032 static void dump_get_file_info_request( const struct get_file_info_request *req )
2034 fprintf( stderr, " handle=%04x", req->handle );
2035 fprintf( stderr, ", info_class=%08x", req->info_class );
2038 static void dump_get_file_info_reply( const struct get_file_info_reply *req )
2040 dump_varargs_bytes( " data=", cur_size );
2043 static void dump_get_volume_info_request( const struct get_volume_info_request *req )
2045 fprintf( stderr, " handle=%04x", req->handle );
2046 dump_async_data( ", async=", &req->async );
2047 fprintf( stderr, ", info_class=%08x", req->info_class );
2050 static void dump_get_volume_info_reply( const struct get_volume_info_reply *req )
2052 fprintf( stderr, " wait=%04x", req->wait );
2053 dump_varargs_bytes( ", data=", cur_size );
2056 static void dump_lock_file_request( const struct lock_file_request *req )
2058 fprintf( stderr, " handle=%04x", req->handle );
2059 dump_uint64( ", offset=", &req->offset );
2060 dump_uint64( ", count=", &req->count );
2061 fprintf( stderr, ", shared=%d", req->shared );
2062 fprintf( stderr, ", wait=%d", req->wait );
2065 static void dump_lock_file_reply( const struct lock_file_reply *req )
2067 fprintf( stderr, " handle=%04x", req->handle );
2068 fprintf( stderr, ", overlapped=%d", req->overlapped );
2071 static void dump_unlock_file_request( const struct unlock_file_request *req )
2073 fprintf( stderr, " handle=%04x", req->handle );
2074 dump_uint64( ", offset=", &req->offset );
2075 dump_uint64( ", count=", &req->count );
2078 static void dump_recv_socket_request( const struct recv_socket_request *req )
2080 fprintf( stderr, " oob=%d", req->oob );
2081 dump_async_data( ", async=", &req->async );
2082 fprintf( stderr, ", status=%08x", req->status );
2083 fprintf( stderr, ", total=%08x", req->total );
2086 static void dump_recv_socket_reply( const struct recv_socket_reply *req )
2088 fprintf( stderr, " wait=%04x", req->wait );
2089 fprintf( stderr, ", options=%08x", req->options );
2092 static void dump_send_socket_request( const struct send_socket_request *req )
2094 dump_async_data( " async=", &req->async );
2095 fprintf( stderr, ", status=%08x", req->status );
2096 fprintf( stderr, ", total=%08x", req->total );
2099 static void dump_send_socket_reply( const struct send_socket_reply *req )
2101 fprintf( stderr, " wait=%04x", req->wait );
2102 fprintf( stderr, ", options=%08x", req->options );
2105 static void dump_get_next_console_request_request( const struct get_next_console_request_request *req )
2107 fprintf( stderr, " handle=%04x", req->handle );
2108 fprintf( stderr, ", signal=%d", req->signal );
2109 fprintf( stderr, ", read=%d", req->read );
2110 fprintf( stderr, ", status=%08x", req->status );
2111 dump_varargs_bytes( ", out_data=", cur_size );
2114 static void dump_get_next_console_request_reply( const struct get_next_console_request_reply *req )
2116 fprintf( stderr, " code=%08x", req->code );
2117 fprintf( stderr, ", output=%08x", req->output );
2118 fprintf( stderr, ", out_size=%u", req->out_size );
2119 dump_varargs_bytes( ", in_data=", cur_size );
2122 static void dump_read_directory_changes_request( const struct read_directory_changes_request *req )
2124 fprintf( stderr, " filter=%08x", req->filter );
2125 fprintf( stderr, ", subtree=%d", req->subtree );
2126 fprintf( stderr, ", want_data=%d", req->want_data );
2127 dump_async_data( ", async=", &req->async );
2130 static void dump_read_change_request( const struct read_change_request *req )
2132 fprintf( stderr, " handle=%04x", req->handle );
2135 static void dump_read_change_reply( const struct read_change_reply *req )
2137 dump_varargs_filesystem_event( " events=", cur_size );
2140 static void dump_create_mapping_request( const struct create_mapping_request *req )
2142 fprintf( stderr, " access=%08x", req->access );
2143 fprintf( stderr, ", flags=%08x", req->flags );
2144 fprintf( stderr, ", file_access=%08x", req->file_access );
2145 dump_uint64( ", size=", &req->size );
2146 fprintf( stderr, ", file_handle=%04x", req->file_handle );
2147 dump_varargs_object_attributes( ", objattr=", cur_size );
2150 static void dump_create_mapping_reply( const struct create_mapping_reply *req )
2152 fprintf( stderr, " handle=%04x", req->handle );
2155 static void dump_open_mapping_request( const struct open_mapping_request *req )
2157 fprintf( stderr, " access=%08x", req->access );
2158 fprintf( stderr, ", attributes=%08x", req->attributes );
2159 fprintf( stderr, ", rootdir=%04x", req->rootdir );
2160 dump_varargs_unicode_str( ", name=", cur_size );
2163 static void dump_open_mapping_reply( const struct open_mapping_reply *req )
2165 fprintf( stderr, " handle=%04x", req->handle );
2168 static void dump_get_mapping_info_request( const struct get_mapping_info_request *req )
2170 fprintf( stderr, " handle=%04x", req->handle );
2171 fprintf( stderr, ", access=%08x", req->access );
2174 static void dump_get_mapping_info_reply( const struct get_mapping_info_reply *req )
2176 dump_uint64( " size=", &req->size );
2177 fprintf( stderr, ", flags=%08x", req->flags );
2178 fprintf( stderr, ", shared_file=%04x", req->shared_file );
2179 fprintf( stderr, ", total=%u", req->total );
2180 dump_varargs_pe_image_info( ", image=", cur_size );
2181 dump_varargs_unicode_str( ", name=", cur_size );
2184 static void dump_map_view_request( const struct map_view_request *req )
2186 fprintf( stderr, " mapping=%04x", req->mapping );
2187 fprintf( stderr, ", access=%08x", req->access );
2188 dump_uint64( ", base=", &req->base );
2189 dump_uint64( ", size=", &req->size );
2190 dump_uint64( ", start=", &req->start );
2191 dump_varargs_pe_image_info( ", image=", cur_size );
2192 dump_varargs_unicode_str( ", name=", cur_size );
2195 static void dump_unmap_view_request( const struct unmap_view_request *req )
2197 dump_uint64( " base=", &req->base );
2200 static void dump_get_mapping_committed_range_request( const struct get_mapping_committed_range_request *req )
2202 dump_uint64( " base=", &req->base );
2203 dump_uint64( ", offset=", &req->offset );
2206 static void dump_get_mapping_committed_range_reply( const struct get_mapping_committed_range_reply *req )
2208 dump_uint64( " size=", &req->size );
2209 fprintf( stderr, ", committed=%d", req->committed );
2212 static void dump_add_mapping_committed_range_request( const struct add_mapping_committed_range_request *req )
2214 dump_uint64( " base=", &req->base );
2215 dump_uint64( ", offset=", &req->offset );
2216 dump_uint64( ", size=", &req->size );
2219 static void dump_is_same_mapping_request( const struct is_same_mapping_request *req )
2221 dump_uint64( " base1=", &req->base1 );
2222 dump_uint64( ", base2=", &req->base2 );
2225 static void dump_get_mapping_filename_request( const struct get_mapping_filename_request *req )
2227 fprintf( stderr, " process=%04x", req->process );
2228 dump_uint64( ", addr=", &req->addr );
2231 static void dump_get_mapping_filename_reply( const struct get_mapping_filename_reply *req )
2233 fprintf( stderr, " len=%u", req->len );
2234 dump_varargs_unicode_str( ", filename=", cur_size );
2237 static void dump_list_processes_request( const struct list_processes_request *req )
2241 static void dump_list_processes_reply( const struct list_processes_reply *req )
2243 fprintf( stderr, " info_size=%u", req->info_size );
2244 fprintf( stderr, ", process_count=%d", req->process_count );
2245 fprintf( stderr, ", total_thread_count=%d", req->total_thread_count );
2246 fprintf( stderr, ", total_name_len=%u", req->total_name_len );
2247 dump_varargs_process_info( ", data=", min(cur_size,req->info_size) );
2250 static void dump_create_debug_obj_request( const struct create_debug_obj_request *req )
2252 fprintf( stderr, " access=%08x", req->access );
2253 fprintf( stderr, ", flags=%08x", req->flags );
2254 dump_varargs_object_attributes( ", objattr=", cur_size );
2257 static void dump_create_debug_obj_reply( const struct create_debug_obj_reply *req )
2259 fprintf( stderr, " handle=%04x", req->handle );
2262 static void dump_wait_debug_event_request( const struct wait_debug_event_request *req )
2264 fprintf( stderr, " debug=%04x", req->debug );
2267 static void dump_wait_debug_event_reply( const struct wait_debug_event_reply *req )
2269 fprintf( stderr, " pid=%04x", req->pid );
2270 fprintf( stderr, ", tid=%04x", req->tid );
2271 dump_varargs_debug_event( ", event=", cur_size );
2274 static void dump_queue_exception_event_request( const struct queue_exception_event_request *req )
2276 fprintf( stderr, " first=%d", req->first );
2277 fprintf( stderr, ", code=%08x", req->code );
2278 fprintf( stderr, ", flags=%08x", req->flags );
2279 dump_uint64( ", record=", &req->record );
2280 dump_uint64( ", address=", &req->address );
2281 fprintf( stderr, ", len=%u", req->len );
2282 dump_varargs_uints64( ", params=", min(cur_size,req->len) );
2285 static void dump_queue_exception_event_reply( const struct queue_exception_event_reply *req )
2287 fprintf( stderr, " handle=%04x", req->handle );
2290 static void dump_get_exception_status_request( const struct get_exception_status_request *req )
2292 fprintf( stderr, " handle=%04x", req->handle );
2295 static void dump_continue_debug_event_request( const struct continue_debug_event_request *req )
2297 fprintf( stderr, " debug=%04x", req->debug );
2298 fprintf( stderr, ", pid=%04x", req->pid );
2299 fprintf( stderr, ", tid=%04x", req->tid );
2300 fprintf( stderr, ", status=%08x", req->status );
2303 static void dump_debug_process_request( const struct debug_process_request *req )
2305 fprintf( stderr, " handle=%04x", req->handle );
2306 fprintf( stderr, ", debug=%04x", req->debug );
2307 fprintf( stderr, ", attach=%d", req->attach );
2310 static void dump_set_debug_obj_info_request( const struct set_debug_obj_info_request *req )
2312 fprintf( stderr, " debug=%04x", req->debug );
2313 fprintf( stderr, ", flags=%08x", req->flags );
2316 static void dump_read_process_memory_request( const struct read_process_memory_request *req )
2318 fprintf( stderr, " handle=%04x", req->handle );
2319 dump_uint64( ", addr=", &req->addr );
2322 static void dump_read_process_memory_reply( const struct read_process_memory_reply *req )
2324 dump_varargs_bytes( " data=", cur_size );
2327 static void dump_write_process_memory_request( const struct write_process_memory_request *req )
2329 fprintf( stderr, " handle=%04x", req->handle );
2330 dump_uint64( ", addr=", &req->addr );
2331 dump_varargs_bytes( ", data=", cur_size );
2334 static void dump_create_key_request( const struct create_key_request *req )
2336 fprintf( stderr, " access=%08x", req->access );
2337 fprintf( stderr, ", options=%08x", req->options );
2338 dump_varargs_object_attributes( ", objattr=", cur_size );
2339 dump_varargs_unicode_str( ", class=", cur_size );
2342 static void dump_create_key_reply( const struct create_key_reply *req )
2344 fprintf( stderr, " hkey=%04x", req->hkey );
2345 fprintf( stderr, ", created=%d", req->created );
2348 static void dump_open_key_request( const struct open_key_request *req )
2350 fprintf( stderr, " parent=%04x", req->parent );
2351 fprintf( stderr, ", access=%08x", req->access );
2352 fprintf( stderr, ", attributes=%08x", req->attributes );
2353 dump_varargs_unicode_str( ", name=", cur_size );
2356 static void dump_open_key_reply( const struct open_key_reply *req )
2358 fprintf( stderr, " hkey=%04x", req->hkey );
2361 static void dump_delete_key_request( const struct delete_key_request *req )
2363 fprintf( stderr, " hkey=%04x", req->hkey );
2366 static void dump_flush_key_request( const struct flush_key_request *req )
2368 fprintf( stderr, " hkey=%04x", req->hkey );
2371 static void dump_enum_key_request( const struct enum_key_request *req )
2373 fprintf( stderr, " hkey=%04x", req->hkey );
2374 fprintf( stderr, ", index=%d", req->index );
2375 fprintf( stderr, ", info_class=%d", req->info_class );
2378 static void dump_enum_key_reply( const struct enum_key_reply *req )
2380 fprintf( stderr, " subkeys=%d", req->subkeys );
2381 fprintf( stderr, ", max_subkey=%d", req->max_subkey );
2382 fprintf( stderr, ", max_class=%d", req->max_class );
2383 fprintf( stderr, ", values=%d", req->values );
2384 fprintf( stderr, ", max_value=%d", req->max_value );
2385 fprintf( stderr, ", max_data=%d", req->max_data );
2386 dump_timeout( ", modif=", &req->modif );
2387 fprintf( stderr, ", total=%u", req->total );
2388 fprintf( stderr, ", namelen=%u", req->namelen );
2389 dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
2390 dump_varargs_unicode_str( ", class=", cur_size );
2393 static void dump_set_key_value_request( const struct set_key_value_request *req )
2395 fprintf( stderr, " hkey=%04x", req->hkey );
2396 fprintf( stderr, ", type=%d", req->type );
2397 fprintf( stderr, ", namelen=%u", req->namelen );
2398 dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
2399 dump_varargs_bytes( ", data=", cur_size );
2402 static void dump_get_key_value_request( const struct get_key_value_request *req )
2404 fprintf( stderr, " hkey=%04x", req->hkey );
2405 dump_varargs_unicode_str( ", name=", cur_size );
2408 static void dump_get_key_value_reply( const struct get_key_value_reply *req )
2410 fprintf( stderr, " type=%d", req->type );
2411 fprintf( stderr, ", total=%u", req->total );
2412 dump_varargs_bytes( ", data=", cur_size );
2415 static void dump_enum_key_value_request( const struct enum_key_value_request *req )
2417 fprintf( stderr, " hkey=%04x", req->hkey );
2418 fprintf( stderr, ", index=%d", req->index );
2419 fprintf( stderr, ", info_class=%d", req->info_class );
2422 static void dump_enum_key_value_reply( const struct enum_key_value_reply *req )
2424 fprintf( stderr, " type=%d", req->type );
2425 fprintf( stderr, ", total=%u", req->total );
2426 fprintf( stderr, ", namelen=%u", req->namelen );
2427 dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
2428 dump_varargs_bytes( ", data=", cur_size );
2431 static void dump_delete_key_value_request( const struct delete_key_value_request *req )
2433 fprintf( stderr, " hkey=%04x", req->hkey );
2434 dump_varargs_unicode_str( ", name=", cur_size );
2437 static void dump_load_registry_request( const struct load_registry_request *req )
2439 fprintf( stderr, " file=%04x", req->file );
2440 dump_varargs_object_attributes( ", objattr=", cur_size );
2443 static void dump_unload_registry_request( const struct unload_registry_request *req )
2445 fprintf( stderr, " parent=%04x", req->parent );
2446 fprintf( stderr, ", attributes=%08x", req->attributes );
2447 dump_varargs_unicode_str( ", name=", cur_size );
2450 static void dump_save_registry_request( const struct save_registry_request *req )
2452 fprintf( stderr, " hkey=%04x", req->hkey );
2453 fprintf( stderr, ", file=%04x", req->file );
2456 static void dump_set_registry_notification_request( const struct set_registry_notification_request *req )
2458 fprintf( stderr, " hkey=%04x", req->hkey );
2459 fprintf( stderr, ", event=%04x", req->event );
2460 fprintf( stderr, ", subtree=%d", req->subtree );
2461 fprintf( stderr, ", filter=%08x", req->filter );
2464 static void dump_create_timer_request( const struct create_timer_request *req )
2466 fprintf( stderr, " access=%08x", req->access );
2467 fprintf( stderr, ", manual=%d", req->manual );
2468 dump_varargs_object_attributes( ", objattr=", cur_size );
2471 static void dump_create_timer_reply( const struct create_timer_reply *req )
2473 fprintf( stderr, " handle=%04x", req->handle );
2476 static void dump_open_timer_request( const struct open_timer_request *req )
2478 fprintf( stderr, " access=%08x", req->access );
2479 fprintf( stderr, ", attributes=%08x", req->attributes );
2480 fprintf( stderr, ", rootdir=%04x", req->rootdir );
2481 dump_varargs_unicode_str( ", name=", cur_size );
2484 static void dump_open_timer_reply( const struct open_timer_reply *req )
2486 fprintf( stderr, " handle=%04x", req->handle );
2489 static void dump_set_timer_request( const struct set_timer_request *req )
2491 fprintf( stderr, " handle=%04x", req->handle );
2492 dump_timeout( ", expire=", &req->expire );
2493 dump_uint64( ", callback=", &req->callback );
2494 dump_uint64( ", arg=", &req->arg );
2495 fprintf( stderr, ", period=%d", req->period );
2498 static void dump_set_timer_reply( const struct set_timer_reply *req )
2500 fprintf( stderr, " signaled=%d", req->signaled );
2503 static void dump_cancel_timer_request( const struct cancel_timer_request *req )
2505 fprintf( stderr, " handle=%04x", req->handle );
2508 static void dump_cancel_timer_reply( const struct cancel_timer_reply *req )
2510 fprintf( stderr, " signaled=%d", req->signaled );
2513 static void dump_get_timer_info_request( const struct get_timer_info_request *req )
2515 fprintf( stderr, " handle=%04x", req->handle );
2518 static void dump_get_timer_info_reply( const struct get_timer_info_reply *req )
2520 dump_timeout( " when=", &req->when );
2521 fprintf( stderr, ", signaled=%d", req->signaled );
2524 static void dump_get_thread_context_request( const struct get_thread_context_request *req )
2526 fprintf( stderr, " handle=%04x", req->handle );
2527 fprintf( stderr, ", context=%04x", req->context );
2528 fprintf( stderr, ", flags=%08x", req->flags );
2529 fprintf( stderr, ", machine=%04x", req->machine );
2532 static void dump_get_thread_context_reply( const struct get_thread_context_reply *req )
2534 fprintf( stderr, " self=%d", req->self );
2535 fprintf( stderr, ", handle=%04x", req->handle );
2536 dump_varargs_contexts( ", contexts=", cur_size );
2539 static void dump_set_thread_context_request( const struct set_thread_context_request *req )
2541 fprintf( stderr, " handle=%04x", req->handle );
2542 dump_varargs_contexts( ", contexts=", cur_size );
2545 static void dump_set_thread_context_reply( const struct set_thread_context_reply *req )
2547 fprintf( stderr, " self=%d", req->self );
2550 static void dump_get_selector_entry_request( const struct get_selector_entry_request *req )
2552 fprintf( stderr, " handle=%04x", req->handle );
2553 fprintf( stderr, ", entry=%d", req->entry );
2556 static void dump_get_selector_entry_reply( const struct get_selector_entry_reply *req )
2558 fprintf( stderr, " base=%08x", req->base );
2559 fprintf( stderr, ", limit=%08x", req->limit );
2560 fprintf( stderr, ", flags=%02x", req->flags );
2563 static void dump_add_atom_request( const struct add_atom_request *req )
2565 dump_varargs_unicode_str( " name=", cur_size );
2568 static void dump_add_atom_reply( const struct add_atom_reply *req )
2570 fprintf( stderr, " atom=%04x", req->atom );
2573 static void dump_delete_atom_request( const struct delete_atom_request *req )
2575 fprintf( stderr, " atom=%04x", req->atom );
2578 static void dump_find_atom_request( const struct find_atom_request *req )
2580 dump_varargs_unicode_str( " name=", cur_size );
2583 static void dump_find_atom_reply( const struct find_atom_reply *req )
2585 fprintf( stderr, " atom=%04x", req->atom );
2588 static void dump_get_atom_information_request( const struct get_atom_information_request *req )
2590 fprintf( stderr, " atom=%04x", req->atom );
2593 static void dump_get_atom_information_reply( const struct get_atom_information_reply *req )
2595 fprintf( stderr, " count=%d", req->count );
2596 fprintf( stderr, ", pinned=%d", req->pinned );
2597 fprintf( stderr, ", total=%u", req->total );
2598 dump_varargs_unicode_str( ", name=", cur_size );
2601 static void dump_get_msg_queue_request( const struct get_msg_queue_request *req )
2605 static void dump_get_msg_queue_reply( const struct get_msg_queue_reply *req )
2607 fprintf( stderr, " handle=%04x", req->handle );
2610 static void dump_set_queue_fd_request( const struct set_queue_fd_request *req )
2612 fprintf( stderr, " handle=%04x", req->handle );
2615 static void dump_set_queue_mask_request( const struct set_queue_mask_request *req )
2617 fprintf( stderr, " wake_mask=%08x", req->wake_mask );
2618 fprintf( stderr, ", changed_mask=%08x", req->changed_mask );
2619 fprintf( stderr, ", skip_wait=%d", req->skip_wait );
2622 static void dump_set_queue_mask_reply( const struct set_queue_mask_reply *req )
2624 fprintf( stderr, " wake_bits=%08x", req->wake_bits );
2625 fprintf( stderr, ", changed_bits=%08x", req->changed_bits );
2628 static void dump_get_queue_status_request( const struct get_queue_status_request *req )
2630 fprintf( stderr, " clear_bits=%08x", req->clear_bits );
2633 static void dump_get_queue_status_reply( const struct get_queue_status_reply *req )
2635 fprintf( stderr, " wake_bits=%08x", req->wake_bits );
2636 fprintf( stderr, ", changed_bits=%08x", req->changed_bits );
2639 static void dump_get_process_idle_event_request( const struct get_process_idle_event_request *req )
2641 fprintf( stderr, " handle=%04x", req->handle );
2644 static void dump_get_process_idle_event_reply( const struct get_process_idle_event_reply *req )
2646 fprintf( stderr, " event=%04x", req->event );
2649 static void dump_send_message_request( const struct send_message_request *req )
2651 fprintf( stderr, " id=%04x", req->id );
2652 fprintf( stderr, ", type=%d", req->type );
2653 fprintf( stderr, ", flags=%d", req->flags );
2654 fprintf( stderr, ", win=%08x", req->win );
2655 fprintf( stderr, ", msg=%08x", req->msg );
2656 dump_uint64( ", wparam=", &req->wparam );
2657 dump_uint64( ", lparam=", &req->lparam );
2658 dump_timeout( ", timeout=", &req->timeout );
2659 dump_varargs_message_data( ", data=", cur_size );
2662 static void dump_post_quit_message_request( const struct post_quit_message_request *req )
2664 fprintf( stderr, " exit_code=%d", req->exit_code );
2667 static void dump_send_hardware_message_request( const struct send_hardware_message_request *req )
2669 fprintf( stderr, " win=%08x", req->win );
2670 dump_hw_input( ", input=", &req->input );
2671 fprintf( stderr, ", flags=%08x", req->flags );
2672 dump_varargs_bytes( ", report=", cur_size );
2675 static void dump_send_hardware_message_reply( const struct send_hardware_message_reply *req )
2677 fprintf( stderr, " wait=%d", req->wait );
2678 fprintf( stderr, ", prev_x=%d", req->prev_x );
2679 fprintf( stderr, ", prev_y=%d", req->prev_y );
2680 fprintf( stderr, ", new_x=%d", req->new_x );
2681 fprintf( stderr, ", new_y=%d", req->new_y );
2682 dump_varargs_bytes( ", keystate=", cur_size );
2685 static void dump_get_message_request( const struct get_message_request *req )
2687 fprintf( stderr, " flags=%08x", req->flags );
2688 fprintf( stderr, ", get_win=%08x", req->get_win );
2689 fprintf( stderr, ", get_first=%08x", req->get_first );
2690 fprintf( stderr, ", get_last=%08x", req->get_last );
2691 fprintf( stderr, ", hw_id=%08x", req->hw_id );
2692 fprintf( stderr, ", wake_mask=%08x", req->wake_mask );
2693 fprintf( stderr, ", changed_mask=%08x", req->changed_mask );
2696 static void dump_get_message_reply( const struct get_message_reply *req )
2698 fprintf( stderr, " win=%08x", req->win );
2699 fprintf( stderr, ", msg=%08x", req->msg );
2700 dump_uint64( ", wparam=", &req->wparam );
2701 dump_uint64( ", lparam=", &req->lparam );
2702 fprintf( stderr, ", type=%d", req->type );
2703 fprintf( stderr, ", x=%d", req->x );
2704 fprintf( stderr, ", y=%d", req->y );
2705 fprintf( stderr, ", time=%08x", req->time );
2706 fprintf( stderr, ", active_hooks=%08x", req->active_hooks );
2707 fprintf( stderr, ", total=%u", req->total );
2708 dump_varargs_message_data( ", data=", cur_size );
2711 static void dump_reply_message_request( const struct reply_message_request *req )
2713 fprintf( stderr, " remove=%d", req->remove );
2714 dump_uint64( ", result=", &req->result );
2715 dump_varargs_bytes( ", data=", cur_size );
2718 static void dump_accept_hardware_message_request( const struct accept_hardware_message_request *req )
2720 fprintf( stderr, " hw_id=%08x", req->hw_id );
2723 static void dump_get_message_reply_request( const struct get_message_reply_request *req )
2725 fprintf( stderr, " cancel=%d", req->cancel );
2728 static void dump_get_message_reply_reply( const struct get_message_reply_reply *req )
2730 dump_uint64( " result=", &req->result );
2731 dump_varargs_bytes( ", data=", cur_size );
2734 static void dump_set_win_timer_request( const struct set_win_timer_request *req )
2736 fprintf( stderr, " win=%08x", req->win );
2737 fprintf( stderr, ", msg=%08x", req->msg );
2738 fprintf( stderr, ", rate=%08x", req->rate );
2739 dump_uint64( ", id=", &req->id );
2740 dump_uint64( ", lparam=", &req->lparam );
2743 static void dump_set_win_timer_reply( const struct set_win_timer_reply *req )
2745 dump_uint64( " id=", &req->id );
2748 static void dump_kill_win_timer_request( const struct kill_win_timer_request *req )
2750 fprintf( stderr, " win=%08x", req->win );
2751 dump_uint64( ", id=", &req->id );
2752 fprintf( stderr, ", msg=%08x", req->msg );
2755 static void dump_is_window_hung_request( const struct is_window_hung_request *req )
2757 fprintf( stderr, " win=%08x", req->win );
2760 static void dump_is_window_hung_reply( const struct is_window_hung_reply *req )
2762 fprintf( stderr, " is_hung=%d", req->is_hung );
2765 static void dump_get_serial_info_request( const struct get_serial_info_request *req )
2767 fprintf( stderr, " handle=%04x", req->handle );
2768 fprintf( stderr, ", flags=%d", req->flags );
2771 static void dump_get_serial_info_reply( const struct get_serial_info_reply *req )
2773 fprintf( stderr, " eventmask=%08x", req->eventmask );
2774 fprintf( stderr, ", cookie=%08x", req->cookie );
2775 fprintf( stderr, ", pending_write=%08x", req->pending_write );
2778 static void dump_set_serial_info_request( const struct set_serial_info_request *req )
2780 fprintf( stderr, " handle=%04x", req->handle );
2781 fprintf( stderr, ", flags=%d", req->flags );
2784 static void dump_register_async_request( const struct register_async_request *req )
2786 fprintf( stderr, " type=%d", req->type );
2787 dump_async_data( ", async=", &req->async );
2788 fprintf( stderr, ", count=%d", req->count );
2791 static void dump_cancel_async_request( const struct cancel_async_request *req )
2793 fprintf( stderr, " handle=%04x", req->handle );
2794 dump_uint64( ", iosb=", &req->iosb );
2795 fprintf( stderr, ", only_thread=%d", req->only_thread );
2798 static void dump_get_async_result_request( const struct get_async_result_request *req )
2800 dump_uint64( " user_arg=", &req->user_arg );
2803 static void dump_get_async_result_reply( const struct get_async_result_reply *req )
2805 dump_varargs_bytes( " out_data=", cur_size );
2808 static void dump_read_request( const struct read_request *req )
2810 dump_async_data( " async=", &req->async );
2811 dump_uint64( ", pos=", &req->pos );
2814 static void dump_read_reply( const struct read_reply *req )
2816 fprintf( stderr, " wait=%04x", req->wait );
2817 fprintf( stderr, ", options=%08x", req->options );
2818 dump_varargs_bytes( ", data=", cur_size );
2821 static void dump_write_request( const struct write_request *req )
2823 dump_async_data( " async=", &req->async );
2824 dump_uint64( ", pos=", &req->pos );
2825 dump_varargs_bytes( ", data=", cur_size );
2828 static void dump_write_reply( const struct write_reply *req )
2830 fprintf( stderr, " wait=%04x", req->wait );
2831 fprintf( stderr, ", options=%08x", req->options );
2832 fprintf( stderr, ", size=%u", req->size );
2835 static void dump_ioctl_request( const struct ioctl_request *req )
2837 dump_ioctl_code( " code=", &req->code );
2838 dump_async_data( ", async=", &req->async );
2839 dump_varargs_bytes( ", in_data=", cur_size );
2842 static void dump_ioctl_reply( const struct ioctl_reply *req )
2844 fprintf( stderr, " wait=%04x", req->wait );
2845 fprintf( stderr, ", options=%08x", req->options );
2846 dump_varargs_bytes( ", out_data=", cur_size );
2849 static void dump_set_irp_result_request( const struct set_irp_result_request *req )
2851 fprintf( stderr, " handle=%04x", req->handle );
2852 fprintf( stderr, ", status=%08x", req->status );
2853 fprintf( stderr, ", size=%u", req->size );
2854 dump_varargs_bytes( ", data=", cur_size );
2857 static void dump_create_named_pipe_request( const struct create_named_pipe_request *req )
2859 fprintf( stderr, " access=%08x", req->access );
2860 fprintf( stderr, ", options=%08x", req->options );
2861 fprintf( stderr, ", sharing=%08x", req->sharing );
2862 fprintf( stderr, ", maxinstances=%08x", req->maxinstances );
2863 fprintf( stderr, ", outsize=%08x", req->outsize );
2864 fprintf( stderr, ", insize=%08x", req->insize );
2865 dump_timeout( ", timeout=", &req->timeout );
2866 fprintf( stderr, ", flags=%08x", req->flags );
2867 dump_varargs_object_attributes( ", objattr=", cur_size );
2870 static void dump_create_named_pipe_reply( const struct create_named_pipe_reply *req )
2872 fprintf( stderr, " handle=%04x", req->handle );
2875 static void dump_set_named_pipe_info_request( const struct set_named_pipe_info_request *req )
2877 fprintf( stderr, " handle=%04x", req->handle );
2878 fprintf( stderr, ", flags=%08x", req->flags );
2881 static void dump_create_window_request( const struct create_window_request *req )
2883 fprintf( stderr, " parent=%08x", req->parent );
2884 fprintf( stderr, ", owner=%08x", req->owner );
2885 fprintf( stderr, ", atom=%04x", req->atom );
2886 dump_uint64( ", instance=", &req->instance );
2887 fprintf( stderr, ", dpi=%d", req->dpi );
2888 fprintf( stderr, ", awareness=%d", req->awareness );
2889 fprintf( stderr, ", style=%08x", req->style );
2890 fprintf( stderr, ", ex_style=%08x", req->ex_style );
2891 dump_varargs_unicode_str( ", class=", cur_size );
2894 static void dump_create_window_reply( const struct create_window_reply *req )
2896 fprintf( stderr, " handle=%08x", req->handle );
2897 fprintf( stderr, ", parent=%08x", req->parent );
2898 fprintf( stderr, ", owner=%08x", req->owner );
2899 fprintf( stderr, ", extra=%d", req->extra );
2900 dump_uint64( ", class_ptr=", &req->class_ptr );
2901 fprintf( stderr, ", dpi=%d", req->dpi );
2902 fprintf( stderr, ", awareness=%d", req->awareness );
2905 static void dump_destroy_window_request( const struct destroy_window_request *req )
2907 fprintf( stderr, " handle=%08x", req->handle );
2910 static void dump_get_desktop_window_request( const struct get_desktop_window_request *req )
2912 fprintf( stderr, " force=%d", req->force );
2915 static void dump_get_desktop_window_reply( const struct get_desktop_window_reply *req )
2917 fprintf( stderr, " top_window=%08x", req->top_window );
2918 fprintf( stderr, ", msg_window=%08x", req->msg_window );
2921 static void dump_set_window_owner_request( const struct set_window_owner_request *req )
2923 fprintf( stderr, " handle=%08x", req->handle );
2924 fprintf( stderr, ", owner=%08x", req->owner );
2927 static void dump_set_window_owner_reply( const struct set_window_owner_reply *req )
2929 fprintf( stderr, " full_owner=%08x", req->full_owner );
2930 fprintf( stderr, ", prev_owner=%08x", req->prev_owner );
2933 static void dump_get_window_info_request( const struct get_window_info_request *req )
2935 fprintf( stderr, " handle=%08x", req->handle );
2938 static void dump_get_window_info_reply( const struct get_window_info_reply *req )
2940 fprintf( stderr, " full_handle=%08x", req->full_handle );
2941 fprintf( stderr, ", last_active=%08x", req->last_active );
2942 fprintf( stderr, ", pid=%04x", req->pid );
2943 fprintf( stderr, ", tid=%04x", req->tid );
2944 fprintf( stderr, ", atom=%04x", req->atom );
2945 fprintf( stderr, ", is_unicode=%d", req->is_unicode );
2946 fprintf( stderr, ", dpi=%d", req->dpi );
2947 fprintf( stderr, ", awareness=%d", req->awareness );
2950 static void dump_set_window_info_request( const struct set_window_info_request *req )
2952 fprintf( stderr, " flags=%04x", req->flags );
2953 fprintf( stderr, ", is_unicode=%d", req->is_unicode );
2954 fprintf( stderr, ", handle=%08x", req->handle );
2955 fprintf( stderr, ", style=%08x", req->style );
2956 fprintf( stderr, ", ex_style=%08x", req->ex_style );
2957 fprintf( stderr, ", id=%08x", req->id );
2958 dump_uint64( ", instance=", &req->instance );
2959 dump_uint64( ", user_data=", &req->user_data );
2960 fprintf( stderr, ", extra_offset=%d", req->extra_offset );
2961 fprintf( stderr, ", extra_size=%u", req->extra_size );
2962 dump_uint64( ", extra_value=", &req->extra_value );
2965 static void dump_set_window_info_reply( const struct set_window_info_reply *req )
2967 fprintf( stderr, " old_style=%08x", req->old_style );
2968 fprintf( stderr, ", old_ex_style=%08x", req->old_ex_style );
2969 dump_uint64( ", old_instance=", &req->old_instance );
2970 dump_uint64( ", old_user_data=", &req->old_user_data );
2971 dump_uint64( ", old_extra_value=", &req->old_extra_value );
2972 fprintf( stderr, ", old_id=%08x", req->old_id );
2975 static void dump_set_parent_request( const struct set_parent_request *req )
2977 fprintf( stderr, " handle=%08x", req->handle );
2978 fprintf( stderr, ", parent=%08x", req->parent );
2981 static void dump_set_parent_reply( const struct set_parent_reply *req )
2983 fprintf( stderr, " old_parent=%08x", req->old_parent );
2984 fprintf( stderr, ", full_parent=%08x", req->full_parent );
2985 fprintf( stderr, ", dpi=%d", req->dpi );
2986 fprintf( stderr, ", awareness=%d", req->awareness );
2989 static void dump_get_window_parents_request( const struct get_window_parents_request *req )
2991 fprintf( stderr, " handle=%08x", req->handle );
2994 static void dump_get_window_parents_reply( const struct get_window_parents_reply *req )
2996 fprintf( stderr, " count=%d", req->count );
2997 dump_varargs_user_handles( ", parents=", cur_size );
3000 static void dump_get_window_children_request( const struct get_window_children_request *req )
3002 fprintf( stderr, " desktop=%04x", req->desktop );
3003 fprintf( stderr, ", parent=%08x", req->parent );
3004 fprintf( stderr, ", atom=%04x", req->atom );
3005 fprintf( stderr, ", tid=%04x", req->tid );
3006 dump_varargs_unicode_str( ", class=", cur_size );
3009 static void dump_get_window_children_reply( const struct get_window_children_reply *req )
3011 fprintf( stderr, " count=%d", req->count );
3012 dump_varargs_user_handles( ", children=", cur_size );
3015 static void dump_get_window_children_from_point_request( const struct get_window_children_from_point_request *req )
3017 fprintf( stderr, " parent=%08x", req->parent );
3018 fprintf( stderr, ", x=%d", req->x );
3019 fprintf( stderr, ", y=%d", req->y );
3020 fprintf( stderr, ", dpi=%d", req->dpi );
3023 static void dump_get_window_children_from_point_reply( const struct get_window_children_from_point_reply *req )
3025 fprintf( stderr, " count=%d", req->count );
3026 dump_varargs_user_handles( ", children=", cur_size );
3029 static void dump_get_window_tree_request( const struct get_window_tree_request *req )
3031 fprintf( stderr, " handle=%08x", req->handle );
3034 static void dump_get_window_tree_reply( const struct get_window_tree_reply *req )
3036 fprintf( stderr, " parent=%08x", req->parent );
3037 fprintf( stderr, ", owner=%08x", req->owner );
3038 fprintf( stderr, ", next_sibling=%08x", req->next_sibling );
3039 fprintf( stderr, ", prev_sibling=%08x", req->prev_sibling );
3040 fprintf( stderr, ", first_sibling=%08x", req->first_sibling );
3041 fprintf( stderr, ", last_sibling=%08x", req->last_sibling );
3042 fprintf( stderr, ", first_child=%08x", req->first_child );
3043 fprintf( stderr, ", last_child=%08x", req->last_child );
3046 static void dump_set_window_pos_request( const struct set_window_pos_request *req )
3048 fprintf( stderr, " swp_flags=%04x", req->swp_flags );
3049 fprintf( stderr, ", paint_flags=%04x", req->paint_flags );
3050 fprintf( stderr, ", handle=%08x", req->handle );
3051 fprintf( stderr, ", previous=%08x", req->previous );
3052 dump_rectangle( ", window=", &req->window );
3053 dump_rectangle( ", client=", &req->client );
3054 dump_varargs_rectangles( ", valid=", cur_size );
3057 static void dump_set_window_pos_reply( const struct set_window_pos_reply *req )
3059 fprintf( stderr, " new_style=%08x", req->new_style );
3060 fprintf( stderr, ", new_ex_style=%08x", req->new_ex_style );
3061 fprintf( stderr, ", surface_win=%08x", req->surface_win );
3062 fprintf( stderr, ", needs_update=%d", req->needs_update );
3065 static void dump_get_window_rectangles_request( const struct get_window_rectangles_request *req )
3067 fprintf( stderr, " handle=%08x", req->handle );
3068 fprintf( stderr, ", relative=%d", req->relative );
3069 fprintf( stderr, ", dpi=%d", req->dpi );
3072 static void dump_get_window_rectangles_reply( const struct get_window_rectangles_reply *req )
3074 dump_rectangle( " window=", &req->window );
3075 dump_rectangle( ", client=", &req->client );
3078 static void dump_get_window_text_request( const struct get_window_text_request *req )
3080 fprintf( stderr, " handle=%08x", req->handle );
3083 static void dump_get_window_text_reply( const struct get_window_text_reply *req )
3085 fprintf( stderr, " length=%u", req->length );
3086 dump_varargs_unicode_str( ", text=", cur_size );
3089 static void dump_set_window_text_request( const struct set_window_text_request *req )
3091 fprintf( stderr, " handle=%08x", req->handle );
3092 dump_varargs_unicode_str( ", text=", cur_size );
3095 static void dump_get_windows_offset_request( const struct get_windows_offset_request *req )
3097 fprintf( stderr, " from=%08x", req->from );
3098 fprintf( stderr, ", to=%08x", req->to );
3099 fprintf( stderr, ", dpi=%d", req->dpi );
3102 static void dump_get_windows_offset_reply( const struct get_windows_offset_reply *req )
3104 fprintf( stderr, " x=%d", req->x );
3105 fprintf( stderr, ", y=%d", req->y );
3106 fprintf( stderr, ", mirror=%d", req->mirror );
3109 static void dump_get_visible_region_request( const struct get_visible_region_request *req )
3111 fprintf( stderr, " window=%08x", req->window );
3112 fprintf( stderr, ", flags=%08x", req->flags );
3115 static void dump_get_visible_region_reply( const struct get_visible_region_reply *req )
3117 fprintf( stderr, " top_win=%08x", req->top_win );
3118 dump_rectangle( ", top_rect=", &req->top_rect );
3119 dump_rectangle( ", win_rect=", &req->win_rect );
3120 fprintf( stderr, ", paint_flags=%08x", req->paint_flags );
3121 fprintf( stderr, ", total_size=%u", req->total_size );
3122 dump_varargs_rectangles( ", region=", cur_size );
3125 static void dump_get_surface_region_request( const struct get_surface_region_request *req )
3127 fprintf( stderr, " window=%08x", req->window );
3130 static void dump_get_surface_region_reply( const struct get_surface_region_reply *req )
3132 dump_rectangle( " visible_rect=", &req->visible_rect );
3133 fprintf( stderr, ", total_size=%u", req->total_size );
3134 dump_varargs_rectangles( ", region=", cur_size );
3137 static void dump_get_window_region_request( const struct get_window_region_request *req )
3139 fprintf( stderr, " window=%08x", req->window );
3142 static void dump_get_window_region_reply( const struct get_window_region_reply *req )
3144 fprintf( stderr, " total_size=%u", req->total_size );
3145 dump_varargs_rectangles( ", region=", cur_size );
3148 static void dump_set_window_region_request( const struct set_window_region_request *req )
3150 fprintf( stderr, " window=%08x", req->window );
3151 fprintf( stderr, ", redraw=%d", req->redraw );
3152 dump_varargs_rectangles( ", region=", cur_size );
3155 static void dump_get_update_region_request( const struct get_update_region_request *req )
3157 fprintf( stderr, " window=%08x", req->window );
3158 fprintf( stderr, ", from_child=%08x", req->from_child );
3159 fprintf( stderr, ", flags=%08x", req->flags );
3162 static void dump_get_update_region_reply( const struct get_update_region_reply *req )
3164 fprintf( stderr, " child=%08x", req->child );
3165 fprintf( stderr, ", flags=%08x", req->flags );
3166 fprintf( stderr, ", total_size=%u", req->total_size );
3167 dump_varargs_rectangles( ", region=", cur_size );
3170 static void dump_update_window_zorder_request( const struct update_window_zorder_request *req )
3172 fprintf( stderr, " window=%08x", req->window );
3173 dump_rectangle( ", rect=", &req->rect );
3176 static void dump_redraw_window_request( const struct redraw_window_request *req )
3178 fprintf( stderr, " window=%08x", req->window );
3179 fprintf( stderr, ", flags=%08x", req->flags );
3180 dump_varargs_rectangles( ", region=", cur_size );
3183 static void dump_set_window_property_request( const struct set_window_property_request *req )
3185 fprintf( stderr, " window=%08x", req->window );
3186 dump_uint64( ", data=", &req->data );
3187 fprintf( stderr, ", atom=%04x", req->atom );
3188 dump_varargs_unicode_str( ", name=", cur_size );
3191 static void dump_remove_window_property_request( const struct remove_window_property_request *req )
3193 fprintf( stderr, " window=%08x", req->window );
3194 fprintf( stderr, ", atom=%04x", req->atom );
3195 dump_varargs_unicode_str( ", name=", cur_size );
3198 static void dump_remove_window_property_reply( const struct remove_window_property_reply *req )
3200 dump_uint64( " data=", &req->data );
3203 static void dump_get_window_property_request( const struct get_window_property_request *req )
3205 fprintf( stderr, " window=%08x", req->window );
3206 fprintf( stderr, ", atom=%04x", req->atom );
3207 dump_varargs_unicode_str( ", name=", cur_size );
3210 static void dump_get_window_property_reply( const struct get_window_property_reply *req )
3212 dump_uint64( " data=", &req->data );
3215 static void dump_get_window_properties_request( const struct get_window_properties_request *req )
3217 fprintf( stderr, " window=%08x", req->window );
3220 static void dump_get_window_properties_reply( const struct get_window_properties_reply *req )
3222 fprintf( stderr, " total=%d", req->total );
3223 dump_varargs_properties( ", props=", cur_size );
3226 static void dump_create_winstation_request( const struct create_winstation_request *req )
3228 fprintf( stderr, " flags=%08x", req->flags );
3229 fprintf( stderr, ", access=%08x", req->access );
3230 fprintf( stderr, ", attributes=%08x", req->attributes );
3231 fprintf( stderr, ", rootdir=%04x", req->rootdir );
3232 dump_varargs_unicode_str( ", name=", cur_size );
3235 static void dump_create_winstation_reply( const struct create_winstation_reply *req )
3237 fprintf( stderr, " handle=%04x", req->handle );
3240 static void dump_open_winstation_request( const struct open_winstation_request *req )
3242 fprintf( stderr, " access=%08x", req->access );
3243 fprintf( stderr, ", attributes=%08x", req->attributes );
3244 fprintf( stderr, ", rootdir=%04x", req->rootdir );
3245 dump_varargs_unicode_str( ", name=", cur_size );
3248 static void dump_open_winstation_reply( const struct open_winstation_reply *req )
3250 fprintf( stderr, " handle=%04x", req->handle );
3253 static void dump_close_winstation_request( const struct close_winstation_request *req )
3255 fprintf( stderr, " handle=%04x", req->handle );
3258 static void dump_get_process_winstation_request( const struct get_process_winstation_request *req )
3262 static void dump_get_process_winstation_reply( const struct get_process_winstation_reply *req )
3264 fprintf( stderr, " handle=%04x", req->handle );
3267 static void dump_set_process_winstation_request( const struct set_process_winstation_request *req )
3269 fprintf( stderr, " handle=%04x", req->handle );
3272 static void dump_enum_winstation_request( const struct enum_winstation_request *req )
3274 fprintf( stderr, " index=%08x", req->index );
3277 static void dump_enum_winstation_reply( const struct enum_winstation_reply *req )
3279 fprintf( stderr, " next=%08x", req->next );
3280 dump_varargs_unicode_str( ", name=", cur_size );
3283 static void dump_create_desktop_request( const struct create_desktop_request *req )
3285 fprintf( stderr, " flags=%08x", req->flags );
3286 fprintf( stderr, ", access=%08x", req->access );
3287 fprintf( stderr, ", attributes=%08x", req->attributes );
3288 dump_varargs_unicode_str( ", name=", cur_size );
3291 static void dump_create_desktop_reply( const struct create_desktop_reply *req )
3293 fprintf( stderr, " handle=%04x", req->handle );
3296 static void dump_open_desktop_request( const struct open_desktop_request *req )
3298 fprintf( stderr, " winsta=%04x", req->winsta );
3299 fprintf( stderr, ", flags=%08x", req->flags );
3300 fprintf( stderr, ", access=%08x", req->access );
3301 fprintf( stderr, ", attributes=%08x", req->attributes );
3302 dump_varargs_unicode_str( ", name=", cur_size );
3305 static void dump_open_desktop_reply( const struct open_desktop_reply *req )
3307 fprintf( stderr, " handle=%04x", req->handle );
3310 static void dump_open_input_desktop_request( const struct open_input_desktop_request *req )
3312 fprintf( stderr, " flags=%08x", req->flags );
3313 fprintf( stderr, ", access=%08x", req->access );
3314 fprintf( stderr, ", attributes=%08x", req->attributes );
3317 static void dump_open_input_desktop_reply( const struct open_input_desktop_reply *req )
3319 fprintf( stderr, " handle=%04x", req->handle );
3322 static void dump_close_desktop_request( const struct close_desktop_request *req )
3324 fprintf( stderr, " handle=%04x", req->handle );
3327 static void dump_get_thread_desktop_request( const struct get_thread_desktop_request *req )
3329 fprintf( stderr, " tid=%04x", req->tid );
3332 static void dump_get_thread_desktop_reply( const struct get_thread_desktop_reply *req )
3334 fprintf( stderr, " handle=%04x", req->handle );
3337 static void dump_set_thread_desktop_request( const struct set_thread_desktop_request *req )
3339 fprintf( stderr, " handle=%04x", req->handle );
3342 static void dump_enum_desktop_request( const struct enum_desktop_request *req )
3344 fprintf( stderr, " winstation=%04x", req->winstation );
3345 fprintf( stderr, ", index=%08x", req->index );
3348 static void dump_enum_desktop_reply( const struct enum_desktop_reply *req )
3350 fprintf( stderr, " next=%08x", req->next );
3351 dump_varargs_unicode_str( ", name=", cur_size );
3354 static void dump_set_user_object_info_request( const struct set_user_object_info_request *req )
3356 fprintf( stderr, " handle=%04x", req->handle );
3357 fprintf( stderr, ", flags=%08x", req->flags );
3358 fprintf( stderr, ", obj_flags=%08x", req->obj_flags );
3361 static void dump_set_user_object_info_reply( const struct set_user_object_info_reply *req )
3363 fprintf( stderr, " is_desktop=%d", req->is_desktop );
3364 fprintf( stderr, ", old_obj_flags=%08x", req->old_obj_flags );
3365 dump_varargs_unicode_str( ", name=", cur_size );
3368 static void dump_register_hotkey_request( const struct register_hotkey_request *req )
3370 fprintf( stderr, " window=%08x", req->window );
3371 fprintf( stderr, ", id=%d", req->id );
3372 fprintf( stderr, ", flags=%08x", req->flags );
3373 fprintf( stderr, ", vkey=%08x", req->vkey );
3376 static void dump_register_hotkey_reply( const struct register_hotkey_reply *req )
3378 fprintf( stderr, " replaced=%d", req->replaced );
3379 fprintf( stderr, ", flags=%08x", req->flags );
3380 fprintf( stderr, ", vkey=%08x", req->vkey );
3383 static void dump_unregister_hotkey_request( const struct unregister_hotkey_request *req )
3385 fprintf( stderr, " window=%08x", req->window );
3386 fprintf( stderr, ", id=%d", req->id );
3389 static void dump_unregister_hotkey_reply( const struct unregister_hotkey_reply *req )
3391 fprintf( stderr, " flags=%08x", req->flags );
3392 fprintf( stderr, ", vkey=%08x", req->vkey );
3395 static void dump_attach_thread_input_request( const struct attach_thread_input_request *req )
3397 fprintf( stderr, " tid_from=%04x", req->tid_from );
3398 fprintf( stderr, ", tid_to=%04x", req->tid_to );
3399 fprintf( stderr, ", attach=%d", req->attach );
3402 static void dump_get_thread_input_request( const struct get_thread_input_request *req )
3404 fprintf( stderr, " tid=%04x", req->tid );
3407 static void dump_get_thread_input_reply( const struct get_thread_input_reply *req )
3409 fprintf( stderr, " focus=%08x", req->focus );
3410 fprintf( stderr, ", capture=%08x", req->capture );
3411 fprintf( stderr, ", active=%08x", req->active );
3412 fprintf( stderr, ", foreground=%08x", req->foreground );
3413 fprintf( stderr, ", menu_owner=%08x", req->menu_owner );
3414 fprintf( stderr, ", move_size=%08x", req->move_size );
3415 fprintf( stderr, ", caret=%08x", req->caret );
3416 fprintf( stderr, ", cursor=%08x", req->cursor );
3417 fprintf( stderr, ", show_count=%d", req->show_count );
3418 dump_rectangle( ", rect=", &req->rect );
3421 static void dump_get_last_input_time_request( const struct get_last_input_time_request *req )
3425 static void dump_get_last_input_time_reply( const struct get_last_input_time_reply *req )
3427 fprintf( stderr, " time=%08x", req->time );
3430 static void dump_get_key_state_request( const struct get_key_state_request *req )
3432 fprintf( stderr, " async=%d", req->async );
3433 fprintf( stderr, ", key=%d", req->key );
3436 static void dump_get_key_state_reply( const struct get_key_state_reply *req )
3438 fprintf( stderr, " state=%02x", req->state );
3439 dump_varargs_bytes( ", keystate=", cur_size );
3442 static void dump_set_key_state_request( const struct set_key_state_request *req )
3444 fprintf( stderr, " async=%d", req->async );
3445 dump_varargs_bytes( ", keystate=", cur_size );
3448 static void dump_set_foreground_window_request( const struct set_foreground_window_request *req )
3450 fprintf( stderr, " handle=%08x", req->handle );
3453 static void dump_set_foreground_window_reply( const struct set_foreground_window_reply *req )
3455 fprintf( stderr, " previous=%08x", req->previous );
3456 fprintf( stderr, ", send_msg_old=%d", req->send_msg_old );
3457 fprintf( stderr, ", send_msg_new=%d", req->send_msg_new );
3460 static void dump_set_focus_window_request( const struct set_focus_window_request *req )
3462 fprintf( stderr, " handle=%08x", req->handle );
3465 static void dump_set_focus_window_reply( const struct set_focus_window_reply *req )
3467 fprintf( stderr, " previous=%08x", req->previous );
3470 static void dump_set_active_window_request( const struct set_active_window_request *req )
3472 fprintf( stderr, " handle=%08x", req->handle );
3475 static void dump_set_active_window_reply( const struct set_active_window_reply *req )
3477 fprintf( stderr, " previous=%08x", req->previous );
3480 static void dump_set_capture_window_request( const struct set_capture_window_request *req )
3482 fprintf( stderr, " handle=%08x", req->handle );
3483 fprintf( stderr, ", flags=%08x", req->flags );
3486 static void dump_set_capture_window_reply( const struct set_capture_window_reply *req )
3488 fprintf( stderr, " previous=%08x", req->previous );
3489 fprintf( stderr, ", full_handle=%08x", req->full_handle );
3492 static void dump_set_caret_window_request( const struct set_caret_window_request *req )
3494 fprintf( stderr, " handle=%08x", req->handle );
3495 fprintf( stderr, ", width=%d", req->width );
3496 fprintf( stderr, ", height=%d", req->height );
3499 static void dump_set_caret_window_reply( const struct set_caret_window_reply *req )
3501 fprintf( stderr, " previous=%08x", req->previous );
3502 dump_rectangle( ", old_rect=", &req->old_rect );
3503 fprintf( stderr, ", old_hide=%d", req->old_hide );
3504 fprintf( stderr, ", old_state=%d", req->old_state );
3507 static void dump_set_caret_info_request( const struct set_caret_info_request *req )
3509 fprintf( stderr, " flags=%08x", req->flags );
3510 fprintf( stderr, ", handle=%08x", req->handle );
3511 fprintf( stderr, ", x=%d", req->x );
3512 fprintf( stderr, ", y=%d", req->y );
3513 fprintf( stderr, ", hide=%d", req->hide );
3514 fprintf( stderr, ", state=%d", req->state );
3517 static void dump_set_caret_info_reply( const struct set_caret_info_reply *req )
3519 fprintf( stderr, " full_handle=%08x", req->full_handle );
3520 dump_rectangle( ", old_rect=", &req->old_rect );
3521 fprintf( stderr, ", old_hide=%d", req->old_hide );
3522 fprintf( stderr, ", old_state=%d", req->old_state );
3525 static void dump_set_hook_request( const struct set_hook_request *req )
3527 fprintf( stderr, " id=%d", req->id );
3528 fprintf( stderr, ", pid=%04x", req->pid );
3529 fprintf( stderr, ", tid=%04x", req->tid );
3530 fprintf( stderr, ", event_min=%d", req->event_min );
3531 fprintf( stderr, ", event_max=%d", req->event_max );
3532 dump_uint64( ", proc=", &req->proc );
3533 fprintf( stderr, ", flags=%d", req->flags );
3534 fprintf( stderr, ", unicode=%d", req->unicode );
3535 dump_varargs_unicode_str( ", module=", cur_size );
3538 static void dump_set_hook_reply( const struct set_hook_reply *req )
3540 fprintf( stderr, " handle=%08x", req->handle );
3541 fprintf( stderr, ", active_hooks=%08x", req->active_hooks );
3544 static void dump_remove_hook_request( const struct remove_hook_request *req )
3546 fprintf( stderr, " handle=%08x", req->handle );
3547 dump_uint64( ", proc=", &req->proc );
3548 fprintf( stderr, ", id=%d", req->id );
3551 static void dump_remove_hook_reply( const struct remove_hook_reply *req )
3553 fprintf( stderr, " active_hooks=%08x", req->active_hooks );
3556 static void dump_start_hook_chain_request( const struct start_hook_chain_request *req )
3558 fprintf( stderr, " id=%d", req->id );
3559 fprintf( stderr, ", event=%d", req->event );
3560 fprintf( stderr, ", window=%08x", req->window );
3561 fprintf( stderr, ", object_id=%d", req->object_id );
3562 fprintf( stderr, ", child_id=%d", req->child_id );
3565 static void dump_start_hook_chain_reply( const struct start_hook_chain_reply *req )
3567 fprintf( stderr, " handle=%08x", req->handle );
3568 fprintf( stderr, ", pid=%04x", req->pid );
3569 fprintf( stderr, ", tid=%04x", req->tid );
3570 fprintf( stderr, ", unicode=%d", req->unicode );
3571 dump_uint64( ", proc=", &req->proc );
3572 fprintf( stderr, ", active_hooks=%08x", req->active_hooks );
3573 dump_varargs_unicode_str( ", module=", cur_size );
3576 static void dump_finish_hook_chain_request( const struct finish_hook_chain_request *req )
3578 fprintf( stderr, " id=%d", req->id );
3581 static void dump_get_hook_info_request( const struct get_hook_info_request *req )
3583 fprintf( stderr, " handle=%08x", req->handle );
3584 fprintf( stderr, ", get_next=%d", req->get_next );
3585 fprintf( stderr, ", event=%d", req->event );
3586 fprintf( stderr, ", window=%08x", req->window );
3587 fprintf( stderr, ", object_id=%d", req->object_id );
3588 fprintf( stderr, ", child_id=%d", req->child_id );
3591 static void dump_get_hook_info_reply( const struct get_hook_info_reply *req )
3593 fprintf( stderr, " handle=%08x", req->handle );
3594 fprintf( stderr, ", id=%d", req->id );
3595 fprintf( stderr, ", pid=%04x", req->pid );
3596 fprintf( stderr, ", tid=%04x", req->tid );
3597 dump_uint64( ", proc=", &req->proc );
3598 fprintf( stderr, ", unicode=%d", req->unicode );
3599 dump_varargs_unicode_str( ", module=", cur_size );
3602 static void dump_create_class_request( const struct create_class_request *req )
3604 fprintf( stderr, " local=%d", req->local );
3605 fprintf( stderr, ", atom=%04x", req->atom );
3606 fprintf( stderr, ", style=%08x", req->style );
3607 dump_uint64( ", instance=", &req->instance );
3608 fprintf( stderr, ", extra=%d", req->extra );
3609 fprintf( stderr, ", win_extra=%d", req->win_extra );
3610 dump_uint64( ", client_ptr=", &req->client_ptr );
3611 fprintf( stderr, ", name_offset=%u", req->name_offset );
3612 dump_varargs_unicode_str( ", name=", cur_size );
3615 static void dump_create_class_reply( const struct create_class_reply *req )
3617 fprintf( stderr, " atom=%04x", req->atom );
3620 static void dump_destroy_class_request( const struct destroy_class_request *req )
3622 fprintf( stderr, " atom=%04x", req->atom );
3623 dump_uint64( ", instance=", &req->instance );
3624 dump_varargs_unicode_str( ", name=", cur_size );
3627 static void dump_destroy_class_reply( const struct destroy_class_reply *req )
3629 dump_uint64( " client_ptr=", &req->client_ptr );
3632 static void dump_set_class_info_request( const struct set_class_info_request *req )
3634 fprintf( stderr, " window=%08x", req->window );
3635 fprintf( stderr, ", flags=%08x", req->flags );
3636 fprintf( stderr, ", atom=%04x", req->atom );
3637 fprintf( stderr, ", style=%08x", req->style );
3638 fprintf( stderr, ", win_extra=%d", req->win_extra );
3639 dump_uint64( ", instance=", &req->instance );
3640 fprintf( stderr, ", extra_offset=%d", req->extra_offset );
3641 fprintf( stderr, ", extra_size=%u", req->extra_size );
3642 dump_uint64( ", extra_value=", &req->extra_value );
3645 static void dump_set_class_info_reply( const struct set_class_info_reply *req )
3647 fprintf( stderr, " old_atom=%04x", req->old_atom );
3648 fprintf( stderr, ", base_atom=%04x", req->base_atom );
3649 dump_uint64( ", old_instance=", &req->old_instance );
3650 dump_uint64( ", old_extra_value=", &req->old_extra_value );
3651 fprintf( stderr, ", old_style=%08x", req->old_style );
3652 fprintf( stderr, ", old_extra=%d", req->old_extra );
3653 fprintf( stderr, ", old_win_extra=%d", req->old_win_extra );
3656 static void dump_open_clipboard_request( const struct open_clipboard_request *req )
3658 fprintf( stderr, " window=%08x", req->window );
3661 static void dump_open_clipboard_reply( const struct open_clipboard_reply *req )
3663 fprintf( stderr, " owner=%08x", req->owner );
3666 static void dump_close_clipboard_request( const struct close_clipboard_request *req )
3670 static void dump_close_clipboard_reply( const struct close_clipboard_reply *req )
3672 fprintf( stderr, " viewer=%08x", req->viewer );
3673 fprintf( stderr, ", owner=%08x", req->owner );
3676 static void dump_empty_clipboard_request( const struct empty_clipboard_request *req )
3680 static void dump_set_clipboard_data_request( const struct set_clipboard_data_request *req )
3682 fprintf( stderr, " format=%08x", req->format );
3683 fprintf( stderr, ", lcid=%08x", req->lcid );
3684 dump_varargs_bytes( ", data=", cur_size );
3687 static void dump_set_clipboard_data_reply( const struct set_clipboard_data_reply *req )
3689 fprintf( stderr, " seqno=%08x", req->seqno );
3692 static void dump_get_clipboard_data_request( const struct get_clipboard_data_request *req )
3694 fprintf( stderr, " format=%08x", req->format );
3695 fprintf( stderr, ", render=%d", req->render );
3696 fprintf( stderr, ", cached=%d", req->cached );
3697 fprintf( stderr, ", seqno=%08x", req->seqno );
3700 static void dump_get_clipboard_data_reply( const struct get_clipboard_data_reply *req )
3702 fprintf( stderr, " from=%08x", req->from );
3703 fprintf( stderr, ", owner=%08x", req->owner );
3704 fprintf( stderr, ", seqno=%08x", req->seqno );
3705 fprintf( stderr, ", total=%u", req->total );
3706 dump_varargs_bytes( ", data=", cur_size );
3709 static void dump_get_clipboard_formats_request( const struct get_clipboard_formats_request *req )
3711 fprintf( stderr, " format=%08x", req->format );
3714 static void dump_get_clipboard_formats_reply( const struct get_clipboard_formats_reply *req )
3716 fprintf( stderr, " count=%08x", req->count );
3717 dump_varargs_uints( ", formats=", cur_size );
3720 static void dump_enum_clipboard_formats_request( const struct enum_clipboard_formats_request *req )
3722 fprintf( stderr, " previous=%08x", req->previous );
3725 static void dump_enum_clipboard_formats_reply( const struct enum_clipboard_formats_reply *req )
3727 fprintf( stderr, " format=%08x", req->format );
3730 static void dump_release_clipboard_request( const struct release_clipboard_request *req )
3732 fprintf( stderr, " owner=%08x", req->owner );
3735 static void dump_release_clipboard_reply( const struct release_clipboard_reply *req )
3737 fprintf( stderr, " viewer=%08x", req->viewer );
3738 fprintf( stderr, ", owner=%08x", req->owner );
3741 static void dump_get_clipboard_info_request( const struct get_clipboard_info_request *req )
3745 static void dump_get_clipboard_info_reply( const struct get_clipboard_info_reply *req )
3747 fprintf( stderr, " window=%08x", req->window );
3748 fprintf( stderr, ", owner=%08x", req->owner );
3749 fprintf( stderr, ", viewer=%08x", req->viewer );
3750 fprintf( stderr, ", seqno=%08x", req->seqno );
3753 static void dump_set_clipboard_viewer_request( const struct set_clipboard_viewer_request *req )
3755 fprintf( stderr, " viewer=%08x", req->viewer );
3756 fprintf( stderr, ", previous=%08x", req->previous );
3759 static void dump_set_clipboard_viewer_reply( const struct set_clipboard_viewer_reply *req )
3761 fprintf( stderr, " old_viewer=%08x", req->old_viewer );
3762 fprintf( stderr, ", owner=%08x", req->owner );
3765 static void dump_add_clipboard_listener_request( const struct add_clipboard_listener_request *req )
3767 fprintf( stderr, " window=%08x", req->window );
3770 static void dump_remove_clipboard_listener_request( const struct remove_clipboard_listener_request *req )
3772 fprintf( stderr, " window=%08x", req->window );
3775 static void dump_open_token_request( const struct open_token_request *req )
3777 fprintf( stderr, " handle=%04x", req->handle );
3778 fprintf( stderr, ", access=%08x", req->access );
3779 fprintf( stderr, ", attributes=%08x", req->attributes );
3780 fprintf( stderr, ", flags=%08x", req->flags );
3783 static void dump_open_token_reply( const struct open_token_reply *req )
3785 fprintf( stderr, " token=%04x", req->token );
3788 static void dump_set_global_windows_request( const struct set_global_windows_request *req )
3790 fprintf( stderr, " flags=%08x", req->flags );
3791 fprintf( stderr, ", shell_window=%08x", req->shell_window );
3792 fprintf( stderr, ", shell_listview=%08x", req->shell_listview );
3793 fprintf( stderr, ", progman_window=%08x", req->progman_window );
3794 fprintf( stderr, ", taskman_window=%08x", req->taskman_window );
3797 static void dump_set_global_windows_reply( const struct set_global_windows_reply *req )
3799 fprintf( stderr, " old_shell_window=%08x", req->old_shell_window );
3800 fprintf( stderr, ", old_shell_listview=%08x", req->old_shell_listview );
3801 fprintf( stderr, ", old_progman_window=%08x", req->old_progman_window );
3802 fprintf( stderr, ", old_taskman_window=%08x", req->old_taskman_window );
3805 static void dump_adjust_token_privileges_request( const struct adjust_token_privileges_request *req )
3807 fprintf( stderr, " handle=%04x", req->handle );
3808 fprintf( stderr, ", disable_all=%d", req->disable_all );
3809 fprintf( stderr, ", get_modified_state=%d", req->get_modified_state );
3810 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3813 static void dump_adjust_token_privileges_reply( const struct adjust_token_privileges_reply *req )
3815 fprintf( stderr, " len=%08x", req->len );
3816 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3819 static void dump_get_token_privileges_request( const struct get_token_privileges_request *req )
3821 fprintf( stderr, " handle=%04x", req->handle );
3824 static void dump_get_token_privileges_reply( const struct get_token_privileges_reply *req )
3826 fprintf( stderr, " len=%08x", req->len );
3827 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3830 static void dump_check_token_privileges_request( const struct check_token_privileges_request *req )
3832 fprintf( stderr, " handle=%04x", req->handle );
3833 fprintf( stderr, ", all_required=%d", req->all_required );
3834 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3837 static void dump_check_token_privileges_reply( const struct check_token_privileges_reply *req )
3839 fprintf( stderr, " has_privileges=%d", req->has_privileges );
3840 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3843 static void dump_duplicate_token_request( const struct duplicate_token_request *req )
3845 fprintf( stderr, " handle=%04x", req->handle );
3846 fprintf( stderr, ", access=%08x", req->access );
3847 fprintf( stderr, ", primary=%d", req->primary );
3848 fprintf( stderr, ", impersonation_level=%d", req->impersonation_level );
3849 dump_varargs_object_attributes( ", objattr=", cur_size );
3852 static void dump_duplicate_token_reply( const struct duplicate_token_reply *req )
3854 fprintf( stderr, " new_handle=%04x", req->new_handle );
3857 static void dump_filter_token_request( const struct filter_token_request *req )
3859 fprintf( stderr, " handle=%04x", req->handle );
3860 fprintf( stderr, ", flags=%08x", req->flags );
3861 fprintf( stderr, ", privileges_size=%u", req->privileges_size );
3862 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", min(cur_size,req->privileges_size) );
3863 dump_varargs_SID( ", disable_sids=", cur_size );
3866 static void dump_filter_token_reply( const struct filter_token_reply *req )
3868 fprintf( stderr, " new_handle=%04x", req->new_handle );
3871 static void dump_access_check_request( const struct access_check_request *req )
3873 fprintf( stderr, " handle=%04x", req->handle );
3874 fprintf( stderr, ", desired_access=%08x", req->desired_access );
3875 dump_generic_map( ", mapping=", &req->mapping );
3876 dump_varargs_security_descriptor( ", sd=", cur_size );
3879 static void dump_access_check_reply( const struct access_check_reply *req )
3881 fprintf( stderr, " access_granted=%08x", req->access_granted );
3882 fprintf( stderr, ", access_status=%08x", req->access_status );
3883 fprintf( stderr, ", privileges_len=%08x", req->privileges_len );
3884 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3887 static void dump_get_token_sid_request( const struct get_token_sid_request *req )
3889 fprintf( stderr, " handle=%04x", req->handle );
3890 fprintf( stderr, ", which_sid=%08x", req->which_sid );
3893 static void dump_get_token_sid_reply( const struct get_token_sid_reply *req )
3895 fprintf( stderr, " sid_len=%u", req->sid_len );
3896 dump_varargs_SID( ", sid=", cur_size );
3899 static void dump_get_token_groups_request( const struct get_token_groups_request *req )
3901 fprintf( stderr, " handle=%04x", req->handle );
3904 static void dump_get_token_groups_reply( const struct get_token_groups_reply *req )
3906 fprintf( stderr, " user_len=%u", req->user_len );
3907 dump_varargs_token_groups( ", user=", cur_size );
3910 static void dump_get_token_default_dacl_request( const struct get_token_default_dacl_request *req )
3912 fprintf( stderr, " handle=%04x", req->handle );
3915 static void dump_get_token_default_dacl_reply( const struct get_token_default_dacl_reply *req )
3917 fprintf( stderr, " acl_len=%u", req->acl_len );
3918 dump_varargs_ACL( ", acl=", cur_size );
3921 static void dump_set_token_default_dacl_request( const struct set_token_default_dacl_request *req )
3923 fprintf( stderr, " handle=%04x", req->handle );
3924 dump_varargs_ACL( ", acl=", cur_size );
3927 static void dump_set_security_object_request( const struct set_security_object_request *req )
3929 fprintf( stderr, " handle=%04x", req->handle );
3930 fprintf( stderr, ", security_info=%08x", req->security_info );
3931 dump_varargs_security_descriptor( ", sd=", cur_size );
3934 static void dump_get_security_object_request( const struct get_security_object_request *req )
3936 fprintf( stderr, " handle=%04x", req->handle );
3937 fprintf( stderr, ", security_info=%08x", req->security_info );
3940 static void dump_get_security_object_reply( const struct get_security_object_reply *req )
3942 fprintf( stderr, " sd_len=%08x", req->sd_len );
3943 dump_varargs_security_descriptor( ", sd=", cur_size );
3946 static void dump_get_system_handles_request( const struct get_system_handles_request *req )
3950 static void dump_get_system_handles_reply( const struct get_system_handles_reply *req )
3952 fprintf( stderr, " count=%08x", req->count );
3953 dump_varargs_handle_infos( ", data=", cur_size );
3956 static void dump_create_mailslot_request( const struct create_mailslot_request *req )
3958 fprintf( stderr, " access=%08x", req->access );
3959 dump_timeout( ", read_timeout=", &req->read_timeout );
3960 fprintf( stderr, ", max_msgsize=%08x", req->max_msgsize );
3961 dump_varargs_object_attributes( ", objattr=", cur_size );
3964 static void dump_create_mailslot_reply( const struct create_mailslot_reply *req )
3966 fprintf( stderr, " handle=%04x", req->handle );
3969 static void dump_set_mailslot_info_request( const struct set_mailslot_info_request *req )
3971 fprintf( stderr, " handle=%04x", req->handle );
3972 dump_timeout( ", read_timeout=", &req->read_timeout );
3973 fprintf( stderr, ", flags=%08x", req->flags );
3976 static void dump_set_mailslot_info_reply( const struct set_mailslot_info_reply *req )
3978 dump_timeout( " read_timeout=", &req->read_timeout );
3979 fprintf( stderr, ", max_msgsize=%08x", req->max_msgsize );
3982 static void dump_create_directory_request( const struct create_directory_request *req )
3984 fprintf( stderr, " access=%08x", req->access );
3985 dump_varargs_object_attributes( ", objattr=", cur_size );
3988 static void dump_create_directory_reply( const struct create_directory_reply *req )
3990 fprintf( stderr, " handle=%04x", req->handle );
3993 static void dump_open_directory_request( const struct open_directory_request *req )
3995 fprintf( stderr, " access=%08x", req->access );
3996 fprintf( stderr, ", attributes=%08x", req->attributes );
3997 fprintf( stderr, ", rootdir=%04x", req->rootdir );
3998 dump_varargs_unicode_str( ", directory_name=", cur_size );
4001 static void dump_open_directory_reply( const struct open_directory_reply *req )
4003 fprintf( stderr, " handle=%04x", req->handle );
4006 static void dump_get_directory_entry_request( const struct get_directory_entry_request *req )
4008 fprintf( stderr, " handle=%04x", req->handle );
4009 fprintf( stderr, ", index=%08x", req->index );
4012 static void dump_get_directory_entry_reply( const struct get_directory_entry_reply *req )
4014 fprintf( stderr, " name_len=%u", req->name_len );
4015 dump_varargs_unicode_str( ", name=", min(cur_size,req->name_len) );
4016 dump_varargs_unicode_str( ", type=", cur_size );
4019 static void dump_create_symlink_request( const struct create_symlink_request *req )
4021 fprintf( stderr, " access=%08x", req->access );
4022 dump_varargs_object_attributes( ", objattr=", cur_size );
4023 dump_varargs_unicode_str( ", target_name=", cur_size );
4026 static void dump_create_symlink_reply( const struct create_symlink_reply *req )
4028 fprintf( stderr, " handle=%04x", req->handle );
4031 static void dump_open_symlink_request( const struct open_symlink_request *req )
4033 fprintf( stderr, " access=%08x", req->access );
4034 fprintf( stderr, ", attributes=%08x", req->attributes );
4035 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4036 dump_varargs_unicode_str( ", name=", cur_size );
4039 static void dump_open_symlink_reply( const struct open_symlink_reply *req )
4041 fprintf( stderr, " handle=%04x", req->handle );
4044 static void dump_query_symlink_request( const struct query_symlink_request *req )
4046 fprintf( stderr, " handle=%04x", req->handle );
4049 static void dump_query_symlink_reply( const struct query_symlink_reply *req )
4051 fprintf( stderr, " total=%u", req->total );
4052 dump_varargs_unicode_str( ", target_name=", cur_size );
4055 static void dump_get_object_info_request( const struct get_object_info_request *req )
4057 fprintf( stderr, " handle=%04x", req->handle );
4060 static void dump_get_object_info_reply( const struct get_object_info_reply *req )
4062 fprintf( stderr, " access=%08x", req->access );
4063 fprintf( stderr, ", ref_count=%08x", req->ref_count );
4064 fprintf( stderr, ", handle_count=%08x", req->handle_count );
4067 static void dump_get_object_name_request( const struct get_object_name_request *req )
4069 fprintf( stderr, " handle=%04x", req->handle );
4072 static void dump_get_object_name_reply( const struct get_object_name_reply *req )
4074 fprintf( stderr, " total=%u", req->total );
4075 dump_varargs_unicode_str( ", name=", cur_size );
4078 static void dump_get_object_type_request( const struct get_object_type_request *req )
4080 fprintf( stderr, " handle=%04x", req->handle );
4083 static void dump_get_object_type_reply( const struct get_object_type_reply *req )
4085 dump_varargs_object_type_info( " info=", cur_size );
4088 static void dump_get_object_types_request( const struct get_object_types_request *req )
4092 static void dump_get_object_types_reply( const struct get_object_types_reply *req )
4094 fprintf( stderr, " count=%d", req->count );
4095 dump_varargs_object_types_info( ", info=", cur_size );
4098 static void dump_allocate_locally_unique_id_request( const struct allocate_locally_unique_id_request *req )
4102 static void dump_allocate_locally_unique_id_reply( const struct allocate_locally_unique_id_reply *req )
4104 dump_luid( " luid=", &req->luid );
4107 static void dump_create_device_manager_request( const struct create_device_manager_request *req )
4109 fprintf( stderr, " access=%08x", req->access );
4110 fprintf( stderr, ", attributes=%08x", req->attributes );
4113 static void dump_create_device_manager_reply( const struct create_device_manager_reply *req )
4115 fprintf( stderr, " handle=%04x", req->handle );
4118 static void dump_create_device_request( const struct create_device_request *req )
4120 fprintf( stderr, " rootdir=%04x", req->rootdir );
4121 dump_uint64( ", user_ptr=", &req->user_ptr );
4122 fprintf( stderr, ", manager=%04x", req->manager );
4123 dump_varargs_unicode_str( ", name=", cur_size );
4126 static void dump_delete_device_request( const struct delete_device_request *req )
4128 fprintf( stderr, " manager=%04x", req->manager );
4129 dump_uint64( ", device=", &req->device );
4132 static void dump_get_next_device_request_request( const struct get_next_device_request_request *req )
4134 fprintf( stderr, " manager=%04x", req->manager );
4135 fprintf( stderr, ", prev=%04x", req->prev );
4136 fprintf( stderr, ", status=%08x", req->status );
4137 dump_uint64( ", user_ptr=", &req->user_ptr );
4138 fprintf( stderr, ", pending=%d", req->pending );
4139 fprintf( stderr, ", iosb_status=%08x", req->iosb_status );
4140 fprintf( stderr, ", result=%u", req->result );
4141 dump_varargs_bytes( ", data=", cur_size );
4144 static void dump_get_next_device_request_reply( const struct get_next_device_request_reply *req )
4146 dump_irp_params( " params=", &req->params );
4147 fprintf( stderr, ", next=%04x", req->next );
4148 fprintf( stderr, ", client_tid=%04x", req->client_tid );
4149 dump_uint64( ", client_thread=", &req->client_thread );
4150 fprintf( stderr, ", in_size=%u", req->in_size );
4151 dump_varargs_bytes( ", next_data=", cur_size );
4154 static void dump_get_kernel_object_ptr_request( const struct get_kernel_object_ptr_request *req )
4156 fprintf( stderr, " manager=%04x", req->manager );
4157 fprintf( stderr, ", handle=%04x", req->handle );
4160 static void dump_get_kernel_object_ptr_reply( const struct get_kernel_object_ptr_reply *req )
4162 dump_uint64( " user_ptr=", &req->user_ptr );
4165 static void dump_set_kernel_object_ptr_request( const struct set_kernel_object_ptr_request *req )
4167 fprintf( stderr, " manager=%04x", req->manager );
4168 fprintf( stderr, ", handle=%04x", req->handle );
4169 dump_uint64( ", user_ptr=", &req->user_ptr );
4172 static void dump_grab_kernel_object_request( const struct grab_kernel_object_request *req )
4174 fprintf( stderr, " manager=%04x", req->manager );
4175 dump_uint64( ", user_ptr=", &req->user_ptr );
4178 static void dump_release_kernel_object_request( const struct release_kernel_object_request *req )
4180 fprintf( stderr, " manager=%04x", req->manager );
4181 dump_uint64( ", user_ptr=", &req->user_ptr );
4184 static void dump_get_kernel_object_handle_request( const struct get_kernel_object_handle_request *req )
4186 fprintf( stderr, " manager=%04x", req->manager );
4187 dump_uint64( ", user_ptr=", &req->user_ptr );
4188 fprintf( stderr, ", access=%08x", req->access );
4191 static void dump_get_kernel_object_handle_reply( const struct get_kernel_object_handle_reply *req )
4193 fprintf( stderr, " handle=%04x", req->handle );
4196 static void dump_make_process_system_request( const struct make_process_system_request *req )
4198 fprintf( stderr, " handle=%04x", req->handle );
4201 static void dump_make_process_system_reply( const struct make_process_system_reply *req )
4203 fprintf( stderr, " event=%04x", req->event );
4206 static void dump_get_token_info_request( const struct get_token_info_request *req )
4208 fprintf( stderr, " handle=%04x", req->handle );
4211 static void dump_get_token_info_reply( const struct get_token_info_reply *req )
4213 dump_luid( " token_id=", &req->token_id );
4214 dump_luid( ", modified_id=", &req->modified_id );
4215 fprintf( stderr, ", session_id=%08x", req->session_id );
4216 fprintf( stderr, ", primary=%d", req->primary );
4217 fprintf( stderr, ", impersonation_level=%d", req->impersonation_level );
4218 fprintf( stderr, ", elevation=%d", req->elevation );
4219 fprintf( stderr, ", group_count=%d", req->group_count );
4220 fprintf( stderr, ", privilege_count=%d", req->privilege_count );
4223 static void dump_create_linked_token_request( const struct create_linked_token_request *req )
4225 fprintf( stderr, " handle=%04x", req->handle );
4228 static void dump_create_linked_token_reply( const struct create_linked_token_reply *req )
4230 fprintf( stderr, " linked=%04x", req->linked );
4233 static void dump_create_completion_request( const struct create_completion_request *req )
4235 fprintf( stderr, " access=%08x", req->access );
4236 fprintf( stderr, ", concurrent=%08x", req->concurrent );
4237 dump_varargs_object_attributes( ", objattr=", cur_size );
4240 static void dump_create_completion_reply( const struct create_completion_reply *req )
4242 fprintf( stderr, " handle=%04x", req->handle );
4245 static void dump_open_completion_request( const struct open_completion_request *req )
4247 fprintf( stderr, " access=%08x", req->access );
4248 fprintf( stderr, ", attributes=%08x", req->attributes );
4249 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4250 dump_varargs_unicode_str( ", filename=", cur_size );
4253 static void dump_open_completion_reply( const struct open_completion_reply *req )
4255 fprintf( stderr, " handle=%04x", req->handle );
4258 static void dump_add_completion_request( const struct add_completion_request *req )
4260 fprintf( stderr, " handle=%04x", req->handle );
4261 dump_uint64( ", ckey=", &req->ckey );
4262 dump_uint64( ", cvalue=", &req->cvalue );
4263 dump_uint64( ", information=", &req->information );
4264 fprintf( stderr, ", status=%08x", req->status );
4267 static void dump_remove_completion_request( const struct remove_completion_request *req )
4269 fprintf( stderr, " handle=%04x", req->handle );
4272 static void dump_remove_completion_reply( const struct remove_completion_reply *req )
4274 dump_uint64( " ckey=", &req->ckey );
4275 dump_uint64( ", cvalue=", &req->cvalue );
4276 dump_uint64( ", information=", &req->information );
4277 fprintf( stderr, ", status=%08x", req->status );
4280 static void dump_query_completion_request( const struct query_completion_request *req )
4282 fprintf( stderr, " handle=%04x", req->handle );
4285 static void dump_query_completion_reply( const struct query_completion_reply *req )
4287 fprintf( stderr, " depth=%08x", req->depth );
4290 static void dump_set_completion_info_request( const struct set_completion_info_request *req )
4292 fprintf( stderr, " handle=%04x", req->handle );
4293 dump_uint64( ", ckey=", &req->ckey );
4294 fprintf( stderr, ", chandle=%04x", req->chandle );
4297 static void dump_add_fd_completion_request( const struct add_fd_completion_request *req )
4299 fprintf( stderr, " handle=%04x", req->handle );
4300 dump_uint64( ", cvalue=", &req->cvalue );
4301 dump_uint64( ", information=", &req->information );
4302 fprintf( stderr, ", status=%08x", req->status );
4303 fprintf( stderr, ", async=%d", req->async );
4306 static void dump_set_fd_completion_mode_request( const struct set_fd_completion_mode_request *req )
4308 fprintf( stderr, " handle=%04x", req->handle );
4309 fprintf( stderr, ", flags=%08x", req->flags );
4312 static void dump_set_fd_disp_info_request( const struct set_fd_disp_info_request *req )
4314 fprintf( stderr, " handle=%04x", req->handle );
4315 fprintf( stderr, ", unlink=%d", req->unlink );
4318 static void dump_set_fd_name_info_request( const struct set_fd_name_info_request *req )
4320 fprintf( stderr, " handle=%04x", req->handle );
4321 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4322 fprintf( stderr, ", namelen=%u", req->namelen );
4323 fprintf( stderr, ", link=%d", req->link );
4324 fprintf( stderr, ", replace=%d", req->replace );
4325 dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
4326 dump_varargs_string( ", filename=", cur_size );
4329 static void dump_set_fd_eof_info_request( const struct set_fd_eof_info_request *req )
4331 fprintf( stderr, " handle=%04x", req->handle );
4332 dump_uint64( ", eof=", &req->eof );
4335 static void dump_get_window_layered_info_request( const struct get_window_layered_info_request *req )
4337 fprintf( stderr, " handle=%08x", req->handle );
4340 static void dump_get_window_layered_info_reply( const struct get_window_layered_info_reply *req )
4342 fprintf( stderr, " color_key=%08x", req->color_key );
4343 fprintf( stderr, ", alpha=%08x", req->alpha );
4344 fprintf( stderr, ", flags=%08x", req->flags );
4347 static void dump_set_window_layered_info_request( const struct set_window_layered_info_request *req )
4349 fprintf( stderr, " handle=%08x", req->handle );
4350 fprintf( stderr, ", color_key=%08x", req->color_key );
4351 fprintf( stderr, ", alpha=%08x", req->alpha );
4352 fprintf( stderr, ", flags=%08x", req->flags );
4355 static void dump_alloc_user_handle_request( const struct alloc_user_handle_request *req )
4359 static void dump_alloc_user_handle_reply( const struct alloc_user_handle_reply *req )
4361 fprintf( stderr, " handle=%08x", req->handle );
4364 static void dump_free_user_handle_request( const struct free_user_handle_request *req )
4366 fprintf( stderr, " handle=%08x", req->handle );
4369 static void dump_set_cursor_request( const struct set_cursor_request *req )
4371 fprintf( stderr, " flags=%08x", req->flags );
4372 fprintf( stderr, ", handle=%08x", req->handle );
4373 fprintf( stderr, ", show_count=%d", req->show_count );
4374 fprintf( stderr, ", x=%d", req->x );
4375 fprintf( stderr, ", y=%d", req->y );
4376 dump_rectangle( ", clip=", &req->clip );
4377 fprintf( stderr, ", clip_msg=%08x", req->clip_msg );
4380 static void dump_set_cursor_reply( const struct set_cursor_reply *req )
4382 fprintf( stderr, " prev_handle=%08x", req->prev_handle );
4383 fprintf( stderr, ", prev_count=%d", req->prev_count );
4384 fprintf( stderr, ", prev_x=%d", req->prev_x );
4385 fprintf( stderr, ", prev_y=%d", req->prev_y );
4386 fprintf( stderr, ", new_x=%d", req->new_x );
4387 fprintf( stderr, ", new_y=%d", req->new_y );
4388 dump_rectangle( ", new_clip=", &req->new_clip );
4389 fprintf( stderr, ", last_change=%08x", req->last_change );
4392 static void dump_get_cursor_history_request( const struct get_cursor_history_request *req )
4396 static void dump_get_cursor_history_reply( const struct get_cursor_history_reply *req )
4398 dump_varargs_cursor_positions( " history=", cur_size );
4401 static void dump_get_rawinput_buffer_request( const struct get_rawinput_buffer_request *req )
4403 fprintf( stderr, " rawinput_size=%u", req->rawinput_size );
4404 fprintf( stderr, ", buffer_size=%u", req->buffer_size );
4407 static void dump_get_rawinput_buffer_reply( const struct get_rawinput_buffer_reply *req )
4409 fprintf( stderr, " next_size=%u", req->next_size );
4410 fprintf( stderr, ", count=%08x", req->count );
4411 dump_varargs_bytes( ", data=", cur_size );
4414 static void dump_update_rawinput_devices_request( const struct update_rawinput_devices_request *req )
4416 dump_varargs_rawinput_devices( " devices=", cur_size );
4419 static void dump_get_rawinput_devices_request( const struct get_rawinput_devices_request *req )
4423 static void dump_get_rawinput_devices_reply( const struct get_rawinput_devices_reply *req )
4425 fprintf( stderr, " device_count=%08x", req->device_count );
4426 dump_varargs_rawinput_devices( ", devices=", cur_size );
4429 static void dump_create_job_request( const struct create_job_request *req )
4431 fprintf( stderr, " access=%08x", req->access );
4432 dump_varargs_object_attributes( ", objattr=", cur_size );
4435 static void dump_create_job_reply( const struct create_job_reply *req )
4437 fprintf( stderr, " handle=%04x", req->handle );
4440 static void dump_open_job_request( const struct open_job_request *req )
4442 fprintf( stderr, " access=%08x", req->access );
4443 fprintf( stderr, ", attributes=%08x", req->attributes );
4444 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4445 dump_varargs_unicode_str( ", name=", cur_size );
4448 static void dump_open_job_reply( const struct open_job_reply *req )
4450 fprintf( stderr, " handle=%04x", req->handle );
4453 static void dump_assign_job_request( const struct assign_job_request *req )
4455 fprintf( stderr, " job=%04x", req->job );
4456 fprintf( stderr, ", process=%04x", req->process );
4459 static void dump_process_in_job_request( const struct process_in_job_request *req )
4461 fprintf( stderr, " job=%04x", req->job );
4462 fprintf( stderr, ", process=%04x", req->process );
4465 static void dump_set_job_limits_request( const struct set_job_limits_request *req )
4467 fprintf( stderr, " handle=%04x", req->handle );
4468 fprintf( stderr, ", limit_flags=%08x", req->limit_flags );
4471 static void dump_set_job_completion_port_request( const struct set_job_completion_port_request *req )
4473 fprintf( stderr, " job=%04x", req->job );
4474 fprintf( stderr, ", port=%04x", req->port );
4475 dump_uint64( ", key=", &req->key );
4478 static void dump_get_job_info_request( const struct get_job_info_request *req )
4480 fprintf( stderr, " handle=%04x", req->handle );
4483 static void dump_get_job_info_reply( const struct get_job_info_reply *req )
4485 fprintf( stderr, " total_processes=%d", req->total_processes );
4486 fprintf( stderr, ", active_processes=%d", req->active_processes );
4487 dump_varargs_uints( ", pids=", cur_size );
4490 static void dump_terminate_job_request( const struct terminate_job_request *req )
4492 fprintf( stderr, " handle=%04x", req->handle );
4493 fprintf( stderr, ", status=%d", req->status );
4496 static void dump_suspend_process_request( const struct suspend_process_request *req )
4498 fprintf( stderr, " handle=%04x", req->handle );
4501 static void dump_resume_process_request( const struct resume_process_request *req )
4503 fprintf( stderr, " handle=%04x", req->handle );
4506 static void dump_get_next_thread_request( const struct get_next_thread_request *req )
4508 fprintf( stderr, " process=%04x", req->process );
4509 fprintf( stderr, ", last=%04x", req->last );
4510 fprintf( stderr, ", access=%08x", req->access );
4511 fprintf( stderr, ", attributes=%08x", req->attributes );
4512 fprintf( stderr, ", flags=%08x", req->flags );
4515 static void dump_get_next_thread_reply( const struct get_next_thread_reply *req )
4517 fprintf( stderr, " handle=%04x", req->handle );
4520 static const dump_func req_dumpers[REQ_NB_REQUESTS] = {
4521 (dump_func)dump_new_process_request,
4522 (dump_func)dump_get_new_process_info_request,
4523 (dump_func)dump_new_thread_request,
4524 (dump_func)dump_get_startup_info_request,
4525 (dump_func)dump_init_process_done_request,
4526 (dump_func)dump_init_first_thread_request,
4527 (dump_func)dump_init_thread_request,
4528 (dump_func)dump_terminate_process_request,
4529 (dump_func)dump_terminate_thread_request,
4530 (dump_func)dump_get_process_info_request,
4531 (dump_func)dump_get_process_debug_info_request,
4532 (dump_func)dump_get_process_image_name_request,
4533 (dump_func)dump_get_process_vm_counters_request,
4534 (dump_func)dump_set_process_info_request,
4535 (dump_func)dump_get_thread_info_request,
4536 (dump_func)dump_get_thread_times_request,
4537 (dump_func)dump_set_thread_info_request,
4538 (dump_func)dump_suspend_thread_request,
4539 (dump_func)dump_resume_thread_request,
4540 (dump_func)dump_queue_apc_request,
4541 (dump_func)dump_get_apc_result_request,
4542 (dump_func)dump_close_handle_request,
4543 (dump_func)dump_set_handle_info_request,
4544 (dump_func)dump_dup_handle_request,
4545 (dump_func)dump_compare_objects_request,
4546 (dump_func)dump_make_temporary_request,
4547 (dump_func)dump_open_process_request,
4548 (dump_func)dump_open_thread_request,
4549 (dump_func)dump_select_request,
4550 (dump_func)dump_create_event_request,
4551 (dump_func)dump_event_op_request,
4552 (dump_func)dump_query_event_request,
4553 (dump_func)dump_open_event_request,
4554 (dump_func)dump_create_keyed_event_request,
4555 (dump_func)dump_open_keyed_event_request,
4556 (dump_func)dump_create_mutex_request,
4557 (dump_func)dump_release_mutex_request,
4558 (dump_func)dump_open_mutex_request,
4559 (dump_func)dump_query_mutex_request,
4560 (dump_func)dump_create_semaphore_request,
4561 (dump_func)dump_release_semaphore_request,
4562 (dump_func)dump_query_semaphore_request,
4563 (dump_func)dump_open_semaphore_request,
4564 (dump_func)dump_create_file_request,
4565 (dump_func)dump_open_file_object_request,
4566 (dump_func)dump_alloc_file_handle_request,
4567 (dump_func)dump_get_handle_unix_name_request,
4568 (dump_func)dump_get_handle_fd_request,
4569 (dump_func)dump_get_directory_cache_entry_request,
4570 (dump_func)dump_flush_request,
4571 (dump_func)dump_get_file_info_request,
4572 (dump_func)dump_get_volume_info_request,
4573 (dump_func)dump_lock_file_request,
4574 (dump_func)dump_unlock_file_request,
4575 (dump_func)dump_recv_socket_request,
4576 (dump_func)dump_send_socket_request,
4577 (dump_func)dump_get_next_console_request_request,
4578 (dump_func)dump_read_directory_changes_request,
4579 (dump_func)dump_read_change_request,
4580 (dump_func)dump_create_mapping_request,
4581 (dump_func)dump_open_mapping_request,
4582 (dump_func)dump_get_mapping_info_request,
4583 (dump_func)dump_map_view_request,
4584 (dump_func)dump_unmap_view_request,
4585 (dump_func)dump_get_mapping_committed_range_request,
4586 (dump_func)dump_add_mapping_committed_range_request,
4587 (dump_func)dump_is_same_mapping_request,
4588 (dump_func)dump_get_mapping_filename_request,
4589 (dump_func)dump_list_processes_request,
4590 (dump_func)dump_create_debug_obj_request,
4591 (dump_func)dump_wait_debug_event_request,
4592 (dump_func)dump_queue_exception_event_request,
4593 (dump_func)dump_get_exception_status_request,
4594 (dump_func)dump_continue_debug_event_request,
4595 (dump_func)dump_debug_process_request,
4596 (dump_func)dump_set_debug_obj_info_request,
4597 (dump_func)dump_read_process_memory_request,
4598 (dump_func)dump_write_process_memory_request,
4599 (dump_func)dump_create_key_request,
4600 (dump_func)dump_open_key_request,
4601 (dump_func)dump_delete_key_request,
4602 (dump_func)dump_flush_key_request,
4603 (dump_func)dump_enum_key_request,
4604 (dump_func)dump_set_key_value_request,
4605 (dump_func)dump_get_key_value_request,
4606 (dump_func)dump_enum_key_value_request,
4607 (dump_func)dump_delete_key_value_request,
4608 (dump_func)dump_load_registry_request,
4609 (dump_func)dump_unload_registry_request,
4610 (dump_func)dump_save_registry_request,
4611 (dump_func)dump_set_registry_notification_request,
4612 (dump_func)dump_create_timer_request,
4613 (dump_func)dump_open_timer_request,
4614 (dump_func)dump_set_timer_request,
4615 (dump_func)dump_cancel_timer_request,
4616 (dump_func)dump_get_timer_info_request,
4617 (dump_func)dump_get_thread_context_request,
4618 (dump_func)dump_set_thread_context_request,
4619 (dump_func)dump_get_selector_entry_request,
4620 (dump_func)dump_add_atom_request,
4621 (dump_func)dump_delete_atom_request,
4622 (dump_func)dump_find_atom_request,
4623 (dump_func)dump_get_atom_information_request,
4624 (dump_func)dump_get_msg_queue_request,
4625 (dump_func)dump_set_queue_fd_request,
4626 (dump_func)dump_set_queue_mask_request,
4627 (dump_func)dump_get_queue_status_request,
4628 (dump_func)dump_get_process_idle_event_request,
4629 (dump_func)dump_send_message_request,
4630 (dump_func)dump_post_quit_message_request,
4631 (dump_func)dump_send_hardware_message_request,
4632 (dump_func)dump_get_message_request,
4633 (dump_func)dump_reply_message_request,
4634 (dump_func)dump_accept_hardware_message_request,
4635 (dump_func)dump_get_message_reply_request,
4636 (dump_func)dump_set_win_timer_request,
4637 (dump_func)dump_kill_win_timer_request,
4638 (dump_func)dump_is_window_hung_request,
4639 (dump_func)dump_get_serial_info_request,
4640 (dump_func)dump_set_serial_info_request,
4641 (dump_func)dump_register_async_request,
4642 (dump_func)dump_cancel_async_request,
4643 (dump_func)dump_get_async_result_request,
4644 (dump_func)dump_read_request,
4645 (dump_func)dump_write_request,
4646 (dump_func)dump_ioctl_request,
4647 (dump_func)dump_set_irp_result_request,
4648 (dump_func)dump_create_named_pipe_request,
4649 (dump_func)dump_set_named_pipe_info_request,
4650 (dump_func)dump_create_window_request,
4651 (dump_func)dump_destroy_window_request,
4652 (dump_func)dump_get_desktop_window_request,
4653 (dump_func)dump_set_window_owner_request,
4654 (dump_func)dump_get_window_info_request,
4655 (dump_func)dump_set_window_info_request,
4656 (dump_func)dump_set_parent_request,
4657 (dump_func)dump_get_window_parents_request,
4658 (dump_func)dump_get_window_children_request,
4659 (dump_func)dump_get_window_children_from_point_request,
4660 (dump_func)dump_get_window_tree_request,
4661 (dump_func)dump_set_window_pos_request,
4662 (dump_func)dump_get_window_rectangles_request,
4663 (dump_func)dump_get_window_text_request,
4664 (dump_func)dump_set_window_text_request,
4665 (dump_func)dump_get_windows_offset_request,
4666 (dump_func)dump_get_visible_region_request,
4667 (dump_func)dump_get_surface_region_request,
4668 (dump_func)dump_get_window_region_request,
4669 (dump_func)dump_set_window_region_request,
4670 (dump_func)dump_get_update_region_request,
4671 (dump_func)dump_update_window_zorder_request,
4672 (dump_func)dump_redraw_window_request,
4673 (dump_func)dump_set_window_property_request,
4674 (dump_func)dump_remove_window_property_request,
4675 (dump_func)dump_get_window_property_request,
4676 (dump_func)dump_get_window_properties_request,
4677 (dump_func)dump_create_winstation_request,
4678 (dump_func)dump_open_winstation_request,
4679 (dump_func)dump_close_winstation_request,
4680 (dump_func)dump_get_process_winstation_request,
4681 (dump_func)dump_set_process_winstation_request,
4682 (dump_func)dump_enum_winstation_request,
4683 (dump_func)dump_create_desktop_request,
4684 (dump_func)dump_open_desktop_request,
4685 (dump_func)dump_open_input_desktop_request,
4686 (dump_func)dump_close_desktop_request,
4687 (dump_func)dump_get_thread_desktop_request,
4688 (dump_func)dump_set_thread_desktop_request,
4689 (dump_func)dump_enum_desktop_request,
4690 (dump_func)dump_set_user_object_info_request,
4691 (dump_func)dump_register_hotkey_request,
4692 (dump_func)dump_unregister_hotkey_request,
4693 (dump_func)dump_attach_thread_input_request,
4694 (dump_func)dump_get_thread_input_request,
4695 (dump_func)dump_get_last_input_time_request,
4696 (dump_func)dump_get_key_state_request,
4697 (dump_func)dump_set_key_state_request,
4698 (dump_func)dump_set_foreground_window_request,
4699 (dump_func)dump_set_focus_window_request,
4700 (dump_func)dump_set_active_window_request,
4701 (dump_func)dump_set_capture_window_request,
4702 (dump_func)dump_set_caret_window_request,
4703 (dump_func)dump_set_caret_info_request,
4704 (dump_func)dump_set_hook_request,
4705 (dump_func)dump_remove_hook_request,
4706 (dump_func)dump_start_hook_chain_request,
4707 (dump_func)dump_finish_hook_chain_request,
4708 (dump_func)dump_get_hook_info_request,
4709 (dump_func)dump_create_class_request,
4710 (dump_func)dump_destroy_class_request,
4711 (dump_func)dump_set_class_info_request,
4712 (dump_func)dump_open_clipboard_request,
4713 (dump_func)dump_close_clipboard_request,
4714 (dump_func)dump_empty_clipboard_request,
4715 (dump_func)dump_set_clipboard_data_request,
4716 (dump_func)dump_get_clipboard_data_request,
4717 (dump_func)dump_get_clipboard_formats_request,
4718 (dump_func)dump_enum_clipboard_formats_request,
4719 (dump_func)dump_release_clipboard_request,
4720 (dump_func)dump_get_clipboard_info_request,
4721 (dump_func)dump_set_clipboard_viewer_request,
4722 (dump_func)dump_add_clipboard_listener_request,
4723 (dump_func)dump_remove_clipboard_listener_request,
4724 (dump_func)dump_open_token_request,
4725 (dump_func)dump_set_global_windows_request,
4726 (dump_func)dump_adjust_token_privileges_request,
4727 (dump_func)dump_get_token_privileges_request,
4728 (dump_func)dump_check_token_privileges_request,
4729 (dump_func)dump_duplicate_token_request,
4730 (dump_func)dump_filter_token_request,
4731 (dump_func)dump_access_check_request,
4732 (dump_func)dump_get_token_sid_request,
4733 (dump_func)dump_get_token_groups_request,
4734 (dump_func)dump_get_token_default_dacl_request,
4735 (dump_func)dump_set_token_default_dacl_request,
4736 (dump_func)dump_set_security_object_request,
4737 (dump_func)dump_get_security_object_request,
4738 (dump_func)dump_get_system_handles_request,
4739 (dump_func)dump_create_mailslot_request,
4740 (dump_func)dump_set_mailslot_info_request,
4741 (dump_func)dump_create_directory_request,
4742 (dump_func)dump_open_directory_request,
4743 (dump_func)dump_get_directory_entry_request,
4744 (dump_func)dump_create_symlink_request,
4745 (dump_func)dump_open_symlink_request,
4746 (dump_func)dump_query_symlink_request,
4747 (dump_func)dump_get_object_info_request,
4748 (dump_func)dump_get_object_name_request,
4749 (dump_func)dump_get_object_type_request,
4750 (dump_func)dump_get_object_types_request,
4751 (dump_func)dump_allocate_locally_unique_id_request,
4752 (dump_func)dump_create_device_manager_request,
4753 (dump_func)dump_create_device_request,
4754 (dump_func)dump_delete_device_request,
4755 (dump_func)dump_get_next_device_request_request,
4756 (dump_func)dump_get_kernel_object_ptr_request,
4757 (dump_func)dump_set_kernel_object_ptr_request,
4758 (dump_func)dump_grab_kernel_object_request,
4759 (dump_func)dump_release_kernel_object_request,
4760 (dump_func)dump_get_kernel_object_handle_request,
4761 (dump_func)dump_make_process_system_request,
4762 (dump_func)dump_get_token_info_request,
4763 (dump_func)dump_create_linked_token_request,
4764 (dump_func)dump_create_completion_request,
4765 (dump_func)dump_open_completion_request,
4766 (dump_func)dump_add_completion_request,
4767 (dump_func)dump_remove_completion_request,
4768 (dump_func)dump_query_completion_request,
4769 (dump_func)dump_set_completion_info_request,
4770 (dump_func)dump_add_fd_completion_request,
4771 (dump_func)dump_set_fd_completion_mode_request,
4772 (dump_func)dump_set_fd_disp_info_request,
4773 (dump_func)dump_set_fd_name_info_request,
4774 (dump_func)dump_set_fd_eof_info_request,
4775 (dump_func)dump_get_window_layered_info_request,
4776 (dump_func)dump_set_window_layered_info_request,
4777 (dump_func)dump_alloc_user_handle_request,
4778 (dump_func)dump_free_user_handle_request,
4779 (dump_func)dump_set_cursor_request,
4780 (dump_func)dump_get_cursor_history_request,
4781 (dump_func)dump_get_rawinput_buffer_request,
4782 (dump_func)dump_update_rawinput_devices_request,
4783 (dump_func)dump_get_rawinput_devices_request,
4784 (dump_func)dump_create_job_request,
4785 (dump_func)dump_open_job_request,
4786 (dump_func)dump_assign_job_request,
4787 (dump_func)dump_process_in_job_request,
4788 (dump_func)dump_set_job_limits_request,
4789 (dump_func)dump_set_job_completion_port_request,
4790 (dump_func)dump_get_job_info_request,
4791 (dump_func)dump_terminate_job_request,
4792 (dump_func)dump_suspend_process_request,
4793 (dump_func)dump_resume_process_request,
4794 (dump_func)dump_get_next_thread_request,
4797 static const dump_func reply_dumpers[REQ_NB_REQUESTS] = {
4798 (dump_func)dump_new_process_reply,
4799 (dump_func)dump_get_new_process_info_reply,
4800 (dump_func)dump_new_thread_reply,
4801 (dump_func)dump_get_startup_info_reply,
4802 (dump_func)dump_init_process_done_reply,
4803 (dump_func)dump_init_first_thread_reply,
4804 (dump_func)dump_init_thread_reply,
4805 (dump_func)dump_terminate_process_reply,
4806 (dump_func)dump_terminate_thread_reply,
4807 (dump_func)dump_get_process_info_reply,
4808 (dump_func)dump_get_process_debug_info_reply,
4809 (dump_func)dump_get_process_image_name_reply,
4810 (dump_func)dump_get_process_vm_counters_reply,
4811 NULL,
4812 (dump_func)dump_get_thread_info_reply,
4813 (dump_func)dump_get_thread_times_reply,
4814 NULL,
4815 (dump_func)dump_suspend_thread_reply,
4816 (dump_func)dump_resume_thread_reply,
4817 (dump_func)dump_queue_apc_reply,
4818 (dump_func)dump_get_apc_result_reply,
4819 NULL,
4820 (dump_func)dump_set_handle_info_reply,
4821 (dump_func)dump_dup_handle_reply,
4822 NULL,
4823 NULL,
4824 (dump_func)dump_open_process_reply,
4825 (dump_func)dump_open_thread_reply,
4826 (dump_func)dump_select_reply,
4827 (dump_func)dump_create_event_reply,
4828 (dump_func)dump_event_op_reply,
4829 (dump_func)dump_query_event_reply,
4830 (dump_func)dump_open_event_reply,
4831 (dump_func)dump_create_keyed_event_reply,
4832 (dump_func)dump_open_keyed_event_reply,
4833 (dump_func)dump_create_mutex_reply,
4834 (dump_func)dump_release_mutex_reply,
4835 (dump_func)dump_open_mutex_reply,
4836 (dump_func)dump_query_mutex_reply,
4837 (dump_func)dump_create_semaphore_reply,
4838 (dump_func)dump_release_semaphore_reply,
4839 (dump_func)dump_query_semaphore_reply,
4840 (dump_func)dump_open_semaphore_reply,
4841 (dump_func)dump_create_file_reply,
4842 (dump_func)dump_open_file_object_reply,
4843 (dump_func)dump_alloc_file_handle_reply,
4844 (dump_func)dump_get_handle_unix_name_reply,
4845 (dump_func)dump_get_handle_fd_reply,
4846 (dump_func)dump_get_directory_cache_entry_reply,
4847 (dump_func)dump_flush_reply,
4848 (dump_func)dump_get_file_info_reply,
4849 (dump_func)dump_get_volume_info_reply,
4850 (dump_func)dump_lock_file_reply,
4851 NULL,
4852 (dump_func)dump_recv_socket_reply,
4853 (dump_func)dump_send_socket_reply,
4854 (dump_func)dump_get_next_console_request_reply,
4855 NULL,
4856 (dump_func)dump_read_change_reply,
4857 (dump_func)dump_create_mapping_reply,
4858 (dump_func)dump_open_mapping_reply,
4859 (dump_func)dump_get_mapping_info_reply,
4860 NULL,
4861 NULL,
4862 (dump_func)dump_get_mapping_committed_range_reply,
4863 NULL,
4864 NULL,
4865 (dump_func)dump_get_mapping_filename_reply,
4866 (dump_func)dump_list_processes_reply,
4867 (dump_func)dump_create_debug_obj_reply,
4868 (dump_func)dump_wait_debug_event_reply,
4869 (dump_func)dump_queue_exception_event_reply,
4870 NULL,
4871 NULL,
4872 NULL,
4873 NULL,
4874 (dump_func)dump_read_process_memory_reply,
4875 NULL,
4876 (dump_func)dump_create_key_reply,
4877 (dump_func)dump_open_key_reply,
4878 NULL,
4879 NULL,
4880 (dump_func)dump_enum_key_reply,
4881 NULL,
4882 (dump_func)dump_get_key_value_reply,
4883 (dump_func)dump_enum_key_value_reply,
4884 NULL,
4885 NULL,
4886 NULL,
4887 NULL,
4888 NULL,
4889 (dump_func)dump_create_timer_reply,
4890 (dump_func)dump_open_timer_reply,
4891 (dump_func)dump_set_timer_reply,
4892 (dump_func)dump_cancel_timer_reply,
4893 (dump_func)dump_get_timer_info_reply,
4894 (dump_func)dump_get_thread_context_reply,
4895 (dump_func)dump_set_thread_context_reply,
4896 (dump_func)dump_get_selector_entry_reply,
4897 (dump_func)dump_add_atom_reply,
4898 NULL,
4899 (dump_func)dump_find_atom_reply,
4900 (dump_func)dump_get_atom_information_reply,
4901 (dump_func)dump_get_msg_queue_reply,
4902 NULL,
4903 (dump_func)dump_set_queue_mask_reply,
4904 (dump_func)dump_get_queue_status_reply,
4905 (dump_func)dump_get_process_idle_event_reply,
4906 NULL,
4907 NULL,
4908 (dump_func)dump_send_hardware_message_reply,
4909 (dump_func)dump_get_message_reply,
4910 NULL,
4911 NULL,
4912 (dump_func)dump_get_message_reply_reply,
4913 (dump_func)dump_set_win_timer_reply,
4914 NULL,
4915 (dump_func)dump_is_window_hung_reply,
4916 (dump_func)dump_get_serial_info_reply,
4917 NULL,
4918 NULL,
4919 NULL,
4920 (dump_func)dump_get_async_result_reply,
4921 (dump_func)dump_read_reply,
4922 (dump_func)dump_write_reply,
4923 (dump_func)dump_ioctl_reply,
4924 NULL,
4925 (dump_func)dump_create_named_pipe_reply,
4926 NULL,
4927 (dump_func)dump_create_window_reply,
4928 NULL,
4929 (dump_func)dump_get_desktop_window_reply,
4930 (dump_func)dump_set_window_owner_reply,
4931 (dump_func)dump_get_window_info_reply,
4932 (dump_func)dump_set_window_info_reply,
4933 (dump_func)dump_set_parent_reply,
4934 (dump_func)dump_get_window_parents_reply,
4935 (dump_func)dump_get_window_children_reply,
4936 (dump_func)dump_get_window_children_from_point_reply,
4937 (dump_func)dump_get_window_tree_reply,
4938 (dump_func)dump_set_window_pos_reply,
4939 (dump_func)dump_get_window_rectangles_reply,
4940 (dump_func)dump_get_window_text_reply,
4941 NULL,
4942 (dump_func)dump_get_windows_offset_reply,
4943 (dump_func)dump_get_visible_region_reply,
4944 (dump_func)dump_get_surface_region_reply,
4945 (dump_func)dump_get_window_region_reply,
4946 NULL,
4947 (dump_func)dump_get_update_region_reply,
4948 NULL,
4949 NULL,
4950 NULL,
4951 (dump_func)dump_remove_window_property_reply,
4952 (dump_func)dump_get_window_property_reply,
4953 (dump_func)dump_get_window_properties_reply,
4954 (dump_func)dump_create_winstation_reply,
4955 (dump_func)dump_open_winstation_reply,
4956 NULL,
4957 (dump_func)dump_get_process_winstation_reply,
4958 NULL,
4959 (dump_func)dump_enum_winstation_reply,
4960 (dump_func)dump_create_desktop_reply,
4961 (dump_func)dump_open_desktop_reply,
4962 (dump_func)dump_open_input_desktop_reply,
4963 NULL,
4964 (dump_func)dump_get_thread_desktop_reply,
4965 NULL,
4966 (dump_func)dump_enum_desktop_reply,
4967 (dump_func)dump_set_user_object_info_reply,
4968 (dump_func)dump_register_hotkey_reply,
4969 (dump_func)dump_unregister_hotkey_reply,
4970 NULL,
4971 (dump_func)dump_get_thread_input_reply,
4972 (dump_func)dump_get_last_input_time_reply,
4973 (dump_func)dump_get_key_state_reply,
4974 NULL,
4975 (dump_func)dump_set_foreground_window_reply,
4976 (dump_func)dump_set_focus_window_reply,
4977 (dump_func)dump_set_active_window_reply,
4978 (dump_func)dump_set_capture_window_reply,
4979 (dump_func)dump_set_caret_window_reply,
4980 (dump_func)dump_set_caret_info_reply,
4981 (dump_func)dump_set_hook_reply,
4982 (dump_func)dump_remove_hook_reply,
4983 (dump_func)dump_start_hook_chain_reply,
4984 NULL,
4985 (dump_func)dump_get_hook_info_reply,
4986 (dump_func)dump_create_class_reply,
4987 (dump_func)dump_destroy_class_reply,
4988 (dump_func)dump_set_class_info_reply,
4989 (dump_func)dump_open_clipboard_reply,
4990 (dump_func)dump_close_clipboard_reply,
4991 NULL,
4992 (dump_func)dump_set_clipboard_data_reply,
4993 (dump_func)dump_get_clipboard_data_reply,
4994 (dump_func)dump_get_clipboard_formats_reply,
4995 (dump_func)dump_enum_clipboard_formats_reply,
4996 (dump_func)dump_release_clipboard_reply,
4997 (dump_func)dump_get_clipboard_info_reply,
4998 (dump_func)dump_set_clipboard_viewer_reply,
4999 NULL,
5000 NULL,
5001 (dump_func)dump_open_token_reply,
5002 (dump_func)dump_set_global_windows_reply,
5003 (dump_func)dump_adjust_token_privileges_reply,
5004 (dump_func)dump_get_token_privileges_reply,
5005 (dump_func)dump_check_token_privileges_reply,
5006 (dump_func)dump_duplicate_token_reply,
5007 (dump_func)dump_filter_token_reply,
5008 (dump_func)dump_access_check_reply,
5009 (dump_func)dump_get_token_sid_reply,
5010 (dump_func)dump_get_token_groups_reply,
5011 (dump_func)dump_get_token_default_dacl_reply,
5012 NULL,
5013 NULL,
5014 (dump_func)dump_get_security_object_reply,
5015 (dump_func)dump_get_system_handles_reply,
5016 (dump_func)dump_create_mailslot_reply,
5017 (dump_func)dump_set_mailslot_info_reply,
5018 (dump_func)dump_create_directory_reply,
5019 (dump_func)dump_open_directory_reply,
5020 (dump_func)dump_get_directory_entry_reply,
5021 (dump_func)dump_create_symlink_reply,
5022 (dump_func)dump_open_symlink_reply,
5023 (dump_func)dump_query_symlink_reply,
5024 (dump_func)dump_get_object_info_reply,
5025 (dump_func)dump_get_object_name_reply,
5026 (dump_func)dump_get_object_type_reply,
5027 (dump_func)dump_get_object_types_reply,
5028 (dump_func)dump_allocate_locally_unique_id_reply,
5029 (dump_func)dump_create_device_manager_reply,
5030 NULL,
5031 NULL,
5032 (dump_func)dump_get_next_device_request_reply,
5033 (dump_func)dump_get_kernel_object_ptr_reply,
5034 NULL,
5035 NULL,
5036 NULL,
5037 (dump_func)dump_get_kernel_object_handle_reply,
5038 (dump_func)dump_make_process_system_reply,
5039 (dump_func)dump_get_token_info_reply,
5040 (dump_func)dump_create_linked_token_reply,
5041 (dump_func)dump_create_completion_reply,
5042 (dump_func)dump_open_completion_reply,
5043 NULL,
5044 (dump_func)dump_remove_completion_reply,
5045 (dump_func)dump_query_completion_reply,
5046 NULL,
5047 NULL,
5048 NULL,
5049 NULL,
5050 NULL,
5051 NULL,
5052 (dump_func)dump_get_window_layered_info_reply,
5053 NULL,
5054 (dump_func)dump_alloc_user_handle_reply,
5055 NULL,
5056 (dump_func)dump_set_cursor_reply,
5057 (dump_func)dump_get_cursor_history_reply,
5058 (dump_func)dump_get_rawinput_buffer_reply,
5059 NULL,
5060 (dump_func)dump_get_rawinput_devices_reply,
5061 (dump_func)dump_create_job_reply,
5062 (dump_func)dump_open_job_reply,
5063 NULL,
5064 NULL,
5065 NULL,
5066 NULL,
5067 (dump_func)dump_get_job_info_reply,
5068 NULL,
5069 NULL,
5070 NULL,
5071 (dump_func)dump_get_next_thread_reply,
5074 static const char * const req_names[REQ_NB_REQUESTS] = {
5075 "new_process",
5076 "get_new_process_info",
5077 "new_thread",
5078 "get_startup_info",
5079 "init_process_done",
5080 "init_first_thread",
5081 "init_thread",
5082 "terminate_process",
5083 "terminate_thread",
5084 "get_process_info",
5085 "get_process_debug_info",
5086 "get_process_image_name",
5087 "get_process_vm_counters",
5088 "set_process_info",
5089 "get_thread_info",
5090 "get_thread_times",
5091 "set_thread_info",
5092 "suspend_thread",
5093 "resume_thread",
5094 "queue_apc",
5095 "get_apc_result",
5096 "close_handle",
5097 "set_handle_info",
5098 "dup_handle",
5099 "compare_objects",
5100 "make_temporary",
5101 "open_process",
5102 "open_thread",
5103 "select",
5104 "create_event",
5105 "event_op",
5106 "query_event",
5107 "open_event",
5108 "create_keyed_event",
5109 "open_keyed_event",
5110 "create_mutex",
5111 "release_mutex",
5112 "open_mutex",
5113 "query_mutex",
5114 "create_semaphore",
5115 "release_semaphore",
5116 "query_semaphore",
5117 "open_semaphore",
5118 "create_file",
5119 "open_file_object",
5120 "alloc_file_handle",
5121 "get_handle_unix_name",
5122 "get_handle_fd",
5123 "get_directory_cache_entry",
5124 "flush",
5125 "get_file_info",
5126 "get_volume_info",
5127 "lock_file",
5128 "unlock_file",
5129 "recv_socket",
5130 "send_socket",
5131 "get_next_console_request",
5132 "read_directory_changes",
5133 "read_change",
5134 "create_mapping",
5135 "open_mapping",
5136 "get_mapping_info",
5137 "map_view",
5138 "unmap_view",
5139 "get_mapping_committed_range",
5140 "add_mapping_committed_range",
5141 "is_same_mapping",
5142 "get_mapping_filename",
5143 "list_processes",
5144 "create_debug_obj",
5145 "wait_debug_event",
5146 "queue_exception_event",
5147 "get_exception_status",
5148 "continue_debug_event",
5149 "debug_process",
5150 "set_debug_obj_info",
5151 "read_process_memory",
5152 "write_process_memory",
5153 "create_key",
5154 "open_key",
5155 "delete_key",
5156 "flush_key",
5157 "enum_key",
5158 "set_key_value",
5159 "get_key_value",
5160 "enum_key_value",
5161 "delete_key_value",
5162 "load_registry",
5163 "unload_registry",
5164 "save_registry",
5165 "set_registry_notification",
5166 "create_timer",
5167 "open_timer",
5168 "set_timer",
5169 "cancel_timer",
5170 "get_timer_info",
5171 "get_thread_context",
5172 "set_thread_context",
5173 "get_selector_entry",
5174 "add_atom",
5175 "delete_atom",
5176 "find_atom",
5177 "get_atom_information",
5178 "get_msg_queue",
5179 "set_queue_fd",
5180 "set_queue_mask",
5181 "get_queue_status",
5182 "get_process_idle_event",
5183 "send_message",
5184 "post_quit_message",
5185 "send_hardware_message",
5186 "get_message",
5187 "reply_message",
5188 "accept_hardware_message",
5189 "get_message_reply",
5190 "set_win_timer",
5191 "kill_win_timer",
5192 "is_window_hung",
5193 "get_serial_info",
5194 "set_serial_info",
5195 "register_async",
5196 "cancel_async",
5197 "get_async_result",
5198 "read",
5199 "write",
5200 "ioctl",
5201 "set_irp_result",
5202 "create_named_pipe",
5203 "set_named_pipe_info",
5204 "create_window",
5205 "destroy_window",
5206 "get_desktop_window",
5207 "set_window_owner",
5208 "get_window_info",
5209 "set_window_info",
5210 "set_parent",
5211 "get_window_parents",
5212 "get_window_children",
5213 "get_window_children_from_point",
5214 "get_window_tree",
5215 "set_window_pos",
5216 "get_window_rectangles",
5217 "get_window_text",
5218 "set_window_text",
5219 "get_windows_offset",
5220 "get_visible_region",
5221 "get_surface_region",
5222 "get_window_region",
5223 "set_window_region",
5224 "get_update_region",
5225 "update_window_zorder",
5226 "redraw_window",
5227 "set_window_property",
5228 "remove_window_property",
5229 "get_window_property",
5230 "get_window_properties",
5231 "create_winstation",
5232 "open_winstation",
5233 "close_winstation",
5234 "get_process_winstation",
5235 "set_process_winstation",
5236 "enum_winstation",
5237 "create_desktop",
5238 "open_desktop",
5239 "open_input_desktop",
5240 "close_desktop",
5241 "get_thread_desktop",
5242 "set_thread_desktop",
5243 "enum_desktop",
5244 "set_user_object_info",
5245 "register_hotkey",
5246 "unregister_hotkey",
5247 "attach_thread_input",
5248 "get_thread_input",
5249 "get_last_input_time",
5250 "get_key_state",
5251 "set_key_state",
5252 "set_foreground_window",
5253 "set_focus_window",
5254 "set_active_window",
5255 "set_capture_window",
5256 "set_caret_window",
5257 "set_caret_info",
5258 "set_hook",
5259 "remove_hook",
5260 "start_hook_chain",
5261 "finish_hook_chain",
5262 "get_hook_info",
5263 "create_class",
5264 "destroy_class",
5265 "set_class_info",
5266 "open_clipboard",
5267 "close_clipboard",
5268 "empty_clipboard",
5269 "set_clipboard_data",
5270 "get_clipboard_data",
5271 "get_clipboard_formats",
5272 "enum_clipboard_formats",
5273 "release_clipboard",
5274 "get_clipboard_info",
5275 "set_clipboard_viewer",
5276 "add_clipboard_listener",
5277 "remove_clipboard_listener",
5278 "open_token",
5279 "set_global_windows",
5280 "adjust_token_privileges",
5281 "get_token_privileges",
5282 "check_token_privileges",
5283 "duplicate_token",
5284 "filter_token",
5285 "access_check",
5286 "get_token_sid",
5287 "get_token_groups",
5288 "get_token_default_dacl",
5289 "set_token_default_dacl",
5290 "set_security_object",
5291 "get_security_object",
5292 "get_system_handles",
5293 "create_mailslot",
5294 "set_mailslot_info",
5295 "create_directory",
5296 "open_directory",
5297 "get_directory_entry",
5298 "create_symlink",
5299 "open_symlink",
5300 "query_symlink",
5301 "get_object_info",
5302 "get_object_name",
5303 "get_object_type",
5304 "get_object_types",
5305 "allocate_locally_unique_id",
5306 "create_device_manager",
5307 "create_device",
5308 "delete_device",
5309 "get_next_device_request",
5310 "get_kernel_object_ptr",
5311 "set_kernel_object_ptr",
5312 "grab_kernel_object",
5313 "release_kernel_object",
5314 "get_kernel_object_handle",
5315 "make_process_system",
5316 "get_token_info",
5317 "create_linked_token",
5318 "create_completion",
5319 "open_completion",
5320 "add_completion",
5321 "remove_completion",
5322 "query_completion",
5323 "set_completion_info",
5324 "add_fd_completion",
5325 "set_fd_completion_mode",
5326 "set_fd_disp_info",
5327 "set_fd_name_info",
5328 "set_fd_eof_info",
5329 "get_window_layered_info",
5330 "set_window_layered_info",
5331 "alloc_user_handle",
5332 "free_user_handle",
5333 "set_cursor",
5334 "get_cursor_history",
5335 "get_rawinput_buffer",
5336 "update_rawinput_devices",
5337 "get_rawinput_devices",
5338 "create_job",
5339 "open_job",
5340 "assign_job",
5341 "process_in_job",
5342 "set_job_limits",
5343 "set_job_completion_port",
5344 "get_job_info",
5345 "terminate_job",
5346 "suspend_process",
5347 "resume_process",
5348 "get_next_thread",
5351 static const struct
5353 const char *name;
5354 unsigned int value;
5355 } status_names[] =
5357 { "ABANDONED_WAIT_0", STATUS_ABANDONED_WAIT_0 },
5358 { "ACCESS_DENIED", STATUS_ACCESS_DENIED },
5359 { "ACCESS_VIOLATION", STATUS_ACCESS_VIOLATION },
5360 { "ADDRESS_ALREADY_ASSOCIATED", STATUS_ADDRESS_ALREADY_ASSOCIATED },
5361 { "ALERTED", STATUS_ALERTED },
5362 { "BAD_DEVICE_TYPE", STATUS_BAD_DEVICE_TYPE },
5363 { "BAD_IMPERSONATION_LEVEL", STATUS_BAD_IMPERSONATION_LEVEL },
5364 { "BUFFER_OVERFLOW", STATUS_BUFFER_OVERFLOW },
5365 { "BUFFER_TOO_SMALL", STATUS_BUFFER_TOO_SMALL },
5366 { "CANCELLED", STATUS_CANCELLED },
5367 { "CANNOT_DELETE", STATUS_CANNOT_DELETE },
5368 { "CANT_OPEN_ANONYMOUS", STATUS_CANT_OPEN_ANONYMOUS },
5369 { "CHILD_MUST_BE_VOLATILE", STATUS_CHILD_MUST_BE_VOLATILE },
5370 { "CONNECTION_ABORTED", STATUS_CONNECTION_ABORTED },
5371 { "CONNECTION_ACTIVE", STATUS_CONNECTION_ACTIVE },
5372 { "CONNECTION_REFUSED", STATUS_CONNECTION_REFUSED },
5373 { "CONNECTION_RESET", STATUS_CONNECTION_RESET },
5374 { "DEBUGGER_INACTIVE", STATUS_DEBUGGER_INACTIVE },
5375 { "DEVICE_BUSY", STATUS_DEVICE_BUSY },
5376 { "DEVICE_NOT_READY", STATUS_DEVICE_NOT_READY },
5377 { "DIRECTORY_NOT_EMPTY", STATUS_DIRECTORY_NOT_EMPTY },
5378 { "DISK_FULL", STATUS_DISK_FULL },
5379 { "DLL_NOT_FOUND", STATUS_DLL_NOT_FOUND },
5380 { "ERROR_CLASS_ALREADY_EXISTS", 0xc0010000 | ERROR_CLASS_ALREADY_EXISTS },
5381 { "ERROR_CLASS_DOES_NOT_EXIST", 0xc0010000 | ERROR_CLASS_DOES_NOT_EXIST },
5382 { "ERROR_CLASS_HAS_WINDOWS", 0xc0010000 | ERROR_CLASS_HAS_WINDOWS },
5383 { "ERROR_CLIPBOARD_NOT_OPEN", 0xc0010000 | ERROR_CLIPBOARD_NOT_OPEN },
5384 { "ERROR_HOTKEY_ALREADY_REGISTERED", 0xc0010000 | ERROR_HOTKEY_ALREADY_REGISTERED },
5385 { "ERROR_HOTKEY_NOT_REGISTERED", 0xc0010000 | ERROR_HOTKEY_NOT_REGISTERED },
5386 { "ERROR_INVALID_CURSOR_HANDLE", 0xc0010000 | ERROR_INVALID_CURSOR_HANDLE },
5387 { "ERROR_INVALID_INDEX", 0xc0010000 | ERROR_INVALID_INDEX },
5388 { "ERROR_INVALID_WINDOW_HANDLE", 0xc0010000 | ERROR_INVALID_WINDOW_HANDLE },
5389 { "ERROR_NO_MORE_USER_HANDLES", 0xc0010000 | ERROR_NO_MORE_USER_HANDLES },
5390 { "ERROR_WINDOW_OF_OTHER_THREAD", 0xc0010000 | ERROR_WINDOW_OF_OTHER_THREAD },
5391 { "FILE_DELETED", STATUS_FILE_DELETED },
5392 { "FILE_INVALID", STATUS_FILE_INVALID },
5393 { "FILE_IS_A_DIRECTORY", STATUS_FILE_IS_A_DIRECTORY },
5394 { "FILE_LOCK_CONFLICT", STATUS_FILE_LOCK_CONFLICT },
5395 { "GENERIC_NOT_MAPPED", STATUS_GENERIC_NOT_MAPPED },
5396 { "HANDLES_CLOSED", STATUS_HANDLES_CLOSED },
5397 { "HANDLE_NOT_CLOSABLE", STATUS_HANDLE_NOT_CLOSABLE },
5398 { "HOST_UNREACHABLE", STATUS_HOST_UNREACHABLE },
5399 { "ILLEGAL_FUNCTION", STATUS_ILLEGAL_FUNCTION },
5400 { "IMAGE_NOT_AT_BASE", STATUS_IMAGE_NOT_AT_BASE },
5401 { "INFO_LENGTH_MISMATCH", STATUS_INFO_LENGTH_MISMATCH },
5402 { "INSTANCE_NOT_AVAILABLE", STATUS_INSTANCE_NOT_AVAILABLE },
5403 { "INSUFFICIENT_RESOURCES", STATUS_INSUFFICIENT_RESOURCES },
5404 { "INVALID_ADDRESS", STATUS_INVALID_ADDRESS },
5405 { "INVALID_ADDRESS_COMPONENT", STATUS_INVALID_ADDRESS_COMPONENT },
5406 { "INVALID_CID", STATUS_INVALID_CID },
5407 { "INVALID_CONNECTION", STATUS_INVALID_CONNECTION },
5408 { "INVALID_DEVICE_REQUEST", STATUS_INVALID_DEVICE_REQUEST },
5409 { "INVALID_FILE_FOR_SECTION", STATUS_INVALID_FILE_FOR_SECTION },
5410 { "INVALID_HANDLE", STATUS_INVALID_HANDLE },
5411 { "INVALID_IMAGE_FORMAT", STATUS_INVALID_IMAGE_FORMAT },
5412 { "INVALID_IMAGE_NE_FORMAT", STATUS_INVALID_IMAGE_NE_FORMAT },
5413 { "INVALID_IMAGE_NOT_MZ", STATUS_INVALID_IMAGE_NOT_MZ },
5414 { "INVALID_IMAGE_PROTECT", STATUS_INVALID_IMAGE_PROTECT },
5415 { "INVALID_IMAGE_WIN_16", STATUS_INVALID_IMAGE_WIN_16 },
5416 { "INVALID_IMAGE_WIN_64", STATUS_INVALID_IMAGE_WIN_64 },
5417 { "INVALID_LOCK_SEQUENCE", STATUS_INVALID_LOCK_SEQUENCE },
5418 { "INVALID_OWNER", STATUS_INVALID_OWNER },
5419 { "INVALID_PARAMETER", STATUS_INVALID_PARAMETER },
5420 { "INVALID_PIPE_STATE", STATUS_INVALID_PIPE_STATE },
5421 { "INVALID_READ_MODE", STATUS_INVALID_READ_MODE },
5422 { "INVALID_SECURITY_DESCR", STATUS_INVALID_SECURITY_DESCR },
5423 { "IO_TIMEOUT", STATUS_IO_TIMEOUT },
5424 { "KERNEL_APC", STATUS_KERNEL_APC },
5425 { "KEY_DELETED", STATUS_KEY_DELETED },
5426 { "MAPPED_FILE_SIZE_ZERO", STATUS_MAPPED_FILE_SIZE_ZERO },
5427 { "MUTANT_NOT_OWNED", STATUS_MUTANT_NOT_OWNED },
5428 { "NAME_TOO_LONG", STATUS_NAME_TOO_LONG },
5429 { "NETWORK_BUSY", STATUS_NETWORK_BUSY },
5430 { "NETWORK_UNREACHABLE", STATUS_NETWORK_UNREACHABLE },
5431 { "NOT_ALL_ASSIGNED", STATUS_NOT_ALL_ASSIGNED },
5432 { "NOT_A_DIRECTORY", STATUS_NOT_A_DIRECTORY },
5433 { "NOT_FOUND", STATUS_NOT_FOUND },
5434 { "NOT_IMPLEMENTED", STATUS_NOT_IMPLEMENTED },
5435 { "NOT_MAPPED_VIEW", STATUS_NOT_MAPPED_VIEW },
5436 { "NOT_REGISTRY_FILE", STATUS_NOT_REGISTRY_FILE },
5437 { "NOT_SAME_DEVICE", STATUS_NOT_SAME_DEVICE },
5438 { "NOT_SAME_OBJECT", STATUS_NOT_SAME_OBJECT },
5439 { "NOT_SUPPORTED", STATUS_NOT_SUPPORTED },
5440 { "NO_DATA_DETECTED", STATUS_NO_DATA_DETECTED },
5441 { "NO_IMPERSONATION_TOKEN", STATUS_NO_IMPERSONATION_TOKEN },
5442 { "NO_MEMORY", STATUS_NO_MEMORY },
5443 { "NO_MORE_ENTRIES", STATUS_NO_MORE_ENTRIES },
5444 { "NO_SUCH_DEVICE", STATUS_NO_SUCH_DEVICE },
5445 { "NO_SUCH_FILE", STATUS_NO_SUCH_FILE },
5446 { "NO_TOKEN", STATUS_NO_TOKEN },
5447 { "OBJECT_NAME_COLLISION", STATUS_OBJECT_NAME_COLLISION },
5448 { "OBJECT_NAME_EXISTS", STATUS_OBJECT_NAME_EXISTS },
5449 { "OBJECT_NAME_INVALID", STATUS_OBJECT_NAME_INVALID },
5450 { "OBJECT_NAME_NOT_FOUND", STATUS_OBJECT_NAME_NOT_FOUND },
5451 { "OBJECT_PATH_INVALID", STATUS_OBJECT_PATH_INVALID },
5452 { "OBJECT_PATH_NOT_FOUND", STATUS_OBJECT_PATH_NOT_FOUND },
5453 { "OBJECT_PATH_SYNTAX_BAD", STATUS_OBJECT_PATH_SYNTAX_BAD },
5454 { "OBJECT_TYPE_MISMATCH", STATUS_OBJECT_TYPE_MISMATCH },
5455 { "PENDING", STATUS_PENDING },
5456 { "PIPE_BROKEN", STATUS_PIPE_BROKEN },
5457 { "PIPE_BUSY", STATUS_PIPE_BUSY },
5458 { "PIPE_CLOSING", STATUS_PIPE_CLOSING },
5459 { "PIPE_CONNECTED", STATUS_PIPE_CONNECTED },
5460 { "PIPE_DISCONNECTED", STATUS_PIPE_DISCONNECTED },
5461 { "PIPE_EMPTY", STATUS_PIPE_EMPTY },
5462 { "PIPE_LISTENING", STATUS_PIPE_LISTENING },
5463 { "PIPE_NOT_AVAILABLE", STATUS_PIPE_NOT_AVAILABLE },
5464 { "PORT_NOT_SET", STATUS_PORT_NOT_SET },
5465 { "PREDEFINED_HANDLE", STATUS_PREDEFINED_HANDLE },
5466 { "PRIVILEGE_NOT_HELD", STATUS_PRIVILEGE_NOT_HELD },
5467 { "PROCESS_IN_JOB", STATUS_PROCESS_IN_JOB },
5468 { "PROCESS_IS_TERMINATING", STATUS_PROCESS_IS_TERMINATING },
5469 { "PROCESS_NOT_IN_JOB", STATUS_PROCESS_NOT_IN_JOB },
5470 { "REPARSE_POINT_NOT_RESOLVED", STATUS_REPARSE_POINT_NOT_RESOLVED },
5471 { "SECTION_TOO_BIG", STATUS_SECTION_TOO_BIG },
5472 { "SEMAPHORE_LIMIT_EXCEEDED", STATUS_SEMAPHORE_LIMIT_EXCEEDED },
5473 { "SHARING_VIOLATION", STATUS_SHARING_VIOLATION },
5474 { "SHUTDOWN_IN_PROGRESS", STATUS_SHUTDOWN_IN_PROGRESS },
5475 { "SUSPEND_COUNT_EXCEEDED", STATUS_SUSPEND_COUNT_EXCEEDED },
5476 { "THREAD_IS_TERMINATING", STATUS_THREAD_IS_TERMINATING },
5477 { "TIMEOUT", STATUS_TIMEOUT },
5478 { "TOO_MANY_OPENED_FILES", STATUS_TOO_MANY_OPENED_FILES },
5479 { "UNSUCCESSFUL", STATUS_UNSUCCESSFUL },
5480 { "USER_APC", STATUS_USER_APC },
5481 { "USER_MAPPED_FILE", STATUS_USER_MAPPED_FILE },
5482 { "VOLUME_DISMOUNTED", STATUS_VOLUME_DISMOUNTED },
5483 { "WAS_LOCKED", STATUS_WAS_LOCKED },
5484 { "WSAEACCES", 0xc0010000 | WSAEACCES },
5485 { "WSAEADDRINUSE", 0xc0010000 | WSAEADDRINUSE },
5486 { "WSAEADDRNOTAVAIL", 0xc0010000 | WSAEADDRNOTAVAIL },
5487 { "WSAEAFNOSUPPORT", 0xc0010000 | WSAEAFNOSUPPORT },
5488 { "WSAEALREADY", 0xc0010000 | WSAEALREADY },
5489 { "WSAEBADF", 0xc0010000 | WSAEBADF },
5490 { "WSAECONNABORTED", 0xc0010000 | WSAECONNABORTED },
5491 { "WSAECONNREFUSED", 0xc0010000 | WSAECONNREFUSED },
5492 { "WSAECONNRESET", 0xc0010000 | WSAECONNRESET },
5493 { "WSAEDESTADDRREQ", 0xc0010000 | WSAEDESTADDRREQ },
5494 { "WSAEDQUOT", 0xc0010000 | WSAEDQUOT },
5495 { "WSAEFAULT", 0xc0010000 | WSAEFAULT },
5496 { "WSAEHOSTDOWN", 0xc0010000 | WSAEHOSTDOWN },
5497 { "WSAEHOSTUNREACH", 0xc0010000 | WSAEHOSTUNREACH },
5498 { "WSAEINTR", 0xc0010000 | WSAEINTR },
5499 { "WSAEINVAL", 0xc0010000 | WSAEINVAL },
5500 { "WSAEISCONN", 0xc0010000 | WSAEISCONN },
5501 { "WSAELOOP", 0xc0010000 | WSAELOOP },
5502 { "WSAEMFILE", 0xc0010000 | WSAEMFILE },
5503 { "WSAEMSGSIZE", 0xc0010000 | WSAEMSGSIZE },
5504 { "WSAENAMETOOLONG", 0xc0010000 | WSAENAMETOOLONG },
5505 { "WSAENETDOWN", 0xc0010000 | WSAENETDOWN },
5506 { "WSAENETRESET", 0xc0010000 | WSAENETRESET },
5507 { "WSAENETUNREACH", 0xc0010000 | WSAENETUNREACH },
5508 { "WSAENOBUFS", 0xc0010000 | WSAENOBUFS },
5509 { "WSAENOPROTOOPT", 0xc0010000 | WSAENOPROTOOPT },
5510 { "WSAENOTCONN", 0xc0010000 | WSAENOTCONN },
5511 { "WSAENOTEMPTY", 0xc0010000 | WSAENOTEMPTY },
5512 { "WSAENOTSOCK", 0xc0010000 | WSAENOTSOCK },
5513 { "WSAEOPNOTSUPP", 0xc0010000 | WSAEOPNOTSUPP },
5514 { "WSAEPFNOSUPPORT", 0xc0010000 | WSAEPFNOSUPPORT },
5515 { "WSAEPROCLIM", 0xc0010000 | WSAEPROCLIM },
5516 { "WSAEPROTONOSUPPORT", 0xc0010000 | WSAEPROTONOSUPPORT },
5517 { "WSAEPROTOTYPE", 0xc0010000 | WSAEPROTOTYPE },
5518 { "WSAEREMOTE", 0xc0010000 | WSAEREMOTE },
5519 { "WSAESHUTDOWN", 0xc0010000 | WSAESHUTDOWN },
5520 { "WSAESOCKTNOSUPPORT", 0xc0010000 | WSAESOCKTNOSUPPORT },
5521 { "WSAESTALE", 0xc0010000 | WSAESTALE },
5522 { "WSAETIMEDOUT", 0xc0010000 | WSAETIMEDOUT },
5523 { "WSAETOOMANYREFS", 0xc0010000 | WSAETOOMANYREFS },
5524 { "WSAEUSERS", 0xc0010000 | WSAEUSERS },
5525 { "WSAEWOULDBLOCK", 0xc0010000 | WSAEWOULDBLOCK },
5526 { NULL, 0 }
5529 /* ### make_requests end ### */
5530 /* Everything above this line is generated automatically by tools/make_requests */
5532 static const char *get_status_name( unsigned int status )
5534 int i;
5535 static char buffer[10];
5537 if (status)
5539 for (i = 0; status_names[i].name; i++)
5540 if (status_names[i].value == status) return status_names[i].name;
5542 sprintf( buffer, "%x", status );
5543 return buffer;
5546 void trace_request(void)
5548 enum request req = current->req.request_header.req;
5549 if (req < REQ_NB_REQUESTS)
5551 fprintf( stderr, "%04x: %s(", current->id, req_names[req] );
5552 if (req_dumpers[req])
5554 cur_data = get_req_data();
5555 cur_size = get_req_data_size();
5556 req_dumpers[req]( &current->req );
5558 fprintf( stderr, " )\n" );
5560 else fprintf( stderr, "%04x: %d(?)\n", current->id, req );
5563 void trace_reply( enum request req, const union generic_reply *reply )
5565 if (req < REQ_NB_REQUESTS)
5567 fprintf( stderr, "%04x: %s() = %s",
5568 current->id, req_names[req], get_status_name(current->error) );
5569 if (reply_dumpers[req])
5571 fprintf( stderr, " {" );
5572 cur_data = current->reply_data;
5573 cur_size = reply->reply_header.reply_size;
5574 reply_dumpers[req]( reply );
5575 fprintf( stderr, " }" );
5577 fputc( '\n', stderr );
5579 else fprintf( stderr, "%04x: %d() = %s\n",
5580 current->id, req, get_status_name(current->error) );