mf/session: Reset topology status back to READY when stopped.
[wine.git] / server / trace.c
blob42952d3cdff8f3ce5ca014393079dc9cc6192429
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"
22 #include "wine/port.h"
24 #include <ctype.h>
25 #include <stdarg.h>
26 #include <stdio.h>
27 #include <sys/types.h>
29 #ifdef HAVE_SYS_UIO_H
30 #include <sys/uio.h>
31 #endif
33 #include "ntstatus.h"
34 #define WIN32_NO_STATUS
35 #include "windef.h"
36 #include "winbase.h"
37 #include "wincon.h"
38 #include "winternl.h"
39 #include "winuser.h"
40 #include "winioctl.h"
41 #include "wine/condrv.h"
42 #include "ddk/wdm.h"
43 #include "ddk/ntddser.h"
44 #define USE_WS_PREFIX
45 #include "winsock2.h"
46 #include "file.h"
47 #include "request.h"
48 #include "unicode.h"
50 static const void *cur_data;
51 static data_size_t cur_size;
53 static const char *get_status_name( unsigned int status );
55 /* utility functions */
57 static inline void remove_data( data_size_t size )
59 cur_data = (const char *)cur_data + size;
60 cur_size -= size;
63 static void dump_uints( const char *prefix, const unsigned int *ptr, int len )
65 fprintf( stderr, "%s{", prefix );
66 while (len > 0)
68 fprintf( stderr, "%08x", *ptr++ );
69 if (--len) fputc( ',', stderr );
71 fputc( '}', stderr );
74 static void dump_handles( const char *prefix, const obj_handle_t *data, data_size_t size )
76 data_size_t len = size / sizeof(*data);
78 fprintf( stderr,"%s{", prefix );
79 while (len > 0)
81 fprintf( stderr, "%04x", *data++ );
82 if (--len) fputc( ',', stderr );
84 fputc( '}', stderr );
87 static void dump_timeout( const char *prefix, const timeout_t *time )
89 fprintf( stderr, "%s%s", prefix, get_timeout_str(*time) );
92 static void dump_abstime( const char *prefix, const abstime_t *when )
94 timeout_t timeout = abstime_to_timeout( *when );
95 dump_timeout( prefix, &timeout );
98 static void dump_uint64( const char *prefix, const unsigned __int64 *val )
100 if ((unsigned int)*val != *val)
101 fprintf( stderr, "%s%x%08x", prefix, (unsigned int)(*val >> 32), (unsigned int)*val );
102 else
103 fprintf( stderr, "%s%08x", prefix, (unsigned int)*val );
106 static void dump_rectangle( const char *prefix, const rectangle_t *rect )
108 fprintf( stderr, "%s{%d,%d;%d,%d}", prefix,
109 rect->left, rect->top, rect->right, rect->bottom );
112 static void dump_ioctl_code( const char *prefix, const ioctl_code_t *code )
114 switch(*code)
116 #define CASE(c) case c: fprintf( stderr, "%s%s", prefix, #c ); break
117 CASE(IOCTL_CONDRV_ACTIVATE);
118 CASE(IOCTL_CONDRV_BIND_PID);
119 CASE(IOCTL_CONDRV_CTRL_EVENT);
120 CASE(IOCTL_CONDRV_FILL_OUTPUT);
121 CASE(IOCTL_CONDRV_GET_INPUT_INFO);
122 CASE(IOCTL_CONDRV_GET_MODE);
123 CASE(IOCTL_CONDRV_GET_OUTPUT_INFO);
124 CASE(IOCTL_CONDRV_GET_TITLE);
125 CASE(IOCTL_CONDRV_PEEK);
126 CASE(IOCTL_CONDRV_READ_CONSOLE);
127 CASE(IOCTL_CONDRV_READ_INPUT);
128 CASE(IOCTL_CONDRV_READ_OUTPUT);
129 CASE(IOCTL_CONDRV_SET_MODE);
130 CASE(IOCTL_CONDRV_SET_OUTPUT_INFO);
131 CASE(IOCTL_CONDRV_SETUP_INPUT);
132 CASE(IOCTL_CONDRV_WRITE_CONSOLE);
133 CASE(IOCTL_CONDRV_WRITE_INPUT);
134 CASE(IOCTL_CONDRV_WRITE_OUTPUT);
135 CASE(FSCTL_DISMOUNT_VOLUME);
136 CASE(FSCTL_PIPE_DISCONNECT);
137 CASE(FSCTL_PIPE_LISTEN);
138 CASE(FSCTL_PIPE_PEEK);
139 CASE(FSCTL_PIPE_WAIT);
140 CASE(IOCTL_SERIAL_GET_TIMEOUTS);
141 CASE(IOCTL_SERIAL_GET_WAIT_MASK);
142 CASE(IOCTL_SERIAL_SET_TIMEOUTS);
143 CASE(IOCTL_SERIAL_SET_WAIT_MASK);
144 CASE(WS_SIO_ADDRESS_LIST_CHANGE);
145 default: fprintf( stderr, "%s%08x", prefix, *code ); break;
146 #undef CASE
150 static void dump_apc_call( const char *prefix, const apc_call_t *call )
152 fprintf( stderr, "%s{", prefix );
153 switch(call->type)
155 case APC_NONE:
156 fprintf( stderr, "APC_NONE" );
157 break;
158 case APC_USER:
159 dump_uint64( "APC_USER,func=", &call->user.func );
160 dump_uint64( ",args={", &call->user.args[0] );
161 dump_uint64( ",", &call->user.args[1] );
162 dump_uint64( ",", &call->user.args[2] );
163 fputc( '}', stderr );
164 break;
165 case APC_ASYNC_IO:
166 dump_uint64( "APC_ASYNC_IO,user=", &call->async_io.user );
167 dump_uint64( ",sb=", &call->async_io.sb );
168 fprintf( stderr, ",status=%s", get_status_name(call->async_io.status) );
169 break;
170 case APC_VIRTUAL_ALLOC:
171 dump_uint64( "APC_VIRTUAL_ALLOC,addr==", &call->virtual_alloc.addr );
172 dump_uint64( ",size=", &call->virtual_alloc.size );
173 dump_uint64( ",zero_bits=", &call->virtual_alloc.zero_bits );
174 fprintf( stderr, ",op_type=%x,prot=%x", call->virtual_alloc.op_type, call->virtual_alloc.prot );
175 break;
176 case APC_VIRTUAL_FREE:
177 dump_uint64( "APC_VIRTUAL_FREE,addr=", &call->virtual_free.addr );
178 dump_uint64( ",size=", &call->virtual_free.size );
179 fprintf( stderr, ",op_type=%x", call->virtual_free.op_type );
180 break;
181 case APC_VIRTUAL_QUERY:
182 dump_uint64( "APC_VIRTUAL_QUERY,addr=", &call->virtual_query.addr );
183 break;
184 case APC_VIRTUAL_PROTECT:
185 dump_uint64( "APC_VIRTUAL_PROTECT,addr=", &call->virtual_protect.addr );
186 dump_uint64( ",size=", &call->virtual_protect.size );
187 fprintf( stderr, ",prot=%x", call->virtual_protect.prot );
188 break;
189 case APC_VIRTUAL_FLUSH:
190 dump_uint64( "APC_VIRTUAL_FLUSH,addr=", &call->virtual_flush.addr );
191 dump_uint64( ",size=", &call->virtual_flush.size );
192 break;
193 case APC_VIRTUAL_LOCK:
194 dump_uint64( "APC_VIRTUAL_LOCK,addr=", &call->virtual_lock.addr );
195 dump_uint64( ",size=", &call->virtual_lock.size );
196 break;
197 case APC_VIRTUAL_UNLOCK:
198 dump_uint64( "APC_VIRTUAL_UNLOCK,addr=", &call->virtual_unlock.addr );
199 dump_uint64( ",size=", &call->virtual_unlock.size );
200 break;
201 case APC_MAP_VIEW:
202 fprintf( stderr, "APC_MAP_VIEW,handle=%04x", call->map_view.handle );
203 dump_uint64( ",addr=", &call->map_view.addr );
204 dump_uint64( ",size=", &call->map_view.size );
205 dump_uint64( ",offset=", &call->map_view.offset );
206 dump_uint64( ",zero_bits=", &call->map_view.zero_bits );
207 fprintf( stderr, ",alloc_type=%x,prot=%x", call->map_view.alloc_type, call->map_view.prot );
208 break;
209 case APC_UNMAP_VIEW:
210 dump_uint64( "APC_UNMAP_VIEW,addr=", &call->unmap_view.addr );
211 break;
212 case APC_CREATE_THREAD:
213 dump_uint64( "APC_CREATE_THREAD,func=", &call->create_thread.func );
214 dump_uint64( ",arg=", &call->create_thread.arg );
215 dump_uint64( ",zero_bits=", &call->create_thread.zero_bits );
216 dump_uint64( ",reserve=", &call->create_thread.reserve );
217 dump_uint64( ",commit=", &call->create_thread.commit );
218 fprintf( stderr, ",flags=%x", call->create_thread.flags );
219 break;
220 case APC_DUP_HANDLE:
221 fprintf( stderr, "APC_DUP_HANDLE,src_handle=%04x,dst_process=%04x,access=%x,attributes=%x,options=%x",
222 call->dup_handle.src_handle, call->dup_handle.dst_process, call->dup_handle.access,
223 call->dup_handle.attributes, call->dup_handle.options );
224 break;
225 case APC_BREAK_PROCESS:
226 fprintf( stderr, "APC_BREAK_PROCESS" );
227 break;
228 default:
229 fprintf( stderr, "type=%u", call->type );
230 break;
232 fputc( '}', stderr );
235 static void dump_apc_result( const char *prefix, const apc_result_t *result )
237 fprintf( stderr, "%s{", prefix );
238 switch(result->type)
240 case APC_NONE:
241 break;
242 case APC_ASYNC_IO:
243 fprintf( stderr, "APC_ASYNC_IO,status=%s,total=%u",
244 get_status_name( result->async_io.status ), result->async_io.total );
245 break;
246 case APC_VIRTUAL_ALLOC:
247 fprintf( stderr, "APC_VIRTUAL_ALLOC,status=%s",
248 get_status_name( result->virtual_alloc.status ));
249 dump_uint64( ",addr=", &result->virtual_alloc.addr );
250 dump_uint64( ",size=", &result->virtual_alloc.size );
251 break;
252 case APC_VIRTUAL_FREE:
253 fprintf( stderr, "APC_VIRTUAL_FREE,status=%s",
254 get_status_name( result->virtual_free.status ));
255 dump_uint64( ",addr=", &result->virtual_free.addr );
256 dump_uint64( ",size=", &result->virtual_free.size );
257 break;
258 case APC_VIRTUAL_QUERY:
259 fprintf( stderr, "APC_VIRTUAL_QUERY,status=%s",
260 get_status_name( result->virtual_query.status ));
261 dump_uint64( ",base=", &result->virtual_query.base );
262 dump_uint64( ",alloc_base=", &result->virtual_query.alloc_base );
263 dump_uint64( ",size=", &result->virtual_query.size );
264 fprintf( stderr, ",state=%x,prot=%x,alloc_prot=%x,alloc_type=%x",
265 result->virtual_query.state, result->virtual_query.prot,
266 result->virtual_query.alloc_prot, result->virtual_query.alloc_type );
267 break;
268 case APC_VIRTUAL_PROTECT:
269 fprintf( stderr, "APC_VIRTUAL_PROTECT,status=%s",
270 get_status_name( result->virtual_protect.status ));
271 dump_uint64( ",addr=", &result->virtual_protect.addr );
272 dump_uint64( ",size=", &result->virtual_protect.size );
273 fprintf( stderr, ",prot=%x", result->virtual_protect.prot );
274 break;
275 case APC_VIRTUAL_FLUSH:
276 fprintf( stderr, "APC_VIRTUAL_FLUSH,status=%s",
277 get_status_name( result->virtual_flush.status ));
278 dump_uint64( ",addr=", &result->virtual_flush.addr );
279 dump_uint64( ",size=", &result->virtual_flush.size );
280 break;
281 case APC_VIRTUAL_LOCK:
282 fprintf( stderr, "APC_VIRTUAL_LOCK,status=%s",
283 get_status_name( result->virtual_lock.status ));
284 dump_uint64( ",addr=", &result->virtual_lock.addr );
285 dump_uint64( ",size=", &result->virtual_lock.size );
286 break;
287 case APC_VIRTUAL_UNLOCK:
288 fprintf( stderr, "APC_VIRTUAL_UNLOCK,status=%s",
289 get_status_name( result->virtual_unlock.status ));
290 dump_uint64( ",addr=", &result->virtual_unlock.addr );
291 dump_uint64( ",size=", &result->virtual_unlock.size );
292 break;
293 case APC_MAP_VIEW:
294 fprintf( stderr, "APC_MAP_VIEW,status=%s",
295 get_status_name( result->map_view.status ));
296 dump_uint64( ",addr=", &result->map_view.addr );
297 dump_uint64( ",size=", &result->map_view.size );
298 break;
299 case APC_UNMAP_VIEW:
300 fprintf( stderr, "APC_UNMAP_VIEW,status=%s",
301 get_status_name( result->unmap_view.status ) );
302 break;
303 case APC_CREATE_THREAD:
304 fprintf( stderr, "APC_CREATE_THREAD,status=%s,pid=%04x,tid=%04x,handle=%04x",
305 get_status_name( result->create_thread.status ),
306 result->create_thread.pid, result->create_thread.tid, result->create_thread.handle );
307 break;
308 case APC_DUP_HANDLE:
309 fprintf( stderr, "APC_DUP_HANDLE,status=%s,handle=%04x",
310 get_status_name( result->dup_handle.status ), result->dup_handle.handle );
311 break;
312 case APC_BREAK_PROCESS:
313 fprintf( stderr, "APC_BREAK_PROCESS,status=%s", get_status_name( result->break_process.status ) );
314 break;
315 default:
316 fprintf( stderr, "type=%u", result->type );
317 break;
319 fputc( '}', stderr );
322 static void dump_async_data( const char *prefix, const async_data_t *data )
324 fprintf( stderr, "%s{handle=%04x,event=%04x", prefix, data->handle, data->event );
325 dump_uint64( ",iosb=", &data->iosb );
326 dump_uint64( ",user=", &data->user );
327 dump_uint64( ",apc=", &data->apc );
328 dump_uint64( ",apc_context=", &data->apc_context );
329 fputc( '}', stderr );
332 static void dump_irp_params( const char *prefix, const irp_params_t *data )
334 switch (data->type)
336 case IRP_CALL_NONE:
337 fprintf( stderr, "%s{NONE}", prefix );
338 break;
339 case IRP_CALL_CREATE:
340 fprintf( stderr, "%s{CREATE,access=%08x,sharing=%08x,options=%08x",
341 prefix, data->create.access, data->create.sharing, data->create.options );
342 dump_uint64( ",device=", &data->create.device );
343 fprintf( stderr, ",file=%08x}", data->create.file );
344 break;
345 case IRP_CALL_CLOSE:
346 fprintf( stderr, "%s{CLOSE", prefix );
347 dump_uint64( ",file=", &data->close.file );
348 fputc( '}', stderr );
349 break;
350 case IRP_CALL_READ:
351 fprintf( stderr, "%s{READ,key=%08x,out_size=%u", prefix, data->read.key,
352 data->read.out_size );
353 dump_uint64( ",pos=", &data->read.pos );
354 dump_uint64( ",file=", &data->read.file );
355 fputc( '}', stderr );
356 break;
357 case IRP_CALL_WRITE:
358 fprintf( stderr, "%s{WRITE,key=%08x", prefix, data->write.key );
359 dump_uint64( ",pos=", &data->write.pos );
360 dump_uint64( ",file=", &data->write.file );
361 fputc( '}', stderr );
362 break;
363 case IRP_CALL_FLUSH:
364 fprintf( stderr, "%s{FLUSH", prefix );
365 dump_uint64( ",file=", &data->flush.file );
366 fputc( '}', stderr );
367 break;
368 case IRP_CALL_IOCTL:
369 fprintf( stderr, "%s{IOCTL", prefix );
370 dump_ioctl_code( ",code=", &data->ioctl.code );
371 fprintf( stderr, ",out_size=%u", data->ioctl.out_size );
372 dump_uint64( ",file=", &data->ioctl.file );
373 fputc( '}', stderr );
374 break;
375 case IRP_CALL_VOLUME:
376 fprintf( stderr, "%s{VOLUME,class=%u,out_size=%u", prefix,
377 data->volume.info_class, data->volume.out_size );
378 dump_uint64( ",file=", &data->volume.file );
379 fputc( '}', stderr );
380 break;
381 case IRP_CALL_FREE:
382 fprintf( stderr, "%s{FREE", prefix );
383 dump_uint64( ",obj=", &data->free.obj );
384 fputc( '}', stderr );
385 break;
386 case IRP_CALL_CANCEL:
387 fprintf( stderr, "%s{CANCEL", prefix );
388 dump_uint64( ",irp=", &data->cancel.irp );
389 fputc( '}', stderr );
390 break;
394 static void dump_rawinput( const char *prefix, const union rawinput *rawinput )
396 switch (rawinput->type)
398 case RIM_TYPEMOUSE:
399 fprintf( stderr, "%s{type=MOUSE,x=%d,y=%d,data=%08x}", prefix, rawinput->mouse.x,
400 rawinput->mouse.y, rawinput->mouse.data );
401 break;
402 case RIM_TYPEKEYBOARD:
403 fprintf( stderr, "%s{type=KEYBOARD,message=%04x,vkey=%04hx,scan=%04hx}", prefix,
404 rawinput->kbd.message, rawinput->kbd.vkey, rawinput->kbd.scan );
405 break;
406 case RIM_TYPEHID:
407 fprintf( stderr, "%s{type=HID,device=%04x,param=%04x,page=%04hx,usage=%04hx,count=%u,length=%u}",
408 prefix, rawinput->hid.device, rawinput->hid.param, rawinput->hid.usage_page,
409 rawinput->hid.usage, rawinput->hid.count, rawinput->hid.length );
410 break;
411 default:
412 fprintf( stderr, "%s{type=%04x}", prefix, rawinput->type );
413 break;
417 static void dump_hw_input( const char *prefix, const hw_input_t *input )
419 switch (input->type)
421 case INPUT_MOUSE:
422 fprintf( stderr, "%s{type=MOUSE,x=%d,y=%d,data=%08x,flags=%08x,time=%u",
423 prefix, input->mouse.x, input->mouse.y, input->mouse.data, input->mouse.flags,
424 input->mouse.time );
425 dump_uint64( ",info=", &input->mouse.info );
426 fputc( '}', stderr );
427 break;
428 case INPUT_KEYBOARD:
429 fprintf( stderr, "%s{type=KEYBOARD,vkey=%04hx,scan=%04hx,flags=%08x,time=%u",
430 prefix, input->kbd.vkey, input->kbd.scan, input->kbd.flags, input->kbd.time );
431 dump_uint64( ",info=", &input->kbd.info );
432 fputc( '}', stderr );
433 break;
434 case INPUT_HARDWARE:
435 fprintf( stderr, "%s{type=HARDWARE,msg=%04x", prefix, input->hw.msg );
436 dump_uint64( ",lparam=", &input->hw.lparam );
437 switch (input->hw.msg)
439 case WM_INPUT:
440 case WM_INPUT_DEVICE_CHANGE:
441 dump_rawinput( ",rawinput=", &input->hw.rawinput );
443 fputc( '}', stderr );
444 break;
445 default:
446 fprintf( stderr, "%s{type=%04x}", prefix, input->type );
447 break;
451 static void dump_luid( const char *prefix, const luid_t *luid )
453 fprintf( stderr, "%s%d.%u", prefix, luid->high_part, luid->low_part );
456 static void dump_generic_map( const char *prefix, const generic_map_t *map )
458 fprintf( stderr, "%s{r=%08x,w=%08x,x=%08x,a=%08x}",
459 prefix, map->read, map->write, map->exec, map->all );
462 static void dump_varargs_ints( const char *prefix, data_size_t size )
464 const int *data = cur_data;
465 data_size_t len = size / sizeof(*data);
467 fprintf( stderr,"%s{", prefix );
468 while (len > 0)
470 fprintf( stderr, "%d", *data++ );
471 if (--len) fputc( ',', stderr );
473 fputc( '}', stderr );
474 remove_data( size );
477 static void dump_varargs_uints( const char *prefix, data_size_t size )
479 const unsigned int *data = cur_data;
481 dump_uints( prefix, data, size / sizeof(*data) );
482 remove_data( size );
485 static void dump_varargs_uints64( const char *prefix, data_size_t size )
487 const unsigned __int64 *data = cur_data;
488 data_size_t len = size / sizeof(*data);
490 fprintf( stderr,"%s{", prefix );
491 while (len > 0)
493 dump_uint64( "", data++ );
494 if (--len) fputc( ',', stderr );
496 fputc( '}', stderr );
497 remove_data( size );
500 static void dump_varargs_ushorts( const char *prefix, data_size_t size )
502 const unsigned short *data = cur_data;
503 data_size_t len = size / sizeof(*data);
505 fprintf( stderr, "%s{", prefix );
506 while (len > 0)
508 fprintf( stderr, "%04x", *data++ );
509 if (--len) fputc( ',', stderr );
511 fputc( '}', stderr );
512 remove_data( size );
515 static void dump_varargs_apc_result( const char *prefix, data_size_t size )
517 const apc_result_t *result = cur_data;
519 if (size >= sizeof(*result))
521 dump_apc_result( prefix, result );
522 size = sizeof(*result);
524 remove_data( size );
527 static void dump_varargs_select_op( const char *prefix, data_size_t size )
529 select_op_t data;
531 if (!size)
533 fprintf( stderr, "%s{}", prefix );
534 return;
536 memset( &data, 0, sizeof(data) );
537 memcpy( &data, cur_data, min( size, sizeof(data) ));
539 fprintf( stderr, "%s{", prefix );
540 switch (data.op)
542 case SELECT_NONE:
543 fprintf( stderr, "NONE" );
544 break;
545 case SELECT_WAIT:
546 case SELECT_WAIT_ALL:
547 fprintf( stderr, "%s", data.op == SELECT_WAIT ? "WAIT" : "WAIT_ALL" );
548 if (size > offsetof( select_op_t, wait.handles ))
549 dump_handles( ",handles=", data.wait.handles,
550 min( size, sizeof(data.wait) ) - offsetof( select_op_t, wait.handles ));
551 break;
552 case SELECT_SIGNAL_AND_WAIT:
553 fprintf( stderr, "SIGNAL_AND_WAIT,signal=%04x,wait=%04x",
554 data.signal_and_wait.signal, data.signal_and_wait.wait );
555 break;
556 case SELECT_KEYED_EVENT_WAIT:
557 case SELECT_KEYED_EVENT_RELEASE:
558 fprintf( stderr, "KEYED_EVENT_%s,handle=%04x",
559 data.op == SELECT_KEYED_EVENT_WAIT ? "WAIT" : "RELEASE",
560 data.keyed_event.handle );
561 dump_uint64( ",key=", &data.keyed_event.key );
562 break;
563 default:
564 fprintf( stderr, "op=%u", data.op );
565 break;
567 fputc( '}', stderr );
568 remove_data( size );
571 static void dump_varargs_user_handles( const char *prefix, data_size_t size )
573 const user_handle_t *data = cur_data;
574 data_size_t len = size / sizeof(*data);
576 fprintf( stderr,"%s{", prefix );
577 while (len > 0)
579 fprintf( stderr, "%08x", *data++ );
580 if (--len) fputc( ',', stderr );
582 fputc( '}', stderr );
583 remove_data( size );
586 static void dump_varargs_bytes( const char *prefix, data_size_t size )
588 const unsigned char *data = cur_data;
589 data_size_t len = min( 1024, size );
591 fprintf( stderr,"%s{", prefix );
592 while (len > 0)
594 fprintf( stderr, "%02x", *data++ );
595 if (--len) fputc( ',', stderr );
597 if (size > 1024) fprintf( stderr, "...(total %u)", size );
598 fputc( '}', stderr );
599 remove_data( size );
602 static void dump_varargs_string( const char *prefix, data_size_t size )
604 fprintf( stderr, "%s\"%.*s\"", prefix, (int)size, (const char *)cur_data );
605 remove_data( size );
608 static void dump_varargs_unicode_str( const char *prefix, data_size_t size )
610 fprintf( stderr, "%sL\"", prefix );
611 dump_strW( cur_data, size, stderr, "\"\"" );
612 fputc( '\"', stderr );
613 remove_data( size );
616 static void dump_varargs_context( const char *prefix, data_size_t size )
618 const context_t *context = cur_data;
619 context_t ctx;
620 unsigned int i;
622 if (!size)
624 fprintf( stderr, "%s{}", prefix );
625 return;
627 size = min( size, sizeof(ctx) );
628 memset( &ctx, 0, sizeof(ctx) );
629 memcpy( &ctx, context, size );
631 switch (ctx.machine)
633 case IMAGE_FILE_MACHINE_I386:
634 fprintf( stderr, "%s{machine=i386", prefix );
635 if (ctx.flags & SERVER_CTX_CONTROL)
636 fprintf( stderr, ",eip=%08x,esp=%08x,ebp=%08x,eflags=%08x,cs=%04x,ss=%04x",
637 ctx.ctl.i386_regs.eip, ctx.ctl.i386_regs.esp, ctx.ctl.i386_regs.ebp,
638 ctx.ctl.i386_regs.eflags, ctx.ctl.i386_regs.cs, ctx.ctl.i386_regs.ss );
639 if (ctx.flags & SERVER_CTX_SEGMENTS)
640 fprintf( stderr, ",ds=%04x,es=%04x,fs=%04x,gs=%04x",
641 ctx.seg.i386_regs.ds, ctx.seg.i386_regs.es,
642 ctx.seg.i386_regs.fs, ctx.seg.i386_regs.gs );
643 if (ctx.flags & SERVER_CTX_INTEGER)
644 fprintf( stderr, ",eax=%08x,ebx=%08x,ecx=%08x,edx=%08x,esi=%08x,edi=%08x",
645 ctx.integer.i386_regs.eax, ctx.integer.i386_regs.ebx, ctx.integer.i386_regs.ecx,
646 ctx.integer.i386_regs.edx, ctx.integer.i386_regs.esi, ctx.integer.i386_regs.edi );
647 if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
648 fprintf( stderr, ",dr0=%08x,dr1=%08x,dr2=%08x,dr3=%08x,dr6=%08x,dr7=%08x",
649 ctx.debug.i386_regs.dr0, ctx.debug.i386_regs.dr1, ctx.debug.i386_regs.dr2,
650 ctx.debug.i386_regs.dr3, ctx.debug.i386_regs.dr6, ctx.debug.i386_regs.dr7 );
651 if (ctx.flags & SERVER_CTX_FLOATING_POINT)
653 fprintf( stderr, ",fp.ctrl=%08x,fp.status=%08x,fp.tag=%08x,fp.err_off=%08x,fp.err_sel=%08x",
654 ctx.fp.i386_regs.ctrl, ctx.fp.i386_regs.status, ctx.fp.i386_regs.tag,
655 ctx.fp.i386_regs.err_off, ctx.fp.i386_regs.err_sel );
656 fprintf( stderr, ",fp.data_off=%08x,fp.data_sel=%08x,fp.cr0npx=%08x",
657 ctx.fp.i386_regs.data_off, ctx.fp.i386_regs.data_sel, ctx.fp.i386_regs.cr0npx );
658 for (i = 0; i < 8; i++)
660 long double reg = 0;
661 memcpy( &reg, &ctx.fp.i386_regs.regs[10 * i], 10 );
662 fprintf( stderr, ",fp.reg%u=%Lg", i, reg );
665 if (ctx.flags & SERVER_CTX_EXTENDED_REGISTERS)
666 dump_uints( ",extended=", (const unsigned int *)ctx.ext.i386_regs,
667 sizeof(ctx.ext.i386_regs) / sizeof(int) );
668 if (ctx.flags & SERVER_CTX_YMM_REGISTERS)
669 dump_uints( ",ymm_high=", (const unsigned int *)ctx.ymm.ymm_high_regs.ymm_high,
670 sizeof(ctx.ymm.ymm_high_regs) / sizeof(int) );
671 break;
672 case IMAGE_FILE_MACHINE_AMD64:
673 fprintf( stderr, "%s{machine=x86_64", prefix );
674 if (ctx.flags & SERVER_CTX_CONTROL)
676 dump_uint64( ",rip=", &ctx.ctl.x86_64_regs.rip );
677 dump_uint64( ",rbp=", &ctx.ctl.x86_64_regs.rbp );
678 dump_uint64( ",rsp=", &ctx.ctl.x86_64_regs.rsp );
679 fprintf( stderr, ",cs=%04x,ss=%04x,flags=%08x",
680 ctx.ctl.x86_64_regs.cs, ctx.ctl.x86_64_regs.ss, ctx.ctl.x86_64_regs.flags );
682 if (ctx.flags & SERVER_CTX_INTEGER)
684 dump_uint64( ",rax=", &ctx.integer.x86_64_regs.rax );
685 dump_uint64( ",rbx=", &ctx.integer.x86_64_regs.rbx );
686 dump_uint64( ",rcx=", &ctx.integer.x86_64_regs.rcx );
687 dump_uint64( ",rdx=", &ctx.integer.x86_64_regs.rdx );
688 dump_uint64( ",rsi=", &ctx.integer.x86_64_regs.rsi );
689 dump_uint64( ",rdi=", &ctx.integer.x86_64_regs.rdi );
690 dump_uint64( ",r8=", &ctx.integer.x86_64_regs.r8 );
691 dump_uint64( ",r9=", &ctx.integer.x86_64_regs.r9 );
692 dump_uint64( ",r10=", &ctx.integer.x86_64_regs.r10 );
693 dump_uint64( ",r11=", &ctx.integer.x86_64_regs.r11 );
694 dump_uint64( ",r12=", &ctx.integer.x86_64_regs.r12 );
695 dump_uint64( ",r13=", &ctx.integer.x86_64_regs.r13 );
696 dump_uint64( ",r14=", &ctx.integer.x86_64_regs.r14 );
697 dump_uint64( ",r15=", &ctx.integer.x86_64_regs.r15 );
699 if (ctx.flags & SERVER_CTX_SEGMENTS)
700 fprintf( stderr, ",ds=%04x,es=%04x,fs=%04x,gs=%04x",
701 ctx.seg.x86_64_regs.ds, ctx.seg.x86_64_regs.es,
702 ctx.seg.x86_64_regs.fs, ctx.seg.x86_64_regs.gs );
703 if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
705 dump_uint64( ",dr0=", &ctx.debug.x86_64_regs.dr0 );
706 dump_uint64( ",dr1=", &ctx.debug.x86_64_regs.dr1 );
707 dump_uint64( ",dr2=", &ctx.debug.x86_64_regs.dr2 );
708 dump_uint64( ",dr3=", &ctx.debug.x86_64_regs.dr3 );
709 dump_uint64( ",dr6=", &ctx.debug.x86_64_regs.dr6 );
710 dump_uint64( ",dr7=", &ctx.debug.x86_64_regs.dr7 );
712 if (ctx.flags & SERVER_CTX_FLOATING_POINT)
714 for (i = 0; i < 32; i++)
715 fprintf( stderr, ",fp%u=%08x%08x%08x%08x", i,
716 (unsigned int)(ctx.fp.x86_64_regs.fpregs[i].high >> 32),
717 (unsigned int)ctx.fp.x86_64_regs.fpregs[i].high,
718 (unsigned int)(ctx.fp.x86_64_regs.fpregs[i].low >> 32),
719 (unsigned int)ctx.fp.x86_64_regs.fpregs[i].low );
721 if (ctx.flags & SERVER_CTX_YMM_REGISTERS)
722 dump_uints( ",ymm_high=", (const unsigned int *)ctx.ymm.ymm_high_regs.ymm_high,
723 sizeof(ctx.ymm.ymm_high_regs) / sizeof(int) );
724 break;
725 case IMAGE_FILE_MACHINE_ARMNT:
726 fprintf( stderr, "%s{machine=arm", prefix );
727 if (ctx.flags & SERVER_CTX_CONTROL)
728 fprintf( stderr, ",sp=%08x,lr=%08x,pc=%08x,cpsr=%08x",
729 ctx.ctl.arm_regs.sp, ctx.ctl.arm_regs.lr,
730 ctx.ctl.arm_regs.pc, ctx.ctl.arm_regs.cpsr );
731 if (ctx.flags & SERVER_CTX_INTEGER)
732 for (i = 0; i < 13; i++) fprintf( stderr, ",r%u=%08x", i, ctx.integer.arm_regs.r[i] );
733 if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
735 for (i = 0; i < 8; i++)
736 fprintf( stderr, ",bcr%u=%08x,bvr%u=%08x",
737 i, ctx.debug.arm_regs.bcr[i], i, ctx.debug.arm_regs.bvr[i] );
738 fprintf( stderr, ",wcr0=%08x,wvr0=%08x",
739 ctx.debug.arm_regs.wcr[0], ctx.debug.arm_regs.wvr[0] );
741 if (ctx.flags & SERVER_CTX_FLOATING_POINT)
743 for (i = 0; i < 32; i++)
745 fprintf( stderr, ",d%u=", i );
746 dump_uint64( "", &ctx.fp.arm_regs.d[i] );
748 fprintf( stderr, ",fpscr=%08x", ctx.fp.arm_regs.fpscr );
750 break;
751 case IMAGE_FILE_MACHINE_ARM64:
752 fprintf( stderr, "%s{machine=arm64", prefix );
753 if (ctx.flags & SERVER_CTX_CONTROL)
755 dump_uint64( ",sp=", &ctx.ctl.arm64_regs.sp );
756 dump_uint64( ",pc=", &ctx.ctl.arm64_regs.pc );
757 dump_uint64( ",pstate=", &ctx.ctl.arm64_regs.pstate );
759 if (ctx.flags & SERVER_CTX_INTEGER)
761 for (i = 0; i < 31; i++)
763 fprintf( stderr, ",x%u=", i );
764 dump_uint64( "", &ctx.integer.arm64_regs.x[i] );
767 if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
769 for (i = 0; i < 8; i++)
771 fprintf( stderr, ",bcr%u=%08x,bvr%u=", i, ctx.debug.arm64_regs.bcr[i], i );
772 dump_uint64( "", &ctx.debug.arm64_regs.bvr[i] );
774 for (i = 0; i < 2; i++)
776 fprintf( stderr, ",wcr%u=%08x,wvr%u=", i, ctx.debug.arm64_regs.wcr[i], i );
777 dump_uint64( "", &ctx.debug.arm64_regs.wvr[i] );
780 if (ctx.flags & SERVER_CTX_FLOATING_POINT)
782 for (i = 0; i < 32; i++)
784 fprintf( stderr, ",q%u=", i );
785 dump_uint64( "", &ctx.fp.arm64_regs.q[i].high );
786 dump_uint64( "", &ctx.fp.arm64_regs.q[i].low );
788 fprintf( stderr, ",fpcr=%08x,fpsr=%08x", ctx.fp.arm64_regs.fpcr, ctx.fp.arm64_regs.fpsr );
790 break;
791 default:
792 fprintf( stderr, "%s{machine=%04x", prefix, ctx.machine );
793 break;
795 fputc( '}', stderr );
796 remove_data( size );
799 static void dump_varargs_debug_event( const char *prefix, data_size_t size )
801 debug_event_t event;
802 unsigned int i;
804 if (!size)
806 fprintf( stderr, "%s{}", prefix );
807 return;
809 size = min( size, sizeof(event) );
810 memset( &event, 0, sizeof(event) );
811 memcpy( &event, cur_data, size );
813 switch(event.code)
815 case DbgIdle:
816 fprintf( stderr, "%s{idle}", prefix );
817 break;
818 case DbgReplyPending:
819 fprintf( stderr, "%s{pending}", prefix );
820 break;
821 case DbgCreateThreadStateChange:
822 fprintf( stderr, "%s{create_thread,thread=%04x", prefix, event.create_thread.handle );
823 dump_uint64( ",start=", &event.create_thread.start );
824 fputc( '}', stderr );
825 break;
826 case DbgCreateProcessStateChange:
827 fprintf( stderr, "%s{create_process,file=%04x,process=%04x,thread=%04x", prefix,
828 event.create_process.file, event.create_process.process,
829 event.create_process.thread );
830 dump_uint64( ",base=", &event.create_process.base );
831 fprintf( stderr, ",offset=%d,size=%d",
832 event.create_process.dbg_offset, event.create_process.dbg_size );
833 dump_uint64( ",start=", &event.create_process.start );
834 fputc( '}', stderr );
835 break;
836 case DbgExitThreadStateChange:
837 fprintf( stderr, "%s{exit_thread,code=%d}", prefix, event.exit.exit_code );
838 break;
839 case DbgExitProcessStateChange:
840 fprintf( stderr, "%s{exit_process,code=%d}", prefix, event.exit.exit_code );
841 break;
842 case DbgExceptionStateChange:
843 case DbgBreakpointStateChange:
844 case DbgSingleStepStateChange:
845 fprintf( stderr, "%s{%s,first=%d,exc_code=%08x,flags=%08x", prefix,
846 event.code == DbgBreakpointStateChange ? "breakpoint" :
847 event.code == DbgSingleStepStateChange ? "singlestep" : "exception",
848 event.exception.first, event.exception.exc_code, event.exception.flags );
849 dump_uint64( ",record=", &event.exception.record );
850 dump_uint64( ",address=", &event.exception.address );
851 fprintf( stderr, ",params={" );
852 event.exception.nb_params = min( event.exception.nb_params, EXCEPTION_MAXIMUM_PARAMETERS );
853 for (i = 0; i < event.exception.nb_params; i++)
855 dump_uint64( "", &event.exception.params[i] );
856 if (i < event.exception.nb_params) fputc( ',', stderr );
858 fprintf( stderr, "}}" );
859 break;
860 case DbgLoadDllStateChange:
861 fprintf( stderr, "%s{load_dll,file=%04x", prefix, event.load_dll.handle );
862 dump_uint64( ",base=", &event.load_dll.base );
863 fprintf( stderr, ",offset=%d,size=%d",
864 event.load_dll.dbg_offset, event.load_dll.dbg_size );
865 dump_uint64( ",name=", &event.load_dll.name );
866 fputc( '}', stderr );
867 break;
868 case DbgUnloadDllStateChange:
869 fprintf( stderr, "%s{unload_dll", prefix );
870 dump_uint64( ",base=", &event.unload_dll.base );
871 fputc( '}', stderr );
872 break;
873 default:
874 fprintf( stderr, "%s{code=??? (%d)}", prefix, event.code );
875 break;
877 remove_data( size );
880 /* dump a unicode string contained in a buffer; helper for dump_varargs_startup_info */
881 static data_size_t dump_inline_unicode_string( const char *prefix, data_size_t pos, data_size_t len, data_size_t total_size )
883 fputs( prefix, stderr );
884 if (pos >= total_size) return pos;
885 if (len > total_size - pos) len = total_size - pos;
886 dump_strW( (const WCHAR *)cur_data + pos/sizeof(WCHAR), len, stderr, "\"\"" );
887 return pos + (len / sizeof(WCHAR)) * sizeof(WCHAR);
890 static void dump_varargs_startup_info( const char *prefix, data_size_t size )
892 startup_info_t info;
893 data_size_t pos = sizeof(info);
895 memset( &info, 0, sizeof(info) );
896 memcpy( &info, cur_data, min( size, sizeof(info) ));
898 fprintf( stderr,
899 "%s{debug_flags=%x,console_flags=%x,console=%04x,hstdin=%04x,hstdout=%04x,hstderr=%04x,"
900 "x=%u,y=%u,xsize=%u,ysize=%u,xchars=%u,ychars=%u,attribute=%02x,flags=%x,show=%u",
901 prefix, info.debug_flags, info.console_flags, info.console,
902 info.hstdin, info.hstdout, info.hstderr, info.x, info.y, info.xsize, info.ysize,
903 info.xchars, info.ychars, info.attribute, info.flags, info.show );
904 pos = dump_inline_unicode_string( ",curdir=L\"", pos, info.curdir_len, size );
905 pos = dump_inline_unicode_string( "\",dllpath=L\"", pos, info.dllpath_len, size );
906 pos = dump_inline_unicode_string( "\",imagepath=L\"", pos, info.imagepath_len, size );
907 pos = dump_inline_unicode_string( "\",cmdline=L\"", pos, info.cmdline_len, size );
908 pos = dump_inline_unicode_string( "\",title=L\"", pos, info.title_len, size );
909 pos = dump_inline_unicode_string( "\",desktop=L\"", pos, info.desktop_len, size );
910 pos = dump_inline_unicode_string( "\",shellinfo=L\"", pos, info.shellinfo_len, size );
911 pos = dump_inline_unicode_string( "\",runtime=L\"", pos, info.runtime_len, size );
912 fprintf( stderr, "\"}" );
913 remove_data( size );
916 static void dump_varargs_rectangles( const char *prefix, data_size_t size )
918 const rectangle_t *rect = cur_data;
919 data_size_t len = size / sizeof(*rect);
921 fprintf( stderr,"%s{", prefix );
922 while (len > 0)
924 dump_rectangle( "", rect++ );
925 if (--len) fputc( ',', stderr );
927 fputc( '}', stderr );
928 remove_data( size );
931 static void dump_varargs_cursor_positions( const char *prefix, data_size_t size )
933 const cursor_pos_t *pos = cur_data;
934 data_size_t len = size / sizeof(*pos);
936 fprintf( stderr, "%s{", prefix );
937 while (len > 0)
939 fprintf( stderr, "{x=%d,y=%d,time=%u", pos->x, pos->y, pos->time );
940 dump_uint64( ",info=", &pos->info );
941 fputc( '}', stderr );
942 pos++;
943 if (--len) fputc( ',', stderr );
945 fputc( '}', stderr );
946 remove_data( size );
949 static void dump_varargs_message_data( const char *prefix, data_size_t size )
951 /* FIXME: dump the structured data */
952 dump_varargs_bytes( prefix, size );
955 static void dump_varargs_properties( const char *prefix, data_size_t size )
957 const property_data_t *prop = cur_data;
958 data_size_t len = size / sizeof(*prop);
960 fprintf( stderr,"%s{", prefix );
961 while (len > 0)
963 fprintf( stderr, "{atom=%04x,str=%d", prop->atom, prop->string );
964 dump_uint64( ",data=", &prop->data );
965 fputc( '}', stderr );
966 prop++;
967 if (--len) fputc( ',', stderr );
969 fputc( '}', stderr );
970 remove_data( size );
973 static void dump_varargs_LUID_AND_ATTRIBUTES( const char *prefix, data_size_t size )
975 const LUID_AND_ATTRIBUTES *lat = cur_data;
976 data_size_t len = size / sizeof(*lat);
978 fprintf( stderr,"%s{", prefix );
979 while (len > 0)
981 fprintf( stderr, "{luid=%08x%08x,attr=%x}",
982 lat->Luid.HighPart, lat->Luid.LowPart, lat->Attributes );
983 lat++;
984 if (--len) fputc( ',', stderr );
986 fputc( '}', stderr );
987 remove_data( size );
990 static void dump_inline_sid( const char *prefix, const SID *sid, data_size_t size )
992 DWORD i;
994 /* security check */
995 if ((FIELD_OFFSET(SID, SubAuthority[0]) > size) ||
996 (FIELD_OFFSET(SID, SubAuthority[sid->SubAuthorityCount]) > size))
998 fprintf( stderr, "<invalid sid>" );
999 return;
1002 fprintf( stderr,"%s{", prefix );
1003 fprintf( stderr, "S-%u-%u", sid->Revision, MAKELONG(
1004 MAKEWORD( sid->IdentifierAuthority.Value[5],
1005 sid->IdentifierAuthority.Value[4] ),
1006 MAKEWORD( sid->IdentifierAuthority.Value[3],
1007 sid->IdentifierAuthority.Value[2] ) ) );
1008 for (i = 0; i < sid->SubAuthorityCount; i++)
1009 fprintf( stderr, "-%u", sid->SubAuthority[i] );
1010 fputc( '}', stderr );
1013 static void dump_varargs_SID( const char *prefix, data_size_t size )
1015 const SID *sid = cur_data;
1016 dump_inline_sid( prefix, sid, size );
1017 remove_data( size );
1020 static void dump_inline_acl( const char *prefix, const ACL *acl, data_size_t size )
1022 const ACE_HEADER *ace;
1023 ULONG i;
1025 fprintf( stderr,"%s{", prefix );
1026 if (size)
1028 if (size < sizeof(ACL))
1030 fprintf( stderr, "<invalid acl>}" );
1031 return;
1033 size -= sizeof(ACL);
1034 ace = (const ACE_HEADER *)(acl + 1);
1035 for (i = 0; i < acl->AceCount; i++)
1037 const SID *sid = NULL;
1038 data_size_t sid_size = 0;
1040 if (size < sizeof(ACE_HEADER) || size < ace->AceSize) break;
1041 size -= ace->AceSize;
1042 if (i != 0) fputc( ',', stderr );
1043 fprintf( stderr, "{AceType=" );
1044 switch (ace->AceType)
1046 case ACCESS_DENIED_ACE_TYPE:
1047 sid = (const SID *)&((const ACCESS_DENIED_ACE *)ace)->SidStart;
1048 sid_size = ace->AceSize - FIELD_OFFSET(ACCESS_DENIED_ACE, SidStart);
1049 fprintf( stderr, "ACCESS_DENIED_ACE_TYPE,Mask=%x",
1050 ((const ACCESS_DENIED_ACE *)ace)->Mask );
1051 break;
1052 case ACCESS_ALLOWED_ACE_TYPE:
1053 sid = (const SID *)&((const ACCESS_ALLOWED_ACE *)ace)->SidStart;
1054 sid_size = ace->AceSize - FIELD_OFFSET(ACCESS_ALLOWED_ACE, SidStart);
1055 fprintf( stderr, "ACCESS_ALLOWED_ACE_TYPE,Mask=%x",
1056 ((const ACCESS_ALLOWED_ACE *)ace)->Mask );
1057 break;
1058 case SYSTEM_AUDIT_ACE_TYPE:
1059 sid = (const SID *)&((const SYSTEM_AUDIT_ACE *)ace)->SidStart;
1060 sid_size = ace->AceSize - FIELD_OFFSET(SYSTEM_AUDIT_ACE, SidStart);
1061 fprintf( stderr, "SYSTEM_AUDIT_ACE_TYPE,Mask=%x",
1062 ((const SYSTEM_AUDIT_ACE *)ace)->Mask );
1063 break;
1064 case SYSTEM_ALARM_ACE_TYPE:
1065 sid = (const SID *)&((const SYSTEM_ALARM_ACE *)ace)->SidStart;
1066 sid_size = ace->AceSize - FIELD_OFFSET(SYSTEM_ALARM_ACE, SidStart);
1067 fprintf( stderr, "SYSTEM_ALARM_ACE_TYPE,Mask=%x",
1068 ((const SYSTEM_ALARM_ACE *)ace)->Mask );
1069 break;
1070 case SYSTEM_MANDATORY_LABEL_ACE_TYPE:
1071 sid = (const SID *)&((const SYSTEM_MANDATORY_LABEL_ACE *)ace)->SidStart;
1072 sid_size = ace->AceSize - FIELD_OFFSET(SYSTEM_MANDATORY_LABEL_ACE, SidStart);
1073 fprintf( stderr, "SYSTEM_MANDATORY_LABEL_ACE_TYPE,Mask=%x",
1074 ((const SYSTEM_MANDATORY_LABEL_ACE *)ace)->Mask );
1075 break;
1076 default:
1077 fprintf( stderr, "unknown<%d>", ace->AceType );
1078 break;
1080 fprintf( stderr, ",AceFlags=%x", ace->AceFlags );
1081 if (sid)
1082 dump_inline_sid( ",Sid=", sid, sid_size );
1083 ace = (const ACE_HEADER *)((const char *)ace + ace->AceSize);
1084 fputc( '}', stderr );
1087 fputc( '}', stderr );
1090 static void dump_varargs_ACL( const char *prefix, data_size_t size )
1092 const ACL *acl = cur_data;
1093 dump_inline_acl( prefix, acl, size );
1094 remove_data( size );
1097 static void dump_inline_security_descriptor( const char *prefix, const struct security_descriptor *sd, data_size_t size )
1099 fprintf( stderr,"%s{", prefix );
1100 if (size >= sizeof(struct security_descriptor))
1102 size_t offset = sizeof(struct security_descriptor);
1103 fprintf( stderr, "control=%08x", sd->control );
1104 if ((sd->owner_len > FIELD_OFFSET(SID, SubAuthority[255])) || (offset + sd->owner_len > size))
1105 return;
1106 if (sd->owner_len)
1107 dump_inline_sid( ",owner=", (const SID *)((const char *)sd + offset), sd->owner_len );
1108 else
1109 fprintf( stderr, ",owner=<not present>" );
1110 offset += sd->owner_len;
1111 if ((sd->group_len > FIELD_OFFSET(SID, SubAuthority[255])) || (offset + sd->group_len > size))
1112 return;
1113 if (sd->group_len)
1114 dump_inline_sid( ",group=", (const SID *)((const char *)sd + offset), sd->group_len );
1115 else
1116 fprintf( stderr, ",group=<not present>" );
1117 offset += sd->group_len;
1118 if ((sd->sacl_len >= MAX_ACL_LEN) || (offset + sd->sacl_len > size))
1119 return;
1120 dump_inline_acl( ",sacl=", (const ACL *)((const char *)sd + offset), sd->sacl_len );
1121 offset += sd->sacl_len;
1122 if ((sd->dacl_len >= MAX_ACL_LEN) || (offset + sd->dacl_len > size))
1123 return;
1124 dump_inline_acl( ",dacl=", (const ACL *)((const char *)sd + offset), sd->dacl_len );
1125 offset += sd->dacl_len;
1127 fputc( '}', stderr );
1130 static void dump_varargs_security_descriptor( const char *prefix, data_size_t size )
1132 const struct security_descriptor *sd = cur_data;
1133 dump_inline_security_descriptor( prefix, sd, size );
1134 remove_data( size );
1137 static void dump_varargs_token_groups( const char *prefix, data_size_t size )
1139 const struct token_groups *tg = cur_data;
1141 fprintf( stderr,"%s{", prefix );
1142 if (size >= sizeof(struct token_groups))
1144 size_t offset = sizeof(*tg);
1145 fprintf( stderr, "count=%08x,", tg->count );
1146 if (tg->count * sizeof(unsigned int) <= size)
1148 unsigned int i;
1149 const unsigned int *attr = (const unsigned int *)(tg + 1);
1151 offset += tg->count * sizeof(unsigned int);
1153 fputc( '[', stderr );
1154 for (i = 0; i < tg->count; i++)
1156 const SID *sid = (const SID *)((const char *)cur_data + offset);
1157 if (i != 0)
1158 fputc( ',', stderr );
1159 fputc( '{', stderr );
1160 fprintf( stderr, "attributes=%08x", attr[i] );
1161 dump_inline_sid( ",sid=", sid, size - offset );
1162 if ((offset + FIELD_OFFSET(SID, SubAuthority[0]) > size) ||
1163 (offset + FIELD_OFFSET(SID, SubAuthority[sid->SubAuthorityCount]) > size))
1164 break;
1165 offset += FIELD_OFFSET(SID, SubAuthority[sid->SubAuthorityCount]);
1166 fputc( '}', stderr );
1168 fputc( ']', stderr );
1171 fputc( '}', stderr );
1174 static void dump_varargs_process_info( const char *prefix, data_size_t size )
1176 data_size_t pos = 0;
1177 unsigned int i;
1179 fprintf( stderr,"%s{", prefix );
1181 while (size - pos >= sizeof(struct process_info))
1183 const struct process_info *process;
1184 pos = (pos + 7) & ~7;
1185 process = (const struct process_info *)((const char *)cur_data + pos);
1186 if (size - pos < sizeof(*process)) break;
1187 if (pos) fputc( ',', stderr );
1188 dump_timeout( "{start_time=", &process->start_time );
1189 fprintf( stderr, ",thread_count=%u,priority=%d,pid=%04x,parent_pid=%04x,handle_count=%u,unix_pid=%d,",
1190 process->thread_count, process->priority, process->pid,
1191 process->parent_pid, process->handle_count, process->unix_pid );
1192 pos += sizeof(*process);
1194 pos = dump_inline_unicode_string( "name=L\"", pos, process->name_len, size );
1196 pos = (pos + 7) & ~7;
1197 fprintf( stderr, "\",threads={" );
1198 for (i = 0; i < process->thread_count; i++)
1200 const struct thread_info *thread = (const struct thread_info *)((const char *)cur_data + pos);
1201 if (size - pos < sizeof(*thread)) break;
1202 if (i) fputc( ',', stderr );
1203 dump_timeout( "{start_time=", &thread->start_time );
1204 fprintf( stderr, ",tid=%04x,base_priority=%d,current_priority=%d,unix_tid=%d}",
1205 thread->tid, thread->base_priority, thread->current_priority, thread->unix_tid );
1206 pos += sizeof(*thread);
1208 fprintf( stderr, "}}" );
1210 fputc( '}', stderr );
1211 remove_data( size );
1214 static void dump_varargs_object_attributes( const char *prefix, data_size_t size )
1216 const struct object_attributes *objattr = cur_data;
1218 fprintf( stderr,"%s{", prefix );
1219 if (size)
1221 const WCHAR *str;
1223 if (size < sizeof(*objattr) ||
1224 (size - sizeof(*objattr) < objattr->sd_len) ||
1225 (size - sizeof(*objattr) - objattr->sd_len < objattr->name_len))
1227 fprintf( stderr, "***invalid***}" );
1228 remove_data( size );
1229 return;
1232 fprintf( stderr, "rootdir=%04x,attributes=%08x", objattr->rootdir, objattr->attributes );
1233 dump_inline_security_descriptor( ",sd=", (const struct security_descriptor *)(objattr + 1), objattr->sd_len );
1234 str = (const WCHAR *)objattr + (sizeof(*objattr) + objattr->sd_len) / sizeof(WCHAR);
1235 fprintf( stderr, ",name=L\"" );
1236 dump_strW( str, objattr->name_len, stderr, "\"\"" );
1237 fputc( '\"', stderr );
1238 remove_data( (sizeof(*objattr) + (objattr->sd_len & ~1) + (objattr->name_len & ~1) + 3) & ~3 );
1240 fputc( '}', stderr );
1243 static void dump_varargs_object_type_info( const char *prefix, data_size_t size )
1245 const struct object_type_info *info = cur_data;
1247 fprintf( stderr,"%s{", prefix );
1248 if (size)
1250 if (size < sizeof(*info) || (size - sizeof(*info) < info->name_len))
1252 fprintf( stderr, "***invalid***}" );
1253 remove_data( size );
1254 return;
1257 fprintf( stderr, "index=%u,obj_count=%u,handle_count=%u,obj_max=%u,handle_max=%u,valid=%08x",
1258 info->index,info->obj_count, info->handle_count, info->obj_max, info->handle_max,
1259 info->valid_access );
1260 dump_generic_map( ",access=", &info->mapping );
1261 fprintf( stderr, ",name=L\"" );
1262 dump_strW( (const WCHAR *)(info + 1), info->name_len, stderr, "\"\"" );
1263 fputc( '\"', stderr );
1264 remove_data( min( size, sizeof(*info) + ((info->name_len + 2) & ~3 )));
1266 fputc( '}', stderr );
1269 static void dump_varargs_object_types_info( const char *prefix, data_size_t size )
1271 fprintf( stderr,"%s{", prefix );
1272 while (cur_size) dump_varargs_object_type_info( ",", cur_size );
1273 fputc( '}', stderr );
1276 static void dump_varargs_filesystem_event( const char *prefix, data_size_t size )
1278 static const char * const actions[] = {
1279 NULL,
1280 "ADDED",
1281 "REMOVED",
1282 "MODIFIED",
1283 "RENAMED_OLD_NAME",
1284 "RENAMED_NEW_NAME",
1285 "ADDED_STREAM",
1286 "REMOVED_STREAM",
1287 "MODIFIED_STREAM"
1290 fprintf( stderr,"%s{", prefix );
1291 while (size)
1293 const struct filesystem_event *event = cur_data;
1294 data_size_t len = (offsetof( struct filesystem_event, name[event->len] ) + sizeof(int)-1)
1295 / sizeof(int) * sizeof(int);
1296 if (size < len) break;
1297 if (event->action < ARRAY_SIZE( actions ) && actions[event->action])
1298 fprintf( stderr, "{action=%s", actions[event->action] );
1299 else
1300 fprintf( stderr, "{action=%u", event->action );
1301 fprintf( stderr, ",name=\"%.*s\"}", event->len, event->name );
1302 size -= len;
1303 remove_data( len );
1304 if (size)fputc( ',', stderr );
1306 fputc( '}', stderr );
1309 static void dump_varargs_pe_image_info( const char *prefix, data_size_t size )
1311 pe_image_info_t info;
1313 if (!size)
1315 fprintf( stderr, "%s{}", prefix );
1316 return;
1318 memset( &info, 0, sizeof(info) );
1319 memcpy( &info, cur_data, min( size, sizeof(info) ));
1321 fprintf( stderr, "%s{", prefix );
1322 dump_uint64( "base=", &info.base );
1323 dump_uint64( ",entry_point=", &info.entry_point );
1324 dump_uint64( ",map_size=", &info.map_size );
1325 dump_uint64( ",stack_size=", &info.stack_size );
1326 dump_uint64( ",stack_commit=", &info.stack_commit );
1327 fprintf( stderr, ",zerobits=%08x,subsystem=%08x,subsystem_minor=%04x,subsystem_major=%04x"
1328 ",osversion_major=%04x,osversion_minor=%04x,image_charact=%04x,dll_charact=%04x,machine=%04x"
1329 ",contains_code=%u,image_flags=%02x"
1330 ",loader_flags=%08x,header_size=%08x,file_size=%08x,checksum=%08x}",
1331 info.zerobits, info.subsystem, info.subsystem_minor, info.subsystem_major,
1332 info.osversion_major, info.osversion_minor, info.image_charact, info.dll_charact,
1333 info.machine, info.contains_code, info.image_flags, info.loader_flags,
1334 info.header_size, info.file_size, info.checksum );
1335 remove_data( min( size, sizeof(info) ));
1338 static void dump_varargs_rawinput_devices(const char *prefix, data_size_t size )
1340 const struct rawinput_device *device;
1342 fprintf( stderr, "%s{", prefix );
1343 while (size >= sizeof(*device))
1345 device = cur_data;
1346 fprintf( stderr, "{usage_page=%04x,usage=%04x,flags=%08x,target=%08x}",
1347 device->usage_page, device->usage, device->flags, device->target );
1348 size -= sizeof(*device);
1349 remove_data( sizeof(*device) );
1350 if (size) fputc( ',', stderr );
1352 fputc( '}', stderr );
1355 static void dump_varargs_handle_infos( const char *prefix, data_size_t size )
1357 const struct handle_info *handle;
1359 fprintf( stderr, "%s{", prefix );
1360 while (size >= sizeof(*handle))
1362 handle = cur_data;
1363 fprintf( stderr, "{owner=%04x,handle=%04x,access=%08x,attributes=%08x,type=%u}",
1364 handle->owner, handle->handle, handle->access, handle->attributes, handle->type );
1365 size -= sizeof(*handle);
1366 remove_data( sizeof(*handle) );
1367 if (size) fputc( ',', stderr );
1369 fputc( '}', stderr );
1372 static void dump_varargs_poll_socket_input( const char *prefix, data_size_t size )
1374 const struct poll_socket_input *input;
1376 fprintf( stderr, "%s{", prefix );
1377 while (size >= sizeof(*input))
1379 input = cur_data;
1380 fprintf( stderr, "{socket=%04x,flags=%08x}", input->socket, input->flags );
1381 size -= sizeof(*input);
1382 remove_data( sizeof(*input) );
1383 if (size) fputc( ',', stderr );
1385 fputc( '}', stderr );
1388 static void dump_varargs_poll_socket_output( const char *prefix, data_size_t size )
1390 const struct poll_socket_output *output;
1392 fprintf( stderr, "%s{", prefix );
1393 while (size >= sizeof(*output))
1395 output = cur_data;
1396 fprintf( stderr, "{flags=%08x,status=%s}", output->flags, get_status_name( output->status ) );
1397 size -= sizeof(*output);
1398 remove_data( sizeof(*output) );
1399 if (size) fputc( ',', stderr );
1401 fputc( '}', stderr );
1404 typedef void (*dump_func)( const void *req );
1406 /* Everything below this line is generated automatically by tools/make_requests */
1407 /* ### make_requests begin ### */
1409 static void dump_new_process_request( const struct new_process_request *req )
1411 fprintf( stderr, " token=%04x", req->token );
1412 fprintf( stderr, ", debug=%04x", req->debug );
1413 fprintf( stderr, ", parent_process=%04x", req->parent_process );
1414 fprintf( stderr, ", flags=%08x", req->flags );
1415 fprintf( stderr, ", socket_fd=%d", req->socket_fd );
1416 fprintf( stderr, ", access=%08x", req->access );
1417 fprintf( stderr, ", machine=%04x", req->machine );
1418 fprintf( stderr, ", info_size=%u", req->info_size );
1419 fprintf( stderr, ", handles_size=%u", req->handles_size );
1420 fprintf( stderr, ", jobs_size=%u", req->jobs_size );
1421 dump_varargs_object_attributes( ", objattr=", cur_size );
1422 dump_varargs_uints( ", handles=", min(cur_size,req->handles_size) );
1423 dump_varargs_uints( ", jobs=", min(cur_size,req->jobs_size) );
1424 dump_varargs_startup_info( ", info=", min(cur_size,req->info_size) );
1425 dump_varargs_unicode_str( ", env=", cur_size );
1428 static void dump_new_process_reply( const struct new_process_reply *req )
1430 fprintf( stderr, " info=%04x", req->info );
1431 fprintf( stderr, ", pid=%04x", req->pid );
1432 fprintf( stderr, ", handle=%04x", req->handle );
1435 static void dump_get_new_process_info_request( const struct get_new_process_info_request *req )
1437 fprintf( stderr, " info=%04x", req->info );
1440 static void dump_get_new_process_info_reply( const struct get_new_process_info_reply *req )
1442 fprintf( stderr, " success=%d", req->success );
1443 fprintf( stderr, ", exit_code=%d", req->exit_code );
1446 static void dump_new_thread_request( const struct new_thread_request *req )
1448 fprintf( stderr, " process=%04x", req->process );
1449 fprintf( stderr, ", access=%08x", req->access );
1450 fprintf( stderr, ", suspend=%d", req->suspend );
1451 fprintf( stderr, ", request_fd=%d", req->request_fd );
1452 dump_varargs_object_attributes( ", objattr=", cur_size );
1455 static void dump_new_thread_reply( const struct new_thread_reply *req )
1457 fprintf( stderr, " tid=%04x", req->tid );
1458 fprintf( stderr, ", handle=%04x", req->handle );
1461 static void dump_get_startup_info_request( const struct get_startup_info_request *req )
1465 static void dump_get_startup_info_reply( const struct get_startup_info_reply *req )
1467 fprintf( stderr, " info_size=%u", req->info_size );
1468 dump_varargs_startup_info( ", info=", min(cur_size,req->info_size) );
1469 dump_varargs_unicode_str( ", env=", cur_size );
1472 static void dump_init_process_done_request( const struct init_process_done_request *req )
1474 dump_uint64( " teb=", &req->teb );
1475 dump_uint64( ", peb=", &req->peb );
1476 dump_uint64( ", ldt_copy=", &req->ldt_copy );
1479 static void dump_init_process_done_reply( const struct init_process_done_reply *req )
1481 dump_uint64( " entry=", &req->entry );
1482 fprintf( stderr, ", suspend=%d", req->suspend );
1485 static void dump_init_first_thread_request( const struct init_first_thread_request *req )
1487 fprintf( stderr, " unix_pid=%d", req->unix_pid );
1488 fprintf( stderr, ", unix_tid=%d", req->unix_tid );
1489 fprintf( stderr, ", debug_level=%d", req->debug_level );
1490 fprintf( stderr, ", reply_fd=%d", req->reply_fd );
1491 fprintf( stderr, ", wait_fd=%d", req->wait_fd );
1494 static void dump_init_first_thread_reply( const struct init_first_thread_reply *req )
1496 fprintf( stderr, " pid=%04x", req->pid );
1497 fprintf( stderr, ", tid=%04x", req->tid );
1498 dump_timeout( ", server_start=", &req->server_start );
1499 fprintf( stderr, ", info_size=%u", req->info_size );
1500 dump_varargs_ushorts( ", machines=", cur_size );
1503 static void dump_init_thread_request( const struct init_thread_request *req )
1505 fprintf( stderr, " unix_tid=%d", req->unix_tid );
1506 fprintf( stderr, ", reply_fd=%d", req->reply_fd );
1507 fprintf( stderr, ", wait_fd=%d", req->wait_fd );
1508 dump_uint64( ", teb=", &req->teb );
1509 dump_uint64( ", entry=", &req->entry );
1512 static void dump_init_thread_reply( const struct init_thread_reply *req )
1514 fprintf( stderr, " pid=%04x", req->pid );
1515 fprintf( stderr, ", tid=%04x", req->tid );
1516 fprintf( stderr, ", suspend=%d", req->suspend );
1519 static void dump_terminate_process_request( const struct terminate_process_request *req )
1521 fprintf( stderr, " handle=%04x", req->handle );
1522 fprintf( stderr, ", exit_code=%d", req->exit_code );
1525 static void dump_terminate_process_reply( const struct terminate_process_reply *req )
1527 fprintf( stderr, " self=%d", req->self );
1530 static void dump_terminate_thread_request( const struct terminate_thread_request *req )
1532 fprintf( stderr, " handle=%04x", req->handle );
1533 fprintf( stderr, ", exit_code=%d", req->exit_code );
1536 static void dump_terminate_thread_reply( const struct terminate_thread_reply *req )
1538 fprintf( stderr, " self=%d", req->self );
1541 static void dump_get_process_info_request( const struct get_process_info_request *req )
1543 fprintf( stderr, " handle=%04x", req->handle );
1546 static void dump_get_process_info_reply( const struct get_process_info_reply *req )
1548 fprintf( stderr, " pid=%04x", req->pid );
1549 fprintf( stderr, ", ppid=%04x", req->ppid );
1550 dump_uint64( ", affinity=", &req->affinity );
1551 dump_uint64( ", peb=", &req->peb );
1552 dump_timeout( ", start_time=", &req->start_time );
1553 dump_timeout( ", end_time=", &req->end_time );
1554 fprintf( stderr, ", exit_code=%d", req->exit_code );
1555 fprintf( stderr, ", priority=%d", req->priority );
1556 fprintf( stderr, ", machine=%04x", req->machine );
1557 dump_varargs_pe_image_info( ", image=", cur_size );
1560 static void dump_get_process_debug_info_request( const struct get_process_debug_info_request *req )
1562 fprintf( stderr, " handle=%04x", req->handle );
1565 static void dump_get_process_debug_info_reply( const struct get_process_debug_info_reply *req )
1567 fprintf( stderr, " debug=%04x", req->debug );
1568 fprintf( stderr, ", debug_children=%d", req->debug_children );
1569 dump_varargs_pe_image_info( ", image=", cur_size );
1572 static void dump_get_process_image_name_request( const struct get_process_image_name_request *req )
1574 fprintf( stderr, " handle=%04x", req->handle );
1575 fprintf( stderr, ", win32=%d", req->win32 );
1578 static void dump_get_process_image_name_reply( const struct get_process_image_name_reply *req )
1580 fprintf( stderr, " len=%u", req->len );
1581 dump_varargs_unicode_str( ", name=", cur_size );
1584 static void dump_get_process_vm_counters_request( const struct get_process_vm_counters_request *req )
1586 fprintf( stderr, " handle=%04x", req->handle );
1589 static void dump_get_process_vm_counters_reply( const struct get_process_vm_counters_reply *req )
1591 dump_uint64( " peak_virtual_size=", &req->peak_virtual_size );
1592 dump_uint64( ", virtual_size=", &req->virtual_size );
1593 dump_uint64( ", peak_working_set_size=", &req->peak_working_set_size );
1594 dump_uint64( ", working_set_size=", &req->working_set_size );
1595 dump_uint64( ", pagefile_usage=", &req->pagefile_usage );
1596 dump_uint64( ", peak_pagefile_usage=", &req->peak_pagefile_usage );
1599 static void dump_set_process_info_request( const struct set_process_info_request *req )
1601 fprintf( stderr, " handle=%04x", req->handle );
1602 fprintf( stderr, ", mask=%d", req->mask );
1603 fprintf( stderr, ", priority=%d", req->priority );
1604 dump_uint64( ", affinity=", &req->affinity );
1607 static void dump_get_thread_info_request( const struct get_thread_info_request *req )
1609 fprintf( stderr, " handle=%04x", req->handle );
1610 fprintf( stderr, ", access=%08x", req->access );
1613 static void dump_get_thread_info_reply( const struct get_thread_info_reply *req )
1615 fprintf( stderr, " pid=%04x", req->pid );
1616 fprintf( stderr, ", tid=%04x", req->tid );
1617 dump_uint64( ", teb=", &req->teb );
1618 dump_uint64( ", entry_point=", &req->entry_point );
1619 dump_uint64( ", affinity=", &req->affinity );
1620 fprintf( stderr, ", exit_code=%d", req->exit_code );
1621 fprintf( stderr, ", priority=%d", req->priority );
1622 fprintf( stderr, ", last=%d", req->last );
1623 fprintf( stderr, ", suspend_count=%d", req->suspend_count );
1624 fprintf( stderr, ", dbg_hidden=%d", req->dbg_hidden );
1625 fprintf( stderr, ", desc_len=%u", req->desc_len );
1626 dump_varargs_unicode_str( ", desc=", cur_size );
1629 static void dump_get_thread_times_request( const struct get_thread_times_request *req )
1631 fprintf( stderr, " handle=%04x", req->handle );
1634 static void dump_get_thread_times_reply( const struct get_thread_times_reply *req )
1636 dump_timeout( " creation_time=", &req->creation_time );
1637 dump_timeout( ", exit_time=", &req->exit_time );
1638 fprintf( stderr, ", unix_pid=%d", req->unix_pid );
1639 fprintf( stderr, ", unix_tid=%d", req->unix_tid );
1642 static void dump_set_thread_info_request( const struct set_thread_info_request *req )
1644 fprintf( stderr, " handle=%04x", req->handle );
1645 fprintf( stderr, ", mask=%d", req->mask );
1646 fprintf( stderr, ", priority=%d", req->priority );
1647 dump_uint64( ", affinity=", &req->affinity );
1648 dump_uint64( ", entry_point=", &req->entry_point );
1649 fprintf( stderr, ", token=%04x", req->token );
1650 dump_varargs_unicode_str( ", desc=", cur_size );
1653 static void dump_suspend_thread_request( const struct suspend_thread_request *req )
1655 fprintf( stderr, " handle=%04x", req->handle );
1658 static void dump_suspend_thread_reply( const struct suspend_thread_reply *req )
1660 fprintf( stderr, " count=%d", req->count );
1663 static void dump_resume_thread_request( const struct resume_thread_request *req )
1665 fprintf( stderr, " handle=%04x", req->handle );
1668 static void dump_resume_thread_reply( const struct resume_thread_reply *req )
1670 fprintf( stderr, " count=%d", req->count );
1673 static void dump_queue_apc_request( const struct queue_apc_request *req )
1675 fprintf( stderr, " handle=%04x", req->handle );
1676 dump_apc_call( ", call=", &req->call );
1679 static void dump_queue_apc_reply( const struct queue_apc_reply *req )
1681 fprintf( stderr, " handle=%04x", req->handle );
1682 fprintf( stderr, ", self=%d", req->self );
1685 static void dump_get_apc_result_request( const struct get_apc_result_request *req )
1687 fprintf( stderr, " handle=%04x", req->handle );
1690 static void dump_get_apc_result_reply( const struct get_apc_result_reply *req )
1692 dump_apc_result( " result=", &req->result );
1695 static void dump_close_handle_request( const struct close_handle_request *req )
1697 fprintf( stderr, " handle=%04x", req->handle );
1700 static void dump_set_handle_info_request( const struct set_handle_info_request *req )
1702 fprintf( stderr, " handle=%04x", req->handle );
1703 fprintf( stderr, ", flags=%d", req->flags );
1704 fprintf( stderr, ", mask=%d", req->mask );
1707 static void dump_set_handle_info_reply( const struct set_handle_info_reply *req )
1709 fprintf( stderr, " old_flags=%d", req->old_flags );
1712 static void dump_dup_handle_request( const struct dup_handle_request *req )
1714 fprintf( stderr, " src_process=%04x", req->src_process );
1715 fprintf( stderr, ", src_handle=%04x", req->src_handle );
1716 fprintf( stderr, ", dst_process=%04x", req->dst_process );
1717 fprintf( stderr, ", access=%08x", req->access );
1718 fprintf( stderr, ", attributes=%08x", req->attributes );
1719 fprintf( stderr, ", options=%08x", req->options );
1722 static void dump_dup_handle_reply( const struct dup_handle_reply *req )
1724 fprintf( stderr, " handle=%04x", req->handle );
1727 static void dump_make_temporary_request( const struct make_temporary_request *req )
1729 fprintf( stderr, " handle=%04x", req->handle );
1732 static void dump_open_process_request( const struct open_process_request *req )
1734 fprintf( stderr, " pid=%04x", req->pid );
1735 fprintf( stderr, ", access=%08x", req->access );
1736 fprintf( stderr, ", attributes=%08x", req->attributes );
1739 static void dump_open_process_reply( const struct open_process_reply *req )
1741 fprintf( stderr, " handle=%04x", req->handle );
1744 static void dump_open_thread_request( const struct open_thread_request *req )
1746 fprintf( stderr, " tid=%04x", req->tid );
1747 fprintf( stderr, ", access=%08x", req->access );
1748 fprintf( stderr, ", attributes=%08x", req->attributes );
1751 static void dump_open_thread_reply( const struct open_thread_reply *req )
1753 fprintf( stderr, " handle=%04x", req->handle );
1756 static void dump_select_request( const struct select_request *req )
1758 fprintf( stderr, " flags=%d", req->flags );
1759 dump_uint64( ", cookie=", &req->cookie );
1760 dump_abstime( ", timeout=", &req->timeout );
1761 fprintf( stderr, ", size=%u", req->size );
1762 fprintf( stderr, ", prev_apc=%04x", req->prev_apc );
1763 dump_varargs_apc_result( ", result=", cur_size );
1764 dump_varargs_select_op( ", data=", min(cur_size,req->size) );
1765 dump_varargs_context( ", context=", cur_size );
1768 static void dump_select_reply( const struct select_reply *req )
1770 dump_apc_call( " call=", &req->call );
1771 fprintf( stderr, ", apc_handle=%04x", req->apc_handle );
1772 dump_varargs_context( ", context=", cur_size );
1775 static void dump_create_event_request( const struct create_event_request *req )
1777 fprintf( stderr, " access=%08x", req->access );
1778 fprintf( stderr, ", manual_reset=%d", req->manual_reset );
1779 fprintf( stderr, ", initial_state=%d", req->initial_state );
1780 dump_varargs_object_attributes( ", objattr=", cur_size );
1783 static void dump_create_event_reply( const struct create_event_reply *req )
1785 fprintf( stderr, " handle=%04x", req->handle );
1788 static void dump_event_op_request( const struct event_op_request *req )
1790 fprintf( stderr, " handle=%04x", req->handle );
1791 fprintf( stderr, ", op=%d", req->op );
1794 static void dump_event_op_reply( const struct event_op_reply *req )
1796 fprintf( stderr, " state=%d", req->state );
1799 static void dump_query_event_request( const struct query_event_request *req )
1801 fprintf( stderr, " handle=%04x", req->handle );
1804 static void dump_query_event_reply( const struct query_event_reply *req )
1806 fprintf( stderr, " manual_reset=%d", req->manual_reset );
1807 fprintf( stderr, ", state=%d", req->state );
1810 static void dump_open_event_request( const struct open_event_request *req )
1812 fprintf( stderr, " access=%08x", req->access );
1813 fprintf( stderr, ", attributes=%08x", req->attributes );
1814 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1815 dump_varargs_unicode_str( ", name=", cur_size );
1818 static void dump_open_event_reply( const struct open_event_reply *req )
1820 fprintf( stderr, " handle=%04x", req->handle );
1823 static void dump_create_keyed_event_request( const struct create_keyed_event_request *req )
1825 fprintf( stderr, " access=%08x", req->access );
1826 dump_varargs_object_attributes( ", objattr=", cur_size );
1829 static void dump_create_keyed_event_reply( const struct create_keyed_event_reply *req )
1831 fprintf( stderr, " handle=%04x", req->handle );
1834 static void dump_open_keyed_event_request( const struct open_keyed_event_request *req )
1836 fprintf( stderr, " access=%08x", req->access );
1837 fprintf( stderr, ", attributes=%08x", req->attributes );
1838 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1839 dump_varargs_unicode_str( ", name=", cur_size );
1842 static void dump_open_keyed_event_reply( const struct open_keyed_event_reply *req )
1844 fprintf( stderr, " handle=%04x", req->handle );
1847 static void dump_create_mutex_request( const struct create_mutex_request *req )
1849 fprintf( stderr, " access=%08x", req->access );
1850 fprintf( stderr, ", owned=%d", req->owned );
1851 dump_varargs_object_attributes( ", objattr=", cur_size );
1854 static void dump_create_mutex_reply( const struct create_mutex_reply *req )
1856 fprintf( stderr, " handle=%04x", req->handle );
1859 static void dump_release_mutex_request( const struct release_mutex_request *req )
1861 fprintf( stderr, " handle=%04x", req->handle );
1864 static void dump_release_mutex_reply( const struct release_mutex_reply *req )
1866 fprintf( stderr, " prev_count=%08x", req->prev_count );
1869 static void dump_open_mutex_request( const struct open_mutex_request *req )
1871 fprintf( stderr, " access=%08x", req->access );
1872 fprintf( stderr, ", attributes=%08x", req->attributes );
1873 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1874 dump_varargs_unicode_str( ", name=", cur_size );
1877 static void dump_open_mutex_reply( const struct open_mutex_reply *req )
1879 fprintf( stderr, " handle=%04x", req->handle );
1882 static void dump_query_mutex_request( const struct query_mutex_request *req )
1884 fprintf( stderr, " handle=%04x", req->handle );
1887 static void dump_query_mutex_reply( const struct query_mutex_reply *req )
1889 fprintf( stderr, " count=%08x", req->count );
1890 fprintf( stderr, ", owned=%d", req->owned );
1891 fprintf( stderr, ", abandoned=%d", req->abandoned );
1894 static void dump_create_semaphore_request( const struct create_semaphore_request *req )
1896 fprintf( stderr, " access=%08x", req->access );
1897 fprintf( stderr, ", initial=%08x", req->initial );
1898 fprintf( stderr, ", max=%08x", req->max );
1899 dump_varargs_object_attributes( ", objattr=", cur_size );
1902 static void dump_create_semaphore_reply( const struct create_semaphore_reply *req )
1904 fprintf( stderr, " handle=%04x", req->handle );
1907 static void dump_release_semaphore_request( const struct release_semaphore_request *req )
1909 fprintf( stderr, " handle=%04x", req->handle );
1910 fprintf( stderr, ", count=%08x", req->count );
1913 static void dump_release_semaphore_reply( const struct release_semaphore_reply *req )
1915 fprintf( stderr, " prev_count=%08x", req->prev_count );
1918 static void dump_query_semaphore_request( const struct query_semaphore_request *req )
1920 fprintf( stderr, " handle=%04x", req->handle );
1923 static void dump_query_semaphore_reply( const struct query_semaphore_reply *req )
1925 fprintf( stderr, " current=%08x", req->current );
1926 fprintf( stderr, ", max=%08x", req->max );
1929 static void dump_open_semaphore_request( const struct open_semaphore_request *req )
1931 fprintf( stderr, " access=%08x", req->access );
1932 fprintf( stderr, ", attributes=%08x", req->attributes );
1933 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1934 dump_varargs_unicode_str( ", name=", cur_size );
1937 static void dump_open_semaphore_reply( const struct open_semaphore_reply *req )
1939 fprintf( stderr, " handle=%04x", req->handle );
1942 static void dump_create_file_request( const struct create_file_request *req )
1944 fprintf( stderr, " access=%08x", req->access );
1945 fprintf( stderr, ", sharing=%08x", req->sharing );
1946 fprintf( stderr, ", create=%d", req->create );
1947 fprintf( stderr, ", options=%08x", req->options );
1948 fprintf( stderr, ", attrs=%08x", req->attrs );
1949 dump_varargs_object_attributes( ", objattr=", cur_size );
1950 dump_varargs_string( ", filename=", cur_size );
1953 static void dump_create_file_reply( const struct create_file_reply *req )
1955 fprintf( stderr, " handle=%04x", req->handle );
1958 static void dump_open_file_object_request( const struct open_file_object_request *req )
1960 fprintf( stderr, " access=%08x", req->access );
1961 fprintf( stderr, ", attributes=%08x", req->attributes );
1962 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1963 fprintf( stderr, ", sharing=%08x", req->sharing );
1964 fprintf( stderr, ", options=%08x", req->options );
1965 dump_varargs_unicode_str( ", filename=", cur_size );
1968 static void dump_open_file_object_reply( const struct open_file_object_reply *req )
1970 fprintf( stderr, " handle=%04x", req->handle );
1973 static void dump_alloc_file_handle_request( const struct alloc_file_handle_request *req )
1975 fprintf( stderr, " access=%08x", req->access );
1976 fprintf( stderr, ", attributes=%08x", req->attributes );
1977 fprintf( stderr, ", fd=%d", req->fd );
1980 static void dump_alloc_file_handle_reply( const struct alloc_file_handle_reply *req )
1982 fprintf( stderr, " handle=%04x", req->handle );
1985 static void dump_get_handle_unix_name_request( const struct get_handle_unix_name_request *req )
1987 fprintf( stderr, " handle=%04x", req->handle );
1990 static void dump_get_handle_unix_name_reply( const struct get_handle_unix_name_reply *req )
1992 fprintf( stderr, " name_len=%u", req->name_len );
1993 dump_varargs_string( ", name=", cur_size );
1996 static void dump_get_handle_fd_request( const struct get_handle_fd_request *req )
1998 fprintf( stderr, " handle=%04x", req->handle );
2001 static void dump_get_handle_fd_reply( const struct get_handle_fd_reply *req )
2003 fprintf( stderr, " type=%d", req->type );
2004 fprintf( stderr, ", cacheable=%d", req->cacheable );
2005 fprintf( stderr, ", access=%08x", req->access );
2006 fprintf( stderr, ", options=%08x", req->options );
2009 static void dump_get_directory_cache_entry_request( const struct get_directory_cache_entry_request *req )
2011 fprintf( stderr, " handle=%04x", req->handle );
2014 static void dump_get_directory_cache_entry_reply( const struct get_directory_cache_entry_reply *req )
2016 fprintf( stderr, " entry=%d", req->entry );
2017 dump_varargs_ints( ", free=", cur_size );
2020 static void dump_flush_request( const struct flush_request *req )
2022 dump_async_data( " async=", &req->async );
2025 static void dump_flush_reply( const struct flush_reply *req )
2027 fprintf( stderr, " event=%04x", req->event );
2030 static void dump_get_file_info_request( const struct get_file_info_request *req )
2032 fprintf( stderr, " handle=%04x", req->handle );
2033 fprintf( stderr, ", info_class=%08x", req->info_class );
2036 static void dump_get_file_info_reply( const struct get_file_info_reply *req )
2038 dump_varargs_bytes( " data=", cur_size );
2041 static void dump_get_volume_info_request( const struct get_volume_info_request *req )
2043 fprintf( stderr, " handle=%04x", req->handle );
2044 dump_async_data( ", async=", &req->async );
2045 fprintf( stderr, ", info_class=%08x", req->info_class );
2048 static void dump_get_volume_info_reply( const struct get_volume_info_reply *req )
2050 fprintf( stderr, " wait=%04x", req->wait );
2051 dump_varargs_bytes( ", data=", cur_size );
2054 static void dump_lock_file_request( const struct lock_file_request *req )
2056 fprintf( stderr, " handle=%04x", req->handle );
2057 dump_uint64( ", offset=", &req->offset );
2058 dump_uint64( ", count=", &req->count );
2059 fprintf( stderr, ", shared=%d", req->shared );
2060 fprintf( stderr, ", wait=%d", req->wait );
2063 static void dump_lock_file_reply( const struct lock_file_reply *req )
2065 fprintf( stderr, " handle=%04x", req->handle );
2066 fprintf( stderr, ", overlapped=%d", req->overlapped );
2069 static void dump_unlock_file_request( const struct unlock_file_request *req )
2071 fprintf( stderr, " handle=%04x", req->handle );
2072 dump_uint64( ", offset=", &req->offset );
2073 dump_uint64( ", count=", &req->count );
2076 static void dump_set_socket_event_request( const struct set_socket_event_request *req )
2078 fprintf( stderr, " handle=%04x", req->handle );
2079 fprintf( stderr, ", mask=%08x", req->mask );
2080 fprintf( stderr, ", event=%04x", req->event );
2081 fprintf( stderr, ", window=%08x", req->window );
2082 fprintf( stderr, ", msg=%08x", req->msg );
2085 static void dump_get_socket_event_request( const struct get_socket_event_request *req )
2087 fprintf( stderr, " handle=%04x", req->handle );
2088 fprintf( stderr, ", service=%d", req->service );
2089 fprintf( stderr, ", c_event=%04x", req->c_event );
2092 static void dump_get_socket_event_reply( const struct get_socket_event_reply *req )
2094 fprintf( stderr, " mask=%08x", req->mask );
2095 fprintf( stderr, ", pmask=%08x", req->pmask );
2096 dump_varargs_ints( ", errors=", cur_size );
2099 static void dump_get_socket_info_request( const struct get_socket_info_request *req )
2101 fprintf( stderr, " handle=%04x", req->handle );
2104 static void dump_get_socket_info_reply( const struct get_socket_info_reply *req )
2106 fprintf( stderr, " family=%d", req->family );
2107 fprintf( stderr, ", type=%d", req->type );
2108 fprintf( stderr, ", protocol=%d", req->protocol );
2111 static void dump_set_socket_deferred_request( const struct set_socket_deferred_request *req )
2113 fprintf( stderr, " handle=%04x", req->handle );
2114 fprintf( stderr, ", deferred=%04x", req->deferred );
2117 static void dump_recv_socket_request( const struct recv_socket_request *req )
2119 fprintf( stderr, " oob=%d", req->oob );
2120 dump_async_data( ", async=", &req->async );
2121 fprintf( stderr, ", status=%08x", req->status );
2122 fprintf( stderr, ", total=%08x", req->total );
2125 static void dump_recv_socket_reply( const struct recv_socket_reply *req )
2127 fprintf( stderr, " wait=%04x", req->wait );
2128 fprintf( stderr, ", options=%08x", req->options );
2131 static void dump_poll_socket_request( const struct poll_socket_request *req )
2133 dump_async_data( " async=", &req->async );
2134 dump_timeout( ", timeout=", &req->timeout );
2135 dump_varargs_poll_socket_input( ", sockets=", cur_size );
2138 static void dump_poll_socket_reply( const struct poll_socket_reply *req )
2140 fprintf( stderr, " wait=%04x", req->wait );
2141 fprintf( stderr, ", options=%08x", req->options );
2142 dump_varargs_poll_socket_output( ", sockets=", cur_size );
2145 static void dump_send_socket_request( const struct send_socket_request *req )
2147 dump_async_data( " async=", &req->async );
2148 fprintf( stderr, ", status=%08x", req->status );
2149 fprintf( stderr, ", total=%08x", req->total );
2152 static void dump_send_socket_reply( const struct send_socket_reply *req )
2154 fprintf( stderr, " wait=%04x", req->wait );
2155 fprintf( stderr, ", options=%08x", req->options );
2158 static void dump_get_next_console_request_request( const struct get_next_console_request_request *req )
2160 fprintf( stderr, " handle=%04x", req->handle );
2161 fprintf( stderr, ", signal=%d", req->signal );
2162 fprintf( stderr, ", read=%d", req->read );
2163 fprintf( stderr, ", status=%08x", req->status );
2164 dump_varargs_bytes( ", out_data=", cur_size );
2167 static void dump_get_next_console_request_reply( const struct get_next_console_request_reply *req )
2169 fprintf( stderr, " code=%08x", req->code );
2170 fprintf( stderr, ", output=%08x", req->output );
2171 fprintf( stderr, ", out_size=%u", req->out_size );
2172 dump_varargs_bytes( ", in_data=", cur_size );
2175 static void dump_read_directory_changes_request( const struct read_directory_changes_request *req )
2177 fprintf( stderr, " filter=%08x", req->filter );
2178 fprintf( stderr, ", subtree=%d", req->subtree );
2179 fprintf( stderr, ", want_data=%d", req->want_data );
2180 dump_async_data( ", async=", &req->async );
2183 static void dump_read_change_request( const struct read_change_request *req )
2185 fprintf( stderr, " handle=%04x", req->handle );
2188 static void dump_read_change_reply( const struct read_change_reply *req )
2190 dump_varargs_filesystem_event( " events=", cur_size );
2193 static void dump_create_mapping_request( const struct create_mapping_request *req )
2195 fprintf( stderr, " access=%08x", req->access );
2196 fprintf( stderr, ", flags=%08x", req->flags );
2197 fprintf( stderr, ", file_access=%08x", req->file_access );
2198 dump_uint64( ", size=", &req->size );
2199 fprintf( stderr, ", file_handle=%04x", req->file_handle );
2200 dump_varargs_object_attributes( ", objattr=", cur_size );
2203 static void dump_create_mapping_reply( const struct create_mapping_reply *req )
2205 fprintf( stderr, " handle=%04x", req->handle );
2208 static void dump_open_mapping_request( const struct open_mapping_request *req )
2210 fprintf( stderr, " access=%08x", req->access );
2211 fprintf( stderr, ", attributes=%08x", req->attributes );
2212 fprintf( stderr, ", rootdir=%04x", req->rootdir );
2213 dump_varargs_unicode_str( ", name=", cur_size );
2216 static void dump_open_mapping_reply( const struct open_mapping_reply *req )
2218 fprintf( stderr, " handle=%04x", req->handle );
2221 static void dump_get_mapping_info_request( const struct get_mapping_info_request *req )
2223 fprintf( stderr, " handle=%04x", req->handle );
2224 fprintf( stderr, ", access=%08x", req->access );
2227 static void dump_get_mapping_info_reply( const struct get_mapping_info_reply *req )
2229 dump_uint64( " size=", &req->size );
2230 fprintf( stderr, ", flags=%08x", req->flags );
2231 fprintf( stderr, ", shared_file=%04x", req->shared_file );
2232 fprintf( stderr, ", total=%u", req->total );
2233 dump_varargs_pe_image_info( ", image=", cur_size );
2234 dump_varargs_unicode_str( ", name=", cur_size );
2237 static void dump_map_view_request( const struct map_view_request *req )
2239 fprintf( stderr, " mapping=%04x", req->mapping );
2240 fprintf( stderr, ", access=%08x", req->access );
2241 dump_uint64( ", base=", &req->base );
2242 dump_uint64( ", size=", &req->size );
2243 dump_uint64( ", start=", &req->start );
2244 dump_varargs_pe_image_info( ", image=", cur_size );
2245 dump_varargs_unicode_str( ", name=", cur_size );
2248 static void dump_unmap_view_request( const struct unmap_view_request *req )
2250 dump_uint64( " base=", &req->base );
2253 static void dump_get_mapping_committed_range_request( const struct get_mapping_committed_range_request *req )
2255 dump_uint64( " base=", &req->base );
2256 dump_uint64( ", offset=", &req->offset );
2259 static void dump_get_mapping_committed_range_reply( const struct get_mapping_committed_range_reply *req )
2261 dump_uint64( " size=", &req->size );
2262 fprintf( stderr, ", committed=%d", req->committed );
2265 static void dump_add_mapping_committed_range_request( const struct add_mapping_committed_range_request *req )
2267 dump_uint64( " base=", &req->base );
2268 dump_uint64( ", offset=", &req->offset );
2269 dump_uint64( ", size=", &req->size );
2272 static void dump_is_same_mapping_request( const struct is_same_mapping_request *req )
2274 dump_uint64( " base1=", &req->base1 );
2275 dump_uint64( ", base2=", &req->base2 );
2278 static void dump_get_mapping_filename_request( const struct get_mapping_filename_request *req )
2280 fprintf( stderr, " process=%04x", req->process );
2281 dump_uint64( ", addr=", &req->addr );
2284 static void dump_get_mapping_filename_reply( const struct get_mapping_filename_reply *req )
2286 fprintf( stderr, " len=%u", req->len );
2287 dump_varargs_unicode_str( ", filename=", cur_size );
2290 static void dump_list_processes_request( const struct list_processes_request *req )
2294 static void dump_list_processes_reply( const struct list_processes_reply *req )
2296 fprintf( stderr, " info_size=%u", req->info_size );
2297 fprintf( stderr, ", process_count=%d", req->process_count );
2298 dump_varargs_process_info( ", data=", min(cur_size,req->info_size) );
2301 static void dump_create_debug_obj_request( const struct create_debug_obj_request *req )
2303 fprintf( stderr, " access=%08x", req->access );
2304 fprintf( stderr, ", flags=%08x", req->flags );
2305 dump_varargs_object_attributes( ", objattr=", cur_size );
2308 static void dump_create_debug_obj_reply( const struct create_debug_obj_reply *req )
2310 fprintf( stderr, " handle=%04x", req->handle );
2313 static void dump_wait_debug_event_request( const struct wait_debug_event_request *req )
2315 fprintf( stderr, " debug=%04x", req->debug );
2318 static void dump_wait_debug_event_reply( const struct wait_debug_event_reply *req )
2320 fprintf( stderr, " pid=%04x", req->pid );
2321 fprintf( stderr, ", tid=%04x", req->tid );
2322 dump_varargs_debug_event( ", event=", cur_size );
2325 static void dump_queue_exception_event_request( const struct queue_exception_event_request *req )
2327 fprintf( stderr, " first=%d", req->first );
2328 fprintf( stderr, ", code=%08x", req->code );
2329 fprintf( stderr, ", flags=%08x", req->flags );
2330 dump_uint64( ", record=", &req->record );
2331 dump_uint64( ", address=", &req->address );
2332 fprintf( stderr, ", len=%u", req->len );
2333 dump_varargs_uints64( ", params=", min(cur_size,req->len) );
2336 static void dump_queue_exception_event_reply( const struct queue_exception_event_reply *req )
2338 fprintf( stderr, " handle=%04x", req->handle );
2341 static void dump_get_exception_status_request( const struct get_exception_status_request *req )
2343 fprintf( stderr, " handle=%04x", req->handle );
2346 static void dump_continue_debug_event_request( const struct continue_debug_event_request *req )
2348 fprintf( stderr, " debug=%04x", req->debug );
2349 fprintf( stderr, ", pid=%04x", req->pid );
2350 fprintf( stderr, ", tid=%04x", req->tid );
2351 fprintf( stderr, ", status=%08x", req->status );
2354 static void dump_debug_process_request( const struct debug_process_request *req )
2356 fprintf( stderr, " handle=%04x", req->handle );
2357 fprintf( stderr, ", debug=%04x", req->debug );
2358 fprintf( stderr, ", attach=%d", req->attach );
2361 static void dump_set_debug_obj_info_request( const struct set_debug_obj_info_request *req )
2363 fprintf( stderr, " debug=%04x", req->debug );
2364 fprintf( stderr, ", flags=%08x", req->flags );
2367 static void dump_read_process_memory_request( const struct read_process_memory_request *req )
2369 fprintf( stderr, " handle=%04x", req->handle );
2370 dump_uint64( ", addr=", &req->addr );
2373 static void dump_read_process_memory_reply( const struct read_process_memory_reply *req )
2375 dump_varargs_bytes( " data=", cur_size );
2378 static void dump_write_process_memory_request( const struct write_process_memory_request *req )
2380 fprintf( stderr, " handle=%04x", req->handle );
2381 dump_uint64( ", addr=", &req->addr );
2382 dump_varargs_bytes( ", data=", cur_size );
2385 static void dump_create_key_request( const struct create_key_request *req )
2387 fprintf( stderr, " access=%08x", req->access );
2388 fprintf( stderr, ", options=%08x", req->options );
2389 dump_varargs_object_attributes( ", objattr=", cur_size );
2390 dump_varargs_unicode_str( ", class=", cur_size );
2393 static void dump_create_key_reply( const struct create_key_reply *req )
2395 fprintf( stderr, " hkey=%04x", req->hkey );
2396 fprintf( stderr, ", created=%d", req->created );
2399 static void dump_open_key_request( const struct open_key_request *req )
2401 fprintf( stderr, " parent=%04x", req->parent );
2402 fprintf( stderr, ", access=%08x", req->access );
2403 fprintf( stderr, ", attributes=%08x", req->attributes );
2404 dump_varargs_unicode_str( ", name=", cur_size );
2407 static void dump_open_key_reply( const struct open_key_reply *req )
2409 fprintf( stderr, " hkey=%04x", req->hkey );
2412 static void dump_delete_key_request( const struct delete_key_request *req )
2414 fprintf( stderr, " hkey=%04x", req->hkey );
2417 static void dump_flush_key_request( const struct flush_key_request *req )
2419 fprintf( stderr, " hkey=%04x", req->hkey );
2422 static void dump_enum_key_request( const struct enum_key_request *req )
2424 fprintf( stderr, " hkey=%04x", req->hkey );
2425 fprintf( stderr, ", index=%d", req->index );
2426 fprintf( stderr, ", info_class=%d", req->info_class );
2429 static void dump_enum_key_reply( const struct enum_key_reply *req )
2431 fprintf( stderr, " subkeys=%d", req->subkeys );
2432 fprintf( stderr, ", max_subkey=%d", req->max_subkey );
2433 fprintf( stderr, ", max_class=%d", req->max_class );
2434 fprintf( stderr, ", values=%d", req->values );
2435 fprintf( stderr, ", max_value=%d", req->max_value );
2436 fprintf( stderr, ", max_data=%d", req->max_data );
2437 dump_timeout( ", modif=", &req->modif );
2438 fprintf( stderr, ", total=%u", req->total );
2439 fprintf( stderr, ", namelen=%u", req->namelen );
2440 dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
2441 dump_varargs_unicode_str( ", class=", cur_size );
2444 static void dump_set_key_value_request( const struct set_key_value_request *req )
2446 fprintf( stderr, " hkey=%04x", req->hkey );
2447 fprintf( stderr, ", type=%d", req->type );
2448 fprintf( stderr, ", namelen=%u", req->namelen );
2449 dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
2450 dump_varargs_bytes( ", data=", cur_size );
2453 static void dump_get_key_value_request( const struct get_key_value_request *req )
2455 fprintf( stderr, " hkey=%04x", req->hkey );
2456 dump_varargs_unicode_str( ", name=", cur_size );
2459 static void dump_get_key_value_reply( const struct get_key_value_reply *req )
2461 fprintf( stderr, " type=%d", req->type );
2462 fprintf( stderr, ", total=%u", req->total );
2463 dump_varargs_bytes( ", data=", cur_size );
2466 static void dump_enum_key_value_request( const struct enum_key_value_request *req )
2468 fprintf( stderr, " hkey=%04x", req->hkey );
2469 fprintf( stderr, ", index=%d", req->index );
2470 fprintf( stderr, ", info_class=%d", req->info_class );
2473 static void dump_enum_key_value_reply( const struct enum_key_value_reply *req )
2475 fprintf( stderr, " type=%d", req->type );
2476 fprintf( stderr, ", total=%u", req->total );
2477 fprintf( stderr, ", namelen=%u", req->namelen );
2478 dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
2479 dump_varargs_bytes( ", data=", cur_size );
2482 static void dump_delete_key_value_request( const struct delete_key_value_request *req )
2484 fprintf( stderr, " hkey=%04x", req->hkey );
2485 dump_varargs_unicode_str( ", name=", cur_size );
2488 static void dump_load_registry_request( const struct load_registry_request *req )
2490 fprintf( stderr, " file=%04x", req->file );
2491 dump_varargs_object_attributes( ", objattr=", cur_size );
2494 static void dump_unload_registry_request( const struct unload_registry_request *req )
2496 fprintf( stderr, " parent=%04x", req->parent );
2497 fprintf( stderr, ", attributes=%08x", req->attributes );
2498 dump_varargs_unicode_str( ", name=", cur_size );
2501 static void dump_save_registry_request( const struct save_registry_request *req )
2503 fprintf( stderr, " hkey=%04x", req->hkey );
2504 fprintf( stderr, ", file=%04x", req->file );
2507 static void dump_set_registry_notification_request( const struct set_registry_notification_request *req )
2509 fprintf( stderr, " hkey=%04x", req->hkey );
2510 fprintf( stderr, ", event=%04x", req->event );
2511 fprintf( stderr, ", subtree=%d", req->subtree );
2512 fprintf( stderr, ", filter=%08x", req->filter );
2515 static void dump_create_timer_request( const struct create_timer_request *req )
2517 fprintf( stderr, " access=%08x", req->access );
2518 fprintf( stderr, ", manual=%d", req->manual );
2519 dump_varargs_object_attributes( ", objattr=", cur_size );
2522 static void dump_create_timer_reply( const struct create_timer_reply *req )
2524 fprintf( stderr, " handle=%04x", req->handle );
2527 static void dump_open_timer_request( const struct open_timer_request *req )
2529 fprintf( stderr, " access=%08x", req->access );
2530 fprintf( stderr, ", attributes=%08x", req->attributes );
2531 fprintf( stderr, ", rootdir=%04x", req->rootdir );
2532 dump_varargs_unicode_str( ", name=", cur_size );
2535 static void dump_open_timer_reply( const struct open_timer_reply *req )
2537 fprintf( stderr, " handle=%04x", req->handle );
2540 static void dump_set_timer_request( const struct set_timer_request *req )
2542 fprintf( stderr, " handle=%04x", req->handle );
2543 dump_timeout( ", expire=", &req->expire );
2544 dump_uint64( ", callback=", &req->callback );
2545 dump_uint64( ", arg=", &req->arg );
2546 fprintf( stderr, ", period=%d", req->period );
2549 static void dump_set_timer_reply( const struct set_timer_reply *req )
2551 fprintf( stderr, " signaled=%d", req->signaled );
2554 static void dump_cancel_timer_request( const struct cancel_timer_request *req )
2556 fprintf( stderr, " handle=%04x", req->handle );
2559 static void dump_cancel_timer_reply( const struct cancel_timer_reply *req )
2561 fprintf( stderr, " signaled=%d", req->signaled );
2564 static void dump_get_timer_info_request( const struct get_timer_info_request *req )
2566 fprintf( stderr, " handle=%04x", req->handle );
2569 static void dump_get_timer_info_reply( const struct get_timer_info_reply *req )
2571 dump_timeout( " when=", &req->when );
2572 fprintf( stderr, ", signaled=%d", req->signaled );
2575 static void dump_get_thread_context_request( const struct get_thread_context_request *req )
2577 fprintf( stderr, " handle=%04x", req->handle );
2578 fprintf( stderr, ", flags=%08x", req->flags );
2581 static void dump_get_thread_context_reply( const struct get_thread_context_reply *req )
2583 fprintf( stderr, " self=%d", req->self );
2584 fprintf( stderr, ", handle=%04x", req->handle );
2585 dump_varargs_context( ", context=", cur_size );
2588 static void dump_set_thread_context_request( const struct set_thread_context_request *req )
2590 fprintf( stderr, " handle=%04x", req->handle );
2591 dump_varargs_context( ", context=", cur_size );
2594 static void dump_set_thread_context_reply( const struct set_thread_context_reply *req )
2596 fprintf( stderr, " self=%d", req->self );
2599 static void dump_get_selector_entry_request( const struct get_selector_entry_request *req )
2601 fprintf( stderr, " handle=%04x", req->handle );
2602 fprintf( stderr, ", entry=%d", req->entry );
2605 static void dump_get_selector_entry_reply( const struct get_selector_entry_reply *req )
2607 fprintf( stderr, " base=%08x", req->base );
2608 fprintf( stderr, ", limit=%08x", req->limit );
2609 fprintf( stderr, ", flags=%02x", req->flags );
2612 static void dump_add_atom_request( const struct add_atom_request *req )
2614 dump_varargs_unicode_str( " name=", cur_size );
2617 static void dump_add_atom_reply( const struct add_atom_reply *req )
2619 fprintf( stderr, " atom=%04x", req->atom );
2622 static void dump_delete_atom_request( const struct delete_atom_request *req )
2624 fprintf( stderr, " atom=%04x", req->atom );
2627 static void dump_find_atom_request( const struct find_atom_request *req )
2629 dump_varargs_unicode_str( " name=", cur_size );
2632 static void dump_find_atom_reply( const struct find_atom_reply *req )
2634 fprintf( stderr, " atom=%04x", req->atom );
2637 static void dump_get_atom_information_request( const struct get_atom_information_request *req )
2639 fprintf( stderr, " atom=%04x", req->atom );
2642 static void dump_get_atom_information_reply( const struct get_atom_information_reply *req )
2644 fprintf( stderr, " count=%d", req->count );
2645 fprintf( stderr, ", pinned=%d", req->pinned );
2646 fprintf( stderr, ", total=%u", req->total );
2647 dump_varargs_unicode_str( ", name=", cur_size );
2650 static void dump_get_msg_queue_request( const struct get_msg_queue_request *req )
2654 static void dump_get_msg_queue_reply( const struct get_msg_queue_reply *req )
2656 fprintf( stderr, " handle=%04x", req->handle );
2659 static void dump_set_queue_fd_request( const struct set_queue_fd_request *req )
2661 fprintf( stderr, " handle=%04x", req->handle );
2664 static void dump_set_queue_mask_request( const struct set_queue_mask_request *req )
2666 fprintf( stderr, " wake_mask=%08x", req->wake_mask );
2667 fprintf( stderr, ", changed_mask=%08x", req->changed_mask );
2668 fprintf( stderr, ", skip_wait=%d", req->skip_wait );
2671 static void dump_set_queue_mask_reply( const struct set_queue_mask_reply *req )
2673 fprintf( stderr, " wake_bits=%08x", req->wake_bits );
2674 fprintf( stderr, ", changed_bits=%08x", req->changed_bits );
2677 static void dump_get_queue_status_request( const struct get_queue_status_request *req )
2679 fprintf( stderr, " clear_bits=%08x", req->clear_bits );
2682 static void dump_get_queue_status_reply( const struct get_queue_status_reply *req )
2684 fprintf( stderr, " wake_bits=%08x", req->wake_bits );
2685 fprintf( stderr, ", changed_bits=%08x", req->changed_bits );
2688 static void dump_get_process_idle_event_request( const struct get_process_idle_event_request *req )
2690 fprintf( stderr, " handle=%04x", req->handle );
2693 static void dump_get_process_idle_event_reply( const struct get_process_idle_event_reply *req )
2695 fprintf( stderr, " event=%04x", req->event );
2698 static void dump_send_message_request( const struct send_message_request *req )
2700 fprintf( stderr, " id=%04x", req->id );
2701 fprintf( stderr, ", type=%d", req->type );
2702 fprintf( stderr, ", flags=%d", req->flags );
2703 fprintf( stderr, ", win=%08x", req->win );
2704 fprintf( stderr, ", msg=%08x", req->msg );
2705 dump_uint64( ", wparam=", &req->wparam );
2706 dump_uint64( ", lparam=", &req->lparam );
2707 dump_timeout( ", timeout=", &req->timeout );
2708 dump_varargs_message_data( ", data=", cur_size );
2711 static void dump_post_quit_message_request( const struct post_quit_message_request *req )
2713 fprintf( stderr, " exit_code=%d", req->exit_code );
2716 static void dump_send_hardware_message_request( const struct send_hardware_message_request *req )
2718 fprintf( stderr, " win=%08x", req->win );
2719 dump_hw_input( ", input=", &req->input );
2720 fprintf( stderr, ", flags=%08x", req->flags );
2721 dump_varargs_bytes( ", report=", cur_size );
2724 static void dump_send_hardware_message_reply( const struct send_hardware_message_reply *req )
2726 fprintf( stderr, " wait=%d", req->wait );
2727 fprintf( stderr, ", prev_x=%d", req->prev_x );
2728 fprintf( stderr, ", prev_y=%d", req->prev_y );
2729 fprintf( stderr, ", new_x=%d", req->new_x );
2730 fprintf( stderr, ", new_y=%d", req->new_y );
2731 dump_varargs_bytes( ", keystate=", cur_size );
2734 static void dump_get_message_request( const struct get_message_request *req )
2736 fprintf( stderr, " flags=%08x", req->flags );
2737 fprintf( stderr, ", get_win=%08x", req->get_win );
2738 fprintf( stderr, ", get_first=%08x", req->get_first );
2739 fprintf( stderr, ", get_last=%08x", req->get_last );
2740 fprintf( stderr, ", hw_id=%08x", req->hw_id );
2741 fprintf( stderr, ", wake_mask=%08x", req->wake_mask );
2742 fprintf( stderr, ", changed_mask=%08x", req->changed_mask );
2745 static void dump_get_message_reply( const struct get_message_reply *req )
2747 fprintf( stderr, " win=%08x", req->win );
2748 fprintf( stderr, ", msg=%08x", req->msg );
2749 dump_uint64( ", wparam=", &req->wparam );
2750 dump_uint64( ", lparam=", &req->lparam );
2751 fprintf( stderr, ", type=%d", req->type );
2752 fprintf( stderr, ", x=%d", req->x );
2753 fprintf( stderr, ", y=%d", req->y );
2754 fprintf( stderr, ", time=%08x", req->time );
2755 fprintf( stderr, ", active_hooks=%08x", req->active_hooks );
2756 fprintf( stderr, ", total=%u", req->total );
2757 dump_varargs_message_data( ", data=", cur_size );
2760 static void dump_reply_message_request( const struct reply_message_request *req )
2762 fprintf( stderr, " remove=%d", req->remove );
2763 dump_uint64( ", result=", &req->result );
2764 dump_varargs_bytes( ", data=", cur_size );
2767 static void dump_accept_hardware_message_request( const struct accept_hardware_message_request *req )
2769 fprintf( stderr, " hw_id=%08x", req->hw_id );
2772 static void dump_get_message_reply_request( const struct get_message_reply_request *req )
2774 fprintf( stderr, " cancel=%d", req->cancel );
2777 static void dump_get_message_reply_reply( const struct get_message_reply_reply *req )
2779 dump_uint64( " result=", &req->result );
2780 dump_varargs_bytes( ", data=", cur_size );
2783 static void dump_set_win_timer_request( const struct set_win_timer_request *req )
2785 fprintf( stderr, " win=%08x", req->win );
2786 fprintf( stderr, ", msg=%08x", req->msg );
2787 fprintf( stderr, ", rate=%08x", req->rate );
2788 dump_uint64( ", id=", &req->id );
2789 dump_uint64( ", lparam=", &req->lparam );
2792 static void dump_set_win_timer_reply( const struct set_win_timer_reply *req )
2794 dump_uint64( " id=", &req->id );
2797 static void dump_kill_win_timer_request( const struct kill_win_timer_request *req )
2799 fprintf( stderr, " win=%08x", req->win );
2800 dump_uint64( ", id=", &req->id );
2801 fprintf( stderr, ", msg=%08x", req->msg );
2804 static void dump_is_window_hung_request( const struct is_window_hung_request *req )
2806 fprintf( stderr, " win=%08x", req->win );
2809 static void dump_is_window_hung_reply( const struct is_window_hung_reply *req )
2811 fprintf( stderr, " is_hung=%d", req->is_hung );
2814 static void dump_get_serial_info_request( const struct get_serial_info_request *req )
2816 fprintf( stderr, " handle=%04x", req->handle );
2817 fprintf( stderr, ", flags=%d", req->flags );
2820 static void dump_get_serial_info_reply( const struct get_serial_info_reply *req )
2822 fprintf( stderr, " eventmask=%08x", req->eventmask );
2823 fprintf( stderr, ", cookie=%08x", req->cookie );
2824 fprintf( stderr, ", pending_write=%08x", req->pending_write );
2827 static void dump_set_serial_info_request( const struct set_serial_info_request *req )
2829 fprintf( stderr, " handle=%04x", req->handle );
2830 fprintf( stderr, ", flags=%d", req->flags );
2833 static void dump_register_async_request( const struct register_async_request *req )
2835 fprintf( stderr, " type=%d", req->type );
2836 dump_async_data( ", async=", &req->async );
2837 fprintf( stderr, ", count=%d", req->count );
2840 static void dump_cancel_async_request( const struct cancel_async_request *req )
2842 fprintf( stderr, " handle=%04x", req->handle );
2843 dump_uint64( ", iosb=", &req->iosb );
2844 fprintf( stderr, ", only_thread=%d", req->only_thread );
2847 static void dump_get_async_result_request( const struct get_async_result_request *req )
2849 dump_uint64( " user_arg=", &req->user_arg );
2852 static void dump_get_async_result_reply( const struct get_async_result_reply *req )
2854 fprintf( stderr, " size=%u", req->size );
2855 dump_varargs_bytes( ", out_data=", cur_size );
2858 static void dump_read_request( const struct read_request *req )
2860 dump_async_data( " async=", &req->async );
2861 dump_uint64( ", pos=", &req->pos );
2864 static void dump_read_reply( const struct read_reply *req )
2866 fprintf( stderr, " wait=%04x", req->wait );
2867 fprintf( stderr, ", options=%08x", req->options );
2868 dump_varargs_bytes( ", data=", cur_size );
2871 static void dump_write_request( const struct write_request *req )
2873 dump_async_data( " async=", &req->async );
2874 dump_uint64( ", pos=", &req->pos );
2875 dump_varargs_bytes( ", data=", cur_size );
2878 static void dump_write_reply( const struct write_reply *req )
2880 fprintf( stderr, " wait=%04x", req->wait );
2881 fprintf( stderr, ", options=%08x", req->options );
2882 fprintf( stderr, ", size=%u", req->size );
2885 static void dump_ioctl_request( const struct ioctl_request *req )
2887 dump_ioctl_code( " code=", &req->code );
2888 dump_async_data( ", async=", &req->async );
2889 dump_varargs_bytes( ", in_data=", cur_size );
2892 static void dump_ioctl_reply( const struct ioctl_reply *req )
2894 fprintf( stderr, " wait=%04x", req->wait );
2895 fprintf( stderr, ", options=%08x", req->options );
2896 dump_varargs_bytes( ", out_data=", cur_size );
2899 static void dump_set_irp_result_request( const struct set_irp_result_request *req )
2901 fprintf( stderr, " handle=%04x", req->handle );
2902 fprintf( stderr, ", status=%08x", req->status );
2903 fprintf( stderr, ", size=%u", req->size );
2904 dump_varargs_bytes( ", data=", cur_size );
2907 static void dump_create_named_pipe_request( const struct create_named_pipe_request *req )
2909 fprintf( stderr, " access=%08x", req->access );
2910 fprintf( stderr, ", options=%08x", req->options );
2911 fprintf( stderr, ", sharing=%08x", req->sharing );
2912 fprintf( stderr, ", maxinstances=%08x", req->maxinstances );
2913 fprintf( stderr, ", outsize=%08x", req->outsize );
2914 fprintf( stderr, ", insize=%08x", req->insize );
2915 dump_timeout( ", timeout=", &req->timeout );
2916 fprintf( stderr, ", flags=%08x", req->flags );
2917 dump_varargs_object_attributes( ", objattr=", cur_size );
2920 static void dump_create_named_pipe_reply( const struct create_named_pipe_reply *req )
2922 fprintf( stderr, " handle=%04x", req->handle );
2925 static void dump_set_named_pipe_info_request( const struct set_named_pipe_info_request *req )
2927 fprintf( stderr, " handle=%04x", req->handle );
2928 fprintf( stderr, ", flags=%08x", req->flags );
2931 static void dump_create_window_request( const struct create_window_request *req )
2933 fprintf( stderr, " parent=%08x", req->parent );
2934 fprintf( stderr, ", owner=%08x", req->owner );
2935 fprintf( stderr, ", atom=%04x", req->atom );
2936 dump_uint64( ", instance=", &req->instance );
2937 fprintf( stderr, ", dpi=%d", req->dpi );
2938 fprintf( stderr, ", awareness=%d", req->awareness );
2939 dump_varargs_unicode_str( ", class=", cur_size );
2942 static void dump_create_window_reply( const struct create_window_reply *req )
2944 fprintf( stderr, " handle=%08x", req->handle );
2945 fprintf( stderr, ", parent=%08x", req->parent );
2946 fprintf( stderr, ", owner=%08x", req->owner );
2947 fprintf( stderr, ", extra=%d", req->extra );
2948 dump_uint64( ", class_ptr=", &req->class_ptr );
2949 fprintf( stderr, ", dpi=%d", req->dpi );
2950 fprintf( stderr, ", awareness=%d", req->awareness );
2953 static void dump_destroy_window_request( const struct destroy_window_request *req )
2955 fprintf( stderr, " handle=%08x", req->handle );
2958 static void dump_get_desktop_window_request( const struct get_desktop_window_request *req )
2960 fprintf( stderr, " force=%d", req->force );
2963 static void dump_get_desktop_window_reply( const struct get_desktop_window_reply *req )
2965 fprintf( stderr, " top_window=%08x", req->top_window );
2966 fprintf( stderr, ", msg_window=%08x", req->msg_window );
2969 static void dump_set_window_owner_request( const struct set_window_owner_request *req )
2971 fprintf( stderr, " handle=%08x", req->handle );
2972 fprintf( stderr, ", owner=%08x", req->owner );
2975 static void dump_set_window_owner_reply( const struct set_window_owner_reply *req )
2977 fprintf( stderr, " full_owner=%08x", req->full_owner );
2978 fprintf( stderr, ", prev_owner=%08x", req->prev_owner );
2981 static void dump_get_window_info_request( const struct get_window_info_request *req )
2983 fprintf( stderr, " handle=%08x", req->handle );
2986 static void dump_get_window_info_reply( const struct get_window_info_reply *req )
2988 fprintf( stderr, " full_handle=%08x", req->full_handle );
2989 fprintf( stderr, ", last_active=%08x", req->last_active );
2990 fprintf( stderr, ", pid=%04x", req->pid );
2991 fprintf( stderr, ", tid=%04x", req->tid );
2992 fprintf( stderr, ", atom=%04x", req->atom );
2993 fprintf( stderr, ", is_unicode=%d", req->is_unicode );
2994 fprintf( stderr, ", dpi=%d", req->dpi );
2995 fprintf( stderr, ", awareness=%d", req->awareness );
2998 static void dump_set_window_info_request( const struct set_window_info_request *req )
3000 fprintf( stderr, " flags=%04x", req->flags );
3001 fprintf( stderr, ", is_unicode=%d", req->is_unicode );
3002 fprintf( stderr, ", handle=%08x", req->handle );
3003 fprintf( stderr, ", style=%08x", req->style );
3004 fprintf( stderr, ", ex_style=%08x", req->ex_style );
3005 fprintf( stderr, ", id=%08x", req->id );
3006 dump_uint64( ", instance=", &req->instance );
3007 dump_uint64( ", user_data=", &req->user_data );
3008 fprintf( stderr, ", extra_offset=%d", req->extra_offset );
3009 fprintf( stderr, ", extra_size=%u", req->extra_size );
3010 dump_uint64( ", extra_value=", &req->extra_value );
3013 static void dump_set_window_info_reply( const struct set_window_info_reply *req )
3015 fprintf( stderr, " old_style=%08x", req->old_style );
3016 fprintf( stderr, ", old_ex_style=%08x", req->old_ex_style );
3017 dump_uint64( ", old_instance=", &req->old_instance );
3018 dump_uint64( ", old_user_data=", &req->old_user_data );
3019 dump_uint64( ", old_extra_value=", &req->old_extra_value );
3020 fprintf( stderr, ", old_id=%08x", req->old_id );
3023 static void dump_set_parent_request( const struct set_parent_request *req )
3025 fprintf( stderr, " handle=%08x", req->handle );
3026 fprintf( stderr, ", parent=%08x", req->parent );
3029 static void dump_set_parent_reply( const struct set_parent_reply *req )
3031 fprintf( stderr, " old_parent=%08x", req->old_parent );
3032 fprintf( stderr, ", full_parent=%08x", req->full_parent );
3033 fprintf( stderr, ", dpi=%d", req->dpi );
3034 fprintf( stderr, ", awareness=%d", req->awareness );
3037 static void dump_get_window_parents_request( const struct get_window_parents_request *req )
3039 fprintf( stderr, " handle=%08x", req->handle );
3042 static void dump_get_window_parents_reply( const struct get_window_parents_reply *req )
3044 fprintf( stderr, " count=%d", req->count );
3045 dump_varargs_user_handles( ", parents=", cur_size );
3048 static void dump_get_window_children_request( const struct get_window_children_request *req )
3050 fprintf( stderr, " desktop=%04x", req->desktop );
3051 fprintf( stderr, ", parent=%08x", req->parent );
3052 fprintf( stderr, ", atom=%04x", req->atom );
3053 fprintf( stderr, ", tid=%04x", req->tid );
3054 dump_varargs_unicode_str( ", class=", cur_size );
3057 static void dump_get_window_children_reply( const struct get_window_children_reply *req )
3059 fprintf( stderr, " count=%d", req->count );
3060 dump_varargs_user_handles( ", children=", cur_size );
3063 static void dump_get_window_children_from_point_request( const struct get_window_children_from_point_request *req )
3065 fprintf( stderr, " parent=%08x", req->parent );
3066 fprintf( stderr, ", x=%d", req->x );
3067 fprintf( stderr, ", y=%d", req->y );
3068 fprintf( stderr, ", dpi=%d", req->dpi );
3071 static void dump_get_window_children_from_point_reply( const struct get_window_children_from_point_reply *req )
3073 fprintf( stderr, " count=%d", req->count );
3074 dump_varargs_user_handles( ", children=", cur_size );
3077 static void dump_get_window_tree_request( const struct get_window_tree_request *req )
3079 fprintf( stderr, " handle=%08x", req->handle );
3082 static void dump_get_window_tree_reply( const struct get_window_tree_reply *req )
3084 fprintf( stderr, " parent=%08x", req->parent );
3085 fprintf( stderr, ", owner=%08x", req->owner );
3086 fprintf( stderr, ", next_sibling=%08x", req->next_sibling );
3087 fprintf( stderr, ", prev_sibling=%08x", req->prev_sibling );
3088 fprintf( stderr, ", first_sibling=%08x", req->first_sibling );
3089 fprintf( stderr, ", last_sibling=%08x", req->last_sibling );
3090 fprintf( stderr, ", first_child=%08x", req->first_child );
3091 fprintf( stderr, ", last_child=%08x", req->last_child );
3094 static void dump_set_window_pos_request( const struct set_window_pos_request *req )
3096 fprintf( stderr, " swp_flags=%04x", req->swp_flags );
3097 fprintf( stderr, ", paint_flags=%04x", req->paint_flags );
3098 fprintf( stderr, ", handle=%08x", req->handle );
3099 fprintf( stderr, ", previous=%08x", req->previous );
3100 dump_rectangle( ", window=", &req->window );
3101 dump_rectangle( ", client=", &req->client );
3102 dump_varargs_rectangles( ", valid=", cur_size );
3105 static void dump_set_window_pos_reply( const struct set_window_pos_reply *req )
3107 fprintf( stderr, " new_style=%08x", req->new_style );
3108 fprintf( stderr, ", new_ex_style=%08x", req->new_ex_style );
3109 fprintf( stderr, ", surface_win=%08x", req->surface_win );
3110 fprintf( stderr, ", needs_update=%d", req->needs_update );
3113 static void dump_get_window_rectangles_request( const struct get_window_rectangles_request *req )
3115 fprintf( stderr, " handle=%08x", req->handle );
3116 fprintf( stderr, ", relative=%d", req->relative );
3117 fprintf( stderr, ", dpi=%d", req->dpi );
3120 static void dump_get_window_rectangles_reply( const struct get_window_rectangles_reply *req )
3122 dump_rectangle( " window=", &req->window );
3123 dump_rectangle( ", client=", &req->client );
3126 static void dump_get_window_text_request( const struct get_window_text_request *req )
3128 fprintf( stderr, " handle=%08x", req->handle );
3131 static void dump_get_window_text_reply( const struct get_window_text_reply *req )
3133 fprintf( stderr, " length=%u", req->length );
3134 dump_varargs_unicode_str( ", text=", cur_size );
3137 static void dump_set_window_text_request( const struct set_window_text_request *req )
3139 fprintf( stderr, " handle=%08x", req->handle );
3140 dump_varargs_unicode_str( ", text=", cur_size );
3143 static void dump_get_windows_offset_request( const struct get_windows_offset_request *req )
3145 fprintf( stderr, " from=%08x", req->from );
3146 fprintf( stderr, ", to=%08x", req->to );
3147 fprintf( stderr, ", dpi=%d", req->dpi );
3150 static void dump_get_windows_offset_reply( const struct get_windows_offset_reply *req )
3152 fprintf( stderr, " x=%d", req->x );
3153 fprintf( stderr, ", y=%d", req->y );
3154 fprintf( stderr, ", mirror=%d", req->mirror );
3157 static void dump_get_visible_region_request( const struct get_visible_region_request *req )
3159 fprintf( stderr, " window=%08x", req->window );
3160 fprintf( stderr, ", flags=%08x", req->flags );
3163 static void dump_get_visible_region_reply( const struct get_visible_region_reply *req )
3165 fprintf( stderr, " top_win=%08x", req->top_win );
3166 dump_rectangle( ", top_rect=", &req->top_rect );
3167 dump_rectangle( ", win_rect=", &req->win_rect );
3168 fprintf( stderr, ", paint_flags=%08x", req->paint_flags );
3169 fprintf( stderr, ", total_size=%u", req->total_size );
3170 dump_varargs_rectangles( ", region=", cur_size );
3173 static void dump_get_surface_region_request( const struct get_surface_region_request *req )
3175 fprintf( stderr, " window=%08x", req->window );
3178 static void dump_get_surface_region_reply( const struct get_surface_region_reply *req )
3180 dump_rectangle( " visible_rect=", &req->visible_rect );
3181 fprintf( stderr, ", total_size=%u", req->total_size );
3182 dump_varargs_rectangles( ", region=", cur_size );
3185 static void dump_get_window_region_request( const struct get_window_region_request *req )
3187 fprintf( stderr, " window=%08x", req->window );
3190 static void dump_get_window_region_reply( const struct get_window_region_reply *req )
3192 fprintf( stderr, " total_size=%u", req->total_size );
3193 dump_varargs_rectangles( ", region=", cur_size );
3196 static void dump_set_window_region_request( const struct set_window_region_request *req )
3198 fprintf( stderr, " window=%08x", req->window );
3199 fprintf( stderr, ", redraw=%d", req->redraw );
3200 dump_varargs_rectangles( ", region=", cur_size );
3203 static void dump_get_update_region_request( const struct get_update_region_request *req )
3205 fprintf( stderr, " window=%08x", req->window );
3206 fprintf( stderr, ", from_child=%08x", req->from_child );
3207 fprintf( stderr, ", flags=%08x", req->flags );
3210 static void dump_get_update_region_reply( const struct get_update_region_reply *req )
3212 fprintf( stderr, " child=%08x", req->child );
3213 fprintf( stderr, ", flags=%08x", req->flags );
3214 fprintf( stderr, ", total_size=%u", req->total_size );
3215 dump_varargs_rectangles( ", region=", cur_size );
3218 static void dump_update_window_zorder_request( const struct update_window_zorder_request *req )
3220 fprintf( stderr, " window=%08x", req->window );
3221 dump_rectangle( ", rect=", &req->rect );
3224 static void dump_redraw_window_request( const struct redraw_window_request *req )
3226 fprintf( stderr, " window=%08x", req->window );
3227 fprintf( stderr, ", flags=%08x", req->flags );
3228 dump_varargs_rectangles( ", region=", cur_size );
3231 static void dump_set_window_property_request( const struct set_window_property_request *req )
3233 fprintf( stderr, " window=%08x", req->window );
3234 dump_uint64( ", data=", &req->data );
3235 fprintf( stderr, ", atom=%04x", req->atom );
3236 dump_varargs_unicode_str( ", name=", cur_size );
3239 static void dump_remove_window_property_request( const struct remove_window_property_request *req )
3241 fprintf( stderr, " window=%08x", req->window );
3242 fprintf( stderr, ", atom=%04x", req->atom );
3243 dump_varargs_unicode_str( ", name=", cur_size );
3246 static void dump_remove_window_property_reply( const struct remove_window_property_reply *req )
3248 dump_uint64( " data=", &req->data );
3251 static void dump_get_window_property_request( const struct get_window_property_request *req )
3253 fprintf( stderr, " window=%08x", req->window );
3254 fprintf( stderr, ", atom=%04x", req->atom );
3255 dump_varargs_unicode_str( ", name=", cur_size );
3258 static void dump_get_window_property_reply( const struct get_window_property_reply *req )
3260 dump_uint64( " data=", &req->data );
3263 static void dump_get_window_properties_request( const struct get_window_properties_request *req )
3265 fprintf( stderr, " window=%08x", req->window );
3268 static void dump_get_window_properties_reply( const struct get_window_properties_reply *req )
3270 fprintf( stderr, " total=%d", req->total );
3271 dump_varargs_properties( ", props=", cur_size );
3274 static void dump_create_winstation_request( const struct create_winstation_request *req )
3276 fprintf( stderr, " flags=%08x", req->flags );
3277 fprintf( stderr, ", access=%08x", req->access );
3278 fprintf( stderr, ", attributes=%08x", req->attributes );
3279 fprintf( stderr, ", rootdir=%04x", req->rootdir );
3280 dump_varargs_unicode_str( ", name=", cur_size );
3283 static void dump_create_winstation_reply( const struct create_winstation_reply *req )
3285 fprintf( stderr, " handle=%04x", req->handle );
3288 static void dump_open_winstation_request( const struct open_winstation_request *req )
3290 fprintf( stderr, " access=%08x", req->access );
3291 fprintf( stderr, ", attributes=%08x", req->attributes );
3292 fprintf( stderr, ", rootdir=%04x", req->rootdir );
3293 dump_varargs_unicode_str( ", name=", cur_size );
3296 static void dump_open_winstation_reply( const struct open_winstation_reply *req )
3298 fprintf( stderr, " handle=%04x", req->handle );
3301 static void dump_close_winstation_request( const struct close_winstation_request *req )
3303 fprintf( stderr, " handle=%04x", req->handle );
3306 static void dump_get_process_winstation_request( const struct get_process_winstation_request *req )
3310 static void dump_get_process_winstation_reply( const struct get_process_winstation_reply *req )
3312 fprintf( stderr, " handle=%04x", req->handle );
3315 static void dump_set_process_winstation_request( const struct set_process_winstation_request *req )
3317 fprintf( stderr, " handle=%04x", req->handle );
3320 static void dump_enum_winstation_request( const struct enum_winstation_request *req )
3322 fprintf( stderr, " index=%08x", req->index );
3325 static void dump_enum_winstation_reply( const struct enum_winstation_reply *req )
3327 fprintf( stderr, " next=%08x", req->next );
3328 dump_varargs_unicode_str( ", name=", cur_size );
3331 static void dump_create_desktop_request( const struct create_desktop_request *req )
3333 fprintf( stderr, " flags=%08x", req->flags );
3334 fprintf( stderr, ", access=%08x", req->access );
3335 fprintf( stderr, ", attributes=%08x", req->attributes );
3336 dump_varargs_unicode_str( ", name=", cur_size );
3339 static void dump_create_desktop_reply( const struct create_desktop_reply *req )
3341 fprintf( stderr, " handle=%04x", req->handle );
3344 static void dump_open_desktop_request( const struct open_desktop_request *req )
3346 fprintf( stderr, " winsta=%04x", req->winsta );
3347 fprintf( stderr, ", flags=%08x", req->flags );
3348 fprintf( stderr, ", access=%08x", req->access );
3349 fprintf( stderr, ", attributes=%08x", req->attributes );
3350 dump_varargs_unicode_str( ", name=", cur_size );
3353 static void dump_open_desktop_reply( const struct open_desktop_reply *req )
3355 fprintf( stderr, " handle=%04x", req->handle );
3358 static void dump_open_input_desktop_request( const struct open_input_desktop_request *req )
3360 fprintf( stderr, " flags=%08x", req->flags );
3361 fprintf( stderr, ", access=%08x", req->access );
3362 fprintf( stderr, ", attributes=%08x", req->attributes );
3365 static void dump_open_input_desktop_reply( const struct open_input_desktop_reply *req )
3367 fprintf( stderr, " handle=%04x", req->handle );
3370 static void dump_close_desktop_request( const struct close_desktop_request *req )
3372 fprintf( stderr, " handle=%04x", req->handle );
3375 static void dump_get_thread_desktop_request( const struct get_thread_desktop_request *req )
3377 fprintf( stderr, " tid=%04x", req->tid );
3380 static void dump_get_thread_desktop_reply( const struct get_thread_desktop_reply *req )
3382 fprintf( stderr, " handle=%04x", req->handle );
3385 static void dump_set_thread_desktop_request( const struct set_thread_desktop_request *req )
3387 fprintf( stderr, " handle=%04x", req->handle );
3390 static void dump_enum_desktop_request( const struct enum_desktop_request *req )
3392 fprintf( stderr, " winstation=%04x", req->winstation );
3393 fprintf( stderr, ", index=%08x", req->index );
3396 static void dump_enum_desktop_reply( const struct enum_desktop_reply *req )
3398 fprintf( stderr, " next=%08x", req->next );
3399 dump_varargs_unicode_str( ", name=", cur_size );
3402 static void dump_set_user_object_info_request( const struct set_user_object_info_request *req )
3404 fprintf( stderr, " handle=%04x", req->handle );
3405 fprintf( stderr, ", flags=%08x", req->flags );
3406 fprintf( stderr, ", obj_flags=%08x", req->obj_flags );
3409 static void dump_set_user_object_info_reply( const struct set_user_object_info_reply *req )
3411 fprintf( stderr, " is_desktop=%d", req->is_desktop );
3412 fprintf( stderr, ", old_obj_flags=%08x", req->old_obj_flags );
3413 dump_varargs_unicode_str( ", name=", cur_size );
3416 static void dump_register_hotkey_request( const struct register_hotkey_request *req )
3418 fprintf( stderr, " window=%08x", req->window );
3419 fprintf( stderr, ", id=%d", req->id );
3420 fprintf( stderr, ", flags=%08x", req->flags );
3421 fprintf( stderr, ", vkey=%08x", req->vkey );
3424 static void dump_register_hotkey_reply( const struct register_hotkey_reply *req )
3426 fprintf( stderr, " replaced=%d", req->replaced );
3427 fprintf( stderr, ", flags=%08x", req->flags );
3428 fprintf( stderr, ", vkey=%08x", req->vkey );
3431 static void dump_unregister_hotkey_request( const struct unregister_hotkey_request *req )
3433 fprintf( stderr, " window=%08x", req->window );
3434 fprintf( stderr, ", id=%d", req->id );
3437 static void dump_unregister_hotkey_reply( const struct unregister_hotkey_reply *req )
3439 fprintf( stderr, " flags=%08x", req->flags );
3440 fprintf( stderr, ", vkey=%08x", req->vkey );
3443 static void dump_attach_thread_input_request( const struct attach_thread_input_request *req )
3445 fprintf( stderr, " tid_from=%04x", req->tid_from );
3446 fprintf( stderr, ", tid_to=%04x", req->tid_to );
3447 fprintf( stderr, ", attach=%d", req->attach );
3450 static void dump_get_thread_input_request( const struct get_thread_input_request *req )
3452 fprintf( stderr, " tid=%04x", req->tid );
3455 static void dump_get_thread_input_reply( const struct get_thread_input_reply *req )
3457 fprintf( stderr, " focus=%08x", req->focus );
3458 fprintf( stderr, ", capture=%08x", req->capture );
3459 fprintf( stderr, ", active=%08x", req->active );
3460 fprintf( stderr, ", foreground=%08x", req->foreground );
3461 fprintf( stderr, ", menu_owner=%08x", req->menu_owner );
3462 fprintf( stderr, ", move_size=%08x", req->move_size );
3463 fprintf( stderr, ", caret=%08x", req->caret );
3464 fprintf( stderr, ", cursor=%08x", req->cursor );
3465 fprintf( stderr, ", show_count=%d", req->show_count );
3466 dump_rectangle( ", rect=", &req->rect );
3469 static void dump_get_last_input_time_request( const struct get_last_input_time_request *req )
3473 static void dump_get_last_input_time_reply( const struct get_last_input_time_reply *req )
3475 fprintf( stderr, " time=%08x", req->time );
3478 static void dump_get_key_state_request( const struct get_key_state_request *req )
3480 fprintf( stderr, " async=%d", req->async );
3481 fprintf( stderr, ", key=%d", req->key );
3484 static void dump_get_key_state_reply( const struct get_key_state_reply *req )
3486 fprintf( stderr, " state=%02x", req->state );
3487 dump_varargs_bytes( ", keystate=", cur_size );
3490 static void dump_set_key_state_request( const struct set_key_state_request *req )
3492 fprintf( stderr, " async=%d", req->async );
3493 dump_varargs_bytes( ", keystate=", cur_size );
3496 static void dump_set_foreground_window_request( const struct set_foreground_window_request *req )
3498 fprintf( stderr, " handle=%08x", req->handle );
3501 static void dump_set_foreground_window_reply( const struct set_foreground_window_reply *req )
3503 fprintf( stderr, " previous=%08x", req->previous );
3504 fprintf( stderr, ", send_msg_old=%d", req->send_msg_old );
3505 fprintf( stderr, ", send_msg_new=%d", req->send_msg_new );
3508 static void dump_set_focus_window_request( const struct set_focus_window_request *req )
3510 fprintf( stderr, " handle=%08x", req->handle );
3513 static void dump_set_focus_window_reply( const struct set_focus_window_reply *req )
3515 fprintf( stderr, " previous=%08x", req->previous );
3518 static void dump_set_active_window_request( const struct set_active_window_request *req )
3520 fprintf( stderr, " handle=%08x", req->handle );
3523 static void dump_set_active_window_reply( const struct set_active_window_reply *req )
3525 fprintf( stderr, " previous=%08x", req->previous );
3528 static void dump_set_capture_window_request( const struct set_capture_window_request *req )
3530 fprintf( stderr, " handle=%08x", req->handle );
3531 fprintf( stderr, ", flags=%08x", req->flags );
3534 static void dump_set_capture_window_reply( const struct set_capture_window_reply *req )
3536 fprintf( stderr, " previous=%08x", req->previous );
3537 fprintf( stderr, ", full_handle=%08x", req->full_handle );
3540 static void dump_set_caret_window_request( const struct set_caret_window_request *req )
3542 fprintf( stderr, " handle=%08x", req->handle );
3543 fprintf( stderr, ", width=%d", req->width );
3544 fprintf( stderr, ", height=%d", req->height );
3547 static void dump_set_caret_window_reply( const struct set_caret_window_reply *req )
3549 fprintf( stderr, " previous=%08x", req->previous );
3550 dump_rectangle( ", old_rect=", &req->old_rect );
3551 fprintf( stderr, ", old_hide=%d", req->old_hide );
3552 fprintf( stderr, ", old_state=%d", req->old_state );
3555 static void dump_set_caret_info_request( const struct set_caret_info_request *req )
3557 fprintf( stderr, " flags=%08x", req->flags );
3558 fprintf( stderr, ", handle=%08x", req->handle );
3559 fprintf( stderr, ", x=%d", req->x );
3560 fprintf( stderr, ", y=%d", req->y );
3561 fprintf( stderr, ", hide=%d", req->hide );
3562 fprintf( stderr, ", state=%d", req->state );
3565 static void dump_set_caret_info_reply( const struct set_caret_info_reply *req )
3567 fprintf( stderr, " full_handle=%08x", req->full_handle );
3568 dump_rectangle( ", old_rect=", &req->old_rect );
3569 fprintf( stderr, ", old_hide=%d", req->old_hide );
3570 fprintf( stderr, ", old_state=%d", req->old_state );
3573 static void dump_set_hook_request( const struct set_hook_request *req )
3575 fprintf( stderr, " id=%d", req->id );
3576 fprintf( stderr, ", pid=%04x", req->pid );
3577 fprintf( stderr, ", tid=%04x", req->tid );
3578 fprintf( stderr, ", event_min=%d", req->event_min );
3579 fprintf( stderr, ", event_max=%d", req->event_max );
3580 dump_uint64( ", proc=", &req->proc );
3581 fprintf( stderr, ", flags=%d", req->flags );
3582 fprintf( stderr, ", unicode=%d", req->unicode );
3583 dump_varargs_unicode_str( ", module=", cur_size );
3586 static void dump_set_hook_reply( const struct set_hook_reply *req )
3588 fprintf( stderr, " handle=%08x", req->handle );
3589 fprintf( stderr, ", active_hooks=%08x", req->active_hooks );
3592 static void dump_remove_hook_request( const struct remove_hook_request *req )
3594 fprintf( stderr, " handle=%08x", req->handle );
3595 dump_uint64( ", proc=", &req->proc );
3596 fprintf( stderr, ", id=%d", req->id );
3599 static void dump_remove_hook_reply( const struct remove_hook_reply *req )
3601 fprintf( stderr, " active_hooks=%08x", req->active_hooks );
3604 static void dump_start_hook_chain_request( const struct start_hook_chain_request *req )
3606 fprintf( stderr, " id=%d", req->id );
3607 fprintf( stderr, ", event=%d", req->event );
3608 fprintf( stderr, ", window=%08x", req->window );
3609 fprintf( stderr, ", object_id=%d", req->object_id );
3610 fprintf( stderr, ", child_id=%d", req->child_id );
3613 static void dump_start_hook_chain_reply( const struct start_hook_chain_reply *req )
3615 fprintf( stderr, " handle=%08x", req->handle );
3616 fprintf( stderr, ", pid=%04x", req->pid );
3617 fprintf( stderr, ", tid=%04x", req->tid );
3618 fprintf( stderr, ", unicode=%d", req->unicode );
3619 dump_uint64( ", proc=", &req->proc );
3620 fprintf( stderr, ", active_hooks=%08x", req->active_hooks );
3621 dump_varargs_unicode_str( ", module=", cur_size );
3624 static void dump_finish_hook_chain_request( const struct finish_hook_chain_request *req )
3626 fprintf( stderr, " id=%d", req->id );
3629 static void dump_get_hook_info_request( const struct get_hook_info_request *req )
3631 fprintf( stderr, " handle=%08x", req->handle );
3632 fprintf( stderr, ", get_next=%d", req->get_next );
3633 fprintf( stderr, ", event=%d", req->event );
3634 fprintf( stderr, ", window=%08x", req->window );
3635 fprintf( stderr, ", object_id=%d", req->object_id );
3636 fprintf( stderr, ", child_id=%d", req->child_id );
3639 static void dump_get_hook_info_reply( const struct get_hook_info_reply *req )
3641 fprintf( stderr, " handle=%08x", req->handle );
3642 fprintf( stderr, ", id=%d", req->id );
3643 fprintf( stderr, ", pid=%04x", req->pid );
3644 fprintf( stderr, ", tid=%04x", req->tid );
3645 dump_uint64( ", proc=", &req->proc );
3646 fprintf( stderr, ", unicode=%d", req->unicode );
3647 dump_varargs_unicode_str( ", module=", cur_size );
3650 static void dump_create_class_request( const struct create_class_request *req )
3652 fprintf( stderr, " local=%d", req->local );
3653 fprintf( stderr, ", atom=%04x", req->atom );
3654 fprintf( stderr, ", style=%08x", req->style );
3655 dump_uint64( ", instance=", &req->instance );
3656 fprintf( stderr, ", extra=%d", req->extra );
3657 fprintf( stderr, ", win_extra=%d", req->win_extra );
3658 dump_uint64( ", client_ptr=", &req->client_ptr );
3659 fprintf( stderr, ", name_offset=%u", req->name_offset );
3660 dump_varargs_unicode_str( ", name=", cur_size );
3663 static void dump_create_class_reply( const struct create_class_reply *req )
3665 fprintf( stderr, " atom=%04x", req->atom );
3668 static void dump_destroy_class_request( const struct destroy_class_request *req )
3670 fprintf( stderr, " atom=%04x", req->atom );
3671 dump_uint64( ", instance=", &req->instance );
3672 dump_varargs_unicode_str( ", name=", cur_size );
3675 static void dump_destroy_class_reply( const struct destroy_class_reply *req )
3677 dump_uint64( " client_ptr=", &req->client_ptr );
3680 static void dump_set_class_info_request( const struct set_class_info_request *req )
3682 fprintf( stderr, " window=%08x", req->window );
3683 fprintf( stderr, ", flags=%08x", req->flags );
3684 fprintf( stderr, ", atom=%04x", req->atom );
3685 fprintf( stderr, ", style=%08x", req->style );
3686 fprintf( stderr, ", win_extra=%d", req->win_extra );
3687 dump_uint64( ", instance=", &req->instance );
3688 fprintf( stderr, ", extra_offset=%d", req->extra_offset );
3689 fprintf( stderr, ", extra_size=%u", req->extra_size );
3690 dump_uint64( ", extra_value=", &req->extra_value );
3693 static void dump_set_class_info_reply( const struct set_class_info_reply *req )
3695 fprintf( stderr, " old_atom=%04x", req->old_atom );
3696 fprintf( stderr, ", base_atom=%04x", req->base_atom );
3697 dump_uint64( ", old_instance=", &req->old_instance );
3698 dump_uint64( ", old_extra_value=", &req->old_extra_value );
3699 fprintf( stderr, ", old_style=%08x", req->old_style );
3700 fprintf( stderr, ", old_extra=%d", req->old_extra );
3701 fprintf( stderr, ", old_win_extra=%d", req->old_win_extra );
3704 static void dump_open_clipboard_request( const struct open_clipboard_request *req )
3706 fprintf( stderr, " window=%08x", req->window );
3709 static void dump_open_clipboard_reply( const struct open_clipboard_reply *req )
3711 fprintf( stderr, " owner=%08x", req->owner );
3714 static void dump_close_clipboard_request( const struct close_clipboard_request *req )
3718 static void dump_close_clipboard_reply( const struct close_clipboard_reply *req )
3720 fprintf( stderr, " viewer=%08x", req->viewer );
3721 fprintf( stderr, ", owner=%08x", req->owner );
3724 static void dump_empty_clipboard_request( const struct empty_clipboard_request *req )
3728 static void dump_set_clipboard_data_request( const struct set_clipboard_data_request *req )
3730 fprintf( stderr, " format=%08x", req->format );
3731 fprintf( stderr, ", lcid=%08x", req->lcid );
3732 dump_varargs_bytes( ", data=", cur_size );
3735 static void dump_set_clipboard_data_reply( const struct set_clipboard_data_reply *req )
3737 fprintf( stderr, " seqno=%08x", req->seqno );
3740 static void dump_get_clipboard_data_request( const struct get_clipboard_data_request *req )
3742 fprintf( stderr, " format=%08x", req->format );
3743 fprintf( stderr, ", render=%d", req->render );
3744 fprintf( stderr, ", cached=%d", req->cached );
3745 fprintf( stderr, ", seqno=%08x", req->seqno );
3748 static void dump_get_clipboard_data_reply( const struct get_clipboard_data_reply *req )
3750 fprintf( stderr, " from=%08x", req->from );
3751 fprintf( stderr, ", owner=%08x", req->owner );
3752 fprintf( stderr, ", seqno=%08x", req->seqno );
3753 fprintf( stderr, ", total=%u", req->total );
3754 dump_varargs_bytes( ", data=", cur_size );
3757 static void dump_get_clipboard_formats_request( const struct get_clipboard_formats_request *req )
3759 fprintf( stderr, " format=%08x", req->format );
3762 static void dump_get_clipboard_formats_reply( const struct get_clipboard_formats_reply *req )
3764 fprintf( stderr, " count=%08x", req->count );
3765 dump_varargs_uints( ", formats=", cur_size );
3768 static void dump_enum_clipboard_formats_request( const struct enum_clipboard_formats_request *req )
3770 fprintf( stderr, " previous=%08x", req->previous );
3773 static void dump_enum_clipboard_formats_reply( const struct enum_clipboard_formats_reply *req )
3775 fprintf( stderr, " format=%08x", req->format );
3778 static void dump_release_clipboard_request( const struct release_clipboard_request *req )
3780 fprintf( stderr, " owner=%08x", req->owner );
3783 static void dump_release_clipboard_reply( const struct release_clipboard_reply *req )
3785 fprintf( stderr, " viewer=%08x", req->viewer );
3786 fprintf( stderr, ", owner=%08x", req->owner );
3789 static void dump_get_clipboard_info_request( const struct get_clipboard_info_request *req )
3793 static void dump_get_clipboard_info_reply( const struct get_clipboard_info_reply *req )
3795 fprintf( stderr, " window=%08x", req->window );
3796 fprintf( stderr, ", owner=%08x", req->owner );
3797 fprintf( stderr, ", viewer=%08x", req->viewer );
3798 fprintf( stderr, ", seqno=%08x", req->seqno );
3801 static void dump_set_clipboard_viewer_request( const struct set_clipboard_viewer_request *req )
3803 fprintf( stderr, " viewer=%08x", req->viewer );
3804 fprintf( stderr, ", previous=%08x", req->previous );
3807 static void dump_set_clipboard_viewer_reply( const struct set_clipboard_viewer_reply *req )
3809 fprintf( stderr, " old_viewer=%08x", req->old_viewer );
3810 fprintf( stderr, ", owner=%08x", req->owner );
3813 static void dump_add_clipboard_listener_request( const struct add_clipboard_listener_request *req )
3815 fprintf( stderr, " window=%08x", req->window );
3818 static void dump_remove_clipboard_listener_request( const struct remove_clipboard_listener_request *req )
3820 fprintf( stderr, " window=%08x", req->window );
3823 static void dump_open_token_request( const struct open_token_request *req )
3825 fprintf( stderr, " handle=%04x", req->handle );
3826 fprintf( stderr, ", access=%08x", req->access );
3827 fprintf( stderr, ", attributes=%08x", req->attributes );
3828 fprintf( stderr, ", flags=%08x", req->flags );
3831 static void dump_open_token_reply( const struct open_token_reply *req )
3833 fprintf( stderr, " token=%04x", req->token );
3836 static void dump_set_global_windows_request( const struct set_global_windows_request *req )
3838 fprintf( stderr, " flags=%08x", req->flags );
3839 fprintf( stderr, ", shell_window=%08x", req->shell_window );
3840 fprintf( stderr, ", shell_listview=%08x", req->shell_listview );
3841 fprintf( stderr, ", progman_window=%08x", req->progman_window );
3842 fprintf( stderr, ", taskman_window=%08x", req->taskman_window );
3845 static void dump_set_global_windows_reply( const struct set_global_windows_reply *req )
3847 fprintf( stderr, " old_shell_window=%08x", req->old_shell_window );
3848 fprintf( stderr, ", old_shell_listview=%08x", req->old_shell_listview );
3849 fprintf( stderr, ", old_progman_window=%08x", req->old_progman_window );
3850 fprintf( stderr, ", old_taskman_window=%08x", req->old_taskman_window );
3853 static void dump_adjust_token_privileges_request( const struct adjust_token_privileges_request *req )
3855 fprintf( stderr, " handle=%04x", req->handle );
3856 fprintf( stderr, ", disable_all=%d", req->disable_all );
3857 fprintf( stderr, ", get_modified_state=%d", req->get_modified_state );
3858 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3861 static void dump_adjust_token_privileges_reply( const struct adjust_token_privileges_reply *req )
3863 fprintf( stderr, " len=%08x", req->len );
3864 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3867 static void dump_get_token_privileges_request( const struct get_token_privileges_request *req )
3869 fprintf( stderr, " handle=%04x", req->handle );
3872 static void dump_get_token_privileges_reply( const struct get_token_privileges_reply *req )
3874 fprintf( stderr, " len=%08x", req->len );
3875 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3878 static void dump_check_token_privileges_request( const struct check_token_privileges_request *req )
3880 fprintf( stderr, " handle=%04x", req->handle );
3881 fprintf( stderr, ", all_required=%d", req->all_required );
3882 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3885 static void dump_check_token_privileges_reply( const struct check_token_privileges_reply *req )
3887 fprintf( stderr, " has_privileges=%d", req->has_privileges );
3888 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3891 static void dump_duplicate_token_request( const struct duplicate_token_request *req )
3893 fprintf( stderr, " handle=%04x", req->handle );
3894 fprintf( stderr, ", access=%08x", req->access );
3895 fprintf( stderr, ", primary=%d", req->primary );
3896 fprintf( stderr, ", impersonation_level=%d", req->impersonation_level );
3897 dump_varargs_object_attributes( ", objattr=", cur_size );
3900 static void dump_duplicate_token_reply( const struct duplicate_token_reply *req )
3902 fprintf( stderr, " new_handle=%04x", req->new_handle );
3905 static void dump_filter_token_request( const struct filter_token_request *req )
3907 fprintf( stderr, " handle=%04x", req->handle );
3908 fprintf( stderr, ", flags=%08x", req->flags );
3909 fprintf( stderr, ", privileges_size=%u", req->privileges_size );
3910 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", min(cur_size,req->privileges_size) );
3911 dump_varargs_SID( ", disable_sids=", cur_size );
3914 static void dump_filter_token_reply( const struct filter_token_reply *req )
3916 fprintf( stderr, " new_handle=%04x", req->new_handle );
3919 static void dump_access_check_request( const struct access_check_request *req )
3921 fprintf( stderr, " handle=%04x", req->handle );
3922 fprintf( stderr, ", desired_access=%08x", req->desired_access );
3923 dump_generic_map( ", mapping=", &req->mapping );
3924 dump_varargs_security_descriptor( ", sd=", cur_size );
3927 static void dump_access_check_reply( const struct access_check_reply *req )
3929 fprintf( stderr, " access_granted=%08x", req->access_granted );
3930 fprintf( stderr, ", access_status=%08x", req->access_status );
3931 fprintf( stderr, ", privileges_len=%08x", req->privileges_len );
3932 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3935 static void dump_get_token_sid_request( const struct get_token_sid_request *req )
3937 fprintf( stderr, " handle=%04x", req->handle );
3938 fprintf( stderr, ", which_sid=%08x", req->which_sid );
3941 static void dump_get_token_sid_reply( const struct get_token_sid_reply *req )
3943 fprintf( stderr, " sid_len=%u", req->sid_len );
3944 dump_varargs_SID( ", sid=", cur_size );
3947 static void dump_get_token_groups_request( const struct get_token_groups_request *req )
3949 fprintf( stderr, " handle=%04x", req->handle );
3952 static void dump_get_token_groups_reply( const struct get_token_groups_reply *req )
3954 fprintf( stderr, " user_len=%u", req->user_len );
3955 dump_varargs_token_groups( ", user=", cur_size );
3958 static void dump_get_token_default_dacl_request( const struct get_token_default_dacl_request *req )
3960 fprintf( stderr, " handle=%04x", req->handle );
3963 static void dump_get_token_default_dacl_reply( const struct get_token_default_dacl_reply *req )
3965 fprintf( stderr, " acl_len=%u", req->acl_len );
3966 dump_varargs_ACL( ", acl=", cur_size );
3969 static void dump_set_token_default_dacl_request( const struct set_token_default_dacl_request *req )
3971 fprintf( stderr, " handle=%04x", req->handle );
3972 dump_varargs_ACL( ", acl=", cur_size );
3975 static void dump_set_security_object_request( const struct set_security_object_request *req )
3977 fprintf( stderr, " handle=%04x", req->handle );
3978 fprintf( stderr, ", security_info=%08x", req->security_info );
3979 dump_varargs_security_descriptor( ", sd=", cur_size );
3982 static void dump_get_security_object_request( const struct get_security_object_request *req )
3984 fprintf( stderr, " handle=%04x", req->handle );
3985 fprintf( stderr, ", security_info=%08x", req->security_info );
3988 static void dump_get_security_object_reply( const struct get_security_object_reply *req )
3990 fprintf( stderr, " sd_len=%08x", req->sd_len );
3991 dump_varargs_security_descriptor( ", sd=", cur_size );
3994 static void dump_get_system_handles_request( const struct get_system_handles_request *req )
3998 static void dump_get_system_handles_reply( const struct get_system_handles_reply *req )
4000 fprintf( stderr, " count=%08x", req->count );
4001 dump_varargs_handle_infos( ", data=", cur_size );
4004 static void dump_create_mailslot_request( const struct create_mailslot_request *req )
4006 fprintf( stderr, " access=%08x", req->access );
4007 dump_timeout( ", read_timeout=", &req->read_timeout );
4008 fprintf( stderr, ", max_msgsize=%08x", req->max_msgsize );
4009 dump_varargs_object_attributes( ", objattr=", cur_size );
4012 static void dump_create_mailslot_reply( const struct create_mailslot_reply *req )
4014 fprintf( stderr, " handle=%04x", req->handle );
4017 static void dump_set_mailslot_info_request( const struct set_mailslot_info_request *req )
4019 fprintf( stderr, " handle=%04x", req->handle );
4020 dump_timeout( ", read_timeout=", &req->read_timeout );
4021 fprintf( stderr, ", flags=%08x", req->flags );
4024 static void dump_set_mailslot_info_reply( const struct set_mailslot_info_reply *req )
4026 dump_timeout( " read_timeout=", &req->read_timeout );
4027 fprintf( stderr, ", max_msgsize=%08x", req->max_msgsize );
4030 static void dump_create_directory_request( const struct create_directory_request *req )
4032 fprintf( stderr, " access=%08x", req->access );
4033 dump_varargs_object_attributes( ", objattr=", cur_size );
4036 static void dump_create_directory_reply( const struct create_directory_reply *req )
4038 fprintf( stderr, " handle=%04x", req->handle );
4041 static void dump_open_directory_request( const struct open_directory_request *req )
4043 fprintf( stderr, " access=%08x", req->access );
4044 fprintf( stderr, ", attributes=%08x", req->attributes );
4045 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4046 dump_varargs_unicode_str( ", directory_name=", cur_size );
4049 static void dump_open_directory_reply( const struct open_directory_reply *req )
4051 fprintf( stderr, " handle=%04x", req->handle );
4054 static void dump_get_directory_entry_request( const struct get_directory_entry_request *req )
4056 fprintf( stderr, " handle=%04x", req->handle );
4057 fprintf( stderr, ", index=%08x", req->index );
4060 static void dump_get_directory_entry_reply( const struct get_directory_entry_reply *req )
4062 fprintf( stderr, " name_len=%u", req->name_len );
4063 dump_varargs_unicode_str( ", name=", min(cur_size,req->name_len) );
4064 dump_varargs_unicode_str( ", type=", cur_size );
4067 static void dump_create_symlink_request( const struct create_symlink_request *req )
4069 fprintf( stderr, " access=%08x", req->access );
4070 dump_varargs_object_attributes( ", objattr=", cur_size );
4071 dump_varargs_unicode_str( ", target_name=", cur_size );
4074 static void dump_create_symlink_reply( const struct create_symlink_reply *req )
4076 fprintf( stderr, " handle=%04x", req->handle );
4079 static void dump_open_symlink_request( const struct open_symlink_request *req )
4081 fprintf( stderr, " access=%08x", req->access );
4082 fprintf( stderr, ", attributes=%08x", req->attributes );
4083 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4084 dump_varargs_unicode_str( ", name=", cur_size );
4087 static void dump_open_symlink_reply( const struct open_symlink_reply *req )
4089 fprintf( stderr, " handle=%04x", req->handle );
4092 static void dump_query_symlink_request( const struct query_symlink_request *req )
4094 fprintf( stderr, " handle=%04x", req->handle );
4097 static void dump_query_symlink_reply( const struct query_symlink_reply *req )
4099 fprintf( stderr, " total=%u", req->total );
4100 dump_varargs_unicode_str( ", target_name=", cur_size );
4103 static void dump_get_object_info_request( const struct get_object_info_request *req )
4105 fprintf( stderr, " handle=%04x", req->handle );
4108 static void dump_get_object_info_reply( const struct get_object_info_reply *req )
4110 fprintf( stderr, " access=%08x", req->access );
4111 fprintf( stderr, ", ref_count=%08x", req->ref_count );
4112 fprintf( stderr, ", handle_count=%08x", req->handle_count );
4113 fprintf( stderr, ", total=%u", req->total );
4114 dump_varargs_unicode_str( ", name=", cur_size );
4117 static void dump_get_object_type_request( const struct get_object_type_request *req )
4119 fprintf( stderr, " handle=%04x", req->handle );
4122 static void dump_get_object_type_reply( const struct get_object_type_reply *req )
4124 dump_varargs_object_type_info( " info=", cur_size );
4127 static void dump_get_object_types_request( const struct get_object_types_request *req )
4131 static void dump_get_object_types_reply( const struct get_object_types_reply *req )
4133 fprintf( stderr, " count=%d", req->count );
4134 dump_varargs_object_types_info( ", info=", cur_size );
4137 static void dump_allocate_locally_unique_id_request( const struct allocate_locally_unique_id_request *req )
4141 static void dump_allocate_locally_unique_id_reply( const struct allocate_locally_unique_id_reply *req )
4143 dump_luid( " luid=", &req->luid );
4146 static void dump_create_device_manager_request( const struct create_device_manager_request *req )
4148 fprintf( stderr, " access=%08x", req->access );
4149 fprintf( stderr, ", attributes=%08x", req->attributes );
4152 static void dump_create_device_manager_reply( const struct create_device_manager_reply *req )
4154 fprintf( stderr, " handle=%04x", req->handle );
4157 static void dump_create_device_request( const struct create_device_request *req )
4159 fprintf( stderr, " rootdir=%04x", req->rootdir );
4160 dump_uint64( ", user_ptr=", &req->user_ptr );
4161 fprintf( stderr, ", manager=%04x", req->manager );
4162 dump_varargs_unicode_str( ", name=", cur_size );
4165 static void dump_delete_device_request( const struct delete_device_request *req )
4167 fprintf( stderr, " manager=%04x", req->manager );
4168 dump_uint64( ", device=", &req->device );
4171 static void dump_get_next_device_request_request( const struct get_next_device_request_request *req )
4173 fprintf( stderr, " manager=%04x", req->manager );
4174 fprintf( stderr, ", prev=%04x", req->prev );
4175 fprintf( stderr, ", status=%08x", req->status );
4176 dump_uint64( ", user_ptr=", &req->user_ptr );
4179 static void dump_get_next_device_request_reply( const struct get_next_device_request_reply *req )
4181 dump_irp_params( " params=", &req->params );
4182 fprintf( stderr, ", next=%04x", req->next );
4183 fprintf( stderr, ", client_tid=%04x", req->client_tid );
4184 dump_uint64( ", client_thread=", &req->client_thread );
4185 fprintf( stderr, ", in_size=%u", req->in_size );
4186 dump_varargs_bytes( ", next_data=", cur_size );
4189 static void dump_get_kernel_object_ptr_request( const struct get_kernel_object_ptr_request *req )
4191 fprintf( stderr, " manager=%04x", req->manager );
4192 fprintf( stderr, ", handle=%04x", req->handle );
4195 static void dump_get_kernel_object_ptr_reply( const struct get_kernel_object_ptr_reply *req )
4197 dump_uint64( " user_ptr=", &req->user_ptr );
4200 static void dump_set_kernel_object_ptr_request( const struct set_kernel_object_ptr_request *req )
4202 fprintf( stderr, " manager=%04x", req->manager );
4203 fprintf( stderr, ", handle=%04x", req->handle );
4204 dump_uint64( ", user_ptr=", &req->user_ptr );
4207 static void dump_grab_kernel_object_request( const struct grab_kernel_object_request *req )
4209 fprintf( stderr, " manager=%04x", req->manager );
4210 dump_uint64( ", user_ptr=", &req->user_ptr );
4213 static void dump_release_kernel_object_request( const struct release_kernel_object_request *req )
4215 fprintf( stderr, " manager=%04x", req->manager );
4216 dump_uint64( ", user_ptr=", &req->user_ptr );
4219 static void dump_get_kernel_object_handle_request( const struct get_kernel_object_handle_request *req )
4221 fprintf( stderr, " manager=%04x", req->manager );
4222 dump_uint64( ", user_ptr=", &req->user_ptr );
4223 fprintf( stderr, ", access=%08x", req->access );
4226 static void dump_get_kernel_object_handle_reply( const struct get_kernel_object_handle_reply *req )
4228 fprintf( stderr, " handle=%04x", req->handle );
4231 static void dump_make_process_system_request( const struct make_process_system_request *req )
4233 fprintf( stderr, " handle=%04x", req->handle );
4236 static void dump_make_process_system_reply( const struct make_process_system_reply *req )
4238 fprintf( stderr, " event=%04x", req->event );
4241 static void dump_get_token_info_request( const struct get_token_info_request *req )
4243 fprintf( stderr, " handle=%04x", req->handle );
4246 static void dump_get_token_info_reply( const struct get_token_info_reply *req )
4248 dump_luid( " token_id=", &req->token_id );
4249 dump_luid( ", modified_id=", &req->modified_id );
4250 fprintf( stderr, ", primary=%d", req->primary );
4251 fprintf( stderr, ", impersonation_level=%d", req->impersonation_level );
4252 fprintf( stderr, ", elevation=%d", req->elevation );
4253 fprintf( stderr, ", group_count=%d", req->group_count );
4254 fprintf( stderr, ", privilege_count=%d", req->privilege_count );
4257 static void dump_create_linked_token_request( const struct create_linked_token_request *req )
4259 fprintf( stderr, " handle=%04x", req->handle );
4262 static void dump_create_linked_token_reply( const struct create_linked_token_reply *req )
4264 fprintf( stderr, " linked=%04x", req->linked );
4267 static void dump_create_completion_request( const struct create_completion_request *req )
4269 fprintf( stderr, " access=%08x", req->access );
4270 fprintf( stderr, ", concurrent=%08x", req->concurrent );
4271 dump_varargs_object_attributes( ", objattr=", cur_size );
4274 static void dump_create_completion_reply( const struct create_completion_reply *req )
4276 fprintf( stderr, " handle=%04x", req->handle );
4279 static void dump_open_completion_request( const struct open_completion_request *req )
4281 fprintf( stderr, " access=%08x", req->access );
4282 fprintf( stderr, ", attributes=%08x", req->attributes );
4283 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4284 dump_varargs_unicode_str( ", filename=", cur_size );
4287 static void dump_open_completion_reply( const struct open_completion_reply *req )
4289 fprintf( stderr, " handle=%04x", req->handle );
4292 static void dump_add_completion_request( const struct add_completion_request *req )
4294 fprintf( stderr, " handle=%04x", req->handle );
4295 dump_uint64( ", ckey=", &req->ckey );
4296 dump_uint64( ", cvalue=", &req->cvalue );
4297 dump_uint64( ", information=", &req->information );
4298 fprintf( stderr, ", status=%08x", req->status );
4301 static void dump_remove_completion_request( const struct remove_completion_request *req )
4303 fprintf( stderr, " handle=%04x", req->handle );
4306 static void dump_remove_completion_reply( const struct remove_completion_reply *req )
4308 dump_uint64( " ckey=", &req->ckey );
4309 dump_uint64( ", cvalue=", &req->cvalue );
4310 dump_uint64( ", information=", &req->information );
4311 fprintf( stderr, ", status=%08x", req->status );
4314 static void dump_query_completion_request( const struct query_completion_request *req )
4316 fprintf( stderr, " handle=%04x", req->handle );
4319 static void dump_query_completion_reply( const struct query_completion_reply *req )
4321 fprintf( stderr, " depth=%08x", req->depth );
4324 static void dump_set_completion_info_request( const struct set_completion_info_request *req )
4326 fprintf( stderr, " handle=%04x", req->handle );
4327 dump_uint64( ", ckey=", &req->ckey );
4328 fprintf( stderr, ", chandle=%04x", req->chandle );
4331 static void dump_add_fd_completion_request( const struct add_fd_completion_request *req )
4333 fprintf( stderr, " handle=%04x", req->handle );
4334 dump_uint64( ", cvalue=", &req->cvalue );
4335 dump_uint64( ", information=", &req->information );
4336 fprintf( stderr, ", status=%08x", req->status );
4337 fprintf( stderr, ", async=%d", req->async );
4340 static void dump_set_fd_completion_mode_request( const struct set_fd_completion_mode_request *req )
4342 fprintf( stderr, " handle=%04x", req->handle );
4343 fprintf( stderr, ", flags=%08x", req->flags );
4346 static void dump_set_fd_disp_info_request( const struct set_fd_disp_info_request *req )
4348 fprintf( stderr, " handle=%04x", req->handle );
4349 fprintf( stderr, ", unlink=%d", req->unlink );
4352 static void dump_set_fd_name_info_request( const struct set_fd_name_info_request *req )
4354 fprintf( stderr, " handle=%04x", req->handle );
4355 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4356 fprintf( stderr, ", namelen=%u", req->namelen );
4357 fprintf( stderr, ", link=%d", req->link );
4358 fprintf( stderr, ", replace=%d", req->replace );
4359 dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
4360 dump_varargs_string( ", filename=", cur_size );
4363 static void dump_get_window_layered_info_request( const struct get_window_layered_info_request *req )
4365 fprintf( stderr, " handle=%08x", req->handle );
4368 static void dump_get_window_layered_info_reply( const struct get_window_layered_info_reply *req )
4370 fprintf( stderr, " color_key=%08x", req->color_key );
4371 fprintf( stderr, ", alpha=%08x", req->alpha );
4372 fprintf( stderr, ", flags=%08x", req->flags );
4375 static void dump_set_window_layered_info_request( const struct set_window_layered_info_request *req )
4377 fprintf( stderr, " handle=%08x", req->handle );
4378 fprintf( stderr, ", color_key=%08x", req->color_key );
4379 fprintf( stderr, ", alpha=%08x", req->alpha );
4380 fprintf( stderr, ", flags=%08x", req->flags );
4383 static void dump_alloc_user_handle_request( const struct alloc_user_handle_request *req )
4387 static void dump_alloc_user_handle_reply( const struct alloc_user_handle_reply *req )
4389 fprintf( stderr, " handle=%08x", req->handle );
4392 static void dump_free_user_handle_request( const struct free_user_handle_request *req )
4394 fprintf( stderr, " handle=%08x", req->handle );
4397 static void dump_set_cursor_request( const struct set_cursor_request *req )
4399 fprintf( stderr, " flags=%08x", req->flags );
4400 fprintf( stderr, ", handle=%08x", req->handle );
4401 fprintf( stderr, ", show_count=%d", req->show_count );
4402 fprintf( stderr, ", x=%d", req->x );
4403 fprintf( stderr, ", y=%d", req->y );
4404 dump_rectangle( ", clip=", &req->clip );
4405 fprintf( stderr, ", clip_msg=%08x", req->clip_msg );
4408 static void dump_set_cursor_reply( const struct set_cursor_reply *req )
4410 fprintf( stderr, " prev_handle=%08x", req->prev_handle );
4411 fprintf( stderr, ", prev_count=%d", req->prev_count );
4412 fprintf( stderr, ", prev_x=%d", req->prev_x );
4413 fprintf( stderr, ", prev_y=%d", req->prev_y );
4414 fprintf( stderr, ", new_x=%d", req->new_x );
4415 fprintf( stderr, ", new_y=%d", req->new_y );
4416 dump_rectangle( ", new_clip=", &req->new_clip );
4417 fprintf( stderr, ", last_change=%08x", req->last_change );
4420 static void dump_get_cursor_history_request( const struct get_cursor_history_request *req )
4424 static void dump_get_cursor_history_reply( const struct get_cursor_history_reply *req )
4426 dump_varargs_cursor_positions( " history=", cur_size );
4429 static void dump_get_rawinput_buffer_request( const struct get_rawinput_buffer_request *req )
4431 fprintf( stderr, " rawinput_size=%u", req->rawinput_size );
4432 fprintf( stderr, ", buffer_size=%u", req->buffer_size );
4435 static void dump_get_rawinput_buffer_reply( const struct get_rawinput_buffer_reply *req )
4437 fprintf( stderr, " next_size=%u", req->next_size );
4438 fprintf( stderr, ", count=%08x", req->count );
4439 dump_varargs_bytes( ", data=", cur_size );
4442 static void dump_update_rawinput_devices_request( const struct update_rawinput_devices_request *req )
4444 dump_varargs_rawinput_devices( " devices=", cur_size );
4447 static void dump_get_rawinput_devices_request( const struct get_rawinput_devices_request *req )
4451 static void dump_get_rawinput_devices_reply( const struct get_rawinput_devices_reply *req )
4453 fprintf( stderr, " device_count=%08x", req->device_count );
4454 dump_varargs_rawinput_devices( ", devices=", cur_size );
4457 static void dump_create_job_request( const struct create_job_request *req )
4459 fprintf( stderr, " access=%08x", req->access );
4460 dump_varargs_object_attributes( ", objattr=", cur_size );
4463 static void dump_create_job_reply( const struct create_job_reply *req )
4465 fprintf( stderr, " handle=%04x", req->handle );
4468 static void dump_open_job_request( const struct open_job_request *req )
4470 fprintf( stderr, " access=%08x", req->access );
4471 fprintf( stderr, ", attributes=%08x", req->attributes );
4472 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4473 dump_varargs_unicode_str( ", name=", cur_size );
4476 static void dump_open_job_reply( const struct open_job_reply *req )
4478 fprintf( stderr, " handle=%04x", req->handle );
4481 static void dump_assign_job_request( const struct assign_job_request *req )
4483 fprintf( stderr, " job=%04x", req->job );
4484 fprintf( stderr, ", process=%04x", req->process );
4487 static void dump_process_in_job_request( const struct process_in_job_request *req )
4489 fprintf( stderr, " job=%04x", req->job );
4490 fprintf( stderr, ", process=%04x", req->process );
4493 static void dump_set_job_limits_request( const struct set_job_limits_request *req )
4495 fprintf( stderr, " handle=%04x", req->handle );
4496 fprintf( stderr, ", limit_flags=%08x", req->limit_flags );
4499 static void dump_set_job_completion_port_request( const struct set_job_completion_port_request *req )
4501 fprintf( stderr, " job=%04x", req->job );
4502 fprintf( stderr, ", port=%04x", req->port );
4503 dump_uint64( ", key=", &req->key );
4506 static void dump_get_job_info_request( const struct get_job_info_request *req )
4508 fprintf( stderr, " handle=%04x", req->handle );
4511 static void dump_get_job_info_reply( const struct get_job_info_reply *req )
4513 fprintf( stderr, " total_processes=%d", req->total_processes );
4514 fprintf( stderr, ", active_processes=%d", req->active_processes );
4517 static void dump_terminate_job_request( const struct terminate_job_request *req )
4519 fprintf( stderr, " handle=%04x", req->handle );
4520 fprintf( stderr, ", status=%d", req->status );
4523 static void dump_suspend_process_request( const struct suspend_process_request *req )
4525 fprintf( stderr, " handle=%04x", req->handle );
4528 static void dump_resume_process_request( const struct resume_process_request *req )
4530 fprintf( stderr, " handle=%04x", req->handle );
4533 static void dump_get_next_thread_request( const struct get_next_thread_request *req )
4535 fprintf( stderr, " process=%04x", req->process );
4536 fprintf( stderr, ", last=%04x", req->last );
4537 fprintf( stderr, ", access=%08x", req->access );
4538 fprintf( stderr, ", attributes=%08x", req->attributes );
4539 fprintf( stderr, ", flags=%08x", req->flags );
4542 static void dump_get_next_thread_reply( const struct get_next_thread_reply *req )
4544 fprintf( stderr, " handle=%04x", req->handle );
4547 static const dump_func req_dumpers[REQ_NB_REQUESTS] = {
4548 (dump_func)dump_new_process_request,
4549 (dump_func)dump_get_new_process_info_request,
4550 (dump_func)dump_new_thread_request,
4551 (dump_func)dump_get_startup_info_request,
4552 (dump_func)dump_init_process_done_request,
4553 (dump_func)dump_init_first_thread_request,
4554 (dump_func)dump_init_thread_request,
4555 (dump_func)dump_terminate_process_request,
4556 (dump_func)dump_terminate_thread_request,
4557 (dump_func)dump_get_process_info_request,
4558 (dump_func)dump_get_process_debug_info_request,
4559 (dump_func)dump_get_process_image_name_request,
4560 (dump_func)dump_get_process_vm_counters_request,
4561 (dump_func)dump_set_process_info_request,
4562 (dump_func)dump_get_thread_info_request,
4563 (dump_func)dump_get_thread_times_request,
4564 (dump_func)dump_set_thread_info_request,
4565 (dump_func)dump_suspend_thread_request,
4566 (dump_func)dump_resume_thread_request,
4567 (dump_func)dump_queue_apc_request,
4568 (dump_func)dump_get_apc_result_request,
4569 (dump_func)dump_close_handle_request,
4570 (dump_func)dump_set_handle_info_request,
4571 (dump_func)dump_dup_handle_request,
4572 (dump_func)dump_make_temporary_request,
4573 (dump_func)dump_open_process_request,
4574 (dump_func)dump_open_thread_request,
4575 (dump_func)dump_select_request,
4576 (dump_func)dump_create_event_request,
4577 (dump_func)dump_event_op_request,
4578 (dump_func)dump_query_event_request,
4579 (dump_func)dump_open_event_request,
4580 (dump_func)dump_create_keyed_event_request,
4581 (dump_func)dump_open_keyed_event_request,
4582 (dump_func)dump_create_mutex_request,
4583 (dump_func)dump_release_mutex_request,
4584 (dump_func)dump_open_mutex_request,
4585 (dump_func)dump_query_mutex_request,
4586 (dump_func)dump_create_semaphore_request,
4587 (dump_func)dump_release_semaphore_request,
4588 (dump_func)dump_query_semaphore_request,
4589 (dump_func)dump_open_semaphore_request,
4590 (dump_func)dump_create_file_request,
4591 (dump_func)dump_open_file_object_request,
4592 (dump_func)dump_alloc_file_handle_request,
4593 (dump_func)dump_get_handle_unix_name_request,
4594 (dump_func)dump_get_handle_fd_request,
4595 (dump_func)dump_get_directory_cache_entry_request,
4596 (dump_func)dump_flush_request,
4597 (dump_func)dump_get_file_info_request,
4598 (dump_func)dump_get_volume_info_request,
4599 (dump_func)dump_lock_file_request,
4600 (dump_func)dump_unlock_file_request,
4601 (dump_func)dump_set_socket_event_request,
4602 (dump_func)dump_get_socket_event_request,
4603 (dump_func)dump_get_socket_info_request,
4604 (dump_func)dump_set_socket_deferred_request,
4605 (dump_func)dump_recv_socket_request,
4606 (dump_func)dump_poll_socket_request,
4607 (dump_func)dump_send_socket_request,
4608 (dump_func)dump_get_next_console_request_request,
4609 (dump_func)dump_read_directory_changes_request,
4610 (dump_func)dump_read_change_request,
4611 (dump_func)dump_create_mapping_request,
4612 (dump_func)dump_open_mapping_request,
4613 (dump_func)dump_get_mapping_info_request,
4614 (dump_func)dump_map_view_request,
4615 (dump_func)dump_unmap_view_request,
4616 (dump_func)dump_get_mapping_committed_range_request,
4617 (dump_func)dump_add_mapping_committed_range_request,
4618 (dump_func)dump_is_same_mapping_request,
4619 (dump_func)dump_get_mapping_filename_request,
4620 (dump_func)dump_list_processes_request,
4621 (dump_func)dump_create_debug_obj_request,
4622 (dump_func)dump_wait_debug_event_request,
4623 (dump_func)dump_queue_exception_event_request,
4624 (dump_func)dump_get_exception_status_request,
4625 (dump_func)dump_continue_debug_event_request,
4626 (dump_func)dump_debug_process_request,
4627 (dump_func)dump_set_debug_obj_info_request,
4628 (dump_func)dump_read_process_memory_request,
4629 (dump_func)dump_write_process_memory_request,
4630 (dump_func)dump_create_key_request,
4631 (dump_func)dump_open_key_request,
4632 (dump_func)dump_delete_key_request,
4633 (dump_func)dump_flush_key_request,
4634 (dump_func)dump_enum_key_request,
4635 (dump_func)dump_set_key_value_request,
4636 (dump_func)dump_get_key_value_request,
4637 (dump_func)dump_enum_key_value_request,
4638 (dump_func)dump_delete_key_value_request,
4639 (dump_func)dump_load_registry_request,
4640 (dump_func)dump_unload_registry_request,
4641 (dump_func)dump_save_registry_request,
4642 (dump_func)dump_set_registry_notification_request,
4643 (dump_func)dump_create_timer_request,
4644 (dump_func)dump_open_timer_request,
4645 (dump_func)dump_set_timer_request,
4646 (dump_func)dump_cancel_timer_request,
4647 (dump_func)dump_get_timer_info_request,
4648 (dump_func)dump_get_thread_context_request,
4649 (dump_func)dump_set_thread_context_request,
4650 (dump_func)dump_get_selector_entry_request,
4651 (dump_func)dump_add_atom_request,
4652 (dump_func)dump_delete_atom_request,
4653 (dump_func)dump_find_atom_request,
4654 (dump_func)dump_get_atom_information_request,
4655 (dump_func)dump_get_msg_queue_request,
4656 (dump_func)dump_set_queue_fd_request,
4657 (dump_func)dump_set_queue_mask_request,
4658 (dump_func)dump_get_queue_status_request,
4659 (dump_func)dump_get_process_idle_event_request,
4660 (dump_func)dump_send_message_request,
4661 (dump_func)dump_post_quit_message_request,
4662 (dump_func)dump_send_hardware_message_request,
4663 (dump_func)dump_get_message_request,
4664 (dump_func)dump_reply_message_request,
4665 (dump_func)dump_accept_hardware_message_request,
4666 (dump_func)dump_get_message_reply_request,
4667 (dump_func)dump_set_win_timer_request,
4668 (dump_func)dump_kill_win_timer_request,
4669 (dump_func)dump_is_window_hung_request,
4670 (dump_func)dump_get_serial_info_request,
4671 (dump_func)dump_set_serial_info_request,
4672 (dump_func)dump_register_async_request,
4673 (dump_func)dump_cancel_async_request,
4674 (dump_func)dump_get_async_result_request,
4675 (dump_func)dump_read_request,
4676 (dump_func)dump_write_request,
4677 (dump_func)dump_ioctl_request,
4678 (dump_func)dump_set_irp_result_request,
4679 (dump_func)dump_create_named_pipe_request,
4680 (dump_func)dump_set_named_pipe_info_request,
4681 (dump_func)dump_create_window_request,
4682 (dump_func)dump_destroy_window_request,
4683 (dump_func)dump_get_desktop_window_request,
4684 (dump_func)dump_set_window_owner_request,
4685 (dump_func)dump_get_window_info_request,
4686 (dump_func)dump_set_window_info_request,
4687 (dump_func)dump_set_parent_request,
4688 (dump_func)dump_get_window_parents_request,
4689 (dump_func)dump_get_window_children_request,
4690 (dump_func)dump_get_window_children_from_point_request,
4691 (dump_func)dump_get_window_tree_request,
4692 (dump_func)dump_set_window_pos_request,
4693 (dump_func)dump_get_window_rectangles_request,
4694 (dump_func)dump_get_window_text_request,
4695 (dump_func)dump_set_window_text_request,
4696 (dump_func)dump_get_windows_offset_request,
4697 (dump_func)dump_get_visible_region_request,
4698 (dump_func)dump_get_surface_region_request,
4699 (dump_func)dump_get_window_region_request,
4700 (dump_func)dump_set_window_region_request,
4701 (dump_func)dump_get_update_region_request,
4702 (dump_func)dump_update_window_zorder_request,
4703 (dump_func)dump_redraw_window_request,
4704 (dump_func)dump_set_window_property_request,
4705 (dump_func)dump_remove_window_property_request,
4706 (dump_func)dump_get_window_property_request,
4707 (dump_func)dump_get_window_properties_request,
4708 (dump_func)dump_create_winstation_request,
4709 (dump_func)dump_open_winstation_request,
4710 (dump_func)dump_close_winstation_request,
4711 (dump_func)dump_get_process_winstation_request,
4712 (dump_func)dump_set_process_winstation_request,
4713 (dump_func)dump_enum_winstation_request,
4714 (dump_func)dump_create_desktop_request,
4715 (dump_func)dump_open_desktop_request,
4716 (dump_func)dump_open_input_desktop_request,
4717 (dump_func)dump_close_desktop_request,
4718 (dump_func)dump_get_thread_desktop_request,
4719 (dump_func)dump_set_thread_desktop_request,
4720 (dump_func)dump_enum_desktop_request,
4721 (dump_func)dump_set_user_object_info_request,
4722 (dump_func)dump_register_hotkey_request,
4723 (dump_func)dump_unregister_hotkey_request,
4724 (dump_func)dump_attach_thread_input_request,
4725 (dump_func)dump_get_thread_input_request,
4726 (dump_func)dump_get_last_input_time_request,
4727 (dump_func)dump_get_key_state_request,
4728 (dump_func)dump_set_key_state_request,
4729 (dump_func)dump_set_foreground_window_request,
4730 (dump_func)dump_set_focus_window_request,
4731 (dump_func)dump_set_active_window_request,
4732 (dump_func)dump_set_capture_window_request,
4733 (dump_func)dump_set_caret_window_request,
4734 (dump_func)dump_set_caret_info_request,
4735 (dump_func)dump_set_hook_request,
4736 (dump_func)dump_remove_hook_request,
4737 (dump_func)dump_start_hook_chain_request,
4738 (dump_func)dump_finish_hook_chain_request,
4739 (dump_func)dump_get_hook_info_request,
4740 (dump_func)dump_create_class_request,
4741 (dump_func)dump_destroy_class_request,
4742 (dump_func)dump_set_class_info_request,
4743 (dump_func)dump_open_clipboard_request,
4744 (dump_func)dump_close_clipboard_request,
4745 (dump_func)dump_empty_clipboard_request,
4746 (dump_func)dump_set_clipboard_data_request,
4747 (dump_func)dump_get_clipboard_data_request,
4748 (dump_func)dump_get_clipboard_formats_request,
4749 (dump_func)dump_enum_clipboard_formats_request,
4750 (dump_func)dump_release_clipboard_request,
4751 (dump_func)dump_get_clipboard_info_request,
4752 (dump_func)dump_set_clipboard_viewer_request,
4753 (dump_func)dump_add_clipboard_listener_request,
4754 (dump_func)dump_remove_clipboard_listener_request,
4755 (dump_func)dump_open_token_request,
4756 (dump_func)dump_set_global_windows_request,
4757 (dump_func)dump_adjust_token_privileges_request,
4758 (dump_func)dump_get_token_privileges_request,
4759 (dump_func)dump_check_token_privileges_request,
4760 (dump_func)dump_duplicate_token_request,
4761 (dump_func)dump_filter_token_request,
4762 (dump_func)dump_access_check_request,
4763 (dump_func)dump_get_token_sid_request,
4764 (dump_func)dump_get_token_groups_request,
4765 (dump_func)dump_get_token_default_dacl_request,
4766 (dump_func)dump_set_token_default_dacl_request,
4767 (dump_func)dump_set_security_object_request,
4768 (dump_func)dump_get_security_object_request,
4769 (dump_func)dump_get_system_handles_request,
4770 (dump_func)dump_create_mailslot_request,
4771 (dump_func)dump_set_mailslot_info_request,
4772 (dump_func)dump_create_directory_request,
4773 (dump_func)dump_open_directory_request,
4774 (dump_func)dump_get_directory_entry_request,
4775 (dump_func)dump_create_symlink_request,
4776 (dump_func)dump_open_symlink_request,
4777 (dump_func)dump_query_symlink_request,
4778 (dump_func)dump_get_object_info_request,
4779 (dump_func)dump_get_object_type_request,
4780 (dump_func)dump_get_object_types_request,
4781 (dump_func)dump_allocate_locally_unique_id_request,
4782 (dump_func)dump_create_device_manager_request,
4783 (dump_func)dump_create_device_request,
4784 (dump_func)dump_delete_device_request,
4785 (dump_func)dump_get_next_device_request_request,
4786 (dump_func)dump_get_kernel_object_ptr_request,
4787 (dump_func)dump_set_kernel_object_ptr_request,
4788 (dump_func)dump_grab_kernel_object_request,
4789 (dump_func)dump_release_kernel_object_request,
4790 (dump_func)dump_get_kernel_object_handle_request,
4791 (dump_func)dump_make_process_system_request,
4792 (dump_func)dump_get_token_info_request,
4793 (dump_func)dump_create_linked_token_request,
4794 (dump_func)dump_create_completion_request,
4795 (dump_func)dump_open_completion_request,
4796 (dump_func)dump_add_completion_request,
4797 (dump_func)dump_remove_completion_request,
4798 (dump_func)dump_query_completion_request,
4799 (dump_func)dump_set_completion_info_request,
4800 (dump_func)dump_add_fd_completion_request,
4801 (dump_func)dump_set_fd_completion_mode_request,
4802 (dump_func)dump_set_fd_disp_info_request,
4803 (dump_func)dump_set_fd_name_info_request,
4804 (dump_func)dump_get_window_layered_info_request,
4805 (dump_func)dump_set_window_layered_info_request,
4806 (dump_func)dump_alloc_user_handle_request,
4807 (dump_func)dump_free_user_handle_request,
4808 (dump_func)dump_set_cursor_request,
4809 (dump_func)dump_get_cursor_history_request,
4810 (dump_func)dump_get_rawinput_buffer_request,
4811 (dump_func)dump_update_rawinput_devices_request,
4812 (dump_func)dump_get_rawinput_devices_request,
4813 (dump_func)dump_create_job_request,
4814 (dump_func)dump_open_job_request,
4815 (dump_func)dump_assign_job_request,
4816 (dump_func)dump_process_in_job_request,
4817 (dump_func)dump_set_job_limits_request,
4818 (dump_func)dump_set_job_completion_port_request,
4819 (dump_func)dump_get_job_info_request,
4820 (dump_func)dump_terminate_job_request,
4821 (dump_func)dump_suspend_process_request,
4822 (dump_func)dump_resume_process_request,
4823 (dump_func)dump_get_next_thread_request,
4826 static const dump_func reply_dumpers[REQ_NB_REQUESTS] = {
4827 (dump_func)dump_new_process_reply,
4828 (dump_func)dump_get_new_process_info_reply,
4829 (dump_func)dump_new_thread_reply,
4830 (dump_func)dump_get_startup_info_reply,
4831 (dump_func)dump_init_process_done_reply,
4832 (dump_func)dump_init_first_thread_reply,
4833 (dump_func)dump_init_thread_reply,
4834 (dump_func)dump_terminate_process_reply,
4835 (dump_func)dump_terminate_thread_reply,
4836 (dump_func)dump_get_process_info_reply,
4837 (dump_func)dump_get_process_debug_info_reply,
4838 (dump_func)dump_get_process_image_name_reply,
4839 (dump_func)dump_get_process_vm_counters_reply,
4840 NULL,
4841 (dump_func)dump_get_thread_info_reply,
4842 (dump_func)dump_get_thread_times_reply,
4843 NULL,
4844 (dump_func)dump_suspend_thread_reply,
4845 (dump_func)dump_resume_thread_reply,
4846 (dump_func)dump_queue_apc_reply,
4847 (dump_func)dump_get_apc_result_reply,
4848 NULL,
4849 (dump_func)dump_set_handle_info_reply,
4850 (dump_func)dump_dup_handle_reply,
4851 NULL,
4852 (dump_func)dump_open_process_reply,
4853 (dump_func)dump_open_thread_reply,
4854 (dump_func)dump_select_reply,
4855 (dump_func)dump_create_event_reply,
4856 (dump_func)dump_event_op_reply,
4857 (dump_func)dump_query_event_reply,
4858 (dump_func)dump_open_event_reply,
4859 (dump_func)dump_create_keyed_event_reply,
4860 (dump_func)dump_open_keyed_event_reply,
4861 (dump_func)dump_create_mutex_reply,
4862 (dump_func)dump_release_mutex_reply,
4863 (dump_func)dump_open_mutex_reply,
4864 (dump_func)dump_query_mutex_reply,
4865 (dump_func)dump_create_semaphore_reply,
4866 (dump_func)dump_release_semaphore_reply,
4867 (dump_func)dump_query_semaphore_reply,
4868 (dump_func)dump_open_semaphore_reply,
4869 (dump_func)dump_create_file_reply,
4870 (dump_func)dump_open_file_object_reply,
4871 (dump_func)dump_alloc_file_handle_reply,
4872 (dump_func)dump_get_handle_unix_name_reply,
4873 (dump_func)dump_get_handle_fd_reply,
4874 (dump_func)dump_get_directory_cache_entry_reply,
4875 (dump_func)dump_flush_reply,
4876 (dump_func)dump_get_file_info_reply,
4877 (dump_func)dump_get_volume_info_reply,
4878 (dump_func)dump_lock_file_reply,
4879 NULL,
4880 NULL,
4881 (dump_func)dump_get_socket_event_reply,
4882 (dump_func)dump_get_socket_info_reply,
4883 NULL,
4884 (dump_func)dump_recv_socket_reply,
4885 (dump_func)dump_poll_socket_reply,
4886 (dump_func)dump_send_socket_reply,
4887 (dump_func)dump_get_next_console_request_reply,
4888 NULL,
4889 (dump_func)dump_read_change_reply,
4890 (dump_func)dump_create_mapping_reply,
4891 (dump_func)dump_open_mapping_reply,
4892 (dump_func)dump_get_mapping_info_reply,
4893 NULL,
4894 NULL,
4895 (dump_func)dump_get_mapping_committed_range_reply,
4896 NULL,
4897 NULL,
4898 (dump_func)dump_get_mapping_filename_reply,
4899 (dump_func)dump_list_processes_reply,
4900 (dump_func)dump_create_debug_obj_reply,
4901 (dump_func)dump_wait_debug_event_reply,
4902 (dump_func)dump_queue_exception_event_reply,
4903 NULL,
4904 NULL,
4905 NULL,
4906 NULL,
4907 (dump_func)dump_read_process_memory_reply,
4908 NULL,
4909 (dump_func)dump_create_key_reply,
4910 (dump_func)dump_open_key_reply,
4911 NULL,
4912 NULL,
4913 (dump_func)dump_enum_key_reply,
4914 NULL,
4915 (dump_func)dump_get_key_value_reply,
4916 (dump_func)dump_enum_key_value_reply,
4917 NULL,
4918 NULL,
4919 NULL,
4920 NULL,
4921 NULL,
4922 (dump_func)dump_create_timer_reply,
4923 (dump_func)dump_open_timer_reply,
4924 (dump_func)dump_set_timer_reply,
4925 (dump_func)dump_cancel_timer_reply,
4926 (dump_func)dump_get_timer_info_reply,
4927 (dump_func)dump_get_thread_context_reply,
4928 (dump_func)dump_set_thread_context_reply,
4929 (dump_func)dump_get_selector_entry_reply,
4930 (dump_func)dump_add_atom_reply,
4931 NULL,
4932 (dump_func)dump_find_atom_reply,
4933 (dump_func)dump_get_atom_information_reply,
4934 (dump_func)dump_get_msg_queue_reply,
4935 NULL,
4936 (dump_func)dump_set_queue_mask_reply,
4937 (dump_func)dump_get_queue_status_reply,
4938 (dump_func)dump_get_process_idle_event_reply,
4939 NULL,
4940 NULL,
4941 (dump_func)dump_send_hardware_message_reply,
4942 (dump_func)dump_get_message_reply,
4943 NULL,
4944 NULL,
4945 (dump_func)dump_get_message_reply_reply,
4946 (dump_func)dump_set_win_timer_reply,
4947 NULL,
4948 (dump_func)dump_is_window_hung_reply,
4949 (dump_func)dump_get_serial_info_reply,
4950 NULL,
4951 NULL,
4952 NULL,
4953 (dump_func)dump_get_async_result_reply,
4954 (dump_func)dump_read_reply,
4955 (dump_func)dump_write_reply,
4956 (dump_func)dump_ioctl_reply,
4957 NULL,
4958 (dump_func)dump_create_named_pipe_reply,
4959 NULL,
4960 (dump_func)dump_create_window_reply,
4961 NULL,
4962 (dump_func)dump_get_desktop_window_reply,
4963 (dump_func)dump_set_window_owner_reply,
4964 (dump_func)dump_get_window_info_reply,
4965 (dump_func)dump_set_window_info_reply,
4966 (dump_func)dump_set_parent_reply,
4967 (dump_func)dump_get_window_parents_reply,
4968 (dump_func)dump_get_window_children_reply,
4969 (dump_func)dump_get_window_children_from_point_reply,
4970 (dump_func)dump_get_window_tree_reply,
4971 (dump_func)dump_set_window_pos_reply,
4972 (dump_func)dump_get_window_rectangles_reply,
4973 (dump_func)dump_get_window_text_reply,
4974 NULL,
4975 (dump_func)dump_get_windows_offset_reply,
4976 (dump_func)dump_get_visible_region_reply,
4977 (dump_func)dump_get_surface_region_reply,
4978 (dump_func)dump_get_window_region_reply,
4979 NULL,
4980 (dump_func)dump_get_update_region_reply,
4981 NULL,
4982 NULL,
4983 NULL,
4984 (dump_func)dump_remove_window_property_reply,
4985 (dump_func)dump_get_window_property_reply,
4986 (dump_func)dump_get_window_properties_reply,
4987 (dump_func)dump_create_winstation_reply,
4988 (dump_func)dump_open_winstation_reply,
4989 NULL,
4990 (dump_func)dump_get_process_winstation_reply,
4991 NULL,
4992 (dump_func)dump_enum_winstation_reply,
4993 (dump_func)dump_create_desktop_reply,
4994 (dump_func)dump_open_desktop_reply,
4995 (dump_func)dump_open_input_desktop_reply,
4996 NULL,
4997 (dump_func)dump_get_thread_desktop_reply,
4998 NULL,
4999 (dump_func)dump_enum_desktop_reply,
5000 (dump_func)dump_set_user_object_info_reply,
5001 (dump_func)dump_register_hotkey_reply,
5002 (dump_func)dump_unregister_hotkey_reply,
5003 NULL,
5004 (dump_func)dump_get_thread_input_reply,
5005 (dump_func)dump_get_last_input_time_reply,
5006 (dump_func)dump_get_key_state_reply,
5007 NULL,
5008 (dump_func)dump_set_foreground_window_reply,
5009 (dump_func)dump_set_focus_window_reply,
5010 (dump_func)dump_set_active_window_reply,
5011 (dump_func)dump_set_capture_window_reply,
5012 (dump_func)dump_set_caret_window_reply,
5013 (dump_func)dump_set_caret_info_reply,
5014 (dump_func)dump_set_hook_reply,
5015 (dump_func)dump_remove_hook_reply,
5016 (dump_func)dump_start_hook_chain_reply,
5017 NULL,
5018 (dump_func)dump_get_hook_info_reply,
5019 (dump_func)dump_create_class_reply,
5020 (dump_func)dump_destroy_class_reply,
5021 (dump_func)dump_set_class_info_reply,
5022 (dump_func)dump_open_clipboard_reply,
5023 (dump_func)dump_close_clipboard_reply,
5024 NULL,
5025 (dump_func)dump_set_clipboard_data_reply,
5026 (dump_func)dump_get_clipboard_data_reply,
5027 (dump_func)dump_get_clipboard_formats_reply,
5028 (dump_func)dump_enum_clipboard_formats_reply,
5029 (dump_func)dump_release_clipboard_reply,
5030 (dump_func)dump_get_clipboard_info_reply,
5031 (dump_func)dump_set_clipboard_viewer_reply,
5032 NULL,
5033 NULL,
5034 (dump_func)dump_open_token_reply,
5035 (dump_func)dump_set_global_windows_reply,
5036 (dump_func)dump_adjust_token_privileges_reply,
5037 (dump_func)dump_get_token_privileges_reply,
5038 (dump_func)dump_check_token_privileges_reply,
5039 (dump_func)dump_duplicate_token_reply,
5040 (dump_func)dump_filter_token_reply,
5041 (dump_func)dump_access_check_reply,
5042 (dump_func)dump_get_token_sid_reply,
5043 (dump_func)dump_get_token_groups_reply,
5044 (dump_func)dump_get_token_default_dacl_reply,
5045 NULL,
5046 NULL,
5047 (dump_func)dump_get_security_object_reply,
5048 (dump_func)dump_get_system_handles_reply,
5049 (dump_func)dump_create_mailslot_reply,
5050 (dump_func)dump_set_mailslot_info_reply,
5051 (dump_func)dump_create_directory_reply,
5052 (dump_func)dump_open_directory_reply,
5053 (dump_func)dump_get_directory_entry_reply,
5054 (dump_func)dump_create_symlink_reply,
5055 (dump_func)dump_open_symlink_reply,
5056 (dump_func)dump_query_symlink_reply,
5057 (dump_func)dump_get_object_info_reply,
5058 (dump_func)dump_get_object_type_reply,
5059 (dump_func)dump_get_object_types_reply,
5060 (dump_func)dump_allocate_locally_unique_id_reply,
5061 (dump_func)dump_create_device_manager_reply,
5062 NULL,
5063 NULL,
5064 (dump_func)dump_get_next_device_request_reply,
5065 (dump_func)dump_get_kernel_object_ptr_reply,
5066 NULL,
5067 NULL,
5068 NULL,
5069 (dump_func)dump_get_kernel_object_handle_reply,
5070 (dump_func)dump_make_process_system_reply,
5071 (dump_func)dump_get_token_info_reply,
5072 (dump_func)dump_create_linked_token_reply,
5073 (dump_func)dump_create_completion_reply,
5074 (dump_func)dump_open_completion_reply,
5075 NULL,
5076 (dump_func)dump_remove_completion_reply,
5077 (dump_func)dump_query_completion_reply,
5078 NULL,
5079 NULL,
5080 NULL,
5081 NULL,
5082 NULL,
5083 (dump_func)dump_get_window_layered_info_reply,
5084 NULL,
5085 (dump_func)dump_alloc_user_handle_reply,
5086 NULL,
5087 (dump_func)dump_set_cursor_reply,
5088 (dump_func)dump_get_cursor_history_reply,
5089 (dump_func)dump_get_rawinput_buffer_reply,
5090 NULL,
5091 (dump_func)dump_get_rawinput_devices_reply,
5092 (dump_func)dump_create_job_reply,
5093 (dump_func)dump_open_job_reply,
5094 NULL,
5095 NULL,
5096 NULL,
5097 NULL,
5098 (dump_func)dump_get_job_info_reply,
5099 NULL,
5100 NULL,
5101 NULL,
5102 (dump_func)dump_get_next_thread_reply,
5105 static const char * const req_names[REQ_NB_REQUESTS] = {
5106 "new_process",
5107 "get_new_process_info",
5108 "new_thread",
5109 "get_startup_info",
5110 "init_process_done",
5111 "init_first_thread",
5112 "init_thread",
5113 "terminate_process",
5114 "terminate_thread",
5115 "get_process_info",
5116 "get_process_debug_info",
5117 "get_process_image_name",
5118 "get_process_vm_counters",
5119 "set_process_info",
5120 "get_thread_info",
5121 "get_thread_times",
5122 "set_thread_info",
5123 "suspend_thread",
5124 "resume_thread",
5125 "queue_apc",
5126 "get_apc_result",
5127 "close_handle",
5128 "set_handle_info",
5129 "dup_handle",
5130 "make_temporary",
5131 "open_process",
5132 "open_thread",
5133 "select",
5134 "create_event",
5135 "event_op",
5136 "query_event",
5137 "open_event",
5138 "create_keyed_event",
5139 "open_keyed_event",
5140 "create_mutex",
5141 "release_mutex",
5142 "open_mutex",
5143 "query_mutex",
5144 "create_semaphore",
5145 "release_semaphore",
5146 "query_semaphore",
5147 "open_semaphore",
5148 "create_file",
5149 "open_file_object",
5150 "alloc_file_handle",
5151 "get_handle_unix_name",
5152 "get_handle_fd",
5153 "get_directory_cache_entry",
5154 "flush",
5155 "get_file_info",
5156 "get_volume_info",
5157 "lock_file",
5158 "unlock_file",
5159 "set_socket_event",
5160 "get_socket_event",
5161 "get_socket_info",
5162 "set_socket_deferred",
5163 "recv_socket",
5164 "poll_socket",
5165 "send_socket",
5166 "get_next_console_request",
5167 "read_directory_changes",
5168 "read_change",
5169 "create_mapping",
5170 "open_mapping",
5171 "get_mapping_info",
5172 "map_view",
5173 "unmap_view",
5174 "get_mapping_committed_range",
5175 "add_mapping_committed_range",
5176 "is_same_mapping",
5177 "get_mapping_filename",
5178 "list_processes",
5179 "create_debug_obj",
5180 "wait_debug_event",
5181 "queue_exception_event",
5182 "get_exception_status",
5183 "continue_debug_event",
5184 "debug_process",
5185 "set_debug_obj_info",
5186 "read_process_memory",
5187 "write_process_memory",
5188 "create_key",
5189 "open_key",
5190 "delete_key",
5191 "flush_key",
5192 "enum_key",
5193 "set_key_value",
5194 "get_key_value",
5195 "enum_key_value",
5196 "delete_key_value",
5197 "load_registry",
5198 "unload_registry",
5199 "save_registry",
5200 "set_registry_notification",
5201 "create_timer",
5202 "open_timer",
5203 "set_timer",
5204 "cancel_timer",
5205 "get_timer_info",
5206 "get_thread_context",
5207 "set_thread_context",
5208 "get_selector_entry",
5209 "add_atom",
5210 "delete_atom",
5211 "find_atom",
5212 "get_atom_information",
5213 "get_msg_queue",
5214 "set_queue_fd",
5215 "set_queue_mask",
5216 "get_queue_status",
5217 "get_process_idle_event",
5218 "send_message",
5219 "post_quit_message",
5220 "send_hardware_message",
5221 "get_message",
5222 "reply_message",
5223 "accept_hardware_message",
5224 "get_message_reply",
5225 "set_win_timer",
5226 "kill_win_timer",
5227 "is_window_hung",
5228 "get_serial_info",
5229 "set_serial_info",
5230 "register_async",
5231 "cancel_async",
5232 "get_async_result",
5233 "read",
5234 "write",
5235 "ioctl",
5236 "set_irp_result",
5237 "create_named_pipe",
5238 "set_named_pipe_info",
5239 "create_window",
5240 "destroy_window",
5241 "get_desktop_window",
5242 "set_window_owner",
5243 "get_window_info",
5244 "set_window_info",
5245 "set_parent",
5246 "get_window_parents",
5247 "get_window_children",
5248 "get_window_children_from_point",
5249 "get_window_tree",
5250 "set_window_pos",
5251 "get_window_rectangles",
5252 "get_window_text",
5253 "set_window_text",
5254 "get_windows_offset",
5255 "get_visible_region",
5256 "get_surface_region",
5257 "get_window_region",
5258 "set_window_region",
5259 "get_update_region",
5260 "update_window_zorder",
5261 "redraw_window",
5262 "set_window_property",
5263 "remove_window_property",
5264 "get_window_property",
5265 "get_window_properties",
5266 "create_winstation",
5267 "open_winstation",
5268 "close_winstation",
5269 "get_process_winstation",
5270 "set_process_winstation",
5271 "enum_winstation",
5272 "create_desktop",
5273 "open_desktop",
5274 "open_input_desktop",
5275 "close_desktop",
5276 "get_thread_desktop",
5277 "set_thread_desktop",
5278 "enum_desktop",
5279 "set_user_object_info",
5280 "register_hotkey",
5281 "unregister_hotkey",
5282 "attach_thread_input",
5283 "get_thread_input",
5284 "get_last_input_time",
5285 "get_key_state",
5286 "set_key_state",
5287 "set_foreground_window",
5288 "set_focus_window",
5289 "set_active_window",
5290 "set_capture_window",
5291 "set_caret_window",
5292 "set_caret_info",
5293 "set_hook",
5294 "remove_hook",
5295 "start_hook_chain",
5296 "finish_hook_chain",
5297 "get_hook_info",
5298 "create_class",
5299 "destroy_class",
5300 "set_class_info",
5301 "open_clipboard",
5302 "close_clipboard",
5303 "empty_clipboard",
5304 "set_clipboard_data",
5305 "get_clipboard_data",
5306 "get_clipboard_formats",
5307 "enum_clipboard_formats",
5308 "release_clipboard",
5309 "get_clipboard_info",
5310 "set_clipboard_viewer",
5311 "add_clipboard_listener",
5312 "remove_clipboard_listener",
5313 "open_token",
5314 "set_global_windows",
5315 "adjust_token_privileges",
5316 "get_token_privileges",
5317 "check_token_privileges",
5318 "duplicate_token",
5319 "filter_token",
5320 "access_check",
5321 "get_token_sid",
5322 "get_token_groups",
5323 "get_token_default_dacl",
5324 "set_token_default_dacl",
5325 "set_security_object",
5326 "get_security_object",
5327 "get_system_handles",
5328 "create_mailslot",
5329 "set_mailslot_info",
5330 "create_directory",
5331 "open_directory",
5332 "get_directory_entry",
5333 "create_symlink",
5334 "open_symlink",
5335 "query_symlink",
5336 "get_object_info",
5337 "get_object_type",
5338 "get_object_types",
5339 "allocate_locally_unique_id",
5340 "create_device_manager",
5341 "create_device",
5342 "delete_device",
5343 "get_next_device_request",
5344 "get_kernel_object_ptr",
5345 "set_kernel_object_ptr",
5346 "grab_kernel_object",
5347 "release_kernel_object",
5348 "get_kernel_object_handle",
5349 "make_process_system",
5350 "get_token_info",
5351 "create_linked_token",
5352 "create_completion",
5353 "open_completion",
5354 "add_completion",
5355 "remove_completion",
5356 "query_completion",
5357 "set_completion_info",
5358 "add_fd_completion",
5359 "set_fd_completion_mode",
5360 "set_fd_disp_info",
5361 "set_fd_name_info",
5362 "get_window_layered_info",
5363 "set_window_layered_info",
5364 "alloc_user_handle",
5365 "free_user_handle",
5366 "set_cursor",
5367 "get_cursor_history",
5368 "get_rawinput_buffer",
5369 "update_rawinput_devices",
5370 "get_rawinput_devices",
5371 "create_job",
5372 "open_job",
5373 "assign_job",
5374 "process_in_job",
5375 "set_job_limits",
5376 "set_job_completion_port",
5377 "get_job_info",
5378 "terminate_job",
5379 "suspend_process",
5380 "resume_process",
5381 "get_next_thread",
5384 static const struct
5386 const char *name;
5387 unsigned int value;
5388 } status_names[] =
5390 { "ABANDONED_WAIT_0", STATUS_ABANDONED_WAIT_0 },
5391 { "ACCESS_DENIED", STATUS_ACCESS_DENIED },
5392 { "ACCESS_VIOLATION", STATUS_ACCESS_VIOLATION },
5393 { "ADDRESS_ALREADY_ASSOCIATED", STATUS_ADDRESS_ALREADY_ASSOCIATED },
5394 { "ALERTED", STATUS_ALERTED },
5395 { "BAD_DEVICE_TYPE", STATUS_BAD_DEVICE_TYPE },
5396 { "BAD_IMPERSONATION_LEVEL", STATUS_BAD_IMPERSONATION_LEVEL },
5397 { "BUFFER_OVERFLOW", STATUS_BUFFER_OVERFLOW },
5398 { "BUFFER_TOO_SMALL", STATUS_BUFFER_TOO_SMALL },
5399 { "CANCELLED", STATUS_CANCELLED },
5400 { "CANNOT_DELETE", STATUS_CANNOT_DELETE },
5401 { "CANT_OPEN_ANONYMOUS", STATUS_CANT_OPEN_ANONYMOUS },
5402 { "CHILD_MUST_BE_VOLATILE", STATUS_CHILD_MUST_BE_VOLATILE },
5403 { "CONNECTION_ABORTED", STATUS_CONNECTION_ABORTED },
5404 { "CONNECTION_ACTIVE", STATUS_CONNECTION_ACTIVE },
5405 { "CONNECTION_REFUSED", STATUS_CONNECTION_REFUSED },
5406 { "CONNECTION_RESET", STATUS_CONNECTION_RESET },
5407 { "DEBUGGER_INACTIVE", STATUS_DEBUGGER_INACTIVE },
5408 { "DEVICE_BUSY", STATUS_DEVICE_BUSY },
5409 { "DEVICE_NOT_READY", STATUS_DEVICE_NOT_READY },
5410 { "DIRECTORY_NOT_EMPTY", STATUS_DIRECTORY_NOT_EMPTY },
5411 { "DISK_FULL", STATUS_DISK_FULL },
5412 { "DLL_NOT_FOUND", STATUS_DLL_NOT_FOUND },
5413 { "ERROR_CLASS_ALREADY_EXISTS", 0xc0010000 | ERROR_CLASS_ALREADY_EXISTS },
5414 { "ERROR_CLASS_DOES_NOT_EXIST", 0xc0010000 | ERROR_CLASS_DOES_NOT_EXIST },
5415 { "ERROR_CLASS_HAS_WINDOWS", 0xc0010000 | ERROR_CLASS_HAS_WINDOWS },
5416 { "ERROR_CLIPBOARD_NOT_OPEN", 0xc0010000 | ERROR_CLIPBOARD_NOT_OPEN },
5417 { "ERROR_HOTKEY_ALREADY_REGISTERED", 0xc0010000 | ERROR_HOTKEY_ALREADY_REGISTERED },
5418 { "ERROR_HOTKEY_NOT_REGISTERED", 0xc0010000 | ERROR_HOTKEY_NOT_REGISTERED },
5419 { "ERROR_INVALID_CURSOR_HANDLE", 0xc0010000 | ERROR_INVALID_CURSOR_HANDLE },
5420 { "ERROR_INVALID_INDEX", 0xc0010000 | ERROR_INVALID_INDEX },
5421 { "ERROR_INVALID_WINDOW_HANDLE", 0xc0010000 | ERROR_INVALID_WINDOW_HANDLE },
5422 { "ERROR_NO_MORE_USER_HANDLES", 0xc0010000 | ERROR_NO_MORE_USER_HANDLES },
5423 { "ERROR_WINDOW_OF_OTHER_THREAD", 0xc0010000 | ERROR_WINDOW_OF_OTHER_THREAD },
5424 { "FILE_DELETED", STATUS_FILE_DELETED },
5425 { "FILE_INVALID", STATUS_FILE_INVALID },
5426 { "FILE_IS_A_DIRECTORY", STATUS_FILE_IS_A_DIRECTORY },
5427 { "FILE_LOCK_CONFLICT", STATUS_FILE_LOCK_CONFLICT },
5428 { "GENERIC_NOT_MAPPED", STATUS_GENERIC_NOT_MAPPED },
5429 { "HANDLES_CLOSED", STATUS_HANDLES_CLOSED },
5430 { "HANDLE_NOT_CLOSABLE", STATUS_HANDLE_NOT_CLOSABLE },
5431 { "HOST_UNREACHABLE", STATUS_HOST_UNREACHABLE },
5432 { "ILLEGAL_FUNCTION", STATUS_ILLEGAL_FUNCTION },
5433 { "IMAGE_NOT_AT_BASE", STATUS_IMAGE_NOT_AT_BASE },
5434 { "INFO_LENGTH_MISMATCH", STATUS_INFO_LENGTH_MISMATCH },
5435 { "INSTANCE_NOT_AVAILABLE", STATUS_INSTANCE_NOT_AVAILABLE },
5436 { "INSUFFICIENT_RESOURCES", STATUS_INSUFFICIENT_RESOURCES },
5437 { "INVALID_ADDRESS", STATUS_INVALID_ADDRESS },
5438 { "INVALID_CID", STATUS_INVALID_CID },
5439 { "INVALID_CONNECTION", STATUS_INVALID_CONNECTION },
5440 { "INVALID_DEVICE_REQUEST", STATUS_INVALID_DEVICE_REQUEST },
5441 { "INVALID_FILE_FOR_SECTION", STATUS_INVALID_FILE_FOR_SECTION },
5442 { "INVALID_HANDLE", STATUS_INVALID_HANDLE },
5443 { "INVALID_IMAGE_FORMAT", STATUS_INVALID_IMAGE_FORMAT },
5444 { "INVALID_IMAGE_NE_FORMAT", STATUS_INVALID_IMAGE_NE_FORMAT },
5445 { "INVALID_IMAGE_NOT_MZ", STATUS_INVALID_IMAGE_NOT_MZ },
5446 { "INVALID_IMAGE_PROTECT", STATUS_INVALID_IMAGE_PROTECT },
5447 { "INVALID_IMAGE_WIN_16", STATUS_INVALID_IMAGE_WIN_16 },
5448 { "INVALID_IMAGE_WIN_64", STATUS_INVALID_IMAGE_WIN_64 },
5449 { "INVALID_LOCK_SEQUENCE", STATUS_INVALID_LOCK_SEQUENCE },
5450 { "INVALID_OWNER", STATUS_INVALID_OWNER },
5451 { "INVALID_PARAMETER", STATUS_INVALID_PARAMETER },
5452 { "INVALID_PIPE_STATE", STATUS_INVALID_PIPE_STATE },
5453 { "INVALID_READ_MODE", STATUS_INVALID_READ_MODE },
5454 { "INVALID_SECURITY_DESCR", STATUS_INVALID_SECURITY_DESCR },
5455 { "IO_TIMEOUT", STATUS_IO_TIMEOUT },
5456 { "KERNEL_APC", STATUS_KERNEL_APC },
5457 { "KEY_DELETED", STATUS_KEY_DELETED },
5458 { "MAPPED_FILE_SIZE_ZERO", STATUS_MAPPED_FILE_SIZE_ZERO },
5459 { "MORE_PROCESSING_REQUIRED", STATUS_MORE_PROCESSING_REQUIRED },
5460 { "MUTANT_NOT_OWNED", STATUS_MUTANT_NOT_OWNED },
5461 { "NAME_TOO_LONG", STATUS_NAME_TOO_LONG },
5462 { "NETWORK_BUSY", STATUS_NETWORK_BUSY },
5463 { "NETWORK_UNREACHABLE", STATUS_NETWORK_UNREACHABLE },
5464 { "NOT_ALL_ASSIGNED", STATUS_NOT_ALL_ASSIGNED },
5465 { "NOT_A_DIRECTORY", STATUS_NOT_A_DIRECTORY },
5466 { "NOT_FOUND", STATUS_NOT_FOUND },
5467 { "NOT_IMPLEMENTED", STATUS_NOT_IMPLEMENTED },
5468 { "NOT_MAPPED_VIEW", STATUS_NOT_MAPPED_VIEW },
5469 { "NOT_REGISTRY_FILE", STATUS_NOT_REGISTRY_FILE },
5470 { "NOT_SAME_DEVICE", STATUS_NOT_SAME_DEVICE },
5471 { "NOT_SUPPORTED", STATUS_NOT_SUPPORTED },
5472 { "NO_DATA_DETECTED", STATUS_NO_DATA_DETECTED },
5473 { "NO_IMPERSONATION_TOKEN", STATUS_NO_IMPERSONATION_TOKEN },
5474 { "NO_MEMORY", STATUS_NO_MEMORY },
5475 { "NO_MORE_ENTRIES", STATUS_NO_MORE_ENTRIES },
5476 { "NO_SUCH_DEVICE", STATUS_NO_SUCH_DEVICE },
5477 { "NO_SUCH_FILE", STATUS_NO_SUCH_FILE },
5478 { "NO_TOKEN", STATUS_NO_TOKEN },
5479 { "OBJECT_NAME_COLLISION", STATUS_OBJECT_NAME_COLLISION },
5480 { "OBJECT_NAME_EXISTS", STATUS_OBJECT_NAME_EXISTS },
5481 { "OBJECT_NAME_INVALID", STATUS_OBJECT_NAME_INVALID },
5482 { "OBJECT_NAME_NOT_FOUND", STATUS_OBJECT_NAME_NOT_FOUND },
5483 { "OBJECT_PATH_INVALID", STATUS_OBJECT_PATH_INVALID },
5484 { "OBJECT_PATH_NOT_FOUND", STATUS_OBJECT_PATH_NOT_FOUND },
5485 { "OBJECT_PATH_SYNTAX_BAD", STATUS_OBJECT_PATH_SYNTAX_BAD },
5486 { "OBJECT_TYPE_MISMATCH", STATUS_OBJECT_TYPE_MISMATCH },
5487 { "PENDING", STATUS_PENDING },
5488 { "PIPE_BROKEN", STATUS_PIPE_BROKEN },
5489 { "PIPE_BUSY", STATUS_PIPE_BUSY },
5490 { "PIPE_CLOSING", STATUS_PIPE_CLOSING },
5491 { "PIPE_CONNECTED", STATUS_PIPE_CONNECTED },
5492 { "PIPE_DISCONNECTED", STATUS_PIPE_DISCONNECTED },
5493 { "PIPE_EMPTY", STATUS_PIPE_EMPTY },
5494 { "PIPE_LISTENING", STATUS_PIPE_LISTENING },
5495 { "PIPE_NOT_AVAILABLE", STATUS_PIPE_NOT_AVAILABLE },
5496 { "PORT_NOT_SET", STATUS_PORT_NOT_SET },
5497 { "PRIVILEGE_NOT_HELD", STATUS_PRIVILEGE_NOT_HELD },
5498 { "PROCESS_IN_JOB", STATUS_PROCESS_IN_JOB },
5499 { "PROCESS_IS_TERMINATING", STATUS_PROCESS_IS_TERMINATING },
5500 { "PROCESS_NOT_IN_JOB", STATUS_PROCESS_NOT_IN_JOB },
5501 { "REPARSE_POINT_NOT_RESOLVED", STATUS_REPARSE_POINT_NOT_RESOLVED },
5502 { "SECTION_TOO_BIG", STATUS_SECTION_TOO_BIG },
5503 { "SEMAPHORE_LIMIT_EXCEEDED", STATUS_SEMAPHORE_LIMIT_EXCEEDED },
5504 { "SHARING_VIOLATION", STATUS_SHARING_VIOLATION },
5505 { "SHUTDOWN_IN_PROGRESS", STATUS_SHUTDOWN_IN_PROGRESS },
5506 { "SUSPEND_COUNT_EXCEEDED", STATUS_SUSPEND_COUNT_EXCEEDED },
5507 { "THREAD_IS_TERMINATING", STATUS_THREAD_IS_TERMINATING },
5508 { "TIMEOUT", STATUS_TIMEOUT },
5509 { "TOO_MANY_OPENED_FILES", STATUS_TOO_MANY_OPENED_FILES },
5510 { "UNSUCCESSFUL", STATUS_UNSUCCESSFUL },
5511 { "USER_APC", STATUS_USER_APC },
5512 { "USER_MAPPED_FILE", STATUS_USER_MAPPED_FILE },
5513 { "VOLUME_DISMOUNTED", STATUS_VOLUME_DISMOUNTED },
5514 { "WAS_LOCKED", STATUS_WAS_LOCKED },
5515 { "WSAEACCES", 0xc0010000 | WSAEACCES },
5516 { "WSAEADDRINUSE", 0xc0010000 | WSAEADDRINUSE },
5517 { "WSAEADDRNOTAVAIL", 0xc0010000 | WSAEADDRNOTAVAIL },
5518 { "WSAEAFNOSUPPORT", 0xc0010000 | WSAEAFNOSUPPORT },
5519 { "WSAEALREADY", 0xc0010000 | WSAEALREADY },
5520 { "WSAEBADF", 0xc0010000 | WSAEBADF },
5521 { "WSAECONNABORTED", 0xc0010000 | WSAECONNABORTED },
5522 { "WSAECONNREFUSED", 0xc0010000 | WSAECONNREFUSED },
5523 { "WSAECONNRESET", 0xc0010000 | WSAECONNRESET },
5524 { "WSAEDESTADDRREQ", 0xc0010000 | WSAEDESTADDRREQ },
5525 { "WSAEDQUOT", 0xc0010000 | WSAEDQUOT },
5526 { "WSAEFAULT", 0xc0010000 | WSAEFAULT },
5527 { "WSAEHOSTDOWN", 0xc0010000 | WSAEHOSTDOWN },
5528 { "WSAEHOSTUNREACH", 0xc0010000 | WSAEHOSTUNREACH },
5529 { "WSAEINTR", 0xc0010000 | WSAEINTR },
5530 { "WSAEINVAL", 0xc0010000 | WSAEINVAL },
5531 { "WSAEISCONN", 0xc0010000 | WSAEISCONN },
5532 { "WSAELOOP", 0xc0010000 | WSAELOOP },
5533 { "WSAEMFILE", 0xc0010000 | WSAEMFILE },
5534 { "WSAEMSGSIZE", 0xc0010000 | WSAEMSGSIZE },
5535 { "WSAENAMETOOLONG", 0xc0010000 | WSAENAMETOOLONG },
5536 { "WSAENETDOWN", 0xc0010000 | WSAENETDOWN },
5537 { "WSAENETRESET", 0xc0010000 | WSAENETRESET },
5538 { "WSAENETUNREACH", 0xc0010000 | WSAENETUNREACH },
5539 { "WSAENOBUFS", 0xc0010000 | WSAENOBUFS },
5540 { "WSAENOPROTOOPT", 0xc0010000 | WSAENOPROTOOPT },
5541 { "WSAENOTCONN", 0xc0010000 | WSAENOTCONN },
5542 { "WSAENOTEMPTY", 0xc0010000 | WSAENOTEMPTY },
5543 { "WSAENOTSOCK", 0xc0010000 | WSAENOTSOCK },
5544 { "WSAEOPNOTSUPP", 0xc0010000 | WSAEOPNOTSUPP },
5545 { "WSAEPFNOSUPPORT", 0xc0010000 | WSAEPFNOSUPPORT },
5546 { "WSAEPROCLIM", 0xc0010000 | WSAEPROCLIM },
5547 { "WSAEPROTONOSUPPORT", 0xc0010000 | WSAEPROTONOSUPPORT },
5548 { "WSAEPROTOTYPE", 0xc0010000 | WSAEPROTOTYPE },
5549 { "WSAEREMOTE", 0xc0010000 | WSAEREMOTE },
5550 { "WSAESHUTDOWN", 0xc0010000 | WSAESHUTDOWN },
5551 { "WSAESOCKTNOSUPPORT", 0xc0010000 | WSAESOCKTNOSUPPORT },
5552 { "WSAESTALE", 0xc0010000 | WSAESTALE },
5553 { "WSAETIMEDOUT", 0xc0010000 | WSAETIMEDOUT },
5554 { "WSAETOOMANYREFS", 0xc0010000 | WSAETOOMANYREFS },
5555 { "WSAEUSERS", 0xc0010000 | WSAEUSERS },
5556 { "WSAEWOULDBLOCK", 0xc0010000 | WSAEWOULDBLOCK },
5557 { NULL, 0 }
5560 /* ### make_requests end ### */
5561 /* Everything above this line is generated automatically by tools/make_requests */
5563 static const char *get_status_name( unsigned int status )
5565 int i;
5566 static char buffer[10];
5568 if (status)
5570 for (i = 0; status_names[i].name; i++)
5571 if (status_names[i].value == status) return status_names[i].name;
5573 sprintf( buffer, "%x", status );
5574 return buffer;
5577 void trace_request(void)
5579 enum request req = current->req.request_header.req;
5580 if (req < REQ_NB_REQUESTS)
5582 fprintf( stderr, "%04x: %s(", current->id, req_names[req] );
5583 if (req_dumpers[req])
5585 cur_data = get_req_data();
5586 cur_size = get_req_data_size();
5587 req_dumpers[req]( &current->req );
5589 fprintf( stderr, " )\n" );
5591 else fprintf( stderr, "%04x: %d(?)\n", current->id, req );
5594 void trace_reply( enum request req, const union generic_reply *reply )
5596 if (req < REQ_NB_REQUESTS)
5598 fprintf( stderr, "%04x: %s() = %s",
5599 current->id, req_names[req], get_status_name(current->error) );
5600 if (reply_dumpers[req])
5602 fprintf( stderr, " {" );
5603 cur_data = current->reply_data;
5604 cur_size = reply->reply_header.reply_size;
5605 reply_dumpers[req]( reply );
5606 fprintf( stderr, " }" );
5608 fputc( '\n', stderr );
5610 else fprintf( stderr, "%04x: %d() = %s\n",
5611 current->id, req, get_status_name(current->error) );