msvcp110: Add tr2_sys__Read_dir implementation.
[wine.git] / server / trace.c
blob4ec7aad3bc95e4c6958f95120db462905657018b
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 "ddk/wdm.h"
42 #define USE_WS_PREFIX
43 #include "winsock2.h"
44 #include "file.h"
45 #include "request.h"
46 #include "unicode.h"
48 static const void *cur_data;
49 static data_size_t cur_size;
51 static const char *get_status_name( unsigned int status );
53 /* utility functions */
55 static inline void remove_data( data_size_t size )
57 cur_data = (const char *)cur_data + size;
58 cur_size -= size;
61 static void dump_uints( const int *ptr, int len )
63 fputc( '{', stderr );
64 while (len > 0)
66 fprintf( stderr, "%08x", *ptr++ );
67 if (--len) fputc( ',', stderr );
69 fputc( '}', stderr );
72 static void dump_handles( const char *prefix, const obj_handle_t *data, data_size_t size )
74 data_size_t len = size / sizeof(*data);
76 fprintf( stderr,"%s{", prefix );
77 while (len > 0)
79 fprintf( stderr, "%04x", *data++ );
80 if (--len) fputc( ',', stderr );
82 fputc( '}', stderr );
85 static void dump_timeout( const char *prefix, const timeout_t *time )
87 fprintf( stderr, "%s%s", prefix, get_timeout_str(*time) );
90 static void dump_uint64( const char *prefix, const unsigned __int64 *val )
92 if ((unsigned int)*val != *val)
93 fprintf( stderr, "%s%x%08x", prefix, (unsigned int)(*val >> 32), (unsigned int)*val );
94 else
95 fprintf( stderr, "%s%08x", prefix, (unsigned int)*val );
98 static void dump_rectangle( const char *prefix, const rectangle_t *rect )
100 fprintf( stderr, "%s{%d,%d;%d,%d}", prefix,
101 rect->left, rect->top, rect->right, rect->bottom );
104 static void dump_char_info( const char *prefix, const char_info_t *info )
106 fprintf( stderr, "%s{'", prefix );
107 dump_strW( &info->ch, 1, stderr, "\'\'" );
108 fprintf( stderr, "',%04x}", info->attr );
111 static void dump_ioctl_code( const char *prefix, const ioctl_code_t *code )
113 switch(*code)
115 #define CASE(c) case c: fprintf( stderr, "%s%s", prefix, #c ); break
116 CASE(FSCTL_DISMOUNT_VOLUME);
117 CASE(FSCTL_PIPE_DISCONNECT);
118 CASE(FSCTL_PIPE_LISTEN);
119 CASE(FSCTL_PIPE_WAIT);
120 CASE(WS_SIO_ADDRESS_LIST_CHANGE);
121 default: fprintf( stderr, "%s%08x", prefix, *code ); break;
122 #undef CASE
126 static void dump_cpu_type( const char *prefix, const cpu_type_t *code )
128 switch (*code)
130 #define CASE(c) case CPU_##c: fprintf( stderr, "%s%s", prefix, #c ); break
131 CASE(x86);
132 CASE(x86_64);
133 CASE(POWERPC);
134 CASE(ARM);
135 CASE(ARM64);
136 default: fprintf( stderr, "%s%u", prefix, *code ); break;
137 #undef CASE
141 static void dump_apc_call( const char *prefix, const apc_call_t *call )
143 fprintf( stderr, "%s{", prefix );
144 switch(call->type)
146 case APC_NONE:
147 fprintf( stderr, "APC_NONE" );
148 break;
149 case APC_USER:
150 dump_uint64( "APC_USER,func=", &call->user.func );
151 dump_uint64( ",args={", &call->user.args[0] );
152 dump_uint64( ",", &call->user.args[1] );
153 dump_uint64( ",", &call->user.args[2] );
154 fputc( '}', stderr );
155 break;
156 case APC_TIMER:
157 dump_timeout( "APC_TIMER,time=", &call->timer.time );
158 dump_uint64( ",arg=", &call->timer.arg );
159 break;
160 case APC_ASYNC_IO:
161 dump_uint64( "APC_ASYNC_IO,func=", &call->async_io.func );
162 dump_uint64( ",user=", &call->async_io.user );
163 dump_uint64( ",sb=", &call->async_io.sb );
164 fprintf( stderr, ",status=%s", get_status_name(call->async_io.status) );
165 break;
166 case APC_VIRTUAL_ALLOC:
167 dump_uint64( "APC_VIRTUAL_ALLOC,addr==", &call->virtual_alloc.addr );
168 dump_uint64( ",size=", &call->virtual_alloc.size );
169 fprintf( stderr, ",zero_bits=%u,op_type=%x,prot=%x",
170 call->virtual_alloc.zero_bits, call->virtual_alloc.op_type,
171 call->virtual_alloc.prot );
172 break;
173 case APC_VIRTUAL_FREE:
174 dump_uint64( "APC_VIRTUAL_FREE,addr=", &call->virtual_free.addr );
175 dump_uint64( ",size=", &call->virtual_free.size );
176 fprintf( stderr, ",op_type=%x", call->virtual_free.op_type );
177 break;
178 case APC_VIRTUAL_QUERY:
179 dump_uint64( "APC_VIRTUAL_QUERY,addr=", &call->virtual_query.addr );
180 break;
181 case APC_VIRTUAL_PROTECT:
182 dump_uint64( "APC_VIRTUAL_PROTECT,addr=", &call->virtual_protect.addr );
183 dump_uint64( ",size=", &call->virtual_protect.size );
184 fprintf( stderr, ",prot=%x", call->virtual_protect.prot );
185 break;
186 case APC_VIRTUAL_FLUSH:
187 dump_uint64( "APC_VIRTUAL_FLUSH,addr=", &call->virtual_flush.addr );
188 dump_uint64( ",size=", &call->virtual_flush.size );
189 break;
190 case APC_VIRTUAL_LOCK:
191 dump_uint64( "APC_VIRTUAL_LOCK,addr=", &call->virtual_lock.addr );
192 dump_uint64( ",size=", &call->virtual_lock.size );
193 break;
194 case APC_VIRTUAL_UNLOCK:
195 dump_uint64( "APC_VIRTUAL_UNLOCK,addr=", &call->virtual_unlock.addr );
196 dump_uint64( ",size=", &call->virtual_unlock.size );
197 break;
198 case APC_MAP_VIEW:
199 fprintf( stderr, "APC_MAP_VIEW,handle=%04x", call->map_view.handle );
200 dump_uint64( ",addr=", &call->map_view.addr );
201 dump_uint64( ",size=", &call->map_view.size );
202 dump_uint64( ",offset=", &call->map_view.offset );
203 fprintf( stderr, ",zero_bits=%u,alloc_type=%x,prot=%x",
204 call->map_view.zero_bits, call->map_view.alloc_type, call->map_view.prot );
205 break;
206 case APC_UNMAP_VIEW:
207 dump_uint64( "APC_UNMAP_VIEW,addr=", &call->unmap_view.addr );
208 break;
209 case APC_CREATE_THREAD:
210 dump_uint64( "APC_CREATE_THREAD,func=", &call->create_thread.func );
211 dump_uint64( ",arg=", &call->create_thread.arg );
212 dump_uint64( ",reserve=", &call->create_thread.reserve );
213 dump_uint64( ",commit=", &call->create_thread.commit );
214 fprintf( stderr, ",suspend=%u", call->create_thread.suspend );
215 break;
216 default:
217 fprintf( stderr, "type=%u", call->type );
218 break;
220 fputc( '}', stderr );
223 static void dump_apc_result( const char *prefix, const apc_result_t *result )
225 fprintf( stderr, "%s{", prefix );
226 switch(result->type)
228 case APC_NONE:
229 break;
230 case APC_ASYNC_IO:
231 fprintf( stderr, "APC_ASYNC_IO,status=%s,total=%u",
232 get_status_name( result->async_io.status ), result->async_io.total );
233 dump_uint64( ",apc=", &result->async_io.apc );
234 dump_uint64( ",arg=", &result->async_io.arg );
235 break;
236 case APC_VIRTUAL_ALLOC:
237 fprintf( stderr, "APC_VIRTUAL_ALLOC,status=%s",
238 get_status_name( result->virtual_alloc.status ));
239 dump_uint64( ",addr=", &result->virtual_alloc.addr );
240 dump_uint64( ",size=", &result->virtual_alloc.size );
241 break;
242 case APC_VIRTUAL_FREE:
243 fprintf( stderr, "APC_VIRTUAL_FREE,status=%s",
244 get_status_name( result->virtual_free.status ));
245 dump_uint64( ",addr=", &result->virtual_free.addr );
246 dump_uint64( ",size=", &result->virtual_free.size );
247 break;
248 case APC_VIRTUAL_QUERY:
249 fprintf( stderr, "APC_VIRTUAL_QUERY,status=%s",
250 get_status_name( result->virtual_query.status ));
251 dump_uint64( ",base=", &result->virtual_query.base );
252 dump_uint64( ",alloc_base=", &result->virtual_query.alloc_base );
253 dump_uint64( ",size=", &result->virtual_query.size );
254 fprintf( stderr, ",state=%x,prot=%x,alloc_prot=%x,alloc_type=%x",
255 result->virtual_query.state, result->virtual_query.prot,
256 result->virtual_query.alloc_prot, result->virtual_query.alloc_type );
257 break;
258 case APC_VIRTUAL_PROTECT:
259 fprintf( stderr, "APC_VIRTUAL_PROTECT,status=%s",
260 get_status_name( result->virtual_protect.status ));
261 dump_uint64( ",addr=", &result->virtual_protect.addr );
262 dump_uint64( ",size=", &result->virtual_protect.size );
263 fprintf( stderr, ",prot=%x", result->virtual_protect.prot );
264 break;
265 case APC_VIRTUAL_FLUSH:
266 fprintf( stderr, "APC_VIRTUAL_FLUSH,status=%s",
267 get_status_name( result->virtual_flush.status ));
268 dump_uint64( ",addr=", &result->virtual_flush.addr );
269 dump_uint64( ",size=", &result->virtual_flush.size );
270 break;
271 case APC_VIRTUAL_LOCK:
272 fprintf( stderr, "APC_VIRTUAL_LOCK,status=%s",
273 get_status_name( result->virtual_lock.status ));
274 dump_uint64( ",addr=", &result->virtual_lock.addr );
275 dump_uint64( ",size=", &result->virtual_lock.size );
276 break;
277 case APC_VIRTUAL_UNLOCK:
278 fprintf( stderr, "APC_VIRTUAL_UNLOCK,status=%s",
279 get_status_name( result->virtual_unlock.status ));
280 dump_uint64( ",addr=", &result->virtual_unlock.addr );
281 dump_uint64( ",size=", &result->virtual_unlock.size );
282 break;
283 case APC_MAP_VIEW:
284 fprintf( stderr, "APC_MAP_VIEW,status=%s",
285 get_status_name( result->map_view.status ));
286 dump_uint64( ",addr=", &result->map_view.addr );
287 dump_uint64( ",size=", &result->map_view.size );
288 break;
289 case APC_UNMAP_VIEW:
290 fprintf( stderr, "APC_UNMAP_VIEW,status=%s",
291 get_status_name( result->unmap_view.status ) );
292 break;
293 case APC_CREATE_THREAD:
294 fprintf( stderr, "APC_CREATE_THREAD,status=%s,tid=%04x,handle=%04x",
295 get_status_name( result->create_thread.status ),
296 result->create_thread.tid, result->create_thread.handle );
297 break;
298 default:
299 fprintf( stderr, "type=%u", result->type );
300 break;
302 fputc( '}', stderr );
305 static void dump_async_data( const char *prefix, const async_data_t *data )
307 fprintf( stderr, "%s{handle=%04x,event=%04x", prefix, data->handle, data->event );
308 dump_uint64( ",callback=", &data->callback );
309 dump_uint64( ",iosb=", &data->iosb );
310 dump_uint64( ",arg=", &data->arg );
311 dump_uint64( ",cvalue=", &data->cvalue );
312 fputc( '}', stderr );
315 static void dump_irp_params( const char *prefix, const irp_params_t *data )
317 switch (data->major)
319 case IRP_MJ_CREATE:
320 fprintf( stderr, "%s{major=CREATE,access=%08x,sharing=%08x,options=%08x",
321 prefix, data->create.access, data->create.sharing, data->create.options );
322 dump_uint64( ",device=", &data->create.device );
323 fputc( '}', stderr );
324 break;
325 case IRP_MJ_CLOSE:
326 fprintf( stderr, "%s{major=CLOSE", prefix );
327 dump_uint64( ",file=", &data->close.file );
328 fputc( '}', stderr );
329 break;
330 case IRP_MJ_READ:
331 fprintf( stderr, "%s{major=READ,key=%08x", prefix, data->read.key );
332 dump_uint64( ",pos=", &data->read.pos );
333 dump_uint64( ",file=", &data->read.file );
334 fputc( '}', stderr );
335 break;
336 case IRP_MJ_WRITE:
337 fprintf( stderr, "%s{major=WRITE,key=%08x", prefix, data->write.key );
338 dump_uint64( ",pos=", &data->write.pos );
339 dump_uint64( ",file=", &data->write.file );
340 fputc( '}', stderr );
341 break;
342 case IRP_MJ_FLUSH_BUFFERS:
343 fprintf( stderr, "%s{major=FLUSH_BUFFERS", prefix );
344 dump_uint64( ",file=", &data->flush.file );
345 fputc( '}', stderr );
346 break;
347 case IRP_MJ_DEVICE_CONTROL:
348 fprintf( stderr, "%s{major=DEVICE_CONTROL", prefix );
349 dump_ioctl_code( ",code=", &data->ioctl.code );
350 dump_uint64( ",file=", &data->ioctl.file );
351 fputc( '}', stderr );
352 break;
353 case IRP_MJ_MAXIMUM_FUNCTION + 1: /* invalid */
354 fprintf( stderr, "%s{}", prefix );
355 break;
356 default:
357 fprintf( stderr, "%s{major=%u}", prefix, data->major );
358 break;
362 static void dump_hw_input( const char *prefix, const hw_input_t *input )
364 switch (input->type)
366 case INPUT_MOUSE:
367 fprintf( stderr, "%s{type=MOUSE,x=%d,y=%d,data=%08x,flags=%08x,time=%u",
368 prefix, input->mouse.x, input->mouse.y, input->mouse.data, input->mouse.flags,
369 input->mouse.time );
370 dump_uint64( ",info=", &input->mouse.info );
371 fputc( '}', stderr );
372 break;
373 case INPUT_KEYBOARD:
374 fprintf( stderr, "%s{type=KEYBOARD,vkey=%04hx,scan=%04hx,flags=%08x,time=%u",
375 prefix, input->kbd.vkey, input->kbd.scan, input->kbd.flags, input->kbd.time );
376 dump_uint64( ",info=", &input->kbd.info );
377 fputc( '}', stderr );
378 break;
379 case INPUT_HARDWARE:
380 fprintf( stderr, "%s{type=HARDWARE,msg=%04x", prefix, input->hw.msg );
381 dump_uint64( ",lparam=", &input->hw.lparam );
382 fputc( '}', stderr );
383 break;
384 default:
385 fprintf( stderr, "%s{type=%04x}", prefix, input->type );
386 break;
390 static void dump_luid( const char *prefix, const luid_t *luid )
392 fprintf( stderr, "%s%d.%u", prefix, luid->high_part, luid->low_part );
395 static void dump_varargs_ints( const char *prefix, data_size_t size )
397 const int *data = cur_data;
398 data_size_t len = size / sizeof(*data);
400 fprintf( stderr,"%s{", prefix );
401 while (len > 0)
403 fprintf( stderr, "%d", *data++ );
404 if (--len) fputc( ',', stderr );
406 fputc( '}', stderr );
407 remove_data( size );
410 static void dump_varargs_uints64( const char *prefix, data_size_t size )
412 const unsigned __int64 *data = cur_data;
413 data_size_t len = size / sizeof(*data);
415 fprintf( stderr,"%s{", prefix );
416 while (len > 0)
418 dump_uint64( "", data++ );
419 if (--len) fputc( ',', stderr );
421 fputc( '}', stderr );
422 remove_data( size );
425 static void dump_varargs_apc_result( const char *prefix, data_size_t size )
427 const apc_result_t *result = cur_data;
429 if (size >= sizeof(*result))
431 dump_apc_result( prefix, result );
432 size = sizeof(*result);
434 remove_data( size );
437 static void dump_varargs_select_op( const char *prefix, data_size_t size )
439 select_op_t data;
441 if (!size)
443 fprintf( stderr, "%s{}", prefix );
444 return;
446 memset( &data, 0, sizeof(data) );
447 memcpy( &data, cur_data, min( size, sizeof(data) ));
449 fprintf( stderr, "%s{", prefix );
450 switch (data.op)
452 case SELECT_NONE:
453 fprintf( stderr, "NONE" );
454 break;
455 case SELECT_WAIT:
456 case SELECT_WAIT_ALL:
457 fprintf( stderr, "%s", data.op == SELECT_WAIT ? "WAIT" : "WAIT_ALL" );
458 if (size > offsetof( select_op_t, wait.handles ))
459 dump_handles( ",handles=", data.wait.handles,
460 min( size, sizeof(data.wait) ) - offsetof( select_op_t, wait.handles ));
461 break;
462 case SELECT_SIGNAL_AND_WAIT:
463 fprintf( stderr, "SIGNAL_AND_WAIT,signal=%04x,wait=%04x",
464 data.signal_and_wait.signal, data.signal_and_wait.wait );
465 break;
466 case SELECT_KEYED_EVENT_WAIT:
467 case SELECT_KEYED_EVENT_RELEASE:
468 fprintf( stderr, "KEYED_EVENT_%s,handle=%04x",
469 data.op == SELECT_KEYED_EVENT_WAIT ? "WAIT" : "RELEASE",
470 data.keyed_event.handle );
471 dump_uint64( ",key=", &data.keyed_event.key );
472 break;
473 default:
474 fprintf( stderr, "op=%u", data.op );
475 break;
477 fputc( '}', stderr );
478 remove_data( size );
481 static void dump_varargs_user_handles( const char *prefix, data_size_t size )
483 const user_handle_t *data = cur_data;
484 data_size_t len = size / sizeof(*data);
486 fprintf( stderr,"%s{", prefix );
487 while (len > 0)
489 fprintf( stderr, "%08x", *data++ );
490 if (--len) fputc( ',', stderr );
492 fputc( '}', stderr );
493 remove_data( size );
496 static void dump_varargs_bytes( const char *prefix, data_size_t size )
498 const unsigned char *data = cur_data;
499 data_size_t len = min( 1024, size );
501 fprintf( stderr,"%s{", prefix );
502 while (len > 0)
504 fprintf( stderr, "%02x", *data++ );
505 if (--len) fputc( ',', stderr );
507 if (size > 1024) fprintf( stderr, "...(total %u)", size );
508 fputc( '}', stderr );
509 remove_data( size );
512 static void dump_varargs_string( const char *prefix, data_size_t size )
514 fprintf( stderr, "%s\"%.*s\"", prefix, (int)size, (const char *)cur_data );
515 remove_data( size );
518 static void dump_varargs_unicode_str( const char *prefix, data_size_t size )
520 fprintf( stderr, "%sL\"", prefix );
521 dump_strW( cur_data, size / sizeof(WCHAR), stderr, "\"\"" );
522 fputc( '\"', stderr );
523 remove_data( size );
526 static void dump_varargs_context( const char *prefix, data_size_t size )
528 const context_t *context = cur_data;
529 context_t ctx;
530 unsigned int i;
532 if (!size)
534 fprintf( stderr, "%s{}", prefix );
535 return;
537 size = min( size, sizeof(ctx) );
538 memset( &ctx, 0, sizeof(ctx) );
539 memcpy( &ctx, context, size );
541 fprintf( stderr,"%s{", prefix );
542 dump_cpu_type( "cpu=", &ctx.cpu );
543 switch (ctx.cpu)
545 case CPU_x86:
546 if (ctx.flags & SERVER_CTX_CONTROL)
547 fprintf( stderr, ",eip=%08x,esp=%08x,ebp=%08x,eflags=%08x,cs=%04x,ss=%04x",
548 ctx.ctl.i386_regs.eip, ctx.ctl.i386_regs.esp, ctx.ctl.i386_regs.ebp,
549 ctx.ctl.i386_regs.eflags, ctx.ctl.i386_regs.cs, ctx.ctl.i386_regs.ss );
550 if (ctx.flags & SERVER_CTX_SEGMENTS)
551 fprintf( stderr, ",ds=%04x,es=%04x,fs=%04x,gs=%04x",
552 ctx.seg.i386_regs.ds, ctx.seg.i386_regs.es,
553 ctx.seg.i386_regs.fs, ctx.seg.i386_regs.gs );
554 if (ctx.flags & SERVER_CTX_INTEGER)
555 fprintf( stderr, ",eax=%08x,ebx=%08x,ecx=%08x,edx=%08x,esi=%08x,edi=%08x",
556 ctx.integer.i386_regs.eax, ctx.integer.i386_regs.ebx, ctx.integer.i386_regs.ecx,
557 ctx.integer.i386_regs.edx, ctx.integer.i386_regs.esi, ctx.integer.i386_regs.edi );
558 if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
559 fprintf( stderr, ",dr0=%08x,dr1=%08x,dr2=%08x,dr3=%08x,dr6=%08x,dr7=%08x",
560 ctx.debug.i386_regs.dr0, ctx.debug.i386_regs.dr1, ctx.debug.i386_regs.dr2,
561 ctx.debug.i386_regs.dr3, ctx.debug.i386_regs.dr6, ctx.debug.i386_regs.dr7 );
562 if (ctx.flags & SERVER_CTX_FLOATING_POINT)
564 fprintf( stderr, ",fp.ctrl=%08x,fp.status=%08x,fp.tag=%08x,fp.err_off=%08x,fp.err_sel=%08x",
565 ctx.fp.i386_regs.ctrl, ctx.fp.i386_regs.status, ctx.fp.i386_regs.tag,
566 ctx.fp.i386_regs.err_off, ctx.fp.i386_regs.err_sel );
567 fprintf( stderr, ",fp.data_off=%08x,fp.data_sel=%08x,fp.cr0npx=%08x",
568 ctx.fp.i386_regs.data_off, ctx.fp.i386_regs.data_sel, ctx.fp.i386_regs.cr0npx );
569 for (i = 0; i < 8; i++)
570 fprintf( stderr, ",fp.reg%u=%Lg", i, *(long double *)&ctx.fp.i386_regs.regs[10*i] );
572 if (ctx.flags & SERVER_CTX_EXTENDED_REGISTERS)
574 fprintf( stderr, ",extended=" );
575 dump_uints( (const int *)ctx.ext.i386_regs, sizeof(ctx.ext.i386_regs) / sizeof(int) );
577 break;
578 case CPU_x86_64:
579 if (ctx.flags & SERVER_CTX_CONTROL)
581 dump_uint64( ",rip=", &ctx.ctl.x86_64_regs.rip );
582 dump_uint64( ",rbp=", &ctx.ctl.x86_64_regs.rbp );
583 dump_uint64( ",rsp=", &ctx.ctl.x86_64_regs.rsp );
584 fprintf( stderr, ",cs=%04x,ss=%04x,flags=%08x",
585 ctx.ctl.x86_64_regs.cs, ctx.ctl.x86_64_regs.ss, ctx.ctl.x86_64_regs.flags );
587 if (ctx.flags & SERVER_CTX_INTEGER)
589 dump_uint64( ",rax=", &ctx.integer.x86_64_regs.rax );
590 dump_uint64( ",rbx=", &ctx.integer.x86_64_regs.rbx );
591 dump_uint64( ",rcx=", &ctx.integer.x86_64_regs.rcx );
592 dump_uint64( ",rdx=", &ctx.integer.x86_64_regs.rdx );
593 dump_uint64( ",rsi=", &ctx.integer.x86_64_regs.rsi );
594 dump_uint64( ",rdi=", &ctx.integer.x86_64_regs.rdi );
595 dump_uint64( ",r8=", &ctx.integer.x86_64_regs.r8 );
596 dump_uint64( ",r9=", &ctx.integer.x86_64_regs.r9 );
597 dump_uint64( ",r10=", &ctx.integer.x86_64_regs.r10 );
598 dump_uint64( ",r11=", &ctx.integer.x86_64_regs.r11 );
599 dump_uint64( ",r12=", &ctx.integer.x86_64_regs.r12 );
600 dump_uint64( ",r13=", &ctx.integer.x86_64_regs.r13 );
601 dump_uint64( ",r14=", &ctx.integer.x86_64_regs.r14 );
602 dump_uint64( ",r15=", &ctx.integer.x86_64_regs.r15 );
604 if (ctx.flags & SERVER_CTX_SEGMENTS)
605 fprintf( stderr, ",ds=%04x,es=%04x,fs=%04x,gs=%04x",
606 ctx.seg.x86_64_regs.ds, ctx.seg.x86_64_regs.es,
607 ctx.seg.x86_64_regs.fs, ctx.seg.x86_64_regs.gs );
608 if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
610 dump_uint64( ",dr0=", &ctx.debug.x86_64_regs.dr0 );
611 dump_uint64( ",dr1=", &ctx.debug.x86_64_regs.dr1 );
612 dump_uint64( ",dr2=", &ctx.debug.x86_64_regs.dr2 );
613 dump_uint64( ",dr3=", &ctx.debug.x86_64_regs.dr3 );
614 dump_uint64( ",dr6=", &ctx.debug.x86_64_regs.dr6 );
615 dump_uint64( ",dr7=", &ctx.debug.x86_64_regs.dr7 );
617 if (ctx.flags & SERVER_CTX_FLOATING_POINT)
619 for (i = 0; i < 32; i++)
620 fprintf( stderr, ",fp%u=%08x%08x%08x%08x", i,
621 (unsigned int)(ctx.fp.x86_64_regs.fpregs[i].high >> 32),
622 (unsigned int)ctx.fp.x86_64_regs.fpregs[i].high,
623 (unsigned int)(ctx.fp.x86_64_regs.fpregs[i].low >> 32),
624 (unsigned int)ctx.fp.x86_64_regs.fpregs[i].low );
626 break;
627 case CPU_POWERPC:
628 if (ctx.flags & SERVER_CTX_CONTROL)
629 fprintf( stderr, ",iar=%08x,msr=%08x,ctr=%08x,lr=%08x,dar=%08x,dsisr=%08x,trap=%08x",
630 ctx.ctl.powerpc_regs.iar, ctx.ctl.powerpc_regs.msr, ctx.ctl.powerpc_regs.ctr,
631 ctx.ctl.powerpc_regs.lr, ctx.ctl.powerpc_regs.dar, ctx.ctl.powerpc_regs.dsisr,
632 ctx.ctl.powerpc_regs.trap );
633 if (ctx.flags & SERVER_CTX_INTEGER)
635 for (i = 0; i < 32; i++) fprintf( stderr, ",gpr%u=%08x", i, ctx.integer.powerpc_regs.gpr[i] );
636 fprintf( stderr, ",cr=%08x,xer=%08x",
637 ctx.integer.powerpc_regs.cr, ctx.integer.powerpc_regs.xer );
639 if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
640 for (i = 0; i < 8; i++) fprintf( stderr, ",dr%u=%08x", i, ctx.debug.powerpc_regs.dr[i] );
641 if (ctx.flags & SERVER_CTX_FLOATING_POINT)
643 for (i = 0; i < 32; i++) fprintf( stderr, ",fpr%u=%g", i, ctx.fp.powerpc_regs.fpr[i] );
644 fprintf( stderr, ",fpscr=%g", ctx.fp.powerpc_regs.fpscr );
646 break;
647 case CPU_ARM:
648 if (ctx.flags & SERVER_CTX_CONTROL)
649 fprintf( stderr, ",sp=%08x,lr=%08x,pc=%08x,cpsr=%08x",
650 ctx.ctl.arm_regs.sp, ctx.ctl.arm_regs.lr,
651 ctx.ctl.arm_regs.pc, ctx.ctl.arm_regs.cpsr );
652 if (ctx.flags & SERVER_CTX_INTEGER)
653 for (i = 0; i < 13; i++) fprintf( stderr, ",r%u=%08x", i, ctx.integer.arm_regs.r[i] );
654 break;
655 case CPU_ARM64:
656 if (ctx.flags & SERVER_CTX_CONTROL)
658 dump_uint64( ",sp=", &ctx.ctl.arm64_regs.sp );
659 dump_uint64( ",pc=", &ctx.ctl.arm64_regs.pc );
660 dump_uint64( ",pstate=", &ctx.ctl.arm64_regs.pstate );
662 if (ctx.flags & SERVER_CTX_INTEGER)
664 dump_uint64( ",x0=", &ctx.integer.arm64_regs.x[0] );
665 dump_uint64( ",x1=", &ctx.integer.arm64_regs.x[1] );
666 dump_uint64( ",x2=", &ctx.integer.arm64_regs.x[2] );
667 dump_uint64( ",x3=", &ctx.integer.arm64_regs.x[3] );
668 dump_uint64( ",x4=", &ctx.integer.arm64_regs.x[4] );
669 dump_uint64( ",x5=", &ctx.integer.arm64_regs.x[5] );
670 dump_uint64( ",x6=", &ctx.integer.arm64_regs.x[6] );
671 dump_uint64( ",x7=", &ctx.integer.arm64_regs.x[7] );
672 dump_uint64( ",x8=", &ctx.integer.arm64_regs.x[8] );
673 dump_uint64( ",x9=", &ctx.integer.arm64_regs.x[9] );
674 dump_uint64( ",x10=", &ctx.integer.arm64_regs.x[10] );
675 dump_uint64( ",x11=", &ctx.integer.arm64_regs.x[11] );
676 dump_uint64( ",x12=", &ctx.integer.arm64_regs.x[12] );
677 dump_uint64( ",x13=", &ctx.integer.arm64_regs.x[13] );
678 dump_uint64( ",x14=", &ctx.integer.arm64_regs.x[14] );
679 dump_uint64( ",x15=", &ctx.integer.arm64_regs.x[15] );
680 dump_uint64( ",x16=", &ctx.integer.arm64_regs.x[16] );
681 dump_uint64( ",x17=", &ctx.integer.arm64_regs.x[17] );
682 dump_uint64( ",x18=", &ctx.integer.arm64_regs.x[18] );
683 dump_uint64( ",x19=", &ctx.integer.arm64_regs.x[19] );
684 dump_uint64( ",x20=", &ctx.integer.arm64_regs.x[20] );
685 dump_uint64( ",x21=", &ctx.integer.arm64_regs.x[21] );
686 dump_uint64( ",x22=", &ctx.integer.arm64_regs.x[22] );
687 dump_uint64( ",x23=", &ctx.integer.arm64_regs.x[23] );
688 dump_uint64( ",x24=", &ctx.integer.arm64_regs.x[24] );
689 dump_uint64( ",x25=", &ctx.integer.arm64_regs.x[25] );
690 dump_uint64( ",x26=", &ctx.integer.arm64_regs.x[26] );
691 dump_uint64( ",x27=", &ctx.integer.arm64_regs.x[27] );
692 dump_uint64( ",x28=", &ctx.integer.arm64_regs.x[28] );
693 dump_uint64( ",x29=", &ctx.integer.arm64_regs.x[29] );
694 dump_uint64( ",x30=", &ctx.integer.arm64_regs.x[30] );
696 break;
698 fputc( '}', stderr );
699 remove_data( size );
702 static void dump_varargs_debug_event( const char *prefix, data_size_t size )
704 debug_event_t event;
705 unsigned int i;
707 if (!size)
709 fprintf( stderr, "%s{}", prefix );
710 return;
712 size = min( size, sizeof(event) );
713 memset( &event, 0, sizeof(event) );
714 memcpy( &event, cur_data, size );
716 switch(event.code)
718 case EXCEPTION_DEBUG_EVENT:
719 fprintf( stderr, "%s{exception,first=%d,exc_code=%08x,flags=%08x", prefix,
720 event.exception.first, event.exception.exc_code, event.exception.flags );
721 dump_uint64( ",record=", &event.exception.record );
722 dump_uint64( ",address=", &event.exception.address );
723 fprintf( stderr, ",params={" );
724 event.exception.nb_params = min( event.exception.nb_params, EXCEPTION_MAXIMUM_PARAMETERS );
725 for (i = 0; i < event.exception.nb_params; i++)
727 dump_uint64( "", &event.exception.params[i] );
728 if (i < event.exception.nb_params) fputc( ',', stderr );
730 fprintf( stderr, "}}" );
731 break;
732 case CREATE_THREAD_DEBUG_EVENT:
733 fprintf( stderr, "%s{create_thread,thread=%04x", prefix, event.create_thread.handle );
734 dump_uint64( ",teb=", &event.create_thread.teb );
735 dump_uint64( ",start=", &event.create_thread.start );
736 fputc( '}', stderr );
737 break;
738 case CREATE_PROCESS_DEBUG_EVENT:
739 fprintf( stderr, "%s{create_process,file=%04x,process=%04x,thread=%04x", prefix,
740 event.create_process.file, event.create_process.process,
741 event.create_process.thread );
742 dump_uint64( ",base=", &event.create_process.base );
743 fprintf( stderr, ",offset=%d,size=%d",
744 event.create_process.dbg_offset, event.create_process.dbg_size );
745 dump_uint64( ",teb=", &event.create_process.teb );
746 dump_uint64( ",start=", &event.create_process.start );
747 dump_uint64( ",name=", &event.create_process.name );
748 fprintf( stderr, ",unicode=%d}", event.create_process.unicode );
749 break;
750 case EXIT_THREAD_DEBUG_EVENT:
751 fprintf( stderr, "%s{exit_thread,code=%d}", prefix, event.exit.exit_code );
752 break;
753 case EXIT_PROCESS_DEBUG_EVENT:
754 fprintf( stderr, "%s{exit_process,code=%d}", prefix, event.exit.exit_code );
755 break;
756 case LOAD_DLL_DEBUG_EVENT:
757 fprintf( stderr, "%s{load_dll,file=%04x", prefix, event.load_dll.handle );
758 dump_uint64( ",base=", &event.load_dll.base );
759 fprintf( stderr, ",offset=%d,size=%d",
760 event.load_dll.dbg_offset, event.load_dll.dbg_size );
761 dump_uint64( ",name=", &event.load_dll.name );
762 fprintf( stderr, ",unicode=%d}", event.load_dll.unicode );
763 break;
764 case UNLOAD_DLL_DEBUG_EVENT:
765 fprintf( stderr, "%s{unload_dll", prefix );
766 dump_uint64( ",base=", &event.unload_dll.base );
767 fputc( '}', stderr );
768 break;
769 case 0: /* zero is the code returned on timeouts */
770 fprintf( stderr, "%s{}", prefix );
771 break;
772 default:
773 fprintf( stderr, "%s{code=??? (%d)}", prefix, event.code );
774 break;
776 remove_data( size );
779 /* dump a unicode string contained in a buffer; helper for dump_varargs_startup_info */
780 static data_size_t dump_inline_unicode_string( const char *prefix, data_size_t pos, data_size_t len, data_size_t total_size )
782 fputs( prefix, stderr );
783 if (pos >= total_size) return pos;
784 if (len > total_size - pos) len = total_size - pos;
785 len /= sizeof(WCHAR);
786 dump_strW( (const WCHAR *)cur_data + pos/sizeof(WCHAR), len, stderr, "\"\"" );
787 return pos + len * sizeof(WCHAR);
790 static void dump_varargs_startup_info( const char *prefix, data_size_t size )
792 startup_info_t info;
793 data_size_t pos = sizeof(info);
795 memset( &info, 0, sizeof(info) );
796 memcpy( &info, cur_data, min( size, sizeof(info) ));
798 fprintf( stderr,
799 "%s{debug_flags=%x,console_flags=%x,console=%04x,hstdin=%04x,hstdout=%04x,hstderr=%04x,"
800 "x=%u,y=%u,xsize=%u,ysize=%u,xchars=%u,ychars=%u,attribute=%02x,flags=%x,show=%u",
801 prefix, info.debug_flags, info.console_flags, info.console,
802 info.hstdin, info.hstdout, info.hstderr, info.x, info.y, info.xsize, info.ysize,
803 info.xchars, info.ychars, info.attribute, info.flags, info.show );
804 pos = dump_inline_unicode_string( ",curdir=L\"", pos, info.curdir_len, size );
805 pos = dump_inline_unicode_string( "\",dllpath=L\"", pos, info.dllpath_len, size );
806 pos = dump_inline_unicode_string( "\",imagepath=L\"", pos, info.imagepath_len, size );
807 pos = dump_inline_unicode_string( "\",cmdline=L\"", pos, info.cmdline_len, size );
808 pos = dump_inline_unicode_string( "\",title=L\"", pos, info.title_len, size );
809 pos = dump_inline_unicode_string( "\",desktop=L\"", pos, info.desktop_len, size );
810 pos = dump_inline_unicode_string( "\",shellinfo=L\"", pos, info.shellinfo_len, size );
811 pos = dump_inline_unicode_string( "\",runtime=L\"", pos, info.runtime_len, size );
812 fprintf( stderr, "\"}" );
813 remove_data( size );
816 static void dump_varargs_input_records( const char *prefix, data_size_t size )
818 const INPUT_RECORD *rec = cur_data;
819 data_size_t len = size / sizeof(*rec);
821 fprintf( stderr,"%s{", prefix );
822 while (len > 0)
824 fprintf( stderr, "{%04x,...}", rec->EventType );
825 rec++;
826 if (--len) fputc( ',', stderr );
828 fputc( '}', stderr );
829 remove_data( size );
832 static void dump_varargs_rectangles( const char *prefix, data_size_t size )
834 const rectangle_t *rect = cur_data;
835 data_size_t len = size / sizeof(*rect);
837 fprintf( stderr,"%s{", prefix );
838 while (len > 0)
840 dump_rectangle( "", rect++ );
841 if (--len) fputc( ',', stderr );
843 fputc( '}', stderr );
844 remove_data( size );
847 static void dump_varargs_message_data( const char *prefix, data_size_t size )
849 /* FIXME: dump the structured data */
850 dump_varargs_bytes( prefix, size );
853 static void dump_varargs_properties( const char *prefix, data_size_t size )
855 const property_data_t *prop = cur_data;
856 data_size_t len = size / sizeof(*prop);
858 fprintf( stderr,"%s{", prefix );
859 while (len > 0)
861 fprintf( stderr, "{atom=%04x,str=%d", prop->atom, prop->string );
862 dump_uint64( ",data=", &prop->data );
863 fputc( '}', stderr );
864 prop++;
865 if (--len) fputc( ',', stderr );
867 fputc( '}', stderr );
868 remove_data( size );
871 static void dump_varargs_LUID_AND_ATTRIBUTES( const char *prefix, data_size_t size )
873 const LUID_AND_ATTRIBUTES *lat = cur_data;
874 data_size_t len = size / sizeof(*lat);
876 fprintf( stderr,"%s{", prefix );
877 while (len > 0)
879 fprintf( stderr, "{luid=%08x%08x,attr=%x}",
880 lat->Luid.HighPart, lat->Luid.LowPart, lat->Attributes );
881 lat++;
882 if (--len) fputc( ',', stderr );
884 fputc( '}', stderr );
885 remove_data( size );
888 static void dump_inline_sid( const char *prefix, const SID *sid, data_size_t size )
890 DWORD i;
892 /* security check */
893 if ((FIELD_OFFSET(SID, SubAuthority[0]) > size) ||
894 (FIELD_OFFSET(SID, SubAuthority[sid->SubAuthorityCount]) > size))
896 fprintf( stderr, "<invalid sid>" );
897 return;
900 fprintf( stderr,"%s{", prefix );
901 fprintf( stderr, "S-%u-%u", sid->Revision, MAKELONG(
902 MAKEWORD( sid->IdentifierAuthority.Value[5],
903 sid->IdentifierAuthority.Value[4] ),
904 MAKEWORD( sid->IdentifierAuthority.Value[3],
905 sid->IdentifierAuthority.Value[2] ) ) );
906 for (i = 0; i < sid->SubAuthorityCount; i++)
907 fprintf( stderr, "-%u", sid->SubAuthority[i] );
908 fputc( '}', stderr );
911 static void dump_varargs_SID( const char *prefix, data_size_t size )
913 const SID *sid = cur_data;
914 dump_inline_sid( prefix, sid, size );
915 remove_data( size );
918 static void dump_inline_acl( const char *prefix, const ACL *acl, data_size_t size )
920 const ACE_HEADER *ace;
921 ULONG i;
923 fprintf( stderr,"%s{", prefix );
924 if (size)
926 if (size < sizeof(ACL))
928 fprintf( stderr, "<invalid acl>}" );
929 return;
931 size -= sizeof(ACL);
932 ace = (const ACE_HEADER *)(acl + 1);
933 for (i = 0; i < acl->AceCount; i++)
935 const SID *sid = NULL;
936 data_size_t sid_size = 0;
938 if (size < sizeof(ACE_HEADER) || size < ace->AceSize) break;
939 size -= ace->AceSize;
940 if (i != 0) fputc( ',', stderr );
941 fprintf( stderr, "{AceType=" );
942 switch (ace->AceType)
944 case ACCESS_DENIED_ACE_TYPE:
945 sid = (const SID *)&((const ACCESS_DENIED_ACE *)ace)->SidStart;
946 sid_size = ace->AceSize - FIELD_OFFSET(ACCESS_DENIED_ACE, SidStart);
947 fprintf( stderr, "ACCESS_DENIED_ACE_TYPE,Mask=%x",
948 ((const ACCESS_DENIED_ACE *)ace)->Mask );
949 break;
950 case ACCESS_ALLOWED_ACE_TYPE:
951 sid = (const SID *)&((const ACCESS_ALLOWED_ACE *)ace)->SidStart;
952 sid_size = ace->AceSize - FIELD_OFFSET(ACCESS_ALLOWED_ACE, SidStart);
953 fprintf( stderr, "ACCESS_ALLOWED_ACE_TYPE,Mask=%x",
954 ((const ACCESS_ALLOWED_ACE *)ace)->Mask );
955 break;
956 case SYSTEM_AUDIT_ACE_TYPE:
957 sid = (const SID *)&((const SYSTEM_AUDIT_ACE *)ace)->SidStart;
958 sid_size = ace->AceSize - FIELD_OFFSET(SYSTEM_AUDIT_ACE, SidStart);
959 fprintf( stderr, "SYSTEM_AUDIT_ACE_TYPE,Mask=%x",
960 ((const SYSTEM_AUDIT_ACE *)ace)->Mask );
961 break;
962 case SYSTEM_ALARM_ACE_TYPE:
963 sid = (const SID *)&((const SYSTEM_ALARM_ACE *)ace)->SidStart;
964 sid_size = ace->AceSize - FIELD_OFFSET(SYSTEM_ALARM_ACE, SidStart);
965 fprintf( stderr, "SYSTEM_ALARM_ACE_TYPE,Mask=%x",
966 ((const SYSTEM_ALARM_ACE *)ace)->Mask );
967 break;
968 case SYSTEM_MANDATORY_LABEL_ACE_TYPE:
969 sid = (const SID *)&((const SYSTEM_MANDATORY_LABEL_ACE *)ace)->SidStart;
970 sid_size = ace->AceSize - FIELD_OFFSET(SYSTEM_MANDATORY_LABEL_ACE, SidStart);
971 fprintf( stderr, "SYSTEM_MANDATORY_LABEL_ACE_TYPE,Mask=%x",
972 ((const SYSTEM_MANDATORY_LABEL_ACE *)ace)->Mask );
973 break;
974 default:
975 fprintf( stderr, "unknown<%d>", ace->AceType );
976 break;
978 fprintf( stderr, ",AceFlags=%x", ace->AceFlags );
979 if (sid)
980 dump_inline_sid( ",Sid=", sid, sid_size );
981 ace = (const ACE_HEADER *)((const char *)ace + ace->AceSize);
982 fputc( '}', stderr );
985 fputc( '}', stderr );
988 static void dump_varargs_ACL( const char *prefix, data_size_t size )
990 const ACL *acl = cur_data;
991 dump_inline_acl( prefix, acl, size );
992 remove_data( size );
995 static void dump_inline_security_descriptor( const char *prefix, const struct security_descriptor *sd, data_size_t size )
997 fprintf( stderr,"%s{", prefix );
998 if (size >= sizeof(struct security_descriptor))
1000 size_t offset = sizeof(struct security_descriptor);
1001 fprintf( stderr, "control=%08x", sd->control );
1002 if ((sd->owner_len > FIELD_OFFSET(SID, SubAuthority[255])) || (offset + sd->owner_len > size))
1003 return;
1004 if (sd->owner_len)
1005 dump_inline_sid( ",owner=", (const SID *)((const char *)sd + offset), sd->owner_len );
1006 else
1007 fprintf( stderr, ",owner=<not present>" );
1008 offset += sd->owner_len;
1009 if ((sd->group_len > FIELD_OFFSET(SID, SubAuthority[255])) || (offset + sd->group_len > size))
1010 return;
1011 if (sd->group_len)
1012 dump_inline_sid( ",group=", (const SID *)((const char *)sd + offset), sd->group_len );
1013 else
1014 fprintf( stderr, ",group=<not present>" );
1015 offset += sd->group_len;
1016 if ((sd->sacl_len >= MAX_ACL_LEN) || (offset + sd->sacl_len > size))
1017 return;
1018 dump_inline_acl( ",sacl=", (const ACL *)((const char *)sd + offset), sd->sacl_len );
1019 offset += sd->sacl_len;
1020 if ((sd->dacl_len >= MAX_ACL_LEN) || (offset + sd->dacl_len > size))
1021 return;
1022 dump_inline_acl( ",dacl=", (const ACL *)((const char *)sd + offset), sd->dacl_len );
1023 offset += sd->dacl_len;
1025 fputc( '}', stderr );
1028 static void dump_varargs_security_descriptor( const char *prefix, data_size_t size )
1030 const struct security_descriptor *sd = cur_data;
1031 dump_inline_security_descriptor( prefix, sd, size );
1032 remove_data( size );
1035 static void dump_varargs_token_groups( const char *prefix, data_size_t size )
1037 const struct token_groups *tg = cur_data;
1039 fprintf( stderr,"%s{", prefix );
1040 if (size >= sizeof(struct token_groups))
1042 size_t offset = sizeof(*tg);
1043 fprintf( stderr, "count=%08x,", tg->count );
1044 if (tg->count * sizeof(unsigned int) <= size)
1046 unsigned int i;
1047 const unsigned int *attr = (const unsigned int *)(tg + 1);
1049 offset += tg->count * sizeof(unsigned int);
1051 fputc( '[', stderr );
1052 for (i = 0; i < tg->count; i++)
1054 const SID *sid = (const SID *)((const char *)cur_data + offset);
1055 if (i != 0)
1056 fputc( ',', stderr );
1057 fputc( '{', stderr );
1058 fprintf( stderr, "attributes=%08x", attr[i] );
1059 dump_inline_sid( ",sid=", sid, size - offset );
1060 if ((offset + FIELD_OFFSET(SID, SubAuthority[0]) > size) ||
1061 (offset + FIELD_OFFSET(SID, SubAuthority[sid->SubAuthorityCount]) > size))
1062 break;
1063 offset += FIELD_OFFSET(SID, SubAuthority[sid->SubAuthorityCount]);
1064 fputc( '}', stderr );
1066 fputc( ']', stderr );
1069 fputc( '}', stderr );
1072 static void dump_varargs_object_attributes( const char *prefix, data_size_t size )
1074 const struct object_attributes *objattr = cur_data;
1076 fprintf( stderr,"%s{", prefix );
1077 if (size >= sizeof(struct object_attributes))
1079 const WCHAR *str;
1080 fprintf( stderr, "rootdir=%04x", objattr->rootdir );
1081 if (objattr->sd_len > size - sizeof(*objattr) ||
1082 objattr->name_len > size - sizeof(*objattr) - objattr->sd_len)
1083 return;
1084 dump_inline_security_descriptor( ",sd=", (const struct security_descriptor *)(objattr + 1), objattr->sd_len );
1085 str = (const WCHAR *)objattr + (sizeof(*objattr) + objattr->sd_len) / sizeof(WCHAR);
1086 fprintf( stderr, ",name=L\"" );
1087 dump_strW( str, objattr->name_len / sizeof(WCHAR), stderr, "\"\"" );
1088 fputc( '\"', stderr );
1089 remove_data( ((sizeof(*objattr) + objattr->sd_len) / sizeof(WCHAR)) * sizeof(WCHAR) +
1090 objattr->name_len );
1092 fputc( '}', stderr );
1095 static void dump_varargs_filesystem_event( const char *prefix, data_size_t size )
1097 static const char * const actions[] = {
1098 NULL,
1099 "ADDED",
1100 "REMOVED",
1101 "MODIFIED",
1102 "RENAMED_OLD_NAME",
1103 "RENAMED_NEW_NAME",
1104 "ADDED_STREAM",
1105 "REMOVED_STREAM",
1106 "MODIFIED_STREAM"
1109 fprintf( stderr,"%s{", prefix );
1110 while (size)
1112 const struct filesystem_event *event = cur_data;
1113 data_size_t len = (offsetof( struct filesystem_event, name[event->len] ) + sizeof(int)-1)
1114 / sizeof(int) * sizeof(int);
1115 if (size < len) break;
1116 if (event->action < sizeof(actions)/sizeof(actions[0]) && actions[event->action])
1117 fprintf( stderr, "{action=%s", actions[event->action] );
1118 else
1119 fprintf( stderr, "{action=%u", event->action );
1120 fprintf( stderr, ",name=\"%.*s\"}", event->len, event->name );
1121 size -= len;
1122 remove_data( len );
1123 if (size)fputc( ',', stderr );
1125 fputc( '}', stderr );
1128 static void dump_varargs_rawinput_devices(const char *prefix, data_size_t size )
1130 const struct rawinput_device *device;
1132 fprintf( stderr, "%s{", prefix );
1133 while (size >= sizeof(*device))
1135 device = cur_data;
1136 fprintf( stderr, "{usage_page=%04x,usage=%04x,flags=%08x,target=%08x}",
1137 device->usage_page, device->usage, device->flags, device->target );
1138 size -= sizeof(*device);
1139 remove_data( sizeof(*device) );
1140 if (size) fputc( ',', stderr );
1142 fputc( '}', stderr );
1145 typedef void (*dump_func)( const void *req );
1147 /* Everything below this line is generated automatically by tools/make_requests */
1148 /* ### make_requests begin ### */
1150 static void dump_new_process_request( const struct new_process_request *req )
1152 fprintf( stderr, " inherit_all=%d", req->inherit_all );
1153 fprintf( stderr, ", create_flags=%08x", req->create_flags );
1154 fprintf( stderr, ", socket_fd=%d", req->socket_fd );
1155 fprintf( stderr, ", exe_file=%04x", req->exe_file );
1156 fprintf( stderr, ", process_access=%08x", req->process_access );
1157 fprintf( stderr, ", process_attr=%08x", req->process_attr );
1158 fprintf( stderr, ", thread_access=%08x", req->thread_access );
1159 fprintf( stderr, ", thread_attr=%08x", req->thread_attr );
1160 dump_cpu_type( ", cpu=", &req->cpu );
1161 fprintf( stderr, ", info_size=%u", req->info_size );
1162 dump_varargs_startup_info( ", info=", min(cur_size,req->info_size) );
1163 dump_varargs_unicode_str( ", env=", cur_size );
1166 static void dump_new_process_reply( const struct new_process_reply *req )
1168 fprintf( stderr, " info=%04x", req->info );
1169 fprintf( stderr, ", pid=%04x", req->pid );
1170 fprintf( stderr, ", phandle=%04x", req->phandle );
1171 fprintf( stderr, ", tid=%04x", req->tid );
1172 fprintf( stderr, ", thandle=%04x", req->thandle );
1175 static void dump_get_new_process_info_request( const struct get_new_process_info_request *req )
1177 fprintf( stderr, " info=%04x", req->info );
1180 static void dump_get_new_process_info_reply( const struct get_new_process_info_reply *req )
1182 fprintf( stderr, " success=%d", req->success );
1183 fprintf( stderr, ", exit_code=%d", req->exit_code );
1186 static void dump_new_thread_request( const struct new_thread_request *req )
1188 fprintf( stderr, " access=%08x", req->access );
1189 fprintf( stderr, ", attributes=%08x", req->attributes );
1190 fprintf( stderr, ", suspend=%d", req->suspend );
1191 fprintf( stderr, ", request_fd=%d", req->request_fd );
1194 static void dump_new_thread_reply( const struct new_thread_reply *req )
1196 fprintf( stderr, " tid=%04x", req->tid );
1197 fprintf( stderr, ", handle=%04x", req->handle );
1200 static void dump_get_startup_info_request( const struct get_startup_info_request *req )
1204 static void dump_get_startup_info_reply( const struct get_startup_info_reply *req )
1206 fprintf( stderr, " exe_file=%04x", req->exe_file );
1207 fprintf( stderr, ", info_size=%u", req->info_size );
1208 dump_varargs_startup_info( ", info=", min(cur_size,req->info_size) );
1209 dump_varargs_unicode_str( ", env=", cur_size );
1212 static void dump_init_process_done_request( const struct init_process_done_request *req )
1214 fprintf( stderr, " gui=%d", req->gui );
1215 dump_uint64( ", module=", &req->module );
1216 dump_uint64( ", ldt_copy=", &req->ldt_copy );
1217 dump_uint64( ", entry=", &req->entry );
1220 static void dump_init_thread_request( const struct init_thread_request *req )
1222 fprintf( stderr, " unix_pid=%d", req->unix_pid );
1223 fprintf( stderr, ", unix_tid=%d", req->unix_tid );
1224 fprintf( stderr, ", debug_level=%d", req->debug_level );
1225 dump_uint64( ", teb=", &req->teb );
1226 dump_uint64( ", entry=", &req->entry );
1227 fprintf( stderr, ", reply_fd=%d", req->reply_fd );
1228 fprintf( stderr, ", wait_fd=%d", req->wait_fd );
1229 dump_cpu_type( ", cpu=", &req->cpu );
1232 static void dump_init_thread_reply( const struct init_thread_reply *req )
1234 fprintf( stderr, " pid=%04x", req->pid );
1235 fprintf( stderr, ", tid=%04x", req->tid );
1236 dump_timeout( ", server_start=", &req->server_start );
1237 fprintf( stderr, ", info_size=%u", req->info_size );
1238 fprintf( stderr, ", version=%d", req->version );
1239 fprintf( stderr, ", all_cpus=%08x", req->all_cpus );
1242 static void dump_terminate_process_request( const struct terminate_process_request *req )
1244 fprintf( stderr, " handle=%04x", req->handle );
1245 fprintf( stderr, ", exit_code=%d", req->exit_code );
1248 static void dump_terminate_process_reply( const struct terminate_process_reply *req )
1250 fprintf( stderr, " self=%d", req->self );
1253 static void dump_terminate_thread_request( const struct terminate_thread_request *req )
1255 fprintf( stderr, " handle=%04x", req->handle );
1256 fprintf( stderr, ", exit_code=%d", req->exit_code );
1259 static void dump_terminate_thread_reply( const struct terminate_thread_reply *req )
1261 fprintf( stderr, " self=%d", req->self );
1262 fprintf( stderr, ", last=%d", req->last );
1265 static void dump_get_process_info_request( const struct get_process_info_request *req )
1267 fprintf( stderr, " handle=%04x", req->handle );
1270 static void dump_get_process_info_reply( const struct get_process_info_reply *req )
1272 fprintf( stderr, " pid=%04x", req->pid );
1273 fprintf( stderr, ", ppid=%04x", req->ppid );
1274 dump_uint64( ", affinity=", &req->affinity );
1275 dump_uint64( ", peb=", &req->peb );
1276 dump_timeout( ", start_time=", &req->start_time );
1277 dump_timeout( ", end_time=", &req->end_time );
1278 fprintf( stderr, ", exit_code=%d", req->exit_code );
1279 fprintf( stderr, ", priority=%d", req->priority );
1280 dump_cpu_type( ", cpu=", &req->cpu );
1281 fprintf( stderr, ", debugger_present=%d", req->debugger_present );
1284 static void dump_set_process_info_request( const struct set_process_info_request *req )
1286 fprintf( stderr, " handle=%04x", req->handle );
1287 fprintf( stderr, ", mask=%d", req->mask );
1288 fprintf( stderr, ", priority=%d", req->priority );
1289 dump_uint64( ", affinity=", &req->affinity );
1292 static void dump_get_thread_info_request( const struct get_thread_info_request *req )
1294 fprintf( stderr, " handle=%04x", req->handle );
1295 fprintf( stderr, ", tid_in=%04x", req->tid_in );
1298 static void dump_get_thread_info_reply( const struct get_thread_info_reply *req )
1300 fprintf( stderr, " pid=%04x", req->pid );
1301 fprintf( stderr, ", tid=%04x", req->tid );
1302 dump_uint64( ", teb=", &req->teb );
1303 dump_uint64( ", entry_point=", &req->entry_point );
1304 dump_uint64( ", affinity=", &req->affinity );
1305 fprintf( stderr, ", exit_code=%d", req->exit_code );
1306 fprintf( stderr, ", priority=%d", req->priority );
1307 fprintf( stderr, ", last=%d", req->last );
1310 static void dump_get_thread_times_request( const struct get_thread_times_request *req )
1312 fprintf( stderr, " handle=%04x", req->handle );
1315 static void dump_get_thread_times_reply( const struct get_thread_times_reply *req )
1317 dump_timeout( " creation_time=", &req->creation_time );
1318 dump_timeout( ", exit_time=", &req->exit_time );
1321 static void dump_set_thread_info_request( const struct set_thread_info_request *req )
1323 fprintf( stderr, " handle=%04x", req->handle );
1324 fprintf( stderr, ", mask=%d", req->mask );
1325 fprintf( stderr, ", priority=%d", req->priority );
1326 dump_uint64( ", affinity=", &req->affinity );
1327 dump_uint64( ", entry_point=", &req->entry_point );
1328 fprintf( stderr, ", token=%04x", req->token );
1331 static void dump_get_dll_info_request( const struct get_dll_info_request *req )
1333 fprintf( stderr, " handle=%04x", req->handle );
1334 dump_uint64( ", base_address=", &req->base_address );
1337 static void dump_get_dll_info_reply( const struct get_dll_info_reply *req )
1339 dump_uint64( " entry_point=", &req->entry_point );
1340 fprintf( stderr, ", size=%u", req->size );
1341 fprintf( stderr, ", filename_len=%u", req->filename_len );
1342 dump_varargs_unicode_str( ", filename=", cur_size );
1345 static void dump_suspend_thread_request( const struct suspend_thread_request *req )
1347 fprintf( stderr, " handle=%04x", req->handle );
1350 static void dump_suspend_thread_reply( const struct suspend_thread_reply *req )
1352 fprintf( stderr, " count=%d", req->count );
1355 static void dump_resume_thread_request( const struct resume_thread_request *req )
1357 fprintf( stderr, " handle=%04x", req->handle );
1360 static void dump_resume_thread_reply( const struct resume_thread_reply *req )
1362 fprintf( stderr, " count=%d", req->count );
1365 static void dump_load_dll_request( const struct load_dll_request *req )
1367 fprintf( stderr, " mapping=%04x", req->mapping );
1368 dump_uint64( ", base=", &req->base );
1369 dump_uint64( ", name=", &req->name );
1370 fprintf( stderr, ", size=%u", req->size );
1371 fprintf( stderr, ", dbg_offset=%d", req->dbg_offset );
1372 fprintf( stderr, ", dbg_size=%d", req->dbg_size );
1373 dump_varargs_unicode_str( ", filename=", cur_size );
1376 static void dump_unload_dll_request( const struct unload_dll_request *req )
1378 dump_uint64( " base=", &req->base );
1381 static void dump_queue_apc_request( const struct queue_apc_request *req )
1383 fprintf( stderr, " handle=%04x", req->handle );
1384 dump_apc_call( ", call=", &req->call );
1387 static void dump_queue_apc_reply( const struct queue_apc_reply *req )
1389 fprintf( stderr, " handle=%04x", req->handle );
1390 fprintf( stderr, ", self=%d", req->self );
1393 static void dump_get_apc_result_request( const struct get_apc_result_request *req )
1395 fprintf( stderr, " handle=%04x", req->handle );
1398 static void dump_get_apc_result_reply( const struct get_apc_result_reply *req )
1400 dump_apc_result( " result=", &req->result );
1403 static void dump_close_handle_request( const struct close_handle_request *req )
1405 fprintf( stderr, " handle=%04x", req->handle );
1408 static void dump_set_handle_info_request( const struct set_handle_info_request *req )
1410 fprintf( stderr, " handle=%04x", req->handle );
1411 fprintf( stderr, ", flags=%d", req->flags );
1412 fprintf( stderr, ", mask=%d", req->mask );
1415 static void dump_set_handle_info_reply( const struct set_handle_info_reply *req )
1417 fprintf( stderr, " old_flags=%d", req->old_flags );
1420 static void dump_dup_handle_request( const struct dup_handle_request *req )
1422 fprintf( stderr, " src_process=%04x", req->src_process );
1423 fprintf( stderr, ", src_handle=%04x", req->src_handle );
1424 fprintf( stderr, ", dst_process=%04x", req->dst_process );
1425 fprintf( stderr, ", access=%08x", req->access );
1426 fprintf( stderr, ", attributes=%08x", req->attributes );
1427 fprintf( stderr, ", options=%08x", req->options );
1430 static void dump_dup_handle_reply( const struct dup_handle_reply *req )
1432 fprintf( stderr, " handle=%04x", req->handle );
1433 fprintf( stderr, ", self=%d", req->self );
1434 fprintf( stderr, ", closed=%d", req->closed );
1437 static void dump_open_process_request( const struct open_process_request *req )
1439 fprintf( stderr, " pid=%04x", req->pid );
1440 fprintf( stderr, ", access=%08x", req->access );
1441 fprintf( stderr, ", attributes=%08x", req->attributes );
1444 static void dump_open_process_reply( const struct open_process_reply *req )
1446 fprintf( stderr, " handle=%04x", req->handle );
1449 static void dump_open_thread_request( const struct open_thread_request *req )
1451 fprintf( stderr, " tid=%04x", req->tid );
1452 fprintf( stderr, ", access=%08x", req->access );
1453 fprintf( stderr, ", attributes=%08x", req->attributes );
1456 static void dump_open_thread_reply( const struct open_thread_reply *req )
1458 fprintf( stderr, " handle=%04x", req->handle );
1461 static void dump_select_request( const struct select_request *req )
1463 fprintf( stderr, " flags=%d", req->flags );
1464 dump_uint64( ", cookie=", &req->cookie );
1465 dump_timeout( ", timeout=", &req->timeout );
1466 fprintf( stderr, ", prev_apc=%04x", req->prev_apc );
1467 dump_varargs_apc_result( ", result=", cur_size );
1468 dump_varargs_select_op( ", data=", cur_size );
1471 static void dump_select_reply( const struct select_reply *req )
1473 dump_timeout( " timeout=", &req->timeout );
1474 dump_apc_call( ", call=", &req->call );
1475 fprintf( stderr, ", apc_handle=%04x", req->apc_handle );
1478 static void dump_create_event_request( const struct create_event_request *req )
1480 fprintf( stderr, " access=%08x", req->access );
1481 fprintf( stderr, ", attributes=%08x", req->attributes );
1482 fprintf( stderr, ", manual_reset=%d", req->manual_reset );
1483 fprintf( stderr, ", initial_state=%d", req->initial_state );
1484 dump_varargs_object_attributes( ", objattr=", cur_size );
1487 static void dump_create_event_reply( const struct create_event_reply *req )
1489 fprintf( stderr, " handle=%04x", req->handle );
1492 static void dump_event_op_request( const struct event_op_request *req )
1494 fprintf( stderr, " handle=%04x", req->handle );
1495 fprintf( stderr, ", op=%d", req->op );
1498 static void dump_query_event_request( const struct query_event_request *req )
1500 fprintf( stderr, " handle=%04x", req->handle );
1503 static void dump_query_event_reply( const struct query_event_reply *req )
1505 fprintf( stderr, " manual_reset=%d", req->manual_reset );
1506 fprintf( stderr, ", state=%d", req->state );
1509 static void dump_open_event_request( const struct open_event_request *req )
1511 fprintf( stderr, " access=%08x", req->access );
1512 fprintf( stderr, ", attributes=%08x", req->attributes );
1513 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1514 dump_varargs_unicode_str( ", name=", cur_size );
1517 static void dump_open_event_reply( const struct open_event_reply *req )
1519 fprintf( stderr, " handle=%04x", req->handle );
1522 static void dump_create_keyed_event_request( const struct create_keyed_event_request *req )
1524 fprintf( stderr, " access=%08x", req->access );
1525 fprintf( stderr, ", attributes=%08x", req->attributes );
1526 dump_varargs_object_attributes( ", objattr=", cur_size );
1529 static void dump_create_keyed_event_reply( const struct create_keyed_event_reply *req )
1531 fprintf( stderr, " handle=%04x", req->handle );
1534 static void dump_open_keyed_event_request( const struct open_keyed_event_request *req )
1536 fprintf( stderr, " access=%08x", req->access );
1537 fprintf( stderr, ", attributes=%08x", req->attributes );
1538 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1539 dump_varargs_unicode_str( ", name=", cur_size );
1542 static void dump_open_keyed_event_reply( const struct open_keyed_event_reply *req )
1544 fprintf( stderr, " handle=%04x", req->handle );
1547 static void dump_create_mutex_request( const struct create_mutex_request *req )
1549 fprintf( stderr, " access=%08x", req->access );
1550 fprintf( stderr, ", attributes=%08x", req->attributes );
1551 fprintf( stderr, ", owned=%d", req->owned );
1552 dump_varargs_object_attributes( ", objattr=", cur_size );
1555 static void dump_create_mutex_reply( const struct create_mutex_reply *req )
1557 fprintf( stderr, " handle=%04x", req->handle );
1560 static void dump_release_mutex_request( const struct release_mutex_request *req )
1562 fprintf( stderr, " handle=%04x", req->handle );
1565 static void dump_release_mutex_reply( const struct release_mutex_reply *req )
1567 fprintf( stderr, " prev_count=%08x", req->prev_count );
1570 static void dump_open_mutex_request( const struct open_mutex_request *req )
1572 fprintf( stderr, " access=%08x", req->access );
1573 fprintf( stderr, ", attributes=%08x", req->attributes );
1574 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1575 dump_varargs_unicode_str( ", name=", cur_size );
1578 static void dump_open_mutex_reply( const struct open_mutex_reply *req )
1580 fprintf( stderr, " handle=%04x", req->handle );
1583 static void dump_create_semaphore_request( const struct create_semaphore_request *req )
1585 fprintf( stderr, " access=%08x", req->access );
1586 fprintf( stderr, ", attributes=%08x", req->attributes );
1587 fprintf( stderr, ", initial=%08x", req->initial );
1588 fprintf( stderr, ", max=%08x", req->max );
1589 dump_varargs_object_attributes( ", objattr=", cur_size );
1592 static void dump_create_semaphore_reply( const struct create_semaphore_reply *req )
1594 fprintf( stderr, " handle=%04x", req->handle );
1597 static void dump_release_semaphore_request( const struct release_semaphore_request *req )
1599 fprintf( stderr, " handle=%04x", req->handle );
1600 fprintf( stderr, ", count=%08x", req->count );
1603 static void dump_release_semaphore_reply( const struct release_semaphore_reply *req )
1605 fprintf( stderr, " prev_count=%08x", req->prev_count );
1608 static void dump_query_semaphore_request( const struct query_semaphore_request *req )
1610 fprintf( stderr, " handle=%04x", req->handle );
1613 static void dump_query_semaphore_reply( const struct query_semaphore_reply *req )
1615 fprintf( stderr, " current=%08x", req->current );
1616 fprintf( stderr, ", max=%08x", req->max );
1619 static void dump_open_semaphore_request( const struct open_semaphore_request *req )
1621 fprintf( stderr, " access=%08x", req->access );
1622 fprintf( stderr, ", attributes=%08x", req->attributes );
1623 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1624 dump_varargs_unicode_str( ", name=", cur_size );
1627 static void dump_open_semaphore_reply( const struct open_semaphore_reply *req )
1629 fprintf( stderr, " handle=%04x", req->handle );
1632 static void dump_create_file_request( const struct create_file_request *req )
1634 fprintf( stderr, " access=%08x", req->access );
1635 fprintf( stderr, ", attributes=%08x", req->attributes );
1636 fprintf( stderr, ", sharing=%08x", req->sharing );
1637 fprintf( stderr, ", create=%d", req->create );
1638 fprintf( stderr, ", options=%08x", req->options );
1639 fprintf( stderr, ", attrs=%08x", req->attrs );
1640 dump_varargs_object_attributes( ", objattr=", cur_size );
1641 dump_varargs_string( ", filename=", cur_size );
1644 static void dump_create_file_reply( const struct create_file_reply *req )
1646 fprintf( stderr, " handle=%04x", req->handle );
1649 static void dump_open_file_object_request( const struct open_file_object_request *req )
1651 fprintf( stderr, " access=%08x", req->access );
1652 fprintf( stderr, ", attributes=%08x", req->attributes );
1653 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1654 fprintf( stderr, ", sharing=%08x", req->sharing );
1655 fprintf( stderr, ", options=%08x", req->options );
1656 dump_varargs_unicode_str( ", filename=", cur_size );
1659 static void dump_open_file_object_reply( const struct open_file_object_reply *req )
1661 fprintf( stderr, " handle=%04x", req->handle );
1664 static void dump_alloc_file_handle_request( const struct alloc_file_handle_request *req )
1666 fprintf( stderr, " access=%08x", req->access );
1667 fprintf( stderr, ", attributes=%08x", req->attributes );
1668 fprintf( stderr, ", fd=%d", req->fd );
1671 static void dump_alloc_file_handle_reply( const struct alloc_file_handle_reply *req )
1673 fprintf( stderr, " handle=%04x", req->handle );
1676 static void dump_get_handle_unix_name_request( const struct get_handle_unix_name_request *req )
1678 fprintf( stderr, " handle=%04x", req->handle );
1681 static void dump_get_handle_unix_name_reply( const struct get_handle_unix_name_reply *req )
1683 fprintf( stderr, " name_len=%u", req->name_len );
1684 dump_varargs_string( ", name=", cur_size );
1687 static void dump_get_handle_fd_request( const struct get_handle_fd_request *req )
1689 fprintf( stderr, " handle=%04x", req->handle );
1692 static void dump_get_handle_fd_reply( const struct get_handle_fd_reply *req )
1694 fprintf( stderr, " type=%d", req->type );
1695 fprintf( stderr, ", cacheable=%d", req->cacheable );
1696 fprintf( stderr, ", access=%08x", req->access );
1697 fprintf( stderr, ", options=%08x", req->options );
1700 static void dump_flush_request( const struct flush_request *req )
1702 fprintf( stderr, " blocking=%d", req->blocking );
1703 dump_async_data( ", async=", &req->async );
1706 static void dump_flush_reply( const struct flush_reply *req )
1708 fprintf( stderr, " event=%04x", req->event );
1711 static void dump_lock_file_request( const struct lock_file_request *req )
1713 fprintf( stderr, " handle=%04x", req->handle );
1714 dump_uint64( ", offset=", &req->offset );
1715 dump_uint64( ", count=", &req->count );
1716 fprintf( stderr, ", shared=%d", req->shared );
1717 fprintf( stderr, ", wait=%d", req->wait );
1720 static void dump_lock_file_reply( const struct lock_file_reply *req )
1722 fprintf( stderr, " handle=%04x", req->handle );
1723 fprintf( stderr, ", overlapped=%d", req->overlapped );
1726 static void dump_unlock_file_request( const struct unlock_file_request *req )
1728 fprintf( stderr, " handle=%04x", req->handle );
1729 dump_uint64( ", offset=", &req->offset );
1730 dump_uint64( ", count=", &req->count );
1733 static void dump_create_socket_request( const struct create_socket_request *req )
1735 fprintf( stderr, " access=%08x", req->access );
1736 fprintf( stderr, ", attributes=%08x", req->attributes );
1737 fprintf( stderr, ", family=%d", req->family );
1738 fprintf( stderr, ", type=%d", req->type );
1739 fprintf( stderr, ", protocol=%d", req->protocol );
1740 fprintf( stderr, ", flags=%08x", req->flags );
1743 static void dump_create_socket_reply( const struct create_socket_reply *req )
1745 fprintf( stderr, " handle=%04x", req->handle );
1748 static void dump_accept_socket_request( const struct accept_socket_request *req )
1750 fprintf( stderr, " lhandle=%04x", req->lhandle );
1751 fprintf( stderr, ", access=%08x", req->access );
1752 fprintf( stderr, ", attributes=%08x", req->attributes );
1755 static void dump_accept_socket_reply( const struct accept_socket_reply *req )
1757 fprintf( stderr, " handle=%04x", req->handle );
1760 static void dump_accept_into_socket_request( const struct accept_into_socket_request *req )
1762 fprintf( stderr, " lhandle=%04x", req->lhandle );
1763 fprintf( stderr, ", ahandle=%04x", req->ahandle );
1766 static void dump_set_socket_event_request( const struct set_socket_event_request *req )
1768 fprintf( stderr, " handle=%04x", req->handle );
1769 fprintf( stderr, ", mask=%08x", req->mask );
1770 fprintf( stderr, ", event=%04x", req->event );
1771 fprintf( stderr, ", window=%08x", req->window );
1772 fprintf( stderr, ", msg=%08x", req->msg );
1775 static void dump_get_socket_event_request( const struct get_socket_event_request *req )
1777 fprintf( stderr, " handle=%04x", req->handle );
1778 fprintf( stderr, ", service=%d", req->service );
1779 fprintf( stderr, ", c_event=%04x", req->c_event );
1782 static void dump_get_socket_event_reply( const struct get_socket_event_reply *req )
1784 fprintf( stderr, " mask=%08x", req->mask );
1785 fprintf( stderr, ", pmask=%08x", req->pmask );
1786 fprintf( stderr, ", state=%08x", req->state );
1787 dump_varargs_ints( ", errors=", cur_size );
1790 static void dump_get_socket_info_request( const struct get_socket_info_request *req )
1792 fprintf( stderr, " handle=%04x", req->handle );
1795 static void dump_get_socket_info_reply( const struct get_socket_info_reply *req )
1797 fprintf( stderr, " family=%d", req->family );
1798 fprintf( stderr, ", type=%d", req->type );
1799 fprintf( stderr, ", protocol=%d", req->protocol );
1802 static void dump_enable_socket_event_request( const struct enable_socket_event_request *req )
1804 fprintf( stderr, " handle=%04x", req->handle );
1805 fprintf( stderr, ", mask=%08x", req->mask );
1806 fprintf( stderr, ", sstate=%08x", req->sstate );
1807 fprintf( stderr, ", cstate=%08x", req->cstate );
1810 static void dump_set_socket_deferred_request( const struct set_socket_deferred_request *req )
1812 fprintf( stderr, " handle=%04x", req->handle );
1813 fprintf( stderr, ", deferred=%04x", req->deferred );
1816 static void dump_alloc_console_request( const struct alloc_console_request *req )
1818 fprintf( stderr, " access=%08x", req->access );
1819 fprintf( stderr, ", attributes=%08x", req->attributes );
1820 fprintf( stderr, ", pid=%04x", req->pid );
1821 fprintf( stderr, ", input_fd=%d", req->input_fd );
1824 static void dump_alloc_console_reply( const struct alloc_console_reply *req )
1826 fprintf( stderr, " handle_in=%04x", req->handle_in );
1827 fprintf( stderr, ", event=%04x", req->event );
1830 static void dump_free_console_request( const struct free_console_request *req )
1834 static void dump_get_console_renderer_events_request( const struct get_console_renderer_events_request *req )
1836 fprintf( stderr, " handle=%04x", req->handle );
1839 static void dump_get_console_renderer_events_reply( const struct get_console_renderer_events_reply *req )
1841 dump_varargs_bytes( " data=", cur_size );
1844 static void dump_open_console_request( const struct open_console_request *req )
1846 fprintf( stderr, " from=%04x", req->from );
1847 fprintf( stderr, ", access=%08x", req->access );
1848 fprintf( stderr, ", attributes=%08x", req->attributes );
1849 fprintf( stderr, ", share=%d", req->share );
1852 static void dump_open_console_reply( const struct open_console_reply *req )
1854 fprintf( stderr, " handle=%04x", req->handle );
1857 static void dump_get_console_wait_event_request( const struct get_console_wait_event_request *req )
1861 static void dump_get_console_wait_event_reply( const struct get_console_wait_event_reply *req )
1863 fprintf( stderr, " handle=%04x", req->handle );
1866 static void dump_get_console_mode_request( const struct get_console_mode_request *req )
1868 fprintf( stderr, " handle=%04x", req->handle );
1871 static void dump_get_console_mode_reply( const struct get_console_mode_reply *req )
1873 fprintf( stderr, " mode=%d", req->mode );
1876 static void dump_set_console_mode_request( const struct set_console_mode_request *req )
1878 fprintf( stderr, " handle=%04x", req->handle );
1879 fprintf( stderr, ", mode=%d", req->mode );
1882 static void dump_set_console_input_info_request( const struct set_console_input_info_request *req )
1884 fprintf( stderr, " handle=%04x", req->handle );
1885 fprintf( stderr, ", mask=%d", req->mask );
1886 fprintf( stderr, ", active_sb=%04x", req->active_sb );
1887 fprintf( stderr, ", history_mode=%d", req->history_mode );
1888 fprintf( stderr, ", history_size=%d", req->history_size );
1889 fprintf( stderr, ", edition_mode=%d", req->edition_mode );
1890 fprintf( stderr, ", input_cp=%d", req->input_cp );
1891 fprintf( stderr, ", output_cp=%d", req->output_cp );
1892 fprintf( stderr, ", win=%08x", req->win );
1893 dump_varargs_unicode_str( ", title=", cur_size );
1896 static void dump_get_console_input_info_request( const struct get_console_input_info_request *req )
1898 fprintf( stderr, " handle=%04x", req->handle );
1901 static void dump_get_console_input_info_reply( const struct get_console_input_info_reply *req )
1903 fprintf( stderr, " history_mode=%d", req->history_mode );
1904 fprintf( stderr, ", history_size=%d", req->history_size );
1905 fprintf( stderr, ", history_index=%d", req->history_index );
1906 fprintf( stderr, ", edition_mode=%d", req->edition_mode );
1907 fprintf( stderr, ", input_cp=%d", req->input_cp );
1908 fprintf( stderr, ", output_cp=%d", req->output_cp );
1909 fprintf( stderr, ", win=%08x", req->win );
1910 dump_varargs_unicode_str( ", title=", cur_size );
1913 static void dump_append_console_input_history_request( const struct append_console_input_history_request *req )
1915 fprintf( stderr, " handle=%04x", req->handle );
1916 dump_varargs_unicode_str( ", line=", cur_size );
1919 static void dump_get_console_input_history_request( const struct get_console_input_history_request *req )
1921 fprintf( stderr, " handle=%04x", req->handle );
1922 fprintf( stderr, ", index=%d", req->index );
1925 static void dump_get_console_input_history_reply( const struct get_console_input_history_reply *req )
1927 fprintf( stderr, " total=%d", req->total );
1928 dump_varargs_unicode_str( ", line=", cur_size );
1931 static void dump_create_console_output_request( const struct create_console_output_request *req )
1933 fprintf( stderr, " handle_in=%04x", req->handle_in );
1934 fprintf( stderr, ", access=%08x", req->access );
1935 fprintf( stderr, ", attributes=%08x", req->attributes );
1936 fprintf( stderr, ", share=%08x", req->share );
1937 fprintf( stderr, ", fd=%d", req->fd );
1940 static void dump_create_console_output_reply( const struct create_console_output_reply *req )
1942 fprintf( stderr, " handle_out=%04x", req->handle_out );
1945 static void dump_set_console_output_info_request( const struct set_console_output_info_request *req )
1947 fprintf( stderr, " handle=%04x", req->handle );
1948 fprintf( stderr, ", mask=%d", req->mask );
1949 fprintf( stderr, ", cursor_size=%d", req->cursor_size );
1950 fprintf( stderr, ", cursor_visible=%d", req->cursor_visible );
1951 fprintf( stderr, ", cursor_x=%d", req->cursor_x );
1952 fprintf( stderr, ", cursor_y=%d", req->cursor_y );
1953 fprintf( stderr, ", width=%d", req->width );
1954 fprintf( stderr, ", height=%d", req->height );
1955 fprintf( stderr, ", attr=%d", req->attr );
1956 fprintf( stderr, ", win_left=%d", req->win_left );
1957 fprintf( stderr, ", win_top=%d", req->win_top );
1958 fprintf( stderr, ", win_right=%d", req->win_right );
1959 fprintf( stderr, ", win_bottom=%d", req->win_bottom );
1960 fprintf( stderr, ", max_width=%d", req->max_width );
1961 fprintf( stderr, ", max_height=%d", req->max_height );
1962 fprintf( stderr, ", font_width=%d", req->font_width );
1963 fprintf( stderr, ", font_height=%d", req->font_height );
1966 static void dump_get_console_output_info_request( const struct get_console_output_info_request *req )
1968 fprintf( stderr, " handle=%04x", req->handle );
1971 static void dump_get_console_output_info_reply( const struct get_console_output_info_reply *req )
1973 fprintf( stderr, " cursor_size=%d", req->cursor_size );
1974 fprintf( stderr, ", cursor_visible=%d", req->cursor_visible );
1975 fprintf( stderr, ", cursor_x=%d", req->cursor_x );
1976 fprintf( stderr, ", cursor_y=%d", req->cursor_y );
1977 fprintf( stderr, ", width=%d", req->width );
1978 fprintf( stderr, ", height=%d", req->height );
1979 fprintf( stderr, ", attr=%d", req->attr );
1980 fprintf( stderr, ", win_left=%d", req->win_left );
1981 fprintf( stderr, ", win_top=%d", req->win_top );
1982 fprintf( stderr, ", win_right=%d", req->win_right );
1983 fprintf( stderr, ", win_bottom=%d", req->win_bottom );
1984 fprintf( stderr, ", max_width=%d", req->max_width );
1985 fprintf( stderr, ", max_height=%d", req->max_height );
1986 fprintf( stderr, ", font_width=%d", req->font_width );
1987 fprintf( stderr, ", font_height=%d", req->font_height );
1990 static void dump_write_console_input_request( const struct write_console_input_request *req )
1992 fprintf( stderr, " handle=%04x", req->handle );
1993 dump_varargs_input_records( ", rec=", cur_size );
1996 static void dump_write_console_input_reply( const struct write_console_input_reply *req )
1998 fprintf( stderr, " written=%d", req->written );
2001 static void dump_read_console_input_request( const struct read_console_input_request *req )
2003 fprintf( stderr, " handle=%04x", req->handle );
2004 fprintf( stderr, ", flush=%d", req->flush );
2007 static void dump_read_console_input_reply( const struct read_console_input_reply *req )
2009 fprintf( stderr, " read=%d", req->read );
2010 dump_varargs_input_records( ", rec=", cur_size );
2013 static void dump_write_console_output_request( const struct write_console_output_request *req )
2015 fprintf( stderr, " handle=%04x", req->handle );
2016 fprintf( stderr, ", x=%d", req->x );
2017 fprintf( stderr, ", y=%d", req->y );
2018 fprintf( stderr, ", mode=%d", req->mode );
2019 fprintf( stderr, ", wrap=%d", req->wrap );
2020 dump_varargs_bytes( ", data=", cur_size );
2023 static void dump_write_console_output_reply( const struct write_console_output_reply *req )
2025 fprintf( stderr, " written=%d", req->written );
2026 fprintf( stderr, ", width=%d", req->width );
2027 fprintf( stderr, ", height=%d", req->height );
2030 static void dump_fill_console_output_request( const struct fill_console_output_request *req )
2032 fprintf( stderr, " handle=%04x", req->handle );
2033 fprintf( stderr, ", x=%d", req->x );
2034 fprintf( stderr, ", y=%d", req->y );
2035 fprintf( stderr, ", mode=%d", req->mode );
2036 fprintf( stderr, ", count=%d", req->count );
2037 fprintf( stderr, ", wrap=%d", req->wrap );
2038 dump_char_info( ", data=", &req->data );
2041 static void dump_fill_console_output_reply( const struct fill_console_output_reply *req )
2043 fprintf( stderr, " written=%d", req->written );
2046 static void dump_read_console_output_request( const struct read_console_output_request *req )
2048 fprintf( stderr, " handle=%04x", req->handle );
2049 fprintf( stderr, ", x=%d", req->x );
2050 fprintf( stderr, ", y=%d", req->y );
2051 fprintf( stderr, ", mode=%d", req->mode );
2052 fprintf( stderr, ", wrap=%d", req->wrap );
2055 static void dump_read_console_output_reply( const struct read_console_output_reply *req )
2057 fprintf( stderr, " width=%d", req->width );
2058 fprintf( stderr, ", height=%d", req->height );
2059 dump_varargs_bytes( ", data=", cur_size );
2062 static void dump_move_console_output_request( const struct move_console_output_request *req )
2064 fprintf( stderr, " handle=%04x", req->handle );
2065 fprintf( stderr, ", x_src=%d", req->x_src );
2066 fprintf( stderr, ", y_src=%d", req->y_src );
2067 fprintf( stderr, ", x_dst=%d", req->x_dst );
2068 fprintf( stderr, ", y_dst=%d", req->y_dst );
2069 fprintf( stderr, ", w=%d", req->w );
2070 fprintf( stderr, ", h=%d", req->h );
2073 static void dump_send_console_signal_request( const struct send_console_signal_request *req )
2075 fprintf( stderr, " signal=%d", req->signal );
2076 fprintf( stderr, ", group_id=%04x", req->group_id );
2079 static void dump_read_directory_changes_request( const struct read_directory_changes_request *req )
2081 fprintf( stderr, " filter=%08x", req->filter );
2082 fprintf( stderr, ", subtree=%d", req->subtree );
2083 fprintf( stderr, ", want_data=%d", req->want_data );
2084 dump_async_data( ", async=", &req->async );
2087 static void dump_read_change_request( const struct read_change_request *req )
2089 fprintf( stderr, " handle=%04x", req->handle );
2092 static void dump_read_change_reply( const struct read_change_reply *req )
2094 dump_varargs_filesystem_event( " events=", cur_size );
2097 static void dump_create_mapping_request( const struct create_mapping_request *req )
2099 fprintf( stderr, " access=%08x", req->access );
2100 fprintf( stderr, ", attributes=%08x", req->attributes );
2101 fprintf( stderr, ", protect=%08x", req->protect );
2102 dump_uint64( ", size=", &req->size );
2103 fprintf( stderr, ", file_handle=%04x", req->file_handle );
2104 dump_varargs_object_attributes( ", objattr=", cur_size );
2107 static void dump_create_mapping_reply( const struct create_mapping_reply *req )
2109 fprintf( stderr, " handle=%04x", req->handle );
2112 static void dump_open_mapping_request( const struct open_mapping_request *req )
2114 fprintf( stderr, " access=%08x", req->access );
2115 fprintf( stderr, ", attributes=%08x", req->attributes );
2116 fprintf( stderr, ", rootdir=%04x", req->rootdir );
2117 dump_varargs_unicode_str( ", name=", cur_size );
2120 static void dump_open_mapping_reply( const struct open_mapping_reply *req )
2122 fprintf( stderr, " handle=%04x", req->handle );
2125 static void dump_get_mapping_info_request( const struct get_mapping_info_request *req )
2127 fprintf( stderr, " handle=%04x", req->handle );
2128 fprintf( stderr, ", access=%08x", req->access );
2131 static void dump_get_mapping_info_reply( const struct get_mapping_info_reply *req )
2133 dump_uint64( " size=", &req->size );
2134 fprintf( stderr, ", protect=%d", req->protect );
2135 fprintf( stderr, ", header_size=%d", req->header_size );
2136 dump_uint64( ", base=", &req->base );
2137 fprintf( stderr, ", mapping=%04x", req->mapping );
2138 fprintf( stderr, ", shared_file=%04x", req->shared_file );
2141 static void dump_get_mapping_committed_range_request( const struct get_mapping_committed_range_request *req )
2143 fprintf( stderr, " handle=%04x", req->handle );
2144 dump_uint64( ", offset=", &req->offset );
2147 static void dump_get_mapping_committed_range_reply( const struct get_mapping_committed_range_reply *req )
2149 dump_uint64( " size=", &req->size );
2150 fprintf( stderr, ", committed=%d", req->committed );
2153 static void dump_add_mapping_committed_range_request( const struct add_mapping_committed_range_request *req )
2155 fprintf( stderr, " handle=%04x", req->handle );
2156 dump_uint64( ", offset=", &req->offset );
2157 dump_uint64( ", size=", &req->size );
2160 static void dump_create_snapshot_request( const struct create_snapshot_request *req )
2162 fprintf( stderr, " attributes=%08x", req->attributes );
2163 fprintf( stderr, ", flags=%08x", req->flags );
2166 static void dump_create_snapshot_reply( const struct create_snapshot_reply *req )
2168 fprintf( stderr, " handle=%04x", req->handle );
2171 static void dump_next_process_request( const struct next_process_request *req )
2173 fprintf( stderr, " handle=%04x", req->handle );
2174 fprintf( stderr, ", reset=%d", req->reset );
2177 static void dump_next_process_reply( const struct next_process_reply *req )
2179 fprintf( stderr, " count=%d", req->count );
2180 fprintf( stderr, ", pid=%04x", req->pid );
2181 fprintf( stderr, ", ppid=%04x", req->ppid );
2182 fprintf( stderr, ", threads=%d", req->threads );
2183 fprintf( stderr, ", priority=%d", req->priority );
2184 fprintf( stderr, ", handles=%d", req->handles );
2185 fprintf( stderr, ", unix_pid=%d", req->unix_pid );
2186 dump_varargs_unicode_str( ", filename=", cur_size );
2189 static void dump_next_thread_request( const struct next_thread_request *req )
2191 fprintf( stderr, " handle=%04x", req->handle );
2192 fprintf( stderr, ", reset=%d", req->reset );
2195 static void dump_next_thread_reply( const struct next_thread_reply *req )
2197 fprintf( stderr, " count=%d", req->count );
2198 fprintf( stderr, ", pid=%04x", req->pid );
2199 fprintf( stderr, ", tid=%04x", req->tid );
2200 fprintf( stderr, ", base_pri=%d", req->base_pri );
2201 fprintf( stderr, ", delta_pri=%d", req->delta_pri );
2204 static void dump_wait_debug_event_request( const struct wait_debug_event_request *req )
2206 fprintf( stderr, " get_handle=%d", req->get_handle );
2209 static void dump_wait_debug_event_reply( const struct wait_debug_event_reply *req )
2211 fprintf( stderr, " pid=%04x", req->pid );
2212 fprintf( stderr, ", tid=%04x", req->tid );
2213 fprintf( stderr, ", wait=%04x", req->wait );
2214 dump_varargs_debug_event( ", event=", cur_size );
2217 static void dump_queue_exception_event_request( const struct queue_exception_event_request *req )
2219 fprintf( stderr, " first=%d", req->first );
2220 fprintf( stderr, ", code=%08x", req->code );
2221 fprintf( stderr, ", flags=%08x", req->flags );
2222 dump_uint64( ", record=", &req->record );
2223 dump_uint64( ", address=", &req->address );
2224 fprintf( stderr, ", len=%u", req->len );
2225 dump_varargs_uints64( ", params=", min(cur_size,req->len) );
2226 dump_varargs_context( ", context=", cur_size );
2229 static void dump_queue_exception_event_reply( const struct queue_exception_event_reply *req )
2231 fprintf( stderr, " handle=%04x", req->handle );
2234 static void dump_get_exception_status_request( const struct get_exception_status_request *req )
2236 fprintf( stderr, " handle=%04x", req->handle );
2239 static void dump_get_exception_status_reply( const struct get_exception_status_reply *req )
2241 dump_varargs_context( " context=", cur_size );
2244 static void dump_continue_debug_event_request( const struct continue_debug_event_request *req )
2246 fprintf( stderr, " pid=%04x", req->pid );
2247 fprintf( stderr, ", tid=%04x", req->tid );
2248 fprintf( stderr, ", status=%d", req->status );
2251 static void dump_debug_process_request( const struct debug_process_request *req )
2253 fprintf( stderr, " pid=%04x", req->pid );
2254 fprintf( stderr, ", attach=%d", req->attach );
2257 static void dump_debug_break_request( const struct debug_break_request *req )
2259 fprintf( stderr, " handle=%04x", req->handle );
2262 static void dump_debug_break_reply( const struct debug_break_reply *req )
2264 fprintf( stderr, " self=%d", req->self );
2267 static void dump_set_debugger_kill_on_exit_request( const struct set_debugger_kill_on_exit_request *req )
2269 fprintf( stderr, " kill_on_exit=%d", req->kill_on_exit );
2272 static void dump_read_process_memory_request( const struct read_process_memory_request *req )
2274 fprintf( stderr, " handle=%04x", req->handle );
2275 dump_uint64( ", addr=", &req->addr );
2278 static void dump_read_process_memory_reply( const struct read_process_memory_reply *req )
2280 dump_varargs_bytes( " data=", cur_size );
2283 static void dump_write_process_memory_request( const struct write_process_memory_request *req )
2285 fprintf( stderr, " handle=%04x", req->handle );
2286 dump_uint64( ", addr=", &req->addr );
2287 dump_varargs_bytes( ", data=", cur_size );
2290 static void dump_create_key_request( const struct create_key_request *req )
2292 fprintf( stderr, " parent=%04x", req->parent );
2293 fprintf( stderr, ", access=%08x", req->access );
2294 fprintf( stderr, ", attributes=%08x", req->attributes );
2295 fprintf( stderr, ", options=%08x", req->options );
2296 fprintf( stderr, ", namelen=%u", req->namelen );
2297 dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
2298 dump_varargs_unicode_str( ", class=", cur_size );
2301 static void dump_create_key_reply( const struct create_key_reply *req )
2303 fprintf( stderr, " hkey=%04x", req->hkey );
2304 fprintf( stderr, ", created=%d", req->created );
2307 static void dump_open_key_request( const struct open_key_request *req )
2309 fprintf( stderr, " parent=%04x", req->parent );
2310 fprintf( stderr, ", access=%08x", req->access );
2311 fprintf( stderr, ", attributes=%08x", req->attributes );
2312 dump_varargs_unicode_str( ", name=", cur_size );
2315 static void dump_open_key_reply( const struct open_key_reply *req )
2317 fprintf( stderr, " hkey=%04x", req->hkey );
2320 static void dump_delete_key_request( const struct delete_key_request *req )
2322 fprintf( stderr, " hkey=%04x", req->hkey );
2325 static void dump_flush_key_request( const struct flush_key_request *req )
2327 fprintf( stderr, " hkey=%04x", req->hkey );
2330 static void dump_enum_key_request( const struct enum_key_request *req )
2332 fprintf( stderr, " hkey=%04x", req->hkey );
2333 fprintf( stderr, ", index=%d", req->index );
2334 fprintf( stderr, ", info_class=%d", req->info_class );
2337 static void dump_enum_key_reply( const struct enum_key_reply *req )
2339 fprintf( stderr, " subkeys=%d", req->subkeys );
2340 fprintf( stderr, ", max_subkey=%d", req->max_subkey );
2341 fprintf( stderr, ", max_class=%d", req->max_class );
2342 fprintf( stderr, ", values=%d", req->values );
2343 fprintf( stderr, ", max_value=%d", req->max_value );
2344 fprintf( stderr, ", max_data=%d", req->max_data );
2345 dump_timeout( ", modif=", &req->modif );
2346 fprintf( stderr, ", total=%u", req->total );
2347 fprintf( stderr, ", namelen=%u", req->namelen );
2348 dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
2349 dump_varargs_unicode_str( ", class=", cur_size );
2352 static void dump_set_key_value_request( const struct set_key_value_request *req )
2354 fprintf( stderr, " hkey=%04x", req->hkey );
2355 fprintf( stderr, ", type=%d", req->type );
2356 fprintf( stderr, ", namelen=%u", req->namelen );
2357 dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
2358 dump_varargs_bytes( ", data=", cur_size );
2361 static void dump_get_key_value_request( const struct get_key_value_request *req )
2363 fprintf( stderr, " hkey=%04x", req->hkey );
2364 dump_varargs_unicode_str( ", name=", cur_size );
2367 static void dump_get_key_value_reply( const struct get_key_value_reply *req )
2369 fprintf( stderr, " type=%d", req->type );
2370 fprintf( stderr, ", total=%u", req->total );
2371 dump_varargs_bytes( ", data=", cur_size );
2374 static void dump_enum_key_value_request( const struct enum_key_value_request *req )
2376 fprintf( stderr, " hkey=%04x", req->hkey );
2377 fprintf( stderr, ", index=%d", req->index );
2378 fprintf( stderr, ", info_class=%d", req->info_class );
2381 static void dump_enum_key_value_reply( const struct enum_key_value_reply *req )
2383 fprintf( stderr, " type=%d", req->type );
2384 fprintf( stderr, ", total=%u", req->total );
2385 fprintf( stderr, ", namelen=%u", req->namelen );
2386 dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
2387 dump_varargs_bytes( ", data=", cur_size );
2390 static void dump_delete_key_value_request( const struct delete_key_value_request *req )
2392 fprintf( stderr, " hkey=%04x", req->hkey );
2393 dump_varargs_unicode_str( ", name=", cur_size );
2396 static void dump_load_registry_request( const struct load_registry_request *req )
2398 fprintf( stderr, " hkey=%04x", req->hkey );
2399 fprintf( stderr, ", file=%04x", req->file );
2400 dump_varargs_unicode_str( ", name=", cur_size );
2403 static void dump_unload_registry_request( const struct unload_registry_request *req )
2405 fprintf( stderr, " hkey=%04x", req->hkey );
2408 static void dump_save_registry_request( const struct save_registry_request *req )
2410 fprintf( stderr, " hkey=%04x", req->hkey );
2411 fprintf( stderr, ", file=%04x", req->file );
2414 static void dump_set_registry_notification_request( const struct set_registry_notification_request *req )
2416 fprintf( stderr, " hkey=%04x", req->hkey );
2417 fprintf( stderr, ", event=%04x", req->event );
2418 fprintf( stderr, ", subtree=%d", req->subtree );
2419 fprintf( stderr, ", filter=%08x", req->filter );
2422 static void dump_create_timer_request( const struct create_timer_request *req )
2424 fprintf( stderr, " access=%08x", req->access );
2425 fprintf( stderr, ", attributes=%08x", req->attributes );
2426 fprintf( stderr, ", rootdir=%04x", req->rootdir );
2427 fprintf( stderr, ", manual=%d", req->manual );
2428 dump_varargs_unicode_str( ", name=", cur_size );
2431 static void dump_create_timer_reply( const struct create_timer_reply *req )
2433 fprintf( stderr, " handle=%04x", req->handle );
2436 static void dump_open_timer_request( const struct open_timer_request *req )
2438 fprintf( stderr, " access=%08x", req->access );
2439 fprintf( stderr, ", attributes=%08x", req->attributes );
2440 fprintf( stderr, ", rootdir=%04x", req->rootdir );
2441 dump_varargs_unicode_str( ", name=", cur_size );
2444 static void dump_open_timer_reply( const struct open_timer_reply *req )
2446 fprintf( stderr, " handle=%04x", req->handle );
2449 static void dump_set_timer_request( const struct set_timer_request *req )
2451 fprintf( stderr, " handle=%04x", req->handle );
2452 dump_timeout( ", expire=", &req->expire );
2453 dump_uint64( ", callback=", &req->callback );
2454 dump_uint64( ", arg=", &req->arg );
2455 fprintf( stderr, ", period=%d", req->period );
2458 static void dump_set_timer_reply( const struct set_timer_reply *req )
2460 fprintf( stderr, " signaled=%d", req->signaled );
2463 static void dump_cancel_timer_request( const struct cancel_timer_request *req )
2465 fprintf( stderr, " handle=%04x", req->handle );
2468 static void dump_cancel_timer_reply( const struct cancel_timer_reply *req )
2470 fprintf( stderr, " signaled=%d", req->signaled );
2473 static void dump_get_timer_info_request( const struct get_timer_info_request *req )
2475 fprintf( stderr, " handle=%04x", req->handle );
2478 static void dump_get_timer_info_reply( const struct get_timer_info_reply *req )
2480 dump_timeout( " when=", &req->when );
2481 fprintf( stderr, ", signaled=%d", req->signaled );
2484 static void dump_get_thread_context_request( const struct get_thread_context_request *req )
2486 fprintf( stderr, " handle=%04x", req->handle );
2487 fprintf( stderr, ", flags=%08x", req->flags );
2488 fprintf( stderr, ", suspend=%d", req->suspend );
2491 static void dump_get_thread_context_reply( const struct get_thread_context_reply *req )
2493 fprintf( stderr, " self=%d", req->self );
2494 dump_varargs_context( ", context=", cur_size );
2497 static void dump_set_thread_context_request( const struct set_thread_context_request *req )
2499 fprintf( stderr, " handle=%04x", req->handle );
2500 fprintf( stderr, ", suspend=%d", req->suspend );
2501 dump_varargs_context( ", context=", cur_size );
2504 static void dump_set_thread_context_reply( const struct set_thread_context_reply *req )
2506 fprintf( stderr, " self=%d", req->self );
2509 static void dump_get_selector_entry_request( const struct get_selector_entry_request *req )
2511 fprintf( stderr, " handle=%04x", req->handle );
2512 fprintf( stderr, ", entry=%d", req->entry );
2515 static void dump_get_selector_entry_reply( const struct get_selector_entry_reply *req )
2517 fprintf( stderr, " base=%08x", req->base );
2518 fprintf( stderr, ", limit=%08x", req->limit );
2519 fprintf( stderr, ", flags=%02x", req->flags );
2522 static void dump_add_atom_request( const struct add_atom_request *req )
2524 fprintf( stderr, " table=%04x", req->table );
2525 dump_varargs_unicode_str( ", name=", cur_size );
2528 static void dump_add_atom_reply( const struct add_atom_reply *req )
2530 fprintf( stderr, " atom=%04x", req->atom );
2533 static void dump_delete_atom_request( const struct delete_atom_request *req )
2535 fprintf( stderr, " table=%04x", req->table );
2536 fprintf( stderr, ", atom=%04x", req->atom );
2539 static void dump_find_atom_request( const struct find_atom_request *req )
2541 fprintf( stderr, " table=%04x", req->table );
2542 dump_varargs_unicode_str( ", name=", cur_size );
2545 static void dump_find_atom_reply( const struct find_atom_reply *req )
2547 fprintf( stderr, " atom=%04x", req->atom );
2550 static void dump_get_atom_information_request( const struct get_atom_information_request *req )
2552 fprintf( stderr, " table=%04x", req->table );
2553 fprintf( stderr, ", atom=%04x", req->atom );
2556 static void dump_get_atom_information_reply( const struct get_atom_information_reply *req )
2558 fprintf( stderr, " count=%d", req->count );
2559 fprintf( stderr, ", pinned=%d", req->pinned );
2560 fprintf( stderr, ", total=%u", req->total );
2561 dump_varargs_unicode_str( ", name=", cur_size );
2564 static void dump_set_atom_information_request( const struct set_atom_information_request *req )
2566 fprintf( stderr, " table=%04x", req->table );
2567 fprintf( stderr, ", atom=%04x", req->atom );
2568 fprintf( stderr, ", pinned=%d", req->pinned );
2571 static void dump_empty_atom_table_request( const struct empty_atom_table_request *req )
2573 fprintf( stderr, " table=%04x", req->table );
2574 fprintf( stderr, ", if_pinned=%d", req->if_pinned );
2577 static void dump_init_atom_table_request( const struct init_atom_table_request *req )
2579 fprintf( stderr, " entries=%d", req->entries );
2582 static void dump_init_atom_table_reply( const struct init_atom_table_reply *req )
2584 fprintf( stderr, " table=%04x", req->table );
2587 static void dump_get_msg_queue_request( const struct get_msg_queue_request *req )
2591 static void dump_get_msg_queue_reply( const struct get_msg_queue_reply *req )
2593 fprintf( stderr, " handle=%04x", req->handle );
2596 static void dump_set_queue_fd_request( const struct set_queue_fd_request *req )
2598 fprintf( stderr, " handle=%04x", req->handle );
2601 static void dump_set_queue_mask_request( const struct set_queue_mask_request *req )
2603 fprintf( stderr, " wake_mask=%08x", req->wake_mask );
2604 fprintf( stderr, ", changed_mask=%08x", req->changed_mask );
2605 fprintf( stderr, ", skip_wait=%d", req->skip_wait );
2608 static void dump_set_queue_mask_reply( const struct set_queue_mask_reply *req )
2610 fprintf( stderr, " wake_bits=%08x", req->wake_bits );
2611 fprintf( stderr, ", changed_bits=%08x", req->changed_bits );
2614 static void dump_get_queue_status_request( const struct get_queue_status_request *req )
2616 fprintf( stderr, " clear_bits=%08x", req->clear_bits );
2619 static void dump_get_queue_status_reply( const struct get_queue_status_reply *req )
2621 fprintf( stderr, " wake_bits=%08x", req->wake_bits );
2622 fprintf( stderr, ", changed_bits=%08x", req->changed_bits );
2625 static void dump_get_process_idle_event_request( const struct get_process_idle_event_request *req )
2627 fprintf( stderr, " handle=%04x", req->handle );
2630 static void dump_get_process_idle_event_reply( const struct get_process_idle_event_reply *req )
2632 fprintf( stderr, " event=%04x", req->event );
2635 static void dump_send_message_request( const struct send_message_request *req )
2637 fprintf( stderr, " id=%04x", req->id );
2638 fprintf( stderr, ", type=%d", req->type );
2639 fprintf( stderr, ", flags=%d", req->flags );
2640 fprintf( stderr, ", win=%08x", req->win );
2641 fprintf( stderr, ", msg=%08x", req->msg );
2642 dump_uint64( ", wparam=", &req->wparam );
2643 dump_uint64( ", lparam=", &req->lparam );
2644 dump_timeout( ", timeout=", &req->timeout );
2645 dump_varargs_message_data( ", data=", cur_size );
2648 static void dump_post_quit_message_request( const struct post_quit_message_request *req )
2650 fprintf( stderr, " exit_code=%d", req->exit_code );
2653 static void dump_send_hardware_message_request( const struct send_hardware_message_request *req )
2655 fprintf( stderr, " win=%08x", req->win );
2656 dump_hw_input( ", input=", &req->input );
2657 fprintf( stderr, ", flags=%08x", req->flags );
2660 static void dump_send_hardware_message_reply( const struct send_hardware_message_reply *req )
2662 fprintf( stderr, " wait=%d", req->wait );
2663 fprintf( stderr, ", prev_x=%d", req->prev_x );
2664 fprintf( stderr, ", prev_y=%d", req->prev_y );
2665 fprintf( stderr, ", new_x=%d", req->new_x );
2666 fprintf( stderr, ", new_y=%d", req->new_y );
2667 dump_varargs_bytes( ", keystate=", cur_size );
2670 static void dump_get_message_request( const struct get_message_request *req )
2672 fprintf( stderr, " flags=%08x", req->flags );
2673 fprintf( stderr, ", get_win=%08x", req->get_win );
2674 fprintf( stderr, ", get_first=%08x", req->get_first );
2675 fprintf( stderr, ", get_last=%08x", req->get_last );
2676 fprintf( stderr, ", hw_id=%08x", req->hw_id );
2677 fprintf( stderr, ", wake_mask=%08x", req->wake_mask );
2678 fprintf( stderr, ", changed_mask=%08x", req->changed_mask );
2681 static void dump_get_message_reply( const struct get_message_reply *req )
2683 fprintf( stderr, " win=%08x", req->win );
2684 fprintf( stderr, ", msg=%08x", req->msg );
2685 dump_uint64( ", wparam=", &req->wparam );
2686 dump_uint64( ", lparam=", &req->lparam );
2687 fprintf( stderr, ", type=%d", req->type );
2688 fprintf( stderr, ", x=%d", req->x );
2689 fprintf( stderr, ", y=%d", req->y );
2690 fprintf( stderr, ", time=%08x", req->time );
2691 fprintf( stderr, ", active_hooks=%08x", req->active_hooks );
2692 fprintf( stderr, ", total=%u", req->total );
2693 dump_varargs_message_data( ", data=", cur_size );
2696 static void dump_reply_message_request( const struct reply_message_request *req )
2698 fprintf( stderr, " remove=%d", req->remove );
2699 dump_uint64( ", result=", &req->result );
2700 dump_varargs_bytes( ", data=", cur_size );
2703 static void dump_accept_hardware_message_request( const struct accept_hardware_message_request *req )
2705 fprintf( stderr, " hw_id=%08x", req->hw_id );
2706 fprintf( stderr, ", remove=%d", req->remove );
2709 static void dump_get_message_reply_request( const struct get_message_reply_request *req )
2711 fprintf( stderr, " cancel=%d", req->cancel );
2714 static void dump_get_message_reply_reply( const struct get_message_reply_reply *req )
2716 dump_uint64( " result=", &req->result );
2717 dump_varargs_bytes( ", data=", cur_size );
2720 static void dump_set_win_timer_request( const struct set_win_timer_request *req )
2722 fprintf( stderr, " win=%08x", req->win );
2723 fprintf( stderr, ", msg=%08x", req->msg );
2724 fprintf( stderr, ", rate=%08x", req->rate );
2725 dump_uint64( ", id=", &req->id );
2726 dump_uint64( ", lparam=", &req->lparam );
2729 static void dump_set_win_timer_reply( const struct set_win_timer_reply *req )
2731 dump_uint64( " id=", &req->id );
2734 static void dump_kill_win_timer_request( const struct kill_win_timer_request *req )
2736 fprintf( stderr, " win=%08x", req->win );
2737 dump_uint64( ", id=", &req->id );
2738 fprintf( stderr, ", msg=%08x", req->msg );
2741 static void dump_is_window_hung_request( const struct is_window_hung_request *req )
2743 fprintf( stderr, " win=%08x", req->win );
2746 static void dump_is_window_hung_reply( const struct is_window_hung_reply *req )
2748 fprintf( stderr, " is_hung=%d", req->is_hung );
2751 static void dump_get_serial_info_request( const struct get_serial_info_request *req )
2753 fprintf( stderr, " handle=%04x", req->handle );
2754 fprintf( stderr, ", flags=%d", req->flags );
2757 static void dump_get_serial_info_reply( const struct get_serial_info_reply *req )
2759 fprintf( stderr, " readinterval=%08x", req->readinterval );
2760 fprintf( stderr, ", readconst=%08x", req->readconst );
2761 fprintf( stderr, ", readmult=%08x", req->readmult );
2762 fprintf( stderr, ", writeconst=%08x", req->writeconst );
2763 fprintf( stderr, ", writemult=%08x", req->writemult );
2764 fprintf( stderr, ", eventmask=%08x", req->eventmask );
2765 fprintf( stderr, ", cookie=%08x", req->cookie );
2766 fprintf( stderr, ", pending_write=%08x", req->pending_write );
2769 static void dump_set_serial_info_request( const struct set_serial_info_request *req )
2771 fprintf( stderr, " handle=%04x", req->handle );
2772 fprintf( stderr, ", flags=%d", req->flags );
2773 fprintf( stderr, ", readinterval=%08x", req->readinterval );
2774 fprintf( stderr, ", readconst=%08x", req->readconst );
2775 fprintf( stderr, ", readmult=%08x", req->readmult );
2776 fprintf( stderr, ", writeconst=%08x", req->writeconst );
2777 fprintf( stderr, ", writemult=%08x", req->writemult );
2778 fprintf( stderr, ", eventmask=%08x", req->eventmask );
2781 static void dump_register_async_request( const struct register_async_request *req )
2783 fprintf( stderr, " type=%d", req->type );
2784 dump_async_data( ", async=", &req->async );
2785 fprintf( stderr, ", count=%d", req->count );
2788 static void dump_cancel_async_request( const struct cancel_async_request *req )
2790 fprintf( stderr, " handle=%04x", req->handle );
2791 dump_uint64( ", iosb=", &req->iosb );
2792 fprintf( stderr, ", only_thread=%d", req->only_thread );
2795 static void dump_read_request( const struct read_request *req )
2797 fprintf( stderr, " blocking=%d", req->blocking );
2798 dump_async_data( ", async=", &req->async );
2799 dump_uint64( ", pos=", &req->pos );
2802 static void dump_read_reply( const struct read_reply *req )
2804 fprintf( stderr, " wait=%04x", req->wait );
2805 fprintf( stderr, ", options=%08x", req->options );
2806 dump_varargs_bytes( ", data=", cur_size );
2809 static void dump_write_request( const struct write_request *req )
2811 fprintf( stderr, " blocking=%d", req->blocking );
2812 dump_async_data( ", async=", &req->async );
2813 dump_uint64( ", pos=", &req->pos );
2814 dump_varargs_bytes( ", data=", cur_size );
2817 static void dump_write_reply( const struct write_reply *req )
2819 fprintf( stderr, " wait=%04x", req->wait );
2820 fprintf( stderr, ", options=%08x", req->options );
2821 fprintf( stderr, ", size=%u", req->size );
2824 static void dump_ioctl_request( const struct ioctl_request *req )
2826 dump_ioctl_code( " code=", &req->code );
2827 dump_async_data( ", async=", &req->async );
2828 fprintf( stderr, ", blocking=%d", req->blocking );
2829 dump_varargs_bytes( ", in_data=", cur_size );
2832 static void dump_ioctl_reply( const struct ioctl_reply *req )
2834 fprintf( stderr, " wait=%04x", req->wait );
2835 fprintf( stderr, ", options=%08x", req->options );
2836 dump_varargs_bytes( ", out_data=", cur_size );
2839 static void dump_set_irp_result_request( const struct set_irp_result_request *req )
2841 fprintf( stderr, " handle=%04x", req->handle );
2842 fprintf( stderr, ", status=%08x", req->status );
2843 fprintf( stderr, ", size=%u", req->size );
2844 dump_uint64( ", file_ptr=", &req->file_ptr );
2845 dump_varargs_bytes( ", data=", cur_size );
2848 static void dump_get_irp_result_request( const struct get_irp_result_request *req )
2850 fprintf( stderr, " handle=%04x", req->handle );
2851 dump_uint64( ", user_arg=", &req->user_arg );
2854 static void dump_get_irp_result_reply( const struct get_irp_result_reply *req )
2856 fprintf( stderr, " size=%u", req->size );
2857 dump_varargs_bytes( ", out_data=", cur_size );
2860 static void dump_create_named_pipe_request( const struct create_named_pipe_request *req )
2862 fprintf( stderr, " access=%08x", req->access );
2863 fprintf( stderr, ", attributes=%08x", req->attributes );
2864 fprintf( stderr, ", options=%08x", req->options );
2865 fprintf( stderr, ", sharing=%08x", req->sharing );
2866 fprintf( stderr, ", maxinstances=%08x", req->maxinstances );
2867 fprintf( stderr, ", outsize=%08x", req->outsize );
2868 fprintf( stderr, ", insize=%08x", req->insize );
2869 dump_timeout( ", timeout=", &req->timeout );
2870 fprintf( stderr, ", flags=%08x", req->flags );
2871 dump_varargs_object_attributes( ", objattr=", cur_size );
2874 static void dump_create_named_pipe_reply( const struct create_named_pipe_reply *req )
2876 fprintf( stderr, " handle=%04x", req->handle );
2879 static void dump_get_named_pipe_info_request( const struct get_named_pipe_info_request *req )
2881 fprintf( stderr, " handle=%04x", req->handle );
2884 static void dump_get_named_pipe_info_reply( const struct get_named_pipe_info_reply *req )
2886 fprintf( stderr, " flags=%08x", req->flags );
2887 fprintf( stderr, ", sharing=%08x", req->sharing );
2888 fprintf( stderr, ", maxinstances=%08x", req->maxinstances );
2889 fprintf( stderr, ", instances=%08x", req->instances );
2890 fprintf( stderr, ", outsize=%08x", req->outsize );
2891 fprintf( stderr, ", insize=%08x", req->insize );
2894 static void dump_set_named_pipe_info_request( const struct set_named_pipe_info_request *req )
2896 fprintf( stderr, " handle=%04x", req->handle );
2897 fprintf( stderr, ", flags=%08x", req->flags );
2900 static void dump_create_window_request( const struct create_window_request *req )
2902 fprintf( stderr, " parent=%08x", req->parent );
2903 fprintf( stderr, ", owner=%08x", req->owner );
2904 fprintf( stderr, ", atom=%04x", req->atom );
2905 dump_uint64( ", instance=", &req->instance );
2906 dump_varargs_unicode_str( ", class=", cur_size );
2909 static void dump_create_window_reply( const struct create_window_reply *req )
2911 fprintf( stderr, " handle=%08x", req->handle );
2912 fprintf( stderr, ", parent=%08x", req->parent );
2913 fprintf( stderr, ", owner=%08x", req->owner );
2914 fprintf( stderr, ", extra=%d", req->extra );
2915 dump_uint64( ", class_ptr=", &req->class_ptr );
2918 static void dump_destroy_window_request( const struct destroy_window_request *req )
2920 fprintf( stderr, " handle=%08x", req->handle );
2923 static void dump_get_desktop_window_request( const struct get_desktop_window_request *req )
2925 fprintf( stderr, " force=%d", req->force );
2928 static void dump_get_desktop_window_reply( const struct get_desktop_window_reply *req )
2930 fprintf( stderr, " top_window=%08x", req->top_window );
2931 fprintf( stderr, ", msg_window=%08x", req->msg_window );
2934 static void dump_set_window_owner_request( const struct set_window_owner_request *req )
2936 fprintf( stderr, " handle=%08x", req->handle );
2937 fprintf( stderr, ", owner=%08x", req->owner );
2940 static void dump_set_window_owner_reply( const struct set_window_owner_reply *req )
2942 fprintf( stderr, " full_owner=%08x", req->full_owner );
2943 fprintf( stderr, ", prev_owner=%08x", req->prev_owner );
2946 static void dump_get_window_info_request( const struct get_window_info_request *req )
2948 fprintf( stderr, " handle=%08x", req->handle );
2951 static void dump_get_window_info_reply( const struct get_window_info_reply *req )
2953 fprintf( stderr, " full_handle=%08x", req->full_handle );
2954 fprintf( stderr, ", last_active=%08x", req->last_active );
2955 fprintf( stderr, ", pid=%04x", req->pid );
2956 fprintf( stderr, ", tid=%04x", req->tid );
2957 fprintf( stderr, ", atom=%04x", req->atom );
2958 fprintf( stderr, ", is_unicode=%d", req->is_unicode );
2961 static void dump_set_window_info_request( const struct set_window_info_request *req )
2963 fprintf( stderr, " flags=%04x", req->flags );
2964 fprintf( stderr, ", is_unicode=%d", req->is_unicode );
2965 fprintf( stderr, ", handle=%08x", req->handle );
2966 fprintf( stderr, ", style=%08x", req->style );
2967 fprintf( stderr, ", ex_style=%08x", req->ex_style );
2968 fprintf( stderr, ", id=%08x", req->id );
2969 dump_uint64( ", instance=", &req->instance );
2970 dump_uint64( ", user_data=", &req->user_data );
2971 fprintf( stderr, ", extra_offset=%d", req->extra_offset );
2972 fprintf( stderr, ", extra_size=%u", req->extra_size );
2973 dump_uint64( ", extra_value=", &req->extra_value );
2976 static void dump_set_window_info_reply( const struct set_window_info_reply *req )
2978 fprintf( stderr, " old_style=%08x", req->old_style );
2979 fprintf( stderr, ", old_ex_style=%08x", req->old_ex_style );
2980 dump_uint64( ", old_instance=", &req->old_instance );
2981 dump_uint64( ", old_user_data=", &req->old_user_data );
2982 dump_uint64( ", old_extra_value=", &req->old_extra_value );
2983 fprintf( stderr, ", old_id=%08x", req->old_id );
2986 static void dump_set_parent_request( const struct set_parent_request *req )
2988 fprintf( stderr, " handle=%08x", req->handle );
2989 fprintf( stderr, ", parent=%08x", req->parent );
2992 static void dump_set_parent_reply( const struct set_parent_reply *req )
2994 fprintf( stderr, " old_parent=%08x", req->old_parent );
2995 fprintf( stderr, ", full_parent=%08x", req->full_parent );
2998 static void dump_get_window_parents_request( const struct get_window_parents_request *req )
3000 fprintf( stderr, " handle=%08x", req->handle );
3003 static void dump_get_window_parents_reply( const struct get_window_parents_reply *req )
3005 fprintf( stderr, " count=%d", req->count );
3006 dump_varargs_user_handles( ", parents=", cur_size );
3009 static void dump_get_window_children_request( const struct get_window_children_request *req )
3011 fprintf( stderr, " desktop=%04x", req->desktop );
3012 fprintf( stderr, ", parent=%08x", req->parent );
3013 fprintf( stderr, ", atom=%04x", req->atom );
3014 fprintf( stderr, ", tid=%04x", req->tid );
3015 dump_varargs_unicode_str( ", class=", cur_size );
3018 static void dump_get_window_children_reply( const struct get_window_children_reply *req )
3020 fprintf( stderr, " count=%d", req->count );
3021 dump_varargs_user_handles( ", children=", cur_size );
3024 static void dump_get_window_children_from_point_request( const struct get_window_children_from_point_request *req )
3026 fprintf( stderr, " parent=%08x", req->parent );
3027 fprintf( stderr, ", x=%d", req->x );
3028 fprintf( stderr, ", y=%d", req->y );
3031 static void dump_get_window_children_from_point_reply( const struct get_window_children_from_point_reply *req )
3033 fprintf( stderr, " count=%d", req->count );
3034 dump_varargs_user_handles( ", children=", cur_size );
3037 static void dump_get_window_tree_request( const struct get_window_tree_request *req )
3039 fprintf( stderr, " handle=%08x", req->handle );
3042 static void dump_get_window_tree_reply( const struct get_window_tree_reply *req )
3044 fprintf( stderr, " parent=%08x", req->parent );
3045 fprintf( stderr, ", owner=%08x", req->owner );
3046 fprintf( stderr, ", next_sibling=%08x", req->next_sibling );
3047 fprintf( stderr, ", prev_sibling=%08x", req->prev_sibling );
3048 fprintf( stderr, ", first_sibling=%08x", req->first_sibling );
3049 fprintf( stderr, ", last_sibling=%08x", req->last_sibling );
3050 fprintf( stderr, ", first_child=%08x", req->first_child );
3051 fprintf( stderr, ", last_child=%08x", req->last_child );
3054 static void dump_set_window_pos_request( const struct set_window_pos_request *req )
3056 fprintf( stderr, " swp_flags=%04x", req->swp_flags );
3057 fprintf( stderr, ", paint_flags=%04x", req->paint_flags );
3058 fprintf( stderr, ", handle=%08x", req->handle );
3059 fprintf( stderr, ", previous=%08x", req->previous );
3060 dump_rectangle( ", window=", &req->window );
3061 dump_rectangle( ", client=", &req->client );
3062 dump_varargs_rectangles( ", valid=", cur_size );
3065 static void dump_set_window_pos_reply( const struct set_window_pos_reply *req )
3067 fprintf( stderr, " new_style=%08x", req->new_style );
3068 fprintf( stderr, ", new_ex_style=%08x", req->new_ex_style );
3069 fprintf( stderr, ", surface_win=%08x", req->surface_win );
3072 static void dump_get_window_rectangles_request( const struct get_window_rectangles_request *req )
3074 fprintf( stderr, " handle=%08x", req->handle );
3075 fprintf( stderr, ", relative=%d", req->relative );
3078 static void dump_get_window_rectangles_reply( const struct get_window_rectangles_reply *req )
3080 dump_rectangle( " window=", &req->window );
3081 dump_rectangle( ", visible=", &req->visible );
3082 dump_rectangle( ", client=", &req->client );
3085 static void dump_get_window_text_request( const struct get_window_text_request *req )
3087 fprintf( stderr, " handle=%08x", req->handle );
3090 static void dump_get_window_text_reply( const struct get_window_text_reply *req )
3092 dump_varargs_unicode_str( " text=", cur_size );
3095 static void dump_set_window_text_request( const struct set_window_text_request *req )
3097 fprintf( stderr, " handle=%08x", req->handle );
3098 dump_varargs_unicode_str( ", text=", cur_size );
3101 static void dump_get_windows_offset_request( const struct get_windows_offset_request *req )
3103 fprintf( stderr, " from=%08x", req->from );
3104 fprintf( stderr, ", to=%08x", req->to );
3107 static void dump_get_windows_offset_reply( const struct get_windows_offset_reply *req )
3109 fprintf( stderr, " x=%d", req->x );
3110 fprintf( stderr, ", y=%d", req->y );
3111 fprintf( stderr, ", mirror=%d", req->mirror );
3114 static void dump_get_visible_region_request( const struct get_visible_region_request *req )
3116 fprintf( stderr, " window=%08x", req->window );
3117 fprintf( stderr, ", flags=%08x", req->flags );
3120 static void dump_get_visible_region_reply( const struct get_visible_region_reply *req )
3122 fprintf( stderr, " top_win=%08x", req->top_win );
3123 dump_rectangle( ", top_rect=", &req->top_rect );
3124 dump_rectangle( ", win_rect=", &req->win_rect );
3125 fprintf( stderr, ", paint_flags=%08x", req->paint_flags );
3126 fprintf( stderr, ", total_size=%u", req->total_size );
3127 dump_varargs_rectangles( ", region=", cur_size );
3130 static void dump_get_surface_region_request( const struct get_surface_region_request *req )
3132 fprintf( stderr, " window=%08x", req->window );
3135 static void dump_get_surface_region_reply( const struct get_surface_region_reply *req )
3137 dump_rectangle( " visible_rect=", &req->visible_rect );
3138 fprintf( stderr, ", total_size=%u", req->total_size );
3139 dump_varargs_rectangles( ", region=", cur_size );
3142 static void dump_get_window_region_request( const struct get_window_region_request *req )
3144 fprintf( stderr, " window=%08x", req->window );
3147 static void dump_get_window_region_reply( const struct get_window_region_reply *req )
3149 fprintf( stderr, " total_size=%u", req->total_size );
3150 dump_varargs_rectangles( ", region=", cur_size );
3153 static void dump_set_window_region_request( const struct set_window_region_request *req )
3155 fprintf( stderr, " window=%08x", req->window );
3156 fprintf( stderr, ", redraw=%d", req->redraw );
3157 dump_varargs_rectangles( ", region=", cur_size );
3160 static void dump_get_update_region_request( const struct get_update_region_request *req )
3162 fprintf( stderr, " window=%08x", req->window );
3163 fprintf( stderr, ", from_child=%08x", req->from_child );
3164 fprintf( stderr, ", flags=%08x", req->flags );
3167 static void dump_get_update_region_reply( const struct get_update_region_reply *req )
3169 fprintf( stderr, " child=%08x", req->child );
3170 fprintf( stderr, ", flags=%08x", req->flags );
3171 fprintf( stderr, ", total_size=%u", req->total_size );
3172 dump_varargs_rectangles( ", region=", cur_size );
3175 static void dump_update_window_zorder_request( const struct update_window_zorder_request *req )
3177 fprintf( stderr, " window=%08x", req->window );
3178 dump_rectangle( ", rect=", &req->rect );
3181 static void dump_redraw_window_request( const struct redraw_window_request *req )
3183 fprintf( stderr, " window=%08x", req->window );
3184 fprintf( stderr, ", flags=%08x", req->flags );
3185 dump_varargs_rectangles( ", region=", cur_size );
3188 static void dump_set_window_property_request( const struct set_window_property_request *req )
3190 fprintf( stderr, " window=%08x", req->window );
3191 dump_uint64( ", data=", &req->data );
3192 fprintf( stderr, ", atom=%04x", req->atom );
3193 dump_varargs_unicode_str( ", name=", cur_size );
3196 static void dump_remove_window_property_request( const struct remove_window_property_request *req )
3198 fprintf( stderr, " window=%08x", req->window );
3199 fprintf( stderr, ", atom=%04x", req->atom );
3200 dump_varargs_unicode_str( ", name=", cur_size );
3203 static void dump_remove_window_property_reply( const struct remove_window_property_reply *req )
3205 dump_uint64( " data=", &req->data );
3208 static void dump_get_window_property_request( const struct get_window_property_request *req )
3210 fprintf( stderr, " window=%08x", req->window );
3211 fprintf( stderr, ", atom=%04x", req->atom );
3212 dump_varargs_unicode_str( ", name=", cur_size );
3215 static void dump_get_window_property_reply( const struct get_window_property_reply *req )
3217 dump_uint64( " data=", &req->data );
3220 static void dump_get_window_properties_request( const struct get_window_properties_request *req )
3222 fprintf( stderr, " window=%08x", req->window );
3225 static void dump_get_window_properties_reply( const struct get_window_properties_reply *req )
3227 fprintf( stderr, " total=%d", req->total );
3228 dump_varargs_properties( ", props=", cur_size );
3231 static void dump_create_winstation_request( const struct create_winstation_request *req )
3233 fprintf( stderr, " flags=%08x", req->flags );
3234 fprintf( stderr, ", access=%08x", req->access );
3235 fprintf( stderr, ", attributes=%08x", req->attributes );
3236 dump_varargs_unicode_str( ", name=", cur_size );
3239 static void dump_create_winstation_reply( const struct create_winstation_reply *req )
3241 fprintf( stderr, " handle=%04x", req->handle );
3244 static void dump_open_winstation_request( const struct open_winstation_request *req )
3246 fprintf( stderr, " access=%08x", req->access );
3247 fprintf( stderr, ", attributes=%08x", req->attributes );
3248 dump_varargs_unicode_str( ", name=", cur_size );
3251 static void dump_open_winstation_reply( const struct open_winstation_reply *req )
3253 fprintf( stderr, " handle=%04x", req->handle );
3256 static void dump_close_winstation_request( const struct close_winstation_request *req )
3258 fprintf( stderr, " handle=%04x", req->handle );
3261 static void dump_get_process_winstation_request( const struct get_process_winstation_request *req )
3265 static void dump_get_process_winstation_reply( const struct get_process_winstation_reply *req )
3267 fprintf( stderr, " handle=%04x", req->handle );
3270 static void dump_set_process_winstation_request( const struct set_process_winstation_request *req )
3272 fprintf( stderr, " handle=%04x", req->handle );
3275 static void dump_enum_winstation_request( const struct enum_winstation_request *req )
3277 fprintf( stderr, " index=%08x", req->index );
3280 static void dump_enum_winstation_reply( const struct enum_winstation_reply *req )
3282 fprintf( stderr, " next=%08x", req->next );
3283 dump_varargs_unicode_str( ", name=", cur_size );
3286 static void dump_create_desktop_request( const struct create_desktop_request *req )
3288 fprintf( stderr, " flags=%08x", req->flags );
3289 fprintf( stderr, ", access=%08x", req->access );
3290 fprintf( stderr, ", attributes=%08x", req->attributes );
3291 dump_varargs_unicode_str( ", name=", cur_size );
3294 static void dump_create_desktop_reply( const struct create_desktop_reply *req )
3296 fprintf( stderr, " handle=%04x", req->handle );
3299 static void dump_open_desktop_request( const struct open_desktop_request *req )
3301 fprintf( stderr, " winsta=%04x", req->winsta );
3302 fprintf( stderr, ", flags=%08x", req->flags );
3303 fprintf( stderr, ", access=%08x", req->access );
3304 fprintf( stderr, ", attributes=%08x", req->attributes );
3305 dump_varargs_unicode_str( ", name=", cur_size );
3308 static void dump_open_desktop_reply( const struct open_desktop_reply *req )
3310 fprintf( stderr, " handle=%04x", req->handle );
3313 static void dump_open_input_desktop_request( const struct open_input_desktop_request *req )
3315 fprintf( stderr, " flags=%08x", req->flags );
3316 fprintf( stderr, ", access=%08x", req->access );
3317 fprintf( stderr, ", attributes=%08x", req->attributes );
3320 static void dump_open_input_desktop_reply( const struct open_input_desktop_reply *req )
3322 fprintf( stderr, " handle=%04x", req->handle );
3325 static void dump_close_desktop_request( const struct close_desktop_request *req )
3327 fprintf( stderr, " handle=%04x", req->handle );
3330 static void dump_get_thread_desktop_request( const struct get_thread_desktop_request *req )
3332 fprintf( stderr, " tid=%04x", req->tid );
3335 static void dump_get_thread_desktop_reply( const struct get_thread_desktop_reply *req )
3337 fprintf( stderr, " handle=%04x", req->handle );
3340 static void dump_set_thread_desktop_request( const struct set_thread_desktop_request *req )
3342 fprintf( stderr, " handle=%04x", req->handle );
3345 static void dump_enum_desktop_request( const struct enum_desktop_request *req )
3347 fprintf( stderr, " winstation=%04x", req->winstation );
3348 fprintf( stderr, ", index=%08x", req->index );
3351 static void dump_enum_desktop_reply( const struct enum_desktop_reply *req )
3353 fprintf( stderr, " next=%08x", req->next );
3354 dump_varargs_unicode_str( ", name=", cur_size );
3357 static void dump_set_user_object_info_request( const struct set_user_object_info_request *req )
3359 fprintf( stderr, " handle=%04x", req->handle );
3360 fprintf( stderr, ", flags=%08x", req->flags );
3361 fprintf( stderr, ", obj_flags=%08x", req->obj_flags );
3364 static void dump_set_user_object_info_reply( const struct set_user_object_info_reply *req )
3366 fprintf( stderr, " is_desktop=%d", req->is_desktop );
3367 fprintf( stderr, ", old_obj_flags=%08x", req->old_obj_flags );
3368 dump_varargs_unicode_str( ", name=", cur_size );
3371 static void dump_register_hotkey_request( const struct register_hotkey_request *req )
3373 fprintf( stderr, " window=%08x", req->window );
3374 fprintf( stderr, ", id=%d", req->id );
3375 fprintf( stderr, ", flags=%08x", req->flags );
3376 fprintf( stderr, ", vkey=%08x", req->vkey );
3379 static void dump_register_hotkey_reply( const struct register_hotkey_reply *req )
3381 fprintf( stderr, " replaced=%d", req->replaced );
3382 fprintf( stderr, ", flags=%08x", req->flags );
3383 fprintf( stderr, ", vkey=%08x", req->vkey );
3386 static void dump_unregister_hotkey_request( const struct unregister_hotkey_request *req )
3388 fprintf( stderr, " window=%08x", req->window );
3389 fprintf( stderr, ", id=%d", req->id );
3392 static void dump_unregister_hotkey_reply( const struct unregister_hotkey_reply *req )
3394 fprintf( stderr, " flags=%08x", req->flags );
3395 fprintf( stderr, ", vkey=%08x", req->vkey );
3398 static void dump_attach_thread_input_request( const struct attach_thread_input_request *req )
3400 fprintf( stderr, " tid_from=%04x", req->tid_from );
3401 fprintf( stderr, ", tid_to=%04x", req->tid_to );
3402 fprintf( stderr, ", attach=%d", req->attach );
3405 static void dump_get_thread_input_request( const struct get_thread_input_request *req )
3407 fprintf( stderr, " tid=%04x", req->tid );
3410 static void dump_get_thread_input_reply( const struct get_thread_input_reply *req )
3412 fprintf( stderr, " focus=%08x", req->focus );
3413 fprintf( stderr, ", capture=%08x", req->capture );
3414 fprintf( stderr, ", active=%08x", req->active );
3415 fprintf( stderr, ", foreground=%08x", req->foreground );
3416 fprintf( stderr, ", menu_owner=%08x", req->menu_owner );
3417 fprintf( stderr, ", move_size=%08x", req->move_size );
3418 fprintf( stderr, ", caret=%08x", req->caret );
3419 fprintf( stderr, ", cursor=%08x", req->cursor );
3420 fprintf( stderr, ", show_count=%d", req->show_count );
3421 dump_rectangle( ", rect=", &req->rect );
3424 static void dump_get_last_input_time_request( const struct get_last_input_time_request *req )
3428 static void dump_get_last_input_time_reply( const struct get_last_input_time_reply *req )
3430 fprintf( stderr, " time=%08x", req->time );
3433 static void dump_get_key_state_request( const struct get_key_state_request *req )
3435 fprintf( stderr, " tid=%04x", req->tid );
3436 fprintf( stderr, ", key=%d", req->key );
3439 static void dump_get_key_state_reply( const struct get_key_state_reply *req )
3441 fprintf( stderr, " state=%02x", req->state );
3442 dump_varargs_bytes( ", keystate=", cur_size );
3445 static void dump_set_key_state_request( const struct set_key_state_request *req )
3447 fprintf( stderr, " tid=%04x", req->tid );
3448 fprintf( stderr, ", async=%d", req->async );
3449 dump_varargs_bytes( ", keystate=", cur_size );
3452 static void dump_set_foreground_window_request( const struct set_foreground_window_request *req )
3454 fprintf( stderr, " handle=%08x", req->handle );
3457 static void dump_set_foreground_window_reply( const struct set_foreground_window_reply *req )
3459 fprintf( stderr, " previous=%08x", req->previous );
3460 fprintf( stderr, ", send_msg_old=%d", req->send_msg_old );
3461 fprintf( stderr, ", send_msg_new=%d", req->send_msg_new );
3464 static void dump_set_focus_window_request( const struct set_focus_window_request *req )
3466 fprintf( stderr, " handle=%08x", req->handle );
3469 static void dump_set_focus_window_reply( const struct set_focus_window_reply *req )
3471 fprintf( stderr, " previous=%08x", req->previous );
3474 static void dump_set_active_window_request( const struct set_active_window_request *req )
3476 fprintf( stderr, " handle=%08x", req->handle );
3479 static void dump_set_active_window_reply( const struct set_active_window_reply *req )
3481 fprintf( stderr, " previous=%08x", req->previous );
3484 static void dump_set_capture_window_request( const struct set_capture_window_request *req )
3486 fprintf( stderr, " handle=%08x", req->handle );
3487 fprintf( stderr, ", flags=%08x", req->flags );
3490 static void dump_set_capture_window_reply( const struct set_capture_window_reply *req )
3492 fprintf( stderr, " previous=%08x", req->previous );
3493 fprintf( stderr, ", full_handle=%08x", req->full_handle );
3496 static void dump_set_caret_window_request( const struct set_caret_window_request *req )
3498 fprintf( stderr, " handle=%08x", req->handle );
3499 fprintf( stderr, ", width=%d", req->width );
3500 fprintf( stderr, ", height=%d", req->height );
3503 static void dump_set_caret_window_reply( const struct set_caret_window_reply *req )
3505 fprintf( stderr, " previous=%08x", req->previous );
3506 dump_rectangle( ", old_rect=", &req->old_rect );
3507 fprintf( stderr, ", old_hide=%d", req->old_hide );
3508 fprintf( stderr, ", old_state=%d", req->old_state );
3511 static void dump_set_caret_info_request( const struct set_caret_info_request *req )
3513 fprintf( stderr, " flags=%08x", req->flags );
3514 fprintf( stderr, ", handle=%08x", req->handle );
3515 fprintf( stderr, ", x=%d", req->x );
3516 fprintf( stderr, ", y=%d", req->y );
3517 fprintf( stderr, ", hide=%d", req->hide );
3518 fprintf( stderr, ", state=%d", req->state );
3521 static void dump_set_caret_info_reply( const struct set_caret_info_reply *req )
3523 fprintf( stderr, " full_handle=%08x", req->full_handle );
3524 dump_rectangle( ", old_rect=", &req->old_rect );
3525 fprintf( stderr, ", old_hide=%d", req->old_hide );
3526 fprintf( stderr, ", old_state=%d", req->old_state );
3529 static void dump_set_hook_request( const struct set_hook_request *req )
3531 fprintf( stderr, " id=%d", req->id );
3532 fprintf( stderr, ", pid=%04x", req->pid );
3533 fprintf( stderr, ", tid=%04x", req->tid );
3534 fprintf( stderr, ", event_min=%d", req->event_min );
3535 fprintf( stderr, ", event_max=%d", req->event_max );
3536 dump_uint64( ", proc=", &req->proc );
3537 fprintf( stderr, ", flags=%d", req->flags );
3538 fprintf( stderr, ", unicode=%d", req->unicode );
3539 dump_varargs_unicode_str( ", module=", cur_size );
3542 static void dump_set_hook_reply( const struct set_hook_reply *req )
3544 fprintf( stderr, " handle=%08x", req->handle );
3545 fprintf( stderr, ", active_hooks=%08x", req->active_hooks );
3548 static void dump_remove_hook_request( const struct remove_hook_request *req )
3550 fprintf( stderr, " handle=%08x", req->handle );
3551 dump_uint64( ", proc=", &req->proc );
3552 fprintf( stderr, ", id=%d", req->id );
3555 static void dump_remove_hook_reply( const struct remove_hook_reply *req )
3557 fprintf( stderr, " active_hooks=%08x", req->active_hooks );
3560 static void dump_start_hook_chain_request( const struct start_hook_chain_request *req )
3562 fprintf( stderr, " id=%d", req->id );
3563 fprintf( stderr, ", event=%d", req->event );
3564 fprintf( stderr, ", window=%08x", req->window );
3565 fprintf( stderr, ", object_id=%d", req->object_id );
3566 fprintf( stderr, ", child_id=%d", req->child_id );
3569 static void dump_start_hook_chain_reply( const struct start_hook_chain_reply *req )
3571 fprintf( stderr, " handle=%08x", req->handle );
3572 fprintf( stderr, ", pid=%04x", req->pid );
3573 fprintf( stderr, ", tid=%04x", req->tid );
3574 fprintf( stderr, ", unicode=%d", req->unicode );
3575 dump_uint64( ", proc=", &req->proc );
3576 fprintf( stderr, ", active_hooks=%08x", req->active_hooks );
3577 dump_varargs_unicode_str( ", module=", cur_size );
3580 static void dump_finish_hook_chain_request( const struct finish_hook_chain_request *req )
3582 fprintf( stderr, " id=%d", req->id );
3585 static void dump_get_hook_info_request( const struct get_hook_info_request *req )
3587 fprintf( stderr, " handle=%08x", req->handle );
3588 fprintf( stderr, ", get_next=%d", req->get_next );
3589 fprintf( stderr, ", event=%d", req->event );
3590 fprintf( stderr, ", window=%08x", req->window );
3591 fprintf( stderr, ", object_id=%d", req->object_id );
3592 fprintf( stderr, ", child_id=%d", req->child_id );
3595 static void dump_get_hook_info_reply( const struct get_hook_info_reply *req )
3597 fprintf( stderr, " handle=%08x", req->handle );
3598 fprintf( stderr, ", id=%d", req->id );
3599 fprintf( stderr, ", pid=%04x", req->pid );
3600 fprintf( stderr, ", tid=%04x", req->tid );
3601 dump_uint64( ", proc=", &req->proc );
3602 fprintf( stderr, ", unicode=%d", req->unicode );
3603 dump_varargs_unicode_str( ", module=", cur_size );
3606 static void dump_create_class_request( const struct create_class_request *req )
3608 fprintf( stderr, " local=%d", req->local );
3609 fprintf( stderr, ", atom=%04x", req->atom );
3610 fprintf( stderr, ", style=%08x", req->style );
3611 dump_uint64( ", instance=", &req->instance );
3612 fprintf( stderr, ", extra=%d", req->extra );
3613 fprintf( stderr, ", win_extra=%d", req->win_extra );
3614 dump_uint64( ", client_ptr=", &req->client_ptr );
3615 dump_varargs_unicode_str( ", name=", cur_size );
3618 static void dump_create_class_reply( const struct create_class_reply *req )
3620 fprintf( stderr, " atom=%04x", req->atom );
3623 static void dump_destroy_class_request( const struct destroy_class_request *req )
3625 fprintf( stderr, " atom=%04x", req->atom );
3626 dump_uint64( ", instance=", &req->instance );
3627 dump_varargs_unicode_str( ", name=", cur_size );
3630 static void dump_destroy_class_reply( const struct destroy_class_reply *req )
3632 dump_uint64( " client_ptr=", &req->client_ptr );
3635 static void dump_set_class_info_request( const struct set_class_info_request *req )
3637 fprintf( stderr, " window=%08x", req->window );
3638 fprintf( stderr, ", flags=%08x", req->flags );
3639 fprintf( stderr, ", atom=%04x", req->atom );
3640 fprintf( stderr, ", style=%08x", req->style );
3641 fprintf( stderr, ", win_extra=%d", req->win_extra );
3642 dump_uint64( ", instance=", &req->instance );
3643 fprintf( stderr, ", extra_offset=%d", req->extra_offset );
3644 fprintf( stderr, ", extra_size=%u", req->extra_size );
3645 dump_uint64( ", extra_value=", &req->extra_value );
3648 static void dump_set_class_info_reply( const struct set_class_info_reply *req )
3650 fprintf( stderr, " old_atom=%04x", req->old_atom );
3651 fprintf( stderr, ", old_style=%08x", req->old_style );
3652 fprintf( stderr, ", old_extra=%d", req->old_extra );
3653 fprintf( stderr, ", old_win_extra=%d", req->old_win_extra );
3654 dump_uint64( ", old_instance=", &req->old_instance );
3655 dump_uint64( ", old_extra_value=", &req->old_extra_value );
3658 static void dump_set_clipboard_info_request( const struct set_clipboard_info_request *req )
3660 fprintf( stderr, " flags=%08x", req->flags );
3661 fprintf( stderr, ", clipboard=%08x", req->clipboard );
3662 fprintf( stderr, ", owner=%08x", req->owner );
3663 fprintf( stderr, ", viewer=%08x", req->viewer );
3664 fprintf( stderr, ", seqno=%08x", req->seqno );
3667 static void dump_set_clipboard_info_reply( const struct set_clipboard_info_reply *req )
3669 fprintf( stderr, " flags=%08x", req->flags );
3670 fprintf( stderr, ", old_clipboard=%08x", req->old_clipboard );
3671 fprintf( stderr, ", old_owner=%08x", req->old_owner );
3672 fprintf( stderr, ", old_viewer=%08x", req->old_viewer );
3673 fprintf( stderr, ", seqno=%08x", req->seqno );
3676 static void dump_empty_clipboard_request( const struct empty_clipboard_request *req )
3680 static void dump_open_token_request( const struct open_token_request *req )
3682 fprintf( stderr, " handle=%04x", req->handle );
3683 fprintf( stderr, ", access=%08x", req->access );
3684 fprintf( stderr, ", attributes=%08x", req->attributes );
3685 fprintf( stderr, ", flags=%08x", req->flags );
3688 static void dump_open_token_reply( const struct open_token_reply *req )
3690 fprintf( stderr, " token=%04x", req->token );
3693 static void dump_set_global_windows_request( const struct set_global_windows_request *req )
3695 fprintf( stderr, " flags=%08x", req->flags );
3696 fprintf( stderr, ", shell_window=%08x", req->shell_window );
3697 fprintf( stderr, ", shell_listview=%08x", req->shell_listview );
3698 fprintf( stderr, ", progman_window=%08x", req->progman_window );
3699 fprintf( stderr, ", taskman_window=%08x", req->taskman_window );
3702 static void dump_set_global_windows_reply( const struct set_global_windows_reply *req )
3704 fprintf( stderr, " old_shell_window=%08x", req->old_shell_window );
3705 fprintf( stderr, ", old_shell_listview=%08x", req->old_shell_listview );
3706 fprintf( stderr, ", old_progman_window=%08x", req->old_progman_window );
3707 fprintf( stderr, ", old_taskman_window=%08x", req->old_taskman_window );
3710 static void dump_adjust_token_privileges_request( const struct adjust_token_privileges_request *req )
3712 fprintf( stderr, " handle=%04x", req->handle );
3713 fprintf( stderr, ", disable_all=%d", req->disable_all );
3714 fprintf( stderr, ", get_modified_state=%d", req->get_modified_state );
3715 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3718 static void dump_adjust_token_privileges_reply( const struct adjust_token_privileges_reply *req )
3720 fprintf( stderr, " len=%08x", req->len );
3721 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3724 static void dump_get_token_privileges_request( const struct get_token_privileges_request *req )
3726 fprintf( stderr, " handle=%04x", req->handle );
3729 static void dump_get_token_privileges_reply( const struct get_token_privileges_reply *req )
3731 fprintf( stderr, " len=%08x", req->len );
3732 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3735 static void dump_check_token_privileges_request( const struct check_token_privileges_request *req )
3737 fprintf( stderr, " handle=%04x", req->handle );
3738 fprintf( stderr, ", all_required=%d", req->all_required );
3739 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3742 static void dump_check_token_privileges_reply( const struct check_token_privileges_reply *req )
3744 fprintf( stderr, " has_privileges=%d", req->has_privileges );
3745 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3748 static void dump_duplicate_token_request( const struct duplicate_token_request *req )
3750 fprintf( stderr, " handle=%04x", req->handle );
3751 fprintf( stderr, ", access=%08x", req->access );
3752 fprintf( stderr, ", attributes=%08x", req->attributes );
3753 fprintf( stderr, ", primary=%d", req->primary );
3754 fprintf( stderr, ", impersonation_level=%d", req->impersonation_level );
3757 static void dump_duplicate_token_reply( const struct duplicate_token_reply *req )
3759 fprintf( stderr, " new_handle=%04x", req->new_handle );
3762 static void dump_access_check_request( const struct access_check_request *req )
3764 fprintf( stderr, " handle=%04x", req->handle );
3765 fprintf( stderr, ", desired_access=%08x", req->desired_access );
3766 fprintf( stderr, ", mapping_read=%08x", req->mapping_read );
3767 fprintf( stderr, ", mapping_write=%08x", req->mapping_write );
3768 fprintf( stderr, ", mapping_execute=%08x", req->mapping_execute );
3769 fprintf( stderr, ", mapping_all=%08x", req->mapping_all );
3770 dump_varargs_security_descriptor( ", sd=", cur_size );
3773 static void dump_access_check_reply( const struct access_check_reply *req )
3775 fprintf( stderr, " access_granted=%08x", req->access_granted );
3776 fprintf( stderr, ", access_status=%08x", req->access_status );
3777 fprintf( stderr, ", privileges_len=%08x", req->privileges_len );
3778 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3781 static void dump_get_token_sid_request( const struct get_token_sid_request *req )
3783 fprintf( stderr, " handle=%04x", req->handle );
3784 fprintf( stderr, ", which_sid=%08x", req->which_sid );
3787 static void dump_get_token_sid_reply( const struct get_token_sid_reply *req )
3789 fprintf( stderr, " sid_len=%u", req->sid_len );
3790 dump_varargs_SID( ", sid=", cur_size );
3793 static void dump_get_token_groups_request( const struct get_token_groups_request *req )
3795 fprintf( stderr, " handle=%04x", req->handle );
3798 static void dump_get_token_groups_reply( const struct get_token_groups_reply *req )
3800 fprintf( stderr, " user_len=%u", req->user_len );
3801 dump_varargs_token_groups( ", user=", cur_size );
3804 static void dump_get_token_default_dacl_request( const struct get_token_default_dacl_request *req )
3806 fprintf( stderr, " handle=%04x", req->handle );
3809 static void dump_get_token_default_dacl_reply( const struct get_token_default_dacl_reply *req )
3811 fprintf( stderr, " acl_len=%u", req->acl_len );
3812 dump_varargs_ACL( ", acl=", cur_size );
3815 static void dump_set_token_default_dacl_request( const struct set_token_default_dacl_request *req )
3817 fprintf( stderr, " handle=%04x", req->handle );
3818 dump_varargs_ACL( ", acl=", cur_size );
3821 static void dump_set_security_object_request( const struct set_security_object_request *req )
3823 fprintf( stderr, " handle=%04x", req->handle );
3824 fprintf( stderr, ", security_info=%08x", req->security_info );
3825 dump_varargs_security_descriptor( ", sd=", cur_size );
3828 static void dump_get_security_object_request( const struct get_security_object_request *req )
3830 fprintf( stderr, " handle=%04x", req->handle );
3831 fprintf( stderr, ", security_info=%08x", req->security_info );
3834 static void dump_get_security_object_reply( const struct get_security_object_reply *req )
3836 fprintf( stderr, " sd_len=%08x", req->sd_len );
3837 dump_varargs_security_descriptor( ", sd=", cur_size );
3840 static void dump_create_mailslot_request( const struct create_mailslot_request *req )
3842 fprintf( stderr, " access=%08x", req->access );
3843 fprintf( stderr, ", attributes=%08x", req->attributes );
3844 fprintf( stderr, ", rootdir=%04x", req->rootdir );
3845 dump_timeout( ", read_timeout=", &req->read_timeout );
3846 fprintf( stderr, ", max_msgsize=%08x", req->max_msgsize );
3847 dump_varargs_unicode_str( ", name=", cur_size );
3850 static void dump_create_mailslot_reply( const struct create_mailslot_reply *req )
3852 fprintf( stderr, " handle=%04x", req->handle );
3855 static void dump_set_mailslot_info_request( const struct set_mailslot_info_request *req )
3857 fprintf( stderr, " handle=%04x", req->handle );
3858 dump_timeout( ", read_timeout=", &req->read_timeout );
3859 fprintf( stderr, ", flags=%08x", req->flags );
3862 static void dump_set_mailslot_info_reply( const struct set_mailslot_info_reply *req )
3864 dump_timeout( " read_timeout=", &req->read_timeout );
3865 fprintf( stderr, ", max_msgsize=%08x", req->max_msgsize );
3868 static void dump_create_directory_request( const struct create_directory_request *req )
3870 fprintf( stderr, " access=%08x", req->access );
3871 fprintf( stderr, ", attributes=%08x", req->attributes );
3872 fprintf( stderr, ", rootdir=%04x", req->rootdir );
3873 dump_varargs_unicode_str( ", directory_name=", cur_size );
3876 static void dump_create_directory_reply( const struct create_directory_reply *req )
3878 fprintf( stderr, " handle=%04x", req->handle );
3881 static void dump_open_directory_request( const struct open_directory_request *req )
3883 fprintf( stderr, " access=%08x", req->access );
3884 fprintf( stderr, ", attributes=%08x", req->attributes );
3885 fprintf( stderr, ", rootdir=%04x", req->rootdir );
3886 dump_varargs_unicode_str( ", directory_name=", cur_size );
3889 static void dump_open_directory_reply( const struct open_directory_reply *req )
3891 fprintf( stderr, " handle=%04x", req->handle );
3894 static void dump_get_directory_entry_request( const struct get_directory_entry_request *req )
3896 fprintf( stderr, " handle=%04x", req->handle );
3897 fprintf( stderr, ", index=%08x", req->index );
3900 static void dump_get_directory_entry_reply( const struct get_directory_entry_reply *req )
3902 fprintf( stderr, " name_len=%u", req->name_len );
3903 dump_varargs_unicode_str( ", name=", min(cur_size,req->name_len) );
3904 dump_varargs_unicode_str( ", type=", cur_size );
3907 static void dump_create_symlink_request( const struct create_symlink_request *req )
3909 fprintf( stderr, " access=%08x", req->access );
3910 fprintf( stderr, ", attributes=%08x", req->attributes );
3911 fprintf( stderr, ", rootdir=%04x", req->rootdir );
3912 fprintf( stderr, ", name_len=%u", req->name_len );
3913 dump_varargs_unicode_str( ", name=", min(cur_size,req->name_len) );
3914 dump_varargs_unicode_str( ", target_name=", cur_size );
3917 static void dump_create_symlink_reply( const struct create_symlink_reply *req )
3919 fprintf( stderr, " handle=%04x", req->handle );
3922 static void dump_open_symlink_request( const struct open_symlink_request *req )
3924 fprintf( stderr, " access=%08x", req->access );
3925 fprintf( stderr, ", attributes=%08x", req->attributes );
3926 fprintf( stderr, ", rootdir=%04x", req->rootdir );
3927 dump_varargs_unicode_str( ", name=", cur_size );
3930 static void dump_open_symlink_reply( const struct open_symlink_reply *req )
3932 fprintf( stderr, " handle=%04x", req->handle );
3935 static void dump_query_symlink_request( const struct query_symlink_request *req )
3937 fprintf( stderr, " handle=%04x", req->handle );
3940 static void dump_query_symlink_reply( const struct query_symlink_reply *req )
3942 fprintf( stderr, " total=%u", req->total );
3943 dump_varargs_unicode_str( ", target_name=", cur_size );
3946 static void dump_get_object_info_request( const struct get_object_info_request *req )
3948 fprintf( stderr, " handle=%04x", req->handle );
3951 static void dump_get_object_info_reply( const struct get_object_info_reply *req )
3953 fprintf( stderr, " access=%08x", req->access );
3954 fprintf( stderr, ", ref_count=%08x", req->ref_count );
3955 fprintf( stderr, ", handle_count=%08x", req->handle_count );
3956 fprintf( stderr, ", total=%u", req->total );
3957 dump_varargs_unicode_str( ", name=", cur_size );
3960 static void dump_get_object_type_request( const struct get_object_type_request *req )
3962 fprintf( stderr, " handle=%04x", req->handle );
3965 static void dump_get_object_type_reply( const struct get_object_type_reply *req )
3967 fprintf( stderr, " total=%u", req->total );
3968 dump_varargs_unicode_str( ", type=", cur_size );
3971 static void dump_unlink_object_request( const struct unlink_object_request *req )
3973 fprintf( stderr, " handle=%04x", req->handle );
3976 static void dump_get_token_impersonation_level_request( const struct get_token_impersonation_level_request *req )
3978 fprintf( stderr, " handle=%04x", req->handle );
3981 static void dump_get_token_impersonation_level_reply( const struct get_token_impersonation_level_reply *req )
3983 fprintf( stderr, " impersonation_level=%d", req->impersonation_level );
3986 static void dump_allocate_locally_unique_id_request( const struct allocate_locally_unique_id_request *req )
3990 static void dump_allocate_locally_unique_id_reply( const struct allocate_locally_unique_id_reply *req )
3992 dump_luid( " luid=", &req->luid );
3995 static void dump_create_device_manager_request( const struct create_device_manager_request *req )
3997 fprintf( stderr, " access=%08x", req->access );
3998 fprintf( stderr, ", attributes=%08x", req->attributes );
4001 static void dump_create_device_manager_reply( const struct create_device_manager_reply *req )
4003 fprintf( stderr, " handle=%04x", req->handle );
4006 static void dump_create_device_request( const struct create_device_request *req )
4008 fprintf( stderr, " access=%08x", req->access );
4009 fprintf( stderr, ", attributes=%08x", req->attributes );
4010 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4011 dump_uint64( ", user_ptr=", &req->user_ptr );
4012 fprintf( stderr, ", manager=%04x", req->manager );
4013 dump_varargs_unicode_str( ", name=", cur_size );
4016 static void dump_create_device_reply( const struct create_device_reply *req )
4018 fprintf( stderr, " handle=%04x", req->handle );
4021 static void dump_delete_device_request( const struct delete_device_request *req )
4023 fprintf( stderr, " handle=%04x", req->handle );
4026 static void dump_get_next_device_request_request( const struct get_next_device_request_request *req )
4028 fprintf( stderr, " manager=%04x", req->manager );
4029 fprintf( stderr, ", prev=%04x", req->prev );
4030 fprintf( stderr, ", status=%08x", req->status );
4033 static void dump_get_next_device_request_reply( const struct get_next_device_request_reply *req )
4035 dump_irp_params( " params=", &req->params );
4036 fprintf( stderr, ", next=%04x", req->next );
4037 fprintf( stderr, ", client_pid=%04x", req->client_pid );
4038 fprintf( stderr, ", client_tid=%04x", req->client_tid );
4039 fprintf( stderr, ", in_size=%u", req->in_size );
4040 fprintf( stderr, ", out_size=%u", req->out_size );
4041 dump_varargs_bytes( ", next_data=", cur_size );
4044 static void dump_make_process_system_request( const struct make_process_system_request *req )
4048 static void dump_make_process_system_reply( const struct make_process_system_reply *req )
4050 fprintf( stderr, " event=%04x", req->event );
4053 static void dump_get_token_statistics_request( const struct get_token_statistics_request *req )
4055 fprintf( stderr, " handle=%04x", req->handle );
4058 static void dump_get_token_statistics_reply( const struct get_token_statistics_reply *req )
4060 dump_luid( " token_id=", &req->token_id );
4061 dump_luid( ", modified_id=", &req->modified_id );
4062 fprintf( stderr, ", primary=%d", req->primary );
4063 fprintf( stderr, ", impersonation_level=%d", req->impersonation_level );
4064 fprintf( stderr, ", group_count=%d", req->group_count );
4065 fprintf( stderr, ", privilege_count=%d", req->privilege_count );
4068 static void dump_create_completion_request( const struct create_completion_request *req )
4070 fprintf( stderr, " access=%08x", req->access );
4071 fprintf( stderr, ", attributes=%08x", req->attributes );
4072 fprintf( stderr, ", concurrent=%08x", req->concurrent );
4073 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4074 dump_varargs_unicode_str( ", filename=", cur_size );
4077 static void dump_create_completion_reply( const struct create_completion_reply *req )
4079 fprintf( stderr, " handle=%04x", req->handle );
4082 static void dump_open_completion_request( const struct open_completion_request *req )
4084 fprintf( stderr, " access=%08x", req->access );
4085 fprintf( stderr, ", attributes=%08x", req->attributes );
4086 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4087 dump_varargs_unicode_str( ", filename=", cur_size );
4090 static void dump_open_completion_reply( const struct open_completion_reply *req )
4092 fprintf( stderr, " handle=%04x", req->handle );
4095 static void dump_add_completion_request( const struct add_completion_request *req )
4097 fprintf( stderr, " handle=%04x", req->handle );
4098 dump_uint64( ", ckey=", &req->ckey );
4099 dump_uint64( ", cvalue=", &req->cvalue );
4100 dump_uint64( ", information=", &req->information );
4101 fprintf( stderr, ", status=%08x", req->status );
4104 static void dump_remove_completion_request( const struct remove_completion_request *req )
4106 fprintf( stderr, " handle=%04x", req->handle );
4109 static void dump_remove_completion_reply( const struct remove_completion_reply *req )
4111 dump_uint64( " ckey=", &req->ckey );
4112 dump_uint64( ", cvalue=", &req->cvalue );
4113 dump_uint64( ", information=", &req->information );
4114 fprintf( stderr, ", status=%08x", req->status );
4117 static void dump_query_completion_request( const struct query_completion_request *req )
4119 fprintf( stderr, " handle=%04x", req->handle );
4122 static void dump_query_completion_reply( const struct query_completion_reply *req )
4124 fprintf( stderr, " depth=%08x", req->depth );
4127 static void dump_set_completion_info_request( const struct set_completion_info_request *req )
4129 fprintf( stderr, " handle=%04x", req->handle );
4130 dump_uint64( ", ckey=", &req->ckey );
4131 fprintf( stderr, ", chandle=%04x", req->chandle );
4134 static void dump_add_fd_completion_request( const struct add_fd_completion_request *req )
4136 fprintf( stderr, " handle=%04x", req->handle );
4137 dump_uint64( ", cvalue=", &req->cvalue );
4138 dump_uint64( ", information=", &req->information );
4139 fprintf( stderr, ", status=%08x", req->status );
4142 static void dump_set_fd_disp_info_request( const struct set_fd_disp_info_request *req )
4144 fprintf( stderr, " handle=%04x", req->handle );
4145 fprintf( stderr, ", unlink=%d", req->unlink );
4148 static void dump_set_fd_name_info_request( const struct set_fd_name_info_request *req )
4150 fprintf( stderr, " handle=%04x", req->handle );
4151 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4152 fprintf( stderr, ", link=%d", req->link );
4153 dump_varargs_string( ", filename=", cur_size );
4156 static void dump_get_window_layered_info_request( const struct get_window_layered_info_request *req )
4158 fprintf( stderr, " handle=%08x", req->handle );
4161 static void dump_get_window_layered_info_reply( const struct get_window_layered_info_reply *req )
4163 fprintf( stderr, " color_key=%08x", req->color_key );
4164 fprintf( stderr, ", alpha=%08x", req->alpha );
4165 fprintf( stderr, ", flags=%08x", req->flags );
4168 static void dump_set_window_layered_info_request( const struct set_window_layered_info_request *req )
4170 fprintf( stderr, " handle=%08x", req->handle );
4171 fprintf( stderr, ", color_key=%08x", req->color_key );
4172 fprintf( stderr, ", alpha=%08x", req->alpha );
4173 fprintf( stderr, ", flags=%08x", req->flags );
4176 static void dump_alloc_user_handle_request( const struct alloc_user_handle_request *req )
4180 static void dump_alloc_user_handle_reply( const struct alloc_user_handle_reply *req )
4182 fprintf( stderr, " handle=%08x", req->handle );
4185 static void dump_free_user_handle_request( const struct free_user_handle_request *req )
4187 fprintf( stderr, " handle=%08x", req->handle );
4190 static void dump_set_cursor_request( const struct set_cursor_request *req )
4192 fprintf( stderr, " flags=%08x", req->flags );
4193 fprintf( stderr, ", handle=%08x", req->handle );
4194 fprintf( stderr, ", show_count=%d", req->show_count );
4195 fprintf( stderr, ", x=%d", req->x );
4196 fprintf( stderr, ", y=%d", req->y );
4197 dump_rectangle( ", clip=", &req->clip );
4198 fprintf( stderr, ", clip_msg=%08x", req->clip_msg );
4201 static void dump_set_cursor_reply( const struct set_cursor_reply *req )
4203 fprintf( stderr, " prev_handle=%08x", req->prev_handle );
4204 fprintf( stderr, ", prev_count=%d", req->prev_count );
4205 fprintf( stderr, ", prev_x=%d", req->prev_x );
4206 fprintf( stderr, ", prev_y=%d", req->prev_y );
4207 fprintf( stderr, ", new_x=%d", req->new_x );
4208 fprintf( stderr, ", new_y=%d", req->new_y );
4209 dump_rectangle( ", new_clip=", &req->new_clip );
4210 fprintf( stderr, ", last_change=%08x", req->last_change );
4213 static void dump_update_rawinput_devices_request( const struct update_rawinput_devices_request *req )
4215 dump_varargs_rawinput_devices( " devices=", cur_size );
4218 static void dump_get_suspend_context_request( const struct get_suspend_context_request *req )
4222 static void dump_get_suspend_context_reply( const struct get_suspend_context_reply *req )
4224 dump_varargs_context( " context=", cur_size );
4227 static void dump_set_suspend_context_request( const struct set_suspend_context_request *req )
4229 dump_varargs_context( " context=", cur_size );
4232 static void dump_create_job_request( const struct create_job_request *req )
4234 fprintf( stderr, " access=%08x", req->access );
4235 fprintf( stderr, ", attributes=%08x", req->attributes );
4236 dump_varargs_object_attributes( ", objattr=", cur_size );
4239 static void dump_create_job_reply( const struct create_job_reply *req )
4241 fprintf( stderr, " handle=%04x", req->handle );
4244 static void dump_assign_job_request( const struct assign_job_request *req )
4246 fprintf( stderr, " job=%04x", req->job );
4247 fprintf( stderr, ", process=%04x", req->process );
4250 static void dump_process_in_job_request( const struct process_in_job_request *req )
4252 fprintf( stderr, " job=%04x", req->job );
4253 fprintf( stderr, ", process=%04x", req->process );
4256 static void dump_set_job_limits_request( const struct set_job_limits_request *req )
4258 fprintf( stderr, " handle=%04x", req->handle );
4259 fprintf( stderr, ", limit_flags=%08x", req->limit_flags );
4262 static void dump_set_job_completion_port_request( const struct set_job_completion_port_request *req )
4264 fprintf( stderr, " job=%04x", req->job );
4265 fprintf( stderr, ", port=%04x", req->port );
4266 dump_uint64( ", key=", &req->key );
4269 static void dump_terminate_job_request( const struct terminate_job_request *req )
4271 fprintf( stderr, " handle=%04x", req->handle );
4272 fprintf( stderr, ", status=%d", req->status );
4275 static const dump_func req_dumpers[REQ_NB_REQUESTS] = {
4276 (dump_func)dump_new_process_request,
4277 (dump_func)dump_get_new_process_info_request,
4278 (dump_func)dump_new_thread_request,
4279 (dump_func)dump_get_startup_info_request,
4280 (dump_func)dump_init_process_done_request,
4281 (dump_func)dump_init_thread_request,
4282 (dump_func)dump_terminate_process_request,
4283 (dump_func)dump_terminate_thread_request,
4284 (dump_func)dump_get_process_info_request,
4285 (dump_func)dump_set_process_info_request,
4286 (dump_func)dump_get_thread_info_request,
4287 (dump_func)dump_get_thread_times_request,
4288 (dump_func)dump_set_thread_info_request,
4289 (dump_func)dump_get_dll_info_request,
4290 (dump_func)dump_suspend_thread_request,
4291 (dump_func)dump_resume_thread_request,
4292 (dump_func)dump_load_dll_request,
4293 (dump_func)dump_unload_dll_request,
4294 (dump_func)dump_queue_apc_request,
4295 (dump_func)dump_get_apc_result_request,
4296 (dump_func)dump_close_handle_request,
4297 (dump_func)dump_set_handle_info_request,
4298 (dump_func)dump_dup_handle_request,
4299 (dump_func)dump_open_process_request,
4300 (dump_func)dump_open_thread_request,
4301 (dump_func)dump_select_request,
4302 (dump_func)dump_create_event_request,
4303 (dump_func)dump_event_op_request,
4304 (dump_func)dump_query_event_request,
4305 (dump_func)dump_open_event_request,
4306 (dump_func)dump_create_keyed_event_request,
4307 (dump_func)dump_open_keyed_event_request,
4308 (dump_func)dump_create_mutex_request,
4309 (dump_func)dump_release_mutex_request,
4310 (dump_func)dump_open_mutex_request,
4311 (dump_func)dump_create_semaphore_request,
4312 (dump_func)dump_release_semaphore_request,
4313 (dump_func)dump_query_semaphore_request,
4314 (dump_func)dump_open_semaphore_request,
4315 (dump_func)dump_create_file_request,
4316 (dump_func)dump_open_file_object_request,
4317 (dump_func)dump_alloc_file_handle_request,
4318 (dump_func)dump_get_handle_unix_name_request,
4319 (dump_func)dump_get_handle_fd_request,
4320 (dump_func)dump_flush_request,
4321 (dump_func)dump_lock_file_request,
4322 (dump_func)dump_unlock_file_request,
4323 (dump_func)dump_create_socket_request,
4324 (dump_func)dump_accept_socket_request,
4325 (dump_func)dump_accept_into_socket_request,
4326 (dump_func)dump_set_socket_event_request,
4327 (dump_func)dump_get_socket_event_request,
4328 (dump_func)dump_get_socket_info_request,
4329 (dump_func)dump_enable_socket_event_request,
4330 (dump_func)dump_set_socket_deferred_request,
4331 (dump_func)dump_alloc_console_request,
4332 (dump_func)dump_free_console_request,
4333 (dump_func)dump_get_console_renderer_events_request,
4334 (dump_func)dump_open_console_request,
4335 (dump_func)dump_get_console_wait_event_request,
4336 (dump_func)dump_get_console_mode_request,
4337 (dump_func)dump_set_console_mode_request,
4338 (dump_func)dump_set_console_input_info_request,
4339 (dump_func)dump_get_console_input_info_request,
4340 (dump_func)dump_append_console_input_history_request,
4341 (dump_func)dump_get_console_input_history_request,
4342 (dump_func)dump_create_console_output_request,
4343 (dump_func)dump_set_console_output_info_request,
4344 (dump_func)dump_get_console_output_info_request,
4345 (dump_func)dump_write_console_input_request,
4346 (dump_func)dump_read_console_input_request,
4347 (dump_func)dump_write_console_output_request,
4348 (dump_func)dump_fill_console_output_request,
4349 (dump_func)dump_read_console_output_request,
4350 (dump_func)dump_move_console_output_request,
4351 (dump_func)dump_send_console_signal_request,
4352 (dump_func)dump_read_directory_changes_request,
4353 (dump_func)dump_read_change_request,
4354 (dump_func)dump_create_mapping_request,
4355 (dump_func)dump_open_mapping_request,
4356 (dump_func)dump_get_mapping_info_request,
4357 (dump_func)dump_get_mapping_committed_range_request,
4358 (dump_func)dump_add_mapping_committed_range_request,
4359 (dump_func)dump_create_snapshot_request,
4360 (dump_func)dump_next_process_request,
4361 (dump_func)dump_next_thread_request,
4362 (dump_func)dump_wait_debug_event_request,
4363 (dump_func)dump_queue_exception_event_request,
4364 (dump_func)dump_get_exception_status_request,
4365 (dump_func)dump_continue_debug_event_request,
4366 (dump_func)dump_debug_process_request,
4367 (dump_func)dump_debug_break_request,
4368 (dump_func)dump_set_debugger_kill_on_exit_request,
4369 (dump_func)dump_read_process_memory_request,
4370 (dump_func)dump_write_process_memory_request,
4371 (dump_func)dump_create_key_request,
4372 (dump_func)dump_open_key_request,
4373 (dump_func)dump_delete_key_request,
4374 (dump_func)dump_flush_key_request,
4375 (dump_func)dump_enum_key_request,
4376 (dump_func)dump_set_key_value_request,
4377 (dump_func)dump_get_key_value_request,
4378 (dump_func)dump_enum_key_value_request,
4379 (dump_func)dump_delete_key_value_request,
4380 (dump_func)dump_load_registry_request,
4381 (dump_func)dump_unload_registry_request,
4382 (dump_func)dump_save_registry_request,
4383 (dump_func)dump_set_registry_notification_request,
4384 (dump_func)dump_create_timer_request,
4385 (dump_func)dump_open_timer_request,
4386 (dump_func)dump_set_timer_request,
4387 (dump_func)dump_cancel_timer_request,
4388 (dump_func)dump_get_timer_info_request,
4389 (dump_func)dump_get_thread_context_request,
4390 (dump_func)dump_set_thread_context_request,
4391 (dump_func)dump_get_selector_entry_request,
4392 (dump_func)dump_add_atom_request,
4393 (dump_func)dump_delete_atom_request,
4394 (dump_func)dump_find_atom_request,
4395 (dump_func)dump_get_atom_information_request,
4396 (dump_func)dump_set_atom_information_request,
4397 (dump_func)dump_empty_atom_table_request,
4398 (dump_func)dump_init_atom_table_request,
4399 (dump_func)dump_get_msg_queue_request,
4400 (dump_func)dump_set_queue_fd_request,
4401 (dump_func)dump_set_queue_mask_request,
4402 (dump_func)dump_get_queue_status_request,
4403 (dump_func)dump_get_process_idle_event_request,
4404 (dump_func)dump_send_message_request,
4405 (dump_func)dump_post_quit_message_request,
4406 (dump_func)dump_send_hardware_message_request,
4407 (dump_func)dump_get_message_request,
4408 (dump_func)dump_reply_message_request,
4409 (dump_func)dump_accept_hardware_message_request,
4410 (dump_func)dump_get_message_reply_request,
4411 (dump_func)dump_set_win_timer_request,
4412 (dump_func)dump_kill_win_timer_request,
4413 (dump_func)dump_is_window_hung_request,
4414 (dump_func)dump_get_serial_info_request,
4415 (dump_func)dump_set_serial_info_request,
4416 (dump_func)dump_register_async_request,
4417 (dump_func)dump_cancel_async_request,
4418 (dump_func)dump_read_request,
4419 (dump_func)dump_write_request,
4420 (dump_func)dump_ioctl_request,
4421 (dump_func)dump_set_irp_result_request,
4422 (dump_func)dump_get_irp_result_request,
4423 (dump_func)dump_create_named_pipe_request,
4424 (dump_func)dump_get_named_pipe_info_request,
4425 (dump_func)dump_set_named_pipe_info_request,
4426 (dump_func)dump_create_window_request,
4427 (dump_func)dump_destroy_window_request,
4428 (dump_func)dump_get_desktop_window_request,
4429 (dump_func)dump_set_window_owner_request,
4430 (dump_func)dump_get_window_info_request,
4431 (dump_func)dump_set_window_info_request,
4432 (dump_func)dump_set_parent_request,
4433 (dump_func)dump_get_window_parents_request,
4434 (dump_func)dump_get_window_children_request,
4435 (dump_func)dump_get_window_children_from_point_request,
4436 (dump_func)dump_get_window_tree_request,
4437 (dump_func)dump_set_window_pos_request,
4438 (dump_func)dump_get_window_rectangles_request,
4439 (dump_func)dump_get_window_text_request,
4440 (dump_func)dump_set_window_text_request,
4441 (dump_func)dump_get_windows_offset_request,
4442 (dump_func)dump_get_visible_region_request,
4443 (dump_func)dump_get_surface_region_request,
4444 (dump_func)dump_get_window_region_request,
4445 (dump_func)dump_set_window_region_request,
4446 (dump_func)dump_get_update_region_request,
4447 (dump_func)dump_update_window_zorder_request,
4448 (dump_func)dump_redraw_window_request,
4449 (dump_func)dump_set_window_property_request,
4450 (dump_func)dump_remove_window_property_request,
4451 (dump_func)dump_get_window_property_request,
4452 (dump_func)dump_get_window_properties_request,
4453 (dump_func)dump_create_winstation_request,
4454 (dump_func)dump_open_winstation_request,
4455 (dump_func)dump_close_winstation_request,
4456 (dump_func)dump_get_process_winstation_request,
4457 (dump_func)dump_set_process_winstation_request,
4458 (dump_func)dump_enum_winstation_request,
4459 (dump_func)dump_create_desktop_request,
4460 (dump_func)dump_open_desktop_request,
4461 (dump_func)dump_open_input_desktop_request,
4462 (dump_func)dump_close_desktop_request,
4463 (dump_func)dump_get_thread_desktop_request,
4464 (dump_func)dump_set_thread_desktop_request,
4465 (dump_func)dump_enum_desktop_request,
4466 (dump_func)dump_set_user_object_info_request,
4467 (dump_func)dump_register_hotkey_request,
4468 (dump_func)dump_unregister_hotkey_request,
4469 (dump_func)dump_attach_thread_input_request,
4470 (dump_func)dump_get_thread_input_request,
4471 (dump_func)dump_get_last_input_time_request,
4472 (dump_func)dump_get_key_state_request,
4473 (dump_func)dump_set_key_state_request,
4474 (dump_func)dump_set_foreground_window_request,
4475 (dump_func)dump_set_focus_window_request,
4476 (dump_func)dump_set_active_window_request,
4477 (dump_func)dump_set_capture_window_request,
4478 (dump_func)dump_set_caret_window_request,
4479 (dump_func)dump_set_caret_info_request,
4480 (dump_func)dump_set_hook_request,
4481 (dump_func)dump_remove_hook_request,
4482 (dump_func)dump_start_hook_chain_request,
4483 (dump_func)dump_finish_hook_chain_request,
4484 (dump_func)dump_get_hook_info_request,
4485 (dump_func)dump_create_class_request,
4486 (dump_func)dump_destroy_class_request,
4487 (dump_func)dump_set_class_info_request,
4488 (dump_func)dump_set_clipboard_info_request,
4489 (dump_func)dump_empty_clipboard_request,
4490 (dump_func)dump_open_token_request,
4491 (dump_func)dump_set_global_windows_request,
4492 (dump_func)dump_adjust_token_privileges_request,
4493 (dump_func)dump_get_token_privileges_request,
4494 (dump_func)dump_check_token_privileges_request,
4495 (dump_func)dump_duplicate_token_request,
4496 (dump_func)dump_access_check_request,
4497 (dump_func)dump_get_token_sid_request,
4498 (dump_func)dump_get_token_groups_request,
4499 (dump_func)dump_get_token_default_dacl_request,
4500 (dump_func)dump_set_token_default_dacl_request,
4501 (dump_func)dump_set_security_object_request,
4502 (dump_func)dump_get_security_object_request,
4503 (dump_func)dump_create_mailslot_request,
4504 (dump_func)dump_set_mailslot_info_request,
4505 (dump_func)dump_create_directory_request,
4506 (dump_func)dump_open_directory_request,
4507 (dump_func)dump_get_directory_entry_request,
4508 (dump_func)dump_create_symlink_request,
4509 (dump_func)dump_open_symlink_request,
4510 (dump_func)dump_query_symlink_request,
4511 (dump_func)dump_get_object_info_request,
4512 (dump_func)dump_get_object_type_request,
4513 (dump_func)dump_unlink_object_request,
4514 (dump_func)dump_get_token_impersonation_level_request,
4515 (dump_func)dump_allocate_locally_unique_id_request,
4516 (dump_func)dump_create_device_manager_request,
4517 (dump_func)dump_create_device_request,
4518 (dump_func)dump_delete_device_request,
4519 (dump_func)dump_get_next_device_request_request,
4520 (dump_func)dump_make_process_system_request,
4521 (dump_func)dump_get_token_statistics_request,
4522 (dump_func)dump_create_completion_request,
4523 (dump_func)dump_open_completion_request,
4524 (dump_func)dump_add_completion_request,
4525 (dump_func)dump_remove_completion_request,
4526 (dump_func)dump_query_completion_request,
4527 (dump_func)dump_set_completion_info_request,
4528 (dump_func)dump_add_fd_completion_request,
4529 (dump_func)dump_set_fd_disp_info_request,
4530 (dump_func)dump_set_fd_name_info_request,
4531 (dump_func)dump_get_window_layered_info_request,
4532 (dump_func)dump_set_window_layered_info_request,
4533 (dump_func)dump_alloc_user_handle_request,
4534 (dump_func)dump_free_user_handle_request,
4535 (dump_func)dump_set_cursor_request,
4536 (dump_func)dump_update_rawinput_devices_request,
4537 (dump_func)dump_get_suspend_context_request,
4538 (dump_func)dump_set_suspend_context_request,
4539 (dump_func)dump_create_job_request,
4540 (dump_func)dump_assign_job_request,
4541 (dump_func)dump_process_in_job_request,
4542 (dump_func)dump_set_job_limits_request,
4543 (dump_func)dump_set_job_completion_port_request,
4544 (dump_func)dump_terminate_job_request,
4547 static const dump_func reply_dumpers[REQ_NB_REQUESTS] = {
4548 (dump_func)dump_new_process_reply,
4549 (dump_func)dump_get_new_process_info_reply,
4550 (dump_func)dump_new_thread_reply,
4551 (dump_func)dump_get_startup_info_reply,
4552 NULL,
4553 (dump_func)dump_init_thread_reply,
4554 (dump_func)dump_terminate_process_reply,
4555 (dump_func)dump_terminate_thread_reply,
4556 (dump_func)dump_get_process_info_reply,
4557 NULL,
4558 (dump_func)dump_get_thread_info_reply,
4559 (dump_func)dump_get_thread_times_reply,
4560 NULL,
4561 (dump_func)dump_get_dll_info_reply,
4562 (dump_func)dump_suspend_thread_reply,
4563 (dump_func)dump_resume_thread_reply,
4564 NULL,
4565 NULL,
4566 (dump_func)dump_queue_apc_reply,
4567 (dump_func)dump_get_apc_result_reply,
4568 NULL,
4569 (dump_func)dump_set_handle_info_reply,
4570 (dump_func)dump_dup_handle_reply,
4571 (dump_func)dump_open_process_reply,
4572 (dump_func)dump_open_thread_reply,
4573 (dump_func)dump_select_reply,
4574 (dump_func)dump_create_event_reply,
4575 NULL,
4576 (dump_func)dump_query_event_reply,
4577 (dump_func)dump_open_event_reply,
4578 (dump_func)dump_create_keyed_event_reply,
4579 (dump_func)dump_open_keyed_event_reply,
4580 (dump_func)dump_create_mutex_reply,
4581 (dump_func)dump_release_mutex_reply,
4582 (dump_func)dump_open_mutex_reply,
4583 (dump_func)dump_create_semaphore_reply,
4584 (dump_func)dump_release_semaphore_reply,
4585 (dump_func)dump_query_semaphore_reply,
4586 (dump_func)dump_open_semaphore_reply,
4587 (dump_func)dump_create_file_reply,
4588 (dump_func)dump_open_file_object_reply,
4589 (dump_func)dump_alloc_file_handle_reply,
4590 (dump_func)dump_get_handle_unix_name_reply,
4591 (dump_func)dump_get_handle_fd_reply,
4592 (dump_func)dump_flush_reply,
4593 (dump_func)dump_lock_file_reply,
4594 NULL,
4595 (dump_func)dump_create_socket_reply,
4596 (dump_func)dump_accept_socket_reply,
4597 NULL,
4598 NULL,
4599 (dump_func)dump_get_socket_event_reply,
4600 (dump_func)dump_get_socket_info_reply,
4601 NULL,
4602 NULL,
4603 (dump_func)dump_alloc_console_reply,
4604 NULL,
4605 (dump_func)dump_get_console_renderer_events_reply,
4606 (dump_func)dump_open_console_reply,
4607 (dump_func)dump_get_console_wait_event_reply,
4608 (dump_func)dump_get_console_mode_reply,
4609 NULL,
4610 NULL,
4611 (dump_func)dump_get_console_input_info_reply,
4612 NULL,
4613 (dump_func)dump_get_console_input_history_reply,
4614 (dump_func)dump_create_console_output_reply,
4615 NULL,
4616 (dump_func)dump_get_console_output_info_reply,
4617 (dump_func)dump_write_console_input_reply,
4618 (dump_func)dump_read_console_input_reply,
4619 (dump_func)dump_write_console_output_reply,
4620 (dump_func)dump_fill_console_output_reply,
4621 (dump_func)dump_read_console_output_reply,
4622 NULL,
4623 NULL,
4624 NULL,
4625 (dump_func)dump_read_change_reply,
4626 (dump_func)dump_create_mapping_reply,
4627 (dump_func)dump_open_mapping_reply,
4628 (dump_func)dump_get_mapping_info_reply,
4629 (dump_func)dump_get_mapping_committed_range_reply,
4630 NULL,
4631 (dump_func)dump_create_snapshot_reply,
4632 (dump_func)dump_next_process_reply,
4633 (dump_func)dump_next_thread_reply,
4634 (dump_func)dump_wait_debug_event_reply,
4635 (dump_func)dump_queue_exception_event_reply,
4636 (dump_func)dump_get_exception_status_reply,
4637 NULL,
4638 NULL,
4639 (dump_func)dump_debug_break_reply,
4640 NULL,
4641 (dump_func)dump_read_process_memory_reply,
4642 NULL,
4643 (dump_func)dump_create_key_reply,
4644 (dump_func)dump_open_key_reply,
4645 NULL,
4646 NULL,
4647 (dump_func)dump_enum_key_reply,
4648 NULL,
4649 (dump_func)dump_get_key_value_reply,
4650 (dump_func)dump_enum_key_value_reply,
4651 NULL,
4652 NULL,
4653 NULL,
4654 NULL,
4655 NULL,
4656 (dump_func)dump_create_timer_reply,
4657 (dump_func)dump_open_timer_reply,
4658 (dump_func)dump_set_timer_reply,
4659 (dump_func)dump_cancel_timer_reply,
4660 (dump_func)dump_get_timer_info_reply,
4661 (dump_func)dump_get_thread_context_reply,
4662 (dump_func)dump_set_thread_context_reply,
4663 (dump_func)dump_get_selector_entry_reply,
4664 (dump_func)dump_add_atom_reply,
4665 NULL,
4666 (dump_func)dump_find_atom_reply,
4667 (dump_func)dump_get_atom_information_reply,
4668 NULL,
4669 NULL,
4670 (dump_func)dump_init_atom_table_reply,
4671 (dump_func)dump_get_msg_queue_reply,
4672 NULL,
4673 (dump_func)dump_set_queue_mask_reply,
4674 (dump_func)dump_get_queue_status_reply,
4675 (dump_func)dump_get_process_idle_event_reply,
4676 NULL,
4677 NULL,
4678 (dump_func)dump_send_hardware_message_reply,
4679 (dump_func)dump_get_message_reply,
4680 NULL,
4681 NULL,
4682 (dump_func)dump_get_message_reply_reply,
4683 (dump_func)dump_set_win_timer_reply,
4684 NULL,
4685 (dump_func)dump_is_window_hung_reply,
4686 (dump_func)dump_get_serial_info_reply,
4687 NULL,
4688 NULL,
4689 NULL,
4690 (dump_func)dump_read_reply,
4691 (dump_func)dump_write_reply,
4692 (dump_func)dump_ioctl_reply,
4693 NULL,
4694 (dump_func)dump_get_irp_result_reply,
4695 (dump_func)dump_create_named_pipe_reply,
4696 (dump_func)dump_get_named_pipe_info_reply,
4697 NULL,
4698 (dump_func)dump_create_window_reply,
4699 NULL,
4700 (dump_func)dump_get_desktop_window_reply,
4701 (dump_func)dump_set_window_owner_reply,
4702 (dump_func)dump_get_window_info_reply,
4703 (dump_func)dump_set_window_info_reply,
4704 (dump_func)dump_set_parent_reply,
4705 (dump_func)dump_get_window_parents_reply,
4706 (dump_func)dump_get_window_children_reply,
4707 (dump_func)dump_get_window_children_from_point_reply,
4708 (dump_func)dump_get_window_tree_reply,
4709 (dump_func)dump_set_window_pos_reply,
4710 (dump_func)dump_get_window_rectangles_reply,
4711 (dump_func)dump_get_window_text_reply,
4712 NULL,
4713 (dump_func)dump_get_windows_offset_reply,
4714 (dump_func)dump_get_visible_region_reply,
4715 (dump_func)dump_get_surface_region_reply,
4716 (dump_func)dump_get_window_region_reply,
4717 NULL,
4718 (dump_func)dump_get_update_region_reply,
4719 NULL,
4720 NULL,
4721 NULL,
4722 (dump_func)dump_remove_window_property_reply,
4723 (dump_func)dump_get_window_property_reply,
4724 (dump_func)dump_get_window_properties_reply,
4725 (dump_func)dump_create_winstation_reply,
4726 (dump_func)dump_open_winstation_reply,
4727 NULL,
4728 (dump_func)dump_get_process_winstation_reply,
4729 NULL,
4730 (dump_func)dump_enum_winstation_reply,
4731 (dump_func)dump_create_desktop_reply,
4732 (dump_func)dump_open_desktop_reply,
4733 (dump_func)dump_open_input_desktop_reply,
4734 NULL,
4735 (dump_func)dump_get_thread_desktop_reply,
4736 NULL,
4737 (dump_func)dump_enum_desktop_reply,
4738 (dump_func)dump_set_user_object_info_reply,
4739 (dump_func)dump_register_hotkey_reply,
4740 (dump_func)dump_unregister_hotkey_reply,
4741 NULL,
4742 (dump_func)dump_get_thread_input_reply,
4743 (dump_func)dump_get_last_input_time_reply,
4744 (dump_func)dump_get_key_state_reply,
4745 NULL,
4746 (dump_func)dump_set_foreground_window_reply,
4747 (dump_func)dump_set_focus_window_reply,
4748 (dump_func)dump_set_active_window_reply,
4749 (dump_func)dump_set_capture_window_reply,
4750 (dump_func)dump_set_caret_window_reply,
4751 (dump_func)dump_set_caret_info_reply,
4752 (dump_func)dump_set_hook_reply,
4753 (dump_func)dump_remove_hook_reply,
4754 (dump_func)dump_start_hook_chain_reply,
4755 NULL,
4756 (dump_func)dump_get_hook_info_reply,
4757 (dump_func)dump_create_class_reply,
4758 (dump_func)dump_destroy_class_reply,
4759 (dump_func)dump_set_class_info_reply,
4760 (dump_func)dump_set_clipboard_info_reply,
4761 NULL,
4762 (dump_func)dump_open_token_reply,
4763 (dump_func)dump_set_global_windows_reply,
4764 (dump_func)dump_adjust_token_privileges_reply,
4765 (dump_func)dump_get_token_privileges_reply,
4766 (dump_func)dump_check_token_privileges_reply,
4767 (dump_func)dump_duplicate_token_reply,
4768 (dump_func)dump_access_check_reply,
4769 (dump_func)dump_get_token_sid_reply,
4770 (dump_func)dump_get_token_groups_reply,
4771 (dump_func)dump_get_token_default_dacl_reply,
4772 NULL,
4773 NULL,
4774 (dump_func)dump_get_security_object_reply,
4775 (dump_func)dump_create_mailslot_reply,
4776 (dump_func)dump_set_mailslot_info_reply,
4777 (dump_func)dump_create_directory_reply,
4778 (dump_func)dump_open_directory_reply,
4779 (dump_func)dump_get_directory_entry_reply,
4780 (dump_func)dump_create_symlink_reply,
4781 (dump_func)dump_open_symlink_reply,
4782 (dump_func)dump_query_symlink_reply,
4783 (dump_func)dump_get_object_info_reply,
4784 (dump_func)dump_get_object_type_reply,
4785 NULL,
4786 (dump_func)dump_get_token_impersonation_level_reply,
4787 (dump_func)dump_allocate_locally_unique_id_reply,
4788 (dump_func)dump_create_device_manager_reply,
4789 (dump_func)dump_create_device_reply,
4790 NULL,
4791 (dump_func)dump_get_next_device_request_reply,
4792 (dump_func)dump_make_process_system_reply,
4793 (dump_func)dump_get_token_statistics_reply,
4794 (dump_func)dump_create_completion_reply,
4795 (dump_func)dump_open_completion_reply,
4796 NULL,
4797 (dump_func)dump_remove_completion_reply,
4798 (dump_func)dump_query_completion_reply,
4799 NULL,
4800 NULL,
4801 NULL,
4802 NULL,
4803 (dump_func)dump_get_window_layered_info_reply,
4804 NULL,
4805 (dump_func)dump_alloc_user_handle_reply,
4806 NULL,
4807 (dump_func)dump_set_cursor_reply,
4808 NULL,
4809 (dump_func)dump_get_suspend_context_reply,
4810 NULL,
4811 (dump_func)dump_create_job_reply,
4812 NULL,
4813 NULL,
4814 NULL,
4815 NULL,
4816 NULL,
4819 static const char * const req_names[REQ_NB_REQUESTS] = {
4820 "new_process",
4821 "get_new_process_info",
4822 "new_thread",
4823 "get_startup_info",
4824 "init_process_done",
4825 "init_thread",
4826 "terminate_process",
4827 "terminate_thread",
4828 "get_process_info",
4829 "set_process_info",
4830 "get_thread_info",
4831 "get_thread_times",
4832 "set_thread_info",
4833 "get_dll_info",
4834 "suspend_thread",
4835 "resume_thread",
4836 "load_dll",
4837 "unload_dll",
4838 "queue_apc",
4839 "get_apc_result",
4840 "close_handle",
4841 "set_handle_info",
4842 "dup_handle",
4843 "open_process",
4844 "open_thread",
4845 "select",
4846 "create_event",
4847 "event_op",
4848 "query_event",
4849 "open_event",
4850 "create_keyed_event",
4851 "open_keyed_event",
4852 "create_mutex",
4853 "release_mutex",
4854 "open_mutex",
4855 "create_semaphore",
4856 "release_semaphore",
4857 "query_semaphore",
4858 "open_semaphore",
4859 "create_file",
4860 "open_file_object",
4861 "alloc_file_handle",
4862 "get_handle_unix_name",
4863 "get_handle_fd",
4864 "flush",
4865 "lock_file",
4866 "unlock_file",
4867 "create_socket",
4868 "accept_socket",
4869 "accept_into_socket",
4870 "set_socket_event",
4871 "get_socket_event",
4872 "get_socket_info",
4873 "enable_socket_event",
4874 "set_socket_deferred",
4875 "alloc_console",
4876 "free_console",
4877 "get_console_renderer_events",
4878 "open_console",
4879 "get_console_wait_event",
4880 "get_console_mode",
4881 "set_console_mode",
4882 "set_console_input_info",
4883 "get_console_input_info",
4884 "append_console_input_history",
4885 "get_console_input_history",
4886 "create_console_output",
4887 "set_console_output_info",
4888 "get_console_output_info",
4889 "write_console_input",
4890 "read_console_input",
4891 "write_console_output",
4892 "fill_console_output",
4893 "read_console_output",
4894 "move_console_output",
4895 "send_console_signal",
4896 "read_directory_changes",
4897 "read_change",
4898 "create_mapping",
4899 "open_mapping",
4900 "get_mapping_info",
4901 "get_mapping_committed_range",
4902 "add_mapping_committed_range",
4903 "create_snapshot",
4904 "next_process",
4905 "next_thread",
4906 "wait_debug_event",
4907 "queue_exception_event",
4908 "get_exception_status",
4909 "continue_debug_event",
4910 "debug_process",
4911 "debug_break",
4912 "set_debugger_kill_on_exit",
4913 "read_process_memory",
4914 "write_process_memory",
4915 "create_key",
4916 "open_key",
4917 "delete_key",
4918 "flush_key",
4919 "enum_key",
4920 "set_key_value",
4921 "get_key_value",
4922 "enum_key_value",
4923 "delete_key_value",
4924 "load_registry",
4925 "unload_registry",
4926 "save_registry",
4927 "set_registry_notification",
4928 "create_timer",
4929 "open_timer",
4930 "set_timer",
4931 "cancel_timer",
4932 "get_timer_info",
4933 "get_thread_context",
4934 "set_thread_context",
4935 "get_selector_entry",
4936 "add_atom",
4937 "delete_atom",
4938 "find_atom",
4939 "get_atom_information",
4940 "set_atom_information",
4941 "empty_atom_table",
4942 "init_atom_table",
4943 "get_msg_queue",
4944 "set_queue_fd",
4945 "set_queue_mask",
4946 "get_queue_status",
4947 "get_process_idle_event",
4948 "send_message",
4949 "post_quit_message",
4950 "send_hardware_message",
4951 "get_message",
4952 "reply_message",
4953 "accept_hardware_message",
4954 "get_message_reply",
4955 "set_win_timer",
4956 "kill_win_timer",
4957 "is_window_hung",
4958 "get_serial_info",
4959 "set_serial_info",
4960 "register_async",
4961 "cancel_async",
4962 "read",
4963 "write",
4964 "ioctl",
4965 "set_irp_result",
4966 "get_irp_result",
4967 "create_named_pipe",
4968 "get_named_pipe_info",
4969 "set_named_pipe_info",
4970 "create_window",
4971 "destroy_window",
4972 "get_desktop_window",
4973 "set_window_owner",
4974 "get_window_info",
4975 "set_window_info",
4976 "set_parent",
4977 "get_window_parents",
4978 "get_window_children",
4979 "get_window_children_from_point",
4980 "get_window_tree",
4981 "set_window_pos",
4982 "get_window_rectangles",
4983 "get_window_text",
4984 "set_window_text",
4985 "get_windows_offset",
4986 "get_visible_region",
4987 "get_surface_region",
4988 "get_window_region",
4989 "set_window_region",
4990 "get_update_region",
4991 "update_window_zorder",
4992 "redraw_window",
4993 "set_window_property",
4994 "remove_window_property",
4995 "get_window_property",
4996 "get_window_properties",
4997 "create_winstation",
4998 "open_winstation",
4999 "close_winstation",
5000 "get_process_winstation",
5001 "set_process_winstation",
5002 "enum_winstation",
5003 "create_desktop",
5004 "open_desktop",
5005 "open_input_desktop",
5006 "close_desktop",
5007 "get_thread_desktop",
5008 "set_thread_desktop",
5009 "enum_desktop",
5010 "set_user_object_info",
5011 "register_hotkey",
5012 "unregister_hotkey",
5013 "attach_thread_input",
5014 "get_thread_input",
5015 "get_last_input_time",
5016 "get_key_state",
5017 "set_key_state",
5018 "set_foreground_window",
5019 "set_focus_window",
5020 "set_active_window",
5021 "set_capture_window",
5022 "set_caret_window",
5023 "set_caret_info",
5024 "set_hook",
5025 "remove_hook",
5026 "start_hook_chain",
5027 "finish_hook_chain",
5028 "get_hook_info",
5029 "create_class",
5030 "destroy_class",
5031 "set_class_info",
5032 "set_clipboard_info",
5033 "empty_clipboard",
5034 "open_token",
5035 "set_global_windows",
5036 "adjust_token_privileges",
5037 "get_token_privileges",
5038 "check_token_privileges",
5039 "duplicate_token",
5040 "access_check",
5041 "get_token_sid",
5042 "get_token_groups",
5043 "get_token_default_dacl",
5044 "set_token_default_dacl",
5045 "set_security_object",
5046 "get_security_object",
5047 "create_mailslot",
5048 "set_mailslot_info",
5049 "create_directory",
5050 "open_directory",
5051 "get_directory_entry",
5052 "create_symlink",
5053 "open_symlink",
5054 "query_symlink",
5055 "get_object_info",
5056 "get_object_type",
5057 "unlink_object",
5058 "get_token_impersonation_level",
5059 "allocate_locally_unique_id",
5060 "create_device_manager",
5061 "create_device",
5062 "delete_device",
5063 "get_next_device_request",
5064 "make_process_system",
5065 "get_token_statistics",
5066 "create_completion",
5067 "open_completion",
5068 "add_completion",
5069 "remove_completion",
5070 "query_completion",
5071 "set_completion_info",
5072 "add_fd_completion",
5073 "set_fd_disp_info",
5074 "set_fd_name_info",
5075 "get_window_layered_info",
5076 "set_window_layered_info",
5077 "alloc_user_handle",
5078 "free_user_handle",
5079 "set_cursor",
5080 "update_rawinput_devices",
5081 "get_suspend_context",
5082 "set_suspend_context",
5083 "create_job",
5084 "assign_job",
5085 "process_in_job",
5086 "set_job_limits",
5087 "set_job_completion_port",
5088 "terminate_job",
5091 static const struct
5093 const char *name;
5094 unsigned int value;
5095 } status_names[] =
5097 { "ABANDONED_WAIT_0", STATUS_ABANDONED_WAIT_0 },
5098 { "ACCESS_DENIED", STATUS_ACCESS_DENIED },
5099 { "ACCESS_VIOLATION", STATUS_ACCESS_VIOLATION },
5100 { "ADDRESS_ALREADY_ASSOCIATED", STATUS_ADDRESS_ALREADY_ASSOCIATED },
5101 { "ALERTED", STATUS_ALERTED },
5102 { "ALIAS_EXISTS", STATUS_ALIAS_EXISTS },
5103 { "BAD_DEVICE_TYPE", STATUS_BAD_DEVICE_TYPE },
5104 { "BAD_IMPERSONATION_LEVEL", STATUS_BAD_IMPERSONATION_LEVEL },
5105 { "BREAKPOINT", STATUS_BREAKPOINT },
5106 { "BUFFER_OVERFLOW", STATUS_BUFFER_OVERFLOW },
5107 { "BUFFER_TOO_SMALL", STATUS_BUFFER_TOO_SMALL },
5108 { "CANCELLED", STATUS_CANCELLED },
5109 { "CANNOT_DELETE", STATUS_CANNOT_DELETE },
5110 { "CANT_OPEN_ANONYMOUS", STATUS_CANT_OPEN_ANONYMOUS },
5111 { "CANT_WAIT", STATUS_CANT_WAIT },
5112 { "CHILD_MUST_BE_VOLATILE", STATUS_CHILD_MUST_BE_VOLATILE },
5113 { "CONNECTION_ABORTED", STATUS_CONNECTION_ABORTED },
5114 { "CONNECTION_DISCONNECTED", STATUS_CONNECTION_DISCONNECTED },
5115 { "CONNECTION_REFUSED", STATUS_CONNECTION_REFUSED },
5116 { "CONNECTION_RESET", STATUS_CONNECTION_RESET },
5117 { "DEBUGGER_INACTIVE", STATUS_DEBUGGER_INACTIVE },
5118 { "DEVICE_BUSY", STATUS_DEVICE_BUSY },
5119 { "DIRECTORY_NOT_EMPTY", STATUS_DIRECTORY_NOT_EMPTY },
5120 { "DISK_FULL", STATUS_DISK_FULL },
5121 { "DLL_NOT_FOUND", STATUS_DLL_NOT_FOUND },
5122 { "ERROR_CLASS_ALREADY_EXISTS", 0xc0010000 | ERROR_CLASS_ALREADY_EXISTS },
5123 { "ERROR_CLASS_DOES_NOT_EXIST", 0xc0010000 | ERROR_CLASS_DOES_NOT_EXIST },
5124 { "ERROR_CLASS_HAS_WINDOWS", 0xc0010000 | ERROR_CLASS_HAS_WINDOWS },
5125 { "ERROR_CLIPBOARD_NOT_OPEN", 0xc0010000 | ERROR_CLIPBOARD_NOT_OPEN },
5126 { "ERROR_HOTKEY_ALREADY_REGISTERED", 0xc0010000 | ERROR_HOTKEY_ALREADY_REGISTERED },
5127 { "ERROR_HOTKEY_NOT_REGISTERED", 0xc0010000 | ERROR_HOTKEY_NOT_REGISTERED },
5128 { "ERROR_INVALID_CURSOR_HANDLE", 0xc0010000 | ERROR_INVALID_CURSOR_HANDLE },
5129 { "ERROR_INVALID_INDEX", 0xc0010000 | ERROR_INVALID_INDEX },
5130 { "ERROR_INVALID_WINDOW_HANDLE", 0xc0010000 | ERROR_INVALID_WINDOW_HANDLE },
5131 { "ERROR_WINDOW_OF_OTHER_THREAD", 0xc0010000 | ERROR_WINDOW_OF_OTHER_THREAD },
5132 { "FILE_DELETED", STATUS_FILE_DELETED },
5133 { "FILE_IS_A_DIRECTORY", STATUS_FILE_IS_A_DIRECTORY },
5134 { "FILE_LOCK_CONFLICT", STATUS_FILE_LOCK_CONFLICT },
5135 { "GENERIC_NOT_MAPPED", STATUS_GENERIC_NOT_MAPPED },
5136 { "HANDLES_CLOSED", STATUS_HANDLES_CLOSED },
5137 { "HANDLE_NOT_CLOSABLE", STATUS_HANDLE_NOT_CLOSABLE },
5138 { "HOST_UNREACHABLE", STATUS_HOST_UNREACHABLE },
5139 { "ILLEGAL_FUNCTION", STATUS_ILLEGAL_FUNCTION },
5140 { "INSTANCE_NOT_AVAILABLE", STATUS_INSTANCE_NOT_AVAILABLE },
5141 { "INSUFFICIENT_RESOURCES", STATUS_INSUFFICIENT_RESOURCES },
5142 { "INVALID_CID", STATUS_INVALID_CID },
5143 { "INVALID_DEVICE_REQUEST", STATUS_INVALID_DEVICE_REQUEST },
5144 { "INVALID_FILE_FOR_SECTION", STATUS_INVALID_FILE_FOR_SECTION },
5145 { "INVALID_HANDLE", STATUS_INVALID_HANDLE },
5146 { "INVALID_IMAGE_FORMAT", STATUS_INVALID_IMAGE_FORMAT },
5147 { "INVALID_IMAGE_NE_FORMAT", STATUS_INVALID_IMAGE_NE_FORMAT },
5148 { "INVALID_IMAGE_NOT_MZ", STATUS_INVALID_IMAGE_NOT_MZ },
5149 { "INVALID_IMAGE_PROTECT", STATUS_INVALID_IMAGE_PROTECT },
5150 { "INVALID_IMAGE_WIN_64", STATUS_INVALID_IMAGE_WIN_64 },
5151 { "INVALID_PARAMETER", STATUS_INVALID_PARAMETER },
5152 { "INVALID_SECURITY_DESCR", STATUS_INVALID_SECURITY_DESCR },
5153 { "IO_TIMEOUT", STATUS_IO_TIMEOUT },
5154 { "KEY_DELETED", STATUS_KEY_DELETED },
5155 { "MAPPED_FILE_SIZE_ZERO", STATUS_MAPPED_FILE_SIZE_ZERO },
5156 { "MORE_PROCESSING_REQUIRED", STATUS_MORE_PROCESSING_REQUIRED },
5157 { "MUTANT_NOT_OWNED", STATUS_MUTANT_NOT_OWNED },
5158 { "NAME_TOO_LONG", STATUS_NAME_TOO_LONG },
5159 { "NETWORK_BUSY", STATUS_NETWORK_BUSY },
5160 { "NETWORK_UNREACHABLE", STATUS_NETWORK_UNREACHABLE },
5161 { "NOT_ALL_ASSIGNED", STATUS_NOT_ALL_ASSIGNED },
5162 { "NOT_A_DIRECTORY", STATUS_NOT_A_DIRECTORY },
5163 { "NOT_FOUND", STATUS_NOT_FOUND },
5164 { "NOT_IMPLEMENTED", STATUS_NOT_IMPLEMENTED },
5165 { "NOT_REGISTRY_FILE", STATUS_NOT_REGISTRY_FILE },
5166 { "NOT_SUPPORTED", STATUS_NOT_SUPPORTED },
5167 { "NO_DATA_DETECTED", STATUS_NO_DATA_DETECTED },
5168 { "NO_IMPERSONATION_TOKEN", STATUS_NO_IMPERSONATION_TOKEN },
5169 { "NO_MEMORY", STATUS_NO_MEMORY },
5170 { "NO_MORE_ENTRIES", STATUS_NO_MORE_ENTRIES },
5171 { "NO_MORE_FILES", STATUS_NO_MORE_FILES },
5172 { "NO_SUCH_DEVICE", STATUS_NO_SUCH_DEVICE },
5173 { "NO_SUCH_FILE", STATUS_NO_SUCH_FILE },
5174 { "NO_TOKEN", STATUS_NO_TOKEN },
5175 { "OBJECT_NAME_COLLISION", STATUS_OBJECT_NAME_COLLISION },
5176 { "OBJECT_NAME_EXISTS", STATUS_OBJECT_NAME_EXISTS },
5177 { "OBJECT_NAME_INVALID", STATUS_OBJECT_NAME_INVALID },
5178 { "OBJECT_NAME_NOT_FOUND", STATUS_OBJECT_NAME_NOT_FOUND },
5179 { "OBJECT_PATH_INVALID", STATUS_OBJECT_PATH_INVALID },
5180 { "OBJECT_PATH_NOT_FOUND", STATUS_OBJECT_PATH_NOT_FOUND },
5181 { "OBJECT_PATH_SYNTAX_BAD", STATUS_OBJECT_PATH_SYNTAX_BAD },
5182 { "OBJECT_TYPE_MISMATCH", STATUS_OBJECT_TYPE_MISMATCH },
5183 { "PENDING", STATUS_PENDING },
5184 { "PIPE_BUSY", STATUS_PIPE_BUSY },
5185 { "PIPE_CONNECTED", STATUS_PIPE_CONNECTED },
5186 { "PIPE_DISCONNECTED", STATUS_PIPE_DISCONNECTED },
5187 { "PIPE_LISTENING", STATUS_PIPE_LISTENING },
5188 { "PIPE_NOT_AVAILABLE", STATUS_PIPE_NOT_AVAILABLE },
5189 { "PRIVILEGE_NOT_HELD", STATUS_PRIVILEGE_NOT_HELD },
5190 { "PROCESS_IN_JOB", STATUS_PROCESS_IN_JOB },
5191 { "PROCESS_IS_TERMINATING", STATUS_PROCESS_IS_TERMINATING },
5192 { "SECTION_TOO_BIG", STATUS_SECTION_TOO_BIG },
5193 { "SEMAPHORE_LIMIT_EXCEEDED", STATUS_SEMAPHORE_LIMIT_EXCEEDED },
5194 { "SHARING_VIOLATION", STATUS_SHARING_VIOLATION },
5195 { "SHUTDOWN_IN_PROGRESS", STATUS_SHUTDOWN_IN_PROGRESS },
5196 { "SUSPEND_COUNT_EXCEEDED", STATUS_SUSPEND_COUNT_EXCEEDED },
5197 { "THREAD_IS_TERMINATING", STATUS_THREAD_IS_TERMINATING },
5198 { "TIMEOUT", STATUS_TIMEOUT },
5199 { "TOO_MANY_OPENED_FILES", STATUS_TOO_MANY_OPENED_FILES },
5200 { "UNSUCCESSFUL", STATUS_UNSUCCESSFUL },
5201 { "USER_APC", STATUS_USER_APC },
5202 { "USER_MAPPED_FILE", STATUS_USER_MAPPED_FILE },
5203 { "VOLUME_DISMOUNTED", STATUS_VOLUME_DISMOUNTED },
5204 { "WAS_LOCKED", STATUS_WAS_LOCKED },
5205 { NULL, 0 }
5208 /* ### make_requests end ### */
5209 /* Everything above this line is generated automatically by tools/make_requests */
5211 static const char *get_status_name( unsigned int status )
5213 int i;
5214 static char buffer[10];
5216 if (status)
5218 for (i = 0; status_names[i].name; i++)
5219 if (status_names[i].value == status) return status_names[i].name;
5221 sprintf( buffer, "%x", status );
5222 return buffer;
5225 void trace_request(void)
5227 enum request req = current->req.request_header.req;
5228 if (req < REQ_NB_REQUESTS)
5230 fprintf( stderr, "%04x: %s(", current->id, req_names[req] );
5231 if (req_dumpers[req])
5233 cur_data = get_req_data();
5234 cur_size = get_req_data_size();
5235 req_dumpers[req]( &current->req );
5237 fprintf( stderr, " )\n" );
5239 else fprintf( stderr, "%04x: %d(?)\n", current->id, req );
5242 void trace_reply( enum request req, const union generic_reply *reply )
5244 if (req < REQ_NB_REQUESTS)
5246 fprintf( stderr, "%04x: %s() = %s",
5247 current->id, req_names[req], get_status_name(current->error) );
5248 if (reply_dumpers[req])
5250 fprintf( stderr, " {" );
5251 cur_data = current->reply_data;
5252 cur_size = reply->reply_header.reply_size;
5253 reply_dumpers[req]( reply );
5254 fprintf( stderr, " }" );
5256 fputc( '\n', stderr );
5258 else fprintf( stderr, "%04x: %d() = %s\n",
5259 current->id, req, get_status_name(current->error) );