msvcrt: Add the static object files to all the msvcrt import libraries.
[wine.git] / server / trace.c
blob28bf3dd7ac9de5e865bd25375fbde08cac404085
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 #include "ddk/ntddser.h"
43 #define USE_WS_PREFIX
44 #include "winsock2.h"
45 #include "file.h"
46 #include "request.h"
47 #include "unicode.h"
49 static const void *cur_data;
50 static data_size_t cur_size;
52 static const char *get_status_name( unsigned int status );
54 /* utility functions */
56 static inline void remove_data( data_size_t size )
58 cur_data = (const char *)cur_data + size;
59 cur_size -= size;
62 static void dump_uints( const char *prefix, const unsigned int *ptr, int len )
64 fprintf( stderr, "%s{", prefix );
65 while (len > 0)
67 fprintf( stderr, "%08x", *ptr++ );
68 if (--len) fputc( ',', stderr );
70 fputc( '}', stderr );
73 static void dump_handles( const char *prefix, const obj_handle_t *data, data_size_t size )
75 data_size_t len = size / sizeof(*data);
77 fprintf( stderr,"%s{", prefix );
78 while (len > 0)
80 fprintf( stderr, "%04x", *data++ );
81 if (--len) fputc( ',', stderr );
83 fputc( '}', stderr );
86 static void dump_timeout( const char *prefix, const timeout_t *time )
88 fprintf( stderr, "%s%s", prefix, get_timeout_str(*time) );
91 static void dump_uint64( const char *prefix, const unsigned __int64 *val )
93 if ((unsigned int)*val != *val)
94 fprintf( stderr, "%s%x%08x", prefix, (unsigned int)(*val >> 32), (unsigned int)*val );
95 else
96 fprintf( stderr, "%s%08x", prefix, (unsigned int)*val );
99 static void dump_rectangle( const char *prefix, const rectangle_t *rect )
101 fprintf( stderr, "%s{%d,%d;%d,%d}", prefix,
102 rect->left, rect->top, rect->right, rect->bottom );
105 static void dump_char_info( const char *prefix, const char_info_t *info )
107 fprintf( stderr, "%s{'", prefix );
108 dump_strW( &info->ch, 1, stderr, "\'\'" );
109 fprintf( stderr, "',%04x}", info->attr );
112 static void dump_ioctl_code( const char *prefix, const ioctl_code_t *code )
114 switch(*code)
116 #define CASE(c) case c: fprintf( stderr, "%s%s", prefix, #c ); break
117 CASE(FSCTL_DISMOUNT_VOLUME);
118 CASE(FSCTL_PIPE_DISCONNECT);
119 CASE(FSCTL_PIPE_LISTEN);
120 CASE(FSCTL_PIPE_PEEK);
121 CASE(FSCTL_PIPE_WAIT);
122 CASE(IOCTL_SERIAL_GET_TIMEOUTS);
123 CASE(IOCTL_SERIAL_GET_WAIT_MASK);
124 CASE(IOCTL_SERIAL_SET_TIMEOUTS);
125 CASE(IOCTL_SERIAL_SET_WAIT_MASK);
126 CASE(WS_SIO_ADDRESS_LIST_CHANGE);
127 default: fprintf( stderr, "%s%08x", prefix, *code ); break;
128 #undef CASE
132 static void dump_cpu_type( const char *prefix, const cpu_type_t *code )
134 switch (*code)
136 #define CASE(c) case CPU_##c: fprintf( stderr, "%s%s", prefix, #c ); break
137 CASE(x86);
138 CASE(x86_64);
139 CASE(POWERPC);
140 CASE(ARM);
141 CASE(ARM64);
142 default: fprintf( stderr, "%s%u", prefix, *code ); break;
143 #undef CASE
147 static void dump_apc_call( const char *prefix, const apc_call_t *call )
149 fprintf( stderr, "%s{", prefix );
150 switch(call->type)
152 case APC_NONE:
153 fprintf( stderr, "APC_NONE" );
154 break;
155 case APC_USER:
156 dump_uint64( "APC_USER,func=", &call->user.func );
157 dump_uint64( ",args={", &call->user.args[0] );
158 dump_uint64( ",", &call->user.args[1] );
159 dump_uint64( ",", &call->user.args[2] );
160 fputc( '}', stderr );
161 break;
162 case APC_TIMER:
163 dump_timeout( "APC_TIMER,time=", &call->timer.time );
164 dump_uint64( ",arg=", &call->timer.arg );
165 break;
166 case APC_ASYNC_IO:
167 dump_uint64( "APC_ASYNC_IO,user=", &call->async_io.user );
168 dump_uint64( ",sb=", &call->async_io.sb );
169 fprintf( stderr, ",status=%s", get_status_name(call->async_io.status) );
170 break;
171 case APC_VIRTUAL_ALLOC:
172 dump_uint64( "APC_VIRTUAL_ALLOC,addr==", &call->virtual_alloc.addr );
173 dump_uint64( ",size=", &call->virtual_alloc.size );
174 fprintf( stderr, ",zero_bits=%u,op_type=%x,prot=%x",
175 call->virtual_alloc.zero_bits, call->virtual_alloc.op_type,
176 call->virtual_alloc.prot );
177 break;
178 case APC_VIRTUAL_FREE:
179 dump_uint64( "APC_VIRTUAL_FREE,addr=", &call->virtual_free.addr );
180 dump_uint64( ",size=", &call->virtual_free.size );
181 fprintf( stderr, ",op_type=%x", call->virtual_free.op_type );
182 break;
183 case APC_VIRTUAL_QUERY:
184 dump_uint64( "APC_VIRTUAL_QUERY,addr=", &call->virtual_query.addr );
185 break;
186 case APC_VIRTUAL_PROTECT:
187 dump_uint64( "APC_VIRTUAL_PROTECT,addr=", &call->virtual_protect.addr );
188 dump_uint64( ",size=", &call->virtual_protect.size );
189 fprintf( stderr, ",prot=%x", call->virtual_protect.prot );
190 break;
191 case APC_VIRTUAL_FLUSH:
192 dump_uint64( "APC_VIRTUAL_FLUSH,addr=", &call->virtual_flush.addr );
193 dump_uint64( ",size=", &call->virtual_flush.size );
194 break;
195 case APC_VIRTUAL_LOCK:
196 dump_uint64( "APC_VIRTUAL_LOCK,addr=", &call->virtual_lock.addr );
197 dump_uint64( ",size=", &call->virtual_lock.size );
198 break;
199 case APC_VIRTUAL_UNLOCK:
200 dump_uint64( "APC_VIRTUAL_UNLOCK,addr=", &call->virtual_unlock.addr );
201 dump_uint64( ",size=", &call->virtual_unlock.size );
202 break;
203 case APC_MAP_VIEW:
204 fprintf( stderr, "APC_MAP_VIEW,handle=%04x", call->map_view.handle );
205 dump_uint64( ",addr=", &call->map_view.addr );
206 dump_uint64( ",size=", &call->map_view.size );
207 dump_uint64( ",offset=", &call->map_view.offset );
208 fprintf( stderr, ",zero_bits=%u,alloc_type=%x,prot=%x",
209 call->map_view.zero_bits, call->map_view.alloc_type, call->map_view.prot );
210 break;
211 case APC_UNMAP_VIEW:
212 dump_uint64( "APC_UNMAP_VIEW,addr=", &call->unmap_view.addr );
213 break;
214 case APC_CREATE_THREAD:
215 dump_uint64( "APC_CREATE_THREAD,func=", &call->create_thread.func );
216 dump_uint64( ",arg=", &call->create_thread.arg );
217 dump_uint64( ",reserve=", &call->create_thread.reserve );
218 dump_uint64( ",commit=", &call->create_thread.commit );
219 fprintf( stderr, ",suspend=%u", call->create_thread.suspend );
220 break;
221 default:
222 fprintf( stderr, "type=%u", call->type );
223 break;
225 fputc( '}', stderr );
228 static void dump_apc_result( const char *prefix, const apc_result_t *result )
230 fprintf( stderr, "%s{", prefix );
231 switch(result->type)
233 case APC_NONE:
234 break;
235 case APC_ASYNC_IO:
236 fprintf( stderr, "APC_ASYNC_IO,status=%s,total=%u",
237 get_status_name( result->async_io.status ), result->async_io.total );
238 break;
239 case APC_VIRTUAL_ALLOC:
240 fprintf( stderr, "APC_VIRTUAL_ALLOC,status=%s",
241 get_status_name( result->virtual_alloc.status ));
242 dump_uint64( ",addr=", &result->virtual_alloc.addr );
243 dump_uint64( ",size=", &result->virtual_alloc.size );
244 break;
245 case APC_VIRTUAL_FREE:
246 fprintf( stderr, "APC_VIRTUAL_FREE,status=%s",
247 get_status_name( result->virtual_free.status ));
248 dump_uint64( ",addr=", &result->virtual_free.addr );
249 dump_uint64( ",size=", &result->virtual_free.size );
250 break;
251 case APC_VIRTUAL_QUERY:
252 fprintf( stderr, "APC_VIRTUAL_QUERY,status=%s",
253 get_status_name( result->virtual_query.status ));
254 dump_uint64( ",base=", &result->virtual_query.base );
255 dump_uint64( ",alloc_base=", &result->virtual_query.alloc_base );
256 dump_uint64( ",size=", &result->virtual_query.size );
257 fprintf( stderr, ",state=%x,prot=%x,alloc_prot=%x,alloc_type=%x",
258 result->virtual_query.state, result->virtual_query.prot,
259 result->virtual_query.alloc_prot, result->virtual_query.alloc_type );
260 break;
261 case APC_VIRTUAL_PROTECT:
262 fprintf( stderr, "APC_VIRTUAL_PROTECT,status=%s",
263 get_status_name( result->virtual_protect.status ));
264 dump_uint64( ",addr=", &result->virtual_protect.addr );
265 dump_uint64( ",size=", &result->virtual_protect.size );
266 fprintf( stderr, ",prot=%x", result->virtual_protect.prot );
267 break;
268 case APC_VIRTUAL_FLUSH:
269 fprintf( stderr, "APC_VIRTUAL_FLUSH,status=%s",
270 get_status_name( result->virtual_flush.status ));
271 dump_uint64( ",addr=", &result->virtual_flush.addr );
272 dump_uint64( ",size=", &result->virtual_flush.size );
273 break;
274 case APC_VIRTUAL_LOCK:
275 fprintf( stderr, "APC_VIRTUAL_LOCK,status=%s",
276 get_status_name( result->virtual_lock.status ));
277 dump_uint64( ",addr=", &result->virtual_lock.addr );
278 dump_uint64( ",size=", &result->virtual_lock.size );
279 break;
280 case APC_VIRTUAL_UNLOCK:
281 fprintf( stderr, "APC_VIRTUAL_UNLOCK,status=%s",
282 get_status_name( result->virtual_unlock.status ));
283 dump_uint64( ",addr=", &result->virtual_unlock.addr );
284 dump_uint64( ",size=", &result->virtual_unlock.size );
285 break;
286 case APC_MAP_VIEW:
287 fprintf( stderr, "APC_MAP_VIEW,status=%s",
288 get_status_name( result->map_view.status ));
289 dump_uint64( ",addr=", &result->map_view.addr );
290 dump_uint64( ",size=", &result->map_view.size );
291 break;
292 case APC_UNMAP_VIEW:
293 fprintf( stderr, "APC_UNMAP_VIEW,status=%s",
294 get_status_name( result->unmap_view.status ) );
295 break;
296 case APC_CREATE_THREAD:
297 fprintf( stderr, "APC_CREATE_THREAD,status=%s,tid=%04x,handle=%04x",
298 get_status_name( result->create_thread.status ),
299 result->create_thread.tid, result->create_thread.handle );
300 break;
301 default:
302 fprintf( stderr, "type=%u", result->type );
303 break;
305 fputc( '}', stderr );
308 static void dump_async_data( const char *prefix, const async_data_t *data )
310 fprintf( stderr, "%s{handle=%04x,event=%04x", prefix, data->handle, data->event );
311 dump_uint64( ",iosb=", &data->iosb );
312 dump_uint64( ",user=", &data->user );
313 dump_uint64( ",apc=", &data->apc );
314 dump_uint64( ",apc_context=", &data->apc_context );
315 fputc( '}', stderr );
318 static void dump_irp_params( const char *prefix, const irp_params_t *data )
320 switch (data->type)
322 case IRP_CALL_NONE:
323 fprintf( stderr, "%s{NONE}", prefix );
324 break;
325 case IRP_CALL_CREATE:
326 fprintf( stderr, "%s{CREATE,access=%08x,sharing=%08x,options=%08x",
327 prefix, data->create.access, data->create.sharing, data->create.options );
328 dump_uint64( ",device=", &data->create.device );
329 fprintf( stderr, ",file=%08x}", data->create.file );
330 break;
331 case IRP_CALL_CLOSE:
332 fprintf( stderr, "%s{CLOSE", prefix );
333 dump_uint64( ",file=", &data->close.file );
334 fputc( '}', stderr );
335 break;
336 case IRP_CALL_READ:
337 fprintf( stderr, "%s{READ,key=%08x,out_size=%u", prefix, data->read.key,
338 data->read.out_size );
339 dump_uint64( ",pos=", &data->read.pos );
340 dump_uint64( ",file=", &data->read.file );
341 fputc( '}', stderr );
342 break;
343 case IRP_CALL_WRITE:
344 fprintf( stderr, "%s{WRITE,key=%08x", prefix, data->write.key );
345 dump_uint64( ",pos=", &data->write.pos );
346 dump_uint64( ",file=", &data->write.file );
347 fputc( '}', stderr );
348 break;
349 case IRP_CALL_FLUSH:
350 fprintf( stderr, "%s{FLUSH", prefix );
351 dump_uint64( ",file=", &data->flush.file );
352 fputc( '}', stderr );
353 break;
354 case IRP_CALL_IOCTL:
355 fprintf( stderr, "%s{IOCTL", prefix );
356 dump_ioctl_code( ",code=", &data->ioctl.code );
357 fprintf( stderr, ",out_size=%u", data->ioctl.out_size );
358 dump_uint64( ",file=", &data->ioctl.file );
359 fputc( '}', stderr );
360 break;
361 case IRP_CALL_FREE:
362 fprintf( stderr, "%s{FREE", prefix );
363 dump_uint64( ",obj=", &data->free.obj );
364 fputc( '}', stderr );
365 break;
369 static void dump_hw_input( const char *prefix, const hw_input_t *input )
371 switch (input->type)
373 case INPUT_MOUSE:
374 fprintf( stderr, "%s{type=MOUSE,x=%d,y=%d,data=%08x,flags=%08x,time=%u",
375 prefix, input->mouse.x, input->mouse.y, input->mouse.data, input->mouse.flags,
376 input->mouse.time );
377 dump_uint64( ",info=", &input->mouse.info );
378 fputc( '}', stderr );
379 break;
380 case INPUT_KEYBOARD:
381 fprintf( stderr, "%s{type=KEYBOARD,vkey=%04hx,scan=%04hx,flags=%08x,time=%u",
382 prefix, input->kbd.vkey, input->kbd.scan, input->kbd.flags, input->kbd.time );
383 dump_uint64( ",info=", &input->kbd.info );
384 fputc( '}', stderr );
385 break;
386 case INPUT_HARDWARE:
387 fprintf( stderr, "%s{type=HARDWARE,msg=%04x", prefix, input->hw.msg );
388 dump_uint64( ",lparam=", &input->hw.lparam );
389 fputc( '}', stderr );
390 break;
391 default:
392 fprintf( stderr, "%s{type=%04x}", prefix, input->type );
393 break;
397 static void dump_luid( const char *prefix, const luid_t *luid )
399 fprintf( stderr, "%s%d.%u", prefix, luid->high_part, luid->low_part );
402 static void dump_varargs_ints( const char *prefix, data_size_t size )
404 const int *data = cur_data;
405 data_size_t len = size / sizeof(*data);
407 fprintf( stderr,"%s{", prefix );
408 while (len > 0)
410 fprintf( stderr, "%d", *data++ );
411 if (--len) fputc( ',', stderr );
413 fputc( '}', stderr );
414 remove_data( size );
417 static void dump_varargs_uints( const char *prefix, data_size_t size )
419 const unsigned int *data = cur_data;
421 dump_uints( prefix, data, size / sizeof(*data) );
422 remove_data( size );
425 static void dump_varargs_uints64( const char *prefix, data_size_t size )
427 const unsigned __int64 *data = cur_data;
428 data_size_t len = size / sizeof(*data);
430 fprintf( stderr,"%s{", prefix );
431 while (len > 0)
433 dump_uint64( "", data++ );
434 if (--len) fputc( ',', stderr );
436 fputc( '}', stderr );
437 remove_data( size );
440 static void dump_varargs_apc_result( const char *prefix, data_size_t size )
442 const apc_result_t *result = cur_data;
444 if (size >= sizeof(*result))
446 dump_apc_result( prefix, result );
447 size = sizeof(*result);
449 remove_data( size );
452 static void dump_varargs_select_op( const char *prefix, data_size_t size )
454 select_op_t data;
456 if (!size)
458 fprintf( stderr, "%s{}", prefix );
459 return;
461 memset( &data, 0, sizeof(data) );
462 memcpy( &data, cur_data, min( size, sizeof(data) ));
464 fprintf( stderr, "%s{", prefix );
465 switch (data.op)
467 case SELECT_NONE:
468 fprintf( stderr, "NONE" );
469 break;
470 case SELECT_WAIT:
471 case SELECT_WAIT_ALL:
472 fprintf( stderr, "%s", data.op == SELECT_WAIT ? "WAIT" : "WAIT_ALL" );
473 if (size > offsetof( select_op_t, wait.handles ))
474 dump_handles( ",handles=", data.wait.handles,
475 min( size, sizeof(data.wait) ) - offsetof( select_op_t, wait.handles ));
476 break;
477 case SELECT_SIGNAL_AND_WAIT:
478 fprintf( stderr, "SIGNAL_AND_WAIT,signal=%04x,wait=%04x",
479 data.signal_and_wait.signal, data.signal_and_wait.wait );
480 break;
481 case SELECT_KEYED_EVENT_WAIT:
482 case SELECT_KEYED_EVENT_RELEASE:
483 fprintf( stderr, "KEYED_EVENT_%s,handle=%04x",
484 data.op == SELECT_KEYED_EVENT_WAIT ? "WAIT" : "RELEASE",
485 data.keyed_event.handle );
486 dump_uint64( ",key=", &data.keyed_event.key );
487 break;
488 default:
489 fprintf( stderr, "op=%u", data.op );
490 break;
492 fputc( '}', stderr );
493 remove_data( size );
496 static void dump_varargs_user_handles( const char *prefix, data_size_t size )
498 const user_handle_t *data = cur_data;
499 data_size_t len = size / sizeof(*data);
501 fprintf( stderr,"%s{", prefix );
502 while (len > 0)
504 fprintf( stderr, "%08x", *data++ );
505 if (--len) fputc( ',', stderr );
507 fputc( '}', stderr );
508 remove_data( size );
511 static void dump_varargs_bytes( const char *prefix, data_size_t size )
513 const unsigned char *data = cur_data;
514 data_size_t len = min( 1024, size );
516 fprintf( stderr,"%s{", prefix );
517 while (len > 0)
519 fprintf( stderr, "%02x", *data++ );
520 if (--len) fputc( ',', stderr );
522 if (size > 1024) fprintf( stderr, "...(total %u)", size );
523 fputc( '}', stderr );
524 remove_data( size );
527 static void dump_varargs_string( const char *prefix, data_size_t size )
529 fprintf( stderr, "%s\"%.*s\"", prefix, (int)size, (const char *)cur_data );
530 remove_data( size );
533 static void dump_varargs_unicode_str( const char *prefix, data_size_t size )
535 fprintf( stderr, "%sL\"", prefix );
536 dump_strW( cur_data, size / sizeof(WCHAR), stderr, "\"\"" );
537 fputc( '\"', stderr );
538 remove_data( size );
541 static void dump_varargs_context( const char *prefix, data_size_t size )
543 const context_t *context = cur_data;
544 context_t ctx;
545 unsigned int i;
547 if (!size)
549 fprintf( stderr, "%s{}", prefix );
550 return;
552 size = min( size, sizeof(ctx) );
553 memset( &ctx, 0, sizeof(ctx) );
554 memcpy( &ctx, context, size );
556 fprintf( stderr,"%s{", prefix );
557 dump_cpu_type( "cpu=", &ctx.cpu );
558 switch (ctx.cpu)
560 case CPU_x86:
561 if (ctx.flags & SERVER_CTX_CONTROL)
562 fprintf( stderr, ",eip=%08x,esp=%08x,ebp=%08x,eflags=%08x,cs=%04x,ss=%04x",
563 ctx.ctl.i386_regs.eip, ctx.ctl.i386_regs.esp, ctx.ctl.i386_regs.ebp,
564 ctx.ctl.i386_regs.eflags, ctx.ctl.i386_regs.cs, ctx.ctl.i386_regs.ss );
565 if (ctx.flags & SERVER_CTX_SEGMENTS)
566 fprintf( stderr, ",ds=%04x,es=%04x,fs=%04x,gs=%04x",
567 ctx.seg.i386_regs.ds, ctx.seg.i386_regs.es,
568 ctx.seg.i386_regs.fs, ctx.seg.i386_regs.gs );
569 if (ctx.flags & SERVER_CTX_INTEGER)
570 fprintf( stderr, ",eax=%08x,ebx=%08x,ecx=%08x,edx=%08x,esi=%08x,edi=%08x",
571 ctx.integer.i386_regs.eax, ctx.integer.i386_regs.ebx, ctx.integer.i386_regs.ecx,
572 ctx.integer.i386_regs.edx, ctx.integer.i386_regs.esi, ctx.integer.i386_regs.edi );
573 if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
574 fprintf( stderr, ",dr0=%08x,dr1=%08x,dr2=%08x,dr3=%08x,dr6=%08x,dr7=%08x",
575 ctx.debug.i386_regs.dr0, ctx.debug.i386_regs.dr1, ctx.debug.i386_regs.dr2,
576 ctx.debug.i386_regs.dr3, ctx.debug.i386_regs.dr6, ctx.debug.i386_regs.dr7 );
577 if (ctx.flags & SERVER_CTX_FLOATING_POINT)
579 fprintf( stderr, ",fp.ctrl=%08x,fp.status=%08x,fp.tag=%08x,fp.err_off=%08x,fp.err_sel=%08x",
580 ctx.fp.i386_regs.ctrl, ctx.fp.i386_regs.status, ctx.fp.i386_regs.tag,
581 ctx.fp.i386_regs.err_off, ctx.fp.i386_regs.err_sel );
582 fprintf( stderr, ",fp.data_off=%08x,fp.data_sel=%08x,fp.cr0npx=%08x",
583 ctx.fp.i386_regs.data_off, ctx.fp.i386_regs.data_sel, ctx.fp.i386_regs.cr0npx );
584 for (i = 0; i < 8; i++)
586 long double reg = 0;
587 memcpy( &reg, &ctx.fp.i386_regs.regs[10 * i], 10 );
588 fprintf( stderr, ",fp.reg%u=%Lg", i, reg );
591 if (ctx.flags & SERVER_CTX_EXTENDED_REGISTERS)
592 dump_uints( ",extended=", (const unsigned int *)ctx.ext.i386_regs,
593 sizeof(ctx.ext.i386_regs) / sizeof(int) );
594 break;
595 case CPU_x86_64:
596 if (ctx.flags & SERVER_CTX_CONTROL)
598 dump_uint64( ",rip=", &ctx.ctl.x86_64_regs.rip );
599 dump_uint64( ",rbp=", &ctx.ctl.x86_64_regs.rbp );
600 dump_uint64( ",rsp=", &ctx.ctl.x86_64_regs.rsp );
601 fprintf( stderr, ",cs=%04x,ss=%04x,flags=%08x",
602 ctx.ctl.x86_64_regs.cs, ctx.ctl.x86_64_regs.ss, ctx.ctl.x86_64_regs.flags );
604 if (ctx.flags & SERVER_CTX_INTEGER)
606 dump_uint64( ",rax=", &ctx.integer.x86_64_regs.rax );
607 dump_uint64( ",rbx=", &ctx.integer.x86_64_regs.rbx );
608 dump_uint64( ",rcx=", &ctx.integer.x86_64_regs.rcx );
609 dump_uint64( ",rdx=", &ctx.integer.x86_64_regs.rdx );
610 dump_uint64( ",rsi=", &ctx.integer.x86_64_regs.rsi );
611 dump_uint64( ",rdi=", &ctx.integer.x86_64_regs.rdi );
612 dump_uint64( ",r8=", &ctx.integer.x86_64_regs.r8 );
613 dump_uint64( ",r9=", &ctx.integer.x86_64_regs.r9 );
614 dump_uint64( ",r10=", &ctx.integer.x86_64_regs.r10 );
615 dump_uint64( ",r11=", &ctx.integer.x86_64_regs.r11 );
616 dump_uint64( ",r12=", &ctx.integer.x86_64_regs.r12 );
617 dump_uint64( ",r13=", &ctx.integer.x86_64_regs.r13 );
618 dump_uint64( ",r14=", &ctx.integer.x86_64_regs.r14 );
619 dump_uint64( ",r15=", &ctx.integer.x86_64_regs.r15 );
621 if (ctx.flags & SERVER_CTX_SEGMENTS)
622 fprintf( stderr, ",ds=%04x,es=%04x,fs=%04x,gs=%04x",
623 ctx.seg.x86_64_regs.ds, ctx.seg.x86_64_regs.es,
624 ctx.seg.x86_64_regs.fs, ctx.seg.x86_64_regs.gs );
625 if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
627 dump_uint64( ",dr0=", &ctx.debug.x86_64_regs.dr0 );
628 dump_uint64( ",dr1=", &ctx.debug.x86_64_regs.dr1 );
629 dump_uint64( ",dr2=", &ctx.debug.x86_64_regs.dr2 );
630 dump_uint64( ",dr3=", &ctx.debug.x86_64_regs.dr3 );
631 dump_uint64( ",dr6=", &ctx.debug.x86_64_regs.dr6 );
632 dump_uint64( ",dr7=", &ctx.debug.x86_64_regs.dr7 );
634 if (ctx.flags & SERVER_CTX_FLOATING_POINT)
636 for (i = 0; i < 32; i++)
637 fprintf( stderr, ",fp%u=%08x%08x%08x%08x", i,
638 (unsigned int)(ctx.fp.x86_64_regs.fpregs[i].high >> 32),
639 (unsigned int)ctx.fp.x86_64_regs.fpregs[i].high,
640 (unsigned int)(ctx.fp.x86_64_regs.fpregs[i].low >> 32),
641 (unsigned int)ctx.fp.x86_64_regs.fpregs[i].low );
643 break;
644 case CPU_POWERPC:
645 if (ctx.flags & SERVER_CTX_CONTROL)
646 fprintf( stderr, ",iar=%08x,msr=%08x,ctr=%08x,lr=%08x,dar=%08x,dsisr=%08x,trap=%08x",
647 ctx.ctl.powerpc_regs.iar, ctx.ctl.powerpc_regs.msr, ctx.ctl.powerpc_regs.ctr,
648 ctx.ctl.powerpc_regs.lr, ctx.ctl.powerpc_regs.dar, ctx.ctl.powerpc_regs.dsisr,
649 ctx.ctl.powerpc_regs.trap );
650 if (ctx.flags & SERVER_CTX_INTEGER)
652 for (i = 0; i < 32; i++) fprintf( stderr, ",gpr%u=%08x", i, ctx.integer.powerpc_regs.gpr[i] );
653 fprintf( stderr, ",cr=%08x,xer=%08x",
654 ctx.integer.powerpc_regs.cr, ctx.integer.powerpc_regs.xer );
656 if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
657 for (i = 0; i < 8; i++) fprintf( stderr, ",dr%u=%08x", i, ctx.debug.powerpc_regs.dr[i] );
658 if (ctx.flags & SERVER_CTX_FLOATING_POINT)
660 for (i = 0; i < 32; i++) fprintf( stderr, ",fpr%u=%g", i, ctx.fp.powerpc_regs.fpr[i] );
661 fprintf( stderr, ",fpscr=%g", ctx.fp.powerpc_regs.fpscr );
663 break;
664 case CPU_ARM:
665 if (ctx.flags & SERVER_CTX_CONTROL)
666 fprintf( stderr, ",sp=%08x,lr=%08x,pc=%08x,cpsr=%08x",
667 ctx.ctl.arm_regs.sp, ctx.ctl.arm_regs.lr,
668 ctx.ctl.arm_regs.pc, ctx.ctl.arm_regs.cpsr );
669 if (ctx.flags & SERVER_CTX_INTEGER)
670 for (i = 0; i < 13; i++) fprintf( stderr, ",r%u=%08x", i, ctx.integer.arm_regs.r[i] );
671 if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
673 for (i = 0; i < 8; i++)
674 fprintf( stderr, ",bcr%u=%08x,bvr%u=%08x",
675 i, ctx.debug.arm_regs.bcr[i], i, ctx.debug.arm_regs.bvr[i] );
676 fprintf( stderr, ",wcr0=%08x,wvr0=%08x",
677 ctx.debug.arm_regs.wcr[0], ctx.debug.arm_regs.wvr[0] );
679 if (ctx.flags & SERVER_CTX_FLOATING_POINT)
681 for (i = 0; i < 32; i++)
683 fprintf( stderr, ",d%u=", i );
684 dump_uint64( "", &ctx.fp.arm_regs.d[i] );
686 fprintf( stderr, ",fpscr=%08x", ctx.fp.arm_regs.fpscr );
688 break;
689 case CPU_ARM64:
690 if (ctx.flags & SERVER_CTX_CONTROL)
692 dump_uint64( ",sp=", &ctx.ctl.arm64_regs.sp );
693 dump_uint64( ",pc=", &ctx.ctl.arm64_regs.pc );
694 dump_uint64( ",pstate=", &ctx.ctl.arm64_regs.pstate );
696 if (ctx.flags & SERVER_CTX_INTEGER)
698 for (i = 0; i < 31; i++)
700 fprintf( stderr, ",x%u=", i );
701 dump_uint64( "", &ctx.integer.arm64_regs.x[i] );
704 if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
706 for (i = 0; i < 8; i++)
708 fprintf( stderr, ",bcr%u=%08x,bvr%u=", i, ctx.debug.arm64_regs.bcr[i], i );
709 dump_uint64( "", &ctx.debug.arm64_regs.bvr[i] );
711 for (i = 0; i < 2; i++)
713 fprintf( stderr, ",wcr%u=%08x,wvr%u=", i, ctx.debug.arm64_regs.wcr[i], i );
714 dump_uint64( "", &ctx.debug.arm64_regs.wvr[i] );
717 if (ctx.flags & SERVER_CTX_FLOATING_POINT)
719 for (i = 0; i < 64; i++)
721 fprintf( stderr, ",d%u=", i );
722 dump_uint64( "", &ctx.fp.arm64_regs.d[i] );
724 fprintf( stderr, ",fpcr=%08x,fpsr=%08x", ctx.fp.arm64_regs.fpcr, ctx.fp.arm64_regs.fpsr );
726 break;
728 fputc( '}', stderr );
729 remove_data( size );
732 static void dump_varargs_debug_event( const char *prefix, data_size_t size )
734 debug_event_t event;
735 unsigned int i;
737 if (!size)
739 fprintf( stderr, "%s{}", prefix );
740 return;
742 size = min( size, sizeof(event) );
743 memset( &event, 0, sizeof(event) );
744 memcpy( &event, cur_data, size );
746 switch(event.code)
748 case EXCEPTION_DEBUG_EVENT:
749 fprintf( stderr, "%s{exception,first=%d,exc_code=%08x,flags=%08x", prefix,
750 event.exception.first, event.exception.exc_code, event.exception.flags );
751 dump_uint64( ",record=", &event.exception.record );
752 dump_uint64( ",address=", &event.exception.address );
753 fprintf( stderr, ",params={" );
754 event.exception.nb_params = min( event.exception.nb_params, EXCEPTION_MAXIMUM_PARAMETERS );
755 for (i = 0; i < event.exception.nb_params; i++)
757 dump_uint64( "", &event.exception.params[i] );
758 if (i < event.exception.nb_params) fputc( ',', stderr );
760 fprintf( stderr, "}}" );
761 break;
762 case CREATE_THREAD_DEBUG_EVENT:
763 fprintf( stderr, "%s{create_thread,thread=%04x", prefix, event.create_thread.handle );
764 dump_uint64( ",teb=", &event.create_thread.teb );
765 dump_uint64( ",start=", &event.create_thread.start );
766 fputc( '}', stderr );
767 break;
768 case CREATE_PROCESS_DEBUG_EVENT:
769 fprintf( stderr, "%s{create_process,file=%04x,process=%04x,thread=%04x", prefix,
770 event.create_process.file, event.create_process.process,
771 event.create_process.thread );
772 dump_uint64( ",base=", &event.create_process.base );
773 fprintf( stderr, ",offset=%d,size=%d",
774 event.create_process.dbg_offset, event.create_process.dbg_size );
775 dump_uint64( ",teb=", &event.create_process.teb );
776 dump_uint64( ",start=", &event.create_process.start );
777 dump_uint64( ",name=", &event.create_process.name );
778 fprintf( stderr, ",unicode=%d}", event.create_process.unicode );
779 break;
780 case EXIT_THREAD_DEBUG_EVENT:
781 fprintf( stderr, "%s{exit_thread,code=%d}", prefix, event.exit.exit_code );
782 break;
783 case EXIT_PROCESS_DEBUG_EVENT:
784 fprintf( stderr, "%s{exit_process,code=%d}", prefix, event.exit.exit_code );
785 break;
786 case LOAD_DLL_DEBUG_EVENT:
787 fprintf( stderr, "%s{load_dll,file=%04x", prefix, event.load_dll.handle );
788 dump_uint64( ",base=", &event.load_dll.base );
789 fprintf( stderr, ",offset=%d,size=%d",
790 event.load_dll.dbg_offset, event.load_dll.dbg_size );
791 dump_uint64( ",name=", &event.load_dll.name );
792 fprintf( stderr, ",unicode=%d}", event.load_dll.unicode );
793 break;
794 case UNLOAD_DLL_DEBUG_EVENT:
795 fprintf( stderr, "%s{unload_dll", prefix );
796 dump_uint64( ",base=", &event.unload_dll.base );
797 fputc( '}', stderr );
798 break;
799 case 0: /* zero is the code returned on timeouts */
800 fprintf( stderr, "%s{}", prefix );
801 break;
802 default:
803 fprintf( stderr, "%s{code=??? (%d)}", prefix, event.code );
804 break;
806 remove_data( size );
809 /* dump a unicode string contained in a buffer; helper for dump_varargs_startup_info */
810 static data_size_t dump_inline_unicode_string( const char *prefix, data_size_t pos, data_size_t len, data_size_t total_size )
812 fputs( prefix, stderr );
813 if (pos >= total_size) return pos;
814 if (len > total_size - pos) len = total_size - pos;
815 len /= sizeof(WCHAR);
816 dump_strW( (const WCHAR *)cur_data + pos/sizeof(WCHAR), len, stderr, "\"\"" );
817 return pos + len * sizeof(WCHAR);
820 static void dump_varargs_startup_info( const char *prefix, data_size_t size )
822 startup_info_t info;
823 data_size_t pos = sizeof(info);
825 memset( &info, 0, sizeof(info) );
826 memcpy( &info, cur_data, min( size, sizeof(info) ));
828 fprintf( stderr,
829 "%s{debug_flags=%x,console_flags=%x,console=%04x,hstdin=%04x,hstdout=%04x,hstderr=%04x,"
830 "x=%u,y=%u,xsize=%u,ysize=%u,xchars=%u,ychars=%u,attribute=%02x,flags=%x,show=%u",
831 prefix, info.debug_flags, info.console_flags, info.console,
832 info.hstdin, info.hstdout, info.hstderr, info.x, info.y, info.xsize, info.ysize,
833 info.xchars, info.ychars, info.attribute, info.flags, info.show );
834 pos = dump_inline_unicode_string( ",curdir=L\"", pos, info.curdir_len, size );
835 pos = dump_inline_unicode_string( "\",dllpath=L\"", pos, info.dllpath_len, size );
836 pos = dump_inline_unicode_string( "\",imagepath=L\"", pos, info.imagepath_len, size );
837 pos = dump_inline_unicode_string( "\",cmdline=L\"", pos, info.cmdline_len, size );
838 pos = dump_inline_unicode_string( "\",title=L\"", pos, info.title_len, size );
839 pos = dump_inline_unicode_string( "\",desktop=L\"", pos, info.desktop_len, size );
840 pos = dump_inline_unicode_string( "\",shellinfo=L\"", pos, info.shellinfo_len, size );
841 pos = dump_inline_unicode_string( "\",runtime=L\"", pos, info.runtime_len, size );
842 fprintf( stderr, "\"}" );
843 remove_data( size );
846 static void dump_varargs_input_records( const char *prefix, data_size_t size )
848 const INPUT_RECORD *rec = cur_data;
849 data_size_t len = size / sizeof(*rec);
851 fprintf( stderr,"%s{", prefix );
852 while (len > 0)
854 fprintf( stderr, "{%04x,...}", rec->EventType );
855 rec++;
856 if (--len) fputc( ',', stderr );
858 fputc( '}', stderr );
859 remove_data( size );
862 static void dump_varargs_rectangles( const char *prefix, data_size_t size )
864 const rectangle_t *rect = cur_data;
865 data_size_t len = size / sizeof(*rect);
867 fprintf( stderr,"%s{", prefix );
868 while (len > 0)
870 dump_rectangle( "", rect++ );
871 if (--len) fputc( ',', stderr );
873 fputc( '}', stderr );
874 remove_data( size );
877 static void dump_varargs_message_data( const char *prefix, data_size_t size )
879 /* FIXME: dump the structured data */
880 dump_varargs_bytes( prefix, size );
883 static void dump_varargs_properties( const char *prefix, data_size_t size )
885 const property_data_t *prop = cur_data;
886 data_size_t len = size / sizeof(*prop);
888 fprintf( stderr,"%s{", prefix );
889 while (len > 0)
891 fprintf( stderr, "{atom=%04x,str=%d", prop->atom, prop->string );
892 dump_uint64( ",data=", &prop->data );
893 fputc( '}', stderr );
894 prop++;
895 if (--len) fputc( ',', stderr );
897 fputc( '}', stderr );
898 remove_data( size );
901 static void dump_varargs_LUID_AND_ATTRIBUTES( const char *prefix, data_size_t size )
903 const LUID_AND_ATTRIBUTES *lat = cur_data;
904 data_size_t len = size / sizeof(*lat);
906 fprintf( stderr,"%s{", prefix );
907 while (len > 0)
909 fprintf( stderr, "{luid=%08x%08x,attr=%x}",
910 lat->Luid.HighPart, lat->Luid.LowPart, lat->Attributes );
911 lat++;
912 if (--len) fputc( ',', stderr );
914 fputc( '}', stderr );
915 remove_data( size );
918 static void dump_inline_sid( const char *prefix, const SID *sid, data_size_t size )
920 DWORD i;
922 /* security check */
923 if ((FIELD_OFFSET(SID, SubAuthority[0]) > size) ||
924 (FIELD_OFFSET(SID, SubAuthority[sid->SubAuthorityCount]) > size))
926 fprintf( stderr, "<invalid sid>" );
927 return;
930 fprintf( stderr,"%s{", prefix );
931 fprintf( stderr, "S-%u-%u", sid->Revision, MAKELONG(
932 MAKEWORD( sid->IdentifierAuthority.Value[5],
933 sid->IdentifierAuthority.Value[4] ),
934 MAKEWORD( sid->IdentifierAuthority.Value[3],
935 sid->IdentifierAuthority.Value[2] ) ) );
936 for (i = 0; i < sid->SubAuthorityCount; i++)
937 fprintf( stderr, "-%u", sid->SubAuthority[i] );
938 fputc( '}', stderr );
941 static void dump_varargs_SID( const char *prefix, data_size_t size )
943 const SID *sid = cur_data;
944 dump_inline_sid( prefix, sid, size );
945 remove_data( size );
948 static void dump_inline_acl( const char *prefix, const ACL *acl, data_size_t size )
950 const ACE_HEADER *ace;
951 ULONG i;
953 fprintf( stderr,"%s{", prefix );
954 if (size)
956 if (size < sizeof(ACL))
958 fprintf( stderr, "<invalid acl>}" );
959 return;
961 size -= sizeof(ACL);
962 ace = (const ACE_HEADER *)(acl + 1);
963 for (i = 0; i < acl->AceCount; i++)
965 const SID *sid = NULL;
966 data_size_t sid_size = 0;
968 if (size < sizeof(ACE_HEADER) || size < ace->AceSize) break;
969 size -= ace->AceSize;
970 if (i != 0) fputc( ',', stderr );
971 fprintf( stderr, "{AceType=" );
972 switch (ace->AceType)
974 case ACCESS_DENIED_ACE_TYPE:
975 sid = (const SID *)&((const ACCESS_DENIED_ACE *)ace)->SidStart;
976 sid_size = ace->AceSize - FIELD_OFFSET(ACCESS_DENIED_ACE, SidStart);
977 fprintf( stderr, "ACCESS_DENIED_ACE_TYPE,Mask=%x",
978 ((const ACCESS_DENIED_ACE *)ace)->Mask );
979 break;
980 case ACCESS_ALLOWED_ACE_TYPE:
981 sid = (const SID *)&((const ACCESS_ALLOWED_ACE *)ace)->SidStart;
982 sid_size = ace->AceSize - FIELD_OFFSET(ACCESS_ALLOWED_ACE, SidStart);
983 fprintf( stderr, "ACCESS_ALLOWED_ACE_TYPE,Mask=%x",
984 ((const ACCESS_ALLOWED_ACE *)ace)->Mask );
985 break;
986 case SYSTEM_AUDIT_ACE_TYPE:
987 sid = (const SID *)&((const SYSTEM_AUDIT_ACE *)ace)->SidStart;
988 sid_size = ace->AceSize - FIELD_OFFSET(SYSTEM_AUDIT_ACE, SidStart);
989 fprintf( stderr, "SYSTEM_AUDIT_ACE_TYPE,Mask=%x",
990 ((const SYSTEM_AUDIT_ACE *)ace)->Mask );
991 break;
992 case SYSTEM_ALARM_ACE_TYPE:
993 sid = (const SID *)&((const SYSTEM_ALARM_ACE *)ace)->SidStart;
994 sid_size = ace->AceSize - FIELD_OFFSET(SYSTEM_ALARM_ACE, SidStart);
995 fprintf( stderr, "SYSTEM_ALARM_ACE_TYPE,Mask=%x",
996 ((const SYSTEM_ALARM_ACE *)ace)->Mask );
997 break;
998 case SYSTEM_MANDATORY_LABEL_ACE_TYPE:
999 sid = (const SID *)&((const SYSTEM_MANDATORY_LABEL_ACE *)ace)->SidStart;
1000 sid_size = ace->AceSize - FIELD_OFFSET(SYSTEM_MANDATORY_LABEL_ACE, SidStart);
1001 fprintf( stderr, "SYSTEM_MANDATORY_LABEL_ACE_TYPE,Mask=%x",
1002 ((const SYSTEM_MANDATORY_LABEL_ACE *)ace)->Mask );
1003 break;
1004 default:
1005 fprintf( stderr, "unknown<%d>", ace->AceType );
1006 break;
1008 fprintf( stderr, ",AceFlags=%x", ace->AceFlags );
1009 if (sid)
1010 dump_inline_sid( ",Sid=", sid, sid_size );
1011 ace = (const ACE_HEADER *)((const char *)ace + ace->AceSize);
1012 fputc( '}', stderr );
1015 fputc( '}', stderr );
1018 static void dump_varargs_ACL( const char *prefix, data_size_t size )
1020 const ACL *acl = cur_data;
1021 dump_inline_acl( prefix, acl, size );
1022 remove_data( size );
1025 static void dump_inline_security_descriptor( const char *prefix, const struct security_descriptor *sd, data_size_t size )
1027 fprintf( stderr,"%s{", prefix );
1028 if (size >= sizeof(struct security_descriptor))
1030 size_t offset = sizeof(struct security_descriptor);
1031 fprintf( stderr, "control=%08x", sd->control );
1032 if ((sd->owner_len > FIELD_OFFSET(SID, SubAuthority[255])) || (offset + sd->owner_len > size))
1033 return;
1034 if (sd->owner_len)
1035 dump_inline_sid( ",owner=", (const SID *)((const char *)sd + offset), sd->owner_len );
1036 else
1037 fprintf( stderr, ",owner=<not present>" );
1038 offset += sd->owner_len;
1039 if ((sd->group_len > FIELD_OFFSET(SID, SubAuthority[255])) || (offset + sd->group_len > size))
1040 return;
1041 if (sd->group_len)
1042 dump_inline_sid( ",group=", (const SID *)((const char *)sd + offset), sd->group_len );
1043 else
1044 fprintf( stderr, ",group=<not present>" );
1045 offset += sd->group_len;
1046 if ((sd->sacl_len >= MAX_ACL_LEN) || (offset + sd->sacl_len > size))
1047 return;
1048 dump_inline_acl( ",sacl=", (const ACL *)((const char *)sd + offset), sd->sacl_len );
1049 offset += sd->sacl_len;
1050 if ((sd->dacl_len >= MAX_ACL_LEN) || (offset + sd->dacl_len > size))
1051 return;
1052 dump_inline_acl( ",dacl=", (const ACL *)((const char *)sd + offset), sd->dacl_len );
1053 offset += sd->dacl_len;
1055 fputc( '}', stderr );
1058 static void dump_varargs_security_descriptor( const char *prefix, data_size_t size )
1060 const struct security_descriptor *sd = cur_data;
1061 dump_inline_security_descriptor( prefix, sd, size );
1062 remove_data( size );
1065 static void dump_varargs_token_groups( const char *prefix, data_size_t size )
1067 const struct token_groups *tg = cur_data;
1069 fprintf( stderr,"%s{", prefix );
1070 if (size >= sizeof(struct token_groups))
1072 size_t offset = sizeof(*tg);
1073 fprintf( stderr, "count=%08x,", tg->count );
1074 if (tg->count * sizeof(unsigned int) <= size)
1076 unsigned int i;
1077 const unsigned int *attr = (const unsigned int *)(tg + 1);
1079 offset += tg->count * sizeof(unsigned int);
1081 fputc( '[', stderr );
1082 for (i = 0; i < tg->count; i++)
1084 const SID *sid = (const SID *)((const char *)cur_data + offset);
1085 if (i != 0)
1086 fputc( ',', stderr );
1087 fputc( '{', stderr );
1088 fprintf( stderr, "attributes=%08x", attr[i] );
1089 dump_inline_sid( ",sid=", sid, size - offset );
1090 if ((offset + FIELD_OFFSET(SID, SubAuthority[0]) > size) ||
1091 (offset + FIELD_OFFSET(SID, SubAuthority[sid->SubAuthorityCount]) > size))
1092 break;
1093 offset += FIELD_OFFSET(SID, SubAuthority[sid->SubAuthorityCount]);
1094 fputc( '}', stderr );
1096 fputc( ']', stderr );
1099 fputc( '}', stderr );
1102 static void dump_varargs_object_attributes( const char *prefix, data_size_t size )
1104 const struct object_attributes *objattr = cur_data;
1106 fprintf( stderr,"%s{", prefix );
1107 if (size)
1109 const WCHAR *str;
1111 if (size < sizeof(*objattr) ||
1112 (size - sizeof(*objattr) < objattr->sd_len) ||
1113 (size - sizeof(*objattr) - objattr->sd_len < objattr->name_len))
1115 fprintf( stderr, "***invalid***}" );
1116 remove_data( size );
1117 return;
1120 fprintf( stderr, "rootdir=%04x,attributes=%08x", objattr->rootdir, objattr->attributes );
1121 dump_inline_security_descriptor( ",sd=", (const struct security_descriptor *)(objattr + 1), objattr->sd_len );
1122 str = (const WCHAR *)objattr + (sizeof(*objattr) + objattr->sd_len) / sizeof(WCHAR);
1123 fprintf( stderr, ",name=L\"" );
1124 dump_strW( str, objattr->name_len / sizeof(WCHAR), stderr, "\"\"" );
1125 fputc( '\"', stderr );
1126 remove_data( (sizeof(*objattr) + (objattr->sd_len & ~1) + (objattr->name_len & ~1) + 3) & ~3 );
1128 fputc( '}', stderr );
1131 static void dump_varargs_filesystem_event( const char *prefix, data_size_t size )
1133 static const char * const actions[] = {
1134 NULL,
1135 "ADDED",
1136 "REMOVED",
1137 "MODIFIED",
1138 "RENAMED_OLD_NAME",
1139 "RENAMED_NEW_NAME",
1140 "ADDED_STREAM",
1141 "REMOVED_STREAM",
1142 "MODIFIED_STREAM"
1145 fprintf( stderr,"%s{", prefix );
1146 while (size)
1148 const struct filesystem_event *event = cur_data;
1149 data_size_t len = (offsetof( struct filesystem_event, name[event->len] ) + sizeof(int)-1)
1150 / sizeof(int) * sizeof(int);
1151 if (size < len) break;
1152 if (event->action < ARRAY_SIZE( actions ) && actions[event->action])
1153 fprintf( stderr, "{action=%s", actions[event->action] );
1154 else
1155 fprintf( stderr, "{action=%u", event->action );
1156 fprintf( stderr, ",name=\"%.*s\"}", event->len, event->name );
1157 size -= len;
1158 remove_data( len );
1159 if (size)fputc( ',', stderr );
1161 fputc( '}', stderr );
1164 static void dump_varargs_pe_image_info( const char *prefix, data_size_t size )
1166 pe_image_info_t info;
1168 if (!size)
1170 fprintf( stderr, "%s{}", prefix );
1171 return;
1173 memset( &info, 0, sizeof(info) );
1174 memcpy( &info, cur_data, min( size, sizeof(info) ));
1176 fprintf( stderr, "%s{", prefix );
1177 dump_uint64( "base=", &info.base );
1178 dump_uint64( ",entry_point=", &info.entry_point );
1179 dump_uint64( ",map_size=", &info.map_size );
1180 dump_uint64( ",stack_size=", &info.stack_size );
1181 dump_uint64( ",stack_commit=", &info.stack_commit );
1182 fprintf( stderr, ",zerobits=%08x,subsystem=%08x,subsystem_low=%04x,subsystem_high=%04x,gp=%08x"
1183 ",image_charact=%04x,dll_charact=%04x,machine=%04x,contains_code=%u,image_flags=%02x"
1184 ",loader_flags=%08x,header_size=%08x,file_size=%08x,checksum=%08x",
1185 info.zerobits, info.subsystem, info.subsystem_low, info.subsystem_high, info.gp,
1186 info.image_charact, info.dll_charact, info.machine, info.contains_code, info.image_flags,
1187 info.loader_flags, info.header_size, info.file_size, info.checksum );
1188 dump_cpu_type( ",cpu=", &info.cpu );
1189 fputc( '}', stderr );
1190 remove_data( size );
1193 static void dump_varargs_rawinput_devices(const char *prefix, data_size_t size )
1195 const struct rawinput_device *device;
1197 fprintf( stderr, "%s{", prefix );
1198 while (size >= sizeof(*device))
1200 device = cur_data;
1201 fprintf( stderr, "{usage_page=%04x,usage=%04x,flags=%08x,target=%08x}",
1202 device->usage_page, device->usage, device->flags, device->target );
1203 size -= sizeof(*device);
1204 remove_data( sizeof(*device) );
1205 if (size) fputc( ',', stderr );
1207 fputc( '}', stderr );
1210 static void dump_varargs_handle_infos( const char *prefix, data_size_t size )
1212 const struct handle_info *handle;
1214 fprintf( stderr, "%s{", prefix );
1215 while (size >= sizeof(*handle))
1217 handle = cur_data;
1218 fprintf( stderr, "{owner=%04x,handle=%04x,access=%08x}",
1219 handle->owner, handle->handle, handle->access );
1220 size -= sizeof(*handle);
1221 remove_data( sizeof(*handle) );
1222 if (size) fputc( ',', stderr );
1224 fputc( '}', stderr );
1227 typedef void (*dump_func)( const void *req );
1229 /* Everything below this line is generated automatically by tools/make_requests */
1230 /* ### make_requests begin ### */
1232 static void dump_new_process_request( const struct new_process_request *req )
1234 fprintf( stderr, " inherit_all=%d", req->inherit_all );
1235 fprintf( stderr, ", create_flags=%08x", req->create_flags );
1236 fprintf( stderr, ", socket_fd=%d", req->socket_fd );
1237 fprintf( stderr, ", exe_file=%04x", req->exe_file );
1238 fprintf( stderr, ", access=%08x", req->access );
1239 dump_cpu_type( ", cpu=", &req->cpu );
1240 fprintf( stderr, ", info_size=%u", req->info_size );
1241 dump_varargs_object_attributes( ", objattr=", cur_size );
1242 dump_varargs_startup_info( ", info=", min(cur_size,req->info_size) );
1243 dump_varargs_unicode_str( ", env=", cur_size );
1246 static void dump_new_process_reply( const struct new_process_reply *req )
1248 fprintf( stderr, " info=%04x", req->info );
1249 fprintf( stderr, ", pid=%04x", req->pid );
1250 fprintf( stderr, ", handle=%04x", req->handle );
1253 static void dump_exec_process_request( const struct exec_process_request *req )
1255 fprintf( stderr, " socket_fd=%d", req->socket_fd );
1256 fprintf( stderr, ", exe_file=%04x", req->exe_file );
1257 dump_cpu_type( ", cpu=", &req->cpu );
1260 static void dump_get_new_process_info_request( const struct get_new_process_info_request *req )
1262 fprintf( stderr, " info=%04x", req->info );
1265 static void dump_get_new_process_info_reply( const struct get_new_process_info_reply *req )
1267 fprintf( stderr, " success=%d", req->success );
1268 fprintf( stderr, ", exit_code=%d", req->exit_code );
1271 static void dump_new_thread_request( const struct new_thread_request *req )
1273 fprintf( stderr, " process=%04x", req->process );
1274 fprintf( stderr, ", access=%08x", req->access );
1275 fprintf( stderr, ", suspend=%d", req->suspend );
1276 fprintf( stderr, ", request_fd=%d", req->request_fd );
1277 dump_varargs_object_attributes( ", objattr=", cur_size );
1280 static void dump_new_thread_reply( const struct new_thread_reply *req )
1282 fprintf( stderr, " tid=%04x", req->tid );
1283 fprintf( stderr, ", handle=%04x", req->handle );
1286 static void dump_get_startup_info_request( const struct get_startup_info_request *req )
1290 static void dump_get_startup_info_reply( const struct get_startup_info_reply *req )
1292 fprintf( stderr, " info_size=%u", req->info_size );
1293 dump_varargs_startup_info( ", info=", min(cur_size,req->info_size) );
1294 dump_varargs_unicode_str( ", env=", cur_size );
1297 static void dump_init_process_done_request( const struct init_process_done_request *req )
1299 fprintf( stderr, " gui=%d", req->gui );
1300 dump_uint64( ", module=", &req->module );
1301 dump_uint64( ", ldt_copy=", &req->ldt_copy );
1302 dump_uint64( ", entry=", &req->entry );
1305 static void dump_init_process_done_reply( const struct init_process_done_reply *req )
1307 fprintf( stderr, " suspend=%d", req->suspend );
1310 static void dump_init_thread_request( const struct init_thread_request *req )
1312 fprintf( stderr, " unix_pid=%d", req->unix_pid );
1313 fprintf( stderr, ", unix_tid=%d", req->unix_tid );
1314 fprintf( stderr, ", debug_level=%d", req->debug_level );
1315 dump_uint64( ", teb=", &req->teb );
1316 dump_uint64( ", entry=", &req->entry );
1317 fprintf( stderr, ", reply_fd=%d", req->reply_fd );
1318 fprintf( stderr, ", wait_fd=%d", req->wait_fd );
1319 dump_cpu_type( ", cpu=", &req->cpu );
1322 static void dump_init_thread_reply( const struct init_thread_reply *req )
1324 fprintf( stderr, " pid=%04x", req->pid );
1325 fprintf( stderr, ", tid=%04x", req->tid );
1326 dump_timeout( ", server_start=", &req->server_start );
1327 fprintf( stderr, ", info_size=%u", req->info_size );
1328 fprintf( stderr, ", version=%d", req->version );
1329 fprintf( stderr, ", all_cpus=%08x", req->all_cpus );
1330 fprintf( stderr, ", suspend=%d", req->suspend );
1333 static void dump_terminate_process_request( const struct terminate_process_request *req )
1335 fprintf( stderr, " handle=%04x", req->handle );
1336 fprintf( stderr, ", exit_code=%d", req->exit_code );
1339 static void dump_terminate_process_reply( const struct terminate_process_reply *req )
1341 fprintf( stderr, " self=%d", req->self );
1344 static void dump_terminate_thread_request( const struct terminate_thread_request *req )
1346 fprintf( stderr, " handle=%04x", req->handle );
1347 fprintf( stderr, ", exit_code=%d", req->exit_code );
1350 static void dump_terminate_thread_reply( const struct terminate_thread_reply *req )
1352 fprintf( stderr, " self=%d", req->self );
1353 fprintf( stderr, ", last=%d", req->last );
1356 static void dump_get_process_info_request( const struct get_process_info_request *req )
1358 fprintf( stderr, " handle=%04x", req->handle );
1361 static void dump_get_process_info_reply( const struct get_process_info_reply *req )
1363 fprintf( stderr, " pid=%04x", req->pid );
1364 fprintf( stderr, ", ppid=%04x", req->ppid );
1365 dump_uint64( ", affinity=", &req->affinity );
1366 dump_uint64( ", peb=", &req->peb );
1367 dump_timeout( ", start_time=", &req->start_time );
1368 dump_timeout( ", end_time=", &req->end_time );
1369 fprintf( stderr, ", exit_code=%d", req->exit_code );
1370 fprintf( stderr, ", priority=%d", req->priority );
1371 dump_cpu_type( ", cpu=", &req->cpu );
1372 fprintf( stderr, ", debugger_present=%d", req->debugger_present );
1373 fprintf( stderr, ", debug_children=%d", req->debug_children );
1376 static void dump_get_process_vm_counters_request( const struct get_process_vm_counters_request *req )
1378 fprintf( stderr, " handle=%04x", req->handle );
1381 static void dump_get_process_vm_counters_reply( const struct get_process_vm_counters_reply *req )
1383 dump_uint64( " peak_virtual_size=", &req->peak_virtual_size );
1384 dump_uint64( ", virtual_size=", &req->virtual_size );
1385 dump_uint64( ", peak_working_set_size=", &req->peak_working_set_size );
1386 dump_uint64( ", working_set_size=", &req->working_set_size );
1387 dump_uint64( ", pagefile_usage=", &req->pagefile_usage );
1388 dump_uint64( ", peak_pagefile_usage=", &req->peak_pagefile_usage );
1391 static void dump_set_process_info_request( const struct set_process_info_request *req )
1393 fprintf( stderr, " handle=%04x", req->handle );
1394 fprintf( stderr, ", mask=%d", req->mask );
1395 fprintf( stderr, ", priority=%d", req->priority );
1396 dump_uint64( ", affinity=", &req->affinity );
1399 static void dump_get_thread_info_request( const struct get_thread_info_request *req )
1401 fprintf( stderr, " handle=%04x", req->handle );
1402 fprintf( stderr, ", tid_in=%04x", req->tid_in );
1405 static void dump_get_thread_info_reply( const struct get_thread_info_reply *req )
1407 fprintf( stderr, " pid=%04x", req->pid );
1408 fprintf( stderr, ", tid=%04x", req->tid );
1409 dump_uint64( ", teb=", &req->teb );
1410 dump_uint64( ", entry_point=", &req->entry_point );
1411 dump_uint64( ", affinity=", &req->affinity );
1412 fprintf( stderr, ", exit_code=%d", req->exit_code );
1413 fprintf( stderr, ", priority=%d", req->priority );
1414 fprintf( stderr, ", last=%d", req->last );
1417 static void dump_get_thread_times_request( const struct get_thread_times_request *req )
1419 fprintf( stderr, " handle=%04x", req->handle );
1422 static void dump_get_thread_times_reply( const struct get_thread_times_reply *req )
1424 dump_timeout( " creation_time=", &req->creation_time );
1425 dump_timeout( ", exit_time=", &req->exit_time );
1428 static void dump_set_thread_info_request( const struct set_thread_info_request *req )
1430 fprintf( stderr, " handle=%04x", req->handle );
1431 fprintf( stderr, ", mask=%d", req->mask );
1432 fprintf( stderr, ", priority=%d", req->priority );
1433 dump_uint64( ", affinity=", &req->affinity );
1434 dump_uint64( ", entry_point=", &req->entry_point );
1435 fprintf( stderr, ", token=%04x", req->token );
1438 static void dump_get_dll_info_request( const struct get_dll_info_request *req )
1440 fprintf( stderr, " handle=%04x", req->handle );
1441 dump_uint64( ", base_address=", &req->base_address );
1444 static void dump_get_dll_info_reply( const struct get_dll_info_reply *req )
1446 dump_uint64( " entry_point=", &req->entry_point );
1447 fprintf( stderr, ", filename_len=%u", req->filename_len );
1448 dump_varargs_unicode_str( ", filename=", cur_size );
1451 static void dump_suspend_thread_request( const struct suspend_thread_request *req )
1453 fprintf( stderr, " handle=%04x", req->handle );
1456 static void dump_suspend_thread_reply( const struct suspend_thread_reply *req )
1458 fprintf( stderr, " count=%d", req->count );
1461 static void dump_resume_thread_request( const struct resume_thread_request *req )
1463 fprintf( stderr, " handle=%04x", req->handle );
1466 static void dump_resume_thread_reply( const struct resume_thread_reply *req )
1468 fprintf( stderr, " count=%d", req->count );
1471 static void dump_load_dll_request( const struct load_dll_request *req )
1473 fprintf( stderr, " dbg_offset=%u", req->dbg_offset );
1474 dump_uint64( ", base=", &req->base );
1475 dump_uint64( ", name=", &req->name );
1476 fprintf( stderr, ", dbg_size=%u", req->dbg_size );
1477 dump_varargs_unicode_str( ", filename=", cur_size );
1480 static void dump_unload_dll_request( const struct unload_dll_request *req )
1482 dump_uint64( " base=", &req->base );
1485 static void dump_queue_apc_request( const struct queue_apc_request *req )
1487 fprintf( stderr, " handle=%04x", req->handle );
1488 dump_apc_call( ", call=", &req->call );
1491 static void dump_queue_apc_reply( const struct queue_apc_reply *req )
1493 fprintf( stderr, " handle=%04x", req->handle );
1494 fprintf( stderr, ", self=%d", req->self );
1497 static void dump_get_apc_result_request( const struct get_apc_result_request *req )
1499 fprintf( stderr, " handle=%04x", req->handle );
1502 static void dump_get_apc_result_reply( const struct get_apc_result_reply *req )
1504 dump_apc_result( " result=", &req->result );
1507 static void dump_close_handle_request( const struct close_handle_request *req )
1509 fprintf( stderr, " handle=%04x", req->handle );
1512 static void dump_set_handle_info_request( const struct set_handle_info_request *req )
1514 fprintf( stderr, " handle=%04x", req->handle );
1515 fprintf( stderr, ", flags=%d", req->flags );
1516 fprintf( stderr, ", mask=%d", req->mask );
1519 static void dump_set_handle_info_reply( const struct set_handle_info_reply *req )
1521 fprintf( stderr, " old_flags=%d", req->old_flags );
1524 static void dump_dup_handle_request( const struct dup_handle_request *req )
1526 fprintf( stderr, " src_process=%04x", req->src_process );
1527 fprintf( stderr, ", src_handle=%04x", req->src_handle );
1528 fprintf( stderr, ", dst_process=%04x", req->dst_process );
1529 fprintf( stderr, ", access=%08x", req->access );
1530 fprintf( stderr, ", attributes=%08x", req->attributes );
1531 fprintf( stderr, ", options=%08x", req->options );
1534 static void dump_dup_handle_reply( const struct dup_handle_reply *req )
1536 fprintf( stderr, " handle=%04x", req->handle );
1537 fprintf( stderr, ", self=%d", req->self );
1538 fprintf( stderr, ", closed=%d", req->closed );
1541 static void dump_open_process_request( const struct open_process_request *req )
1543 fprintf( stderr, " pid=%04x", req->pid );
1544 fprintf( stderr, ", access=%08x", req->access );
1545 fprintf( stderr, ", attributes=%08x", req->attributes );
1548 static void dump_open_process_reply( const struct open_process_reply *req )
1550 fprintf( stderr, " handle=%04x", req->handle );
1553 static void dump_open_thread_request( const struct open_thread_request *req )
1555 fprintf( stderr, " tid=%04x", req->tid );
1556 fprintf( stderr, ", access=%08x", req->access );
1557 fprintf( stderr, ", attributes=%08x", req->attributes );
1560 static void dump_open_thread_reply( const struct open_thread_reply *req )
1562 fprintf( stderr, " handle=%04x", req->handle );
1565 static void dump_select_request( const struct select_request *req )
1567 fprintf( stderr, " flags=%d", req->flags );
1568 dump_uint64( ", cookie=", &req->cookie );
1569 dump_timeout( ", timeout=", &req->timeout );
1570 fprintf( stderr, ", prev_apc=%04x", req->prev_apc );
1571 dump_varargs_apc_result( ", result=", cur_size );
1572 dump_varargs_select_op( ", data=", cur_size );
1575 static void dump_select_reply( const struct select_reply *req )
1577 dump_timeout( " timeout=", &req->timeout );
1578 dump_apc_call( ", call=", &req->call );
1579 fprintf( stderr, ", apc_handle=%04x", req->apc_handle );
1582 static void dump_create_event_request( const struct create_event_request *req )
1584 fprintf( stderr, " access=%08x", req->access );
1585 fprintf( stderr, ", manual_reset=%d", req->manual_reset );
1586 fprintf( stderr, ", initial_state=%d", req->initial_state );
1587 dump_varargs_object_attributes( ", objattr=", cur_size );
1590 static void dump_create_event_reply( const struct create_event_reply *req )
1592 fprintf( stderr, " handle=%04x", req->handle );
1595 static void dump_event_op_request( const struct event_op_request *req )
1597 fprintf( stderr, " handle=%04x", req->handle );
1598 fprintf( stderr, ", op=%d", req->op );
1601 static void dump_event_op_reply( const struct event_op_reply *req )
1603 fprintf( stderr, " state=%d", req->state );
1606 static void dump_query_event_request( const struct query_event_request *req )
1608 fprintf( stderr, " handle=%04x", req->handle );
1611 static void dump_query_event_reply( const struct query_event_reply *req )
1613 fprintf( stderr, " manual_reset=%d", req->manual_reset );
1614 fprintf( stderr, ", state=%d", req->state );
1617 static void dump_open_event_request( const struct open_event_request *req )
1619 fprintf( stderr, " access=%08x", req->access );
1620 fprintf( stderr, ", attributes=%08x", req->attributes );
1621 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1622 dump_varargs_unicode_str( ", name=", cur_size );
1625 static void dump_open_event_reply( const struct open_event_reply *req )
1627 fprintf( stderr, " handle=%04x", req->handle );
1630 static void dump_create_keyed_event_request( const struct create_keyed_event_request *req )
1632 fprintf( stderr, " access=%08x", req->access );
1633 dump_varargs_object_attributes( ", objattr=", cur_size );
1636 static void dump_create_keyed_event_reply( const struct create_keyed_event_reply *req )
1638 fprintf( stderr, " handle=%04x", req->handle );
1641 static void dump_open_keyed_event_request( const struct open_keyed_event_request *req )
1643 fprintf( stderr, " access=%08x", req->access );
1644 fprintf( stderr, ", attributes=%08x", req->attributes );
1645 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1646 dump_varargs_unicode_str( ", name=", cur_size );
1649 static void dump_open_keyed_event_reply( const struct open_keyed_event_reply *req )
1651 fprintf( stderr, " handle=%04x", req->handle );
1654 static void dump_create_mutex_request( const struct create_mutex_request *req )
1656 fprintf( stderr, " access=%08x", req->access );
1657 fprintf( stderr, ", owned=%d", req->owned );
1658 dump_varargs_object_attributes( ", objattr=", cur_size );
1661 static void dump_create_mutex_reply( const struct create_mutex_reply *req )
1663 fprintf( stderr, " handle=%04x", req->handle );
1666 static void dump_release_mutex_request( const struct release_mutex_request *req )
1668 fprintf( stderr, " handle=%04x", req->handle );
1671 static void dump_release_mutex_reply( const struct release_mutex_reply *req )
1673 fprintf( stderr, " prev_count=%08x", req->prev_count );
1676 static void dump_open_mutex_request( const struct open_mutex_request *req )
1678 fprintf( stderr, " access=%08x", req->access );
1679 fprintf( stderr, ", attributes=%08x", req->attributes );
1680 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1681 dump_varargs_unicode_str( ", name=", cur_size );
1684 static void dump_open_mutex_reply( const struct open_mutex_reply *req )
1686 fprintf( stderr, " handle=%04x", req->handle );
1689 static void dump_query_mutex_request( const struct query_mutex_request *req )
1691 fprintf( stderr, " handle=%04x", req->handle );
1694 static void dump_query_mutex_reply( const struct query_mutex_reply *req )
1696 fprintf( stderr, " count=%08x", req->count );
1697 fprintf( stderr, ", owned=%d", req->owned );
1698 fprintf( stderr, ", abandoned=%d", req->abandoned );
1701 static void dump_create_semaphore_request( const struct create_semaphore_request *req )
1703 fprintf( stderr, " access=%08x", req->access );
1704 fprintf( stderr, ", initial=%08x", req->initial );
1705 fprintf( stderr, ", max=%08x", req->max );
1706 dump_varargs_object_attributes( ", objattr=", cur_size );
1709 static void dump_create_semaphore_reply( const struct create_semaphore_reply *req )
1711 fprintf( stderr, " handle=%04x", req->handle );
1714 static void dump_release_semaphore_request( const struct release_semaphore_request *req )
1716 fprintf( stderr, " handle=%04x", req->handle );
1717 fprintf( stderr, ", count=%08x", req->count );
1720 static void dump_release_semaphore_reply( const struct release_semaphore_reply *req )
1722 fprintf( stderr, " prev_count=%08x", req->prev_count );
1725 static void dump_query_semaphore_request( const struct query_semaphore_request *req )
1727 fprintf( stderr, " handle=%04x", req->handle );
1730 static void dump_query_semaphore_reply( const struct query_semaphore_reply *req )
1732 fprintf( stderr, " current=%08x", req->current );
1733 fprintf( stderr, ", max=%08x", req->max );
1736 static void dump_open_semaphore_request( const struct open_semaphore_request *req )
1738 fprintf( stderr, " access=%08x", req->access );
1739 fprintf( stderr, ", attributes=%08x", req->attributes );
1740 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1741 dump_varargs_unicode_str( ", name=", cur_size );
1744 static void dump_open_semaphore_reply( const struct open_semaphore_reply *req )
1746 fprintf( stderr, " handle=%04x", req->handle );
1749 static void dump_create_file_request( const struct create_file_request *req )
1751 fprintf( stderr, " access=%08x", req->access );
1752 fprintf( stderr, ", sharing=%08x", req->sharing );
1753 fprintf( stderr, ", create=%d", req->create );
1754 fprintf( stderr, ", options=%08x", req->options );
1755 fprintf( stderr, ", attrs=%08x", req->attrs );
1756 dump_varargs_object_attributes( ", objattr=", cur_size );
1757 dump_varargs_string( ", filename=", cur_size );
1760 static void dump_create_file_reply( const struct create_file_reply *req )
1762 fprintf( stderr, " handle=%04x", req->handle );
1765 static void dump_open_file_object_request( const struct open_file_object_request *req )
1767 fprintf( stderr, " access=%08x", req->access );
1768 fprintf( stderr, ", attributes=%08x", req->attributes );
1769 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1770 fprintf( stderr, ", sharing=%08x", req->sharing );
1771 fprintf( stderr, ", options=%08x", req->options );
1772 dump_varargs_unicode_str( ", filename=", cur_size );
1775 static void dump_open_file_object_reply( const struct open_file_object_reply *req )
1777 fprintf( stderr, " handle=%04x", req->handle );
1780 static void dump_alloc_file_handle_request( const struct alloc_file_handle_request *req )
1782 fprintf( stderr, " access=%08x", req->access );
1783 fprintf( stderr, ", attributes=%08x", req->attributes );
1784 fprintf( stderr, ", fd=%d", req->fd );
1787 static void dump_alloc_file_handle_reply( const struct alloc_file_handle_reply *req )
1789 fprintf( stderr, " handle=%04x", req->handle );
1792 static void dump_get_handle_unix_name_request( const struct get_handle_unix_name_request *req )
1794 fprintf( stderr, " handle=%04x", req->handle );
1797 static void dump_get_handle_unix_name_reply( const struct get_handle_unix_name_reply *req )
1799 fprintf( stderr, " name_len=%u", req->name_len );
1800 dump_varargs_string( ", name=", cur_size );
1803 static void dump_get_handle_fd_request( const struct get_handle_fd_request *req )
1805 fprintf( stderr, " handle=%04x", req->handle );
1808 static void dump_get_handle_fd_reply( const struct get_handle_fd_reply *req )
1810 fprintf( stderr, " type=%d", req->type );
1811 fprintf( stderr, ", cacheable=%d", req->cacheable );
1812 fprintf( stderr, ", access=%08x", req->access );
1813 fprintf( stderr, ", options=%08x", req->options );
1816 static void dump_get_directory_cache_entry_request( const struct get_directory_cache_entry_request *req )
1818 fprintf( stderr, " handle=%04x", req->handle );
1821 static void dump_get_directory_cache_entry_reply( const struct get_directory_cache_entry_reply *req )
1823 fprintf( stderr, " entry=%d", req->entry );
1824 dump_varargs_ints( ", free=", cur_size );
1827 static void dump_flush_request( const struct flush_request *req )
1829 dump_async_data( " async=", &req->async );
1832 static void dump_flush_reply( const struct flush_reply *req )
1834 fprintf( stderr, " event=%04x", req->event );
1837 static void dump_get_file_info_request( const struct get_file_info_request *req )
1839 fprintf( stderr, " handle=%04x", req->handle );
1840 fprintf( stderr, ", info_class=%08x", req->info_class );
1843 static void dump_get_file_info_reply( const struct get_file_info_reply *req )
1845 dump_varargs_bytes( " data=", cur_size );
1848 static void dump_get_volume_info_request( const struct get_volume_info_request *req )
1850 fprintf( stderr, " handle=%04x", req->handle );
1851 fprintf( stderr, ", info_class=%08x", req->info_class );
1854 static void dump_get_volume_info_reply( const struct get_volume_info_reply *req )
1856 dump_varargs_bytes( " data=", cur_size );
1859 static void dump_lock_file_request( const struct lock_file_request *req )
1861 fprintf( stderr, " handle=%04x", req->handle );
1862 dump_uint64( ", offset=", &req->offset );
1863 dump_uint64( ", count=", &req->count );
1864 fprintf( stderr, ", shared=%d", req->shared );
1865 fprintf( stderr, ", wait=%d", req->wait );
1868 static void dump_lock_file_reply( const struct lock_file_reply *req )
1870 fprintf( stderr, " handle=%04x", req->handle );
1871 fprintf( stderr, ", overlapped=%d", req->overlapped );
1874 static void dump_unlock_file_request( const struct unlock_file_request *req )
1876 fprintf( stderr, " handle=%04x", req->handle );
1877 dump_uint64( ", offset=", &req->offset );
1878 dump_uint64( ", count=", &req->count );
1881 static void dump_create_socket_request( const struct create_socket_request *req )
1883 fprintf( stderr, " access=%08x", req->access );
1884 fprintf( stderr, ", attributes=%08x", req->attributes );
1885 fprintf( stderr, ", family=%d", req->family );
1886 fprintf( stderr, ", type=%d", req->type );
1887 fprintf( stderr, ", protocol=%d", req->protocol );
1888 fprintf( stderr, ", flags=%08x", req->flags );
1891 static void dump_create_socket_reply( const struct create_socket_reply *req )
1893 fprintf( stderr, " handle=%04x", req->handle );
1896 static void dump_accept_socket_request( const struct accept_socket_request *req )
1898 fprintf( stderr, " lhandle=%04x", req->lhandle );
1899 fprintf( stderr, ", access=%08x", req->access );
1900 fprintf( stderr, ", attributes=%08x", req->attributes );
1903 static void dump_accept_socket_reply( const struct accept_socket_reply *req )
1905 fprintf( stderr, " handle=%04x", req->handle );
1908 static void dump_accept_into_socket_request( const struct accept_into_socket_request *req )
1910 fprintf( stderr, " lhandle=%04x", req->lhandle );
1911 fprintf( stderr, ", ahandle=%04x", req->ahandle );
1914 static void dump_set_socket_event_request( const struct set_socket_event_request *req )
1916 fprintf( stderr, " handle=%04x", req->handle );
1917 fprintf( stderr, ", mask=%08x", req->mask );
1918 fprintf( stderr, ", event=%04x", req->event );
1919 fprintf( stderr, ", window=%08x", req->window );
1920 fprintf( stderr, ", msg=%08x", req->msg );
1923 static void dump_get_socket_event_request( const struct get_socket_event_request *req )
1925 fprintf( stderr, " handle=%04x", req->handle );
1926 fprintf( stderr, ", service=%d", req->service );
1927 fprintf( stderr, ", c_event=%04x", req->c_event );
1930 static void dump_get_socket_event_reply( const struct get_socket_event_reply *req )
1932 fprintf( stderr, " mask=%08x", req->mask );
1933 fprintf( stderr, ", pmask=%08x", req->pmask );
1934 fprintf( stderr, ", state=%08x", req->state );
1935 dump_varargs_ints( ", errors=", cur_size );
1938 static void dump_get_socket_info_request( const struct get_socket_info_request *req )
1940 fprintf( stderr, " handle=%04x", req->handle );
1943 static void dump_get_socket_info_reply( const struct get_socket_info_reply *req )
1945 fprintf( stderr, " family=%d", req->family );
1946 fprintf( stderr, ", type=%d", req->type );
1947 fprintf( stderr, ", protocol=%d", req->protocol );
1950 static void dump_enable_socket_event_request( const struct enable_socket_event_request *req )
1952 fprintf( stderr, " handle=%04x", req->handle );
1953 fprintf( stderr, ", mask=%08x", req->mask );
1954 fprintf( stderr, ", sstate=%08x", req->sstate );
1955 fprintf( stderr, ", cstate=%08x", req->cstate );
1958 static void dump_set_socket_deferred_request( const struct set_socket_deferred_request *req )
1960 fprintf( stderr, " handle=%04x", req->handle );
1961 fprintf( stderr, ", deferred=%04x", req->deferred );
1964 static void dump_alloc_console_request( const struct alloc_console_request *req )
1966 fprintf( stderr, " access=%08x", req->access );
1967 fprintf( stderr, ", attributes=%08x", req->attributes );
1968 fprintf( stderr, ", pid=%04x", req->pid );
1969 fprintf( stderr, ", input_fd=%d", req->input_fd );
1972 static void dump_alloc_console_reply( const struct alloc_console_reply *req )
1974 fprintf( stderr, " handle_in=%04x", req->handle_in );
1975 fprintf( stderr, ", event=%04x", req->event );
1978 static void dump_free_console_request( const struct free_console_request *req )
1982 static void dump_get_console_renderer_events_request( const struct get_console_renderer_events_request *req )
1984 fprintf( stderr, " handle=%04x", req->handle );
1987 static void dump_get_console_renderer_events_reply( const struct get_console_renderer_events_reply *req )
1989 dump_varargs_bytes( " data=", cur_size );
1992 static void dump_open_console_request( const struct open_console_request *req )
1994 fprintf( stderr, " from=%04x", req->from );
1995 fprintf( stderr, ", access=%08x", req->access );
1996 fprintf( stderr, ", attributes=%08x", req->attributes );
1997 fprintf( stderr, ", share=%d", req->share );
2000 static void dump_open_console_reply( const struct open_console_reply *req )
2002 fprintf( stderr, " handle=%04x", req->handle );
2005 static void dump_attach_console_request( const struct attach_console_request *req )
2007 fprintf( stderr, " pid=%04x", req->pid );
2010 static void dump_attach_console_reply( const struct attach_console_reply *req )
2012 fprintf( stderr, " std_in=%04x", req->std_in );
2013 fprintf( stderr, ", std_out=%04x", req->std_out );
2014 fprintf( stderr, ", std_err=%04x", req->std_err );
2017 static void dump_get_console_wait_event_request( const struct get_console_wait_event_request *req )
2021 static void dump_get_console_wait_event_reply( const struct get_console_wait_event_reply *req )
2023 fprintf( stderr, " handle=%04x", req->handle );
2026 static void dump_get_console_mode_request( const struct get_console_mode_request *req )
2028 fprintf( stderr, " handle=%04x", req->handle );
2031 static void dump_get_console_mode_reply( const struct get_console_mode_reply *req )
2033 fprintf( stderr, " mode=%d", req->mode );
2036 static void dump_set_console_mode_request( const struct set_console_mode_request *req )
2038 fprintf( stderr, " handle=%04x", req->handle );
2039 fprintf( stderr, ", mode=%d", req->mode );
2042 static void dump_set_console_input_info_request( const struct set_console_input_info_request *req )
2044 fprintf( stderr, " handle=%04x", req->handle );
2045 fprintf( stderr, ", mask=%d", req->mask );
2046 fprintf( stderr, ", active_sb=%04x", req->active_sb );
2047 fprintf( stderr, ", history_mode=%d", req->history_mode );
2048 fprintf( stderr, ", history_size=%d", req->history_size );
2049 fprintf( stderr, ", edition_mode=%d", req->edition_mode );
2050 fprintf( stderr, ", input_cp=%d", req->input_cp );
2051 fprintf( stderr, ", output_cp=%d", req->output_cp );
2052 fprintf( stderr, ", win=%08x", req->win );
2053 dump_varargs_unicode_str( ", title=", cur_size );
2056 static void dump_get_console_input_info_request( const struct get_console_input_info_request *req )
2058 fprintf( stderr, " handle=%04x", req->handle );
2061 static void dump_get_console_input_info_reply( const struct get_console_input_info_reply *req )
2063 fprintf( stderr, " history_mode=%d", req->history_mode );
2064 fprintf( stderr, ", history_size=%d", req->history_size );
2065 fprintf( stderr, ", history_index=%d", req->history_index );
2066 fprintf( stderr, ", edition_mode=%d", req->edition_mode );
2067 fprintf( stderr, ", input_cp=%d", req->input_cp );
2068 fprintf( stderr, ", output_cp=%d", req->output_cp );
2069 fprintf( stderr, ", win=%08x", req->win );
2070 dump_varargs_unicode_str( ", title=", cur_size );
2073 static void dump_append_console_input_history_request( const struct append_console_input_history_request *req )
2075 fprintf( stderr, " handle=%04x", req->handle );
2076 dump_varargs_unicode_str( ", line=", cur_size );
2079 static void dump_get_console_input_history_request( const struct get_console_input_history_request *req )
2081 fprintf( stderr, " handle=%04x", req->handle );
2082 fprintf( stderr, ", index=%d", req->index );
2085 static void dump_get_console_input_history_reply( const struct get_console_input_history_reply *req )
2087 fprintf( stderr, " total=%d", req->total );
2088 dump_varargs_unicode_str( ", line=", cur_size );
2091 static void dump_create_console_output_request( const struct create_console_output_request *req )
2093 fprintf( stderr, " handle_in=%04x", req->handle_in );
2094 fprintf( stderr, ", access=%08x", req->access );
2095 fprintf( stderr, ", attributes=%08x", req->attributes );
2096 fprintf( stderr, ", share=%08x", req->share );
2097 fprintf( stderr, ", fd=%d", req->fd );
2100 static void dump_create_console_output_reply( const struct create_console_output_reply *req )
2102 fprintf( stderr, " handle_out=%04x", req->handle_out );
2105 static void dump_set_console_output_info_request( const struct set_console_output_info_request *req )
2107 fprintf( stderr, " handle=%04x", req->handle );
2108 fprintf( stderr, ", mask=%d", req->mask );
2109 fprintf( stderr, ", cursor_size=%d", req->cursor_size );
2110 fprintf( stderr, ", cursor_visible=%d", req->cursor_visible );
2111 fprintf( stderr, ", cursor_x=%d", req->cursor_x );
2112 fprintf( stderr, ", cursor_y=%d", req->cursor_y );
2113 fprintf( stderr, ", width=%d", req->width );
2114 fprintf( stderr, ", height=%d", req->height );
2115 fprintf( stderr, ", attr=%d", req->attr );
2116 fprintf( stderr, ", popup_attr=%d", req->popup_attr );
2117 fprintf( stderr, ", win_left=%d", req->win_left );
2118 fprintf( stderr, ", win_top=%d", req->win_top );
2119 fprintf( stderr, ", win_right=%d", req->win_right );
2120 fprintf( stderr, ", win_bottom=%d", req->win_bottom );
2121 fprintf( stderr, ", max_width=%d", req->max_width );
2122 fprintf( stderr, ", max_height=%d", req->max_height );
2123 fprintf( stderr, ", font_width=%d", req->font_width );
2124 fprintf( stderr, ", font_height=%d", req->font_height );
2125 dump_varargs_uints( ", colors=", cur_size );
2128 static void dump_get_console_output_info_request( const struct get_console_output_info_request *req )
2130 fprintf( stderr, " handle=%04x", req->handle );
2133 static void dump_get_console_output_info_reply( const struct get_console_output_info_reply *req )
2135 fprintf( stderr, " cursor_size=%d", req->cursor_size );
2136 fprintf( stderr, ", cursor_visible=%d", req->cursor_visible );
2137 fprintf( stderr, ", cursor_x=%d", req->cursor_x );
2138 fprintf( stderr, ", cursor_y=%d", req->cursor_y );
2139 fprintf( stderr, ", width=%d", req->width );
2140 fprintf( stderr, ", height=%d", req->height );
2141 fprintf( stderr, ", attr=%d", req->attr );
2142 fprintf( stderr, ", popup_attr=%d", req->popup_attr );
2143 fprintf( stderr, ", win_left=%d", req->win_left );
2144 fprintf( stderr, ", win_top=%d", req->win_top );
2145 fprintf( stderr, ", win_right=%d", req->win_right );
2146 fprintf( stderr, ", win_bottom=%d", req->win_bottom );
2147 fprintf( stderr, ", max_width=%d", req->max_width );
2148 fprintf( stderr, ", max_height=%d", req->max_height );
2149 fprintf( stderr, ", font_width=%d", req->font_width );
2150 fprintf( stderr, ", font_height=%d", req->font_height );
2151 dump_varargs_uints( ", colors=", cur_size );
2154 static void dump_write_console_input_request( const struct write_console_input_request *req )
2156 fprintf( stderr, " handle=%04x", req->handle );
2157 dump_varargs_input_records( ", rec=", cur_size );
2160 static void dump_write_console_input_reply( const struct write_console_input_reply *req )
2162 fprintf( stderr, " written=%d", req->written );
2165 static void dump_read_console_input_request( const struct read_console_input_request *req )
2167 fprintf( stderr, " handle=%04x", req->handle );
2168 fprintf( stderr, ", flush=%d", req->flush );
2171 static void dump_read_console_input_reply( const struct read_console_input_reply *req )
2173 fprintf( stderr, " read=%d", req->read );
2174 dump_varargs_input_records( ", rec=", cur_size );
2177 static void dump_write_console_output_request( const struct write_console_output_request *req )
2179 fprintf( stderr, " handle=%04x", req->handle );
2180 fprintf( stderr, ", x=%d", req->x );
2181 fprintf( stderr, ", y=%d", req->y );
2182 fprintf( stderr, ", mode=%d", req->mode );
2183 fprintf( stderr, ", wrap=%d", req->wrap );
2184 dump_varargs_bytes( ", data=", cur_size );
2187 static void dump_write_console_output_reply( const struct write_console_output_reply *req )
2189 fprintf( stderr, " written=%d", req->written );
2190 fprintf( stderr, ", width=%d", req->width );
2191 fprintf( stderr, ", height=%d", req->height );
2194 static void dump_fill_console_output_request( const struct fill_console_output_request *req )
2196 fprintf( stderr, " handle=%04x", req->handle );
2197 fprintf( stderr, ", x=%d", req->x );
2198 fprintf( stderr, ", y=%d", req->y );
2199 fprintf( stderr, ", mode=%d", req->mode );
2200 fprintf( stderr, ", count=%d", req->count );
2201 fprintf( stderr, ", wrap=%d", req->wrap );
2202 dump_char_info( ", data=", &req->data );
2205 static void dump_fill_console_output_reply( const struct fill_console_output_reply *req )
2207 fprintf( stderr, " written=%d", req->written );
2210 static void dump_read_console_output_request( const struct read_console_output_request *req )
2212 fprintf( stderr, " handle=%04x", req->handle );
2213 fprintf( stderr, ", x=%d", req->x );
2214 fprintf( stderr, ", y=%d", req->y );
2215 fprintf( stderr, ", mode=%d", req->mode );
2216 fprintf( stderr, ", wrap=%d", req->wrap );
2219 static void dump_read_console_output_reply( const struct read_console_output_reply *req )
2221 fprintf( stderr, " width=%d", req->width );
2222 fprintf( stderr, ", height=%d", req->height );
2223 dump_varargs_bytes( ", data=", cur_size );
2226 static void dump_move_console_output_request( const struct move_console_output_request *req )
2228 fprintf( stderr, " handle=%04x", req->handle );
2229 fprintf( stderr, ", x_src=%d", req->x_src );
2230 fprintf( stderr, ", y_src=%d", req->y_src );
2231 fprintf( stderr, ", x_dst=%d", req->x_dst );
2232 fprintf( stderr, ", y_dst=%d", req->y_dst );
2233 fprintf( stderr, ", w=%d", req->w );
2234 fprintf( stderr, ", h=%d", req->h );
2237 static void dump_send_console_signal_request( const struct send_console_signal_request *req )
2239 fprintf( stderr, " signal=%d", req->signal );
2240 fprintf( stderr, ", group_id=%04x", req->group_id );
2243 static void dump_read_directory_changes_request( const struct read_directory_changes_request *req )
2245 fprintf( stderr, " filter=%08x", req->filter );
2246 fprintf( stderr, ", subtree=%d", req->subtree );
2247 fprintf( stderr, ", want_data=%d", req->want_data );
2248 dump_async_data( ", async=", &req->async );
2251 static void dump_read_change_request( const struct read_change_request *req )
2253 fprintf( stderr, " handle=%04x", req->handle );
2256 static void dump_read_change_reply( const struct read_change_reply *req )
2258 dump_varargs_filesystem_event( " events=", cur_size );
2261 static void dump_create_mapping_request( const struct create_mapping_request *req )
2263 fprintf( stderr, " access=%08x", req->access );
2264 fprintf( stderr, ", flags=%08x", req->flags );
2265 fprintf( stderr, ", file_access=%08x", req->file_access );
2266 dump_uint64( ", size=", &req->size );
2267 fprintf( stderr, ", file_handle=%04x", req->file_handle );
2268 dump_varargs_object_attributes( ", objattr=", cur_size );
2271 static void dump_create_mapping_reply( const struct create_mapping_reply *req )
2273 fprintf( stderr, " handle=%04x", req->handle );
2276 static void dump_open_mapping_request( const struct open_mapping_request *req )
2278 fprintf( stderr, " access=%08x", req->access );
2279 fprintf( stderr, ", attributes=%08x", req->attributes );
2280 fprintf( stderr, ", rootdir=%04x", req->rootdir );
2281 dump_varargs_unicode_str( ", name=", cur_size );
2284 static void dump_open_mapping_reply( const struct open_mapping_reply *req )
2286 fprintf( stderr, " handle=%04x", req->handle );
2289 static void dump_get_mapping_info_request( const struct get_mapping_info_request *req )
2291 fprintf( stderr, " handle=%04x", req->handle );
2292 fprintf( stderr, ", access=%08x", req->access );
2295 static void dump_get_mapping_info_reply( const struct get_mapping_info_reply *req )
2297 dump_uint64( " size=", &req->size );
2298 fprintf( stderr, ", flags=%08x", req->flags );
2299 fprintf( stderr, ", shared_file=%04x", req->shared_file );
2300 dump_varargs_pe_image_info( ", image=", cur_size );
2303 static void dump_map_view_request( const struct map_view_request *req )
2305 fprintf( stderr, " mapping=%04x", req->mapping );
2306 fprintf( stderr, ", access=%08x", req->access );
2307 dump_uint64( ", base=", &req->base );
2308 dump_uint64( ", size=", &req->size );
2309 dump_uint64( ", start=", &req->start );
2312 static void dump_unmap_view_request( const struct unmap_view_request *req )
2314 dump_uint64( " base=", &req->base );
2317 static void dump_get_mapping_committed_range_request( const struct get_mapping_committed_range_request *req )
2319 dump_uint64( " base=", &req->base );
2320 dump_uint64( ", offset=", &req->offset );
2323 static void dump_get_mapping_committed_range_reply( const struct get_mapping_committed_range_reply *req )
2325 dump_uint64( " size=", &req->size );
2326 fprintf( stderr, ", committed=%d", req->committed );
2329 static void dump_add_mapping_committed_range_request( const struct add_mapping_committed_range_request *req )
2331 dump_uint64( " base=", &req->base );
2332 dump_uint64( ", offset=", &req->offset );
2333 dump_uint64( ", size=", &req->size );
2336 static void dump_is_same_mapping_request( const struct is_same_mapping_request *req )
2338 dump_uint64( " base1=", &req->base1 );
2339 dump_uint64( ", base2=", &req->base2 );
2342 static void dump_create_snapshot_request( const struct create_snapshot_request *req )
2344 fprintf( stderr, " attributes=%08x", req->attributes );
2345 fprintf( stderr, ", flags=%08x", req->flags );
2348 static void dump_create_snapshot_reply( const struct create_snapshot_reply *req )
2350 fprintf( stderr, " handle=%04x", req->handle );
2353 static void dump_next_process_request( const struct next_process_request *req )
2355 fprintf( stderr, " handle=%04x", req->handle );
2356 fprintf( stderr, ", reset=%d", req->reset );
2359 static void dump_next_process_reply( const struct next_process_reply *req )
2361 fprintf( stderr, " count=%d", req->count );
2362 fprintf( stderr, ", pid=%04x", req->pid );
2363 fprintf( stderr, ", ppid=%04x", req->ppid );
2364 fprintf( stderr, ", threads=%d", req->threads );
2365 fprintf( stderr, ", priority=%d", req->priority );
2366 fprintf( stderr, ", handles=%d", req->handles );
2367 fprintf( stderr, ", unix_pid=%d", req->unix_pid );
2368 dump_varargs_unicode_str( ", filename=", cur_size );
2371 static void dump_next_thread_request( const struct next_thread_request *req )
2373 fprintf( stderr, " handle=%04x", req->handle );
2374 fprintf( stderr, ", reset=%d", req->reset );
2377 static void dump_next_thread_reply( const struct next_thread_reply *req )
2379 fprintf( stderr, " count=%d", req->count );
2380 fprintf( stderr, ", pid=%04x", req->pid );
2381 fprintf( stderr, ", tid=%04x", req->tid );
2382 fprintf( stderr, ", base_pri=%d", req->base_pri );
2383 fprintf( stderr, ", delta_pri=%d", req->delta_pri );
2386 static void dump_wait_debug_event_request( const struct wait_debug_event_request *req )
2388 fprintf( stderr, " get_handle=%d", req->get_handle );
2391 static void dump_wait_debug_event_reply( const struct wait_debug_event_reply *req )
2393 fprintf( stderr, " pid=%04x", req->pid );
2394 fprintf( stderr, ", tid=%04x", req->tid );
2395 fprintf( stderr, ", wait=%04x", req->wait );
2396 dump_varargs_debug_event( ", event=", cur_size );
2399 static void dump_queue_exception_event_request( const struct queue_exception_event_request *req )
2401 fprintf( stderr, " first=%d", req->first );
2402 fprintf( stderr, ", code=%08x", req->code );
2403 fprintf( stderr, ", flags=%08x", req->flags );
2404 dump_uint64( ", record=", &req->record );
2405 dump_uint64( ", address=", &req->address );
2406 fprintf( stderr, ", len=%u", req->len );
2407 dump_varargs_uints64( ", params=", min(cur_size,req->len) );
2408 dump_varargs_context( ", context=", cur_size );
2411 static void dump_queue_exception_event_reply( const struct queue_exception_event_reply *req )
2413 fprintf( stderr, " handle=%04x", req->handle );
2416 static void dump_get_exception_status_request( const struct get_exception_status_request *req )
2418 fprintf( stderr, " handle=%04x", req->handle );
2421 static void dump_get_exception_status_reply( const struct get_exception_status_reply *req )
2423 dump_varargs_context( " context=", cur_size );
2426 static void dump_continue_debug_event_request( const struct continue_debug_event_request *req )
2428 fprintf( stderr, " pid=%04x", req->pid );
2429 fprintf( stderr, ", tid=%04x", req->tid );
2430 fprintf( stderr, ", status=%d", req->status );
2433 static void dump_debug_process_request( const struct debug_process_request *req )
2435 fprintf( stderr, " pid=%04x", req->pid );
2436 fprintf( stderr, ", attach=%d", req->attach );
2439 static void dump_debug_break_request( const struct debug_break_request *req )
2441 fprintf( stderr, " handle=%04x", req->handle );
2444 static void dump_debug_break_reply( const struct debug_break_reply *req )
2446 fprintf( stderr, " self=%d", req->self );
2449 static void dump_set_debugger_kill_on_exit_request( const struct set_debugger_kill_on_exit_request *req )
2451 fprintf( stderr, " kill_on_exit=%d", req->kill_on_exit );
2454 static void dump_read_process_memory_request( const struct read_process_memory_request *req )
2456 fprintf( stderr, " handle=%04x", req->handle );
2457 dump_uint64( ", addr=", &req->addr );
2460 static void dump_read_process_memory_reply( const struct read_process_memory_reply *req )
2462 dump_varargs_bytes( " data=", cur_size );
2465 static void dump_write_process_memory_request( const struct write_process_memory_request *req )
2467 fprintf( stderr, " handle=%04x", req->handle );
2468 dump_uint64( ", addr=", &req->addr );
2469 dump_varargs_bytes( ", data=", cur_size );
2472 static void dump_create_key_request( const struct create_key_request *req )
2474 fprintf( stderr, " access=%08x", req->access );
2475 fprintf( stderr, ", options=%08x", req->options );
2476 dump_varargs_object_attributes( ", objattr=", cur_size );
2477 dump_varargs_unicode_str( ", class=", cur_size );
2480 static void dump_create_key_reply( const struct create_key_reply *req )
2482 fprintf( stderr, " hkey=%04x", req->hkey );
2483 fprintf( stderr, ", created=%d", req->created );
2486 static void dump_open_key_request( const struct open_key_request *req )
2488 fprintf( stderr, " parent=%04x", req->parent );
2489 fprintf( stderr, ", access=%08x", req->access );
2490 fprintf( stderr, ", attributes=%08x", req->attributes );
2491 dump_varargs_unicode_str( ", name=", cur_size );
2494 static void dump_open_key_reply( const struct open_key_reply *req )
2496 fprintf( stderr, " hkey=%04x", req->hkey );
2499 static void dump_delete_key_request( const struct delete_key_request *req )
2501 fprintf( stderr, " hkey=%04x", req->hkey );
2504 static void dump_flush_key_request( const struct flush_key_request *req )
2506 fprintf( stderr, " hkey=%04x", req->hkey );
2509 static void dump_enum_key_request( const struct enum_key_request *req )
2511 fprintf( stderr, " hkey=%04x", req->hkey );
2512 fprintf( stderr, ", index=%d", req->index );
2513 fprintf( stderr, ", info_class=%d", req->info_class );
2516 static void dump_enum_key_reply( const struct enum_key_reply *req )
2518 fprintf( stderr, " subkeys=%d", req->subkeys );
2519 fprintf( stderr, ", max_subkey=%d", req->max_subkey );
2520 fprintf( stderr, ", max_class=%d", req->max_class );
2521 fprintf( stderr, ", values=%d", req->values );
2522 fprintf( stderr, ", max_value=%d", req->max_value );
2523 fprintf( stderr, ", max_data=%d", req->max_data );
2524 dump_timeout( ", modif=", &req->modif );
2525 fprintf( stderr, ", total=%u", req->total );
2526 fprintf( stderr, ", namelen=%u", req->namelen );
2527 dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
2528 dump_varargs_unicode_str( ", class=", cur_size );
2531 static void dump_set_key_value_request( const struct set_key_value_request *req )
2533 fprintf( stderr, " hkey=%04x", req->hkey );
2534 fprintf( stderr, ", type=%d", req->type );
2535 fprintf( stderr, ", namelen=%u", req->namelen );
2536 dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
2537 dump_varargs_bytes( ", data=", cur_size );
2540 static void dump_get_key_value_request( const struct get_key_value_request *req )
2542 fprintf( stderr, " hkey=%04x", req->hkey );
2543 dump_varargs_unicode_str( ", name=", cur_size );
2546 static void dump_get_key_value_reply( const struct get_key_value_reply *req )
2548 fprintf( stderr, " type=%d", req->type );
2549 fprintf( stderr, ", total=%u", req->total );
2550 dump_varargs_bytes( ", data=", cur_size );
2553 static void dump_enum_key_value_request( const struct enum_key_value_request *req )
2555 fprintf( stderr, " hkey=%04x", req->hkey );
2556 fprintf( stderr, ", index=%d", req->index );
2557 fprintf( stderr, ", info_class=%d", req->info_class );
2560 static void dump_enum_key_value_reply( const struct enum_key_value_reply *req )
2562 fprintf( stderr, " type=%d", req->type );
2563 fprintf( stderr, ", total=%u", req->total );
2564 fprintf( stderr, ", namelen=%u", req->namelen );
2565 dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
2566 dump_varargs_bytes( ", data=", cur_size );
2569 static void dump_delete_key_value_request( const struct delete_key_value_request *req )
2571 fprintf( stderr, " hkey=%04x", req->hkey );
2572 dump_varargs_unicode_str( ", name=", cur_size );
2575 static void dump_load_registry_request( const struct load_registry_request *req )
2577 fprintf( stderr, " file=%04x", req->file );
2578 dump_varargs_object_attributes( ", objattr=", cur_size );
2581 static void dump_unload_registry_request( const struct unload_registry_request *req )
2583 fprintf( stderr, " hkey=%04x", req->hkey );
2586 static void dump_save_registry_request( const struct save_registry_request *req )
2588 fprintf( stderr, " hkey=%04x", req->hkey );
2589 fprintf( stderr, ", file=%04x", req->file );
2592 static void dump_set_registry_notification_request( const struct set_registry_notification_request *req )
2594 fprintf( stderr, " hkey=%04x", req->hkey );
2595 fprintf( stderr, ", event=%04x", req->event );
2596 fprintf( stderr, ", subtree=%d", req->subtree );
2597 fprintf( stderr, ", filter=%08x", req->filter );
2600 static void dump_create_timer_request( const struct create_timer_request *req )
2602 fprintf( stderr, " access=%08x", req->access );
2603 fprintf( stderr, ", manual=%d", req->manual );
2604 dump_varargs_object_attributes( ", objattr=", cur_size );
2607 static void dump_create_timer_reply( const struct create_timer_reply *req )
2609 fprintf( stderr, " handle=%04x", req->handle );
2612 static void dump_open_timer_request( const struct open_timer_request *req )
2614 fprintf( stderr, " access=%08x", req->access );
2615 fprintf( stderr, ", attributes=%08x", req->attributes );
2616 fprintf( stderr, ", rootdir=%04x", req->rootdir );
2617 dump_varargs_unicode_str( ", name=", cur_size );
2620 static void dump_open_timer_reply( const struct open_timer_reply *req )
2622 fprintf( stderr, " handle=%04x", req->handle );
2625 static void dump_set_timer_request( const struct set_timer_request *req )
2627 fprintf( stderr, " handle=%04x", req->handle );
2628 dump_timeout( ", expire=", &req->expire );
2629 dump_uint64( ", callback=", &req->callback );
2630 dump_uint64( ", arg=", &req->arg );
2631 fprintf( stderr, ", period=%d", req->period );
2634 static void dump_set_timer_reply( const struct set_timer_reply *req )
2636 fprintf( stderr, " signaled=%d", req->signaled );
2639 static void dump_cancel_timer_request( const struct cancel_timer_request *req )
2641 fprintf( stderr, " handle=%04x", req->handle );
2644 static void dump_cancel_timer_reply( const struct cancel_timer_reply *req )
2646 fprintf( stderr, " signaled=%d", req->signaled );
2649 static void dump_get_timer_info_request( const struct get_timer_info_request *req )
2651 fprintf( stderr, " handle=%04x", req->handle );
2654 static void dump_get_timer_info_reply( const struct get_timer_info_reply *req )
2656 dump_timeout( " when=", &req->when );
2657 fprintf( stderr, ", signaled=%d", req->signaled );
2660 static void dump_get_thread_context_request( const struct get_thread_context_request *req )
2662 fprintf( stderr, " handle=%04x", req->handle );
2663 fprintf( stderr, ", flags=%08x", req->flags );
2664 fprintf( stderr, ", suspend=%d", req->suspend );
2667 static void dump_get_thread_context_reply( const struct get_thread_context_reply *req )
2669 fprintf( stderr, " self=%d", req->self );
2670 dump_varargs_context( ", context=", cur_size );
2673 static void dump_set_thread_context_request( const struct set_thread_context_request *req )
2675 fprintf( stderr, " handle=%04x", req->handle );
2676 fprintf( stderr, ", suspend=%d", req->suspend );
2677 dump_varargs_context( ", context=", cur_size );
2680 static void dump_set_thread_context_reply( const struct set_thread_context_reply *req )
2682 fprintf( stderr, " self=%d", req->self );
2685 static void dump_get_selector_entry_request( const struct get_selector_entry_request *req )
2687 fprintf( stderr, " handle=%04x", req->handle );
2688 fprintf( stderr, ", entry=%d", req->entry );
2691 static void dump_get_selector_entry_reply( const struct get_selector_entry_reply *req )
2693 fprintf( stderr, " base=%08x", req->base );
2694 fprintf( stderr, ", limit=%08x", req->limit );
2695 fprintf( stderr, ", flags=%02x", req->flags );
2698 static void dump_add_atom_request( const struct add_atom_request *req )
2700 fprintf( stderr, " table=%04x", req->table );
2701 dump_varargs_unicode_str( ", name=", cur_size );
2704 static void dump_add_atom_reply( const struct add_atom_reply *req )
2706 fprintf( stderr, " atom=%04x", req->atom );
2709 static void dump_delete_atom_request( const struct delete_atom_request *req )
2711 fprintf( stderr, " table=%04x", req->table );
2712 fprintf( stderr, ", atom=%04x", req->atom );
2715 static void dump_find_atom_request( const struct find_atom_request *req )
2717 fprintf( stderr, " table=%04x", req->table );
2718 dump_varargs_unicode_str( ", name=", cur_size );
2721 static void dump_find_atom_reply( const struct find_atom_reply *req )
2723 fprintf( stderr, " atom=%04x", req->atom );
2726 static void dump_get_atom_information_request( const struct get_atom_information_request *req )
2728 fprintf( stderr, " table=%04x", req->table );
2729 fprintf( stderr, ", atom=%04x", req->atom );
2732 static void dump_get_atom_information_reply( const struct get_atom_information_reply *req )
2734 fprintf( stderr, " count=%d", req->count );
2735 fprintf( stderr, ", pinned=%d", req->pinned );
2736 fprintf( stderr, ", total=%u", req->total );
2737 dump_varargs_unicode_str( ", name=", cur_size );
2740 static void dump_set_atom_information_request( const struct set_atom_information_request *req )
2742 fprintf( stderr, " table=%04x", req->table );
2743 fprintf( stderr, ", atom=%04x", req->atom );
2744 fprintf( stderr, ", pinned=%d", req->pinned );
2747 static void dump_empty_atom_table_request( const struct empty_atom_table_request *req )
2749 fprintf( stderr, " table=%04x", req->table );
2750 fprintf( stderr, ", if_pinned=%d", req->if_pinned );
2753 static void dump_init_atom_table_request( const struct init_atom_table_request *req )
2755 fprintf( stderr, " entries=%d", req->entries );
2758 static void dump_init_atom_table_reply( const struct init_atom_table_reply *req )
2760 fprintf( stderr, " table=%04x", req->table );
2763 static void dump_get_msg_queue_request( const struct get_msg_queue_request *req )
2767 static void dump_get_msg_queue_reply( const struct get_msg_queue_reply *req )
2769 fprintf( stderr, " handle=%04x", req->handle );
2772 static void dump_set_queue_fd_request( const struct set_queue_fd_request *req )
2774 fprintf( stderr, " handle=%04x", req->handle );
2777 static void dump_set_queue_mask_request( const struct set_queue_mask_request *req )
2779 fprintf( stderr, " wake_mask=%08x", req->wake_mask );
2780 fprintf( stderr, ", changed_mask=%08x", req->changed_mask );
2781 fprintf( stderr, ", skip_wait=%d", req->skip_wait );
2784 static void dump_set_queue_mask_reply( const struct set_queue_mask_reply *req )
2786 fprintf( stderr, " wake_bits=%08x", req->wake_bits );
2787 fprintf( stderr, ", changed_bits=%08x", req->changed_bits );
2790 static void dump_get_queue_status_request( const struct get_queue_status_request *req )
2792 fprintf( stderr, " clear_bits=%08x", req->clear_bits );
2795 static void dump_get_queue_status_reply( const struct get_queue_status_reply *req )
2797 fprintf( stderr, " wake_bits=%08x", req->wake_bits );
2798 fprintf( stderr, ", changed_bits=%08x", req->changed_bits );
2801 static void dump_get_process_idle_event_request( const struct get_process_idle_event_request *req )
2803 fprintf( stderr, " handle=%04x", req->handle );
2806 static void dump_get_process_idle_event_reply( const struct get_process_idle_event_reply *req )
2808 fprintf( stderr, " event=%04x", req->event );
2811 static void dump_send_message_request( const struct send_message_request *req )
2813 fprintf( stderr, " id=%04x", req->id );
2814 fprintf( stderr, ", type=%d", req->type );
2815 fprintf( stderr, ", flags=%d", req->flags );
2816 fprintf( stderr, ", win=%08x", req->win );
2817 fprintf( stderr, ", msg=%08x", req->msg );
2818 dump_uint64( ", wparam=", &req->wparam );
2819 dump_uint64( ", lparam=", &req->lparam );
2820 dump_timeout( ", timeout=", &req->timeout );
2821 dump_varargs_message_data( ", data=", cur_size );
2824 static void dump_post_quit_message_request( const struct post_quit_message_request *req )
2826 fprintf( stderr, " exit_code=%d", req->exit_code );
2829 static void dump_send_hardware_message_request( const struct send_hardware_message_request *req )
2831 fprintf( stderr, " win=%08x", req->win );
2832 dump_hw_input( ", input=", &req->input );
2833 fprintf( stderr, ", flags=%08x", req->flags );
2836 static void dump_send_hardware_message_reply( const struct send_hardware_message_reply *req )
2838 fprintf( stderr, " wait=%d", req->wait );
2839 fprintf( stderr, ", prev_x=%d", req->prev_x );
2840 fprintf( stderr, ", prev_y=%d", req->prev_y );
2841 fprintf( stderr, ", new_x=%d", req->new_x );
2842 fprintf( stderr, ", new_y=%d", req->new_y );
2843 dump_varargs_bytes( ", keystate=", cur_size );
2846 static void dump_get_message_request( const struct get_message_request *req )
2848 fprintf( stderr, " flags=%08x", req->flags );
2849 fprintf( stderr, ", get_win=%08x", req->get_win );
2850 fprintf( stderr, ", get_first=%08x", req->get_first );
2851 fprintf( stderr, ", get_last=%08x", req->get_last );
2852 fprintf( stderr, ", hw_id=%08x", req->hw_id );
2853 fprintf( stderr, ", wake_mask=%08x", req->wake_mask );
2854 fprintf( stderr, ", changed_mask=%08x", req->changed_mask );
2857 static void dump_get_message_reply( const struct get_message_reply *req )
2859 fprintf( stderr, " win=%08x", req->win );
2860 fprintf( stderr, ", msg=%08x", req->msg );
2861 dump_uint64( ", wparam=", &req->wparam );
2862 dump_uint64( ", lparam=", &req->lparam );
2863 fprintf( stderr, ", type=%d", req->type );
2864 fprintf( stderr, ", x=%d", req->x );
2865 fprintf( stderr, ", y=%d", req->y );
2866 fprintf( stderr, ", time=%08x", req->time );
2867 fprintf( stderr, ", active_hooks=%08x", req->active_hooks );
2868 fprintf( stderr, ", total=%u", req->total );
2869 dump_varargs_message_data( ", data=", cur_size );
2872 static void dump_reply_message_request( const struct reply_message_request *req )
2874 fprintf( stderr, " remove=%d", req->remove );
2875 dump_uint64( ", result=", &req->result );
2876 dump_varargs_bytes( ", data=", cur_size );
2879 static void dump_accept_hardware_message_request( const struct accept_hardware_message_request *req )
2881 fprintf( stderr, " hw_id=%08x", req->hw_id );
2882 fprintf( stderr, ", remove=%d", req->remove );
2885 static void dump_get_message_reply_request( const struct get_message_reply_request *req )
2887 fprintf( stderr, " cancel=%d", req->cancel );
2890 static void dump_get_message_reply_reply( const struct get_message_reply_reply *req )
2892 dump_uint64( " result=", &req->result );
2893 dump_varargs_bytes( ", data=", cur_size );
2896 static void dump_set_win_timer_request( const struct set_win_timer_request *req )
2898 fprintf( stderr, " win=%08x", req->win );
2899 fprintf( stderr, ", msg=%08x", req->msg );
2900 fprintf( stderr, ", rate=%08x", req->rate );
2901 dump_uint64( ", id=", &req->id );
2902 dump_uint64( ", lparam=", &req->lparam );
2905 static void dump_set_win_timer_reply( const struct set_win_timer_reply *req )
2907 dump_uint64( " id=", &req->id );
2910 static void dump_kill_win_timer_request( const struct kill_win_timer_request *req )
2912 fprintf( stderr, " win=%08x", req->win );
2913 dump_uint64( ", id=", &req->id );
2914 fprintf( stderr, ", msg=%08x", req->msg );
2917 static void dump_is_window_hung_request( const struct is_window_hung_request *req )
2919 fprintf( stderr, " win=%08x", req->win );
2922 static void dump_is_window_hung_reply( const struct is_window_hung_reply *req )
2924 fprintf( stderr, " is_hung=%d", req->is_hung );
2927 static void dump_get_serial_info_request( const struct get_serial_info_request *req )
2929 fprintf( stderr, " handle=%04x", req->handle );
2930 fprintf( stderr, ", flags=%d", req->flags );
2933 static void dump_get_serial_info_reply( const struct get_serial_info_reply *req )
2935 fprintf( stderr, " eventmask=%08x", req->eventmask );
2936 fprintf( stderr, ", cookie=%08x", req->cookie );
2937 fprintf( stderr, ", pending_write=%08x", req->pending_write );
2940 static void dump_set_serial_info_request( const struct set_serial_info_request *req )
2942 fprintf( stderr, " handle=%04x", req->handle );
2943 fprintf( stderr, ", flags=%d", req->flags );
2946 static void dump_register_async_request( const struct register_async_request *req )
2948 fprintf( stderr, " type=%d", req->type );
2949 dump_async_data( ", async=", &req->async );
2950 fprintf( stderr, ", count=%d", req->count );
2953 static void dump_cancel_async_request( const struct cancel_async_request *req )
2955 fprintf( stderr, " handle=%04x", req->handle );
2956 dump_uint64( ", iosb=", &req->iosb );
2957 fprintf( stderr, ", only_thread=%d", req->only_thread );
2960 static void dump_get_async_result_request( const struct get_async_result_request *req )
2962 dump_uint64( " user_arg=", &req->user_arg );
2965 static void dump_get_async_result_reply( const struct get_async_result_reply *req )
2967 fprintf( stderr, " size=%u", req->size );
2968 dump_varargs_bytes( ", out_data=", cur_size );
2971 static void dump_read_request( const struct read_request *req )
2973 dump_async_data( " async=", &req->async );
2974 dump_uint64( ", pos=", &req->pos );
2977 static void dump_read_reply( const struct read_reply *req )
2979 fprintf( stderr, " wait=%04x", req->wait );
2980 fprintf( stderr, ", options=%08x", req->options );
2981 dump_varargs_bytes( ", data=", cur_size );
2984 static void dump_write_request( const struct write_request *req )
2986 dump_async_data( " async=", &req->async );
2987 dump_uint64( ", pos=", &req->pos );
2988 dump_varargs_bytes( ", data=", cur_size );
2991 static void dump_write_reply( const struct write_reply *req )
2993 fprintf( stderr, " wait=%04x", req->wait );
2994 fprintf( stderr, ", options=%08x", req->options );
2995 fprintf( stderr, ", size=%u", req->size );
2998 static void dump_ioctl_request( const struct ioctl_request *req )
3000 dump_ioctl_code( " code=", &req->code );
3001 dump_async_data( ", async=", &req->async );
3002 dump_varargs_bytes( ", in_data=", cur_size );
3005 static void dump_ioctl_reply( const struct ioctl_reply *req )
3007 fprintf( stderr, " wait=%04x", req->wait );
3008 fprintf( stderr, ", options=%08x", req->options );
3009 dump_varargs_bytes( ", out_data=", cur_size );
3012 static void dump_set_irp_result_request( const struct set_irp_result_request *req )
3014 fprintf( stderr, " handle=%04x", req->handle );
3015 fprintf( stderr, ", status=%08x", req->status );
3016 fprintf( stderr, ", size=%u", req->size );
3017 dump_varargs_bytes( ", data=", cur_size );
3020 static void dump_create_named_pipe_request( const struct create_named_pipe_request *req )
3022 fprintf( stderr, " access=%08x", req->access );
3023 fprintf( stderr, ", options=%08x", req->options );
3024 fprintf( stderr, ", sharing=%08x", req->sharing );
3025 fprintf( stderr, ", maxinstances=%08x", req->maxinstances );
3026 fprintf( stderr, ", outsize=%08x", req->outsize );
3027 fprintf( stderr, ", insize=%08x", req->insize );
3028 dump_timeout( ", timeout=", &req->timeout );
3029 fprintf( stderr, ", flags=%08x", req->flags );
3030 dump_varargs_object_attributes( ", objattr=", cur_size );
3033 static void dump_create_named_pipe_reply( const struct create_named_pipe_reply *req )
3035 fprintf( stderr, " handle=%04x", req->handle );
3038 static void dump_set_named_pipe_info_request( const struct set_named_pipe_info_request *req )
3040 fprintf( stderr, " handle=%04x", req->handle );
3041 fprintf( stderr, ", flags=%08x", req->flags );
3044 static void dump_create_window_request( const struct create_window_request *req )
3046 fprintf( stderr, " parent=%08x", req->parent );
3047 fprintf( stderr, ", owner=%08x", req->owner );
3048 fprintf( stderr, ", atom=%04x", req->atom );
3049 dump_uint64( ", instance=", &req->instance );
3050 fprintf( stderr, ", dpi=%d", req->dpi );
3051 fprintf( stderr, ", awareness=%d", req->awareness );
3052 dump_varargs_unicode_str( ", class=", cur_size );
3055 static void dump_create_window_reply( const struct create_window_reply *req )
3057 fprintf( stderr, " handle=%08x", req->handle );
3058 fprintf( stderr, ", parent=%08x", req->parent );
3059 fprintf( stderr, ", owner=%08x", req->owner );
3060 fprintf( stderr, ", extra=%d", req->extra );
3061 dump_uint64( ", class_ptr=", &req->class_ptr );
3062 fprintf( stderr, ", dpi=%d", req->dpi );
3063 fprintf( stderr, ", awareness=%d", req->awareness );
3066 static void dump_destroy_window_request( const struct destroy_window_request *req )
3068 fprintf( stderr, " handle=%08x", req->handle );
3071 static void dump_get_desktop_window_request( const struct get_desktop_window_request *req )
3073 fprintf( stderr, " force=%d", req->force );
3076 static void dump_get_desktop_window_reply( const struct get_desktop_window_reply *req )
3078 fprintf( stderr, " top_window=%08x", req->top_window );
3079 fprintf( stderr, ", msg_window=%08x", req->msg_window );
3082 static void dump_set_window_owner_request( const struct set_window_owner_request *req )
3084 fprintf( stderr, " handle=%08x", req->handle );
3085 fprintf( stderr, ", owner=%08x", req->owner );
3088 static void dump_set_window_owner_reply( const struct set_window_owner_reply *req )
3090 fprintf( stderr, " full_owner=%08x", req->full_owner );
3091 fprintf( stderr, ", prev_owner=%08x", req->prev_owner );
3094 static void dump_get_window_info_request( const struct get_window_info_request *req )
3096 fprintf( stderr, " handle=%08x", req->handle );
3099 static void dump_get_window_info_reply( const struct get_window_info_reply *req )
3101 fprintf( stderr, " full_handle=%08x", req->full_handle );
3102 fprintf( stderr, ", last_active=%08x", req->last_active );
3103 fprintf( stderr, ", pid=%04x", req->pid );
3104 fprintf( stderr, ", tid=%04x", req->tid );
3105 fprintf( stderr, ", atom=%04x", req->atom );
3106 fprintf( stderr, ", is_unicode=%d", req->is_unicode );
3107 fprintf( stderr, ", dpi=%d", req->dpi );
3108 fprintf( stderr, ", awareness=%d", req->awareness );
3111 static void dump_set_window_info_request( const struct set_window_info_request *req )
3113 fprintf( stderr, " flags=%04x", req->flags );
3114 fprintf( stderr, ", is_unicode=%d", req->is_unicode );
3115 fprintf( stderr, ", handle=%08x", req->handle );
3116 fprintf( stderr, ", style=%08x", req->style );
3117 fprintf( stderr, ", ex_style=%08x", req->ex_style );
3118 fprintf( stderr, ", id=%08x", req->id );
3119 dump_uint64( ", instance=", &req->instance );
3120 dump_uint64( ", user_data=", &req->user_data );
3121 fprintf( stderr, ", extra_offset=%d", req->extra_offset );
3122 fprintf( stderr, ", extra_size=%u", req->extra_size );
3123 dump_uint64( ", extra_value=", &req->extra_value );
3126 static void dump_set_window_info_reply( const struct set_window_info_reply *req )
3128 fprintf( stderr, " old_style=%08x", req->old_style );
3129 fprintf( stderr, ", old_ex_style=%08x", req->old_ex_style );
3130 dump_uint64( ", old_instance=", &req->old_instance );
3131 dump_uint64( ", old_user_data=", &req->old_user_data );
3132 dump_uint64( ", old_extra_value=", &req->old_extra_value );
3133 fprintf( stderr, ", old_id=%08x", req->old_id );
3136 static void dump_set_parent_request( const struct set_parent_request *req )
3138 fprintf( stderr, " handle=%08x", req->handle );
3139 fprintf( stderr, ", parent=%08x", req->parent );
3142 static void dump_set_parent_reply( const struct set_parent_reply *req )
3144 fprintf( stderr, " old_parent=%08x", req->old_parent );
3145 fprintf( stderr, ", full_parent=%08x", req->full_parent );
3146 fprintf( stderr, ", dpi=%d", req->dpi );
3147 fprintf( stderr, ", awareness=%d", req->awareness );
3150 static void dump_get_window_parents_request( const struct get_window_parents_request *req )
3152 fprintf( stderr, " handle=%08x", req->handle );
3155 static void dump_get_window_parents_reply( const struct get_window_parents_reply *req )
3157 fprintf( stderr, " count=%d", req->count );
3158 dump_varargs_user_handles( ", parents=", cur_size );
3161 static void dump_get_window_children_request( const struct get_window_children_request *req )
3163 fprintf( stderr, " desktop=%04x", req->desktop );
3164 fprintf( stderr, ", parent=%08x", req->parent );
3165 fprintf( stderr, ", atom=%04x", req->atom );
3166 fprintf( stderr, ", tid=%04x", req->tid );
3167 dump_varargs_unicode_str( ", class=", cur_size );
3170 static void dump_get_window_children_reply( const struct get_window_children_reply *req )
3172 fprintf( stderr, " count=%d", req->count );
3173 dump_varargs_user_handles( ", children=", cur_size );
3176 static void dump_get_window_children_from_point_request( const struct get_window_children_from_point_request *req )
3178 fprintf( stderr, " parent=%08x", req->parent );
3179 fprintf( stderr, ", x=%d", req->x );
3180 fprintf( stderr, ", y=%d", req->y );
3181 fprintf( stderr, ", dpi=%d", req->dpi );
3184 static void dump_get_window_children_from_point_reply( const struct get_window_children_from_point_reply *req )
3186 fprintf( stderr, " count=%d", req->count );
3187 dump_varargs_user_handles( ", children=", cur_size );
3190 static void dump_get_window_tree_request( const struct get_window_tree_request *req )
3192 fprintf( stderr, " handle=%08x", req->handle );
3195 static void dump_get_window_tree_reply( const struct get_window_tree_reply *req )
3197 fprintf( stderr, " parent=%08x", req->parent );
3198 fprintf( stderr, ", owner=%08x", req->owner );
3199 fprintf( stderr, ", next_sibling=%08x", req->next_sibling );
3200 fprintf( stderr, ", prev_sibling=%08x", req->prev_sibling );
3201 fprintf( stderr, ", first_sibling=%08x", req->first_sibling );
3202 fprintf( stderr, ", last_sibling=%08x", req->last_sibling );
3203 fprintf( stderr, ", first_child=%08x", req->first_child );
3204 fprintf( stderr, ", last_child=%08x", req->last_child );
3207 static void dump_set_window_pos_request( const struct set_window_pos_request *req )
3209 fprintf( stderr, " swp_flags=%04x", req->swp_flags );
3210 fprintf( stderr, ", paint_flags=%04x", req->paint_flags );
3211 fprintf( stderr, ", handle=%08x", req->handle );
3212 fprintf( stderr, ", previous=%08x", req->previous );
3213 dump_rectangle( ", window=", &req->window );
3214 dump_rectangle( ", client=", &req->client );
3215 dump_varargs_rectangles( ", valid=", cur_size );
3218 static void dump_set_window_pos_reply( const struct set_window_pos_reply *req )
3220 fprintf( stderr, " new_style=%08x", req->new_style );
3221 fprintf( stderr, ", new_ex_style=%08x", req->new_ex_style );
3222 fprintf( stderr, ", surface_win=%08x", req->surface_win );
3223 fprintf( stderr, ", needs_update=%d", req->needs_update );
3226 static void dump_get_window_rectangles_request( const struct get_window_rectangles_request *req )
3228 fprintf( stderr, " handle=%08x", req->handle );
3229 fprintf( stderr, ", relative=%d", req->relative );
3230 fprintf( stderr, ", dpi=%d", req->dpi );
3233 static void dump_get_window_rectangles_reply( const struct get_window_rectangles_reply *req )
3235 dump_rectangle( " window=", &req->window );
3236 dump_rectangle( ", client=", &req->client );
3239 static void dump_get_window_text_request( const struct get_window_text_request *req )
3241 fprintf( stderr, " handle=%08x", req->handle );
3244 static void dump_get_window_text_reply( const struct get_window_text_reply *req )
3246 fprintf( stderr, " length=%u", req->length );
3247 dump_varargs_unicode_str( ", text=", cur_size );
3250 static void dump_set_window_text_request( const struct set_window_text_request *req )
3252 fprintf( stderr, " handle=%08x", req->handle );
3253 dump_varargs_unicode_str( ", text=", cur_size );
3256 static void dump_get_windows_offset_request( const struct get_windows_offset_request *req )
3258 fprintf( stderr, " from=%08x", req->from );
3259 fprintf( stderr, ", to=%08x", req->to );
3260 fprintf( stderr, ", dpi=%d", req->dpi );
3263 static void dump_get_windows_offset_reply( const struct get_windows_offset_reply *req )
3265 fprintf( stderr, " x=%d", req->x );
3266 fprintf( stderr, ", y=%d", req->y );
3267 fprintf( stderr, ", mirror=%d", req->mirror );
3270 static void dump_get_visible_region_request( const struct get_visible_region_request *req )
3272 fprintf( stderr, " window=%08x", req->window );
3273 fprintf( stderr, ", flags=%08x", req->flags );
3276 static void dump_get_visible_region_reply( const struct get_visible_region_reply *req )
3278 fprintf( stderr, " top_win=%08x", req->top_win );
3279 dump_rectangle( ", top_rect=", &req->top_rect );
3280 dump_rectangle( ", win_rect=", &req->win_rect );
3281 fprintf( stderr, ", paint_flags=%08x", req->paint_flags );
3282 fprintf( stderr, ", total_size=%u", req->total_size );
3283 dump_varargs_rectangles( ", region=", cur_size );
3286 static void dump_get_surface_region_request( const struct get_surface_region_request *req )
3288 fprintf( stderr, " window=%08x", req->window );
3291 static void dump_get_surface_region_reply( const struct get_surface_region_reply *req )
3293 dump_rectangle( " visible_rect=", &req->visible_rect );
3294 fprintf( stderr, ", total_size=%u", req->total_size );
3295 dump_varargs_rectangles( ", region=", cur_size );
3298 static void dump_get_window_region_request( const struct get_window_region_request *req )
3300 fprintf( stderr, " window=%08x", req->window );
3303 static void dump_get_window_region_reply( const struct get_window_region_reply *req )
3305 fprintf( stderr, " total_size=%u", req->total_size );
3306 dump_varargs_rectangles( ", region=", cur_size );
3309 static void dump_set_window_region_request( const struct set_window_region_request *req )
3311 fprintf( stderr, " window=%08x", req->window );
3312 fprintf( stderr, ", redraw=%d", req->redraw );
3313 dump_varargs_rectangles( ", region=", cur_size );
3316 static void dump_get_update_region_request( const struct get_update_region_request *req )
3318 fprintf( stderr, " window=%08x", req->window );
3319 fprintf( stderr, ", from_child=%08x", req->from_child );
3320 fprintf( stderr, ", flags=%08x", req->flags );
3323 static void dump_get_update_region_reply( const struct get_update_region_reply *req )
3325 fprintf( stderr, " child=%08x", req->child );
3326 fprintf( stderr, ", flags=%08x", req->flags );
3327 fprintf( stderr, ", total_size=%u", req->total_size );
3328 dump_varargs_rectangles( ", region=", cur_size );
3331 static void dump_update_window_zorder_request( const struct update_window_zorder_request *req )
3333 fprintf( stderr, " window=%08x", req->window );
3334 dump_rectangle( ", rect=", &req->rect );
3337 static void dump_redraw_window_request( const struct redraw_window_request *req )
3339 fprintf( stderr, " window=%08x", req->window );
3340 fprintf( stderr, ", flags=%08x", req->flags );
3341 dump_varargs_rectangles( ", region=", cur_size );
3344 static void dump_set_window_property_request( const struct set_window_property_request *req )
3346 fprintf( stderr, " window=%08x", req->window );
3347 dump_uint64( ", data=", &req->data );
3348 fprintf( stderr, ", atom=%04x", req->atom );
3349 dump_varargs_unicode_str( ", name=", cur_size );
3352 static void dump_remove_window_property_request( const struct remove_window_property_request *req )
3354 fprintf( stderr, " window=%08x", req->window );
3355 fprintf( stderr, ", atom=%04x", req->atom );
3356 dump_varargs_unicode_str( ", name=", cur_size );
3359 static void dump_remove_window_property_reply( const struct remove_window_property_reply *req )
3361 dump_uint64( " data=", &req->data );
3364 static void dump_get_window_property_request( const struct get_window_property_request *req )
3366 fprintf( stderr, " window=%08x", req->window );
3367 fprintf( stderr, ", atom=%04x", req->atom );
3368 dump_varargs_unicode_str( ", name=", cur_size );
3371 static void dump_get_window_property_reply( const struct get_window_property_reply *req )
3373 dump_uint64( " data=", &req->data );
3376 static void dump_get_window_properties_request( const struct get_window_properties_request *req )
3378 fprintf( stderr, " window=%08x", req->window );
3381 static void dump_get_window_properties_reply( const struct get_window_properties_reply *req )
3383 fprintf( stderr, " total=%d", req->total );
3384 dump_varargs_properties( ", props=", cur_size );
3387 static void dump_create_winstation_request( const struct create_winstation_request *req )
3389 fprintf( stderr, " flags=%08x", req->flags );
3390 fprintf( stderr, ", access=%08x", req->access );
3391 fprintf( stderr, ", attributes=%08x", req->attributes );
3392 fprintf( stderr, ", rootdir=%04x", req->rootdir );
3393 dump_varargs_unicode_str( ", name=", cur_size );
3396 static void dump_create_winstation_reply( const struct create_winstation_reply *req )
3398 fprintf( stderr, " handle=%04x", req->handle );
3401 static void dump_open_winstation_request( const struct open_winstation_request *req )
3403 fprintf( stderr, " access=%08x", req->access );
3404 fprintf( stderr, ", attributes=%08x", req->attributes );
3405 fprintf( stderr, ", rootdir=%04x", req->rootdir );
3406 dump_varargs_unicode_str( ", name=", cur_size );
3409 static void dump_open_winstation_reply( const struct open_winstation_reply *req )
3411 fprintf( stderr, " handle=%04x", req->handle );
3414 static void dump_close_winstation_request( const struct close_winstation_request *req )
3416 fprintf( stderr, " handle=%04x", req->handle );
3419 static void dump_get_process_winstation_request( const struct get_process_winstation_request *req )
3423 static void dump_get_process_winstation_reply( const struct get_process_winstation_reply *req )
3425 fprintf( stderr, " handle=%04x", req->handle );
3428 static void dump_set_process_winstation_request( const struct set_process_winstation_request *req )
3430 fprintf( stderr, " handle=%04x", req->handle );
3433 static void dump_enum_winstation_request( const struct enum_winstation_request *req )
3435 fprintf( stderr, " index=%08x", req->index );
3438 static void dump_enum_winstation_reply( const struct enum_winstation_reply *req )
3440 fprintf( stderr, " next=%08x", req->next );
3441 dump_varargs_unicode_str( ", name=", cur_size );
3444 static void dump_create_desktop_request( const struct create_desktop_request *req )
3446 fprintf( stderr, " flags=%08x", req->flags );
3447 fprintf( stderr, ", access=%08x", req->access );
3448 fprintf( stderr, ", attributes=%08x", req->attributes );
3449 dump_varargs_unicode_str( ", name=", cur_size );
3452 static void dump_create_desktop_reply( const struct create_desktop_reply *req )
3454 fprintf( stderr, " handle=%04x", req->handle );
3457 static void dump_open_desktop_request( const struct open_desktop_request *req )
3459 fprintf( stderr, " winsta=%04x", req->winsta );
3460 fprintf( stderr, ", flags=%08x", req->flags );
3461 fprintf( stderr, ", access=%08x", req->access );
3462 fprintf( stderr, ", attributes=%08x", req->attributes );
3463 dump_varargs_unicode_str( ", name=", cur_size );
3466 static void dump_open_desktop_reply( const struct open_desktop_reply *req )
3468 fprintf( stderr, " handle=%04x", req->handle );
3471 static void dump_open_input_desktop_request( const struct open_input_desktop_request *req )
3473 fprintf( stderr, " flags=%08x", req->flags );
3474 fprintf( stderr, ", access=%08x", req->access );
3475 fprintf( stderr, ", attributes=%08x", req->attributes );
3478 static void dump_open_input_desktop_reply( const struct open_input_desktop_reply *req )
3480 fprintf( stderr, " handle=%04x", req->handle );
3483 static void dump_close_desktop_request( const struct close_desktop_request *req )
3485 fprintf( stderr, " handle=%04x", req->handle );
3488 static void dump_get_thread_desktop_request( const struct get_thread_desktop_request *req )
3490 fprintf( stderr, " tid=%04x", req->tid );
3493 static void dump_get_thread_desktop_reply( const struct get_thread_desktop_reply *req )
3495 fprintf( stderr, " handle=%04x", req->handle );
3498 static void dump_set_thread_desktop_request( const struct set_thread_desktop_request *req )
3500 fprintf( stderr, " handle=%04x", req->handle );
3503 static void dump_enum_desktop_request( const struct enum_desktop_request *req )
3505 fprintf( stderr, " winstation=%04x", req->winstation );
3506 fprintf( stderr, ", index=%08x", req->index );
3509 static void dump_enum_desktop_reply( const struct enum_desktop_reply *req )
3511 fprintf( stderr, " next=%08x", req->next );
3512 dump_varargs_unicode_str( ", name=", cur_size );
3515 static void dump_set_user_object_info_request( const struct set_user_object_info_request *req )
3517 fprintf( stderr, " handle=%04x", req->handle );
3518 fprintf( stderr, ", flags=%08x", req->flags );
3519 fprintf( stderr, ", obj_flags=%08x", req->obj_flags );
3522 static void dump_set_user_object_info_reply( const struct set_user_object_info_reply *req )
3524 fprintf( stderr, " is_desktop=%d", req->is_desktop );
3525 fprintf( stderr, ", old_obj_flags=%08x", req->old_obj_flags );
3526 dump_varargs_unicode_str( ", name=", cur_size );
3529 static void dump_register_hotkey_request( const struct register_hotkey_request *req )
3531 fprintf( stderr, " window=%08x", req->window );
3532 fprintf( stderr, ", id=%d", req->id );
3533 fprintf( stderr, ", flags=%08x", req->flags );
3534 fprintf( stderr, ", vkey=%08x", req->vkey );
3537 static void dump_register_hotkey_reply( const struct register_hotkey_reply *req )
3539 fprintf( stderr, " replaced=%d", req->replaced );
3540 fprintf( stderr, ", flags=%08x", req->flags );
3541 fprintf( stderr, ", vkey=%08x", req->vkey );
3544 static void dump_unregister_hotkey_request( const struct unregister_hotkey_request *req )
3546 fprintf( stderr, " window=%08x", req->window );
3547 fprintf( stderr, ", id=%d", req->id );
3550 static void dump_unregister_hotkey_reply( const struct unregister_hotkey_reply *req )
3552 fprintf( stderr, " flags=%08x", req->flags );
3553 fprintf( stderr, ", vkey=%08x", req->vkey );
3556 static void dump_attach_thread_input_request( const struct attach_thread_input_request *req )
3558 fprintf( stderr, " tid_from=%04x", req->tid_from );
3559 fprintf( stderr, ", tid_to=%04x", req->tid_to );
3560 fprintf( stderr, ", attach=%d", req->attach );
3563 static void dump_get_thread_input_request( const struct get_thread_input_request *req )
3565 fprintf( stderr, " tid=%04x", req->tid );
3568 static void dump_get_thread_input_reply( const struct get_thread_input_reply *req )
3570 fprintf( stderr, " focus=%08x", req->focus );
3571 fprintf( stderr, ", capture=%08x", req->capture );
3572 fprintf( stderr, ", active=%08x", req->active );
3573 fprintf( stderr, ", foreground=%08x", req->foreground );
3574 fprintf( stderr, ", menu_owner=%08x", req->menu_owner );
3575 fprintf( stderr, ", move_size=%08x", req->move_size );
3576 fprintf( stderr, ", caret=%08x", req->caret );
3577 fprintf( stderr, ", cursor=%08x", req->cursor );
3578 fprintf( stderr, ", show_count=%d", req->show_count );
3579 dump_rectangle( ", rect=", &req->rect );
3582 static void dump_get_last_input_time_request( const struct get_last_input_time_request *req )
3586 static void dump_get_last_input_time_reply( const struct get_last_input_time_reply *req )
3588 fprintf( stderr, " time=%08x", req->time );
3591 static void dump_get_key_state_request( const struct get_key_state_request *req )
3593 fprintf( stderr, " tid=%04x", req->tid );
3594 fprintf( stderr, ", key=%d", req->key );
3597 static void dump_get_key_state_reply( const struct get_key_state_reply *req )
3599 fprintf( stderr, " state=%02x", req->state );
3600 dump_varargs_bytes( ", keystate=", cur_size );
3603 static void dump_set_key_state_request( const struct set_key_state_request *req )
3605 fprintf( stderr, " tid=%04x", req->tid );
3606 fprintf( stderr, ", async=%d", req->async );
3607 dump_varargs_bytes( ", keystate=", cur_size );
3610 static void dump_set_foreground_window_request( const struct set_foreground_window_request *req )
3612 fprintf( stderr, " handle=%08x", req->handle );
3615 static void dump_set_foreground_window_reply( const struct set_foreground_window_reply *req )
3617 fprintf( stderr, " previous=%08x", req->previous );
3618 fprintf( stderr, ", send_msg_old=%d", req->send_msg_old );
3619 fprintf( stderr, ", send_msg_new=%d", req->send_msg_new );
3622 static void dump_set_focus_window_request( const struct set_focus_window_request *req )
3624 fprintf( stderr, " handle=%08x", req->handle );
3627 static void dump_set_focus_window_reply( const struct set_focus_window_reply *req )
3629 fprintf( stderr, " previous=%08x", req->previous );
3632 static void dump_set_active_window_request( const struct set_active_window_request *req )
3634 fprintf( stderr, " handle=%08x", req->handle );
3637 static void dump_set_active_window_reply( const struct set_active_window_reply *req )
3639 fprintf( stderr, " previous=%08x", req->previous );
3642 static void dump_set_capture_window_request( const struct set_capture_window_request *req )
3644 fprintf( stderr, " handle=%08x", req->handle );
3645 fprintf( stderr, ", flags=%08x", req->flags );
3648 static void dump_set_capture_window_reply( const struct set_capture_window_reply *req )
3650 fprintf( stderr, " previous=%08x", req->previous );
3651 fprintf( stderr, ", full_handle=%08x", req->full_handle );
3654 static void dump_set_caret_window_request( const struct set_caret_window_request *req )
3656 fprintf( stderr, " handle=%08x", req->handle );
3657 fprintf( stderr, ", width=%d", req->width );
3658 fprintf( stderr, ", height=%d", req->height );
3661 static void dump_set_caret_window_reply( const struct set_caret_window_reply *req )
3663 fprintf( stderr, " previous=%08x", req->previous );
3664 dump_rectangle( ", old_rect=", &req->old_rect );
3665 fprintf( stderr, ", old_hide=%d", req->old_hide );
3666 fprintf( stderr, ", old_state=%d", req->old_state );
3669 static void dump_set_caret_info_request( const struct set_caret_info_request *req )
3671 fprintf( stderr, " flags=%08x", req->flags );
3672 fprintf( stderr, ", handle=%08x", req->handle );
3673 fprintf( stderr, ", x=%d", req->x );
3674 fprintf( stderr, ", y=%d", req->y );
3675 fprintf( stderr, ", hide=%d", req->hide );
3676 fprintf( stderr, ", state=%d", req->state );
3679 static void dump_set_caret_info_reply( const struct set_caret_info_reply *req )
3681 fprintf( stderr, " full_handle=%08x", req->full_handle );
3682 dump_rectangle( ", old_rect=", &req->old_rect );
3683 fprintf( stderr, ", old_hide=%d", req->old_hide );
3684 fprintf( stderr, ", old_state=%d", req->old_state );
3687 static void dump_set_hook_request( const struct set_hook_request *req )
3689 fprintf( stderr, " id=%d", req->id );
3690 fprintf( stderr, ", pid=%04x", req->pid );
3691 fprintf( stderr, ", tid=%04x", req->tid );
3692 fprintf( stderr, ", event_min=%d", req->event_min );
3693 fprintf( stderr, ", event_max=%d", req->event_max );
3694 dump_uint64( ", proc=", &req->proc );
3695 fprintf( stderr, ", flags=%d", req->flags );
3696 fprintf( stderr, ", unicode=%d", req->unicode );
3697 dump_varargs_unicode_str( ", module=", cur_size );
3700 static void dump_set_hook_reply( const struct set_hook_reply *req )
3702 fprintf( stderr, " handle=%08x", req->handle );
3703 fprintf( stderr, ", active_hooks=%08x", req->active_hooks );
3706 static void dump_remove_hook_request( const struct remove_hook_request *req )
3708 fprintf( stderr, " handle=%08x", req->handle );
3709 dump_uint64( ", proc=", &req->proc );
3710 fprintf( stderr, ", id=%d", req->id );
3713 static void dump_remove_hook_reply( const struct remove_hook_reply *req )
3715 fprintf( stderr, " active_hooks=%08x", req->active_hooks );
3718 static void dump_start_hook_chain_request( const struct start_hook_chain_request *req )
3720 fprintf( stderr, " id=%d", req->id );
3721 fprintf( stderr, ", event=%d", req->event );
3722 fprintf( stderr, ", window=%08x", req->window );
3723 fprintf( stderr, ", object_id=%d", req->object_id );
3724 fprintf( stderr, ", child_id=%d", req->child_id );
3727 static void dump_start_hook_chain_reply( const struct start_hook_chain_reply *req )
3729 fprintf( stderr, " handle=%08x", req->handle );
3730 fprintf( stderr, ", pid=%04x", req->pid );
3731 fprintf( stderr, ", tid=%04x", req->tid );
3732 fprintf( stderr, ", unicode=%d", req->unicode );
3733 dump_uint64( ", proc=", &req->proc );
3734 fprintf( stderr, ", active_hooks=%08x", req->active_hooks );
3735 dump_varargs_unicode_str( ", module=", cur_size );
3738 static void dump_finish_hook_chain_request( const struct finish_hook_chain_request *req )
3740 fprintf( stderr, " id=%d", req->id );
3743 static void dump_get_hook_info_request( const struct get_hook_info_request *req )
3745 fprintf( stderr, " handle=%08x", req->handle );
3746 fprintf( stderr, ", get_next=%d", req->get_next );
3747 fprintf( stderr, ", event=%d", req->event );
3748 fprintf( stderr, ", window=%08x", req->window );
3749 fprintf( stderr, ", object_id=%d", req->object_id );
3750 fprintf( stderr, ", child_id=%d", req->child_id );
3753 static void dump_get_hook_info_reply( const struct get_hook_info_reply *req )
3755 fprintf( stderr, " handle=%08x", req->handle );
3756 fprintf( stderr, ", id=%d", req->id );
3757 fprintf( stderr, ", pid=%04x", req->pid );
3758 fprintf( stderr, ", tid=%04x", req->tid );
3759 dump_uint64( ", proc=", &req->proc );
3760 fprintf( stderr, ", unicode=%d", req->unicode );
3761 dump_varargs_unicode_str( ", module=", cur_size );
3764 static void dump_create_class_request( const struct create_class_request *req )
3766 fprintf( stderr, " local=%d", req->local );
3767 fprintf( stderr, ", atom=%04x", req->atom );
3768 fprintf( stderr, ", style=%08x", req->style );
3769 dump_uint64( ", instance=", &req->instance );
3770 fprintf( stderr, ", extra=%d", req->extra );
3771 fprintf( stderr, ", win_extra=%d", req->win_extra );
3772 dump_uint64( ", client_ptr=", &req->client_ptr );
3773 fprintf( stderr, ", name_offset=%u", req->name_offset );
3774 dump_varargs_unicode_str( ", name=", cur_size );
3777 static void dump_create_class_reply( const struct create_class_reply *req )
3779 fprintf( stderr, " atom=%04x", req->atom );
3782 static void dump_destroy_class_request( const struct destroy_class_request *req )
3784 fprintf( stderr, " atom=%04x", req->atom );
3785 dump_uint64( ", instance=", &req->instance );
3786 dump_varargs_unicode_str( ", name=", cur_size );
3789 static void dump_destroy_class_reply( const struct destroy_class_reply *req )
3791 dump_uint64( " client_ptr=", &req->client_ptr );
3794 static void dump_set_class_info_request( const struct set_class_info_request *req )
3796 fprintf( stderr, " window=%08x", req->window );
3797 fprintf( stderr, ", flags=%08x", req->flags );
3798 fprintf( stderr, ", atom=%04x", req->atom );
3799 fprintf( stderr, ", style=%08x", req->style );
3800 fprintf( stderr, ", win_extra=%d", req->win_extra );
3801 dump_uint64( ", instance=", &req->instance );
3802 fprintf( stderr, ", extra_offset=%d", req->extra_offset );
3803 fprintf( stderr, ", extra_size=%u", req->extra_size );
3804 dump_uint64( ", extra_value=", &req->extra_value );
3807 static void dump_set_class_info_reply( const struct set_class_info_reply *req )
3809 fprintf( stderr, " old_atom=%04x", req->old_atom );
3810 fprintf( stderr, ", base_atom=%04x", req->base_atom );
3811 dump_uint64( ", old_instance=", &req->old_instance );
3812 dump_uint64( ", old_extra_value=", &req->old_extra_value );
3813 fprintf( stderr, ", old_style=%08x", req->old_style );
3814 fprintf( stderr, ", old_extra=%d", req->old_extra );
3815 fprintf( stderr, ", old_win_extra=%d", req->old_win_extra );
3818 static void dump_open_clipboard_request( const struct open_clipboard_request *req )
3820 fprintf( stderr, " window=%08x", req->window );
3823 static void dump_open_clipboard_reply( const struct open_clipboard_reply *req )
3825 fprintf( stderr, " owner=%08x", req->owner );
3828 static void dump_close_clipboard_request( const struct close_clipboard_request *req )
3832 static void dump_close_clipboard_reply( const struct close_clipboard_reply *req )
3834 fprintf( stderr, " viewer=%08x", req->viewer );
3835 fprintf( stderr, ", owner=%08x", req->owner );
3838 static void dump_empty_clipboard_request( const struct empty_clipboard_request *req )
3842 static void dump_set_clipboard_data_request( const struct set_clipboard_data_request *req )
3844 fprintf( stderr, " format=%08x", req->format );
3845 fprintf( stderr, ", lcid=%08x", req->lcid );
3846 dump_varargs_bytes( ", data=", cur_size );
3849 static void dump_set_clipboard_data_reply( const struct set_clipboard_data_reply *req )
3851 fprintf( stderr, " seqno=%08x", req->seqno );
3854 static void dump_get_clipboard_data_request( const struct get_clipboard_data_request *req )
3856 fprintf( stderr, " format=%08x", req->format );
3857 fprintf( stderr, ", render=%d", req->render );
3858 fprintf( stderr, ", cached=%d", req->cached );
3859 fprintf( stderr, ", seqno=%08x", req->seqno );
3862 static void dump_get_clipboard_data_reply( const struct get_clipboard_data_reply *req )
3864 fprintf( stderr, " from=%08x", req->from );
3865 fprintf( stderr, ", owner=%08x", req->owner );
3866 fprintf( stderr, ", seqno=%08x", req->seqno );
3867 fprintf( stderr, ", total=%u", req->total );
3868 dump_varargs_bytes( ", data=", cur_size );
3871 static void dump_get_clipboard_formats_request( const struct get_clipboard_formats_request *req )
3873 fprintf( stderr, " format=%08x", req->format );
3876 static void dump_get_clipboard_formats_reply( const struct get_clipboard_formats_reply *req )
3878 fprintf( stderr, " count=%08x", req->count );
3879 dump_varargs_uints( ", formats=", cur_size );
3882 static void dump_enum_clipboard_formats_request( const struct enum_clipboard_formats_request *req )
3884 fprintf( stderr, " previous=%08x", req->previous );
3887 static void dump_enum_clipboard_formats_reply( const struct enum_clipboard_formats_reply *req )
3889 fprintf( stderr, " format=%08x", req->format );
3892 static void dump_release_clipboard_request( const struct release_clipboard_request *req )
3894 fprintf( stderr, " owner=%08x", req->owner );
3897 static void dump_release_clipboard_reply( const struct release_clipboard_reply *req )
3899 fprintf( stderr, " viewer=%08x", req->viewer );
3900 fprintf( stderr, ", owner=%08x", req->owner );
3903 static void dump_get_clipboard_info_request( const struct get_clipboard_info_request *req )
3907 static void dump_get_clipboard_info_reply( const struct get_clipboard_info_reply *req )
3909 fprintf( stderr, " window=%08x", req->window );
3910 fprintf( stderr, ", owner=%08x", req->owner );
3911 fprintf( stderr, ", viewer=%08x", req->viewer );
3912 fprintf( stderr, ", seqno=%08x", req->seqno );
3915 static void dump_set_clipboard_viewer_request( const struct set_clipboard_viewer_request *req )
3917 fprintf( stderr, " viewer=%08x", req->viewer );
3918 fprintf( stderr, ", previous=%08x", req->previous );
3921 static void dump_set_clipboard_viewer_reply( const struct set_clipboard_viewer_reply *req )
3923 fprintf( stderr, " old_viewer=%08x", req->old_viewer );
3924 fprintf( stderr, ", owner=%08x", req->owner );
3927 static void dump_add_clipboard_listener_request( const struct add_clipboard_listener_request *req )
3929 fprintf( stderr, " window=%08x", req->window );
3932 static void dump_remove_clipboard_listener_request( const struct remove_clipboard_listener_request *req )
3934 fprintf( stderr, " window=%08x", req->window );
3937 static void dump_open_token_request( const struct open_token_request *req )
3939 fprintf( stderr, " handle=%04x", req->handle );
3940 fprintf( stderr, ", access=%08x", req->access );
3941 fprintf( stderr, ", attributes=%08x", req->attributes );
3942 fprintf( stderr, ", flags=%08x", req->flags );
3945 static void dump_open_token_reply( const struct open_token_reply *req )
3947 fprintf( stderr, " token=%04x", req->token );
3950 static void dump_set_global_windows_request( const struct set_global_windows_request *req )
3952 fprintf( stderr, " flags=%08x", req->flags );
3953 fprintf( stderr, ", shell_window=%08x", req->shell_window );
3954 fprintf( stderr, ", shell_listview=%08x", req->shell_listview );
3955 fprintf( stderr, ", progman_window=%08x", req->progman_window );
3956 fprintf( stderr, ", taskman_window=%08x", req->taskman_window );
3959 static void dump_set_global_windows_reply( const struct set_global_windows_reply *req )
3961 fprintf( stderr, " old_shell_window=%08x", req->old_shell_window );
3962 fprintf( stderr, ", old_shell_listview=%08x", req->old_shell_listview );
3963 fprintf( stderr, ", old_progman_window=%08x", req->old_progman_window );
3964 fprintf( stderr, ", old_taskman_window=%08x", req->old_taskman_window );
3967 static void dump_adjust_token_privileges_request( const struct adjust_token_privileges_request *req )
3969 fprintf( stderr, " handle=%04x", req->handle );
3970 fprintf( stderr, ", disable_all=%d", req->disable_all );
3971 fprintf( stderr, ", get_modified_state=%d", req->get_modified_state );
3972 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3975 static void dump_adjust_token_privileges_reply( const struct adjust_token_privileges_reply *req )
3977 fprintf( stderr, " len=%08x", req->len );
3978 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3981 static void dump_get_token_privileges_request( const struct get_token_privileges_request *req )
3983 fprintf( stderr, " handle=%04x", req->handle );
3986 static void dump_get_token_privileges_reply( const struct get_token_privileges_reply *req )
3988 fprintf( stderr, " len=%08x", req->len );
3989 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3992 static void dump_check_token_privileges_request( const struct check_token_privileges_request *req )
3994 fprintf( stderr, " handle=%04x", req->handle );
3995 fprintf( stderr, ", all_required=%d", req->all_required );
3996 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3999 static void dump_check_token_privileges_reply( const struct check_token_privileges_reply *req )
4001 fprintf( stderr, " has_privileges=%d", req->has_privileges );
4002 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
4005 static void dump_duplicate_token_request( const struct duplicate_token_request *req )
4007 fprintf( stderr, " handle=%04x", req->handle );
4008 fprintf( stderr, ", access=%08x", req->access );
4009 fprintf( stderr, ", primary=%d", req->primary );
4010 fprintf( stderr, ", impersonation_level=%d", req->impersonation_level );
4011 dump_varargs_object_attributes( ", objattr=", cur_size );
4014 static void dump_duplicate_token_reply( const struct duplicate_token_reply *req )
4016 fprintf( stderr, " new_handle=%04x", req->new_handle );
4019 static void dump_access_check_request( const struct access_check_request *req )
4021 fprintf( stderr, " handle=%04x", req->handle );
4022 fprintf( stderr, ", desired_access=%08x", req->desired_access );
4023 fprintf( stderr, ", mapping_read=%08x", req->mapping_read );
4024 fprintf( stderr, ", mapping_write=%08x", req->mapping_write );
4025 fprintf( stderr, ", mapping_execute=%08x", req->mapping_execute );
4026 fprintf( stderr, ", mapping_all=%08x", req->mapping_all );
4027 dump_varargs_security_descriptor( ", sd=", cur_size );
4030 static void dump_access_check_reply( const struct access_check_reply *req )
4032 fprintf( stderr, " access_granted=%08x", req->access_granted );
4033 fprintf( stderr, ", access_status=%08x", req->access_status );
4034 fprintf( stderr, ", privileges_len=%08x", req->privileges_len );
4035 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
4038 static void dump_get_token_sid_request( const struct get_token_sid_request *req )
4040 fprintf( stderr, " handle=%04x", req->handle );
4041 fprintf( stderr, ", which_sid=%08x", req->which_sid );
4044 static void dump_get_token_sid_reply( const struct get_token_sid_reply *req )
4046 fprintf( stderr, " sid_len=%u", req->sid_len );
4047 dump_varargs_SID( ", sid=", cur_size );
4050 static void dump_get_token_groups_request( const struct get_token_groups_request *req )
4052 fprintf( stderr, " handle=%04x", req->handle );
4055 static void dump_get_token_groups_reply( const struct get_token_groups_reply *req )
4057 fprintf( stderr, " user_len=%u", req->user_len );
4058 dump_varargs_token_groups( ", user=", cur_size );
4061 static void dump_get_token_default_dacl_request( const struct get_token_default_dacl_request *req )
4063 fprintf( stderr, " handle=%04x", req->handle );
4066 static void dump_get_token_default_dacl_reply( const struct get_token_default_dacl_reply *req )
4068 fprintf( stderr, " acl_len=%u", req->acl_len );
4069 dump_varargs_ACL( ", acl=", cur_size );
4072 static void dump_set_token_default_dacl_request( const struct set_token_default_dacl_request *req )
4074 fprintf( stderr, " handle=%04x", req->handle );
4075 dump_varargs_ACL( ", acl=", cur_size );
4078 static void dump_set_security_object_request( const struct set_security_object_request *req )
4080 fprintf( stderr, " handle=%04x", req->handle );
4081 fprintf( stderr, ", security_info=%08x", req->security_info );
4082 dump_varargs_security_descriptor( ", sd=", cur_size );
4085 static void dump_get_security_object_request( const struct get_security_object_request *req )
4087 fprintf( stderr, " handle=%04x", req->handle );
4088 fprintf( stderr, ", security_info=%08x", req->security_info );
4091 static void dump_get_security_object_reply( const struct get_security_object_reply *req )
4093 fprintf( stderr, " sd_len=%08x", req->sd_len );
4094 dump_varargs_security_descriptor( ", sd=", cur_size );
4097 static void dump_get_system_handles_request( const struct get_system_handles_request *req )
4101 static void dump_get_system_handles_reply( const struct get_system_handles_reply *req )
4103 fprintf( stderr, " count=%08x", req->count );
4104 dump_varargs_handle_infos( ", data=", cur_size );
4107 static void dump_create_mailslot_request( const struct create_mailslot_request *req )
4109 fprintf( stderr, " access=%08x", req->access );
4110 dump_timeout( ", read_timeout=", &req->read_timeout );
4111 fprintf( stderr, ", max_msgsize=%08x", req->max_msgsize );
4112 dump_varargs_object_attributes( ", objattr=", cur_size );
4115 static void dump_create_mailslot_reply( const struct create_mailslot_reply *req )
4117 fprintf( stderr, " handle=%04x", req->handle );
4120 static void dump_set_mailslot_info_request( const struct set_mailslot_info_request *req )
4122 fprintf( stderr, " handle=%04x", req->handle );
4123 dump_timeout( ", read_timeout=", &req->read_timeout );
4124 fprintf( stderr, ", flags=%08x", req->flags );
4127 static void dump_set_mailslot_info_reply( const struct set_mailslot_info_reply *req )
4129 dump_timeout( " read_timeout=", &req->read_timeout );
4130 fprintf( stderr, ", max_msgsize=%08x", req->max_msgsize );
4133 static void dump_create_directory_request( const struct create_directory_request *req )
4135 fprintf( stderr, " access=%08x", req->access );
4136 dump_varargs_object_attributes( ", objattr=", cur_size );
4139 static void dump_create_directory_reply( const struct create_directory_reply *req )
4141 fprintf( stderr, " handle=%04x", req->handle );
4144 static void dump_open_directory_request( const struct open_directory_request *req )
4146 fprintf( stderr, " access=%08x", req->access );
4147 fprintf( stderr, ", attributes=%08x", req->attributes );
4148 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4149 dump_varargs_unicode_str( ", directory_name=", cur_size );
4152 static void dump_open_directory_reply( const struct open_directory_reply *req )
4154 fprintf( stderr, " handle=%04x", req->handle );
4157 static void dump_get_directory_entry_request( const struct get_directory_entry_request *req )
4159 fprintf( stderr, " handle=%04x", req->handle );
4160 fprintf( stderr, ", index=%08x", req->index );
4163 static void dump_get_directory_entry_reply( const struct get_directory_entry_reply *req )
4165 fprintf( stderr, " name_len=%u", req->name_len );
4166 dump_varargs_unicode_str( ", name=", min(cur_size,req->name_len) );
4167 dump_varargs_unicode_str( ", type=", cur_size );
4170 static void dump_create_symlink_request( const struct create_symlink_request *req )
4172 fprintf( stderr, " access=%08x", req->access );
4173 dump_varargs_object_attributes( ", objattr=", cur_size );
4174 dump_varargs_unicode_str( ", target_name=", cur_size );
4177 static void dump_create_symlink_reply( const struct create_symlink_reply *req )
4179 fprintf( stderr, " handle=%04x", req->handle );
4182 static void dump_open_symlink_request( const struct open_symlink_request *req )
4184 fprintf( stderr, " access=%08x", req->access );
4185 fprintf( stderr, ", attributes=%08x", req->attributes );
4186 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4187 dump_varargs_unicode_str( ", name=", cur_size );
4190 static void dump_open_symlink_reply( const struct open_symlink_reply *req )
4192 fprintf( stderr, " handle=%04x", req->handle );
4195 static void dump_query_symlink_request( const struct query_symlink_request *req )
4197 fprintf( stderr, " handle=%04x", req->handle );
4200 static void dump_query_symlink_reply( const struct query_symlink_reply *req )
4202 fprintf( stderr, " total=%u", req->total );
4203 dump_varargs_unicode_str( ", target_name=", cur_size );
4206 static void dump_get_object_info_request( const struct get_object_info_request *req )
4208 fprintf( stderr, " handle=%04x", req->handle );
4211 static void dump_get_object_info_reply( const struct get_object_info_reply *req )
4213 fprintf( stderr, " access=%08x", req->access );
4214 fprintf( stderr, ", ref_count=%08x", req->ref_count );
4215 fprintf( stderr, ", handle_count=%08x", req->handle_count );
4216 fprintf( stderr, ", total=%u", req->total );
4217 dump_varargs_unicode_str( ", name=", cur_size );
4220 static void dump_get_object_type_request( const struct get_object_type_request *req )
4222 fprintf( stderr, " handle=%04x", req->handle );
4225 static void dump_get_object_type_reply( const struct get_object_type_reply *req )
4227 fprintf( stderr, " total=%u", req->total );
4228 dump_varargs_unicode_str( ", type=", cur_size );
4231 static void dump_unlink_object_request( const struct unlink_object_request *req )
4233 fprintf( stderr, " handle=%04x", req->handle );
4236 static void dump_get_token_impersonation_level_request( const struct get_token_impersonation_level_request *req )
4238 fprintf( stderr, " handle=%04x", req->handle );
4241 static void dump_get_token_impersonation_level_reply( const struct get_token_impersonation_level_reply *req )
4243 fprintf( stderr, " impersonation_level=%d", req->impersonation_level );
4246 static void dump_allocate_locally_unique_id_request( const struct allocate_locally_unique_id_request *req )
4250 static void dump_allocate_locally_unique_id_reply( const struct allocate_locally_unique_id_reply *req )
4252 dump_luid( " luid=", &req->luid );
4255 static void dump_create_device_manager_request( const struct create_device_manager_request *req )
4257 fprintf( stderr, " access=%08x", req->access );
4258 fprintf( stderr, ", attributes=%08x", req->attributes );
4261 static void dump_create_device_manager_reply( const struct create_device_manager_reply *req )
4263 fprintf( stderr, " handle=%04x", req->handle );
4266 static void dump_create_device_request( const struct create_device_request *req )
4268 fprintf( stderr, " rootdir=%04x", req->rootdir );
4269 dump_uint64( ", user_ptr=", &req->user_ptr );
4270 fprintf( stderr, ", manager=%04x", req->manager );
4271 dump_varargs_unicode_str( ", name=", cur_size );
4274 static void dump_delete_device_request( const struct delete_device_request *req )
4276 fprintf( stderr, " manager=%04x", req->manager );
4277 dump_uint64( ", device=", &req->device );
4280 static void dump_get_next_device_request_request( const struct get_next_device_request_request *req )
4282 fprintf( stderr, " manager=%04x", req->manager );
4283 fprintf( stderr, ", prev=%04x", req->prev );
4284 fprintf( stderr, ", status=%08x", req->status );
4287 static void dump_get_next_device_request_reply( const struct get_next_device_request_reply *req )
4289 dump_irp_params( " params=", &req->params );
4290 fprintf( stderr, ", next=%04x", req->next );
4291 fprintf( stderr, ", client_tid=%04x", req->client_tid );
4292 dump_uint64( ", client_thread=", &req->client_thread );
4293 fprintf( stderr, ", in_size=%u", req->in_size );
4294 dump_varargs_bytes( ", next_data=", cur_size );
4297 static void dump_get_kernel_object_ptr_request( const struct get_kernel_object_ptr_request *req )
4299 fprintf( stderr, " manager=%04x", req->manager );
4300 fprintf( stderr, ", handle=%04x", req->handle );
4303 static void dump_get_kernel_object_ptr_reply( const struct get_kernel_object_ptr_reply *req )
4305 dump_uint64( " user_ptr=", &req->user_ptr );
4308 static void dump_set_kernel_object_ptr_request( const struct set_kernel_object_ptr_request *req )
4310 fprintf( stderr, " manager=%04x", req->manager );
4311 fprintf( stderr, ", handle=%04x", req->handle );
4312 dump_uint64( ", user_ptr=", &req->user_ptr );
4315 static void dump_grab_kernel_object_request( const struct grab_kernel_object_request *req )
4317 fprintf( stderr, " manager=%04x", req->manager );
4318 dump_uint64( ", user_ptr=", &req->user_ptr );
4321 static void dump_release_kernel_object_request( const struct release_kernel_object_request *req )
4323 fprintf( stderr, " manager=%04x", req->manager );
4324 dump_uint64( ", user_ptr=", &req->user_ptr );
4327 static void dump_get_kernel_object_handle_request( const struct get_kernel_object_handle_request *req )
4329 fprintf( stderr, " manager=%04x", req->manager );
4330 dump_uint64( ", user_ptr=", &req->user_ptr );
4331 fprintf( stderr, ", access=%08x", req->access );
4334 static void dump_get_kernel_object_handle_reply( const struct get_kernel_object_handle_reply *req )
4336 fprintf( stderr, " handle=%04x", req->handle );
4339 static void dump_make_process_system_request( const struct make_process_system_request *req )
4343 static void dump_make_process_system_reply( const struct make_process_system_reply *req )
4345 fprintf( stderr, " event=%04x", req->event );
4348 static void dump_get_token_statistics_request( const struct get_token_statistics_request *req )
4350 fprintf( stderr, " handle=%04x", req->handle );
4353 static void dump_get_token_statistics_reply( const struct get_token_statistics_reply *req )
4355 dump_luid( " token_id=", &req->token_id );
4356 dump_luid( ", modified_id=", &req->modified_id );
4357 fprintf( stderr, ", primary=%d", req->primary );
4358 fprintf( stderr, ", impersonation_level=%d", req->impersonation_level );
4359 fprintf( stderr, ", group_count=%d", req->group_count );
4360 fprintf( stderr, ", privilege_count=%d", req->privilege_count );
4363 static void dump_create_completion_request( const struct create_completion_request *req )
4365 fprintf( stderr, " access=%08x", req->access );
4366 fprintf( stderr, ", concurrent=%08x", req->concurrent );
4367 dump_varargs_object_attributes( ", objattr=", cur_size );
4370 static void dump_create_completion_reply( const struct create_completion_reply *req )
4372 fprintf( stderr, " handle=%04x", req->handle );
4375 static void dump_open_completion_request( const struct open_completion_request *req )
4377 fprintf( stderr, " access=%08x", req->access );
4378 fprintf( stderr, ", attributes=%08x", req->attributes );
4379 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4380 dump_varargs_unicode_str( ", filename=", cur_size );
4383 static void dump_open_completion_reply( const struct open_completion_reply *req )
4385 fprintf( stderr, " handle=%04x", req->handle );
4388 static void dump_add_completion_request( const struct add_completion_request *req )
4390 fprintf( stderr, " handle=%04x", req->handle );
4391 dump_uint64( ", ckey=", &req->ckey );
4392 dump_uint64( ", cvalue=", &req->cvalue );
4393 dump_uint64( ", information=", &req->information );
4394 fprintf( stderr, ", status=%08x", req->status );
4397 static void dump_remove_completion_request( const struct remove_completion_request *req )
4399 fprintf( stderr, " handle=%04x", req->handle );
4402 static void dump_remove_completion_reply( const struct remove_completion_reply *req )
4404 dump_uint64( " ckey=", &req->ckey );
4405 dump_uint64( ", cvalue=", &req->cvalue );
4406 dump_uint64( ", information=", &req->information );
4407 fprintf( stderr, ", status=%08x", req->status );
4410 static void dump_query_completion_request( const struct query_completion_request *req )
4412 fprintf( stderr, " handle=%04x", req->handle );
4415 static void dump_query_completion_reply( const struct query_completion_reply *req )
4417 fprintf( stderr, " depth=%08x", req->depth );
4420 static void dump_set_completion_info_request( const struct set_completion_info_request *req )
4422 fprintf( stderr, " handle=%04x", req->handle );
4423 dump_uint64( ", ckey=", &req->ckey );
4424 fprintf( stderr, ", chandle=%04x", req->chandle );
4427 static void dump_add_fd_completion_request( const struct add_fd_completion_request *req )
4429 fprintf( stderr, " handle=%04x", req->handle );
4430 dump_uint64( ", cvalue=", &req->cvalue );
4431 dump_uint64( ", information=", &req->information );
4432 fprintf( stderr, ", status=%08x", req->status );
4433 fprintf( stderr, ", async=%d", req->async );
4436 static void dump_set_fd_completion_mode_request( const struct set_fd_completion_mode_request *req )
4438 fprintf( stderr, " handle=%04x", req->handle );
4439 fprintf( stderr, ", flags=%08x", req->flags );
4442 static void dump_set_fd_disp_info_request( const struct set_fd_disp_info_request *req )
4444 fprintf( stderr, " handle=%04x", req->handle );
4445 fprintf( stderr, ", unlink=%d", req->unlink );
4448 static void dump_set_fd_name_info_request( const struct set_fd_name_info_request *req )
4450 fprintf( stderr, " handle=%04x", req->handle );
4451 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4452 fprintf( stderr, ", link=%d", req->link );
4453 dump_varargs_string( ", filename=", cur_size );
4456 static void dump_get_window_layered_info_request( const struct get_window_layered_info_request *req )
4458 fprintf( stderr, " handle=%08x", req->handle );
4461 static void dump_get_window_layered_info_reply( const struct get_window_layered_info_reply *req )
4463 fprintf( stderr, " color_key=%08x", req->color_key );
4464 fprintf( stderr, ", alpha=%08x", req->alpha );
4465 fprintf( stderr, ", flags=%08x", req->flags );
4468 static void dump_set_window_layered_info_request( const struct set_window_layered_info_request *req )
4470 fprintf( stderr, " handle=%08x", req->handle );
4471 fprintf( stderr, ", color_key=%08x", req->color_key );
4472 fprintf( stderr, ", alpha=%08x", req->alpha );
4473 fprintf( stderr, ", flags=%08x", req->flags );
4476 static void dump_alloc_user_handle_request( const struct alloc_user_handle_request *req )
4480 static void dump_alloc_user_handle_reply( const struct alloc_user_handle_reply *req )
4482 fprintf( stderr, " handle=%08x", req->handle );
4485 static void dump_free_user_handle_request( const struct free_user_handle_request *req )
4487 fprintf( stderr, " handle=%08x", req->handle );
4490 static void dump_set_cursor_request( const struct set_cursor_request *req )
4492 fprintf( stderr, " flags=%08x", req->flags );
4493 fprintf( stderr, ", handle=%08x", req->handle );
4494 fprintf( stderr, ", show_count=%d", req->show_count );
4495 fprintf( stderr, ", x=%d", req->x );
4496 fprintf( stderr, ", y=%d", req->y );
4497 dump_rectangle( ", clip=", &req->clip );
4498 fprintf( stderr, ", clip_msg=%08x", req->clip_msg );
4501 static void dump_set_cursor_reply( const struct set_cursor_reply *req )
4503 fprintf( stderr, " prev_handle=%08x", req->prev_handle );
4504 fprintf( stderr, ", prev_count=%d", req->prev_count );
4505 fprintf( stderr, ", prev_x=%d", req->prev_x );
4506 fprintf( stderr, ", prev_y=%d", req->prev_y );
4507 fprintf( stderr, ", new_x=%d", req->new_x );
4508 fprintf( stderr, ", new_y=%d", req->new_y );
4509 dump_rectangle( ", new_clip=", &req->new_clip );
4510 fprintf( stderr, ", last_change=%08x", req->last_change );
4513 static void dump_update_rawinput_devices_request( const struct update_rawinput_devices_request *req )
4515 dump_varargs_rawinput_devices( " devices=", cur_size );
4518 static void dump_get_suspend_context_request( const struct get_suspend_context_request *req )
4522 static void dump_get_suspend_context_reply( const struct get_suspend_context_reply *req )
4524 dump_varargs_context( " context=", cur_size );
4527 static void dump_set_suspend_context_request( const struct set_suspend_context_request *req )
4529 dump_varargs_context( " context=", cur_size );
4532 static void dump_create_job_request( const struct create_job_request *req )
4534 fprintf( stderr, " access=%08x", req->access );
4535 dump_varargs_object_attributes( ", objattr=", cur_size );
4538 static void dump_create_job_reply( const struct create_job_reply *req )
4540 fprintf( stderr, " handle=%04x", req->handle );
4543 static void dump_open_job_request( const struct open_job_request *req )
4545 fprintf( stderr, " access=%08x", req->access );
4546 fprintf( stderr, ", attributes=%08x", req->attributes );
4547 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4548 dump_varargs_unicode_str( ", name=", cur_size );
4551 static void dump_open_job_reply( const struct open_job_reply *req )
4553 fprintf( stderr, " handle=%04x", req->handle );
4556 static void dump_assign_job_request( const struct assign_job_request *req )
4558 fprintf( stderr, " job=%04x", req->job );
4559 fprintf( stderr, ", process=%04x", req->process );
4562 static void dump_process_in_job_request( const struct process_in_job_request *req )
4564 fprintf( stderr, " job=%04x", req->job );
4565 fprintf( stderr, ", process=%04x", req->process );
4568 static void dump_set_job_limits_request( const struct set_job_limits_request *req )
4570 fprintf( stderr, " handle=%04x", req->handle );
4571 fprintf( stderr, ", limit_flags=%08x", req->limit_flags );
4574 static void dump_set_job_completion_port_request( const struct set_job_completion_port_request *req )
4576 fprintf( stderr, " job=%04x", req->job );
4577 fprintf( stderr, ", port=%04x", req->port );
4578 dump_uint64( ", key=", &req->key );
4581 static void dump_terminate_job_request( const struct terminate_job_request *req )
4583 fprintf( stderr, " handle=%04x", req->handle );
4584 fprintf( stderr, ", status=%d", req->status );
4587 static void dump_suspend_process_request( const struct suspend_process_request *req )
4589 fprintf( stderr, " handle=%04x", req->handle );
4592 static void dump_resume_process_request( const struct resume_process_request *req )
4594 fprintf( stderr, " handle=%04x", req->handle );
4597 static const dump_func req_dumpers[REQ_NB_REQUESTS] = {
4598 (dump_func)dump_new_process_request,
4599 (dump_func)dump_exec_process_request,
4600 (dump_func)dump_get_new_process_info_request,
4601 (dump_func)dump_new_thread_request,
4602 (dump_func)dump_get_startup_info_request,
4603 (dump_func)dump_init_process_done_request,
4604 (dump_func)dump_init_thread_request,
4605 (dump_func)dump_terminate_process_request,
4606 (dump_func)dump_terminate_thread_request,
4607 (dump_func)dump_get_process_info_request,
4608 (dump_func)dump_get_process_vm_counters_request,
4609 (dump_func)dump_set_process_info_request,
4610 (dump_func)dump_get_thread_info_request,
4611 (dump_func)dump_get_thread_times_request,
4612 (dump_func)dump_set_thread_info_request,
4613 (dump_func)dump_get_dll_info_request,
4614 (dump_func)dump_suspend_thread_request,
4615 (dump_func)dump_resume_thread_request,
4616 (dump_func)dump_load_dll_request,
4617 (dump_func)dump_unload_dll_request,
4618 (dump_func)dump_queue_apc_request,
4619 (dump_func)dump_get_apc_result_request,
4620 (dump_func)dump_close_handle_request,
4621 (dump_func)dump_set_handle_info_request,
4622 (dump_func)dump_dup_handle_request,
4623 (dump_func)dump_open_process_request,
4624 (dump_func)dump_open_thread_request,
4625 (dump_func)dump_select_request,
4626 (dump_func)dump_create_event_request,
4627 (dump_func)dump_event_op_request,
4628 (dump_func)dump_query_event_request,
4629 (dump_func)dump_open_event_request,
4630 (dump_func)dump_create_keyed_event_request,
4631 (dump_func)dump_open_keyed_event_request,
4632 (dump_func)dump_create_mutex_request,
4633 (dump_func)dump_release_mutex_request,
4634 (dump_func)dump_open_mutex_request,
4635 (dump_func)dump_query_mutex_request,
4636 (dump_func)dump_create_semaphore_request,
4637 (dump_func)dump_release_semaphore_request,
4638 (dump_func)dump_query_semaphore_request,
4639 (dump_func)dump_open_semaphore_request,
4640 (dump_func)dump_create_file_request,
4641 (dump_func)dump_open_file_object_request,
4642 (dump_func)dump_alloc_file_handle_request,
4643 (dump_func)dump_get_handle_unix_name_request,
4644 (dump_func)dump_get_handle_fd_request,
4645 (dump_func)dump_get_directory_cache_entry_request,
4646 (dump_func)dump_flush_request,
4647 (dump_func)dump_get_file_info_request,
4648 (dump_func)dump_get_volume_info_request,
4649 (dump_func)dump_lock_file_request,
4650 (dump_func)dump_unlock_file_request,
4651 (dump_func)dump_create_socket_request,
4652 (dump_func)dump_accept_socket_request,
4653 (dump_func)dump_accept_into_socket_request,
4654 (dump_func)dump_set_socket_event_request,
4655 (dump_func)dump_get_socket_event_request,
4656 (dump_func)dump_get_socket_info_request,
4657 (dump_func)dump_enable_socket_event_request,
4658 (dump_func)dump_set_socket_deferred_request,
4659 (dump_func)dump_alloc_console_request,
4660 (dump_func)dump_free_console_request,
4661 (dump_func)dump_get_console_renderer_events_request,
4662 (dump_func)dump_open_console_request,
4663 (dump_func)dump_attach_console_request,
4664 (dump_func)dump_get_console_wait_event_request,
4665 (dump_func)dump_get_console_mode_request,
4666 (dump_func)dump_set_console_mode_request,
4667 (dump_func)dump_set_console_input_info_request,
4668 (dump_func)dump_get_console_input_info_request,
4669 (dump_func)dump_append_console_input_history_request,
4670 (dump_func)dump_get_console_input_history_request,
4671 (dump_func)dump_create_console_output_request,
4672 (dump_func)dump_set_console_output_info_request,
4673 (dump_func)dump_get_console_output_info_request,
4674 (dump_func)dump_write_console_input_request,
4675 (dump_func)dump_read_console_input_request,
4676 (dump_func)dump_write_console_output_request,
4677 (dump_func)dump_fill_console_output_request,
4678 (dump_func)dump_read_console_output_request,
4679 (dump_func)dump_move_console_output_request,
4680 (dump_func)dump_send_console_signal_request,
4681 (dump_func)dump_read_directory_changes_request,
4682 (dump_func)dump_read_change_request,
4683 (dump_func)dump_create_mapping_request,
4684 (dump_func)dump_open_mapping_request,
4685 (dump_func)dump_get_mapping_info_request,
4686 (dump_func)dump_map_view_request,
4687 (dump_func)dump_unmap_view_request,
4688 (dump_func)dump_get_mapping_committed_range_request,
4689 (dump_func)dump_add_mapping_committed_range_request,
4690 (dump_func)dump_is_same_mapping_request,
4691 (dump_func)dump_create_snapshot_request,
4692 (dump_func)dump_next_process_request,
4693 (dump_func)dump_next_thread_request,
4694 (dump_func)dump_wait_debug_event_request,
4695 (dump_func)dump_queue_exception_event_request,
4696 (dump_func)dump_get_exception_status_request,
4697 (dump_func)dump_continue_debug_event_request,
4698 (dump_func)dump_debug_process_request,
4699 (dump_func)dump_debug_break_request,
4700 (dump_func)dump_set_debugger_kill_on_exit_request,
4701 (dump_func)dump_read_process_memory_request,
4702 (dump_func)dump_write_process_memory_request,
4703 (dump_func)dump_create_key_request,
4704 (dump_func)dump_open_key_request,
4705 (dump_func)dump_delete_key_request,
4706 (dump_func)dump_flush_key_request,
4707 (dump_func)dump_enum_key_request,
4708 (dump_func)dump_set_key_value_request,
4709 (dump_func)dump_get_key_value_request,
4710 (dump_func)dump_enum_key_value_request,
4711 (dump_func)dump_delete_key_value_request,
4712 (dump_func)dump_load_registry_request,
4713 (dump_func)dump_unload_registry_request,
4714 (dump_func)dump_save_registry_request,
4715 (dump_func)dump_set_registry_notification_request,
4716 (dump_func)dump_create_timer_request,
4717 (dump_func)dump_open_timer_request,
4718 (dump_func)dump_set_timer_request,
4719 (dump_func)dump_cancel_timer_request,
4720 (dump_func)dump_get_timer_info_request,
4721 (dump_func)dump_get_thread_context_request,
4722 (dump_func)dump_set_thread_context_request,
4723 (dump_func)dump_get_selector_entry_request,
4724 (dump_func)dump_add_atom_request,
4725 (dump_func)dump_delete_atom_request,
4726 (dump_func)dump_find_atom_request,
4727 (dump_func)dump_get_atom_information_request,
4728 (dump_func)dump_set_atom_information_request,
4729 (dump_func)dump_empty_atom_table_request,
4730 (dump_func)dump_init_atom_table_request,
4731 (dump_func)dump_get_msg_queue_request,
4732 (dump_func)dump_set_queue_fd_request,
4733 (dump_func)dump_set_queue_mask_request,
4734 (dump_func)dump_get_queue_status_request,
4735 (dump_func)dump_get_process_idle_event_request,
4736 (dump_func)dump_send_message_request,
4737 (dump_func)dump_post_quit_message_request,
4738 (dump_func)dump_send_hardware_message_request,
4739 (dump_func)dump_get_message_request,
4740 (dump_func)dump_reply_message_request,
4741 (dump_func)dump_accept_hardware_message_request,
4742 (dump_func)dump_get_message_reply_request,
4743 (dump_func)dump_set_win_timer_request,
4744 (dump_func)dump_kill_win_timer_request,
4745 (dump_func)dump_is_window_hung_request,
4746 (dump_func)dump_get_serial_info_request,
4747 (dump_func)dump_set_serial_info_request,
4748 (dump_func)dump_register_async_request,
4749 (dump_func)dump_cancel_async_request,
4750 (dump_func)dump_get_async_result_request,
4751 (dump_func)dump_read_request,
4752 (dump_func)dump_write_request,
4753 (dump_func)dump_ioctl_request,
4754 (dump_func)dump_set_irp_result_request,
4755 (dump_func)dump_create_named_pipe_request,
4756 (dump_func)dump_set_named_pipe_info_request,
4757 (dump_func)dump_create_window_request,
4758 (dump_func)dump_destroy_window_request,
4759 (dump_func)dump_get_desktop_window_request,
4760 (dump_func)dump_set_window_owner_request,
4761 (dump_func)dump_get_window_info_request,
4762 (dump_func)dump_set_window_info_request,
4763 (dump_func)dump_set_parent_request,
4764 (dump_func)dump_get_window_parents_request,
4765 (dump_func)dump_get_window_children_request,
4766 (dump_func)dump_get_window_children_from_point_request,
4767 (dump_func)dump_get_window_tree_request,
4768 (dump_func)dump_set_window_pos_request,
4769 (dump_func)dump_get_window_rectangles_request,
4770 (dump_func)dump_get_window_text_request,
4771 (dump_func)dump_set_window_text_request,
4772 (dump_func)dump_get_windows_offset_request,
4773 (dump_func)dump_get_visible_region_request,
4774 (dump_func)dump_get_surface_region_request,
4775 (dump_func)dump_get_window_region_request,
4776 (dump_func)dump_set_window_region_request,
4777 (dump_func)dump_get_update_region_request,
4778 (dump_func)dump_update_window_zorder_request,
4779 (dump_func)dump_redraw_window_request,
4780 (dump_func)dump_set_window_property_request,
4781 (dump_func)dump_remove_window_property_request,
4782 (dump_func)dump_get_window_property_request,
4783 (dump_func)dump_get_window_properties_request,
4784 (dump_func)dump_create_winstation_request,
4785 (dump_func)dump_open_winstation_request,
4786 (dump_func)dump_close_winstation_request,
4787 (dump_func)dump_get_process_winstation_request,
4788 (dump_func)dump_set_process_winstation_request,
4789 (dump_func)dump_enum_winstation_request,
4790 (dump_func)dump_create_desktop_request,
4791 (dump_func)dump_open_desktop_request,
4792 (dump_func)dump_open_input_desktop_request,
4793 (dump_func)dump_close_desktop_request,
4794 (dump_func)dump_get_thread_desktop_request,
4795 (dump_func)dump_set_thread_desktop_request,
4796 (dump_func)dump_enum_desktop_request,
4797 (dump_func)dump_set_user_object_info_request,
4798 (dump_func)dump_register_hotkey_request,
4799 (dump_func)dump_unregister_hotkey_request,
4800 (dump_func)dump_attach_thread_input_request,
4801 (dump_func)dump_get_thread_input_request,
4802 (dump_func)dump_get_last_input_time_request,
4803 (dump_func)dump_get_key_state_request,
4804 (dump_func)dump_set_key_state_request,
4805 (dump_func)dump_set_foreground_window_request,
4806 (dump_func)dump_set_focus_window_request,
4807 (dump_func)dump_set_active_window_request,
4808 (dump_func)dump_set_capture_window_request,
4809 (dump_func)dump_set_caret_window_request,
4810 (dump_func)dump_set_caret_info_request,
4811 (dump_func)dump_set_hook_request,
4812 (dump_func)dump_remove_hook_request,
4813 (dump_func)dump_start_hook_chain_request,
4814 (dump_func)dump_finish_hook_chain_request,
4815 (dump_func)dump_get_hook_info_request,
4816 (dump_func)dump_create_class_request,
4817 (dump_func)dump_destroy_class_request,
4818 (dump_func)dump_set_class_info_request,
4819 (dump_func)dump_open_clipboard_request,
4820 (dump_func)dump_close_clipboard_request,
4821 (dump_func)dump_empty_clipboard_request,
4822 (dump_func)dump_set_clipboard_data_request,
4823 (dump_func)dump_get_clipboard_data_request,
4824 (dump_func)dump_get_clipboard_formats_request,
4825 (dump_func)dump_enum_clipboard_formats_request,
4826 (dump_func)dump_release_clipboard_request,
4827 (dump_func)dump_get_clipboard_info_request,
4828 (dump_func)dump_set_clipboard_viewer_request,
4829 (dump_func)dump_add_clipboard_listener_request,
4830 (dump_func)dump_remove_clipboard_listener_request,
4831 (dump_func)dump_open_token_request,
4832 (dump_func)dump_set_global_windows_request,
4833 (dump_func)dump_adjust_token_privileges_request,
4834 (dump_func)dump_get_token_privileges_request,
4835 (dump_func)dump_check_token_privileges_request,
4836 (dump_func)dump_duplicate_token_request,
4837 (dump_func)dump_access_check_request,
4838 (dump_func)dump_get_token_sid_request,
4839 (dump_func)dump_get_token_groups_request,
4840 (dump_func)dump_get_token_default_dacl_request,
4841 (dump_func)dump_set_token_default_dacl_request,
4842 (dump_func)dump_set_security_object_request,
4843 (dump_func)dump_get_security_object_request,
4844 (dump_func)dump_get_system_handles_request,
4845 (dump_func)dump_create_mailslot_request,
4846 (dump_func)dump_set_mailslot_info_request,
4847 (dump_func)dump_create_directory_request,
4848 (dump_func)dump_open_directory_request,
4849 (dump_func)dump_get_directory_entry_request,
4850 (dump_func)dump_create_symlink_request,
4851 (dump_func)dump_open_symlink_request,
4852 (dump_func)dump_query_symlink_request,
4853 (dump_func)dump_get_object_info_request,
4854 (dump_func)dump_get_object_type_request,
4855 (dump_func)dump_unlink_object_request,
4856 (dump_func)dump_get_token_impersonation_level_request,
4857 (dump_func)dump_allocate_locally_unique_id_request,
4858 (dump_func)dump_create_device_manager_request,
4859 (dump_func)dump_create_device_request,
4860 (dump_func)dump_delete_device_request,
4861 (dump_func)dump_get_next_device_request_request,
4862 (dump_func)dump_get_kernel_object_ptr_request,
4863 (dump_func)dump_set_kernel_object_ptr_request,
4864 (dump_func)dump_grab_kernel_object_request,
4865 (dump_func)dump_release_kernel_object_request,
4866 (dump_func)dump_get_kernel_object_handle_request,
4867 (dump_func)dump_make_process_system_request,
4868 (dump_func)dump_get_token_statistics_request,
4869 (dump_func)dump_create_completion_request,
4870 (dump_func)dump_open_completion_request,
4871 (dump_func)dump_add_completion_request,
4872 (dump_func)dump_remove_completion_request,
4873 (dump_func)dump_query_completion_request,
4874 (dump_func)dump_set_completion_info_request,
4875 (dump_func)dump_add_fd_completion_request,
4876 (dump_func)dump_set_fd_completion_mode_request,
4877 (dump_func)dump_set_fd_disp_info_request,
4878 (dump_func)dump_set_fd_name_info_request,
4879 (dump_func)dump_get_window_layered_info_request,
4880 (dump_func)dump_set_window_layered_info_request,
4881 (dump_func)dump_alloc_user_handle_request,
4882 (dump_func)dump_free_user_handle_request,
4883 (dump_func)dump_set_cursor_request,
4884 (dump_func)dump_update_rawinput_devices_request,
4885 (dump_func)dump_get_suspend_context_request,
4886 (dump_func)dump_set_suspend_context_request,
4887 (dump_func)dump_create_job_request,
4888 (dump_func)dump_open_job_request,
4889 (dump_func)dump_assign_job_request,
4890 (dump_func)dump_process_in_job_request,
4891 (dump_func)dump_set_job_limits_request,
4892 (dump_func)dump_set_job_completion_port_request,
4893 (dump_func)dump_terminate_job_request,
4894 (dump_func)dump_suspend_process_request,
4895 (dump_func)dump_resume_process_request,
4898 static const dump_func reply_dumpers[REQ_NB_REQUESTS] = {
4899 (dump_func)dump_new_process_reply,
4900 NULL,
4901 (dump_func)dump_get_new_process_info_reply,
4902 (dump_func)dump_new_thread_reply,
4903 (dump_func)dump_get_startup_info_reply,
4904 (dump_func)dump_init_process_done_reply,
4905 (dump_func)dump_init_thread_reply,
4906 (dump_func)dump_terminate_process_reply,
4907 (dump_func)dump_terminate_thread_reply,
4908 (dump_func)dump_get_process_info_reply,
4909 (dump_func)dump_get_process_vm_counters_reply,
4910 NULL,
4911 (dump_func)dump_get_thread_info_reply,
4912 (dump_func)dump_get_thread_times_reply,
4913 NULL,
4914 (dump_func)dump_get_dll_info_reply,
4915 (dump_func)dump_suspend_thread_reply,
4916 (dump_func)dump_resume_thread_reply,
4917 NULL,
4918 NULL,
4919 (dump_func)dump_queue_apc_reply,
4920 (dump_func)dump_get_apc_result_reply,
4921 NULL,
4922 (dump_func)dump_set_handle_info_reply,
4923 (dump_func)dump_dup_handle_reply,
4924 (dump_func)dump_open_process_reply,
4925 (dump_func)dump_open_thread_reply,
4926 (dump_func)dump_select_reply,
4927 (dump_func)dump_create_event_reply,
4928 (dump_func)dump_event_op_reply,
4929 (dump_func)dump_query_event_reply,
4930 (dump_func)dump_open_event_reply,
4931 (dump_func)dump_create_keyed_event_reply,
4932 (dump_func)dump_open_keyed_event_reply,
4933 (dump_func)dump_create_mutex_reply,
4934 (dump_func)dump_release_mutex_reply,
4935 (dump_func)dump_open_mutex_reply,
4936 (dump_func)dump_query_mutex_reply,
4937 (dump_func)dump_create_semaphore_reply,
4938 (dump_func)dump_release_semaphore_reply,
4939 (dump_func)dump_query_semaphore_reply,
4940 (dump_func)dump_open_semaphore_reply,
4941 (dump_func)dump_create_file_reply,
4942 (dump_func)dump_open_file_object_reply,
4943 (dump_func)dump_alloc_file_handle_reply,
4944 (dump_func)dump_get_handle_unix_name_reply,
4945 (dump_func)dump_get_handle_fd_reply,
4946 (dump_func)dump_get_directory_cache_entry_reply,
4947 (dump_func)dump_flush_reply,
4948 (dump_func)dump_get_file_info_reply,
4949 (dump_func)dump_get_volume_info_reply,
4950 (dump_func)dump_lock_file_reply,
4951 NULL,
4952 (dump_func)dump_create_socket_reply,
4953 (dump_func)dump_accept_socket_reply,
4954 NULL,
4955 NULL,
4956 (dump_func)dump_get_socket_event_reply,
4957 (dump_func)dump_get_socket_info_reply,
4958 NULL,
4959 NULL,
4960 (dump_func)dump_alloc_console_reply,
4961 NULL,
4962 (dump_func)dump_get_console_renderer_events_reply,
4963 (dump_func)dump_open_console_reply,
4964 (dump_func)dump_attach_console_reply,
4965 (dump_func)dump_get_console_wait_event_reply,
4966 (dump_func)dump_get_console_mode_reply,
4967 NULL,
4968 NULL,
4969 (dump_func)dump_get_console_input_info_reply,
4970 NULL,
4971 (dump_func)dump_get_console_input_history_reply,
4972 (dump_func)dump_create_console_output_reply,
4973 NULL,
4974 (dump_func)dump_get_console_output_info_reply,
4975 (dump_func)dump_write_console_input_reply,
4976 (dump_func)dump_read_console_input_reply,
4977 (dump_func)dump_write_console_output_reply,
4978 (dump_func)dump_fill_console_output_reply,
4979 (dump_func)dump_read_console_output_reply,
4980 NULL,
4981 NULL,
4982 NULL,
4983 (dump_func)dump_read_change_reply,
4984 (dump_func)dump_create_mapping_reply,
4985 (dump_func)dump_open_mapping_reply,
4986 (dump_func)dump_get_mapping_info_reply,
4987 NULL,
4988 NULL,
4989 (dump_func)dump_get_mapping_committed_range_reply,
4990 NULL,
4991 NULL,
4992 (dump_func)dump_create_snapshot_reply,
4993 (dump_func)dump_next_process_reply,
4994 (dump_func)dump_next_thread_reply,
4995 (dump_func)dump_wait_debug_event_reply,
4996 (dump_func)dump_queue_exception_event_reply,
4997 (dump_func)dump_get_exception_status_reply,
4998 NULL,
4999 NULL,
5000 (dump_func)dump_debug_break_reply,
5001 NULL,
5002 (dump_func)dump_read_process_memory_reply,
5003 NULL,
5004 (dump_func)dump_create_key_reply,
5005 (dump_func)dump_open_key_reply,
5006 NULL,
5007 NULL,
5008 (dump_func)dump_enum_key_reply,
5009 NULL,
5010 (dump_func)dump_get_key_value_reply,
5011 (dump_func)dump_enum_key_value_reply,
5012 NULL,
5013 NULL,
5014 NULL,
5015 NULL,
5016 NULL,
5017 (dump_func)dump_create_timer_reply,
5018 (dump_func)dump_open_timer_reply,
5019 (dump_func)dump_set_timer_reply,
5020 (dump_func)dump_cancel_timer_reply,
5021 (dump_func)dump_get_timer_info_reply,
5022 (dump_func)dump_get_thread_context_reply,
5023 (dump_func)dump_set_thread_context_reply,
5024 (dump_func)dump_get_selector_entry_reply,
5025 (dump_func)dump_add_atom_reply,
5026 NULL,
5027 (dump_func)dump_find_atom_reply,
5028 (dump_func)dump_get_atom_information_reply,
5029 NULL,
5030 NULL,
5031 (dump_func)dump_init_atom_table_reply,
5032 (dump_func)dump_get_msg_queue_reply,
5033 NULL,
5034 (dump_func)dump_set_queue_mask_reply,
5035 (dump_func)dump_get_queue_status_reply,
5036 (dump_func)dump_get_process_idle_event_reply,
5037 NULL,
5038 NULL,
5039 (dump_func)dump_send_hardware_message_reply,
5040 (dump_func)dump_get_message_reply,
5041 NULL,
5042 NULL,
5043 (dump_func)dump_get_message_reply_reply,
5044 (dump_func)dump_set_win_timer_reply,
5045 NULL,
5046 (dump_func)dump_is_window_hung_reply,
5047 (dump_func)dump_get_serial_info_reply,
5048 NULL,
5049 NULL,
5050 NULL,
5051 (dump_func)dump_get_async_result_reply,
5052 (dump_func)dump_read_reply,
5053 (dump_func)dump_write_reply,
5054 (dump_func)dump_ioctl_reply,
5055 NULL,
5056 (dump_func)dump_create_named_pipe_reply,
5057 NULL,
5058 (dump_func)dump_create_window_reply,
5059 NULL,
5060 (dump_func)dump_get_desktop_window_reply,
5061 (dump_func)dump_set_window_owner_reply,
5062 (dump_func)dump_get_window_info_reply,
5063 (dump_func)dump_set_window_info_reply,
5064 (dump_func)dump_set_parent_reply,
5065 (dump_func)dump_get_window_parents_reply,
5066 (dump_func)dump_get_window_children_reply,
5067 (dump_func)dump_get_window_children_from_point_reply,
5068 (dump_func)dump_get_window_tree_reply,
5069 (dump_func)dump_set_window_pos_reply,
5070 (dump_func)dump_get_window_rectangles_reply,
5071 (dump_func)dump_get_window_text_reply,
5072 NULL,
5073 (dump_func)dump_get_windows_offset_reply,
5074 (dump_func)dump_get_visible_region_reply,
5075 (dump_func)dump_get_surface_region_reply,
5076 (dump_func)dump_get_window_region_reply,
5077 NULL,
5078 (dump_func)dump_get_update_region_reply,
5079 NULL,
5080 NULL,
5081 NULL,
5082 (dump_func)dump_remove_window_property_reply,
5083 (dump_func)dump_get_window_property_reply,
5084 (dump_func)dump_get_window_properties_reply,
5085 (dump_func)dump_create_winstation_reply,
5086 (dump_func)dump_open_winstation_reply,
5087 NULL,
5088 (dump_func)dump_get_process_winstation_reply,
5089 NULL,
5090 (dump_func)dump_enum_winstation_reply,
5091 (dump_func)dump_create_desktop_reply,
5092 (dump_func)dump_open_desktop_reply,
5093 (dump_func)dump_open_input_desktop_reply,
5094 NULL,
5095 (dump_func)dump_get_thread_desktop_reply,
5096 NULL,
5097 (dump_func)dump_enum_desktop_reply,
5098 (dump_func)dump_set_user_object_info_reply,
5099 (dump_func)dump_register_hotkey_reply,
5100 (dump_func)dump_unregister_hotkey_reply,
5101 NULL,
5102 (dump_func)dump_get_thread_input_reply,
5103 (dump_func)dump_get_last_input_time_reply,
5104 (dump_func)dump_get_key_state_reply,
5105 NULL,
5106 (dump_func)dump_set_foreground_window_reply,
5107 (dump_func)dump_set_focus_window_reply,
5108 (dump_func)dump_set_active_window_reply,
5109 (dump_func)dump_set_capture_window_reply,
5110 (dump_func)dump_set_caret_window_reply,
5111 (dump_func)dump_set_caret_info_reply,
5112 (dump_func)dump_set_hook_reply,
5113 (dump_func)dump_remove_hook_reply,
5114 (dump_func)dump_start_hook_chain_reply,
5115 NULL,
5116 (dump_func)dump_get_hook_info_reply,
5117 (dump_func)dump_create_class_reply,
5118 (dump_func)dump_destroy_class_reply,
5119 (dump_func)dump_set_class_info_reply,
5120 (dump_func)dump_open_clipboard_reply,
5121 (dump_func)dump_close_clipboard_reply,
5122 NULL,
5123 (dump_func)dump_set_clipboard_data_reply,
5124 (dump_func)dump_get_clipboard_data_reply,
5125 (dump_func)dump_get_clipboard_formats_reply,
5126 (dump_func)dump_enum_clipboard_formats_reply,
5127 (dump_func)dump_release_clipboard_reply,
5128 (dump_func)dump_get_clipboard_info_reply,
5129 (dump_func)dump_set_clipboard_viewer_reply,
5130 NULL,
5131 NULL,
5132 (dump_func)dump_open_token_reply,
5133 (dump_func)dump_set_global_windows_reply,
5134 (dump_func)dump_adjust_token_privileges_reply,
5135 (dump_func)dump_get_token_privileges_reply,
5136 (dump_func)dump_check_token_privileges_reply,
5137 (dump_func)dump_duplicate_token_reply,
5138 (dump_func)dump_access_check_reply,
5139 (dump_func)dump_get_token_sid_reply,
5140 (dump_func)dump_get_token_groups_reply,
5141 (dump_func)dump_get_token_default_dacl_reply,
5142 NULL,
5143 NULL,
5144 (dump_func)dump_get_security_object_reply,
5145 (dump_func)dump_get_system_handles_reply,
5146 (dump_func)dump_create_mailslot_reply,
5147 (dump_func)dump_set_mailslot_info_reply,
5148 (dump_func)dump_create_directory_reply,
5149 (dump_func)dump_open_directory_reply,
5150 (dump_func)dump_get_directory_entry_reply,
5151 (dump_func)dump_create_symlink_reply,
5152 (dump_func)dump_open_symlink_reply,
5153 (dump_func)dump_query_symlink_reply,
5154 (dump_func)dump_get_object_info_reply,
5155 (dump_func)dump_get_object_type_reply,
5156 NULL,
5157 (dump_func)dump_get_token_impersonation_level_reply,
5158 (dump_func)dump_allocate_locally_unique_id_reply,
5159 (dump_func)dump_create_device_manager_reply,
5160 NULL,
5161 NULL,
5162 (dump_func)dump_get_next_device_request_reply,
5163 (dump_func)dump_get_kernel_object_ptr_reply,
5164 NULL,
5165 NULL,
5166 NULL,
5167 (dump_func)dump_get_kernel_object_handle_reply,
5168 (dump_func)dump_make_process_system_reply,
5169 (dump_func)dump_get_token_statistics_reply,
5170 (dump_func)dump_create_completion_reply,
5171 (dump_func)dump_open_completion_reply,
5172 NULL,
5173 (dump_func)dump_remove_completion_reply,
5174 (dump_func)dump_query_completion_reply,
5175 NULL,
5176 NULL,
5177 NULL,
5178 NULL,
5179 NULL,
5180 (dump_func)dump_get_window_layered_info_reply,
5181 NULL,
5182 (dump_func)dump_alloc_user_handle_reply,
5183 NULL,
5184 (dump_func)dump_set_cursor_reply,
5185 NULL,
5186 (dump_func)dump_get_suspend_context_reply,
5187 NULL,
5188 (dump_func)dump_create_job_reply,
5189 (dump_func)dump_open_job_reply,
5190 NULL,
5191 NULL,
5192 NULL,
5193 NULL,
5194 NULL,
5195 NULL,
5196 NULL,
5199 static const char * const req_names[REQ_NB_REQUESTS] = {
5200 "new_process",
5201 "exec_process",
5202 "get_new_process_info",
5203 "new_thread",
5204 "get_startup_info",
5205 "init_process_done",
5206 "init_thread",
5207 "terminate_process",
5208 "terminate_thread",
5209 "get_process_info",
5210 "get_process_vm_counters",
5211 "set_process_info",
5212 "get_thread_info",
5213 "get_thread_times",
5214 "set_thread_info",
5215 "get_dll_info",
5216 "suspend_thread",
5217 "resume_thread",
5218 "load_dll",
5219 "unload_dll",
5220 "queue_apc",
5221 "get_apc_result",
5222 "close_handle",
5223 "set_handle_info",
5224 "dup_handle",
5225 "open_process",
5226 "open_thread",
5227 "select",
5228 "create_event",
5229 "event_op",
5230 "query_event",
5231 "open_event",
5232 "create_keyed_event",
5233 "open_keyed_event",
5234 "create_mutex",
5235 "release_mutex",
5236 "open_mutex",
5237 "query_mutex",
5238 "create_semaphore",
5239 "release_semaphore",
5240 "query_semaphore",
5241 "open_semaphore",
5242 "create_file",
5243 "open_file_object",
5244 "alloc_file_handle",
5245 "get_handle_unix_name",
5246 "get_handle_fd",
5247 "get_directory_cache_entry",
5248 "flush",
5249 "get_file_info",
5250 "get_volume_info",
5251 "lock_file",
5252 "unlock_file",
5253 "create_socket",
5254 "accept_socket",
5255 "accept_into_socket",
5256 "set_socket_event",
5257 "get_socket_event",
5258 "get_socket_info",
5259 "enable_socket_event",
5260 "set_socket_deferred",
5261 "alloc_console",
5262 "free_console",
5263 "get_console_renderer_events",
5264 "open_console",
5265 "attach_console",
5266 "get_console_wait_event",
5267 "get_console_mode",
5268 "set_console_mode",
5269 "set_console_input_info",
5270 "get_console_input_info",
5271 "append_console_input_history",
5272 "get_console_input_history",
5273 "create_console_output",
5274 "set_console_output_info",
5275 "get_console_output_info",
5276 "write_console_input",
5277 "read_console_input",
5278 "write_console_output",
5279 "fill_console_output",
5280 "read_console_output",
5281 "move_console_output",
5282 "send_console_signal",
5283 "read_directory_changes",
5284 "read_change",
5285 "create_mapping",
5286 "open_mapping",
5287 "get_mapping_info",
5288 "map_view",
5289 "unmap_view",
5290 "get_mapping_committed_range",
5291 "add_mapping_committed_range",
5292 "is_same_mapping",
5293 "create_snapshot",
5294 "next_process",
5295 "next_thread",
5296 "wait_debug_event",
5297 "queue_exception_event",
5298 "get_exception_status",
5299 "continue_debug_event",
5300 "debug_process",
5301 "debug_break",
5302 "set_debugger_kill_on_exit",
5303 "read_process_memory",
5304 "write_process_memory",
5305 "create_key",
5306 "open_key",
5307 "delete_key",
5308 "flush_key",
5309 "enum_key",
5310 "set_key_value",
5311 "get_key_value",
5312 "enum_key_value",
5313 "delete_key_value",
5314 "load_registry",
5315 "unload_registry",
5316 "save_registry",
5317 "set_registry_notification",
5318 "create_timer",
5319 "open_timer",
5320 "set_timer",
5321 "cancel_timer",
5322 "get_timer_info",
5323 "get_thread_context",
5324 "set_thread_context",
5325 "get_selector_entry",
5326 "add_atom",
5327 "delete_atom",
5328 "find_atom",
5329 "get_atom_information",
5330 "set_atom_information",
5331 "empty_atom_table",
5332 "init_atom_table",
5333 "get_msg_queue",
5334 "set_queue_fd",
5335 "set_queue_mask",
5336 "get_queue_status",
5337 "get_process_idle_event",
5338 "send_message",
5339 "post_quit_message",
5340 "send_hardware_message",
5341 "get_message",
5342 "reply_message",
5343 "accept_hardware_message",
5344 "get_message_reply",
5345 "set_win_timer",
5346 "kill_win_timer",
5347 "is_window_hung",
5348 "get_serial_info",
5349 "set_serial_info",
5350 "register_async",
5351 "cancel_async",
5352 "get_async_result",
5353 "read",
5354 "write",
5355 "ioctl",
5356 "set_irp_result",
5357 "create_named_pipe",
5358 "set_named_pipe_info",
5359 "create_window",
5360 "destroy_window",
5361 "get_desktop_window",
5362 "set_window_owner",
5363 "get_window_info",
5364 "set_window_info",
5365 "set_parent",
5366 "get_window_parents",
5367 "get_window_children",
5368 "get_window_children_from_point",
5369 "get_window_tree",
5370 "set_window_pos",
5371 "get_window_rectangles",
5372 "get_window_text",
5373 "set_window_text",
5374 "get_windows_offset",
5375 "get_visible_region",
5376 "get_surface_region",
5377 "get_window_region",
5378 "set_window_region",
5379 "get_update_region",
5380 "update_window_zorder",
5381 "redraw_window",
5382 "set_window_property",
5383 "remove_window_property",
5384 "get_window_property",
5385 "get_window_properties",
5386 "create_winstation",
5387 "open_winstation",
5388 "close_winstation",
5389 "get_process_winstation",
5390 "set_process_winstation",
5391 "enum_winstation",
5392 "create_desktop",
5393 "open_desktop",
5394 "open_input_desktop",
5395 "close_desktop",
5396 "get_thread_desktop",
5397 "set_thread_desktop",
5398 "enum_desktop",
5399 "set_user_object_info",
5400 "register_hotkey",
5401 "unregister_hotkey",
5402 "attach_thread_input",
5403 "get_thread_input",
5404 "get_last_input_time",
5405 "get_key_state",
5406 "set_key_state",
5407 "set_foreground_window",
5408 "set_focus_window",
5409 "set_active_window",
5410 "set_capture_window",
5411 "set_caret_window",
5412 "set_caret_info",
5413 "set_hook",
5414 "remove_hook",
5415 "start_hook_chain",
5416 "finish_hook_chain",
5417 "get_hook_info",
5418 "create_class",
5419 "destroy_class",
5420 "set_class_info",
5421 "open_clipboard",
5422 "close_clipboard",
5423 "empty_clipboard",
5424 "set_clipboard_data",
5425 "get_clipboard_data",
5426 "get_clipboard_formats",
5427 "enum_clipboard_formats",
5428 "release_clipboard",
5429 "get_clipboard_info",
5430 "set_clipboard_viewer",
5431 "add_clipboard_listener",
5432 "remove_clipboard_listener",
5433 "open_token",
5434 "set_global_windows",
5435 "adjust_token_privileges",
5436 "get_token_privileges",
5437 "check_token_privileges",
5438 "duplicate_token",
5439 "access_check",
5440 "get_token_sid",
5441 "get_token_groups",
5442 "get_token_default_dacl",
5443 "set_token_default_dacl",
5444 "set_security_object",
5445 "get_security_object",
5446 "get_system_handles",
5447 "create_mailslot",
5448 "set_mailslot_info",
5449 "create_directory",
5450 "open_directory",
5451 "get_directory_entry",
5452 "create_symlink",
5453 "open_symlink",
5454 "query_symlink",
5455 "get_object_info",
5456 "get_object_type",
5457 "unlink_object",
5458 "get_token_impersonation_level",
5459 "allocate_locally_unique_id",
5460 "create_device_manager",
5461 "create_device",
5462 "delete_device",
5463 "get_next_device_request",
5464 "get_kernel_object_ptr",
5465 "set_kernel_object_ptr",
5466 "grab_kernel_object",
5467 "release_kernel_object",
5468 "get_kernel_object_handle",
5469 "make_process_system",
5470 "get_token_statistics",
5471 "create_completion",
5472 "open_completion",
5473 "add_completion",
5474 "remove_completion",
5475 "query_completion",
5476 "set_completion_info",
5477 "add_fd_completion",
5478 "set_fd_completion_mode",
5479 "set_fd_disp_info",
5480 "set_fd_name_info",
5481 "get_window_layered_info",
5482 "set_window_layered_info",
5483 "alloc_user_handle",
5484 "free_user_handle",
5485 "set_cursor",
5486 "update_rawinput_devices",
5487 "get_suspend_context",
5488 "set_suspend_context",
5489 "create_job",
5490 "open_job",
5491 "assign_job",
5492 "process_in_job",
5493 "set_job_limits",
5494 "set_job_completion_port",
5495 "terminate_job",
5496 "suspend_process",
5497 "resume_process",
5500 static const struct
5502 const char *name;
5503 unsigned int value;
5504 } status_names[] =
5506 { "ABANDONED_WAIT_0", STATUS_ABANDONED_WAIT_0 },
5507 { "ACCESS_DENIED", STATUS_ACCESS_DENIED },
5508 { "ACCESS_VIOLATION", STATUS_ACCESS_VIOLATION },
5509 { "ADDRESS_ALREADY_ASSOCIATED", STATUS_ADDRESS_ALREADY_ASSOCIATED },
5510 { "ALERTED", STATUS_ALERTED },
5511 { "ALIAS_EXISTS", STATUS_ALIAS_EXISTS },
5512 { "BAD_DEVICE_TYPE", STATUS_BAD_DEVICE_TYPE },
5513 { "BAD_IMPERSONATION_LEVEL", STATUS_BAD_IMPERSONATION_LEVEL },
5514 { "BREAKPOINT", STATUS_BREAKPOINT },
5515 { "BUFFER_OVERFLOW", STATUS_BUFFER_OVERFLOW },
5516 { "BUFFER_TOO_SMALL", STATUS_BUFFER_TOO_SMALL },
5517 { "CANCELLED", STATUS_CANCELLED },
5518 { "CANNOT_DELETE", STATUS_CANNOT_DELETE },
5519 { "CANT_OPEN_ANONYMOUS", STATUS_CANT_OPEN_ANONYMOUS },
5520 { "CANT_WAIT", STATUS_CANT_WAIT },
5521 { "CHILD_MUST_BE_VOLATILE", STATUS_CHILD_MUST_BE_VOLATILE },
5522 { "CONNECTION_ABORTED", STATUS_CONNECTION_ABORTED },
5523 { "CONNECTION_DISCONNECTED", STATUS_CONNECTION_DISCONNECTED },
5524 { "CONNECTION_REFUSED", STATUS_CONNECTION_REFUSED },
5525 { "CONNECTION_RESET", STATUS_CONNECTION_RESET },
5526 { "DEBUGGER_INACTIVE", STATUS_DEBUGGER_INACTIVE },
5527 { "DEVICE_BUSY", STATUS_DEVICE_BUSY },
5528 { "DIRECTORY_NOT_EMPTY", STATUS_DIRECTORY_NOT_EMPTY },
5529 { "DISK_FULL", STATUS_DISK_FULL },
5530 { "DLL_NOT_FOUND", STATUS_DLL_NOT_FOUND },
5531 { "ERROR_CLASS_ALREADY_EXISTS", 0xc0010000 | ERROR_CLASS_ALREADY_EXISTS },
5532 { "ERROR_CLASS_DOES_NOT_EXIST", 0xc0010000 | ERROR_CLASS_DOES_NOT_EXIST },
5533 { "ERROR_CLASS_HAS_WINDOWS", 0xc0010000 | ERROR_CLASS_HAS_WINDOWS },
5534 { "ERROR_CLIPBOARD_NOT_OPEN", 0xc0010000 | ERROR_CLIPBOARD_NOT_OPEN },
5535 { "ERROR_HOTKEY_ALREADY_REGISTERED", 0xc0010000 | ERROR_HOTKEY_ALREADY_REGISTERED },
5536 { "ERROR_HOTKEY_NOT_REGISTERED", 0xc0010000 | ERROR_HOTKEY_NOT_REGISTERED },
5537 { "ERROR_INVALID_CURSOR_HANDLE", 0xc0010000 | ERROR_INVALID_CURSOR_HANDLE },
5538 { "ERROR_INVALID_INDEX", 0xc0010000 | ERROR_INVALID_INDEX },
5539 { "ERROR_INVALID_WINDOW_HANDLE", 0xc0010000 | ERROR_INVALID_WINDOW_HANDLE },
5540 { "ERROR_NO_MORE_USER_HANDLES", 0xc0010000 | ERROR_NO_MORE_USER_HANDLES },
5541 { "ERROR_WINDOW_OF_OTHER_THREAD", 0xc0010000 | ERROR_WINDOW_OF_OTHER_THREAD },
5542 { "FILE_DELETED", STATUS_FILE_DELETED },
5543 { "FILE_IS_A_DIRECTORY", STATUS_FILE_IS_A_DIRECTORY },
5544 { "FILE_LOCK_CONFLICT", STATUS_FILE_LOCK_CONFLICT },
5545 { "GENERIC_NOT_MAPPED", STATUS_GENERIC_NOT_MAPPED },
5546 { "HANDLES_CLOSED", STATUS_HANDLES_CLOSED },
5547 { "HANDLE_NOT_CLOSABLE", STATUS_HANDLE_NOT_CLOSABLE },
5548 { "HOST_UNREACHABLE", STATUS_HOST_UNREACHABLE },
5549 { "ILLEGAL_FUNCTION", STATUS_ILLEGAL_FUNCTION },
5550 { "INFO_LENGTH_MISMATCH", STATUS_INFO_LENGTH_MISMATCH },
5551 { "INSTANCE_NOT_AVAILABLE", STATUS_INSTANCE_NOT_AVAILABLE },
5552 { "INSUFFICIENT_RESOURCES", STATUS_INSUFFICIENT_RESOURCES },
5553 { "INVALID_CID", STATUS_INVALID_CID },
5554 { "INVALID_DEVICE_REQUEST", STATUS_INVALID_DEVICE_REQUEST },
5555 { "INVALID_FILE_FOR_SECTION", STATUS_INVALID_FILE_FOR_SECTION },
5556 { "INVALID_HANDLE", STATUS_INVALID_HANDLE },
5557 { "INVALID_IMAGE_FORMAT", STATUS_INVALID_IMAGE_FORMAT },
5558 { "INVALID_IMAGE_NE_FORMAT", STATUS_INVALID_IMAGE_NE_FORMAT },
5559 { "INVALID_IMAGE_NOT_MZ", STATUS_INVALID_IMAGE_NOT_MZ },
5560 { "INVALID_IMAGE_PROTECT", STATUS_INVALID_IMAGE_PROTECT },
5561 { "INVALID_IMAGE_WIN_16", STATUS_INVALID_IMAGE_WIN_16 },
5562 { "INVALID_IMAGE_WIN_64", STATUS_INVALID_IMAGE_WIN_64 },
5563 { "INVALID_LOCK_SEQUENCE", STATUS_INVALID_LOCK_SEQUENCE },
5564 { "INVALID_OWNER", STATUS_INVALID_OWNER },
5565 { "INVALID_PARAMETER", STATUS_INVALID_PARAMETER },
5566 { "INVALID_PIPE_STATE", STATUS_INVALID_PIPE_STATE },
5567 { "INVALID_READ_MODE", STATUS_INVALID_READ_MODE },
5568 { "INVALID_SECURITY_DESCR", STATUS_INVALID_SECURITY_DESCR },
5569 { "IO_TIMEOUT", STATUS_IO_TIMEOUT },
5570 { "KEY_DELETED", STATUS_KEY_DELETED },
5571 { "MAPPED_FILE_SIZE_ZERO", STATUS_MAPPED_FILE_SIZE_ZERO },
5572 { "MORE_PROCESSING_REQUIRED", STATUS_MORE_PROCESSING_REQUIRED },
5573 { "MUTANT_NOT_OWNED", STATUS_MUTANT_NOT_OWNED },
5574 { "NAME_TOO_LONG", STATUS_NAME_TOO_LONG },
5575 { "NETWORK_BUSY", STATUS_NETWORK_BUSY },
5576 { "NETWORK_UNREACHABLE", STATUS_NETWORK_UNREACHABLE },
5577 { "NOT_ALL_ASSIGNED", STATUS_NOT_ALL_ASSIGNED },
5578 { "NOT_A_DIRECTORY", STATUS_NOT_A_DIRECTORY },
5579 { "NOT_FOUND", STATUS_NOT_FOUND },
5580 { "NOT_IMPLEMENTED", STATUS_NOT_IMPLEMENTED },
5581 { "NOT_MAPPED_VIEW", STATUS_NOT_MAPPED_VIEW },
5582 { "NOT_REGISTRY_FILE", STATUS_NOT_REGISTRY_FILE },
5583 { "NOT_SAME_DEVICE", STATUS_NOT_SAME_DEVICE },
5584 { "NOT_SUPPORTED", STATUS_NOT_SUPPORTED },
5585 { "NO_DATA_DETECTED", STATUS_NO_DATA_DETECTED },
5586 { "NO_IMPERSONATION_TOKEN", STATUS_NO_IMPERSONATION_TOKEN },
5587 { "NO_MEMORY", STATUS_NO_MEMORY },
5588 { "NO_MORE_ENTRIES", STATUS_NO_MORE_ENTRIES },
5589 { "NO_MORE_FILES", STATUS_NO_MORE_FILES },
5590 { "NO_SUCH_DEVICE", STATUS_NO_SUCH_DEVICE },
5591 { "NO_SUCH_FILE", STATUS_NO_SUCH_FILE },
5592 { "NO_TOKEN", STATUS_NO_TOKEN },
5593 { "OBJECT_NAME_COLLISION", STATUS_OBJECT_NAME_COLLISION },
5594 { "OBJECT_NAME_EXISTS", STATUS_OBJECT_NAME_EXISTS },
5595 { "OBJECT_NAME_INVALID", STATUS_OBJECT_NAME_INVALID },
5596 { "OBJECT_NAME_NOT_FOUND", STATUS_OBJECT_NAME_NOT_FOUND },
5597 { "OBJECT_PATH_INVALID", STATUS_OBJECT_PATH_INVALID },
5598 { "OBJECT_PATH_NOT_FOUND", STATUS_OBJECT_PATH_NOT_FOUND },
5599 { "OBJECT_PATH_SYNTAX_BAD", STATUS_OBJECT_PATH_SYNTAX_BAD },
5600 { "OBJECT_TYPE_MISMATCH", STATUS_OBJECT_TYPE_MISMATCH },
5601 { "PENDING", STATUS_PENDING },
5602 { "PIPE_BROKEN", STATUS_PIPE_BROKEN },
5603 { "PIPE_BUSY", STATUS_PIPE_BUSY },
5604 { "PIPE_CLOSING", STATUS_PIPE_CLOSING },
5605 { "PIPE_CONNECTED", STATUS_PIPE_CONNECTED },
5606 { "PIPE_DISCONNECTED", STATUS_PIPE_DISCONNECTED },
5607 { "PIPE_LISTENING", STATUS_PIPE_LISTENING },
5608 { "PIPE_NOT_AVAILABLE", STATUS_PIPE_NOT_AVAILABLE },
5609 { "PRIVILEGE_NOT_HELD", STATUS_PRIVILEGE_NOT_HELD },
5610 { "PROCESS_IN_JOB", STATUS_PROCESS_IN_JOB },
5611 { "PROCESS_IS_TERMINATING", STATUS_PROCESS_IS_TERMINATING },
5612 { "PROCESS_NOT_IN_JOB", STATUS_PROCESS_NOT_IN_JOB },
5613 { "SECTION_TOO_BIG", STATUS_SECTION_TOO_BIG },
5614 { "SEMAPHORE_LIMIT_EXCEEDED", STATUS_SEMAPHORE_LIMIT_EXCEEDED },
5615 { "SHARING_VIOLATION", STATUS_SHARING_VIOLATION },
5616 { "SHUTDOWN_IN_PROGRESS", STATUS_SHUTDOWN_IN_PROGRESS },
5617 { "SUSPEND_COUNT_EXCEEDED", STATUS_SUSPEND_COUNT_EXCEEDED },
5618 { "THREAD_IS_TERMINATING", STATUS_THREAD_IS_TERMINATING },
5619 { "TIMEOUT", STATUS_TIMEOUT },
5620 { "TOO_MANY_OPENED_FILES", STATUS_TOO_MANY_OPENED_FILES },
5621 { "UNSUCCESSFUL", STATUS_UNSUCCESSFUL },
5622 { "USER_APC", STATUS_USER_APC },
5623 { "USER_MAPPED_FILE", STATUS_USER_MAPPED_FILE },
5624 { "VOLUME_DISMOUNTED", STATUS_VOLUME_DISMOUNTED },
5625 { "WAS_LOCKED", STATUS_WAS_LOCKED },
5626 { "WSAEACCES", 0xc0010000 | WSAEACCES },
5627 { "WSAEADDRINUSE", 0xc0010000 | WSAEADDRINUSE },
5628 { "WSAEADDRNOTAVAIL", 0xc0010000 | WSAEADDRNOTAVAIL },
5629 { "WSAEAFNOSUPPORT", 0xc0010000 | WSAEAFNOSUPPORT },
5630 { "WSAEALREADY", 0xc0010000 | WSAEALREADY },
5631 { "WSAEBADF", 0xc0010000 | WSAEBADF },
5632 { "WSAECONNABORTED", 0xc0010000 | WSAECONNABORTED },
5633 { "WSAECONNREFUSED", 0xc0010000 | WSAECONNREFUSED },
5634 { "WSAECONNRESET", 0xc0010000 | WSAECONNRESET },
5635 { "WSAEDESTADDRREQ", 0xc0010000 | WSAEDESTADDRREQ },
5636 { "WSAEDQUOT", 0xc0010000 | WSAEDQUOT },
5637 { "WSAEFAULT", 0xc0010000 | WSAEFAULT },
5638 { "WSAEHOSTDOWN", 0xc0010000 | WSAEHOSTDOWN },
5639 { "WSAEHOSTUNREACH", 0xc0010000 | WSAEHOSTUNREACH },
5640 { "WSAEINPROGRESS", 0xc0010000 | WSAEINPROGRESS },
5641 { "WSAEINTR", 0xc0010000 | WSAEINTR },
5642 { "WSAEINVAL", 0xc0010000 | WSAEINVAL },
5643 { "WSAEISCONN", 0xc0010000 | WSAEISCONN },
5644 { "WSAELOOP", 0xc0010000 | WSAELOOP },
5645 { "WSAEMFILE", 0xc0010000 | WSAEMFILE },
5646 { "WSAEMSGSIZE", 0xc0010000 | WSAEMSGSIZE },
5647 { "WSAENAMETOOLONG", 0xc0010000 | WSAENAMETOOLONG },
5648 { "WSAENETDOWN", 0xc0010000 | WSAENETDOWN },
5649 { "WSAENETRESET", 0xc0010000 | WSAENETRESET },
5650 { "WSAENETUNREACH", 0xc0010000 | WSAENETUNREACH },
5651 { "WSAENOBUFS", 0xc0010000 | WSAENOBUFS },
5652 { "WSAENOPROTOOPT", 0xc0010000 | WSAENOPROTOOPT },
5653 { "WSAENOTCONN", 0xc0010000 | WSAENOTCONN },
5654 { "WSAENOTEMPTY", 0xc0010000 | WSAENOTEMPTY },
5655 { "WSAENOTSOCK", 0xc0010000 | WSAENOTSOCK },
5656 { "WSAEOPNOTSUPP", 0xc0010000 | WSAEOPNOTSUPP },
5657 { "WSAEPFNOSUPPORT", 0xc0010000 | WSAEPFNOSUPPORT },
5658 { "WSAEPROCLIM", 0xc0010000 | WSAEPROCLIM },
5659 { "WSAEPROTONOSUPPORT", 0xc0010000 | WSAEPROTONOSUPPORT },
5660 { "WSAEPROTOTYPE", 0xc0010000 | WSAEPROTOTYPE },
5661 { "WSAEREMOTE", 0xc0010000 | WSAEREMOTE },
5662 { "WSAESHUTDOWN", 0xc0010000 | WSAESHUTDOWN },
5663 { "WSAESOCKTNOSUPPORT", 0xc0010000 | WSAESOCKTNOSUPPORT },
5664 { "WSAESTALE", 0xc0010000 | WSAESTALE },
5665 { "WSAETIMEDOUT", 0xc0010000 | WSAETIMEDOUT },
5666 { "WSAETOOMANYREFS", 0xc0010000 | WSAETOOMANYREFS },
5667 { "WSAEUSERS", 0xc0010000 | WSAEUSERS },
5668 { "WSAEWOULDBLOCK", 0xc0010000 | WSAEWOULDBLOCK },
5669 { NULL, 0 }
5672 /* ### make_requests end ### */
5673 /* Everything above this line is generated automatically by tools/make_requests */
5675 static const char *get_status_name( unsigned int status )
5677 int i;
5678 static char buffer[10];
5680 if (status)
5682 for (i = 0; status_names[i].name; i++)
5683 if (status_names[i].value == status) return status_names[i].name;
5685 sprintf( buffer, "%x", status );
5686 return buffer;
5689 void trace_request(void)
5691 enum request req = current->req.request_header.req;
5692 if (req < REQ_NB_REQUESTS)
5694 fprintf( stderr, "%04x: %s(", current->id, req_names[req] );
5695 if (req_dumpers[req])
5697 cur_data = get_req_data();
5698 cur_size = get_req_data_size();
5699 req_dumpers[req]( &current->req );
5701 fprintf( stderr, " )\n" );
5703 else fprintf( stderr, "%04x: %d(?)\n", current->id, req );
5706 void trace_reply( enum request req, const union generic_reply *reply )
5708 if (req < REQ_NB_REQUESTS)
5710 fprintf( stderr, "%04x: %s() = %s",
5711 current->id, req_names[req], get_status_name(current->error) );
5712 if (reply_dumpers[req])
5714 fprintf( stderr, " {" );
5715 cur_data = current->reply_data;
5716 cur_size = reply->reply_header.reply_size;
5717 reply_dumpers[req]( reply );
5718 fprintf( stderr, " }" );
5720 fputc( '\n', stderr );
5722 else fprintf( stderr, "%04x: %d() = %s\n",
5723 current->id, req, get_status_name(current->error) );