windowscodecs: Move PNG encoding to the unix lib.
[wine/zf.git] / server / trace.c
blobe059b709e8f5c09308ee126337ffb221508590ae
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_client_cpu( const char *prefix, const client_cpu_t *code )
152 switch (*code)
154 #define CASE(c) case CPU_##c: fprintf( stderr, "%s%s", prefix, #c ); break
155 CASE(x86);
156 CASE(x86_64);
157 CASE(POWERPC);
158 CASE(ARM);
159 CASE(ARM64);
160 default: fprintf( stderr, "%s%u", prefix, *code ); break;
161 #undef CASE
165 static void dump_apc_call( const char *prefix, const apc_call_t *call )
167 fprintf( stderr, "%s{", prefix );
168 switch(call->type)
170 case APC_NONE:
171 fprintf( stderr, "APC_NONE" );
172 break;
173 case APC_USER:
174 dump_uint64( "APC_USER,func=", &call->user.user.func );
175 dump_uint64( ",args={", &call->user.user.args[0] );
176 dump_uint64( ",", &call->user.user.args[1] );
177 dump_uint64( ",", &call->user.user.args[2] );
178 fputc( '}', stderr );
179 break;
180 case APC_TIMER:
181 dump_timeout( "APC_TIMER,time=", &call->user.timer.time );
182 dump_uint64( ",arg=", &call->user.timer.arg );
183 break;
184 case APC_ASYNC_IO:
185 dump_uint64( "APC_ASYNC_IO,user=", &call->async_io.user );
186 dump_uint64( ",sb=", &call->async_io.sb );
187 fprintf( stderr, ",status=%s", get_status_name(call->async_io.status) );
188 break;
189 case APC_VIRTUAL_ALLOC:
190 dump_uint64( "APC_VIRTUAL_ALLOC,addr==", &call->virtual_alloc.addr );
191 dump_uint64( ",size=", &call->virtual_alloc.size );
192 dump_uint64( ",zero_bits=", &call->virtual_alloc.zero_bits );
193 fprintf( stderr, ",op_type=%x,prot=%x", call->virtual_alloc.op_type, call->virtual_alloc.prot );
194 break;
195 case APC_VIRTUAL_FREE:
196 dump_uint64( "APC_VIRTUAL_FREE,addr=", &call->virtual_free.addr );
197 dump_uint64( ",size=", &call->virtual_free.size );
198 fprintf( stderr, ",op_type=%x", call->virtual_free.op_type );
199 break;
200 case APC_VIRTUAL_QUERY:
201 dump_uint64( "APC_VIRTUAL_QUERY,addr=", &call->virtual_query.addr );
202 break;
203 case APC_VIRTUAL_PROTECT:
204 dump_uint64( "APC_VIRTUAL_PROTECT,addr=", &call->virtual_protect.addr );
205 dump_uint64( ",size=", &call->virtual_protect.size );
206 fprintf( stderr, ",prot=%x", call->virtual_protect.prot );
207 break;
208 case APC_VIRTUAL_FLUSH:
209 dump_uint64( "APC_VIRTUAL_FLUSH,addr=", &call->virtual_flush.addr );
210 dump_uint64( ",size=", &call->virtual_flush.size );
211 break;
212 case APC_VIRTUAL_LOCK:
213 dump_uint64( "APC_VIRTUAL_LOCK,addr=", &call->virtual_lock.addr );
214 dump_uint64( ",size=", &call->virtual_lock.size );
215 break;
216 case APC_VIRTUAL_UNLOCK:
217 dump_uint64( "APC_VIRTUAL_UNLOCK,addr=", &call->virtual_unlock.addr );
218 dump_uint64( ",size=", &call->virtual_unlock.size );
219 break;
220 case APC_MAP_VIEW:
221 fprintf( stderr, "APC_MAP_VIEW,handle=%04x", call->map_view.handle );
222 dump_uint64( ",addr=", &call->map_view.addr );
223 dump_uint64( ",size=", &call->map_view.size );
224 dump_uint64( ",offset=", &call->map_view.offset );
225 dump_uint64( ",zero_bits=", &call->map_view.zero_bits );
226 fprintf( stderr, ",alloc_type=%x,prot=%x", call->map_view.alloc_type, call->map_view.prot );
227 break;
228 case APC_UNMAP_VIEW:
229 dump_uint64( "APC_UNMAP_VIEW,addr=", &call->unmap_view.addr );
230 break;
231 case APC_CREATE_THREAD:
232 dump_uint64( "APC_CREATE_THREAD,func=", &call->create_thread.func );
233 dump_uint64( ",arg=", &call->create_thread.arg );
234 dump_uint64( ",reserve=", &call->create_thread.reserve );
235 dump_uint64( ",commit=", &call->create_thread.commit );
236 fprintf( stderr, ",flags=%x", call->create_thread.flags );
237 break;
238 case APC_BREAK_PROCESS:
239 fprintf( stderr, "APC_BREAK_PROCESS" );
240 break;
241 default:
242 fprintf( stderr, "type=%u", call->type );
243 break;
245 fputc( '}', stderr );
248 static void dump_apc_result( const char *prefix, const apc_result_t *result )
250 fprintf( stderr, "%s{", prefix );
251 switch(result->type)
253 case APC_NONE:
254 break;
255 case APC_ASYNC_IO:
256 fprintf( stderr, "APC_ASYNC_IO,status=%s,total=%u",
257 get_status_name( result->async_io.status ), result->async_io.total );
258 break;
259 case APC_VIRTUAL_ALLOC:
260 fprintf( stderr, "APC_VIRTUAL_ALLOC,status=%s",
261 get_status_name( result->virtual_alloc.status ));
262 dump_uint64( ",addr=", &result->virtual_alloc.addr );
263 dump_uint64( ",size=", &result->virtual_alloc.size );
264 break;
265 case APC_VIRTUAL_FREE:
266 fprintf( stderr, "APC_VIRTUAL_FREE,status=%s",
267 get_status_name( result->virtual_free.status ));
268 dump_uint64( ",addr=", &result->virtual_free.addr );
269 dump_uint64( ",size=", &result->virtual_free.size );
270 break;
271 case APC_VIRTUAL_QUERY:
272 fprintf( stderr, "APC_VIRTUAL_QUERY,status=%s",
273 get_status_name( result->virtual_query.status ));
274 dump_uint64( ",base=", &result->virtual_query.base );
275 dump_uint64( ",alloc_base=", &result->virtual_query.alloc_base );
276 dump_uint64( ",size=", &result->virtual_query.size );
277 fprintf( stderr, ",state=%x,prot=%x,alloc_prot=%x,alloc_type=%x",
278 result->virtual_query.state, result->virtual_query.prot,
279 result->virtual_query.alloc_prot, result->virtual_query.alloc_type );
280 break;
281 case APC_VIRTUAL_PROTECT:
282 fprintf( stderr, "APC_VIRTUAL_PROTECT,status=%s",
283 get_status_name( result->virtual_protect.status ));
284 dump_uint64( ",addr=", &result->virtual_protect.addr );
285 dump_uint64( ",size=", &result->virtual_protect.size );
286 fprintf( stderr, ",prot=%x", result->virtual_protect.prot );
287 break;
288 case APC_VIRTUAL_FLUSH:
289 fprintf( stderr, "APC_VIRTUAL_FLUSH,status=%s",
290 get_status_name( result->virtual_flush.status ));
291 dump_uint64( ",addr=", &result->virtual_flush.addr );
292 dump_uint64( ",size=", &result->virtual_flush.size );
293 break;
294 case APC_VIRTUAL_LOCK:
295 fprintf( stderr, "APC_VIRTUAL_LOCK,status=%s",
296 get_status_name( result->virtual_lock.status ));
297 dump_uint64( ",addr=", &result->virtual_lock.addr );
298 dump_uint64( ",size=", &result->virtual_lock.size );
299 break;
300 case APC_VIRTUAL_UNLOCK:
301 fprintf( stderr, "APC_VIRTUAL_UNLOCK,status=%s",
302 get_status_name( result->virtual_unlock.status ));
303 dump_uint64( ",addr=", &result->virtual_unlock.addr );
304 dump_uint64( ",size=", &result->virtual_unlock.size );
305 break;
306 case APC_MAP_VIEW:
307 fprintf( stderr, "APC_MAP_VIEW,status=%s",
308 get_status_name( result->map_view.status ));
309 dump_uint64( ",addr=", &result->map_view.addr );
310 dump_uint64( ",size=", &result->map_view.size );
311 break;
312 case APC_UNMAP_VIEW:
313 fprintf( stderr, "APC_UNMAP_VIEW,status=%s",
314 get_status_name( result->unmap_view.status ) );
315 break;
316 case APC_CREATE_THREAD:
317 fprintf( stderr, "APC_CREATE_THREAD,status=%s,pid=%04x,tid=%04x,handle=%04x",
318 get_status_name( result->create_thread.status ),
319 result->create_thread.pid, result->create_thread.tid, result->create_thread.handle );
320 break;
321 case APC_BREAK_PROCESS:
322 fprintf( stderr, "APC_BREAK_PROCESS,status=%s", get_status_name( result->break_process.status ) );
323 break;
324 default:
325 fprintf( stderr, "type=%u", result->type );
326 break;
328 fputc( '}', stderr );
331 static void dump_async_data( const char *prefix, const async_data_t *data )
333 fprintf( stderr, "%s{handle=%04x,event=%04x", prefix, data->handle, data->event );
334 dump_uint64( ",iosb=", &data->iosb );
335 dump_uint64( ",user=", &data->user );
336 dump_uint64( ",apc=", &data->apc );
337 dump_uint64( ",apc_context=", &data->apc_context );
338 fputc( '}', stderr );
341 static void dump_irp_params( const char *prefix, const irp_params_t *data )
343 switch (data->type)
345 case IRP_CALL_NONE:
346 fprintf( stderr, "%s{NONE}", prefix );
347 break;
348 case IRP_CALL_CREATE:
349 fprintf( stderr, "%s{CREATE,access=%08x,sharing=%08x,options=%08x",
350 prefix, data->create.access, data->create.sharing, data->create.options );
351 dump_uint64( ",device=", &data->create.device );
352 fprintf( stderr, ",file=%08x}", data->create.file );
353 break;
354 case IRP_CALL_CLOSE:
355 fprintf( stderr, "%s{CLOSE", prefix );
356 dump_uint64( ",file=", &data->close.file );
357 fputc( '}', stderr );
358 break;
359 case IRP_CALL_READ:
360 fprintf( stderr, "%s{READ,key=%08x,out_size=%u", prefix, data->read.key,
361 data->read.out_size );
362 dump_uint64( ",pos=", &data->read.pos );
363 dump_uint64( ",file=", &data->read.file );
364 fputc( '}', stderr );
365 break;
366 case IRP_CALL_WRITE:
367 fprintf( stderr, "%s{WRITE,key=%08x", prefix, data->write.key );
368 dump_uint64( ",pos=", &data->write.pos );
369 dump_uint64( ",file=", &data->write.file );
370 fputc( '}', stderr );
371 break;
372 case IRP_CALL_FLUSH:
373 fprintf( stderr, "%s{FLUSH", prefix );
374 dump_uint64( ",file=", &data->flush.file );
375 fputc( '}', stderr );
376 break;
377 case IRP_CALL_IOCTL:
378 fprintf( stderr, "%s{IOCTL", prefix );
379 dump_ioctl_code( ",code=", &data->ioctl.code );
380 fprintf( stderr, ",out_size=%u", data->ioctl.out_size );
381 dump_uint64( ",file=", &data->ioctl.file );
382 fputc( '}', stderr );
383 break;
384 case IRP_CALL_FREE:
385 fprintf( stderr, "%s{FREE", prefix );
386 dump_uint64( ",obj=", &data->free.obj );
387 fputc( '}', stderr );
388 break;
389 case IRP_CALL_CANCEL:
390 fprintf( stderr, "%s{CANCEL", prefix );
391 dump_uint64( ",irp=", &data->cancel.irp );
392 fputc( '}', stderr );
393 break;
397 static void dump_hw_input( const char *prefix, const hw_input_t *input )
399 switch (input->type)
401 case INPUT_MOUSE:
402 fprintf( stderr, "%s{type=MOUSE,x=%d,y=%d,data=%08x,flags=%08x,time=%u",
403 prefix, input->mouse.x, input->mouse.y, input->mouse.data, input->mouse.flags,
404 input->mouse.time );
405 dump_uint64( ",info=", &input->mouse.info );
406 fputc( '}', stderr );
407 break;
408 case INPUT_KEYBOARD:
409 fprintf( stderr, "%s{type=KEYBOARD,vkey=%04hx,scan=%04hx,flags=%08x,time=%u",
410 prefix, input->kbd.vkey, input->kbd.scan, input->kbd.flags, input->kbd.time );
411 dump_uint64( ",info=", &input->kbd.info );
412 fputc( '}', stderr );
413 break;
414 case INPUT_HARDWARE:
415 fprintf( stderr, "%s{type=HARDWARE,msg=%04x", prefix, input->hw.msg );
416 dump_uint64( ",lparam=", &input->hw.lparam );
417 fputc( '}', stderr );
418 break;
419 default:
420 fprintf( stderr, "%s{type=%04x}", prefix, input->type );
421 break;
425 static void dump_luid( const char *prefix, const luid_t *luid )
427 fprintf( stderr, "%s%d.%u", prefix, luid->high_part, luid->low_part );
430 static void dump_varargs_ints( const char *prefix, data_size_t size )
432 const int *data = cur_data;
433 data_size_t len = size / sizeof(*data);
435 fprintf( stderr,"%s{", prefix );
436 while (len > 0)
438 fprintf( stderr, "%d", *data++ );
439 if (--len) fputc( ',', stderr );
441 fputc( '}', stderr );
442 remove_data( size );
445 static void dump_varargs_uints( const char *prefix, data_size_t size )
447 const unsigned int *data = cur_data;
449 dump_uints( prefix, data, size / sizeof(*data) );
450 remove_data( size );
453 static void dump_varargs_uints64( const char *prefix, data_size_t size )
455 const unsigned __int64 *data = cur_data;
456 data_size_t len = size / sizeof(*data);
458 fprintf( stderr,"%s{", prefix );
459 while (len > 0)
461 dump_uint64( "", data++ );
462 if (--len) fputc( ',', stderr );
464 fputc( '}', stderr );
465 remove_data( size );
468 static void dump_varargs_apc_result( const char *prefix, data_size_t size )
470 const apc_result_t *result = cur_data;
472 if (size >= sizeof(*result))
474 dump_apc_result( prefix, result );
475 size = sizeof(*result);
477 remove_data( size );
480 static void dump_varargs_select_op( const char *prefix, data_size_t size )
482 select_op_t data;
484 if (!size)
486 fprintf( stderr, "%s{}", prefix );
487 return;
489 memset( &data, 0, sizeof(data) );
490 memcpy( &data, cur_data, min( size, sizeof(data) ));
492 fprintf( stderr, "%s{", prefix );
493 switch (data.op)
495 case SELECT_NONE:
496 fprintf( stderr, "NONE" );
497 break;
498 case SELECT_WAIT:
499 case SELECT_WAIT_ALL:
500 fprintf( stderr, "%s", data.op == SELECT_WAIT ? "WAIT" : "WAIT_ALL" );
501 if (size > offsetof( select_op_t, wait.handles ))
502 dump_handles( ",handles=", data.wait.handles,
503 min( size, sizeof(data.wait) ) - offsetof( select_op_t, wait.handles ));
504 break;
505 case SELECT_SIGNAL_AND_WAIT:
506 fprintf( stderr, "SIGNAL_AND_WAIT,signal=%04x,wait=%04x",
507 data.signal_and_wait.signal, data.signal_and_wait.wait );
508 break;
509 case SELECT_KEYED_EVENT_WAIT:
510 case SELECT_KEYED_EVENT_RELEASE:
511 fprintf( stderr, "KEYED_EVENT_%s,handle=%04x",
512 data.op == SELECT_KEYED_EVENT_WAIT ? "WAIT" : "RELEASE",
513 data.keyed_event.handle );
514 dump_uint64( ",key=", &data.keyed_event.key );
515 break;
516 default:
517 fprintf( stderr, "op=%u", data.op );
518 break;
520 fputc( '}', stderr );
521 remove_data( size );
524 static void dump_varargs_user_handles( const char *prefix, data_size_t size )
526 const user_handle_t *data = cur_data;
527 data_size_t len = size / sizeof(*data);
529 fprintf( stderr,"%s{", prefix );
530 while (len > 0)
532 fprintf( stderr, "%08x", *data++ );
533 if (--len) fputc( ',', stderr );
535 fputc( '}', stderr );
536 remove_data( size );
539 static void dump_varargs_bytes( const char *prefix, data_size_t size )
541 const unsigned char *data = cur_data;
542 data_size_t len = min( 1024, size );
544 fprintf( stderr,"%s{", prefix );
545 while (len > 0)
547 fprintf( stderr, "%02x", *data++ );
548 if (--len) fputc( ',', stderr );
550 if (size > 1024) fprintf( stderr, "...(total %u)", size );
551 fputc( '}', stderr );
552 remove_data( size );
555 static void dump_varargs_string( const char *prefix, data_size_t size )
557 fprintf( stderr, "%s\"%.*s\"", prefix, (int)size, (const char *)cur_data );
558 remove_data( size );
561 static void dump_varargs_unicode_str( const char *prefix, data_size_t size )
563 fprintf( stderr, "%sL\"", prefix );
564 dump_strW( cur_data, size, stderr, "\"\"" );
565 fputc( '\"', stderr );
566 remove_data( size );
569 static void dump_varargs_context( const char *prefix, data_size_t size )
571 const context_t *context = cur_data;
572 context_t ctx;
573 unsigned int i;
575 if (!size)
577 fprintf( stderr, "%s{}", prefix );
578 return;
580 size = min( size, sizeof(ctx) );
581 memset( &ctx, 0, sizeof(ctx) );
582 memcpy( &ctx, context, size );
584 fprintf( stderr,"%s{", prefix );
585 dump_client_cpu( "cpu=", &ctx.cpu );
586 switch (ctx.cpu)
588 case CPU_x86:
589 if (ctx.flags & SERVER_CTX_CONTROL)
590 fprintf( stderr, ",eip=%08x,esp=%08x,ebp=%08x,eflags=%08x,cs=%04x,ss=%04x",
591 ctx.ctl.i386_regs.eip, ctx.ctl.i386_regs.esp, ctx.ctl.i386_regs.ebp,
592 ctx.ctl.i386_regs.eflags, ctx.ctl.i386_regs.cs, ctx.ctl.i386_regs.ss );
593 if (ctx.flags & SERVER_CTX_SEGMENTS)
594 fprintf( stderr, ",ds=%04x,es=%04x,fs=%04x,gs=%04x",
595 ctx.seg.i386_regs.ds, ctx.seg.i386_regs.es,
596 ctx.seg.i386_regs.fs, ctx.seg.i386_regs.gs );
597 if (ctx.flags & SERVER_CTX_INTEGER)
598 fprintf( stderr, ",eax=%08x,ebx=%08x,ecx=%08x,edx=%08x,esi=%08x,edi=%08x",
599 ctx.integer.i386_regs.eax, ctx.integer.i386_regs.ebx, ctx.integer.i386_regs.ecx,
600 ctx.integer.i386_regs.edx, ctx.integer.i386_regs.esi, ctx.integer.i386_regs.edi );
601 if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
602 fprintf( stderr, ",dr0=%08x,dr1=%08x,dr2=%08x,dr3=%08x,dr6=%08x,dr7=%08x",
603 ctx.debug.i386_regs.dr0, ctx.debug.i386_regs.dr1, ctx.debug.i386_regs.dr2,
604 ctx.debug.i386_regs.dr3, ctx.debug.i386_regs.dr6, ctx.debug.i386_regs.dr7 );
605 if (ctx.flags & SERVER_CTX_FLOATING_POINT)
607 fprintf( stderr, ",fp.ctrl=%08x,fp.status=%08x,fp.tag=%08x,fp.err_off=%08x,fp.err_sel=%08x",
608 ctx.fp.i386_regs.ctrl, ctx.fp.i386_regs.status, ctx.fp.i386_regs.tag,
609 ctx.fp.i386_regs.err_off, ctx.fp.i386_regs.err_sel );
610 fprintf( stderr, ",fp.data_off=%08x,fp.data_sel=%08x,fp.cr0npx=%08x",
611 ctx.fp.i386_regs.data_off, ctx.fp.i386_regs.data_sel, ctx.fp.i386_regs.cr0npx );
612 for (i = 0; i < 8; i++)
614 long double reg = 0;
615 memcpy( &reg, &ctx.fp.i386_regs.regs[10 * i], 10 );
616 fprintf( stderr, ",fp.reg%u=%Lg", i, reg );
619 if (ctx.flags & SERVER_CTX_EXTENDED_REGISTERS)
620 dump_uints( ",extended=", (const unsigned int *)ctx.ext.i386_regs,
621 sizeof(ctx.ext.i386_regs) / sizeof(int) );
622 if (ctx.flags & SERVER_CTX_YMM_REGISTERS)
623 dump_uints( ",ymm_high=", (const unsigned int *)ctx.ymm.ymm_high_regs.ymm_high,
624 sizeof(ctx.ymm.ymm_high_regs) / sizeof(int) );
625 break;
626 case CPU_x86_64:
627 if (ctx.flags & SERVER_CTX_CONTROL)
629 dump_uint64( ",rip=", &ctx.ctl.x86_64_regs.rip );
630 dump_uint64( ",rbp=", &ctx.ctl.x86_64_regs.rbp );
631 dump_uint64( ",rsp=", &ctx.ctl.x86_64_regs.rsp );
632 fprintf( stderr, ",cs=%04x,ss=%04x,flags=%08x",
633 ctx.ctl.x86_64_regs.cs, ctx.ctl.x86_64_regs.ss, ctx.ctl.x86_64_regs.flags );
635 if (ctx.flags & SERVER_CTX_INTEGER)
637 dump_uint64( ",rax=", &ctx.integer.x86_64_regs.rax );
638 dump_uint64( ",rbx=", &ctx.integer.x86_64_regs.rbx );
639 dump_uint64( ",rcx=", &ctx.integer.x86_64_regs.rcx );
640 dump_uint64( ",rdx=", &ctx.integer.x86_64_regs.rdx );
641 dump_uint64( ",rsi=", &ctx.integer.x86_64_regs.rsi );
642 dump_uint64( ",rdi=", &ctx.integer.x86_64_regs.rdi );
643 dump_uint64( ",r8=", &ctx.integer.x86_64_regs.r8 );
644 dump_uint64( ",r9=", &ctx.integer.x86_64_regs.r9 );
645 dump_uint64( ",r10=", &ctx.integer.x86_64_regs.r10 );
646 dump_uint64( ",r11=", &ctx.integer.x86_64_regs.r11 );
647 dump_uint64( ",r12=", &ctx.integer.x86_64_regs.r12 );
648 dump_uint64( ",r13=", &ctx.integer.x86_64_regs.r13 );
649 dump_uint64( ",r14=", &ctx.integer.x86_64_regs.r14 );
650 dump_uint64( ",r15=", &ctx.integer.x86_64_regs.r15 );
652 if (ctx.flags & SERVER_CTX_SEGMENTS)
653 fprintf( stderr, ",ds=%04x,es=%04x,fs=%04x,gs=%04x",
654 ctx.seg.x86_64_regs.ds, ctx.seg.x86_64_regs.es,
655 ctx.seg.x86_64_regs.fs, ctx.seg.x86_64_regs.gs );
656 if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
658 dump_uint64( ",dr0=", &ctx.debug.x86_64_regs.dr0 );
659 dump_uint64( ",dr1=", &ctx.debug.x86_64_regs.dr1 );
660 dump_uint64( ",dr2=", &ctx.debug.x86_64_regs.dr2 );
661 dump_uint64( ",dr3=", &ctx.debug.x86_64_regs.dr3 );
662 dump_uint64( ",dr6=", &ctx.debug.x86_64_regs.dr6 );
663 dump_uint64( ",dr7=", &ctx.debug.x86_64_regs.dr7 );
665 if (ctx.flags & SERVER_CTX_FLOATING_POINT)
667 for (i = 0; i < 32; i++)
668 fprintf( stderr, ",fp%u=%08x%08x%08x%08x", i,
669 (unsigned int)(ctx.fp.x86_64_regs.fpregs[i].high >> 32),
670 (unsigned int)ctx.fp.x86_64_regs.fpregs[i].high,
671 (unsigned int)(ctx.fp.x86_64_regs.fpregs[i].low >> 32),
672 (unsigned int)ctx.fp.x86_64_regs.fpregs[i].low );
674 if (ctx.flags & SERVER_CTX_YMM_REGISTERS)
675 dump_uints( ",ymm_high=", (const unsigned int *)ctx.ymm.ymm_high_regs.ymm_high,
676 sizeof(ctx.ymm.ymm_high_regs) / sizeof(int) );
677 break;
678 case CPU_POWERPC:
679 if (ctx.flags & SERVER_CTX_CONTROL)
680 fprintf( stderr, ",iar=%08x,msr=%08x,ctr=%08x,lr=%08x,dar=%08x,dsisr=%08x,trap=%08x",
681 ctx.ctl.powerpc_regs.iar, ctx.ctl.powerpc_regs.msr, ctx.ctl.powerpc_regs.ctr,
682 ctx.ctl.powerpc_regs.lr, ctx.ctl.powerpc_regs.dar, ctx.ctl.powerpc_regs.dsisr,
683 ctx.ctl.powerpc_regs.trap );
684 if (ctx.flags & SERVER_CTX_INTEGER)
686 for (i = 0; i < 32; i++) fprintf( stderr, ",gpr%u=%08x", i, ctx.integer.powerpc_regs.gpr[i] );
687 fprintf( stderr, ",cr=%08x,xer=%08x",
688 ctx.integer.powerpc_regs.cr, ctx.integer.powerpc_regs.xer );
690 if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
691 for (i = 0; i < 8; i++) fprintf( stderr, ",dr%u=%08x", i, ctx.debug.powerpc_regs.dr[i] );
692 if (ctx.flags & SERVER_CTX_FLOATING_POINT)
694 for (i = 0; i < 32; i++) fprintf( stderr, ",fpr%u=%g", i, ctx.fp.powerpc_regs.fpr[i] );
695 fprintf( stderr, ",fpscr=%g", ctx.fp.powerpc_regs.fpscr );
697 break;
698 case CPU_ARM:
699 if (ctx.flags & SERVER_CTX_CONTROL)
700 fprintf( stderr, ",sp=%08x,lr=%08x,pc=%08x,cpsr=%08x",
701 ctx.ctl.arm_regs.sp, ctx.ctl.arm_regs.lr,
702 ctx.ctl.arm_regs.pc, ctx.ctl.arm_regs.cpsr );
703 if (ctx.flags & SERVER_CTX_INTEGER)
704 for (i = 0; i < 13; i++) fprintf( stderr, ",r%u=%08x", i, ctx.integer.arm_regs.r[i] );
705 if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
707 for (i = 0; i < 8; i++)
708 fprintf( stderr, ",bcr%u=%08x,bvr%u=%08x",
709 i, ctx.debug.arm_regs.bcr[i], i, ctx.debug.arm_regs.bvr[i] );
710 fprintf( stderr, ",wcr0=%08x,wvr0=%08x",
711 ctx.debug.arm_regs.wcr[0], ctx.debug.arm_regs.wvr[0] );
713 if (ctx.flags & SERVER_CTX_FLOATING_POINT)
715 for (i = 0; i < 32; i++)
717 fprintf( stderr, ",d%u=", i );
718 dump_uint64( "", &ctx.fp.arm_regs.d[i] );
720 fprintf( stderr, ",fpscr=%08x", ctx.fp.arm_regs.fpscr );
722 break;
723 case CPU_ARM64:
724 if (ctx.flags & SERVER_CTX_CONTROL)
726 dump_uint64( ",sp=", &ctx.ctl.arm64_regs.sp );
727 dump_uint64( ",pc=", &ctx.ctl.arm64_regs.pc );
728 dump_uint64( ",pstate=", &ctx.ctl.arm64_regs.pstate );
730 if (ctx.flags & SERVER_CTX_INTEGER)
732 for (i = 0; i < 31; i++)
734 fprintf( stderr, ",x%u=", i );
735 dump_uint64( "", &ctx.integer.arm64_regs.x[i] );
738 if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
740 for (i = 0; i < 8; i++)
742 fprintf( stderr, ",bcr%u=%08x,bvr%u=", i, ctx.debug.arm64_regs.bcr[i], i );
743 dump_uint64( "", &ctx.debug.arm64_regs.bvr[i] );
745 for (i = 0; i < 2; i++)
747 fprintf( stderr, ",wcr%u=%08x,wvr%u=", i, ctx.debug.arm64_regs.wcr[i], i );
748 dump_uint64( "", &ctx.debug.arm64_regs.wvr[i] );
751 if (ctx.flags & SERVER_CTX_FLOATING_POINT)
753 for (i = 0; i < 32; i++)
755 fprintf( stderr, ",q%u=", i );
756 dump_uint64( "", &ctx.fp.arm64_regs.q[i].high );
757 dump_uint64( "", &ctx.fp.arm64_regs.q[i].low );
759 fprintf( stderr, ",fpcr=%08x,fpsr=%08x", ctx.fp.arm64_regs.fpcr, ctx.fp.arm64_regs.fpsr );
761 break;
763 fputc( '}', stderr );
764 remove_data( size );
767 static void dump_varargs_debug_event( const char *prefix, data_size_t size )
769 debug_event_t event;
770 unsigned int i;
772 if (!size)
774 fprintf( stderr, "%s{}", prefix );
775 return;
777 size = min( size, sizeof(event) );
778 memset( &event, 0, sizeof(event) );
779 memcpy( &event, cur_data, size );
781 switch(event.code)
783 case EXCEPTION_DEBUG_EVENT:
784 fprintf( stderr, "%s{exception,first=%d,exc_code=%08x,flags=%08x", prefix,
785 event.exception.first, event.exception.exc_code, event.exception.flags );
786 dump_uint64( ",record=", &event.exception.record );
787 dump_uint64( ",address=", &event.exception.address );
788 fprintf( stderr, ",params={" );
789 event.exception.nb_params = min( event.exception.nb_params, EXCEPTION_MAXIMUM_PARAMETERS );
790 for (i = 0; i < event.exception.nb_params; i++)
792 dump_uint64( "", &event.exception.params[i] );
793 if (i < event.exception.nb_params) fputc( ',', stderr );
795 fprintf( stderr, "}}" );
796 break;
797 case CREATE_THREAD_DEBUG_EVENT:
798 fprintf( stderr, "%s{create_thread,thread=%04x", prefix, event.create_thread.handle );
799 dump_uint64( ",teb=", &event.create_thread.teb );
800 dump_uint64( ",start=", &event.create_thread.start );
801 fputc( '}', stderr );
802 break;
803 case CREATE_PROCESS_DEBUG_EVENT:
804 fprintf( stderr, "%s{create_process,file=%04x,process=%04x,thread=%04x", prefix,
805 event.create_process.file, event.create_process.process,
806 event.create_process.thread );
807 dump_uint64( ",base=", &event.create_process.base );
808 fprintf( stderr, ",offset=%d,size=%d",
809 event.create_process.dbg_offset, event.create_process.dbg_size );
810 dump_uint64( ",teb=", &event.create_process.teb );
811 dump_uint64( ",start=", &event.create_process.start );
812 dump_uint64( ",name=", &event.create_process.name );
813 fprintf( stderr, ",unicode=%d}", event.create_process.unicode );
814 break;
815 case EXIT_THREAD_DEBUG_EVENT:
816 fprintf( stderr, "%s{exit_thread,code=%d}", prefix, event.exit.exit_code );
817 break;
818 case EXIT_PROCESS_DEBUG_EVENT:
819 fprintf( stderr, "%s{exit_process,code=%d}", prefix, event.exit.exit_code );
820 break;
821 case LOAD_DLL_DEBUG_EVENT:
822 fprintf( stderr, "%s{load_dll,file=%04x", prefix, event.load_dll.handle );
823 dump_uint64( ",base=", &event.load_dll.base );
824 fprintf( stderr, ",offset=%d,size=%d",
825 event.load_dll.dbg_offset, event.load_dll.dbg_size );
826 dump_uint64( ",name=", &event.load_dll.name );
827 fprintf( stderr, ",unicode=%d}", event.load_dll.unicode );
828 break;
829 case UNLOAD_DLL_DEBUG_EVENT:
830 fprintf( stderr, "%s{unload_dll", prefix );
831 dump_uint64( ",base=", &event.unload_dll.base );
832 fputc( '}', stderr );
833 break;
834 case 0: /* zero is the code returned on timeouts */
835 fprintf( stderr, "%s{}", prefix );
836 break;
837 default:
838 fprintf( stderr, "%s{code=??? (%d)}", prefix, event.code );
839 break;
841 remove_data( size );
844 /* dump a unicode string contained in a buffer; helper for dump_varargs_startup_info */
845 static data_size_t dump_inline_unicode_string( const char *prefix, data_size_t pos, data_size_t len, data_size_t total_size )
847 fputs( prefix, stderr );
848 if (pos >= total_size) return pos;
849 if (len > total_size - pos) len = total_size - pos;
850 dump_strW( (const WCHAR *)cur_data + pos/sizeof(WCHAR), len, stderr, "\"\"" );
851 return pos + (len / sizeof(WCHAR)) * sizeof(WCHAR);
854 static void dump_varargs_startup_info( const char *prefix, data_size_t size )
856 startup_info_t info;
857 data_size_t pos = sizeof(info);
859 memset( &info, 0, sizeof(info) );
860 memcpy( &info, cur_data, min( size, sizeof(info) ));
862 fprintf( stderr,
863 "%s{debug_flags=%x,console_flags=%x,console=%04x,hstdin=%04x,hstdout=%04x,hstderr=%04x,"
864 "x=%u,y=%u,xsize=%u,ysize=%u,xchars=%u,ychars=%u,attribute=%02x,flags=%x,show=%u",
865 prefix, info.debug_flags, info.console_flags, info.console,
866 info.hstdin, info.hstdout, info.hstderr, info.x, info.y, info.xsize, info.ysize,
867 info.xchars, info.ychars, info.attribute, info.flags, info.show );
868 pos = dump_inline_unicode_string( ",curdir=L\"", pos, info.curdir_len, size );
869 pos = dump_inline_unicode_string( "\",dllpath=L\"", pos, info.dllpath_len, size );
870 pos = dump_inline_unicode_string( "\",imagepath=L\"", pos, info.imagepath_len, size );
871 pos = dump_inline_unicode_string( "\",cmdline=L\"", pos, info.cmdline_len, size );
872 pos = dump_inline_unicode_string( "\",title=L\"", pos, info.title_len, size );
873 pos = dump_inline_unicode_string( "\",desktop=L\"", pos, info.desktop_len, size );
874 pos = dump_inline_unicode_string( "\",shellinfo=L\"", pos, info.shellinfo_len, size );
875 pos = dump_inline_unicode_string( "\",runtime=L\"", pos, info.runtime_len, size );
876 fprintf( stderr, "\"}" );
877 remove_data( size );
880 static void dump_varargs_rectangles( const char *prefix, data_size_t size )
882 const rectangle_t *rect = cur_data;
883 data_size_t len = size / sizeof(*rect);
885 fprintf( stderr,"%s{", prefix );
886 while (len > 0)
888 dump_rectangle( "", rect++ );
889 if (--len) fputc( ',', stderr );
891 fputc( '}', stderr );
892 remove_data( size );
895 static void dump_varargs_cursor_positions( const char *prefix, data_size_t size )
897 const cursor_pos_t *pos = cur_data;
898 data_size_t len = size / sizeof(*pos);
900 fprintf( stderr, "%s{", prefix );
901 while (len > 0)
903 fprintf( stderr, "{x=%d,y=%d,time=%u", pos->x, pos->y, pos->time );
904 dump_uint64( ",info=", &pos->info );
905 fputc( '}', stderr );
906 pos++;
907 if (--len) fputc( ',', stderr );
909 fputc( '}', stderr );
910 remove_data( size );
913 static void dump_varargs_message_data( const char *prefix, data_size_t size )
915 /* FIXME: dump the structured data */
916 dump_varargs_bytes( prefix, size );
919 static void dump_varargs_properties( const char *prefix, data_size_t size )
921 const property_data_t *prop = cur_data;
922 data_size_t len = size / sizeof(*prop);
924 fprintf( stderr,"%s{", prefix );
925 while (len > 0)
927 fprintf( stderr, "{atom=%04x,str=%d", prop->atom, prop->string );
928 dump_uint64( ",data=", &prop->data );
929 fputc( '}', stderr );
930 prop++;
931 if (--len) fputc( ',', stderr );
933 fputc( '}', stderr );
934 remove_data( size );
937 static void dump_varargs_LUID_AND_ATTRIBUTES( const char *prefix, data_size_t size )
939 const LUID_AND_ATTRIBUTES *lat = cur_data;
940 data_size_t len = size / sizeof(*lat);
942 fprintf( stderr,"%s{", prefix );
943 while (len > 0)
945 fprintf( stderr, "{luid=%08x%08x,attr=%x}",
946 lat->Luid.HighPart, lat->Luid.LowPart, lat->Attributes );
947 lat++;
948 if (--len) fputc( ',', stderr );
950 fputc( '}', stderr );
951 remove_data( size );
954 static void dump_inline_sid( const char *prefix, const SID *sid, data_size_t size )
956 DWORD i;
958 /* security check */
959 if ((FIELD_OFFSET(SID, SubAuthority[0]) > size) ||
960 (FIELD_OFFSET(SID, SubAuthority[sid->SubAuthorityCount]) > size))
962 fprintf( stderr, "<invalid sid>" );
963 return;
966 fprintf( stderr,"%s{", prefix );
967 fprintf( stderr, "S-%u-%u", sid->Revision, MAKELONG(
968 MAKEWORD( sid->IdentifierAuthority.Value[5],
969 sid->IdentifierAuthority.Value[4] ),
970 MAKEWORD( sid->IdentifierAuthority.Value[3],
971 sid->IdentifierAuthority.Value[2] ) ) );
972 for (i = 0; i < sid->SubAuthorityCount; i++)
973 fprintf( stderr, "-%u", sid->SubAuthority[i] );
974 fputc( '}', stderr );
977 static void dump_varargs_SID( const char *prefix, data_size_t size )
979 const SID *sid = cur_data;
980 dump_inline_sid( prefix, sid, size );
981 remove_data( size );
984 static void dump_inline_acl( const char *prefix, const ACL *acl, data_size_t size )
986 const ACE_HEADER *ace;
987 ULONG i;
989 fprintf( stderr,"%s{", prefix );
990 if (size)
992 if (size < sizeof(ACL))
994 fprintf( stderr, "<invalid acl>}" );
995 return;
997 size -= sizeof(ACL);
998 ace = (const ACE_HEADER *)(acl + 1);
999 for (i = 0; i < acl->AceCount; i++)
1001 const SID *sid = NULL;
1002 data_size_t sid_size = 0;
1004 if (size < sizeof(ACE_HEADER) || size < ace->AceSize) break;
1005 size -= ace->AceSize;
1006 if (i != 0) fputc( ',', stderr );
1007 fprintf( stderr, "{AceType=" );
1008 switch (ace->AceType)
1010 case ACCESS_DENIED_ACE_TYPE:
1011 sid = (const SID *)&((const ACCESS_DENIED_ACE *)ace)->SidStart;
1012 sid_size = ace->AceSize - FIELD_OFFSET(ACCESS_DENIED_ACE, SidStart);
1013 fprintf( stderr, "ACCESS_DENIED_ACE_TYPE,Mask=%x",
1014 ((const ACCESS_DENIED_ACE *)ace)->Mask );
1015 break;
1016 case ACCESS_ALLOWED_ACE_TYPE:
1017 sid = (const SID *)&((const ACCESS_ALLOWED_ACE *)ace)->SidStart;
1018 sid_size = ace->AceSize - FIELD_OFFSET(ACCESS_ALLOWED_ACE, SidStart);
1019 fprintf( stderr, "ACCESS_ALLOWED_ACE_TYPE,Mask=%x",
1020 ((const ACCESS_ALLOWED_ACE *)ace)->Mask );
1021 break;
1022 case SYSTEM_AUDIT_ACE_TYPE:
1023 sid = (const SID *)&((const SYSTEM_AUDIT_ACE *)ace)->SidStart;
1024 sid_size = ace->AceSize - FIELD_OFFSET(SYSTEM_AUDIT_ACE, SidStart);
1025 fprintf( stderr, "SYSTEM_AUDIT_ACE_TYPE,Mask=%x",
1026 ((const SYSTEM_AUDIT_ACE *)ace)->Mask );
1027 break;
1028 case SYSTEM_ALARM_ACE_TYPE:
1029 sid = (const SID *)&((const SYSTEM_ALARM_ACE *)ace)->SidStart;
1030 sid_size = ace->AceSize - FIELD_OFFSET(SYSTEM_ALARM_ACE, SidStart);
1031 fprintf( stderr, "SYSTEM_ALARM_ACE_TYPE,Mask=%x",
1032 ((const SYSTEM_ALARM_ACE *)ace)->Mask );
1033 break;
1034 case SYSTEM_MANDATORY_LABEL_ACE_TYPE:
1035 sid = (const SID *)&((const SYSTEM_MANDATORY_LABEL_ACE *)ace)->SidStart;
1036 sid_size = ace->AceSize - FIELD_OFFSET(SYSTEM_MANDATORY_LABEL_ACE, SidStart);
1037 fprintf( stderr, "SYSTEM_MANDATORY_LABEL_ACE_TYPE,Mask=%x",
1038 ((const SYSTEM_MANDATORY_LABEL_ACE *)ace)->Mask );
1039 break;
1040 default:
1041 fprintf( stderr, "unknown<%d>", ace->AceType );
1042 break;
1044 fprintf( stderr, ",AceFlags=%x", ace->AceFlags );
1045 if (sid)
1046 dump_inline_sid( ",Sid=", sid, sid_size );
1047 ace = (const ACE_HEADER *)((const char *)ace + ace->AceSize);
1048 fputc( '}', stderr );
1051 fputc( '}', stderr );
1054 static void dump_varargs_ACL( const char *prefix, data_size_t size )
1056 const ACL *acl = cur_data;
1057 dump_inline_acl( prefix, acl, size );
1058 remove_data( size );
1061 static void dump_inline_security_descriptor( const char *prefix, const struct security_descriptor *sd, data_size_t size )
1063 fprintf( stderr,"%s{", prefix );
1064 if (size >= sizeof(struct security_descriptor))
1066 size_t offset = sizeof(struct security_descriptor);
1067 fprintf( stderr, "control=%08x", sd->control );
1068 if ((sd->owner_len > FIELD_OFFSET(SID, SubAuthority[255])) || (offset + sd->owner_len > size))
1069 return;
1070 if (sd->owner_len)
1071 dump_inline_sid( ",owner=", (const SID *)((const char *)sd + offset), sd->owner_len );
1072 else
1073 fprintf( stderr, ",owner=<not present>" );
1074 offset += sd->owner_len;
1075 if ((sd->group_len > FIELD_OFFSET(SID, SubAuthority[255])) || (offset + sd->group_len > size))
1076 return;
1077 if (sd->group_len)
1078 dump_inline_sid( ",group=", (const SID *)((const char *)sd + offset), sd->group_len );
1079 else
1080 fprintf( stderr, ",group=<not present>" );
1081 offset += sd->group_len;
1082 if ((sd->sacl_len >= MAX_ACL_LEN) || (offset + sd->sacl_len > size))
1083 return;
1084 dump_inline_acl( ",sacl=", (const ACL *)((const char *)sd + offset), sd->sacl_len );
1085 offset += sd->sacl_len;
1086 if ((sd->dacl_len >= MAX_ACL_LEN) || (offset + sd->dacl_len > size))
1087 return;
1088 dump_inline_acl( ",dacl=", (const ACL *)((const char *)sd + offset), sd->dacl_len );
1089 offset += sd->dacl_len;
1091 fputc( '}', stderr );
1094 static void dump_varargs_security_descriptor( const char *prefix, data_size_t size )
1096 const struct security_descriptor *sd = cur_data;
1097 dump_inline_security_descriptor( prefix, sd, size );
1098 remove_data( size );
1101 static void dump_varargs_token_groups( const char *prefix, data_size_t size )
1103 const struct token_groups *tg = cur_data;
1105 fprintf( stderr,"%s{", prefix );
1106 if (size >= sizeof(struct token_groups))
1108 size_t offset = sizeof(*tg);
1109 fprintf( stderr, "count=%08x,", tg->count );
1110 if (tg->count * sizeof(unsigned int) <= size)
1112 unsigned int i;
1113 const unsigned int *attr = (const unsigned int *)(tg + 1);
1115 offset += tg->count * sizeof(unsigned int);
1117 fputc( '[', stderr );
1118 for (i = 0; i < tg->count; i++)
1120 const SID *sid = (const SID *)((const char *)cur_data + offset);
1121 if (i != 0)
1122 fputc( ',', stderr );
1123 fputc( '{', stderr );
1124 fprintf( stderr, "attributes=%08x", attr[i] );
1125 dump_inline_sid( ",sid=", sid, size - offset );
1126 if ((offset + FIELD_OFFSET(SID, SubAuthority[0]) > size) ||
1127 (offset + FIELD_OFFSET(SID, SubAuthority[sid->SubAuthorityCount]) > size))
1128 break;
1129 offset += FIELD_OFFSET(SID, SubAuthority[sid->SubAuthorityCount]);
1130 fputc( '}', stderr );
1132 fputc( ']', stderr );
1135 fputc( '}', stderr );
1138 static void dump_varargs_process_info( const char *prefix, data_size_t size )
1140 data_size_t pos = 0;
1141 unsigned int i;
1143 fprintf( stderr,"%s{", prefix );
1145 while (size - pos >= sizeof(struct process_info))
1147 const struct process_info *process;
1148 pos = (pos + 7) & ~7;
1149 process = (const struct process_info *)((const char *)cur_data + pos);
1150 if (size - pos < sizeof(*process)) break;
1151 if (pos) fputc( ',', stderr );
1152 dump_timeout( "{start_time=", &process->start_time );
1153 fprintf( stderr, ",thread_count=%u,priority=%d,pid=%04x,parent_pid=%04x,handle_count=%u,unix_pid=%d,",
1154 process->thread_count, process->priority, process->pid,
1155 process->parent_pid, process->handle_count, process->unix_pid );
1156 pos += sizeof(*process);
1158 pos = dump_inline_unicode_string( "name=L\"", pos, process->name_len, size );
1160 pos = (pos + 7) & ~7;
1161 fprintf( stderr, "\",threads={" );
1162 for (i = 0; i < process->thread_count; i++)
1164 const struct thread_info *thread = (const struct thread_info *)((const char *)cur_data + pos);
1165 if (size - pos < sizeof(*thread)) break;
1166 if (i) fputc( ',', stderr );
1167 dump_timeout( "{start_time=", &thread->start_time );
1168 fprintf( stderr, ",tid=%04x,base_priority=%d,current_priority=%d,unix_tid=%d}",
1169 thread->tid, thread->base_priority, thread->current_priority, thread->unix_tid );
1170 pos += sizeof(*thread);
1172 fprintf( stderr, "}}" );
1174 fputc( '}', stderr );
1175 remove_data( size );
1178 static void dump_varargs_object_attributes( const char *prefix, data_size_t size )
1180 const struct object_attributes *objattr = cur_data;
1182 fprintf( stderr,"%s{", prefix );
1183 if (size)
1185 const WCHAR *str;
1187 if (size < sizeof(*objattr) ||
1188 (size - sizeof(*objattr) < objattr->sd_len) ||
1189 (size - sizeof(*objattr) - objattr->sd_len < objattr->name_len))
1191 fprintf( stderr, "***invalid***}" );
1192 remove_data( size );
1193 return;
1196 fprintf( stderr, "rootdir=%04x,attributes=%08x", objattr->rootdir, objattr->attributes );
1197 dump_inline_security_descriptor( ",sd=", (const struct security_descriptor *)(objattr + 1), objattr->sd_len );
1198 str = (const WCHAR *)objattr + (sizeof(*objattr) + objattr->sd_len) / sizeof(WCHAR);
1199 fprintf( stderr, ",name=L\"" );
1200 dump_strW( str, objattr->name_len, stderr, "\"\"" );
1201 fputc( '\"', stderr );
1202 remove_data( (sizeof(*objattr) + (objattr->sd_len & ~1) + (objattr->name_len & ~1) + 3) & ~3 );
1204 fputc( '}', stderr );
1207 static void dump_varargs_filesystem_event( const char *prefix, data_size_t size )
1209 static const char * const actions[] = {
1210 NULL,
1211 "ADDED",
1212 "REMOVED",
1213 "MODIFIED",
1214 "RENAMED_OLD_NAME",
1215 "RENAMED_NEW_NAME",
1216 "ADDED_STREAM",
1217 "REMOVED_STREAM",
1218 "MODIFIED_STREAM"
1221 fprintf( stderr,"%s{", prefix );
1222 while (size)
1224 const struct filesystem_event *event = cur_data;
1225 data_size_t len = (offsetof( struct filesystem_event, name[event->len] ) + sizeof(int)-1)
1226 / sizeof(int) * sizeof(int);
1227 if (size < len) break;
1228 if (event->action < ARRAY_SIZE( actions ) && actions[event->action])
1229 fprintf( stderr, "{action=%s", actions[event->action] );
1230 else
1231 fprintf( stderr, "{action=%u", event->action );
1232 fprintf( stderr, ",name=\"%.*s\"}", event->len, event->name );
1233 size -= len;
1234 remove_data( len );
1235 if (size)fputc( ',', stderr );
1237 fputc( '}', stderr );
1240 static void dump_varargs_pe_image_info( const char *prefix, data_size_t size )
1242 pe_image_info_t info;
1244 if (!size)
1246 fprintf( stderr, "%s{}", prefix );
1247 return;
1249 memset( &info, 0, sizeof(info) );
1250 memcpy( &info, cur_data, min( size, sizeof(info) ));
1252 fprintf( stderr, "%s{", prefix );
1253 dump_uint64( "base=", &info.base );
1254 dump_uint64( ",entry_point=", &info.entry_point );
1255 dump_uint64( ",map_size=", &info.map_size );
1256 dump_uint64( ",stack_size=", &info.stack_size );
1257 dump_uint64( ",stack_commit=", &info.stack_commit );
1258 fprintf( stderr, ",zerobits=%08x,subsystem=%08x,subsystem_low=%04x,subsystem_high=%04x,gp=%08x"
1259 ",image_charact=%04x,dll_charact=%04x,machine=%04x,contains_code=%u,image_flags=%02x"
1260 ",loader_flags=%08x,header_size=%08x,file_size=%08x,checksum=%08x",
1261 info.zerobits, info.subsystem, info.subsystem_low, info.subsystem_high, info.gp,
1262 info.image_charact, info.dll_charact, info.machine, info.contains_code, info.image_flags,
1263 info.loader_flags, info.header_size, info.file_size, info.checksum );
1264 dump_client_cpu( ",cpu=", &info.cpu );
1265 fputc( '}', stderr );
1266 remove_data( size );
1269 static void dump_varargs_rawinput_devices(const char *prefix, data_size_t size )
1271 const struct rawinput_device *device;
1273 fprintf( stderr, "%s{", prefix );
1274 while (size >= sizeof(*device))
1276 device = cur_data;
1277 fprintf( stderr, "{usage_page=%04x,usage=%04x,flags=%08x,target=%08x}",
1278 device->usage_page, device->usage, device->flags, device->target );
1279 size -= sizeof(*device);
1280 remove_data( sizeof(*device) );
1281 if (size) fputc( ',', stderr );
1283 fputc( '}', stderr );
1286 static void dump_varargs_handle_infos( const char *prefix, data_size_t size )
1288 const struct handle_info *handle;
1290 fprintf( stderr, "%s{", prefix );
1291 while (size >= sizeof(*handle))
1293 handle = cur_data;
1294 fprintf( stderr, "{owner=%04x,handle=%04x,access=%08x}",
1295 handle->owner, handle->handle, handle->access );
1296 size -= sizeof(*handle);
1297 remove_data( sizeof(*handle) );
1298 if (size) fputc( ',', stderr );
1300 fputc( '}', stderr );
1303 typedef void (*dump_func)( const void *req );
1305 /* Everything below this line is generated automatically by tools/make_requests */
1306 /* ### make_requests begin ### */
1308 static void dump_new_process_request( const struct new_process_request *req )
1310 fprintf( stderr, " token=%04x", req->token );
1311 fprintf( stderr, ", parent_process=%04x", req->parent_process );
1312 fprintf( stderr, ", inherit_all=%d", req->inherit_all );
1313 fprintf( stderr, ", create_flags=%08x", req->create_flags );
1314 fprintf( stderr, ", socket_fd=%d", req->socket_fd );
1315 fprintf( stderr, ", exe_file=%04x", req->exe_file );
1316 fprintf( stderr, ", access=%08x", req->access );
1317 dump_client_cpu( ", cpu=", &req->cpu );
1318 fprintf( stderr, ", info_size=%u", req->info_size );
1319 fprintf( stderr, ", handles_size=%u", req->handles_size );
1320 dump_varargs_object_attributes( ", objattr=", cur_size );
1321 dump_varargs_uints( ", handles=", min(cur_size,req->handles_size) );
1322 dump_varargs_startup_info( ", info=", min(cur_size,req->info_size) );
1323 dump_varargs_unicode_str( ", env=", cur_size );
1326 static void dump_new_process_reply( const struct new_process_reply *req )
1328 fprintf( stderr, " info=%04x", req->info );
1329 fprintf( stderr, ", pid=%04x", req->pid );
1330 fprintf( stderr, ", handle=%04x", req->handle );
1333 static void dump_exec_process_request( const struct exec_process_request *req )
1335 fprintf( stderr, " socket_fd=%d", req->socket_fd );
1336 dump_client_cpu( ", cpu=", &req->cpu );
1339 static void dump_get_new_process_info_request( const struct get_new_process_info_request *req )
1341 fprintf( stderr, " info=%04x", req->info );
1344 static void dump_get_new_process_info_reply( const struct get_new_process_info_reply *req )
1346 fprintf( stderr, " success=%d", req->success );
1347 fprintf( stderr, ", exit_code=%d", req->exit_code );
1350 static void dump_new_thread_request( const struct new_thread_request *req )
1352 fprintf( stderr, " process=%04x", req->process );
1353 fprintf( stderr, ", access=%08x", req->access );
1354 fprintf( stderr, ", suspend=%d", req->suspend );
1355 fprintf( stderr, ", request_fd=%d", req->request_fd );
1356 dump_varargs_object_attributes( ", objattr=", cur_size );
1359 static void dump_new_thread_reply( const struct new_thread_reply *req )
1361 fprintf( stderr, " tid=%04x", req->tid );
1362 fprintf( stderr, ", handle=%04x", req->handle );
1365 static void dump_get_startup_info_request( const struct get_startup_info_request *req )
1369 static void dump_get_startup_info_reply( const struct get_startup_info_reply *req )
1371 fprintf( stderr, " info_size=%u", req->info_size );
1372 dump_varargs_startup_info( ", info=", min(cur_size,req->info_size) );
1373 dump_varargs_unicode_str( ", env=", cur_size );
1376 static void dump_init_process_done_request( const struct init_process_done_request *req )
1378 fprintf( stderr, " gui=%d", req->gui );
1379 dump_uint64( ", module=", &req->module );
1380 dump_uint64( ", ldt_copy=", &req->ldt_copy );
1381 dump_uint64( ", entry=", &req->entry );
1384 static void dump_init_process_done_reply( const struct init_process_done_reply *req )
1386 fprintf( stderr, " suspend=%d", req->suspend );
1389 static void dump_init_thread_request( const struct init_thread_request *req )
1391 fprintf( stderr, " unix_pid=%d", req->unix_pid );
1392 fprintf( stderr, ", unix_tid=%d", req->unix_tid );
1393 fprintf( stderr, ", debug_level=%d", req->debug_level );
1394 dump_uint64( ", teb=", &req->teb );
1395 dump_uint64( ", entry=", &req->entry );
1396 fprintf( stderr, ", reply_fd=%d", req->reply_fd );
1397 fprintf( stderr, ", wait_fd=%d", req->wait_fd );
1398 dump_client_cpu( ", cpu=", &req->cpu );
1401 static void dump_init_thread_reply( const struct init_thread_reply *req )
1403 fprintf( stderr, " pid=%04x", req->pid );
1404 fprintf( stderr, ", tid=%04x", req->tid );
1405 dump_timeout( ", server_start=", &req->server_start );
1406 fprintf( stderr, ", info_size=%u", req->info_size );
1407 fprintf( stderr, ", version=%d", req->version );
1408 fprintf( stderr, ", all_cpus=%08x", req->all_cpus );
1409 fprintf( stderr, ", suspend=%d", req->suspend );
1412 static void dump_terminate_process_request( const struct terminate_process_request *req )
1414 fprintf( stderr, " handle=%04x", req->handle );
1415 fprintf( stderr, ", exit_code=%d", req->exit_code );
1418 static void dump_terminate_process_reply( const struct terminate_process_reply *req )
1420 fprintf( stderr, " self=%d", req->self );
1423 static void dump_terminate_thread_request( const struct terminate_thread_request *req )
1425 fprintf( stderr, " handle=%04x", req->handle );
1426 fprintf( stderr, ", exit_code=%d", req->exit_code );
1429 static void dump_terminate_thread_reply( const struct terminate_thread_reply *req )
1431 fprintf( stderr, " self=%d", req->self );
1434 static void dump_get_process_info_request( const struct get_process_info_request *req )
1436 fprintf( stderr, " handle=%04x", req->handle );
1439 static void dump_get_process_info_reply( const struct get_process_info_reply *req )
1441 fprintf( stderr, " pid=%04x", req->pid );
1442 fprintf( stderr, ", ppid=%04x", req->ppid );
1443 dump_uint64( ", affinity=", &req->affinity );
1444 dump_uint64( ", peb=", &req->peb );
1445 dump_timeout( ", start_time=", &req->start_time );
1446 dump_timeout( ", end_time=", &req->end_time );
1447 fprintf( stderr, ", exit_code=%d", req->exit_code );
1448 fprintf( stderr, ", priority=%d", req->priority );
1449 dump_client_cpu( ", cpu=", &req->cpu );
1450 fprintf( stderr, ", debugger_present=%d", req->debugger_present );
1451 fprintf( stderr, ", debug_children=%d", req->debug_children );
1452 dump_varargs_pe_image_info( ", image=", cur_size );
1455 static void dump_get_process_vm_counters_request( const struct get_process_vm_counters_request *req )
1457 fprintf( stderr, " handle=%04x", req->handle );
1460 static void dump_get_process_vm_counters_reply( const struct get_process_vm_counters_reply *req )
1462 dump_uint64( " peak_virtual_size=", &req->peak_virtual_size );
1463 dump_uint64( ", virtual_size=", &req->virtual_size );
1464 dump_uint64( ", peak_working_set_size=", &req->peak_working_set_size );
1465 dump_uint64( ", working_set_size=", &req->working_set_size );
1466 dump_uint64( ", pagefile_usage=", &req->pagefile_usage );
1467 dump_uint64( ", peak_pagefile_usage=", &req->peak_pagefile_usage );
1470 static void dump_set_process_info_request( const struct set_process_info_request *req )
1472 fprintf( stderr, " handle=%04x", req->handle );
1473 fprintf( stderr, ", mask=%d", req->mask );
1474 fprintf( stderr, ", priority=%d", req->priority );
1475 dump_uint64( ", affinity=", &req->affinity );
1478 static void dump_get_thread_info_request( const struct get_thread_info_request *req )
1480 fprintf( stderr, " handle=%04x", req->handle );
1481 fprintf( stderr, ", access=%08x", req->access );
1484 static void dump_get_thread_info_reply( const struct get_thread_info_reply *req )
1486 fprintf( stderr, " pid=%04x", req->pid );
1487 fprintf( stderr, ", tid=%04x", req->tid );
1488 dump_uint64( ", teb=", &req->teb );
1489 dump_uint64( ", entry_point=", &req->entry_point );
1490 dump_uint64( ", affinity=", &req->affinity );
1491 fprintf( stderr, ", exit_code=%d", req->exit_code );
1492 fprintf( stderr, ", priority=%d", req->priority );
1493 fprintf( stderr, ", last=%d", req->last );
1494 fprintf( stderr, ", suspend_count=%d", req->suspend_count );
1495 fprintf( stderr, ", dbg_hidden=%d", req->dbg_hidden );
1496 fprintf( stderr, ", desc_len=%u", req->desc_len );
1497 dump_varargs_unicode_str( ", desc=", cur_size );
1500 static void dump_get_thread_times_request( const struct get_thread_times_request *req )
1502 fprintf( stderr, " handle=%04x", req->handle );
1505 static void dump_get_thread_times_reply( const struct get_thread_times_reply *req )
1507 dump_timeout( " creation_time=", &req->creation_time );
1508 dump_timeout( ", exit_time=", &req->exit_time );
1509 fprintf( stderr, ", unix_pid=%d", req->unix_pid );
1510 fprintf( stderr, ", unix_tid=%d", req->unix_tid );
1513 static void dump_set_thread_info_request( const struct set_thread_info_request *req )
1515 fprintf( stderr, " handle=%04x", req->handle );
1516 fprintf( stderr, ", mask=%d", req->mask );
1517 fprintf( stderr, ", priority=%d", req->priority );
1518 dump_uint64( ", affinity=", &req->affinity );
1519 dump_uint64( ", entry_point=", &req->entry_point );
1520 fprintf( stderr, ", token=%04x", req->token );
1521 dump_varargs_unicode_str( ", desc=", cur_size );
1524 static void dump_get_dll_info_request( const struct get_dll_info_request *req )
1526 fprintf( stderr, " handle=%04x", req->handle );
1527 dump_uint64( ", base_address=", &req->base_address );
1530 static void dump_get_dll_info_reply( const struct get_dll_info_reply *req )
1532 dump_uint64( " entry_point=", &req->entry_point );
1533 fprintf( stderr, ", filename_len=%u", req->filename_len );
1534 dump_varargs_unicode_str( ", filename=", cur_size );
1537 static void dump_suspend_thread_request( const struct suspend_thread_request *req )
1539 fprintf( stderr, " handle=%04x", req->handle );
1542 static void dump_suspend_thread_reply( const struct suspend_thread_reply *req )
1544 fprintf( stderr, " count=%d", req->count );
1547 static void dump_resume_thread_request( const struct resume_thread_request *req )
1549 fprintf( stderr, " handle=%04x", req->handle );
1552 static void dump_resume_thread_reply( const struct resume_thread_reply *req )
1554 fprintf( stderr, " count=%d", req->count );
1557 static void dump_load_dll_request( const struct load_dll_request *req )
1559 fprintf( stderr, " dbg_offset=%u", req->dbg_offset );
1560 dump_uint64( ", base=", &req->base );
1561 dump_uint64( ", name=", &req->name );
1562 fprintf( stderr, ", dbg_size=%u", req->dbg_size );
1563 dump_varargs_unicode_str( ", filename=", cur_size );
1566 static void dump_unload_dll_request( const struct unload_dll_request *req )
1568 dump_uint64( " base=", &req->base );
1571 static void dump_queue_apc_request( const struct queue_apc_request *req )
1573 fprintf( stderr, " handle=%04x", req->handle );
1574 dump_apc_call( ", call=", &req->call );
1577 static void dump_queue_apc_reply( const struct queue_apc_reply *req )
1579 fprintf( stderr, " handle=%04x", req->handle );
1580 fprintf( stderr, ", self=%d", req->self );
1583 static void dump_get_apc_result_request( const struct get_apc_result_request *req )
1585 fprintf( stderr, " handle=%04x", req->handle );
1588 static void dump_get_apc_result_reply( const struct get_apc_result_reply *req )
1590 dump_apc_result( " result=", &req->result );
1593 static void dump_close_handle_request( const struct close_handle_request *req )
1595 fprintf( stderr, " handle=%04x", req->handle );
1598 static void dump_set_handle_info_request( const struct set_handle_info_request *req )
1600 fprintf( stderr, " handle=%04x", req->handle );
1601 fprintf( stderr, ", flags=%d", req->flags );
1602 fprintf( stderr, ", mask=%d", req->mask );
1605 static void dump_set_handle_info_reply( const struct set_handle_info_reply *req )
1607 fprintf( stderr, " old_flags=%d", req->old_flags );
1610 static void dump_dup_handle_request( const struct dup_handle_request *req )
1612 fprintf( stderr, " src_process=%04x", req->src_process );
1613 fprintf( stderr, ", src_handle=%04x", req->src_handle );
1614 fprintf( stderr, ", dst_process=%04x", req->dst_process );
1615 fprintf( stderr, ", access=%08x", req->access );
1616 fprintf( stderr, ", attributes=%08x", req->attributes );
1617 fprintf( stderr, ", options=%08x", req->options );
1620 static void dump_dup_handle_reply( const struct dup_handle_reply *req )
1622 fprintf( stderr, " handle=%04x", req->handle );
1623 fprintf( stderr, ", self=%d", req->self );
1624 fprintf( stderr, ", closed=%d", req->closed );
1627 static void dump_make_temporary_request( const struct make_temporary_request *req )
1629 fprintf( stderr, " handle=%04x", req->handle );
1632 static void dump_open_process_request( const struct open_process_request *req )
1634 fprintf( stderr, " pid=%04x", req->pid );
1635 fprintf( stderr, ", access=%08x", req->access );
1636 fprintf( stderr, ", attributes=%08x", req->attributes );
1639 static void dump_open_process_reply( const struct open_process_reply *req )
1641 fprintf( stderr, " handle=%04x", req->handle );
1644 static void dump_open_thread_request( const struct open_thread_request *req )
1646 fprintf( stderr, " tid=%04x", req->tid );
1647 fprintf( stderr, ", access=%08x", req->access );
1648 fprintf( stderr, ", attributes=%08x", req->attributes );
1651 static void dump_open_thread_reply( const struct open_thread_reply *req )
1653 fprintf( stderr, " handle=%04x", req->handle );
1656 static void dump_select_request( const struct select_request *req )
1658 fprintf( stderr, " flags=%d", req->flags );
1659 dump_uint64( ", cookie=", &req->cookie );
1660 dump_abstime( ", timeout=", &req->timeout );
1661 fprintf( stderr, ", size=%u", req->size );
1662 fprintf( stderr, ", prev_apc=%04x", req->prev_apc );
1663 dump_varargs_apc_result( ", result=", cur_size );
1664 dump_varargs_select_op( ", data=", min(cur_size,req->size) );
1665 dump_varargs_context( ", context=", cur_size );
1668 static void dump_select_reply( const struct select_reply *req )
1670 dump_apc_call( " call=", &req->call );
1671 fprintf( stderr, ", apc_handle=%04x", req->apc_handle );
1672 dump_varargs_context( ", context=", cur_size );
1675 static void dump_create_event_request( const struct create_event_request *req )
1677 fprintf( stderr, " access=%08x", req->access );
1678 fprintf( stderr, ", manual_reset=%d", req->manual_reset );
1679 fprintf( stderr, ", initial_state=%d", req->initial_state );
1680 dump_varargs_object_attributes( ", objattr=", cur_size );
1683 static void dump_create_event_reply( const struct create_event_reply *req )
1685 fprintf( stderr, " handle=%04x", req->handle );
1688 static void dump_event_op_request( const struct event_op_request *req )
1690 fprintf( stderr, " handle=%04x", req->handle );
1691 fprintf( stderr, ", op=%d", req->op );
1694 static void dump_event_op_reply( const struct event_op_reply *req )
1696 fprintf( stderr, " state=%d", req->state );
1699 static void dump_query_event_request( const struct query_event_request *req )
1701 fprintf( stderr, " handle=%04x", req->handle );
1704 static void dump_query_event_reply( const struct query_event_reply *req )
1706 fprintf( stderr, " manual_reset=%d", req->manual_reset );
1707 fprintf( stderr, ", state=%d", req->state );
1710 static void dump_open_event_request( const struct open_event_request *req )
1712 fprintf( stderr, " access=%08x", req->access );
1713 fprintf( stderr, ", attributes=%08x", req->attributes );
1714 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1715 dump_varargs_unicode_str( ", name=", cur_size );
1718 static void dump_open_event_reply( const struct open_event_reply *req )
1720 fprintf( stderr, " handle=%04x", req->handle );
1723 static void dump_create_keyed_event_request( const struct create_keyed_event_request *req )
1725 fprintf( stderr, " access=%08x", req->access );
1726 dump_varargs_object_attributes( ", objattr=", cur_size );
1729 static void dump_create_keyed_event_reply( const struct create_keyed_event_reply *req )
1731 fprintf( stderr, " handle=%04x", req->handle );
1734 static void dump_open_keyed_event_request( const struct open_keyed_event_request *req )
1736 fprintf( stderr, " access=%08x", req->access );
1737 fprintf( stderr, ", attributes=%08x", req->attributes );
1738 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1739 dump_varargs_unicode_str( ", name=", cur_size );
1742 static void dump_open_keyed_event_reply( const struct open_keyed_event_reply *req )
1744 fprintf( stderr, " handle=%04x", req->handle );
1747 static void dump_create_mutex_request( const struct create_mutex_request *req )
1749 fprintf( stderr, " access=%08x", req->access );
1750 fprintf( stderr, ", owned=%d", req->owned );
1751 dump_varargs_object_attributes( ", objattr=", cur_size );
1754 static void dump_create_mutex_reply( const struct create_mutex_reply *req )
1756 fprintf( stderr, " handle=%04x", req->handle );
1759 static void dump_release_mutex_request( const struct release_mutex_request *req )
1761 fprintf( stderr, " handle=%04x", req->handle );
1764 static void dump_release_mutex_reply( const struct release_mutex_reply *req )
1766 fprintf( stderr, " prev_count=%08x", req->prev_count );
1769 static void dump_open_mutex_request( const struct open_mutex_request *req )
1771 fprintf( stderr, " access=%08x", req->access );
1772 fprintf( stderr, ", attributes=%08x", req->attributes );
1773 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1774 dump_varargs_unicode_str( ", name=", cur_size );
1777 static void dump_open_mutex_reply( const struct open_mutex_reply *req )
1779 fprintf( stderr, " handle=%04x", req->handle );
1782 static void dump_query_mutex_request( const struct query_mutex_request *req )
1784 fprintf( stderr, " handle=%04x", req->handle );
1787 static void dump_query_mutex_reply( const struct query_mutex_reply *req )
1789 fprintf( stderr, " count=%08x", req->count );
1790 fprintf( stderr, ", owned=%d", req->owned );
1791 fprintf( stderr, ", abandoned=%d", req->abandoned );
1794 static void dump_create_semaphore_request( const struct create_semaphore_request *req )
1796 fprintf( stderr, " access=%08x", req->access );
1797 fprintf( stderr, ", initial=%08x", req->initial );
1798 fprintf( stderr, ", max=%08x", req->max );
1799 dump_varargs_object_attributes( ", objattr=", cur_size );
1802 static void dump_create_semaphore_reply( const struct create_semaphore_reply *req )
1804 fprintf( stderr, " handle=%04x", req->handle );
1807 static void dump_release_semaphore_request( const struct release_semaphore_request *req )
1809 fprintf( stderr, " handle=%04x", req->handle );
1810 fprintf( stderr, ", count=%08x", req->count );
1813 static void dump_release_semaphore_reply( const struct release_semaphore_reply *req )
1815 fprintf( stderr, " prev_count=%08x", req->prev_count );
1818 static void dump_query_semaphore_request( const struct query_semaphore_request *req )
1820 fprintf( stderr, " handle=%04x", req->handle );
1823 static void dump_query_semaphore_reply( const struct query_semaphore_reply *req )
1825 fprintf( stderr, " current=%08x", req->current );
1826 fprintf( stderr, ", max=%08x", req->max );
1829 static void dump_open_semaphore_request( const struct open_semaphore_request *req )
1831 fprintf( stderr, " access=%08x", req->access );
1832 fprintf( stderr, ", attributes=%08x", req->attributes );
1833 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1834 dump_varargs_unicode_str( ", name=", cur_size );
1837 static void dump_open_semaphore_reply( const struct open_semaphore_reply *req )
1839 fprintf( stderr, " handle=%04x", req->handle );
1842 static void dump_create_file_request( const struct create_file_request *req )
1844 fprintf( stderr, " access=%08x", req->access );
1845 fprintf( stderr, ", sharing=%08x", req->sharing );
1846 fprintf( stderr, ", create=%d", req->create );
1847 fprintf( stderr, ", options=%08x", req->options );
1848 fprintf( stderr, ", attrs=%08x", req->attrs );
1849 dump_varargs_object_attributes( ", objattr=", cur_size );
1850 dump_varargs_string( ", filename=", cur_size );
1853 static void dump_create_file_reply( const struct create_file_reply *req )
1855 fprintf( stderr, " handle=%04x", req->handle );
1858 static void dump_open_file_object_request( const struct open_file_object_request *req )
1860 fprintf( stderr, " access=%08x", req->access );
1861 fprintf( stderr, ", attributes=%08x", req->attributes );
1862 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1863 fprintf( stderr, ", sharing=%08x", req->sharing );
1864 fprintf( stderr, ", options=%08x", req->options );
1865 dump_varargs_unicode_str( ", filename=", cur_size );
1868 static void dump_open_file_object_reply( const struct open_file_object_reply *req )
1870 fprintf( stderr, " handle=%04x", req->handle );
1873 static void dump_alloc_file_handle_request( const struct alloc_file_handle_request *req )
1875 fprintf( stderr, " access=%08x", req->access );
1876 fprintf( stderr, ", attributes=%08x", req->attributes );
1877 fprintf( stderr, ", fd=%d", req->fd );
1880 static void dump_alloc_file_handle_reply( const struct alloc_file_handle_reply *req )
1882 fprintf( stderr, " handle=%04x", req->handle );
1885 static void dump_get_handle_unix_name_request( const struct get_handle_unix_name_request *req )
1887 fprintf( stderr, " handle=%04x", req->handle );
1890 static void dump_get_handle_unix_name_reply( const struct get_handle_unix_name_reply *req )
1892 fprintf( stderr, " name_len=%u", req->name_len );
1893 dump_varargs_string( ", name=", cur_size );
1896 static void dump_get_handle_fd_request( const struct get_handle_fd_request *req )
1898 fprintf( stderr, " handle=%04x", req->handle );
1901 static void dump_get_handle_fd_reply( const struct get_handle_fd_reply *req )
1903 fprintf( stderr, " type=%d", req->type );
1904 fprintf( stderr, ", cacheable=%d", req->cacheable );
1905 fprintf( stderr, ", access=%08x", req->access );
1906 fprintf( stderr, ", options=%08x", req->options );
1909 static void dump_get_directory_cache_entry_request( const struct get_directory_cache_entry_request *req )
1911 fprintf( stderr, " handle=%04x", req->handle );
1914 static void dump_get_directory_cache_entry_reply( const struct get_directory_cache_entry_reply *req )
1916 fprintf( stderr, " entry=%d", req->entry );
1917 dump_varargs_ints( ", free=", cur_size );
1920 static void dump_flush_request( const struct flush_request *req )
1922 dump_async_data( " async=", &req->async );
1925 static void dump_flush_reply( const struct flush_reply *req )
1927 fprintf( stderr, " event=%04x", req->event );
1930 static void dump_get_file_info_request( const struct get_file_info_request *req )
1932 fprintf( stderr, " handle=%04x", req->handle );
1933 fprintf( stderr, ", info_class=%08x", req->info_class );
1936 static void dump_get_file_info_reply( const struct get_file_info_reply *req )
1938 dump_varargs_bytes( " data=", cur_size );
1941 static void dump_get_volume_info_request( const struct get_volume_info_request *req )
1943 fprintf( stderr, " handle=%04x", req->handle );
1944 fprintf( stderr, ", info_class=%08x", req->info_class );
1947 static void dump_get_volume_info_reply( const struct get_volume_info_reply *req )
1949 dump_varargs_bytes( " data=", cur_size );
1952 static void dump_lock_file_request( const struct lock_file_request *req )
1954 fprintf( stderr, " handle=%04x", req->handle );
1955 dump_uint64( ", offset=", &req->offset );
1956 dump_uint64( ", count=", &req->count );
1957 fprintf( stderr, ", shared=%d", req->shared );
1958 fprintf( stderr, ", wait=%d", req->wait );
1961 static void dump_lock_file_reply( const struct lock_file_reply *req )
1963 fprintf( stderr, " handle=%04x", req->handle );
1964 fprintf( stderr, ", overlapped=%d", req->overlapped );
1967 static void dump_unlock_file_request( const struct unlock_file_request *req )
1969 fprintf( stderr, " handle=%04x", req->handle );
1970 dump_uint64( ", offset=", &req->offset );
1971 dump_uint64( ", count=", &req->count );
1974 static void dump_set_socket_event_request( const struct set_socket_event_request *req )
1976 fprintf( stderr, " handle=%04x", req->handle );
1977 fprintf( stderr, ", mask=%08x", req->mask );
1978 fprintf( stderr, ", event=%04x", req->event );
1979 fprintf( stderr, ", window=%08x", req->window );
1980 fprintf( stderr, ", msg=%08x", req->msg );
1983 static void dump_get_socket_event_request( const struct get_socket_event_request *req )
1985 fprintf( stderr, " handle=%04x", req->handle );
1986 fprintf( stderr, ", service=%d", req->service );
1987 fprintf( stderr, ", c_event=%04x", req->c_event );
1990 static void dump_get_socket_event_reply( const struct get_socket_event_reply *req )
1992 fprintf( stderr, " mask=%08x", req->mask );
1993 fprintf( stderr, ", pmask=%08x", req->pmask );
1994 fprintf( stderr, ", state=%08x", req->state );
1995 dump_varargs_ints( ", errors=", cur_size );
1998 static void dump_get_socket_info_request( const struct get_socket_info_request *req )
2000 fprintf( stderr, " handle=%04x", req->handle );
2003 static void dump_get_socket_info_reply( const struct get_socket_info_reply *req )
2005 fprintf( stderr, " family=%d", req->family );
2006 fprintf( stderr, ", type=%d", req->type );
2007 fprintf( stderr, ", protocol=%d", req->protocol );
2010 static void dump_enable_socket_event_request( const struct enable_socket_event_request *req )
2012 fprintf( stderr, " handle=%04x", req->handle );
2013 fprintf( stderr, ", mask=%08x", req->mask );
2014 fprintf( stderr, ", sstate=%08x", req->sstate );
2015 fprintf( stderr, ", cstate=%08x", req->cstate );
2018 static void dump_set_socket_deferred_request( const struct set_socket_deferred_request *req )
2020 fprintf( stderr, " handle=%04x", req->handle );
2021 fprintf( stderr, ", deferred=%04x", req->deferred );
2024 static void dump_get_next_console_request_request( const struct get_next_console_request_request *req )
2026 fprintf( stderr, " handle=%04x", req->handle );
2027 fprintf( stderr, ", signal=%d", req->signal );
2028 fprintf( stderr, ", read=%d", req->read );
2029 fprintf( stderr, ", status=%08x", req->status );
2030 dump_varargs_bytes( ", out_data=", cur_size );
2033 static void dump_get_next_console_request_reply( const struct get_next_console_request_reply *req )
2035 fprintf( stderr, " code=%08x", req->code );
2036 fprintf( stderr, ", output=%08x", req->output );
2037 fprintf( stderr, ", out_size=%u", req->out_size );
2038 dump_varargs_bytes( ", in_data=", cur_size );
2041 static void dump_read_directory_changes_request( const struct read_directory_changes_request *req )
2043 fprintf( stderr, " filter=%08x", req->filter );
2044 fprintf( stderr, ", subtree=%d", req->subtree );
2045 fprintf( stderr, ", want_data=%d", req->want_data );
2046 dump_async_data( ", async=", &req->async );
2049 static void dump_read_change_request( const struct read_change_request *req )
2051 fprintf( stderr, " handle=%04x", req->handle );
2054 static void dump_read_change_reply( const struct read_change_reply *req )
2056 dump_varargs_filesystem_event( " events=", cur_size );
2059 static void dump_create_mapping_request( const struct create_mapping_request *req )
2061 fprintf( stderr, " access=%08x", req->access );
2062 fprintf( stderr, ", flags=%08x", req->flags );
2063 fprintf( stderr, ", file_access=%08x", req->file_access );
2064 dump_uint64( ", size=", &req->size );
2065 fprintf( stderr, ", file_handle=%04x", req->file_handle );
2066 dump_varargs_object_attributes( ", objattr=", cur_size );
2069 static void dump_create_mapping_reply( const struct create_mapping_reply *req )
2071 fprintf( stderr, " handle=%04x", req->handle );
2074 static void dump_open_mapping_request( const struct open_mapping_request *req )
2076 fprintf( stderr, " access=%08x", req->access );
2077 fprintf( stderr, ", attributes=%08x", req->attributes );
2078 fprintf( stderr, ", rootdir=%04x", req->rootdir );
2079 dump_varargs_unicode_str( ", name=", cur_size );
2082 static void dump_open_mapping_reply( const struct open_mapping_reply *req )
2084 fprintf( stderr, " handle=%04x", req->handle );
2087 static void dump_get_mapping_info_request( const struct get_mapping_info_request *req )
2089 fprintf( stderr, " handle=%04x", req->handle );
2090 fprintf( stderr, ", access=%08x", req->access );
2093 static void dump_get_mapping_info_reply( const struct get_mapping_info_reply *req )
2095 dump_uint64( " size=", &req->size );
2096 fprintf( stderr, ", flags=%08x", req->flags );
2097 fprintf( stderr, ", shared_file=%04x", req->shared_file );
2098 dump_varargs_pe_image_info( ", image=", cur_size );
2101 static void dump_map_view_request( const struct map_view_request *req )
2103 fprintf( stderr, " mapping=%04x", req->mapping );
2104 fprintf( stderr, ", access=%08x", req->access );
2105 dump_uint64( ", base=", &req->base );
2106 dump_uint64( ", size=", &req->size );
2107 dump_uint64( ", start=", &req->start );
2110 static void dump_unmap_view_request( const struct unmap_view_request *req )
2112 dump_uint64( " base=", &req->base );
2115 static void dump_get_mapping_committed_range_request( const struct get_mapping_committed_range_request *req )
2117 dump_uint64( " base=", &req->base );
2118 dump_uint64( ", offset=", &req->offset );
2121 static void dump_get_mapping_committed_range_reply( const struct get_mapping_committed_range_reply *req )
2123 dump_uint64( " size=", &req->size );
2124 fprintf( stderr, ", committed=%d", req->committed );
2127 static void dump_add_mapping_committed_range_request( const struct add_mapping_committed_range_request *req )
2129 dump_uint64( " base=", &req->base );
2130 dump_uint64( ", offset=", &req->offset );
2131 dump_uint64( ", size=", &req->size );
2134 static void dump_is_same_mapping_request( const struct is_same_mapping_request *req )
2136 dump_uint64( " base1=", &req->base1 );
2137 dump_uint64( ", base2=", &req->base2 );
2140 static void dump_list_processes_request( const struct list_processes_request *req )
2144 static void dump_list_processes_reply( const struct list_processes_reply *req )
2146 fprintf( stderr, " info_size=%u", req->info_size );
2147 fprintf( stderr, ", process_count=%d", req->process_count );
2148 dump_varargs_process_info( ", data=", min(cur_size,req->info_size) );
2151 static void dump_wait_debug_event_request( const struct wait_debug_event_request *req )
2153 fprintf( stderr, " get_handle=%d", req->get_handle );
2156 static void dump_wait_debug_event_reply( const struct wait_debug_event_reply *req )
2158 fprintf( stderr, " pid=%04x", req->pid );
2159 fprintf( stderr, ", tid=%04x", req->tid );
2160 fprintf( stderr, ", wait=%04x", req->wait );
2161 dump_varargs_debug_event( ", event=", cur_size );
2164 static void dump_queue_exception_event_request( const struct queue_exception_event_request *req )
2166 fprintf( stderr, " first=%d", req->first );
2167 fprintf( stderr, ", code=%08x", req->code );
2168 fprintf( stderr, ", flags=%08x", req->flags );
2169 dump_uint64( ", record=", &req->record );
2170 dump_uint64( ", address=", &req->address );
2171 fprintf( stderr, ", len=%u", req->len );
2172 dump_varargs_uints64( ", params=", min(cur_size,req->len) );
2175 static void dump_queue_exception_event_reply( const struct queue_exception_event_reply *req )
2177 fprintf( stderr, " handle=%04x", req->handle );
2180 static void dump_get_exception_status_request( const struct get_exception_status_request *req )
2182 fprintf( stderr, " handle=%04x", req->handle );
2185 static void dump_continue_debug_event_request( const struct continue_debug_event_request *req )
2187 fprintf( stderr, " pid=%04x", req->pid );
2188 fprintf( stderr, ", tid=%04x", req->tid );
2189 fprintf( stderr, ", status=%d", req->status );
2192 static void dump_debug_process_request( const struct debug_process_request *req )
2194 fprintf( stderr, " pid=%04x", req->pid );
2195 fprintf( stderr, ", attach=%d", req->attach );
2198 static void dump_set_debugger_kill_on_exit_request( const struct set_debugger_kill_on_exit_request *req )
2200 fprintf( stderr, " kill_on_exit=%d", req->kill_on_exit );
2203 static void dump_read_process_memory_request( const struct read_process_memory_request *req )
2205 fprintf( stderr, " handle=%04x", req->handle );
2206 dump_uint64( ", addr=", &req->addr );
2209 static void dump_read_process_memory_reply( const struct read_process_memory_reply *req )
2211 dump_varargs_bytes( " data=", cur_size );
2214 static void dump_write_process_memory_request( const struct write_process_memory_request *req )
2216 fprintf( stderr, " handle=%04x", req->handle );
2217 dump_uint64( ", addr=", &req->addr );
2218 dump_varargs_bytes( ", data=", cur_size );
2221 static void dump_create_key_request( const struct create_key_request *req )
2223 fprintf( stderr, " access=%08x", req->access );
2224 fprintf( stderr, ", options=%08x", req->options );
2225 dump_varargs_object_attributes( ", objattr=", cur_size );
2226 dump_varargs_unicode_str( ", class=", cur_size );
2229 static void dump_create_key_reply( const struct create_key_reply *req )
2231 fprintf( stderr, " hkey=%04x", req->hkey );
2232 fprintf( stderr, ", created=%d", req->created );
2235 static void dump_open_key_request( const struct open_key_request *req )
2237 fprintf( stderr, " parent=%04x", req->parent );
2238 fprintf( stderr, ", access=%08x", req->access );
2239 fprintf( stderr, ", attributes=%08x", req->attributes );
2240 dump_varargs_unicode_str( ", name=", cur_size );
2243 static void dump_open_key_reply( const struct open_key_reply *req )
2245 fprintf( stderr, " hkey=%04x", req->hkey );
2248 static void dump_delete_key_request( const struct delete_key_request *req )
2250 fprintf( stderr, " hkey=%04x", req->hkey );
2253 static void dump_flush_key_request( const struct flush_key_request *req )
2255 fprintf( stderr, " hkey=%04x", req->hkey );
2258 static void dump_enum_key_request( const struct enum_key_request *req )
2260 fprintf( stderr, " hkey=%04x", req->hkey );
2261 fprintf( stderr, ", index=%d", req->index );
2262 fprintf( stderr, ", info_class=%d", req->info_class );
2265 static void dump_enum_key_reply( const struct enum_key_reply *req )
2267 fprintf( stderr, " subkeys=%d", req->subkeys );
2268 fprintf( stderr, ", max_subkey=%d", req->max_subkey );
2269 fprintf( stderr, ", max_class=%d", req->max_class );
2270 fprintf( stderr, ", values=%d", req->values );
2271 fprintf( stderr, ", max_value=%d", req->max_value );
2272 fprintf( stderr, ", max_data=%d", req->max_data );
2273 dump_timeout( ", modif=", &req->modif );
2274 fprintf( stderr, ", total=%u", req->total );
2275 fprintf( stderr, ", namelen=%u", req->namelen );
2276 dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
2277 dump_varargs_unicode_str( ", class=", cur_size );
2280 static void dump_set_key_value_request( const struct set_key_value_request *req )
2282 fprintf( stderr, " hkey=%04x", req->hkey );
2283 fprintf( stderr, ", type=%d", req->type );
2284 fprintf( stderr, ", namelen=%u", req->namelen );
2285 dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
2286 dump_varargs_bytes( ", data=", cur_size );
2289 static void dump_get_key_value_request( const struct get_key_value_request *req )
2291 fprintf( stderr, " hkey=%04x", req->hkey );
2292 dump_varargs_unicode_str( ", name=", cur_size );
2295 static void dump_get_key_value_reply( const struct get_key_value_reply *req )
2297 fprintf( stderr, " type=%d", req->type );
2298 fprintf( stderr, ", total=%u", req->total );
2299 dump_varargs_bytes( ", data=", cur_size );
2302 static void dump_enum_key_value_request( const struct enum_key_value_request *req )
2304 fprintf( stderr, " hkey=%04x", req->hkey );
2305 fprintf( stderr, ", index=%d", req->index );
2306 fprintf( stderr, ", info_class=%d", req->info_class );
2309 static void dump_enum_key_value_reply( const struct enum_key_value_reply *req )
2311 fprintf( stderr, " type=%d", req->type );
2312 fprintf( stderr, ", total=%u", req->total );
2313 fprintf( stderr, ", namelen=%u", req->namelen );
2314 dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
2315 dump_varargs_bytes( ", data=", cur_size );
2318 static void dump_delete_key_value_request( const struct delete_key_value_request *req )
2320 fprintf( stderr, " hkey=%04x", req->hkey );
2321 dump_varargs_unicode_str( ", name=", cur_size );
2324 static void dump_load_registry_request( const struct load_registry_request *req )
2326 fprintf( stderr, " file=%04x", req->file );
2327 dump_varargs_object_attributes( ", objattr=", cur_size );
2330 static void dump_unload_registry_request( const struct unload_registry_request *req )
2332 fprintf( stderr, " hkey=%04x", req->hkey );
2335 static void dump_save_registry_request( const struct save_registry_request *req )
2337 fprintf( stderr, " hkey=%04x", req->hkey );
2338 fprintf( stderr, ", file=%04x", req->file );
2341 static void dump_set_registry_notification_request( const struct set_registry_notification_request *req )
2343 fprintf( stderr, " hkey=%04x", req->hkey );
2344 fprintf( stderr, ", event=%04x", req->event );
2345 fprintf( stderr, ", subtree=%d", req->subtree );
2346 fprintf( stderr, ", filter=%08x", req->filter );
2349 static void dump_create_timer_request( const struct create_timer_request *req )
2351 fprintf( stderr, " access=%08x", req->access );
2352 fprintf( stderr, ", manual=%d", req->manual );
2353 dump_varargs_object_attributes( ", objattr=", cur_size );
2356 static void dump_create_timer_reply( const struct create_timer_reply *req )
2358 fprintf( stderr, " handle=%04x", req->handle );
2361 static void dump_open_timer_request( const struct open_timer_request *req )
2363 fprintf( stderr, " access=%08x", req->access );
2364 fprintf( stderr, ", attributes=%08x", req->attributes );
2365 fprintf( stderr, ", rootdir=%04x", req->rootdir );
2366 dump_varargs_unicode_str( ", name=", cur_size );
2369 static void dump_open_timer_reply( const struct open_timer_reply *req )
2371 fprintf( stderr, " handle=%04x", req->handle );
2374 static void dump_set_timer_request( const struct set_timer_request *req )
2376 fprintf( stderr, " handle=%04x", req->handle );
2377 dump_timeout( ", expire=", &req->expire );
2378 dump_uint64( ", callback=", &req->callback );
2379 dump_uint64( ", arg=", &req->arg );
2380 fprintf( stderr, ", period=%d", req->period );
2383 static void dump_set_timer_reply( const struct set_timer_reply *req )
2385 fprintf( stderr, " signaled=%d", req->signaled );
2388 static void dump_cancel_timer_request( const struct cancel_timer_request *req )
2390 fprintf( stderr, " handle=%04x", req->handle );
2393 static void dump_cancel_timer_reply( const struct cancel_timer_reply *req )
2395 fprintf( stderr, " signaled=%d", req->signaled );
2398 static void dump_get_timer_info_request( const struct get_timer_info_request *req )
2400 fprintf( stderr, " handle=%04x", req->handle );
2403 static void dump_get_timer_info_reply( const struct get_timer_info_reply *req )
2405 dump_timeout( " when=", &req->when );
2406 fprintf( stderr, ", signaled=%d", req->signaled );
2409 static void dump_get_thread_context_request( const struct get_thread_context_request *req )
2411 fprintf( stderr, " handle=%04x", req->handle );
2412 fprintf( stderr, ", flags=%08x", req->flags );
2415 static void dump_get_thread_context_reply( const struct get_thread_context_reply *req )
2417 fprintf( stderr, " self=%d", req->self );
2418 fprintf( stderr, ", handle=%04x", req->handle );
2419 dump_varargs_context( ", context=", cur_size );
2422 static void dump_set_thread_context_request( const struct set_thread_context_request *req )
2424 fprintf( stderr, " handle=%04x", req->handle );
2425 dump_varargs_context( ", context=", cur_size );
2428 static void dump_set_thread_context_reply( const struct set_thread_context_reply *req )
2430 fprintf( stderr, " self=%d", req->self );
2433 static void dump_get_selector_entry_request( const struct get_selector_entry_request *req )
2435 fprintf( stderr, " handle=%04x", req->handle );
2436 fprintf( stderr, ", entry=%d", req->entry );
2439 static void dump_get_selector_entry_reply( const struct get_selector_entry_reply *req )
2441 fprintf( stderr, " base=%08x", req->base );
2442 fprintf( stderr, ", limit=%08x", req->limit );
2443 fprintf( stderr, ", flags=%02x", req->flags );
2446 static void dump_add_atom_request( const struct add_atom_request *req )
2448 fprintf( stderr, " table=%04x", req->table );
2449 dump_varargs_unicode_str( ", name=", cur_size );
2452 static void dump_add_atom_reply( const struct add_atom_reply *req )
2454 fprintf( stderr, " atom=%04x", req->atom );
2457 static void dump_delete_atom_request( const struct delete_atom_request *req )
2459 fprintf( stderr, " table=%04x", req->table );
2460 fprintf( stderr, ", atom=%04x", req->atom );
2463 static void dump_find_atom_request( const struct find_atom_request *req )
2465 fprintf( stderr, " table=%04x", req->table );
2466 dump_varargs_unicode_str( ", name=", cur_size );
2469 static void dump_find_atom_reply( const struct find_atom_reply *req )
2471 fprintf( stderr, " atom=%04x", req->atom );
2474 static void dump_get_atom_information_request( const struct get_atom_information_request *req )
2476 fprintf( stderr, " table=%04x", req->table );
2477 fprintf( stderr, ", atom=%04x", req->atom );
2480 static void dump_get_atom_information_reply( const struct get_atom_information_reply *req )
2482 fprintf( stderr, " count=%d", req->count );
2483 fprintf( stderr, ", pinned=%d", req->pinned );
2484 fprintf( stderr, ", total=%u", req->total );
2485 dump_varargs_unicode_str( ", name=", cur_size );
2488 static void dump_set_atom_information_request( const struct set_atom_information_request *req )
2490 fprintf( stderr, " table=%04x", req->table );
2491 fprintf( stderr, ", atom=%04x", req->atom );
2492 fprintf( stderr, ", pinned=%d", req->pinned );
2495 static void dump_empty_atom_table_request( const struct empty_atom_table_request *req )
2497 fprintf( stderr, " table=%04x", req->table );
2498 fprintf( stderr, ", if_pinned=%d", req->if_pinned );
2501 static void dump_init_atom_table_request( const struct init_atom_table_request *req )
2503 fprintf( stderr, " entries=%d", req->entries );
2506 static void dump_init_atom_table_reply( const struct init_atom_table_reply *req )
2508 fprintf( stderr, " table=%04x", req->table );
2511 static void dump_get_msg_queue_request( const struct get_msg_queue_request *req )
2515 static void dump_get_msg_queue_reply( const struct get_msg_queue_reply *req )
2517 fprintf( stderr, " handle=%04x", req->handle );
2520 static void dump_set_queue_fd_request( const struct set_queue_fd_request *req )
2522 fprintf( stderr, " handle=%04x", req->handle );
2525 static void dump_set_queue_mask_request( const struct set_queue_mask_request *req )
2527 fprintf( stderr, " wake_mask=%08x", req->wake_mask );
2528 fprintf( stderr, ", changed_mask=%08x", req->changed_mask );
2529 fprintf( stderr, ", skip_wait=%d", req->skip_wait );
2532 static void dump_set_queue_mask_reply( const struct set_queue_mask_reply *req )
2534 fprintf( stderr, " wake_bits=%08x", req->wake_bits );
2535 fprintf( stderr, ", changed_bits=%08x", req->changed_bits );
2538 static void dump_get_queue_status_request( const struct get_queue_status_request *req )
2540 fprintf( stderr, " clear_bits=%08x", req->clear_bits );
2543 static void dump_get_queue_status_reply( const struct get_queue_status_reply *req )
2545 fprintf( stderr, " wake_bits=%08x", req->wake_bits );
2546 fprintf( stderr, ", changed_bits=%08x", req->changed_bits );
2549 static void dump_get_process_idle_event_request( const struct get_process_idle_event_request *req )
2551 fprintf( stderr, " handle=%04x", req->handle );
2554 static void dump_get_process_idle_event_reply( const struct get_process_idle_event_reply *req )
2556 fprintf( stderr, " event=%04x", req->event );
2559 static void dump_send_message_request( const struct send_message_request *req )
2561 fprintf( stderr, " id=%04x", req->id );
2562 fprintf( stderr, ", type=%d", req->type );
2563 fprintf( stderr, ", flags=%d", req->flags );
2564 fprintf( stderr, ", win=%08x", req->win );
2565 fprintf( stderr, ", msg=%08x", req->msg );
2566 dump_uint64( ", wparam=", &req->wparam );
2567 dump_uint64( ", lparam=", &req->lparam );
2568 dump_timeout( ", timeout=", &req->timeout );
2569 dump_varargs_message_data( ", data=", cur_size );
2572 static void dump_post_quit_message_request( const struct post_quit_message_request *req )
2574 fprintf( stderr, " exit_code=%d", req->exit_code );
2577 static void dump_send_hardware_message_request( const struct send_hardware_message_request *req )
2579 fprintf( stderr, " win=%08x", req->win );
2580 dump_hw_input( ", input=", &req->input );
2581 fprintf( stderr, ", flags=%08x", req->flags );
2584 static void dump_send_hardware_message_reply( const struct send_hardware_message_reply *req )
2586 fprintf( stderr, " wait=%d", req->wait );
2587 fprintf( stderr, ", prev_x=%d", req->prev_x );
2588 fprintf( stderr, ", prev_y=%d", req->prev_y );
2589 fprintf( stderr, ", new_x=%d", req->new_x );
2590 fprintf( stderr, ", new_y=%d", req->new_y );
2591 dump_varargs_bytes( ", keystate=", cur_size );
2594 static void dump_get_message_request( const struct get_message_request *req )
2596 fprintf( stderr, " flags=%08x", req->flags );
2597 fprintf( stderr, ", get_win=%08x", req->get_win );
2598 fprintf( stderr, ", get_first=%08x", req->get_first );
2599 fprintf( stderr, ", get_last=%08x", req->get_last );
2600 fprintf( stderr, ", hw_id=%08x", req->hw_id );
2601 fprintf( stderr, ", wake_mask=%08x", req->wake_mask );
2602 fprintf( stderr, ", changed_mask=%08x", req->changed_mask );
2605 static void dump_get_message_reply( const struct get_message_reply *req )
2607 fprintf( stderr, " win=%08x", req->win );
2608 fprintf( stderr, ", msg=%08x", req->msg );
2609 dump_uint64( ", wparam=", &req->wparam );
2610 dump_uint64( ", lparam=", &req->lparam );
2611 fprintf( stderr, ", type=%d", req->type );
2612 fprintf( stderr, ", x=%d", req->x );
2613 fprintf( stderr, ", y=%d", req->y );
2614 fprintf( stderr, ", time=%08x", req->time );
2615 fprintf( stderr, ", active_hooks=%08x", req->active_hooks );
2616 fprintf( stderr, ", total=%u", req->total );
2617 dump_varargs_message_data( ", data=", cur_size );
2620 static void dump_reply_message_request( const struct reply_message_request *req )
2622 fprintf( stderr, " remove=%d", req->remove );
2623 dump_uint64( ", result=", &req->result );
2624 dump_varargs_bytes( ", data=", cur_size );
2627 static void dump_accept_hardware_message_request( const struct accept_hardware_message_request *req )
2629 fprintf( stderr, " hw_id=%08x", req->hw_id );
2632 static void dump_get_message_reply_request( const struct get_message_reply_request *req )
2634 fprintf( stderr, " cancel=%d", req->cancel );
2637 static void dump_get_message_reply_reply( const struct get_message_reply_reply *req )
2639 dump_uint64( " result=", &req->result );
2640 dump_varargs_bytes( ", data=", cur_size );
2643 static void dump_set_win_timer_request( const struct set_win_timer_request *req )
2645 fprintf( stderr, " win=%08x", req->win );
2646 fprintf( stderr, ", msg=%08x", req->msg );
2647 fprintf( stderr, ", rate=%08x", req->rate );
2648 dump_uint64( ", id=", &req->id );
2649 dump_uint64( ", lparam=", &req->lparam );
2652 static void dump_set_win_timer_reply( const struct set_win_timer_reply *req )
2654 dump_uint64( " id=", &req->id );
2657 static void dump_kill_win_timer_request( const struct kill_win_timer_request *req )
2659 fprintf( stderr, " win=%08x", req->win );
2660 dump_uint64( ", id=", &req->id );
2661 fprintf( stderr, ", msg=%08x", req->msg );
2664 static void dump_is_window_hung_request( const struct is_window_hung_request *req )
2666 fprintf( stderr, " win=%08x", req->win );
2669 static void dump_is_window_hung_reply( const struct is_window_hung_reply *req )
2671 fprintf( stderr, " is_hung=%d", req->is_hung );
2674 static void dump_get_serial_info_request( const struct get_serial_info_request *req )
2676 fprintf( stderr, " handle=%04x", req->handle );
2677 fprintf( stderr, ", flags=%d", req->flags );
2680 static void dump_get_serial_info_reply( const struct get_serial_info_reply *req )
2682 fprintf( stderr, " eventmask=%08x", req->eventmask );
2683 fprintf( stderr, ", cookie=%08x", req->cookie );
2684 fprintf( stderr, ", pending_write=%08x", req->pending_write );
2687 static void dump_set_serial_info_request( const struct set_serial_info_request *req )
2689 fprintf( stderr, " handle=%04x", req->handle );
2690 fprintf( stderr, ", flags=%d", req->flags );
2693 static void dump_register_async_request( const struct register_async_request *req )
2695 fprintf( stderr, " type=%d", req->type );
2696 dump_async_data( ", async=", &req->async );
2697 fprintf( stderr, ", count=%d", req->count );
2700 static void dump_cancel_async_request( const struct cancel_async_request *req )
2702 fprintf( stderr, " handle=%04x", req->handle );
2703 dump_uint64( ", iosb=", &req->iosb );
2704 fprintf( stderr, ", only_thread=%d", req->only_thread );
2707 static void dump_get_async_result_request( const struct get_async_result_request *req )
2709 dump_uint64( " user_arg=", &req->user_arg );
2712 static void dump_get_async_result_reply( const struct get_async_result_reply *req )
2714 fprintf( stderr, " size=%u", req->size );
2715 dump_varargs_bytes( ", out_data=", cur_size );
2718 static void dump_read_request( const struct read_request *req )
2720 dump_async_data( " async=", &req->async );
2721 dump_uint64( ", pos=", &req->pos );
2724 static void dump_read_reply( const struct read_reply *req )
2726 fprintf( stderr, " wait=%04x", req->wait );
2727 fprintf( stderr, ", options=%08x", req->options );
2728 dump_varargs_bytes( ", data=", cur_size );
2731 static void dump_write_request( const struct write_request *req )
2733 dump_async_data( " async=", &req->async );
2734 dump_uint64( ", pos=", &req->pos );
2735 dump_varargs_bytes( ", data=", cur_size );
2738 static void dump_write_reply( const struct write_reply *req )
2740 fprintf( stderr, " wait=%04x", req->wait );
2741 fprintf( stderr, ", options=%08x", req->options );
2742 fprintf( stderr, ", size=%u", req->size );
2745 static void dump_ioctl_request( const struct ioctl_request *req )
2747 dump_ioctl_code( " code=", &req->code );
2748 dump_async_data( ", async=", &req->async );
2749 dump_varargs_bytes( ", in_data=", cur_size );
2752 static void dump_ioctl_reply( const struct ioctl_reply *req )
2754 fprintf( stderr, " wait=%04x", req->wait );
2755 fprintf( stderr, ", options=%08x", req->options );
2756 dump_varargs_bytes( ", out_data=", cur_size );
2759 static void dump_set_irp_result_request( const struct set_irp_result_request *req )
2761 fprintf( stderr, " handle=%04x", req->handle );
2762 fprintf( stderr, ", status=%08x", req->status );
2763 fprintf( stderr, ", size=%u", req->size );
2764 dump_varargs_bytes( ", data=", cur_size );
2767 static void dump_create_named_pipe_request( const struct create_named_pipe_request *req )
2769 fprintf( stderr, " access=%08x", req->access );
2770 fprintf( stderr, ", options=%08x", req->options );
2771 fprintf( stderr, ", sharing=%08x", req->sharing );
2772 fprintf( stderr, ", maxinstances=%08x", req->maxinstances );
2773 fprintf( stderr, ", outsize=%08x", req->outsize );
2774 fprintf( stderr, ", insize=%08x", req->insize );
2775 dump_timeout( ", timeout=", &req->timeout );
2776 fprintf( stderr, ", flags=%08x", req->flags );
2777 dump_varargs_object_attributes( ", objattr=", cur_size );
2780 static void dump_create_named_pipe_reply( const struct create_named_pipe_reply *req )
2782 fprintf( stderr, " handle=%04x", req->handle );
2785 static void dump_set_named_pipe_info_request( const struct set_named_pipe_info_request *req )
2787 fprintf( stderr, " handle=%04x", req->handle );
2788 fprintf( stderr, ", flags=%08x", req->flags );
2791 static void dump_create_window_request( const struct create_window_request *req )
2793 fprintf( stderr, " parent=%08x", req->parent );
2794 fprintf( stderr, ", owner=%08x", req->owner );
2795 fprintf( stderr, ", atom=%04x", req->atom );
2796 dump_uint64( ", instance=", &req->instance );
2797 fprintf( stderr, ", dpi=%d", req->dpi );
2798 fprintf( stderr, ", awareness=%d", req->awareness );
2799 dump_varargs_unicode_str( ", class=", cur_size );
2802 static void dump_create_window_reply( const struct create_window_reply *req )
2804 fprintf( stderr, " handle=%08x", req->handle );
2805 fprintf( stderr, ", parent=%08x", req->parent );
2806 fprintf( stderr, ", owner=%08x", req->owner );
2807 fprintf( stderr, ", extra=%d", req->extra );
2808 dump_uint64( ", class_ptr=", &req->class_ptr );
2809 fprintf( stderr, ", dpi=%d", req->dpi );
2810 fprintf( stderr, ", awareness=%d", req->awareness );
2813 static void dump_destroy_window_request( const struct destroy_window_request *req )
2815 fprintf( stderr, " handle=%08x", req->handle );
2818 static void dump_get_desktop_window_request( const struct get_desktop_window_request *req )
2820 fprintf( stderr, " force=%d", req->force );
2823 static void dump_get_desktop_window_reply( const struct get_desktop_window_reply *req )
2825 fprintf( stderr, " top_window=%08x", req->top_window );
2826 fprintf( stderr, ", msg_window=%08x", req->msg_window );
2829 static void dump_set_window_owner_request( const struct set_window_owner_request *req )
2831 fprintf( stderr, " handle=%08x", req->handle );
2832 fprintf( stderr, ", owner=%08x", req->owner );
2835 static void dump_set_window_owner_reply( const struct set_window_owner_reply *req )
2837 fprintf( stderr, " full_owner=%08x", req->full_owner );
2838 fprintf( stderr, ", prev_owner=%08x", req->prev_owner );
2841 static void dump_get_window_info_request( const struct get_window_info_request *req )
2843 fprintf( stderr, " handle=%08x", req->handle );
2846 static void dump_get_window_info_reply( const struct get_window_info_reply *req )
2848 fprintf( stderr, " full_handle=%08x", req->full_handle );
2849 fprintf( stderr, ", last_active=%08x", req->last_active );
2850 fprintf( stderr, ", pid=%04x", req->pid );
2851 fprintf( stderr, ", tid=%04x", req->tid );
2852 fprintf( stderr, ", atom=%04x", req->atom );
2853 fprintf( stderr, ", is_unicode=%d", req->is_unicode );
2854 fprintf( stderr, ", dpi=%d", req->dpi );
2855 fprintf( stderr, ", awareness=%d", req->awareness );
2858 static void dump_set_window_info_request( const struct set_window_info_request *req )
2860 fprintf( stderr, " flags=%04x", req->flags );
2861 fprintf( stderr, ", is_unicode=%d", req->is_unicode );
2862 fprintf( stderr, ", handle=%08x", req->handle );
2863 fprintf( stderr, ", style=%08x", req->style );
2864 fprintf( stderr, ", ex_style=%08x", req->ex_style );
2865 fprintf( stderr, ", id=%08x", req->id );
2866 dump_uint64( ", instance=", &req->instance );
2867 dump_uint64( ", user_data=", &req->user_data );
2868 fprintf( stderr, ", extra_offset=%d", req->extra_offset );
2869 fprintf( stderr, ", extra_size=%u", req->extra_size );
2870 dump_uint64( ", extra_value=", &req->extra_value );
2873 static void dump_set_window_info_reply( const struct set_window_info_reply *req )
2875 fprintf( stderr, " old_style=%08x", req->old_style );
2876 fprintf( stderr, ", old_ex_style=%08x", req->old_ex_style );
2877 dump_uint64( ", old_instance=", &req->old_instance );
2878 dump_uint64( ", old_user_data=", &req->old_user_data );
2879 dump_uint64( ", old_extra_value=", &req->old_extra_value );
2880 fprintf( stderr, ", old_id=%08x", req->old_id );
2883 static void dump_set_parent_request( const struct set_parent_request *req )
2885 fprintf( stderr, " handle=%08x", req->handle );
2886 fprintf( stderr, ", parent=%08x", req->parent );
2889 static void dump_set_parent_reply( const struct set_parent_reply *req )
2891 fprintf( stderr, " old_parent=%08x", req->old_parent );
2892 fprintf( stderr, ", full_parent=%08x", req->full_parent );
2893 fprintf( stderr, ", dpi=%d", req->dpi );
2894 fprintf( stderr, ", awareness=%d", req->awareness );
2897 static void dump_get_window_parents_request( const struct get_window_parents_request *req )
2899 fprintf( stderr, " handle=%08x", req->handle );
2902 static void dump_get_window_parents_reply( const struct get_window_parents_reply *req )
2904 fprintf( stderr, " count=%d", req->count );
2905 dump_varargs_user_handles( ", parents=", cur_size );
2908 static void dump_get_window_children_request( const struct get_window_children_request *req )
2910 fprintf( stderr, " desktop=%04x", req->desktop );
2911 fprintf( stderr, ", parent=%08x", req->parent );
2912 fprintf( stderr, ", atom=%04x", req->atom );
2913 fprintf( stderr, ", tid=%04x", req->tid );
2914 dump_varargs_unicode_str( ", class=", cur_size );
2917 static void dump_get_window_children_reply( const struct get_window_children_reply *req )
2919 fprintf( stderr, " count=%d", req->count );
2920 dump_varargs_user_handles( ", children=", cur_size );
2923 static void dump_get_window_children_from_point_request( const struct get_window_children_from_point_request *req )
2925 fprintf( stderr, " parent=%08x", req->parent );
2926 fprintf( stderr, ", x=%d", req->x );
2927 fprintf( stderr, ", y=%d", req->y );
2928 fprintf( stderr, ", dpi=%d", req->dpi );
2931 static void dump_get_window_children_from_point_reply( const struct get_window_children_from_point_reply *req )
2933 fprintf( stderr, " count=%d", req->count );
2934 dump_varargs_user_handles( ", children=", cur_size );
2937 static void dump_get_window_tree_request( const struct get_window_tree_request *req )
2939 fprintf( stderr, " handle=%08x", req->handle );
2942 static void dump_get_window_tree_reply( const struct get_window_tree_reply *req )
2944 fprintf( stderr, " parent=%08x", req->parent );
2945 fprintf( stderr, ", owner=%08x", req->owner );
2946 fprintf( stderr, ", next_sibling=%08x", req->next_sibling );
2947 fprintf( stderr, ", prev_sibling=%08x", req->prev_sibling );
2948 fprintf( stderr, ", first_sibling=%08x", req->first_sibling );
2949 fprintf( stderr, ", last_sibling=%08x", req->last_sibling );
2950 fprintf( stderr, ", first_child=%08x", req->first_child );
2951 fprintf( stderr, ", last_child=%08x", req->last_child );
2954 static void dump_set_window_pos_request( const struct set_window_pos_request *req )
2956 fprintf( stderr, " swp_flags=%04x", req->swp_flags );
2957 fprintf( stderr, ", paint_flags=%04x", req->paint_flags );
2958 fprintf( stderr, ", handle=%08x", req->handle );
2959 fprintf( stderr, ", previous=%08x", req->previous );
2960 dump_rectangle( ", window=", &req->window );
2961 dump_rectangle( ", client=", &req->client );
2962 dump_varargs_rectangles( ", valid=", cur_size );
2965 static void dump_set_window_pos_reply( const struct set_window_pos_reply *req )
2967 fprintf( stderr, " new_style=%08x", req->new_style );
2968 fprintf( stderr, ", new_ex_style=%08x", req->new_ex_style );
2969 fprintf( stderr, ", surface_win=%08x", req->surface_win );
2970 fprintf( stderr, ", needs_update=%d", req->needs_update );
2973 static void dump_get_window_rectangles_request( const struct get_window_rectangles_request *req )
2975 fprintf( stderr, " handle=%08x", req->handle );
2976 fprintf( stderr, ", relative=%d", req->relative );
2977 fprintf( stderr, ", dpi=%d", req->dpi );
2980 static void dump_get_window_rectangles_reply( const struct get_window_rectangles_reply *req )
2982 dump_rectangle( " window=", &req->window );
2983 dump_rectangle( ", client=", &req->client );
2986 static void dump_get_window_text_request( const struct get_window_text_request *req )
2988 fprintf( stderr, " handle=%08x", req->handle );
2991 static void dump_get_window_text_reply( const struct get_window_text_reply *req )
2993 fprintf( stderr, " length=%u", req->length );
2994 dump_varargs_unicode_str( ", text=", cur_size );
2997 static void dump_set_window_text_request( const struct set_window_text_request *req )
2999 fprintf( stderr, " handle=%08x", req->handle );
3000 dump_varargs_unicode_str( ", text=", cur_size );
3003 static void dump_get_windows_offset_request( const struct get_windows_offset_request *req )
3005 fprintf( stderr, " from=%08x", req->from );
3006 fprintf( stderr, ", to=%08x", req->to );
3007 fprintf( stderr, ", dpi=%d", req->dpi );
3010 static void dump_get_windows_offset_reply( const struct get_windows_offset_reply *req )
3012 fprintf( stderr, " x=%d", req->x );
3013 fprintf( stderr, ", y=%d", req->y );
3014 fprintf( stderr, ", mirror=%d", req->mirror );
3017 static void dump_get_visible_region_request( const struct get_visible_region_request *req )
3019 fprintf( stderr, " window=%08x", req->window );
3020 fprintf( stderr, ", flags=%08x", req->flags );
3023 static void dump_get_visible_region_reply( const struct get_visible_region_reply *req )
3025 fprintf( stderr, " top_win=%08x", req->top_win );
3026 dump_rectangle( ", top_rect=", &req->top_rect );
3027 dump_rectangle( ", win_rect=", &req->win_rect );
3028 fprintf( stderr, ", paint_flags=%08x", req->paint_flags );
3029 fprintf( stderr, ", total_size=%u", req->total_size );
3030 dump_varargs_rectangles( ", region=", cur_size );
3033 static void dump_get_surface_region_request( const struct get_surface_region_request *req )
3035 fprintf( stderr, " window=%08x", req->window );
3038 static void dump_get_surface_region_reply( const struct get_surface_region_reply *req )
3040 dump_rectangle( " visible_rect=", &req->visible_rect );
3041 fprintf( stderr, ", total_size=%u", req->total_size );
3042 dump_varargs_rectangles( ", region=", cur_size );
3045 static void dump_get_window_region_request( const struct get_window_region_request *req )
3047 fprintf( stderr, " window=%08x", req->window );
3050 static void dump_get_window_region_reply( const struct get_window_region_reply *req )
3052 fprintf( stderr, " total_size=%u", req->total_size );
3053 dump_varargs_rectangles( ", region=", cur_size );
3056 static void dump_set_window_region_request( const struct set_window_region_request *req )
3058 fprintf( stderr, " window=%08x", req->window );
3059 fprintf( stderr, ", redraw=%d", req->redraw );
3060 dump_varargs_rectangles( ", region=", cur_size );
3063 static void dump_get_update_region_request( const struct get_update_region_request *req )
3065 fprintf( stderr, " window=%08x", req->window );
3066 fprintf( stderr, ", from_child=%08x", req->from_child );
3067 fprintf( stderr, ", flags=%08x", req->flags );
3070 static void dump_get_update_region_reply( const struct get_update_region_reply *req )
3072 fprintf( stderr, " child=%08x", req->child );
3073 fprintf( stderr, ", flags=%08x", req->flags );
3074 fprintf( stderr, ", total_size=%u", req->total_size );
3075 dump_varargs_rectangles( ", region=", cur_size );
3078 static void dump_update_window_zorder_request( const struct update_window_zorder_request *req )
3080 fprintf( stderr, " window=%08x", req->window );
3081 dump_rectangle( ", rect=", &req->rect );
3084 static void dump_redraw_window_request( const struct redraw_window_request *req )
3086 fprintf( stderr, " window=%08x", req->window );
3087 fprintf( stderr, ", flags=%08x", req->flags );
3088 dump_varargs_rectangles( ", region=", cur_size );
3091 static void dump_set_window_property_request( const struct set_window_property_request *req )
3093 fprintf( stderr, " window=%08x", req->window );
3094 dump_uint64( ", data=", &req->data );
3095 fprintf( stderr, ", atom=%04x", req->atom );
3096 dump_varargs_unicode_str( ", name=", cur_size );
3099 static void dump_remove_window_property_request( const struct remove_window_property_request *req )
3101 fprintf( stderr, " window=%08x", req->window );
3102 fprintf( stderr, ", atom=%04x", req->atom );
3103 dump_varargs_unicode_str( ", name=", cur_size );
3106 static void dump_remove_window_property_reply( const struct remove_window_property_reply *req )
3108 dump_uint64( " data=", &req->data );
3111 static void dump_get_window_property_request( const struct get_window_property_request *req )
3113 fprintf( stderr, " window=%08x", req->window );
3114 fprintf( stderr, ", atom=%04x", req->atom );
3115 dump_varargs_unicode_str( ", name=", cur_size );
3118 static void dump_get_window_property_reply( const struct get_window_property_reply *req )
3120 dump_uint64( " data=", &req->data );
3123 static void dump_get_window_properties_request( const struct get_window_properties_request *req )
3125 fprintf( stderr, " window=%08x", req->window );
3128 static void dump_get_window_properties_reply( const struct get_window_properties_reply *req )
3130 fprintf( stderr, " total=%d", req->total );
3131 dump_varargs_properties( ", props=", cur_size );
3134 static void dump_create_winstation_request( const struct create_winstation_request *req )
3136 fprintf( stderr, " flags=%08x", req->flags );
3137 fprintf( stderr, ", access=%08x", req->access );
3138 fprintf( stderr, ", attributes=%08x", req->attributes );
3139 fprintf( stderr, ", rootdir=%04x", req->rootdir );
3140 dump_varargs_unicode_str( ", name=", cur_size );
3143 static void dump_create_winstation_reply( const struct create_winstation_reply *req )
3145 fprintf( stderr, " handle=%04x", req->handle );
3148 static void dump_open_winstation_request( const struct open_winstation_request *req )
3150 fprintf( stderr, " access=%08x", req->access );
3151 fprintf( stderr, ", attributes=%08x", req->attributes );
3152 fprintf( stderr, ", rootdir=%04x", req->rootdir );
3153 dump_varargs_unicode_str( ", name=", cur_size );
3156 static void dump_open_winstation_reply( const struct open_winstation_reply *req )
3158 fprintf( stderr, " handle=%04x", req->handle );
3161 static void dump_close_winstation_request( const struct close_winstation_request *req )
3163 fprintf( stderr, " handle=%04x", req->handle );
3166 static void dump_get_process_winstation_request( const struct get_process_winstation_request *req )
3170 static void dump_get_process_winstation_reply( const struct get_process_winstation_reply *req )
3172 fprintf( stderr, " handle=%04x", req->handle );
3175 static void dump_set_process_winstation_request( const struct set_process_winstation_request *req )
3177 fprintf( stderr, " handle=%04x", req->handle );
3180 static void dump_enum_winstation_request( const struct enum_winstation_request *req )
3182 fprintf( stderr, " index=%08x", req->index );
3185 static void dump_enum_winstation_reply( const struct enum_winstation_reply *req )
3187 fprintf( stderr, " next=%08x", req->next );
3188 dump_varargs_unicode_str( ", name=", cur_size );
3191 static void dump_create_desktop_request( const struct create_desktop_request *req )
3193 fprintf( stderr, " flags=%08x", req->flags );
3194 fprintf( stderr, ", access=%08x", req->access );
3195 fprintf( stderr, ", attributes=%08x", req->attributes );
3196 dump_varargs_unicode_str( ", name=", cur_size );
3199 static void dump_create_desktop_reply( const struct create_desktop_reply *req )
3201 fprintf( stderr, " handle=%04x", req->handle );
3204 static void dump_open_desktop_request( const struct open_desktop_request *req )
3206 fprintf( stderr, " winsta=%04x", req->winsta );
3207 fprintf( stderr, ", flags=%08x", req->flags );
3208 fprintf( stderr, ", access=%08x", req->access );
3209 fprintf( stderr, ", attributes=%08x", req->attributes );
3210 dump_varargs_unicode_str( ", name=", cur_size );
3213 static void dump_open_desktop_reply( const struct open_desktop_reply *req )
3215 fprintf( stderr, " handle=%04x", req->handle );
3218 static void dump_open_input_desktop_request( const struct open_input_desktop_request *req )
3220 fprintf( stderr, " flags=%08x", req->flags );
3221 fprintf( stderr, ", access=%08x", req->access );
3222 fprintf( stderr, ", attributes=%08x", req->attributes );
3225 static void dump_open_input_desktop_reply( const struct open_input_desktop_reply *req )
3227 fprintf( stderr, " handle=%04x", req->handle );
3230 static void dump_close_desktop_request( const struct close_desktop_request *req )
3232 fprintf( stderr, " handle=%04x", req->handle );
3235 static void dump_get_thread_desktop_request( const struct get_thread_desktop_request *req )
3237 fprintf( stderr, " tid=%04x", req->tid );
3240 static void dump_get_thread_desktop_reply( const struct get_thread_desktop_reply *req )
3242 fprintf( stderr, " handle=%04x", req->handle );
3245 static void dump_set_thread_desktop_request( const struct set_thread_desktop_request *req )
3247 fprintf( stderr, " handle=%04x", req->handle );
3250 static void dump_enum_desktop_request( const struct enum_desktop_request *req )
3252 fprintf( stderr, " winstation=%04x", req->winstation );
3253 fprintf( stderr, ", index=%08x", req->index );
3256 static void dump_enum_desktop_reply( const struct enum_desktop_reply *req )
3258 fprintf( stderr, " next=%08x", req->next );
3259 dump_varargs_unicode_str( ", name=", cur_size );
3262 static void dump_set_user_object_info_request( const struct set_user_object_info_request *req )
3264 fprintf( stderr, " handle=%04x", req->handle );
3265 fprintf( stderr, ", flags=%08x", req->flags );
3266 fprintf( stderr, ", obj_flags=%08x", req->obj_flags );
3269 static void dump_set_user_object_info_reply( const struct set_user_object_info_reply *req )
3271 fprintf( stderr, " is_desktop=%d", req->is_desktop );
3272 fprintf( stderr, ", old_obj_flags=%08x", req->old_obj_flags );
3273 dump_varargs_unicode_str( ", name=", cur_size );
3276 static void dump_register_hotkey_request( const struct register_hotkey_request *req )
3278 fprintf( stderr, " window=%08x", req->window );
3279 fprintf( stderr, ", id=%d", req->id );
3280 fprintf( stderr, ", flags=%08x", req->flags );
3281 fprintf( stderr, ", vkey=%08x", req->vkey );
3284 static void dump_register_hotkey_reply( const struct register_hotkey_reply *req )
3286 fprintf( stderr, " replaced=%d", req->replaced );
3287 fprintf( stderr, ", flags=%08x", req->flags );
3288 fprintf( stderr, ", vkey=%08x", req->vkey );
3291 static void dump_unregister_hotkey_request( const struct unregister_hotkey_request *req )
3293 fprintf( stderr, " window=%08x", req->window );
3294 fprintf( stderr, ", id=%d", req->id );
3297 static void dump_unregister_hotkey_reply( const struct unregister_hotkey_reply *req )
3299 fprintf( stderr, " flags=%08x", req->flags );
3300 fprintf( stderr, ", vkey=%08x", req->vkey );
3303 static void dump_attach_thread_input_request( const struct attach_thread_input_request *req )
3305 fprintf( stderr, " tid_from=%04x", req->tid_from );
3306 fprintf( stderr, ", tid_to=%04x", req->tid_to );
3307 fprintf( stderr, ", attach=%d", req->attach );
3310 static void dump_get_thread_input_request( const struct get_thread_input_request *req )
3312 fprintf( stderr, " tid=%04x", req->tid );
3315 static void dump_get_thread_input_reply( const struct get_thread_input_reply *req )
3317 fprintf( stderr, " focus=%08x", req->focus );
3318 fprintf( stderr, ", capture=%08x", req->capture );
3319 fprintf( stderr, ", active=%08x", req->active );
3320 fprintf( stderr, ", foreground=%08x", req->foreground );
3321 fprintf( stderr, ", menu_owner=%08x", req->menu_owner );
3322 fprintf( stderr, ", move_size=%08x", req->move_size );
3323 fprintf( stderr, ", caret=%08x", req->caret );
3324 fprintf( stderr, ", cursor=%08x", req->cursor );
3325 fprintf( stderr, ", show_count=%d", req->show_count );
3326 dump_rectangle( ", rect=", &req->rect );
3329 static void dump_get_last_input_time_request( const struct get_last_input_time_request *req )
3333 static void dump_get_last_input_time_reply( const struct get_last_input_time_reply *req )
3335 fprintf( stderr, " time=%08x", req->time );
3338 static void dump_get_key_state_request( const struct get_key_state_request *req )
3340 fprintf( stderr, " tid=%04x", req->tid );
3341 fprintf( stderr, ", key=%d", req->key );
3344 static void dump_get_key_state_reply( const struct get_key_state_reply *req )
3346 fprintf( stderr, " state=%02x", req->state );
3347 dump_varargs_bytes( ", keystate=", cur_size );
3350 static void dump_set_key_state_request( const struct set_key_state_request *req )
3352 fprintf( stderr, " tid=%04x", req->tid );
3353 fprintf( stderr, ", async=%d", req->async );
3354 dump_varargs_bytes( ", keystate=", cur_size );
3357 static void dump_set_foreground_window_request( const struct set_foreground_window_request *req )
3359 fprintf( stderr, " handle=%08x", req->handle );
3362 static void dump_set_foreground_window_reply( const struct set_foreground_window_reply *req )
3364 fprintf( stderr, " previous=%08x", req->previous );
3365 fprintf( stderr, ", send_msg_old=%d", req->send_msg_old );
3366 fprintf( stderr, ", send_msg_new=%d", req->send_msg_new );
3369 static void dump_set_focus_window_request( const struct set_focus_window_request *req )
3371 fprintf( stderr, " handle=%08x", req->handle );
3374 static void dump_set_focus_window_reply( const struct set_focus_window_reply *req )
3376 fprintf( stderr, " previous=%08x", req->previous );
3379 static void dump_set_active_window_request( const struct set_active_window_request *req )
3381 fprintf( stderr, " handle=%08x", req->handle );
3384 static void dump_set_active_window_reply( const struct set_active_window_reply *req )
3386 fprintf( stderr, " previous=%08x", req->previous );
3389 static void dump_set_capture_window_request( const struct set_capture_window_request *req )
3391 fprintf( stderr, " handle=%08x", req->handle );
3392 fprintf( stderr, ", flags=%08x", req->flags );
3395 static void dump_set_capture_window_reply( const struct set_capture_window_reply *req )
3397 fprintf( stderr, " previous=%08x", req->previous );
3398 fprintf( stderr, ", full_handle=%08x", req->full_handle );
3401 static void dump_set_caret_window_request( const struct set_caret_window_request *req )
3403 fprintf( stderr, " handle=%08x", req->handle );
3404 fprintf( stderr, ", width=%d", req->width );
3405 fprintf( stderr, ", height=%d", req->height );
3408 static void dump_set_caret_window_reply( const struct set_caret_window_reply *req )
3410 fprintf( stderr, " previous=%08x", req->previous );
3411 dump_rectangle( ", old_rect=", &req->old_rect );
3412 fprintf( stderr, ", old_hide=%d", req->old_hide );
3413 fprintf( stderr, ", old_state=%d", req->old_state );
3416 static void dump_set_caret_info_request( const struct set_caret_info_request *req )
3418 fprintf( stderr, " flags=%08x", req->flags );
3419 fprintf( stderr, ", handle=%08x", req->handle );
3420 fprintf( stderr, ", x=%d", req->x );
3421 fprintf( stderr, ", y=%d", req->y );
3422 fprintf( stderr, ", hide=%d", req->hide );
3423 fprintf( stderr, ", state=%d", req->state );
3426 static void dump_set_caret_info_reply( const struct set_caret_info_reply *req )
3428 fprintf( stderr, " full_handle=%08x", req->full_handle );
3429 dump_rectangle( ", old_rect=", &req->old_rect );
3430 fprintf( stderr, ", old_hide=%d", req->old_hide );
3431 fprintf( stderr, ", old_state=%d", req->old_state );
3434 static void dump_set_hook_request( const struct set_hook_request *req )
3436 fprintf( stderr, " id=%d", req->id );
3437 fprintf( stderr, ", pid=%04x", req->pid );
3438 fprintf( stderr, ", tid=%04x", req->tid );
3439 fprintf( stderr, ", event_min=%d", req->event_min );
3440 fprintf( stderr, ", event_max=%d", req->event_max );
3441 dump_uint64( ", proc=", &req->proc );
3442 fprintf( stderr, ", flags=%d", req->flags );
3443 fprintf( stderr, ", unicode=%d", req->unicode );
3444 dump_varargs_unicode_str( ", module=", cur_size );
3447 static void dump_set_hook_reply( const struct set_hook_reply *req )
3449 fprintf( stderr, " handle=%08x", req->handle );
3450 fprintf( stderr, ", active_hooks=%08x", req->active_hooks );
3453 static void dump_remove_hook_request( const struct remove_hook_request *req )
3455 fprintf( stderr, " handle=%08x", req->handle );
3456 dump_uint64( ", proc=", &req->proc );
3457 fprintf( stderr, ", id=%d", req->id );
3460 static void dump_remove_hook_reply( const struct remove_hook_reply *req )
3462 fprintf( stderr, " active_hooks=%08x", req->active_hooks );
3465 static void dump_start_hook_chain_request( const struct start_hook_chain_request *req )
3467 fprintf( stderr, " id=%d", req->id );
3468 fprintf( stderr, ", event=%d", req->event );
3469 fprintf( stderr, ", window=%08x", req->window );
3470 fprintf( stderr, ", object_id=%d", req->object_id );
3471 fprintf( stderr, ", child_id=%d", req->child_id );
3474 static void dump_start_hook_chain_reply( const struct start_hook_chain_reply *req )
3476 fprintf( stderr, " handle=%08x", req->handle );
3477 fprintf( stderr, ", pid=%04x", req->pid );
3478 fprintf( stderr, ", tid=%04x", req->tid );
3479 fprintf( stderr, ", unicode=%d", req->unicode );
3480 dump_uint64( ", proc=", &req->proc );
3481 fprintf( stderr, ", active_hooks=%08x", req->active_hooks );
3482 dump_varargs_unicode_str( ", module=", cur_size );
3485 static void dump_finish_hook_chain_request( const struct finish_hook_chain_request *req )
3487 fprintf( stderr, " id=%d", req->id );
3490 static void dump_get_hook_info_request( const struct get_hook_info_request *req )
3492 fprintf( stderr, " handle=%08x", req->handle );
3493 fprintf( stderr, ", get_next=%d", req->get_next );
3494 fprintf( stderr, ", event=%d", req->event );
3495 fprintf( stderr, ", window=%08x", req->window );
3496 fprintf( stderr, ", object_id=%d", req->object_id );
3497 fprintf( stderr, ", child_id=%d", req->child_id );
3500 static void dump_get_hook_info_reply( const struct get_hook_info_reply *req )
3502 fprintf( stderr, " handle=%08x", req->handle );
3503 fprintf( stderr, ", id=%d", req->id );
3504 fprintf( stderr, ", pid=%04x", req->pid );
3505 fprintf( stderr, ", tid=%04x", req->tid );
3506 dump_uint64( ", proc=", &req->proc );
3507 fprintf( stderr, ", unicode=%d", req->unicode );
3508 dump_varargs_unicode_str( ", module=", cur_size );
3511 static void dump_create_class_request( const struct create_class_request *req )
3513 fprintf( stderr, " local=%d", req->local );
3514 fprintf( stderr, ", atom=%04x", req->atom );
3515 fprintf( stderr, ", style=%08x", req->style );
3516 dump_uint64( ", instance=", &req->instance );
3517 fprintf( stderr, ", extra=%d", req->extra );
3518 fprintf( stderr, ", win_extra=%d", req->win_extra );
3519 dump_uint64( ", client_ptr=", &req->client_ptr );
3520 fprintf( stderr, ", name_offset=%u", req->name_offset );
3521 dump_varargs_unicode_str( ", name=", cur_size );
3524 static void dump_create_class_reply( const struct create_class_reply *req )
3526 fprintf( stderr, " atom=%04x", req->atom );
3529 static void dump_destroy_class_request( const struct destroy_class_request *req )
3531 fprintf( stderr, " atom=%04x", req->atom );
3532 dump_uint64( ", instance=", &req->instance );
3533 dump_varargs_unicode_str( ", name=", cur_size );
3536 static void dump_destroy_class_reply( const struct destroy_class_reply *req )
3538 dump_uint64( " client_ptr=", &req->client_ptr );
3541 static void dump_set_class_info_request( const struct set_class_info_request *req )
3543 fprintf( stderr, " window=%08x", req->window );
3544 fprintf( stderr, ", flags=%08x", req->flags );
3545 fprintf( stderr, ", atom=%04x", req->atom );
3546 fprintf( stderr, ", style=%08x", req->style );
3547 fprintf( stderr, ", win_extra=%d", req->win_extra );
3548 dump_uint64( ", instance=", &req->instance );
3549 fprintf( stderr, ", extra_offset=%d", req->extra_offset );
3550 fprintf( stderr, ", extra_size=%u", req->extra_size );
3551 dump_uint64( ", extra_value=", &req->extra_value );
3554 static void dump_set_class_info_reply( const struct set_class_info_reply *req )
3556 fprintf( stderr, " old_atom=%04x", req->old_atom );
3557 fprintf( stderr, ", base_atom=%04x", req->base_atom );
3558 dump_uint64( ", old_instance=", &req->old_instance );
3559 dump_uint64( ", old_extra_value=", &req->old_extra_value );
3560 fprintf( stderr, ", old_style=%08x", req->old_style );
3561 fprintf( stderr, ", old_extra=%d", req->old_extra );
3562 fprintf( stderr, ", old_win_extra=%d", req->old_win_extra );
3565 static void dump_open_clipboard_request( const struct open_clipboard_request *req )
3567 fprintf( stderr, " window=%08x", req->window );
3570 static void dump_open_clipboard_reply( const struct open_clipboard_reply *req )
3572 fprintf( stderr, " owner=%08x", req->owner );
3575 static void dump_close_clipboard_request( const struct close_clipboard_request *req )
3579 static void dump_close_clipboard_reply( const struct close_clipboard_reply *req )
3581 fprintf( stderr, " viewer=%08x", req->viewer );
3582 fprintf( stderr, ", owner=%08x", req->owner );
3585 static void dump_empty_clipboard_request( const struct empty_clipboard_request *req )
3589 static void dump_set_clipboard_data_request( const struct set_clipboard_data_request *req )
3591 fprintf( stderr, " format=%08x", req->format );
3592 fprintf( stderr, ", lcid=%08x", req->lcid );
3593 dump_varargs_bytes( ", data=", cur_size );
3596 static void dump_set_clipboard_data_reply( const struct set_clipboard_data_reply *req )
3598 fprintf( stderr, " seqno=%08x", req->seqno );
3601 static void dump_get_clipboard_data_request( const struct get_clipboard_data_request *req )
3603 fprintf( stderr, " format=%08x", req->format );
3604 fprintf( stderr, ", render=%d", req->render );
3605 fprintf( stderr, ", cached=%d", req->cached );
3606 fprintf( stderr, ", seqno=%08x", req->seqno );
3609 static void dump_get_clipboard_data_reply( const struct get_clipboard_data_reply *req )
3611 fprintf( stderr, " from=%08x", req->from );
3612 fprintf( stderr, ", owner=%08x", req->owner );
3613 fprintf( stderr, ", seqno=%08x", req->seqno );
3614 fprintf( stderr, ", total=%u", req->total );
3615 dump_varargs_bytes( ", data=", cur_size );
3618 static void dump_get_clipboard_formats_request( const struct get_clipboard_formats_request *req )
3620 fprintf( stderr, " format=%08x", req->format );
3623 static void dump_get_clipboard_formats_reply( const struct get_clipboard_formats_reply *req )
3625 fprintf( stderr, " count=%08x", req->count );
3626 dump_varargs_uints( ", formats=", cur_size );
3629 static void dump_enum_clipboard_formats_request( const struct enum_clipboard_formats_request *req )
3631 fprintf( stderr, " previous=%08x", req->previous );
3634 static void dump_enum_clipboard_formats_reply( const struct enum_clipboard_formats_reply *req )
3636 fprintf( stderr, " format=%08x", req->format );
3639 static void dump_release_clipboard_request( const struct release_clipboard_request *req )
3641 fprintf( stderr, " owner=%08x", req->owner );
3644 static void dump_release_clipboard_reply( const struct release_clipboard_reply *req )
3646 fprintf( stderr, " viewer=%08x", req->viewer );
3647 fprintf( stderr, ", owner=%08x", req->owner );
3650 static void dump_get_clipboard_info_request( const struct get_clipboard_info_request *req )
3654 static void dump_get_clipboard_info_reply( const struct get_clipboard_info_reply *req )
3656 fprintf( stderr, " window=%08x", req->window );
3657 fprintf( stderr, ", owner=%08x", req->owner );
3658 fprintf( stderr, ", viewer=%08x", req->viewer );
3659 fprintf( stderr, ", seqno=%08x", req->seqno );
3662 static void dump_set_clipboard_viewer_request( const struct set_clipboard_viewer_request *req )
3664 fprintf( stderr, " viewer=%08x", req->viewer );
3665 fprintf( stderr, ", previous=%08x", req->previous );
3668 static void dump_set_clipboard_viewer_reply( const struct set_clipboard_viewer_reply *req )
3670 fprintf( stderr, " old_viewer=%08x", req->old_viewer );
3671 fprintf( stderr, ", owner=%08x", req->owner );
3674 static void dump_add_clipboard_listener_request( const struct add_clipboard_listener_request *req )
3676 fprintf( stderr, " window=%08x", req->window );
3679 static void dump_remove_clipboard_listener_request( const struct remove_clipboard_listener_request *req )
3681 fprintf( stderr, " window=%08x", req->window );
3684 static void dump_open_token_request( const struct open_token_request *req )
3686 fprintf( stderr, " handle=%04x", req->handle );
3687 fprintf( stderr, ", access=%08x", req->access );
3688 fprintf( stderr, ", attributes=%08x", req->attributes );
3689 fprintf( stderr, ", flags=%08x", req->flags );
3692 static void dump_open_token_reply( const struct open_token_reply *req )
3694 fprintf( stderr, " token=%04x", req->token );
3697 static void dump_set_global_windows_request( const struct set_global_windows_request *req )
3699 fprintf( stderr, " flags=%08x", req->flags );
3700 fprintf( stderr, ", shell_window=%08x", req->shell_window );
3701 fprintf( stderr, ", shell_listview=%08x", req->shell_listview );
3702 fprintf( stderr, ", progman_window=%08x", req->progman_window );
3703 fprintf( stderr, ", taskman_window=%08x", req->taskman_window );
3706 static void dump_set_global_windows_reply( const struct set_global_windows_reply *req )
3708 fprintf( stderr, " old_shell_window=%08x", req->old_shell_window );
3709 fprintf( stderr, ", old_shell_listview=%08x", req->old_shell_listview );
3710 fprintf( stderr, ", old_progman_window=%08x", req->old_progman_window );
3711 fprintf( stderr, ", old_taskman_window=%08x", req->old_taskman_window );
3714 static void dump_adjust_token_privileges_request( const struct adjust_token_privileges_request *req )
3716 fprintf( stderr, " handle=%04x", req->handle );
3717 fprintf( stderr, ", disable_all=%d", req->disable_all );
3718 fprintf( stderr, ", get_modified_state=%d", req->get_modified_state );
3719 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3722 static void dump_adjust_token_privileges_reply( const struct adjust_token_privileges_reply *req )
3724 fprintf( stderr, " len=%08x", req->len );
3725 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3728 static void dump_get_token_privileges_request( const struct get_token_privileges_request *req )
3730 fprintf( stderr, " handle=%04x", req->handle );
3733 static void dump_get_token_privileges_reply( const struct get_token_privileges_reply *req )
3735 fprintf( stderr, " len=%08x", req->len );
3736 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3739 static void dump_check_token_privileges_request( const struct check_token_privileges_request *req )
3741 fprintf( stderr, " handle=%04x", req->handle );
3742 fprintf( stderr, ", all_required=%d", req->all_required );
3743 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3746 static void dump_check_token_privileges_reply( const struct check_token_privileges_reply *req )
3748 fprintf( stderr, " has_privileges=%d", req->has_privileges );
3749 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3752 static void dump_duplicate_token_request( const struct duplicate_token_request *req )
3754 fprintf( stderr, " handle=%04x", req->handle );
3755 fprintf( stderr, ", access=%08x", req->access );
3756 fprintf( stderr, ", primary=%d", req->primary );
3757 fprintf( stderr, ", impersonation_level=%d", req->impersonation_level );
3758 dump_varargs_object_attributes( ", objattr=", cur_size );
3761 static void dump_duplicate_token_reply( const struct duplicate_token_reply *req )
3763 fprintf( stderr, " new_handle=%04x", req->new_handle );
3766 static void dump_filter_token_request( const struct filter_token_request *req )
3768 fprintf( stderr, " handle=%04x", req->handle );
3769 fprintf( stderr, ", flags=%08x", req->flags );
3770 fprintf( stderr, ", privileges_size=%u", req->privileges_size );
3771 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", min(cur_size,req->privileges_size) );
3772 dump_varargs_SID( ", disable_sids=", cur_size );
3775 static void dump_filter_token_reply( const struct filter_token_reply *req )
3777 fprintf( stderr, " new_handle=%04x", req->new_handle );
3780 static void dump_access_check_request( const struct access_check_request *req )
3782 fprintf( stderr, " handle=%04x", req->handle );
3783 fprintf( stderr, ", desired_access=%08x", req->desired_access );
3784 fprintf( stderr, ", mapping_read=%08x", req->mapping_read );
3785 fprintf( stderr, ", mapping_write=%08x", req->mapping_write );
3786 fprintf( stderr, ", mapping_execute=%08x", req->mapping_execute );
3787 fprintf( stderr, ", mapping_all=%08x", req->mapping_all );
3788 dump_varargs_security_descriptor( ", sd=", cur_size );
3791 static void dump_access_check_reply( const struct access_check_reply *req )
3793 fprintf( stderr, " access_granted=%08x", req->access_granted );
3794 fprintf( stderr, ", access_status=%08x", req->access_status );
3795 fprintf( stderr, ", privileges_len=%08x", req->privileges_len );
3796 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3799 static void dump_get_token_sid_request( const struct get_token_sid_request *req )
3801 fprintf( stderr, " handle=%04x", req->handle );
3802 fprintf( stderr, ", which_sid=%08x", req->which_sid );
3805 static void dump_get_token_sid_reply( const struct get_token_sid_reply *req )
3807 fprintf( stderr, " sid_len=%u", req->sid_len );
3808 dump_varargs_SID( ", sid=", cur_size );
3811 static void dump_get_token_groups_request( const struct get_token_groups_request *req )
3813 fprintf( stderr, " handle=%04x", req->handle );
3816 static void dump_get_token_groups_reply( const struct get_token_groups_reply *req )
3818 fprintf( stderr, " user_len=%u", req->user_len );
3819 dump_varargs_token_groups( ", user=", cur_size );
3822 static void dump_get_token_default_dacl_request( const struct get_token_default_dacl_request *req )
3824 fprintf( stderr, " handle=%04x", req->handle );
3827 static void dump_get_token_default_dacl_reply( const struct get_token_default_dacl_reply *req )
3829 fprintf( stderr, " acl_len=%u", req->acl_len );
3830 dump_varargs_ACL( ", acl=", cur_size );
3833 static void dump_set_token_default_dacl_request( const struct set_token_default_dacl_request *req )
3835 fprintf( stderr, " handle=%04x", req->handle );
3836 dump_varargs_ACL( ", acl=", cur_size );
3839 static void dump_set_security_object_request( const struct set_security_object_request *req )
3841 fprintf( stderr, " handle=%04x", req->handle );
3842 fprintf( stderr, ", security_info=%08x", req->security_info );
3843 dump_varargs_security_descriptor( ", sd=", cur_size );
3846 static void dump_get_security_object_request( const struct get_security_object_request *req )
3848 fprintf( stderr, " handle=%04x", req->handle );
3849 fprintf( stderr, ", security_info=%08x", req->security_info );
3852 static void dump_get_security_object_reply( const struct get_security_object_reply *req )
3854 fprintf( stderr, " sd_len=%08x", req->sd_len );
3855 dump_varargs_security_descriptor( ", sd=", cur_size );
3858 static void dump_get_system_handles_request( const struct get_system_handles_request *req )
3862 static void dump_get_system_handles_reply( const struct get_system_handles_reply *req )
3864 fprintf( stderr, " count=%08x", req->count );
3865 dump_varargs_handle_infos( ", data=", cur_size );
3868 static void dump_create_mailslot_request( const struct create_mailslot_request *req )
3870 fprintf( stderr, " access=%08x", req->access );
3871 dump_timeout( ", read_timeout=", &req->read_timeout );
3872 fprintf( stderr, ", max_msgsize=%08x", req->max_msgsize );
3873 dump_varargs_object_attributes( ", objattr=", cur_size );
3876 static void dump_create_mailslot_reply( const struct create_mailslot_reply *req )
3878 fprintf( stderr, " handle=%04x", req->handle );
3881 static void dump_set_mailslot_info_request( const struct set_mailslot_info_request *req )
3883 fprintf( stderr, " handle=%04x", req->handle );
3884 dump_timeout( ", read_timeout=", &req->read_timeout );
3885 fprintf( stderr, ", flags=%08x", req->flags );
3888 static void dump_set_mailslot_info_reply( const struct set_mailslot_info_reply *req )
3890 dump_timeout( " read_timeout=", &req->read_timeout );
3891 fprintf( stderr, ", max_msgsize=%08x", req->max_msgsize );
3894 static void dump_create_directory_request( const struct create_directory_request *req )
3896 fprintf( stderr, " access=%08x", req->access );
3897 dump_varargs_object_attributes( ", objattr=", cur_size );
3900 static void dump_create_directory_reply( const struct create_directory_reply *req )
3902 fprintf( stderr, " handle=%04x", req->handle );
3905 static void dump_open_directory_request( const struct open_directory_request *req )
3907 fprintf( stderr, " access=%08x", req->access );
3908 fprintf( stderr, ", attributes=%08x", req->attributes );
3909 fprintf( stderr, ", rootdir=%04x", req->rootdir );
3910 dump_varargs_unicode_str( ", directory_name=", cur_size );
3913 static void dump_open_directory_reply( const struct open_directory_reply *req )
3915 fprintf( stderr, " handle=%04x", req->handle );
3918 static void dump_get_directory_entry_request( const struct get_directory_entry_request *req )
3920 fprintf( stderr, " handle=%04x", req->handle );
3921 fprintf( stderr, ", index=%08x", req->index );
3924 static void dump_get_directory_entry_reply( const struct get_directory_entry_reply *req )
3926 fprintf( stderr, " name_len=%u", req->name_len );
3927 dump_varargs_unicode_str( ", name=", min(cur_size,req->name_len) );
3928 dump_varargs_unicode_str( ", type=", cur_size );
3931 static void dump_create_symlink_request( const struct create_symlink_request *req )
3933 fprintf( stderr, " access=%08x", req->access );
3934 dump_varargs_object_attributes( ", objattr=", cur_size );
3935 dump_varargs_unicode_str( ", target_name=", cur_size );
3938 static void dump_create_symlink_reply( const struct create_symlink_reply *req )
3940 fprintf( stderr, " handle=%04x", req->handle );
3943 static void dump_open_symlink_request( const struct open_symlink_request *req )
3945 fprintf( stderr, " access=%08x", req->access );
3946 fprintf( stderr, ", attributes=%08x", req->attributes );
3947 fprintf( stderr, ", rootdir=%04x", req->rootdir );
3948 dump_varargs_unicode_str( ", name=", cur_size );
3951 static void dump_open_symlink_reply( const struct open_symlink_reply *req )
3953 fprintf( stderr, " handle=%04x", req->handle );
3956 static void dump_query_symlink_request( const struct query_symlink_request *req )
3958 fprintf( stderr, " handle=%04x", req->handle );
3961 static void dump_query_symlink_reply( const struct query_symlink_reply *req )
3963 fprintf( stderr, " total=%u", req->total );
3964 dump_varargs_unicode_str( ", target_name=", cur_size );
3967 static void dump_get_object_info_request( const struct get_object_info_request *req )
3969 fprintf( stderr, " handle=%04x", req->handle );
3972 static void dump_get_object_info_reply( const struct get_object_info_reply *req )
3974 fprintf( stderr, " access=%08x", req->access );
3975 fprintf( stderr, ", ref_count=%08x", req->ref_count );
3976 fprintf( stderr, ", handle_count=%08x", req->handle_count );
3977 fprintf( stderr, ", total=%u", req->total );
3978 dump_varargs_unicode_str( ", name=", cur_size );
3981 static void dump_get_object_type_request( const struct get_object_type_request *req )
3983 fprintf( stderr, " handle=%04x", req->handle );
3986 static void dump_get_object_type_reply( const struct get_object_type_reply *req )
3988 fprintf( stderr, " total=%u", req->total );
3989 dump_varargs_unicode_str( ", type=", cur_size );
3992 static void dump_get_token_impersonation_level_request( const struct get_token_impersonation_level_request *req )
3994 fprintf( stderr, " handle=%04x", req->handle );
3997 static void dump_get_token_impersonation_level_reply( const struct get_token_impersonation_level_reply *req )
3999 fprintf( stderr, " impersonation_level=%d", req->impersonation_level );
4002 static void dump_allocate_locally_unique_id_request( const struct allocate_locally_unique_id_request *req )
4006 static void dump_allocate_locally_unique_id_reply( const struct allocate_locally_unique_id_reply *req )
4008 dump_luid( " luid=", &req->luid );
4011 static void dump_create_device_manager_request( const struct create_device_manager_request *req )
4013 fprintf( stderr, " access=%08x", req->access );
4014 fprintf( stderr, ", attributes=%08x", req->attributes );
4017 static void dump_create_device_manager_reply( const struct create_device_manager_reply *req )
4019 fprintf( stderr, " handle=%04x", req->handle );
4022 static void dump_create_device_request( const struct create_device_request *req )
4024 fprintf( stderr, " rootdir=%04x", req->rootdir );
4025 dump_uint64( ", user_ptr=", &req->user_ptr );
4026 fprintf( stderr, ", manager=%04x", req->manager );
4027 dump_varargs_unicode_str( ", name=", cur_size );
4030 static void dump_delete_device_request( const struct delete_device_request *req )
4032 fprintf( stderr, " manager=%04x", req->manager );
4033 dump_uint64( ", device=", &req->device );
4036 static void dump_get_next_device_request_request( const struct get_next_device_request_request *req )
4038 fprintf( stderr, " manager=%04x", req->manager );
4039 fprintf( stderr, ", prev=%04x", req->prev );
4040 fprintf( stderr, ", status=%08x", req->status );
4041 dump_uint64( ", user_ptr=", &req->user_ptr );
4044 static void dump_get_next_device_request_reply( const struct get_next_device_request_reply *req )
4046 dump_irp_params( " params=", &req->params );
4047 fprintf( stderr, ", next=%04x", req->next );
4048 fprintf( stderr, ", client_tid=%04x", req->client_tid );
4049 dump_uint64( ", client_thread=", &req->client_thread );
4050 fprintf( stderr, ", in_size=%u", req->in_size );
4051 dump_varargs_bytes( ", next_data=", cur_size );
4054 static void dump_get_kernel_object_ptr_request( const struct get_kernel_object_ptr_request *req )
4056 fprintf( stderr, " manager=%04x", req->manager );
4057 fprintf( stderr, ", handle=%04x", req->handle );
4060 static void dump_get_kernel_object_ptr_reply( const struct get_kernel_object_ptr_reply *req )
4062 dump_uint64( " user_ptr=", &req->user_ptr );
4065 static void dump_set_kernel_object_ptr_request( const struct set_kernel_object_ptr_request *req )
4067 fprintf( stderr, " manager=%04x", req->manager );
4068 fprintf( stderr, ", handle=%04x", req->handle );
4069 dump_uint64( ", user_ptr=", &req->user_ptr );
4072 static void dump_grab_kernel_object_request( const struct grab_kernel_object_request *req )
4074 fprintf( stderr, " manager=%04x", req->manager );
4075 dump_uint64( ", user_ptr=", &req->user_ptr );
4078 static void dump_release_kernel_object_request( const struct release_kernel_object_request *req )
4080 fprintf( stderr, " manager=%04x", req->manager );
4081 dump_uint64( ", user_ptr=", &req->user_ptr );
4084 static void dump_get_kernel_object_handle_request( const struct get_kernel_object_handle_request *req )
4086 fprintf( stderr, " manager=%04x", req->manager );
4087 dump_uint64( ", user_ptr=", &req->user_ptr );
4088 fprintf( stderr, ", access=%08x", req->access );
4091 static void dump_get_kernel_object_handle_reply( const struct get_kernel_object_handle_reply *req )
4093 fprintf( stderr, " handle=%04x", req->handle );
4096 static void dump_make_process_system_request( const struct make_process_system_request *req )
4100 static void dump_make_process_system_reply( const struct make_process_system_reply *req )
4102 fprintf( stderr, " event=%04x", req->event );
4105 static void dump_get_token_statistics_request( const struct get_token_statistics_request *req )
4107 fprintf( stderr, " handle=%04x", req->handle );
4110 static void dump_get_token_statistics_reply( const struct get_token_statistics_reply *req )
4112 dump_luid( " token_id=", &req->token_id );
4113 dump_luid( ", modified_id=", &req->modified_id );
4114 fprintf( stderr, ", primary=%d", req->primary );
4115 fprintf( stderr, ", impersonation_level=%d", req->impersonation_level );
4116 fprintf( stderr, ", group_count=%d", req->group_count );
4117 fprintf( stderr, ", privilege_count=%d", req->privilege_count );
4120 static void dump_create_completion_request( const struct create_completion_request *req )
4122 fprintf( stderr, " access=%08x", req->access );
4123 fprintf( stderr, ", concurrent=%08x", req->concurrent );
4124 dump_varargs_object_attributes( ", objattr=", cur_size );
4127 static void dump_create_completion_reply( const struct create_completion_reply *req )
4129 fprintf( stderr, " handle=%04x", req->handle );
4132 static void dump_open_completion_request( const struct open_completion_request *req )
4134 fprintf( stderr, " access=%08x", req->access );
4135 fprintf( stderr, ", attributes=%08x", req->attributes );
4136 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4137 dump_varargs_unicode_str( ", filename=", cur_size );
4140 static void dump_open_completion_reply( const struct open_completion_reply *req )
4142 fprintf( stderr, " handle=%04x", req->handle );
4145 static void dump_add_completion_request( const struct add_completion_request *req )
4147 fprintf( stderr, " handle=%04x", req->handle );
4148 dump_uint64( ", ckey=", &req->ckey );
4149 dump_uint64( ", cvalue=", &req->cvalue );
4150 dump_uint64( ", information=", &req->information );
4151 fprintf( stderr, ", status=%08x", req->status );
4154 static void dump_remove_completion_request( const struct remove_completion_request *req )
4156 fprintf( stderr, " handle=%04x", req->handle );
4159 static void dump_remove_completion_reply( const struct remove_completion_reply *req )
4161 dump_uint64( " ckey=", &req->ckey );
4162 dump_uint64( ", cvalue=", &req->cvalue );
4163 dump_uint64( ", information=", &req->information );
4164 fprintf( stderr, ", status=%08x", req->status );
4167 static void dump_query_completion_request( const struct query_completion_request *req )
4169 fprintf( stderr, " handle=%04x", req->handle );
4172 static void dump_query_completion_reply( const struct query_completion_reply *req )
4174 fprintf( stderr, " depth=%08x", req->depth );
4177 static void dump_set_completion_info_request( const struct set_completion_info_request *req )
4179 fprintf( stderr, " handle=%04x", req->handle );
4180 dump_uint64( ", ckey=", &req->ckey );
4181 fprintf( stderr, ", chandle=%04x", req->chandle );
4184 static void dump_add_fd_completion_request( const struct add_fd_completion_request *req )
4186 fprintf( stderr, " handle=%04x", req->handle );
4187 dump_uint64( ", cvalue=", &req->cvalue );
4188 dump_uint64( ", information=", &req->information );
4189 fprintf( stderr, ", status=%08x", req->status );
4190 fprintf( stderr, ", async=%d", req->async );
4193 static void dump_set_fd_completion_mode_request( const struct set_fd_completion_mode_request *req )
4195 fprintf( stderr, " handle=%04x", req->handle );
4196 fprintf( stderr, ", flags=%08x", req->flags );
4199 static void dump_set_fd_disp_info_request( const struct set_fd_disp_info_request *req )
4201 fprintf( stderr, " handle=%04x", req->handle );
4202 fprintf( stderr, ", unlink=%d", req->unlink );
4205 static void dump_set_fd_name_info_request( const struct set_fd_name_info_request *req )
4207 fprintf( stderr, " handle=%04x", req->handle );
4208 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4209 fprintf( stderr, ", link=%d", req->link );
4210 fprintf( stderr, ", replace=%d", req->replace );
4211 dump_varargs_string( ", filename=", cur_size );
4214 static void dump_get_window_layered_info_request( const struct get_window_layered_info_request *req )
4216 fprintf( stderr, " handle=%08x", req->handle );
4219 static void dump_get_window_layered_info_reply( const struct get_window_layered_info_reply *req )
4221 fprintf( stderr, " color_key=%08x", req->color_key );
4222 fprintf( stderr, ", alpha=%08x", req->alpha );
4223 fprintf( stderr, ", flags=%08x", req->flags );
4226 static void dump_set_window_layered_info_request( const struct set_window_layered_info_request *req )
4228 fprintf( stderr, " handle=%08x", req->handle );
4229 fprintf( stderr, ", color_key=%08x", req->color_key );
4230 fprintf( stderr, ", alpha=%08x", req->alpha );
4231 fprintf( stderr, ", flags=%08x", req->flags );
4234 static void dump_alloc_user_handle_request( const struct alloc_user_handle_request *req )
4238 static void dump_alloc_user_handle_reply( const struct alloc_user_handle_reply *req )
4240 fprintf( stderr, " handle=%08x", req->handle );
4243 static void dump_free_user_handle_request( const struct free_user_handle_request *req )
4245 fprintf( stderr, " handle=%08x", req->handle );
4248 static void dump_set_cursor_request( const struct set_cursor_request *req )
4250 fprintf( stderr, " flags=%08x", req->flags );
4251 fprintf( stderr, ", handle=%08x", req->handle );
4252 fprintf( stderr, ", show_count=%d", req->show_count );
4253 fprintf( stderr, ", x=%d", req->x );
4254 fprintf( stderr, ", y=%d", req->y );
4255 dump_rectangle( ", clip=", &req->clip );
4256 fprintf( stderr, ", clip_msg=%08x", req->clip_msg );
4259 static void dump_set_cursor_reply( const struct set_cursor_reply *req )
4261 fprintf( stderr, " prev_handle=%08x", req->prev_handle );
4262 fprintf( stderr, ", prev_count=%d", req->prev_count );
4263 fprintf( stderr, ", prev_x=%d", req->prev_x );
4264 fprintf( stderr, ", prev_y=%d", req->prev_y );
4265 fprintf( stderr, ", new_x=%d", req->new_x );
4266 fprintf( stderr, ", new_y=%d", req->new_y );
4267 dump_rectangle( ", new_clip=", &req->new_clip );
4268 fprintf( stderr, ", last_change=%08x", req->last_change );
4271 static void dump_get_cursor_history_request( const struct get_cursor_history_request *req )
4275 static void dump_get_cursor_history_reply( const struct get_cursor_history_reply *req )
4277 dump_varargs_cursor_positions( " history=", cur_size );
4280 static void dump_get_rawinput_buffer_request( const struct get_rawinput_buffer_request *req )
4282 fprintf( stderr, " rawinput_size=%u", req->rawinput_size );
4283 fprintf( stderr, ", buffer_size=%u", req->buffer_size );
4286 static void dump_get_rawinput_buffer_reply( const struct get_rawinput_buffer_reply *req )
4288 fprintf( stderr, " next_size=%u", req->next_size );
4289 fprintf( stderr, ", count=%08x", req->count );
4290 dump_varargs_bytes( ", data=", cur_size );
4293 static void dump_update_rawinput_devices_request( const struct update_rawinput_devices_request *req )
4295 dump_varargs_rawinput_devices( " devices=", cur_size );
4298 static void dump_get_rawinput_devices_request( const struct get_rawinput_devices_request *req )
4302 static void dump_get_rawinput_devices_reply( const struct get_rawinput_devices_reply *req )
4304 fprintf( stderr, " device_count=%08x", req->device_count );
4305 dump_varargs_rawinput_devices( ", devices=", cur_size );
4308 static void dump_create_job_request( const struct create_job_request *req )
4310 fprintf( stderr, " access=%08x", req->access );
4311 dump_varargs_object_attributes( ", objattr=", cur_size );
4314 static void dump_create_job_reply( const struct create_job_reply *req )
4316 fprintf( stderr, " handle=%04x", req->handle );
4319 static void dump_open_job_request( const struct open_job_request *req )
4321 fprintf( stderr, " access=%08x", req->access );
4322 fprintf( stderr, ", attributes=%08x", req->attributes );
4323 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4324 dump_varargs_unicode_str( ", name=", cur_size );
4327 static void dump_open_job_reply( const struct open_job_reply *req )
4329 fprintf( stderr, " handle=%04x", req->handle );
4332 static void dump_assign_job_request( const struct assign_job_request *req )
4334 fprintf( stderr, " job=%04x", req->job );
4335 fprintf( stderr, ", process=%04x", req->process );
4338 static void dump_process_in_job_request( const struct process_in_job_request *req )
4340 fprintf( stderr, " job=%04x", req->job );
4341 fprintf( stderr, ", process=%04x", req->process );
4344 static void dump_set_job_limits_request( const struct set_job_limits_request *req )
4346 fprintf( stderr, " handle=%04x", req->handle );
4347 fprintf( stderr, ", limit_flags=%08x", req->limit_flags );
4350 static void dump_set_job_completion_port_request( const struct set_job_completion_port_request *req )
4352 fprintf( stderr, " job=%04x", req->job );
4353 fprintf( stderr, ", port=%04x", req->port );
4354 dump_uint64( ", key=", &req->key );
4357 static void dump_get_job_info_request( const struct get_job_info_request *req )
4359 fprintf( stderr, " handle=%04x", req->handle );
4362 static void dump_get_job_info_reply( const struct get_job_info_reply *req )
4364 fprintf( stderr, " total_processes=%d", req->total_processes );
4365 fprintf( stderr, ", active_processes=%d", req->active_processes );
4368 static void dump_terminate_job_request( const struct terminate_job_request *req )
4370 fprintf( stderr, " handle=%04x", req->handle );
4371 fprintf( stderr, ", status=%d", req->status );
4374 static void dump_suspend_process_request( const struct suspend_process_request *req )
4376 fprintf( stderr, " handle=%04x", req->handle );
4379 static void dump_resume_process_request( const struct resume_process_request *req )
4381 fprintf( stderr, " handle=%04x", req->handle );
4384 static const dump_func req_dumpers[REQ_NB_REQUESTS] = {
4385 (dump_func)dump_new_process_request,
4386 (dump_func)dump_exec_process_request,
4387 (dump_func)dump_get_new_process_info_request,
4388 (dump_func)dump_new_thread_request,
4389 (dump_func)dump_get_startup_info_request,
4390 (dump_func)dump_init_process_done_request,
4391 (dump_func)dump_init_thread_request,
4392 (dump_func)dump_terminate_process_request,
4393 (dump_func)dump_terminate_thread_request,
4394 (dump_func)dump_get_process_info_request,
4395 (dump_func)dump_get_process_vm_counters_request,
4396 (dump_func)dump_set_process_info_request,
4397 (dump_func)dump_get_thread_info_request,
4398 (dump_func)dump_get_thread_times_request,
4399 (dump_func)dump_set_thread_info_request,
4400 (dump_func)dump_get_dll_info_request,
4401 (dump_func)dump_suspend_thread_request,
4402 (dump_func)dump_resume_thread_request,
4403 (dump_func)dump_load_dll_request,
4404 (dump_func)dump_unload_dll_request,
4405 (dump_func)dump_queue_apc_request,
4406 (dump_func)dump_get_apc_result_request,
4407 (dump_func)dump_close_handle_request,
4408 (dump_func)dump_set_handle_info_request,
4409 (dump_func)dump_dup_handle_request,
4410 (dump_func)dump_make_temporary_request,
4411 (dump_func)dump_open_process_request,
4412 (dump_func)dump_open_thread_request,
4413 (dump_func)dump_select_request,
4414 (dump_func)dump_create_event_request,
4415 (dump_func)dump_event_op_request,
4416 (dump_func)dump_query_event_request,
4417 (dump_func)dump_open_event_request,
4418 (dump_func)dump_create_keyed_event_request,
4419 (dump_func)dump_open_keyed_event_request,
4420 (dump_func)dump_create_mutex_request,
4421 (dump_func)dump_release_mutex_request,
4422 (dump_func)dump_open_mutex_request,
4423 (dump_func)dump_query_mutex_request,
4424 (dump_func)dump_create_semaphore_request,
4425 (dump_func)dump_release_semaphore_request,
4426 (dump_func)dump_query_semaphore_request,
4427 (dump_func)dump_open_semaphore_request,
4428 (dump_func)dump_create_file_request,
4429 (dump_func)dump_open_file_object_request,
4430 (dump_func)dump_alloc_file_handle_request,
4431 (dump_func)dump_get_handle_unix_name_request,
4432 (dump_func)dump_get_handle_fd_request,
4433 (dump_func)dump_get_directory_cache_entry_request,
4434 (dump_func)dump_flush_request,
4435 (dump_func)dump_get_file_info_request,
4436 (dump_func)dump_get_volume_info_request,
4437 (dump_func)dump_lock_file_request,
4438 (dump_func)dump_unlock_file_request,
4439 (dump_func)dump_set_socket_event_request,
4440 (dump_func)dump_get_socket_event_request,
4441 (dump_func)dump_get_socket_info_request,
4442 (dump_func)dump_enable_socket_event_request,
4443 (dump_func)dump_set_socket_deferred_request,
4444 (dump_func)dump_get_next_console_request_request,
4445 (dump_func)dump_read_directory_changes_request,
4446 (dump_func)dump_read_change_request,
4447 (dump_func)dump_create_mapping_request,
4448 (dump_func)dump_open_mapping_request,
4449 (dump_func)dump_get_mapping_info_request,
4450 (dump_func)dump_map_view_request,
4451 (dump_func)dump_unmap_view_request,
4452 (dump_func)dump_get_mapping_committed_range_request,
4453 (dump_func)dump_add_mapping_committed_range_request,
4454 (dump_func)dump_is_same_mapping_request,
4455 (dump_func)dump_list_processes_request,
4456 (dump_func)dump_wait_debug_event_request,
4457 (dump_func)dump_queue_exception_event_request,
4458 (dump_func)dump_get_exception_status_request,
4459 (dump_func)dump_continue_debug_event_request,
4460 (dump_func)dump_debug_process_request,
4461 (dump_func)dump_set_debugger_kill_on_exit_request,
4462 (dump_func)dump_read_process_memory_request,
4463 (dump_func)dump_write_process_memory_request,
4464 (dump_func)dump_create_key_request,
4465 (dump_func)dump_open_key_request,
4466 (dump_func)dump_delete_key_request,
4467 (dump_func)dump_flush_key_request,
4468 (dump_func)dump_enum_key_request,
4469 (dump_func)dump_set_key_value_request,
4470 (dump_func)dump_get_key_value_request,
4471 (dump_func)dump_enum_key_value_request,
4472 (dump_func)dump_delete_key_value_request,
4473 (dump_func)dump_load_registry_request,
4474 (dump_func)dump_unload_registry_request,
4475 (dump_func)dump_save_registry_request,
4476 (dump_func)dump_set_registry_notification_request,
4477 (dump_func)dump_create_timer_request,
4478 (dump_func)dump_open_timer_request,
4479 (dump_func)dump_set_timer_request,
4480 (dump_func)dump_cancel_timer_request,
4481 (dump_func)dump_get_timer_info_request,
4482 (dump_func)dump_get_thread_context_request,
4483 (dump_func)dump_set_thread_context_request,
4484 (dump_func)dump_get_selector_entry_request,
4485 (dump_func)dump_add_atom_request,
4486 (dump_func)dump_delete_atom_request,
4487 (dump_func)dump_find_atom_request,
4488 (dump_func)dump_get_atom_information_request,
4489 (dump_func)dump_set_atom_information_request,
4490 (dump_func)dump_empty_atom_table_request,
4491 (dump_func)dump_init_atom_table_request,
4492 (dump_func)dump_get_msg_queue_request,
4493 (dump_func)dump_set_queue_fd_request,
4494 (dump_func)dump_set_queue_mask_request,
4495 (dump_func)dump_get_queue_status_request,
4496 (dump_func)dump_get_process_idle_event_request,
4497 (dump_func)dump_send_message_request,
4498 (dump_func)dump_post_quit_message_request,
4499 (dump_func)dump_send_hardware_message_request,
4500 (dump_func)dump_get_message_request,
4501 (dump_func)dump_reply_message_request,
4502 (dump_func)dump_accept_hardware_message_request,
4503 (dump_func)dump_get_message_reply_request,
4504 (dump_func)dump_set_win_timer_request,
4505 (dump_func)dump_kill_win_timer_request,
4506 (dump_func)dump_is_window_hung_request,
4507 (dump_func)dump_get_serial_info_request,
4508 (dump_func)dump_set_serial_info_request,
4509 (dump_func)dump_register_async_request,
4510 (dump_func)dump_cancel_async_request,
4511 (dump_func)dump_get_async_result_request,
4512 (dump_func)dump_read_request,
4513 (dump_func)dump_write_request,
4514 (dump_func)dump_ioctl_request,
4515 (dump_func)dump_set_irp_result_request,
4516 (dump_func)dump_create_named_pipe_request,
4517 (dump_func)dump_set_named_pipe_info_request,
4518 (dump_func)dump_create_window_request,
4519 (dump_func)dump_destroy_window_request,
4520 (dump_func)dump_get_desktop_window_request,
4521 (dump_func)dump_set_window_owner_request,
4522 (dump_func)dump_get_window_info_request,
4523 (dump_func)dump_set_window_info_request,
4524 (dump_func)dump_set_parent_request,
4525 (dump_func)dump_get_window_parents_request,
4526 (dump_func)dump_get_window_children_request,
4527 (dump_func)dump_get_window_children_from_point_request,
4528 (dump_func)dump_get_window_tree_request,
4529 (dump_func)dump_set_window_pos_request,
4530 (dump_func)dump_get_window_rectangles_request,
4531 (dump_func)dump_get_window_text_request,
4532 (dump_func)dump_set_window_text_request,
4533 (dump_func)dump_get_windows_offset_request,
4534 (dump_func)dump_get_visible_region_request,
4535 (dump_func)dump_get_surface_region_request,
4536 (dump_func)dump_get_window_region_request,
4537 (dump_func)dump_set_window_region_request,
4538 (dump_func)dump_get_update_region_request,
4539 (dump_func)dump_update_window_zorder_request,
4540 (dump_func)dump_redraw_window_request,
4541 (dump_func)dump_set_window_property_request,
4542 (dump_func)dump_remove_window_property_request,
4543 (dump_func)dump_get_window_property_request,
4544 (dump_func)dump_get_window_properties_request,
4545 (dump_func)dump_create_winstation_request,
4546 (dump_func)dump_open_winstation_request,
4547 (dump_func)dump_close_winstation_request,
4548 (dump_func)dump_get_process_winstation_request,
4549 (dump_func)dump_set_process_winstation_request,
4550 (dump_func)dump_enum_winstation_request,
4551 (dump_func)dump_create_desktop_request,
4552 (dump_func)dump_open_desktop_request,
4553 (dump_func)dump_open_input_desktop_request,
4554 (dump_func)dump_close_desktop_request,
4555 (dump_func)dump_get_thread_desktop_request,
4556 (dump_func)dump_set_thread_desktop_request,
4557 (dump_func)dump_enum_desktop_request,
4558 (dump_func)dump_set_user_object_info_request,
4559 (dump_func)dump_register_hotkey_request,
4560 (dump_func)dump_unregister_hotkey_request,
4561 (dump_func)dump_attach_thread_input_request,
4562 (dump_func)dump_get_thread_input_request,
4563 (dump_func)dump_get_last_input_time_request,
4564 (dump_func)dump_get_key_state_request,
4565 (dump_func)dump_set_key_state_request,
4566 (dump_func)dump_set_foreground_window_request,
4567 (dump_func)dump_set_focus_window_request,
4568 (dump_func)dump_set_active_window_request,
4569 (dump_func)dump_set_capture_window_request,
4570 (dump_func)dump_set_caret_window_request,
4571 (dump_func)dump_set_caret_info_request,
4572 (dump_func)dump_set_hook_request,
4573 (dump_func)dump_remove_hook_request,
4574 (dump_func)dump_start_hook_chain_request,
4575 (dump_func)dump_finish_hook_chain_request,
4576 (dump_func)dump_get_hook_info_request,
4577 (dump_func)dump_create_class_request,
4578 (dump_func)dump_destroy_class_request,
4579 (dump_func)dump_set_class_info_request,
4580 (dump_func)dump_open_clipboard_request,
4581 (dump_func)dump_close_clipboard_request,
4582 (dump_func)dump_empty_clipboard_request,
4583 (dump_func)dump_set_clipboard_data_request,
4584 (dump_func)dump_get_clipboard_data_request,
4585 (dump_func)dump_get_clipboard_formats_request,
4586 (dump_func)dump_enum_clipboard_formats_request,
4587 (dump_func)dump_release_clipboard_request,
4588 (dump_func)dump_get_clipboard_info_request,
4589 (dump_func)dump_set_clipboard_viewer_request,
4590 (dump_func)dump_add_clipboard_listener_request,
4591 (dump_func)dump_remove_clipboard_listener_request,
4592 (dump_func)dump_open_token_request,
4593 (dump_func)dump_set_global_windows_request,
4594 (dump_func)dump_adjust_token_privileges_request,
4595 (dump_func)dump_get_token_privileges_request,
4596 (dump_func)dump_check_token_privileges_request,
4597 (dump_func)dump_duplicate_token_request,
4598 (dump_func)dump_filter_token_request,
4599 (dump_func)dump_access_check_request,
4600 (dump_func)dump_get_token_sid_request,
4601 (dump_func)dump_get_token_groups_request,
4602 (dump_func)dump_get_token_default_dacl_request,
4603 (dump_func)dump_set_token_default_dacl_request,
4604 (dump_func)dump_set_security_object_request,
4605 (dump_func)dump_get_security_object_request,
4606 (dump_func)dump_get_system_handles_request,
4607 (dump_func)dump_create_mailslot_request,
4608 (dump_func)dump_set_mailslot_info_request,
4609 (dump_func)dump_create_directory_request,
4610 (dump_func)dump_open_directory_request,
4611 (dump_func)dump_get_directory_entry_request,
4612 (dump_func)dump_create_symlink_request,
4613 (dump_func)dump_open_symlink_request,
4614 (dump_func)dump_query_symlink_request,
4615 (dump_func)dump_get_object_info_request,
4616 (dump_func)dump_get_object_type_request,
4617 (dump_func)dump_get_token_impersonation_level_request,
4618 (dump_func)dump_allocate_locally_unique_id_request,
4619 (dump_func)dump_create_device_manager_request,
4620 (dump_func)dump_create_device_request,
4621 (dump_func)dump_delete_device_request,
4622 (dump_func)dump_get_next_device_request_request,
4623 (dump_func)dump_get_kernel_object_ptr_request,
4624 (dump_func)dump_set_kernel_object_ptr_request,
4625 (dump_func)dump_grab_kernel_object_request,
4626 (dump_func)dump_release_kernel_object_request,
4627 (dump_func)dump_get_kernel_object_handle_request,
4628 (dump_func)dump_make_process_system_request,
4629 (dump_func)dump_get_token_statistics_request,
4630 (dump_func)dump_create_completion_request,
4631 (dump_func)dump_open_completion_request,
4632 (dump_func)dump_add_completion_request,
4633 (dump_func)dump_remove_completion_request,
4634 (dump_func)dump_query_completion_request,
4635 (dump_func)dump_set_completion_info_request,
4636 (dump_func)dump_add_fd_completion_request,
4637 (dump_func)dump_set_fd_completion_mode_request,
4638 (dump_func)dump_set_fd_disp_info_request,
4639 (dump_func)dump_set_fd_name_info_request,
4640 (dump_func)dump_get_window_layered_info_request,
4641 (dump_func)dump_set_window_layered_info_request,
4642 (dump_func)dump_alloc_user_handle_request,
4643 (dump_func)dump_free_user_handle_request,
4644 (dump_func)dump_set_cursor_request,
4645 (dump_func)dump_get_cursor_history_request,
4646 (dump_func)dump_get_rawinput_buffer_request,
4647 (dump_func)dump_update_rawinput_devices_request,
4648 (dump_func)dump_get_rawinput_devices_request,
4649 (dump_func)dump_create_job_request,
4650 (dump_func)dump_open_job_request,
4651 (dump_func)dump_assign_job_request,
4652 (dump_func)dump_process_in_job_request,
4653 (dump_func)dump_set_job_limits_request,
4654 (dump_func)dump_set_job_completion_port_request,
4655 (dump_func)dump_get_job_info_request,
4656 (dump_func)dump_terminate_job_request,
4657 (dump_func)dump_suspend_process_request,
4658 (dump_func)dump_resume_process_request,
4661 static const dump_func reply_dumpers[REQ_NB_REQUESTS] = {
4662 (dump_func)dump_new_process_reply,
4663 NULL,
4664 (dump_func)dump_get_new_process_info_reply,
4665 (dump_func)dump_new_thread_reply,
4666 (dump_func)dump_get_startup_info_reply,
4667 (dump_func)dump_init_process_done_reply,
4668 (dump_func)dump_init_thread_reply,
4669 (dump_func)dump_terminate_process_reply,
4670 (dump_func)dump_terminate_thread_reply,
4671 (dump_func)dump_get_process_info_reply,
4672 (dump_func)dump_get_process_vm_counters_reply,
4673 NULL,
4674 (dump_func)dump_get_thread_info_reply,
4675 (dump_func)dump_get_thread_times_reply,
4676 NULL,
4677 (dump_func)dump_get_dll_info_reply,
4678 (dump_func)dump_suspend_thread_reply,
4679 (dump_func)dump_resume_thread_reply,
4680 NULL,
4681 NULL,
4682 (dump_func)dump_queue_apc_reply,
4683 (dump_func)dump_get_apc_result_reply,
4684 NULL,
4685 (dump_func)dump_set_handle_info_reply,
4686 (dump_func)dump_dup_handle_reply,
4687 NULL,
4688 (dump_func)dump_open_process_reply,
4689 (dump_func)dump_open_thread_reply,
4690 (dump_func)dump_select_reply,
4691 (dump_func)dump_create_event_reply,
4692 (dump_func)dump_event_op_reply,
4693 (dump_func)dump_query_event_reply,
4694 (dump_func)dump_open_event_reply,
4695 (dump_func)dump_create_keyed_event_reply,
4696 (dump_func)dump_open_keyed_event_reply,
4697 (dump_func)dump_create_mutex_reply,
4698 (dump_func)dump_release_mutex_reply,
4699 (dump_func)dump_open_mutex_reply,
4700 (dump_func)dump_query_mutex_reply,
4701 (dump_func)dump_create_semaphore_reply,
4702 (dump_func)dump_release_semaphore_reply,
4703 (dump_func)dump_query_semaphore_reply,
4704 (dump_func)dump_open_semaphore_reply,
4705 (dump_func)dump_create_file_reply,
4706 (dump_func)dump_open_file_object_reply,
4707 (dump_func)dump_alloc_file_handle_reply,
4708 (dump_func)dump_get_handle_unix_name_reply,
4709 (dump_func)dump_get_handle_fd_reply,
4710 (dump_func)dump_get_directory_cache_entry_reply,
4711 (dump_func)dump_flush_reply,
4712 (dump_func)dump_get_file_info_reply,
4713 (dump_func)dump_get_volume_info_reply,
4714 (dump_func)dump_lock_file_reply,
4715 NULL,
4716 NULL,
4717 (dump_func)dump_get_socket_event_reply,
4718 (dump_func)dump_get_socket_info_reply,
4719 NULL,
4720 NULL,
4721 (dump_func)dump_get_next_console_request_reply,
4722 NULL,
4723 (dump_func)dump_read_change_reply,
4724 (dump_func)dump_create_mapping_reply,
4725 (dump_func)dump_open_mapping_reply,
4726 (dump_func)dump_get_mapping_info_reply,
4727 NULL,
4728 NULL,
4729 (dump_func)dump_get_mapping_committed_range_reply,
4730 NULL,
4731 NULL,
4732 (dump_func)dump_list_processes_reply,
4733 (dump_func)dump_wait_debug_event_reply,
4734 (dump_func)dump_queue_exception_event_reply,
4735 NULL,
4736 NULL,
4737 NULL,
4738 NULL,
4739 (dump_func)dump_read_process_memory_reply,
4740 NULL,
4741 (dump_func)dump_create_key_reply,
4742 (dump_func)dump_open_key_reply,
4743 NULL,
4744 NULL,
4745 (dump_func)dump_enum_key_reply,
4746 NULL,
4747 (dump_func)dump_get_key_value_reply,
4748 (dump_func)dump_enum_key_value_reply,
4749 NULL,
4750 NULL,
4751 NULL,
4752 NULL,
4753 NULL,
4754 (dump_func)dump_create_timer_reply,
4755 (dump_func)dump_open_timer_reply,
4756 (dump_func)dump_set_timer_reply,
4757 (dump_func)dump_cancel_timer_reply,
4758 (dump_func)dump_get_timer_info_reply,
4759 (dump_func)dump_get_thread_context_reply,
4760 (dump_func)dump_set_thread_context_reply,
4761 (dump_func)dump_get_selector_entry_reply,
4762 (dump_func)dump_add_atom_reply,
4763 NULL,
4764 (dump_func)dump_find_atom_reply,
4765 (dump_func)dump_get_atom_information_reply,
4766 NULL,
4767 NULL,
4768 (dump_func)dump_init_atom_table_reply,
4769 (dump_func)dump_get_msg_queue_reply,
4770 NULL,
4771 (dump_func)dump_set_queue_mask_reply,
4772 (dump_func)dump_get_queue_status_reply,
4773 (dump_func)dump_get_process_idle_event_reply,
4774 NULL,
4775 NULL,
4776 (dump_func)dump_send_hardware_message_reply,
4777 (dump_func)dump_get_message_reply,
4778 NULL,
4779 NULL,
4780 (dump_func)dump_get_message_reply_reply,
4781 (dump_func)dump_set_win_timer_reply,
4782 NULL,
4783 (dump_func)dump_is_window_hung_reply,
4784 (dump_func)dump_get_serial_info_reply,
4785 NULL,
4786 NULL,
4787 NULL,
4788 (dump_func)dump_get_async_result_reply,
4789 (dump_func)dump_read_reply,
4790 (dump_func)dump_write_reply,
4791 (dump_func)dump_ioctl_reply,
4792 NULL,
4793 (dump_func)dump_create_named_pipe_reply,
4794 NULL,
4795 (dump_func)dump_create_window_reply,
4796 NULL,
4797 (dump_func)dump_get_desktop_window_reply,
4798 (dump_func)dump_set_window_owner_reply,
4799 (dump_func)dump_get_window_info_reply,
4800 (dump_func)dump_set_window_info_reply,
4801 (dump_func)dump_set_parent_reply,
4802 (dump_func)dump_get_window_parents_reply,
4803 (dump_func)dump_get_window_children_reply,
4804 (dump_func)dump_get_window_children_from_point_reply,
4805 (dump_func)dump_get_window_tree_reply,
4806 (dump_func)dump_set_window_pos_reply,
4807 (dump_func)dump_get_window_rectangles_reply,
4808 (dump_func)dump_get_window_text_reply,
4809 NULL,
4810 (dump_func)dump_get_windows_offset_reply,
4811 (dump_func)dump_get_visible_region_reply,
4812 (dump_func)dump_get_surface_region_reply,
4813 (dump_func)dump_get_window_region_reply,
4814 NULL,
4815 (dump_func)dump_get_update_region_reply,
4816 NULL,
4817 NULL,
4818 NULL,
4819 (dump_func)dump_remove_window_property_reply,
4820 (dump_func)dump_get_window_property_reply,
4821 (dump_func)dump_get_window_properties_reply,
4822 (dump_func)dump_create_winstation_reply,
4823 (dump_func)dump_open_winstation_reply,
4824 NULL,
4825 (dump_func)dump_get_process_winstation_reply,
4826 NULL,
4827 (dump_func)dump_enum_winstation_reply,
4828 (dump_func)dump_create_desktop_reply,
4829 (dump_func)dump_open_desktop_reply,
4830 (dump_func)dump_open_input_desktop_reply,
4831 NULL,
4832 (dump_func)dump_get_thread_desktop_reply,
4833 NULL,
4834 (dump_func)dump_enum_desktop_reply,
4835 (dump_func)dump_set_user_object_info_reply,
4836 (dump_func)dump_register_hotkey_reply,
4837 (dump_func)dump_unregister_hotkey_reply,
4838 NULL,
4839 (dump_func)dump_get_thread_input_reply,
4840 (dump_func)dump_get_last_input_time_reply,
4841 (dump_func)dump_get_key_state_reply,
4842 NULL,
4843 (dump_func)dump_set_foreground_window_reply,
4844 (dump_func)dump_set_focus_window_reply,
4845 (dump_func)dump_set_active_window_reply,
4846 (dump_func)dump_set_capture_window_reply,
4847 (dump_func)dump_set_caret_window_reply,
4848 (dump_func)dump_set_caret_info_reply,
4849 (dump_func)dump_set_hook_reply,
4850 (dump_func)dump_remove_hook_reply,
4851 (dump_func)dump_start_hook_chain_reply,
4852 NULL,
4853 (dump_func)dump_get_hook_info_reply,
4854 (dump_func)dump_create_class_reply,
4855 (dump_func)dump_destroy_class_reply,
4856 (dump_func)dump_set_class_info_reply,
4857 (dump_func)dump_open_clipboard_reply,
4858 (dump_func)dump_close_clipboard_reply,
4859 NULL,
4860 (dump_func)dump_set_clipboard_data_reply,
4861 (dump_func)dump_get_clipboard_data_reply,
4862 (dump_func)dump_get_clipboard_formats_reply,
4863 (dump_func)dump_enum_clipboard_formats_reply,
4864 (dump_func)dump_release_clipboard_reply,
4865 (dump_func)dump_get_clipboard_info_reply,
4866 (dump_func)dump_set_clipboard_viewer_reply,
4867 NULL,
4868 NULL,
4869 (dump_func)dump_open_token_reply,
4870 (dump_func)dump_set_global_windows_reply,
4871 (dump_func)dump_adjust_token_privileges_reply,
4872 (dump_func)dump_get_token_privileges_reply,
4873 (dump_func)dump_check_token_privileges_reply,
4874 (dump_func)dump_duplicate_token_reply,
4875 (dump_func)dump_filter_token_reply,
4876 (dump_func)dump_access_check_reply,
4877 (dump_func)dump_get_token_sid_reply,
4878 (dump_func)dump_get_token_groups_reply,
4879 (dump_func)dump_get_token_default_dacl_reply,
4880 NULL,
4881 NULL,
4882 (dump_func)dump_get_security_object_reply,
4883 (dump_func)dump_get_system_handles_reply,
4884 (dump_func)dump_create_mailslot_reply,
4885 (dump_func)dump_set_mailslot_info_reply,
4886 (dump_func)dump_create_directory_reply,
4887 (dump_func)dump_open_directory_reply,
4888 (dump_func)dump_get_directory_entry_reply,
4889 (dump_func)dump_create_symlink_reply,
4890 (dump_func)dump_open_symlink_reply,
4891 (dump_func)dump_query_symlink_reply,
4892 (dump_func)dump_get_object_info_reply,
4893 (dump_func)dump_get_object_type_reply,
4894 (dump_func)dump_get_token_impersonation_level_reply,
4895 (dump_func)dump_allocate_locally_unique_id_reply,
4896 (dump_func)dump_create_device_manager_reply,
4897 NULL,
4898 NULL,
4899 (dump_func)dump_get_next_device_request_reply,
4900 (dump_func)dump_get_kernel_object_ptr_reply,
4901 NULL,
4902 NULL,
4903 NULL,
4904 (dump_func)dump_get_kernel_object_handle_reply,
4905 (dump_func)dump_make_process_system_reply,
4906 (dump_func)dump_get_token_statistics_reply,
4907 (dump_func)dump_create_completion_reply,
4908 (dump_func)dump_open_completion_reply,
4909 NULL,
4910 (dump_func)dump_remove_completion_reply,
4911 (dump_func)dump_query_completion_reply,
4912 NULL,
4913 NULL,
4914 NULL,
4915 NULL,
4916 NULL,
4917 (dump_func)dump_get_window_layered_info_reply,
4918 NULL,
4919 (dump_func)dump_alloc_user_handle_reply,
4920 NULL,
4921 (dump_func)dump_set_cursor_reply,
4922 (dump_func)dump_get_cursor_history_reply,
4923 (dump_func)dump_get_rawinput_buffer_reply,
4924 NULL,
4925 (dump_func)dump_get_rawinput_devices_reply,
4926 (dump_func)dump_create_job_reply,
4927 (dump_func)dump_open_job_reply,
4928 NULL,
4929 NULL,
4930 NULL,
4931 NULL,
4932 (dump_func)dump_get_job_info_reply,
4933 NULL,
4934 NULL,
4935 NULL,
4938 static const char * const req_names[REQ_NB_REQUESTS] = {
4939 "new_process",
4940 "exec_process",
4941 "get_new_process_info",
4942 "new_thread",
4943 "get_startup_info",
4944 "init_process_done",
4945 "init_thread",
4946 "terminate_process",
4947 "terminate_thread",
4948 "get_process_info",
4949 "get_process_vm_counters",
4950 "set_process_info",
4951 "get_thread_info",
4952 "get_thread_times",
4953 "set_thread_info",
4954 "get_dll_info",
4955 "suspend_thread",
4956 "resume_thread",
4957 "load_dll",
4958 "unload_dll",
4959 "queue_apc",
4960 "get_apc_result",
4961 "close_handle",
4962 "set_handle_info",
4963 "dup_handle",
4964 "make_temporary",
4965 "open_process",
4966 "open_thread",
4967 "select",
4968 "create_event",
4969 "event_op",
4970 "query_event",
4971 "open_event",
4972 "create_keyed_event",
4973 "open_keyed_event",
4974 "create_mutex",
4975 "release_mutex",
4976 "open_mutex",
4977 "query_mutex",
4978 "create_semaphore",
4979 "release_semaphore",
4980 "query_semaphore",
4981 "open_semaphore",
4982 "create_file",
4983 "open_file_object",
4984 "alloc_file_handle",
4985 "get_handle_unix_name",
4986 "get_handle_fd",
4987 "get_directory_cache_entry",
4988 "flush",
4989 "get_file_info",
4990 "get_volume_info",
4991 "lock_file",
4992 "unlock_file",
4993 "set_socket_event",
4994 "get_socket_event",
4995 "get_socket_info",
4996 "enable_socket_event",
4997 "set_socket_deferred",
4998 "get_next_console_request",
4999 "read_directory_changes",
5000 "read_change",
5001 "create_mapping",
5002 "open_mapping",
5003 "get_mapping_info",
5004 "map_view",
5005 "unmap_view",
5006 "get_mapping_committed_range",
5007 "add_mapping_committed_range",
5008 "is_same_mapping",
5009 "list_processes",
5010 "wait_debug_event",
5011 "queue_exception_event",
5012 "get_exception_status",
5013 "continue_debug_event",
5014 "debug_process",
5015 "set_debugger_kill_on_exit",
5016 "read_process_memory",
5017 "write_process_memory",
5018 "create_key",
5019 "open_key",
5020 "delete_key",
5021 "flush_key",
5022 "enum_key",
5023 "set_key_value",
5024 "get_key_value",
5025 "enum_key_value",
5026 "delete_key_value",
5027 "load_registry",
5028 "unload_registry",
5029 "save_registry",
5030 "set_registry_notification",
5031 "create_timer",
5032 "open_timer",
5033 "set_timer",
5034 "cancel_timer",
5035 "get_timer_info",
5036 "get_thread_context",
5037 "set_thread_context",
5038 "get_selector_entry",
5039 "add_atom",
5040 "delete_atom",
5041 "find_atom",
5042 "get_atom_information",
5043 "set_atom_information",
5044 "empty_atom_table",
5045 "init_atom_table",
5046 "get_msg_queue",
5047 "set_queue_fd",
5048 "set_queue_mask",
5049 "get_queue_status",
5050 "get_process_idle_event",
5051 "send_message",
5052 "post_quit_message",
5053 "send_hardware_message",
5054 "get_message",
5055 "reply_message",
5056 "accept_hardware_message",
5057 "get_message_reply",
5058 "set_win_timer",
5059 "kill_win_timer",
5060 "is_window_hung",
5061 "get_serial_info",
5062 "set_serial_info",
5063 "register_async",
5064 "cancel_async",
5065 "get_async_result",
5066 "read",
5067 "write",
5068 "ioctl",
5069 "set_irp_result",
5070 "create_named_pipe",
5071 "set_named_pipe_info",
5072 "create_window",
5073 "destroy_window",
5074 "get_desktop_window",
5075 "set_window_owner",
5076 "get_window_info",
5077 "set_window_info",
5078 "set_parent",
5079 "get_window_parents",
5080 "get_window_children",
5081 "get_window_children_from_point",
5082 "get_window_tree",
5083 "set_window_pos",
5084 "get_window_rectangles",
5085 "get_window_text",
5086 "set_window_text",
5087 "get_windows_offset",
5088 "get_visible_region",
5089 "get_surface_region",
5090 "get_window_region",
5091 "set_window_region",
5092 "get_update_region",
5093 "update_window_zorder",
5094 "redraw_window",
5095 "set_window_property",
5096 "remove_window_property",
5097 "get_window_property",
5098 "get_window_properties",
5099 "create_winstation",
5100 "open_winstation",
5101 "close_winstation",
5102 "get_process_winstation",
5103 "set_process_winstation",
5104 "enum_winstation",
5105 "create_desktop",
5106 "open_desktop",
5107 "open_input_desktop",
5108 "close_desktop",
5109 "get_thread_desktop",
5110 "set_thread_desktop",
5111 "enum_desktop",
5112 "set_user_object_info",
5113 "register_hotkey",
5114 "unregister_hotkey",
5115 "attach_thread_input",
5116 "get_thread_input",
5117 "get_last_input_time",
5118 "get_key_state",
5119 "set_key_state",
5120 "set_foreground_window",
5121 "set_focus_window",
5122 "set_active_window",
5123 "set_capture_window",
5124 "set_caret_window",
5125 "set_caret_info",
5126 "set_hook",
5127 "remove_hook",
5128 "start_hook_chain",
5129 "finish_hook_chain",
5130 "get_hook_info",
5131 "create_class",
5132 "destroy_class",
5133 "set_class_info",
5134 "open_clipboard",
5135 "close_clipboard",
5136 "empty_clipboard",
5137 "set_clipboard_data",
5138 "get_clipboard_data",
5139 "get_clipboard_formats",
5140 "enum_clipboard_formats",
5141 "release_clipboard",
5142 "get_clipboard_info",
5143 "set_clipboard_viewer",
5144 "add_clipboard_listener",
5145 "remove_clipboard_listener",
5146 "open_token",
5147 "set_global_windows",
5148 "adjust_token_privileges",
5149 "get_token_privileges",
5150 "check_token_privileges",
5151 "duplicate_token",
5152 "filter_token",
5153 "access_check",
5154 "get_token_sid",
5155 "get_token_groups",
5156 "get_token_default_dacl",
5157 "set_token_default_dacl",
5158 "set_security_object",
5159 "get_security_object",
5160 "get_system_handles",
5161 "create_mailslot",
5162 "set_mailslot_info",
5163 "create_directory",
5164 "open_directory",
5165 "get_directory_entry",
5166 "create_symlink",
5167 "open_symlink",
5168 "query_symlink",
5169 "get_object_info",
5170 "get_object_type",
5171 "get_token_impersonation_level",
5172 "allocate_locally_unique_id",
5173 "create_device_manager",
5174 "create_device",
5175 "delete_device",
5176 "get_next_device_request",
5177 "get_kernel_object_ptr",
5178 "set_kernel_object_ptr",
5179 "grab_kernel_object",
5180 "release_kernel_object",
5181 "get_kernel_object_handle",
5182 "make_process_system",
5183 "get_token_statistics",
5184 "create_completion",
5185 "open_completion",
5186 "add_completion",
5187 "remove_completion",
5188 "query_completion",
5189 "set_completion_info",
5190 "add_fd_completion",
5191 "set_fd_completion_mode",
5192 "set_fd_disp_info",
5193 "set_fd_name_info",
5194 "get_window_layered_info",
5195 "set_window_layered_info",
5196 "alloc_user_handle",
5197 "free_user_handle",
5198 "set_cursor",
5199 "get_cursor_history",
5200 "get_rawinput_buffer",
5201 "update_rawinput_devices",
5202 "get_rawinput_devices",
5203 "create_job",
5204 "open_job",
5205 "assign_job",
5206 "process_in_job",
5207 "set_job_limits",
5208 "set_job_completion_port",
5209 "get_job_info",
5210 "terminate_job",
5211 "suspend_process",
5212 "resume_process",
5215 static const struct
5217 const char *name;
5218 unsigned int value;
5219 } status_names[] =
5221 { "ABANDONED_WAIT_0", STATUS_ABANDONED_WAIT_0 },
5222 { "ACCESS_DENIED", STATUS_ACCESS_DENIED },
5223 { "ACCESS_VIOLATION", STATUS_ACCESS_VIOLATION },
5224 { "ADDRESS_ALREADY_ASSOCIATED", STATUS_ADDRESS_ALREADY_ASSOCIATED },
5225 { "ALERTED", STATUS_ALERTED },
5226 { "BAD_DEVICE_TYPE", STATUS_BAD_DEVICE_TYPE },
5227 { "BAD_IMPERSONATION_LEVEL", STATUS_BAD_IMPERSONATION_LEVEL },
5228 { "BUFFER_OVERFLOW", STATUS_BUFFER_OVERFLOW },
5229 { "BUFFER_TOO_SMALL", STATUS_BUFFER_TOO_SMALL },
5230 { "CANCELLED", STATUS_CANCELLED },
5231 { "CANNOT_DELETE", STATUS_CANNOT_DELETE },
5232 { "CANT_OPEN_ANONYMOUS", STATUS_CANT_OPEN_ANONYMOUS },
5233 { "CANT_WAIT", STATUS_CANT_WAIT },
5234 { "CHILD_MUST_BE_VOLATILE", STATUS_CHILD_MUST_BE_VOLATILE },
5235 { "CONNECTION_ABORTED", STATUS_CONNECTION_ABORTED },
5236 { "CONNECTION_DISCONNECTED", STATUS_CONNECTION_DISCONNECTED },
5237 { "CONNECTION_REFUSED", STATUS_CONNECTION_REFUSED },
5238 { "CONNECTION_RESET", STATUS_CONNECTION_RESET },
5239 { "DEBUGGER_INACTIVE", STATUS_DEBUGGER_INACTIVE },
5240 { "DEVICE_BUSY", STATUS_DEVICE_BUSY },
5241 { "DIRECTORY_NOT_EMPTY", STATUS_DIRECTORY_NOT_EMPTY },
5242 { "DISK_FULL", STATUS_DISK_FULL },
5243 { "DLL_NOT_FOUND", STATUS_DLL_NOT_FOUND },
5244 { "ERROR_CLASS_ALREADY_EXISTS", 0xc0010000 | ERROR_CLASS_ALREADY_EXISTS },
5245 { "ERROR_CLASS_DOES_NOT_EXIST", 0xc0010000 | ERROR_CLASS_DOES_NOT_EXIST },
5246 { "ERROR_CLASS_HAS_WINDOWS", 0xc0010000 | ERROR_CLASS_HAS_WINDOWS },
5247 { "ERROR_CLIPBOARD_NOT_OPEN", 0xc0010000 | ERROR_CLIPBOARD_NOT_OPEN },
5248 { "ERROR_HOTKEY_ALREADY_REGISTERED", 0xc0010000 | ERROR_HOTKEY_ALREADY_REGISTERED },
5249 { "ERROR_HOTKEY_NOT_REGISTERED", 0xc0010000 | ERROR_HOTKEY_NOT_REGISTERED },
5250 { "ERROR_INVALID_CURSOR_HANDLE", 0xc0010000 | ERROR_INVALID_CURSOR_HANDLE },
5251 { "ERROR_INVALID_INDEX", 0xc0010000 | ERROR_INVALID_INDEX },
5252 { "ERROR_INVALID_WINDOW_HANDLE", 0xc0010000 | ERROR_INVALID_WINDOW_HANDLE },
5253 { "ERROR_NO_MORE_USER_HANDLES", 0xc0010000 | ERROR_NO_MORE_USER_HANDLES },
5254 { "ERROR_WINDOW_OF_OTHER_THREAD", 0xc0010000 | ERROR_WINDOW_OF_OTHER_THREAD },
5255 { "FILE_DELETED", STATUS_FILE_DELETED },
5256 { "FILE_IS_A_DIRECTORY", STATUS_FILE_IS_A_DIRECTORY },
5257 { "FILE_LOCK_CONFLICT", STATUS_FILE_LOCK_CONFLICT },
5258 { "GENERIC_NOT_MAPPED", STATUS_GENERIC_NOT_MAPPED },
5259 { "HANDLES_CLOSED", STATUS_HANDLES_CLOSED },
5260 { "HANDLE_NOT_CLOSABLE", STATUS_HANDLE_NOT_CLOSABLE },
5261 { "HOST_UNREACHABLE", STATUS_HOST_UNREACHABLE },
5262 { "ILLEGAL_FUNCTION", STATUS_ILLEGAL_FUNCTION },
5263 { "IMAGE_NOT_AT_BASE", STATUS_IMAGE_NOT_AT_BASE },
5264 { "INFO_LENGTH_MISMATCH", STATUS_INFO_LENGTH_MISMATCH },
5265 { "INSTANCE_NOT_AVAILABLE", STATUS_INSTANCE_NOT_AVAILABLE },
5266 { "INSUFFICIENT_RESOURCES", STATUS_INSUFFICIENT_RESOURCES },
5267 { "INVALID_CID", STATUS_INVALID_CID },
5268 { "INVALID_DEVICE_REQUEST", STATUS_INVALID_DEVICE_REQUEST },
5269 { "INVALID_FILE_FOR_SECTION", STATUS_INVALID_FILE_FOR_SECTION },
5270 { "INVALID_HANDLE", STATUS_INVALID_HANDLE },
5271 { "INVALID_IMAGE_FORMAT", STATUS_INVALID_IMAGE_FORMAT },
5272 { "INVALID_IMAGE_NE_FORMAT", STATUS_INVALID_IMAGE_NE_FORMAT },
5273 { "INVALID_IMAGE_NOT_MZ", STATUS_INVALID_IMAGE_NOT_MZ },
5274 { "INVALID_IMAGE_PROTECT", STATUS_INVALID_IMAGE_PROTECT },
5275 { "INVALID_IMAGE_WIN_16", STATUS_INVALID_IMAGE_WIN_16 },
5276 { "INVALID_IMAGE_WIN_64", STATUS_INVALID_IMAGE_WIN_64 },
5277 { "INVALID_LOCK_SEQUENCE", STATUS_INVALID_LOCK_SEQUENCE },
5278 { "INVALID_OWNER", STATUS_INVALID_OWNER },
5279 { "INVALID_PARAMETER", STATUS_INVALID_PARAMETER },
5280 { "INVALID_PIPE_STATE", STATUS_INVALID_PIPE_STATE },
5281 { "INVALID_READ_MODE", STATUS_INVALID_READ_MODE },
5282 { "INVALID_SECURITY_DESCR", STATUS_INVALID_SECURITY_DESCR },
5283 { "IO_TIMEOUT", STATUS_IO_TIMEOUT },
5284 { "KERNEL_APC", STATUS_KERNEL_APC },
5285 { "KEY_DELETED", STATUS_KEY_DELETED },
5286 { "MAPPED_FILE_SIZE_ZERO", STATUS_MAPPED_FILE_SIZE_ZERO },
5287 { "MORE_PROCESSING_REQUIRED", STATUS_MORE_PROCESSING_REQUIRED },
5288 { "MUTANT_NOT_OWNED", STATUS_MUTANT_NOT_OWNED },
5289 { "NAME_TOO_LONG", STATUS_NAME_TOO_LONG },
5290 { "NETWORK_BUSY", STATUS_NETWORK_BUSY },
5291 { "NETWORK_UNREACHABLE", STATUS_NETWORK_UNREACHABLE },
5292 { "NOT_ALL_ASSIGNED", STATUS_NOT_ALL_ASSIGNED },
5293 { "NOT_A_DIRECTORY", STATUS_NOT_A_DIRECTORY },
5294 { "NOT_FOUND", STATUS_NOT_FOUND },
5295 { "NOT_IMPLEMENTED", STATUS_NOT_IMPLEMENTED },
5296 { "NOT_MAPPED_VIEW", STATUS_NOT_MAPPED_VIEW },
5297 { "NOT_REGISTRY_FILE", STATUS_NOT_REGISTRY_FILE },
5298 { "NOT_SAME_DEVICE", STATUS_NOT_SAME_DEVICE },
5299 { "NOT_SUPPORTED", STATUS_NOT_SUPPORTED },
5300 { "NO_DATA_DETECTED", STATUS_NO_DATA_DETECTED },
5301 { "NO_IMPERSONATION_TOKEN", STATUS_NO_IMPERSONATION_TOKEN },
5302 { "NO_MEMORY", STATUS_NO_MEMORY },
5303 { "NO_MORE_ENTRIES", STATUS_NO_MORE_ENTRIES },
5304 { "NO_SUCH_DEVICE", STATUS_NO_SUCH_DEVICE },
5305 { "NO_SUCH_FILE", STATUS_NO_SUCH_FILE },
5306 { "NO_TOKEN", STATUS_NO_TOKEN },
5307 { "OBJECT_NAME_COLLISION", STATUS_OBJECT_NAME_COLLISION },
5308 { "OBJECT_NAME_EXISTS", STATUS_OBJECT_NAME_EXISTS },
5309 { "OBJECT_NAME_INVALID", STATUS_OBJECT_NAME_INVALID },
5310 { "OBJECT_NAME_NOT_FOUND", STATUS_OBJECT_NAME_NOT_FOUND },
5311 { "OBJECT_PATH_INVALID", STATUS_OBJECT_PATH_INVALID },
5312 { "OBJECT_PATH_NOT_FOUND", STATUS_OBJECT_PATH_NOT_FOUND },
5313 { "OBJECT_PATH_SYNTAX_BAD", STATUS_OBJECT_PATH_SYNTAX_BAD },
5314 { "OBJECT_TYPE_MISMATCH", STATUS_OBJECT_TYPE_MISMATCH },
5315 { "PENDING", STATUS_PENDING },
5316 { "PIPE_BROKEN", STATUS_PIPE_BROKEN },
5317 { "PIPE_BUSY", STATUS_PIPE_BUSY },
5318 { "PIPE_CLOSING", STATUS_PIPE_CLOSING },
5319 { "PIPE_CONNECTED", STATUS_PIPE_CONNECTED },
5320 { "PIPE_DISCONNECTED", STATUS_PIPE_DISCONNECTED },
5321 { "PIPE_EMPTY", STATUS_PIPE_EMPTY },
5322 { "PIPE_LISTENING", STATUS_PIPE_LISTENING },
5323 { "PIPE_NOT_AVAILABLE", STATUS_PIPE_NOT_AVAILABLE },
5324 { "PRIVILEGE_NOT_HELD", STATUS_PRIVILEGE_NOT_HELD },
5325 { "PROCESS_IN_JOB", STATUS_PROCESS_IN_JOB },
5326 { "PROCESS_IS_TERMINATING", STATUS_PROCESS_IS_TERMINATING },
5327 { "PROCESS_NOT_IN_JOB", STATUS_PROCESS_NOT_IN_JOB },
5328 { "REPARSE_POINT_NOT_RESOLVED", STATUS_REPARSE_POINT_NOT_RESOLVED },
5329 { "SECTION_TOO_BIG", STATUS_SECTION_TOO_BIG },
5330 { "SEMAPHORE_LIMIT_EXCEEDED", STATUS_SEMAPHORE_LIMIT_EXCEEDED },
5331 { "SHARING_VIOLATION", STATUS_SHARING_VIOLATION },
5332 { "SHUTDOWN_IN_PROGRESS", STATUS_SHUTDOWN_IN_PROGRESS },
5333 { "SUSPEND_COUNT_EXCEEDED", STATUS_SUSPEND_COUNT_EXCEEDED },
5334 { "THREAD_IS_TERMINATING", STATUS_THREAD_IS_TERMINATING },
5335 { "TIMEOUT", STATUS_TIMEOUT },
5336 { "TOO_MANY_OPENED_FILES", STATUS_TOO_MANY_OPENED_FILES },
5337 { "UNSUCCESSFUL", STATUS_UNSUCCESSFUL },
5338 { "USER_APC", STATUS_USER_APC },
5339 { "USER_MAPPED_FILE", STATUS_USER_MAPPED_FILE },
5340 { "VOLUME_DISMOUNTED", STATUS_VOLUME_DISMOUNTED },
5341 { "WAS_LOCKED", STATUS_WAS_LOCKED },
5342 { "WSAEACCES", 0xc0010000 | WSAEACCES },
5343 { "WSAEADDRINUSE", 0xc0010000 | WSAEADDRINUSE },
5344 { "WSAEADDRNOTAVAIL", 0xc0010000 | WSAEADDRNOTAVAIL },
5345 { "WSAEAFNOSUPPORT", 0xc0010000 | WSAEAFNOSUPPORT },
5346 { "WSAEALREADY", 0xc0010000 | WSAEALREADY },
5347 { "WSAEBADF", 0xc0010000 | WSAEBADF },
5348 { "WSAECONNABORTED", 0xc0010000 | WSAECONNABORTED },
5349 { "WSAECONNREFUSED", 0xc0010000 | WSAECONNREFUSED },
5350 { "WSAECONNRESET", 0xc0010000 | WSAECONNRESET },
5351 { "WSAEDESTADDRREQ", 0xc0010000 | WSAEDESTADDRREQ },
5352 { "WSAEDQUOT", 0xc0010000 | WSAEDQUOT },
5353 { "WSAEFAULT", 0xc0010000 | WSAEFAULT },
5354 { "WSAEHOSTDOWN", 0xc0010000 | WSAEHOSTDOWN },
5355 { "WSAEHOSTUNREACH", 0xc0010000 | WSAEHOSTUNREACH },
5356 { "WSAEINPROGRESS", 0xc0010000 | WSAEINPROGRESS },
5357 { "WSAEINTR", 0xc0010000 | WSAEINTR },
5358 { "WSAEINVAL", 0xc0010000 | WSAEINVAL },
5359 { "WSAEISCONN", 0xc0010000 | WSAEISCONN },
5360 { "WSAELOOP", 0xc0010000 | WSAELOOP },
5361 { "WSAEMFILE", 0xc0010000 | WSAEMFILE },
5362 { "WSAEMSGSIZE", 0xc0010000 | WSAEMSGSIZE },
5363 { "WSAENAMETOOLONG", 0xc0010000 | WSAENAMETOOLONG },
5364 { "WSAENETDOWN", 0xc0010000 | WSAENETDOWN },
5365 { "WSAENETRESET", 0xc0010000 | WSAENETRESET },
5366 { "WSAENETUNREACH", 0xc0010000 | WSAENETUNREACH },
5367 { "WSAENOBUFS", 0xc0010000 | WSAENOBUFS },
5368 { "WSAENOPROTOOPT", 0xc0010000 | WSAENOPROTOOPT },
5369 { "WSAENOTCONN", 0xc0010000 | WSAENOTCONN },
5370 { "WSAENOTEMPTY", 0xc0010000 | WSAENOTEMPTY },
5371 { "WSAENOTSOCK", 0xc0010000 | WSAENOTSOCK },
5372 { "WSAEOPNOTSUPP", 0xc0010000 | WSAEOPNOTSUPP },
5373 { "WSAEPFNOSUPPORT", 0xc0010000 | WSAEPFNOSUPPORT },
5374 { "WSAEPROCLIM", 0xc0010000 | WSAEPROCLIM },
5375 { "WSAEPROTONOSUPPORT", 0xc0010000 | WSAEPROTONOSUPPORT },
5376 { "WSAEPROTOTYPE", 0xc0010000 | WSAEPROTOTYPE },
5377 { "WSAEREMOTE", 0xc0010000 | WSAEREMOTE },
5378 { "WSAESHUTDOWN", 0xc0010000 | WSAESHUTDOWN },
5379 { "WSAESOCKTNOSUPPORT", 0xc0010000 | WSAESOCKTNOSUPPORT },
5380 { "WSAESTALE", 0xc0010000 | WSAESTALE },
5381 { "WSAETIMEDOUT", 0xc0010000 | WSAETIMEDOUT },
5382 { "WSAETOOMANYREFS", 0xc0010000 | WSAETOOMANYREFS },
5383 { "WSAEUSERS", 0xc0010000 | WSAEUSERS },
5384 { "WSAEWOULDBLOCK", 0xc0010000 | WSAEWOULDBLOCK },
5385 { NULL, 0 }
5388 /* ### make_requests end ### */
5389 /* Everything above this line is generated automatically by tools/make_requests */
5391 static const char *get_status_name( unsigned int status )
5393 int i;
5394 static char buffer[10];
5396 if (status)
5398 for (i = 0; status_names[i].name; i++)
5399 if (status_names[i].value == status) return status_names[i].name;
5401 sprintf( buffer, "%x", status );
5402 return buffer;
5405 void trace_request(void)
5407 enum request req = current->req.request_header.req;
5408 if (req < REQ_NB_REQUESTS)
5410 fprintf( stderr, "%04x: %s(", current->id, req_names[req] );
5411 if (req_dumpers[req])
5413 cur_data = get_req_data();
5414 cur_size = get_req_data_size();
5415 req_dumpers[req]( &current->req );
5417 fprintf( stderr, " )\n" );
5419 else fprintf( stderr, "%04x: %d(?)\n", current->id, req );
5422 void trace_reply( enum request req, const union generic_reply *reply )
5424 if (req < REQ_NB_REQUESTS)
5426 fprintf( stderr, "%04x: %s() = %s",
5427 current->id, req_names[req], get_status_name(current->error) );
5428 if (reply_dumpers[req])
5430 fprintf( stderr, " {" );
5431 cur_data = current->reply_data;
5432 cur_size = reply->reply_header.reply_size;
5433 reply_dumpers[req]( reply );
5434 fprintf( stderr, " }" );
5436 fputc( '\n', stderr );
5438 else fprintf( stderr, "%04x: %d() = %s\n",
5439 current->id, req, get_status_name(current->error) );