include/dwrite.idl: Fix typo in DWRITE_INFORMATIONAL_STRING_WWS_FAMILY_NAME member...
[wine.git] / server / trace.c
blobca2cbb90741e9bc2bb4dd13718b1ec87baa5deba
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_abstime( const char *prefix, const abstime_t *when )
93 timeout_t timeout = abstime_to_timeout( *when );
94 dump_timeout( prefix, &timeout );
97 static void dump_uint64( const char *prefix, const unsigned __int64 *val )
99 if ((unsigned int)*val != *val)
100 fprintf( stderr, "%s%x%08x", prefix, (unsigned int)(*val >> 32), (unsigned int)*val );
101 else
102 fprintf( stderr, "%s%08x", prefix, (unsigned int)*val );
105 static void dump_rectangle( const char *prefix, const rectangle_t *rect )
107 fprintf( stderr, "%s{%d,%d;%d,%d}", prefix,
108 rect->left, rect->top, rect->right, rect->bottom );
111 static void dump_char_info( const char *prefix, const char_info_t *info )
113 fprintf( stderr, "%s{'", prefix );
114 dump_strW( &info->ch, sizeof(info->ch), stderr, "\'\'" );
115 fprintf( stderr, "',%04x}", info->attr );
118 static void dump_ioctl_code( const char *prefix, const ioctl_code_t *code )
120 switch(*code)
122 #define CASE(c) case c: fprintf( stderr, "%s%s", prefix, #c ); break
123 CASE(FSCTL_DISMOUNT_VOLUME);
124 CASE(FSCTL_PIPE_DISCONNECT);
125 CASE(FSCTL_PIPE_LISTEN);
126 CASE(FSCTL_PIPE_PEEK);
127 CASE(FSCTL_PIPE_WAIT);
128 CASE(IOCTL_SERIAL_GET_TIMEOUTS);
129 CASE(IOCTL_SERIAL_GET_WAIT_MASK);
130 CASE(IOCTL_SERIAL_SET_TIMEOUTS);
131 CASE(IOCTL_SERIAL_SET_WAIT_MASK);
132 CASE(WS_SIO_ADDRESS_LIST_CHANGE);
133 default: fprintf( stderr, "%s%08x", prefix, *code ); break;
134 #undef CASE
138 static void dump_client_cpu( const char *prefix, const client_cpu_t *code )
140 switch (*code)
142 #define CASE(c) case CPU_##c: fprintf( stderr, "%s%s", prefix, #c ); break
143 CASE(x86);
144 CASE(x86_64);
145 CASE(POWERPC);
146 CASE(ARM);
147 CASE(ARM64);
148 default: fprintf( stderr, "%s%u", prefix, *code ); break;
149 #undef CASE
153 static void dump_apc_call( const char *prefix, const apc_call_t *call )
155 fprintf( stderr, "%s{", prefix );
156 switch(call->type)
158 case APC_NONE:
159 fprintf( stderr, "APC_NONE" );
160 break;
161 case APC_USER:
162 dump_uint64( "APC_USER,func=", &call->user.user.func );
163 dump_uint64( ",args={", &call->user.user.args[0] );
164 dump_uint64( ",", &call->user.user.args[1] );
165 dump_uint64( ",", &call->user.user.args[2] );
166 fputc( '}', stderr );
167 break;
168 case APC_TIMER:
169 dump_timeout( "APC_TIMER,time=", &call->user.timer.time );
170 dump_uint64( ",arg=", &call->user.timer.arg );
171 break;
172 case APC_ASYNC_IO:
173 dump_uint64( "APC_ASYNC_IO,user=", &call->async_io.user );
174 dump_uint64( ",sb=", &call->async_io.sb );
175 fprintf( stderr, ",status=%s", get_status_name(call->async_io.status) );
176 break;
177 case APC_VIRTUAL_ALLOC:
178 dump_uint64( "APC_VIRTUAL_ALLOC,addr==", &call->virtual_alloc.addr );
179 dump_uint64( ",size=", &call->virtual_alloc.size );
180 fprintf( stderr, ",zero_bits_64=%u,op_type=%x,prot=%x",
181 call->virtual_alloc.zero_bits_64, call->virtual_alloc.op_type,
182 call->virtual_alloc.prot );
183 break;
184 case APC_VIRTUAL_FREE:
185 dump_uint64( "APC_VIRTUAL_FREE,addr=", &call->virtual_free.addr );
186 dump_uint64( ",size=", &call->virtual_free.size );
187 fprintf( stderr, ",op_type=%x", call->virtual_free.op_type );
188 break;
189 case APC_VIRTUAL_QUERY:
190 dump_uint64( "APC_VIRTUAL_QUERY,addr=", &call->virtual_query.addr );
191 break;
192 case APC_VIRTUAL_PROTECT:
193 dump_uint64( "APC_VIRTUAL_PROTECT,addr=", &call->virtual_protect.addr );
194 dump_uint64( ",size=", &call->virtual_protect.size );
195 fprintf( stderr, ",prot=%x", call->virtual_protect.prot );
196 break;
197 case APC_VIRTUAL_FLUSH:
198 dump_uint64( "APC_VIRTUAL_FLUSH,addr=", &call->virtual_flush.addr );
199 dump_uint64( ",size=", &call->virtual_flush.size );
200 break;
201 case APC_VIRTUAL_LOCK:
202 dump_uint64( "APC_VIRTUAL_LOCK,addr=", &call->virtual_lock.addr );
203 dump_uint64( ",size=", &call->virtual_lock.size );
204 break;
205 case APC_VIRTUAL_UNLOCK:
206 dump_uint64( "APC_VIRTUAL_UNLOCK,addr=", &call->virtual_unlock.addr );
207 dump_uint64( ",size=", &call->virtual_unlock.size );
208 break;
209 case APC_MAP_VIEW:
210 fprintf( stderr, "APC_MAP_VIEW,handle=%04x", call->map_view.handle );
211 dump_uint64( ",addr=", &call->map_view.addr );
212 dump_uint64( ",size=", &call->map_view.size );
213 dump_uint64( ",offset=", &call->map_view.offset );
214 fprintf( stderr, ",zero_bits_64=%u,alloc_type=%x,prot=%x",
215 call->map_view.zero_bits_64, call->map_view.alloc_type, call->map_view.prot );
216 break;
217 case APC_UNMAP_VIEW:
218 dump_uint64( "APC_UNMAP_VIEW,addr=", &call->unmap_view.addr );
219 break;
220 case APC_CREATE_THREAD:
221 dump_uint64( "APC_CREATE_THREAD,func=", &call->create_thread.func );
222 dump_uint64( ",arg=", &call->create_thread.arg );
223 dump_uint64( ",reserve=", &call->create_thread.reserve );
224 dump_uint64( ",commit=", &call->create_thread.commit );
225 fprintf( stderr, ",suspend=%u", call->create_thread.suspend );
226 break;
227 case APC_BREAK_PROCESS:
228 fprintf( stderr, "APC_BREAK_PROCESS" );
229 break;
230 default:
231 fprintf( stderr, "type=%u", call->type );
232 break;
234 fputc( '}', stderr );
237 static void dump_apc_result( const char *prefix, const apc_result_t *result )
239 fprintf( stderr, "%s{", prefix );
240 switch(result->type)
242 case APC_NONE:
243 break;
244 case APC_ASYNC_IO:
245 fprintf( stderr, "APC_ASYNC_IO,status=%s,total=%u",
246 get_status_name( result->async_io.status ), result->async_io.total );
247 break;
248 case APC_VIRTUAL_ALLOC:
249 fprintf( stderr, "APC_VIRTUAL_ALLOC,status=%s",
250 get_status_name( result->virtual_alloc.status ));
251 dump_uint64( ",addr=", &result->virtual_alloc.addr );
252 dump_uint64( ",size=", &result->virtual_alloc.size );
253 break;
254 case APC_VIRTUAL_FREE:
255 fprintf( stderr, "APC_VIRTUAL_FREE,status=%s",
256 get_status_name( result->virtual_free.status ));
257 dump_uint64( ",addr=", &result->virtual_free.addr );
258 dump_uint64( ",size=", &result->virtual_free.size );
259 break;
260 case APC_VIRTUAL_QUERY:
261 fprintf( stderr, "APC_VIRTUAL_QUERY,status=%s",
262 get_status_name( result->virtual_query.status ));
263 dump_uint64( ",base=", &result->virtual_query.base );
264 dump_uint64( ",alloc_base=", &result->virtual_query.alloc_base );
265 dump_uint64( ",size=", &result->virtual_query.size );
266 fprintf( stderr, ",state=%x,prot=%x,alloc_prot=%x,alloc_type=%x",
267 result->virtual_query.state, result->virtual_query.prot,
268 result->virtual_query.alloc_prot, result->virtual_query.alloc_type );
269 break;
270 case APC_VIRTUAL_PROTECT:
271 fprintf( stderr, "APC_VIRTUAL_PROTECT,status=%s",
272 get_status_name( result->virtual_protect.status ));
273 dump_uint64( ",addr=", &result->virtual_protect.addr );
274 dump_uint64( ",size=", &result->virtual_protect.size );
275 fprintf( stderr, ",prot=%x", result->virtual_protect.prot );
276 break;
277 case APC_VIRTUAL_FLUSH:
278 fprintf( stderr, "APC_VIRTUAL_FLUSH,status=%s",
279 get_status_name( result->virtual_flush.status ));
280 dump_uint64( ",addr=", &result->virtual_flush.addr );
281 dump_uint64( ",size=", &result->virtual_flush.size );
282 break;
283 case APC_VIRTUAL_LOCK:
284 fprintf( stderr, "APC_VIRTUAL_LOCK,status=%s",
285 get_status_name( result->virtual_lock.status ));
286 dump_uint64( ",addr=", &result->virtual_lock.addr );
287 dump_uint64( ",size=", &result->virtual_lock.size );
288 break;
289 case APC_VIRTUAL_UNLOCK:
290 fprintf( stderr, "APC_VIRTUAL_UNLOCK,status=%s",
291 get_status_name( result->virtual_unlock.status ));
292 dump_uint64( ",addr=", &result->virtual_unlock.addr );
293 dump_uint64( ",size=", &result->virtual_unlock.size );
294 break;
295 case APC_MAP_VIEW:
296 fprintf( stderr, "APC_MAP_VIEW,status=%s",
297 get_status_name( result->map_view.status ));
298 dump_uint64( ",addr=", &result->map_view.addr );
299 dump_uint64( ",size=", &result->map_view.size );
300 break;
301 case APC_UNMAP_VIEW:
302 fprintf( stderr, "APC_UNMAP_VIEW,status=%s",
303 get_status_name( result->unmap_view.status ) );
304 break;
305 case APC_CREATE_THREAD:
306 fprintf( stderr, "APC_CREATE_THREAD,status=%s,tid=%04x,handle=%04x",
307 get_status_name( result->create_thread.status ),
308 result->create_thread.tid, result->create_thread.handle );
309 break;
310 case APC_BREAK_PROCESS:
311 fprintf( stderr, "APC_BREAK_PROCESS,status=%s", get_status_name( result->break_process.status ) );
312 break;
313 default:
314 fprintf( stderr, "type=%u", result->type );
315 break;
317 fputc( '}', stderr );
320 static void dump_async_data( const char *prefix, const async_data_t *data )
322 fprintf( stderr, "%s{handle=%04x,event=%04x", prefix, data->handle, data->event );
323 dump_uint64( ",iosb=", &data->iosb );
324 dump_uint64( ",user=", &data->user );
325 dump_uint64( ",apc=", &data->apc );
326 dump_uint64( ",apc_context=", &data->apc_context );
327 fputc( '}', stderr );
330 static void dump_irp_params( const char *prefix, const irp_params_t *data )
332 switch (data->type)
334 case IRP_CALL_NONE:
335 fprintf( stderr, "%s{NONE}", prefix );
336 break;
337 case IRP_CALL_CREATE:
338 fprintf( stderr, "%s{CREATE,access=%08x,sharing=%08x,options=%08x",
339 prefix, data->create.access, data->create.sharing, data->create.options );
340 dump_uint64( ",device=", &data->create.device );
341 fprintf( stderr, ",file=%08x}", data->create.file );
342 break;
343 case IRP_CALL_CLOSE:
344 fprintf( stderr, "%s{CLOSE", prefix );
345 dump_uint64( ",file=", &data->close.file );
346 fputc( '}', stderr );
347 break;
348 case IRP_CALL_READ:
349 fprintf( stderr, "%s{READ,key=%08x,out_size=%u", prefix, data->read.key,
350 data->read.out_size );
351 dump_uint64( ",pos=", &data->read.pos );
352 dump_uint64( ",file=", &data->read.file );
353 fputc( '}', stderr );
354 break;
355 case IRP_CALL_WRITE:
356 fprintf( stderr, "%s{WRITE,key=%08x", prefix, data->write.key );
357 dump_uint64( ",pos=", &data->write.pos );
358 dump_uint64( ",file=", &data->write.file );
359 fputc( '}', stderr );
360 break;
361 case IRP_CALL_FLUSH:
362 fprintf( stderr, "%s{FLUSH", prefix );
363 dump_uint64( ",file=", &data->flush.file );
364 fputc( '}', stderr );
365 break;
366 case IRP_CALL_IOCTL:
367 fprintf( stderr, "%s{IOCTL", prefix );
368 dump_ioctl_code( ",code=", &data->ioctl.code );
369 fprintf( stderr, ",out_size=%u", data->ioctl.out_size );
370 dump_uint64( ",file=", &data->ioctl.file );
371 fputc( '}', stderr );
372 break;
373 case IRP_CALL_FREE:
374 fprintf( stderr, "%s{FREE", prefix );
375 dump_uint64( ",obj=", &data->free.obj );
376 fputc( '}', stderr );
377 break;
378 case IRP_CALL_CANCEL:
379 fprintf( stderr, "%s{CANCEL", prefix );
380 dump_uint64( ",irp=", &data->cancel.irp );
381 fputc( '}', stderr );
382 break;
386 static void dump_hw_input( const char *prefix, const hw_input_t *input )
388 switch (input->type)
390 case INPUT_MOUSE:
391 fprintf( stderr, "%s{type=MOUSE,x=%d,y=%d,data=%08x,flags=%08x,time=%u",
392 prefix, input->mouse.x, input->mouse.y, input->mouse.data, input->mouse.flags,
393 input->mouse.time );
394 dump_uint64( ",info=", &input->mouse.info );
395 fputc( '}', stderr );
396 break;
397 case INPUT_KEYBOARD:
398 fprintf( stderr, "%s{type=KEYBOARD,vkey=%04hx,scan=%04hx,flags=%08x,time=%u",
399 prefix, input->kbd.vkey, input->kbd.scan, input->kbd.flags, input->kbd.time );
400 dump_uint64( ",info=", &input->kbd.info );
401 fputc( '}', stderr );
402 break;
403 case INPUT_HARDWARE:
404 fprintf( stderr, "%s{type=HARDWARE,msg=%04x", prefix, input->hw.msg );
405 dump_uint64( ",lparam=", &input->hw.lparam );
406 fputc( '}', stderr );
407 break;
408 default:
409 fprintf( stderr, "%s{type=%04x}", prefix, input->type );
410 break;
414 static void dump_luid( const char *prefix, const luid_t *luid )
416 fprintf( stderr, "%s%d.%u", prefix, luid->high_part, luid->low_part );
419 static void dump_varargs_ints( const char *prefix, data_size_t size )
421 const int *data = cur_data;
422 data_size_t len = size / sizeof(*data);
424 fprintf( stderr,"%s{", prefix );
425 while (len > 0)
427 fprintf( stderr, "%d", *data++ );
428 if (--len) fputc( ',', stderr );
430 fputc( '}', stderr );
431 remove_data( size );
434 static void dump_varargs_uints( const char *prefix, data_size_t size )
436 const unsigned int *data = cur_data;
438 dump_uints( prefix, data, size / sizeof(*data) );
439 remove_data( size );
442 static void dump_varargs_uints64( const char *prefix, data_size_t size )
444 const unsigned __int64 *data = cur_data;
445 data_size_t len = size / sizeof(*data);
447 fprintf( stderr,"%s{", prefix );
448 while (len > 0)
450 dump_uint64( "", data++ );
451 if (--len) fputc( ',', stderr );
453 fputc( '}', stderr );
454 remove_data( size );
457 static void dump_varargs_apc_result( const char *prefix, data_size_t size )
459 const apc_result_t *result = cur_data;
461 if (size >= sizeof(*result))
463 dump_apc_result( prefix, result );
464 size = sizeof(*result);
466 remove_data( size );
469 static void dump_varargs_select_op( const char *prefix, data_size_t size )
471 select_op_t data;
473 if (!size)
475 fprintf( stderr, "%s{}", prefix );
476 return;
478 memset( &data, 0, sizeof(data) );
479 memcpy( &data, cur_data, min( size, sizeof(data) ));
481 fprintf( stderr, "%s{", prefix );
482 switch (data.op)
484 case SELECT_NONE:
485 fprintf( stderr, "NONE" );
486 break;
487 case SELECT_WAIT:
488 case SELECT_WAIT_ALL:
489 fprintf( stderr, "%s", data.op == SELECT_WAIT ? "WAIT" : "WAIT_ALL" );
490 if (size > offsetof( select_op_t, wait.handles ))
491 dump_handles( ",handles=", data.wait.handles,
492 min( size, sizeof(data.wait) ) - offsetof( select_op_t, wait.handles ));
493 break;
494 case SELECT_SIGNAL_AND_WAIT:
495 fprintf( stderr, "SIGNAL_AND_WAIT,signal=%04x,wait=%04x",
496 data.signal_and_wait.signal, data.signal_and_wait.wait );
497 break;
498 case SELECT_KEYED_EVENT_WAIT:
499 case SELECT_KEYED_EVENT_RELEASE:
500 fprintf( stderr, "KEYED_EVENT_%s,handle=%04x",
501 data.op == SELECT_KEYED_EVENT_WAIT ? "WAIT" : "RELEASE",
502 data.keyed_event.handle );
503 dump_uint64( ",key=", &data.keyed_event.key );
504 break;
505 default:
506 fprintf( stderr, "op=%u", data.op );
507 break;
509 fputc( '}', stderr );
510 remove_data( size );
513 static void dump_varargs_user_handles( const char *prefix, data_size_t size )
515 const user_handle_t *data = cur_data;
516 data_size_t len = size / sizeof(*data);
518 fprintf( stderr,"%s{", prefix );
519 while (len > 0)
521 fprintf( stderr, "%08x", *data++ );
522 if (--len) fputc( ',', stderr );
524 fputc( '}', stderr );
525 remove_data( size );
528 static void dump_varargs_bytes( const char *prefix, data_size_t size )
530 const unsigned char *data = cur_data;
531 data_size_t len = min( 1024, size );
533 fprintf( stderr,"%s{", prefix );
534 while (len > 0)
536 fprintf( stderr, "%02x", *data++ );
537 if (--len) fputc( ',', stderr );
539 if (size > 1024) fprintf( stderr, "...(total %u)", size );
540 fputc( '}', stderr );
541 remove_data( size );
544 static void dump_varargs_string( const char *prefix, data_size_t size )
546 fprintf( stderr, "%s\"%.*s\"", prefix, (int)size, (const char *)cur_data );
547 remove_data( size );
550 static void dump_varargs_unicode_str( const char *prefix, data_size_t size )
552 fprintf( stderr, "%sL\"", prefix );
553 dump_strW( cur_data, size, stderr, "\"\"" );
554 fputc( '\"', stderr );
555 remove_data( size );
558 static void dump_varargs_context( const char *prefix, data_size_t size )
560 const context_t *context = cur_data;
561 context_t ctx;
562 unsigned int i;
564 if (!size)
566 fprintf( stderr, "%s{}", prefix );
567 return;
569 size = min( size, sizeof(ctx) );
570 memset( &ctx, 0, sizeof(ctx) );
571 memcpy( &ctx, context, size );
573 fprintf( stderr,"%s{", prefix );
574 dump_client_cpu( "cpu=", &ctx.cpu );
575 switch (ctx.cpu)
577 case CPU_x86:
578 if (ctx.flags & SERVER_CTX_CONTROL)
579 fprintf( stderr, ",eip=%08x,esp=%08x,ebp=%08x,eflags=%08x,cs=%04x,ss=%04x",
580 ctx.ctl.i386_regs.eip, ctx.ctl.i386_regs.esp, ctx.ctl.i386_regs.ebp,
581 ctx.ctl.i386_regs.eflags, ctx.ctl.i386_regs.cs, ctx.ctl.i386_regs.ss );
582 if (ctx.flags & SERVER_CTX_SEGMENTS)
583 fprintf( stderr, ",ds=%04x,es=%04x,fs=%04x,gs=%04x",
584 ctx.seg.i386_regs.ds, ctx.seg.i386_regs.es,
585 ctx.seg.i386_regs.fs, ctx.seg.i386_regs.gs );
586 if (ctx.flags & SERVER_CTX_INTEGER)
587 fprintf( stderr, ",eax=%08x,ebx=%08x,ecx=%08x,edx=%08x,esi=%08x,edi=%08x",
588 ctx.integer.i386_regs.eax, ctx.integer.i386_regs.ebx, ctx.integer.i386_regs.ecx,
589 ctx.integer.i386_regs.edx, ctx.integer.i386_regs.esi, ctx.integer.i386_regs.edi );
590 if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
591 fprintf( stderr, ",dr0=%08x,dr1=%08x,dr2=%08x,dr3=%08x,dr6=%08x,dr7=%08x",
592 ctx.debug.i386_regs.dr0, ctx.debug.i386_regs.dr1, ctx.debug.i386_regs.dr2,
593 ctx.debug.i386_regs.dr3, ctx.debug.i386_regs.dr6, ctx.debug.i386_regs.dr7 );
594 if (ctx.flags & SERVER_CTX_FLOATING_POINT)
596 fprintf( stderr, ",fp.ctrl=%08x,fp.status=%08x,fp.tag=%08x,fp.err_off=%08x,fp.err_sel=%08x",
597 ctx.fp.i386_regs.ctrl, ctx.fp.i386_regs.status, ctx.fp.i386_regs.tag,
598 ctx.fp.i386_regs.err_off, ctx.fp.i386_regs.err_sel );
599 fprintf( stderr, ",fp.data_off=%08x,fp.data_sel=%08x,fp.cr0npx=%08x",
600 ctx.fp.i386_regs.data_off, ctx.fp.i386_regs.data_sel, ctx.fp.i386_regs.cr0npx );
601 for (i = 0; i < 8; i++)
603 long double reg = 0;
604 memcpy( &reg, &ctx.fp.i386_regs.regs[10 * i], 10 );
605 fprintf( stderr, ",fp.reg%u=%Lg", i, reg );
608 if (ctx.flags & SERVER_CTX_EXTENDED_REGISTERS)
609 dump_uints( ",extended=", (const unsigned int *)ctx.ext.i386_regs,
610 sizeof(ctx.ext.i386_regs) / sizeof(int) );
611 break;
612 case CPU_x86_64:
613 if (ctx.flags & SERVER_CTX_CONTROL)
615 dump_uint64( ",rip=", &ctx.ctl.x86_64_regs.rip );
616 dump_uint64( ",rbp=", &ctx.ctl.x86_64_regs.rbp );
617 dump_uint64( ",rsp=", &ctx.ctl.x86_64_regs.rsp );
618 fprintf( stderr, ",cs=%04x,ss=%04x,flags=%08x",
619 ctx.ctl.x86_64_regs.cs, ctx.ctl.x86_64_regs.ss, ctx.ctl.x86_64_regs.flags );
621 if (ctx.flags & SERVER_CTX_INTEGER)
623 dump_uint64( ",rax=", &ctx.integer.x86_64_regs.rax );
624 dump_uint64( ",rbx=", &ctx.integer.x86_64_regs.rbx );
625 dump_uint64( ",rcx=", &ctx.integer.x86_64_regs.rcx );
626 dump_uint64( ",rdx=", &ctx.integer.x86_64_regs.rdx );
627 dump_uint64( ",rsi=", &ctx.integer.x86_64_regs.rsi );
628 dump_uint64( ",rdi=", &ctx.integer.x86_64_regs.rdi );
629 dump_uint64( ",r8=", &ctx.integer.x86_64_regs.r8 );
630 dump_uint64( ",r9=", &ctx.integer.x86_64_regs.r9 );
631 dump_uint64( ",r10=", &ctx.integer.x86_64_regs.r10 );
632 dump_uint64( ",r11=", &ctx.integer.x86_64_regs.r11 );
633 dump_uint64( ",r12=", &ctx.integer.x86_64_regs.r12 );
634 dump_uint64( ",r13=", &ctx.integer.x86_64_regs.r13 );
635 dump_uint64( ",r14=", &ctx.integer.x86_64_regs.r14 );
636 dump_uint64( ",r15=", &ctx.integer.x86_64_regs.r15 );
638 if (ctx.flags & SERVER_CTX_SEGMENTS)
639 fprintf( stderr, ",ds=%04x,es=%04x,fs=%04x,gs=%04x",
640 ctx.seg.x86_64_regs.ds, ctx.seg.x86_64_regs.es,
641 ctx.seg.x86_64_regs.fs, ctx.seg.x86_64_regs.gs );
642 if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
644 dump_uint64( ",dr0=", &ctx.debug.x86_64_regs.dr0 );
645 dump_uint64( ",dr1=", &ctx.debug.x86_64_regs.dr1 );
646 dump_uint64( ",dr2=", &ctx.debug.x86_64_regs.dr2 );
647 dump_uint64( ",dr3=", &ctx.debug.x86_64_regs.dr3 );
648 dump_uint64( ",dr6=", &ctx.debug.x86_64_regs.dr6 );
649 dump_uint64( ",dr7=", &ctx.debug.x86_64_regs.dr7 );
651 if (ctx.flags & SERVER_CTX_FLOATING_POINT)
653 for (i = 0; i < 32; i++)
654 fprintf( stderr, ",fp%u=%08x%08x%08x%08x", i,
655 (unsigned int)(ctx.fp.x86_64_regs.fpregs[i].high >> 32),
656 (unsigned int)ctx.fp.x86_64_regs.fpregs[i].high,
657 (unsigned int)(ctx.fp.x86_64_regs.fpregs[i].low >> 32),
658 (unsigned int)ctx.fp.x86_64_regs.fpregs[i].low );
660 break;
661 case CPU_POWERPC:
662 if (ctx.flags & SERVER_CTX_CONTROL)
663 fprintf( stderr, ",iar=%08x,msr=%08x,ctr=%08x,lr=%08x,dar=%08x,dsisr=%08x,trap=%08x",
664 ctx.ctl.powerpc_regs.iar, ctx.ctl.powerpc_regs.msr, ctx.ctl.powerpc_regs.ctr,
665 ctx.ctl.powerpc_regs.lr, ctx.ctl.powerpc_regs.dar, ctx.ctl.powerpc_regs.dsisr,
666 ctx.ctl.powerpc_regs.trap );
667 if (ctx.flags & SERVER_CTX_INTEGER)
669 for (i = 0; i < 32; i++) fprintf( stderr, ",gpr%u=%08x", i, ctx.integer.powerpc_regs.gpr[i] );
670 fprintf( stderr, ",cr=%08x,xer=%08x",
671 ctx.integer.powerpc_regs.cr, ctx.integer.powerpc_regs.xer );
673 if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
674 for (i = 0; i < 8; i++) fprintf( stderr, ",dr%u=%08x", i, ctx.debug.powerpc_regs.dr[i] );
675 if (ctx.flags & SERVER_CTX_FLOATING_POINT)
677 for (i = 0; i < 32; i++) fprintf( stderr, ",fpr%u=%g", i, ctx.fp.powerpc_regs.fpr[i] );
678 fprintf( stderr, ",fpscr=%g", ctx.fp.powerpc_regs.fpscr );
680 break;
681 case CPU_ARM:
682 if (ctx.flags & SERVER_CTX_CONTROL)
683 fprintf( stderr, ",sp=%08x,lr=%08x,pc=%08x,cpsr=%08x",
684 ctx.ctl.arm_regs.sp, ctx.ctl.arm_regs.lr,
685 ctx.ctl.arm_regs.pc, ctx.ctl.arm_regs.cpsr );
686 if (ctx.flags & SERVER_CTX_INTEGER)
687 for (i = 0; i < 13; i++) fprintf( stderr, ",r%u=%08x", i, ctx.integer.arm_regs.r[i] );
688 if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
690 for (i = 0; i < 8; i++)
691 fprintf( stderr, ",bcr%u=%08x,bvr%u=%08x",
692 i, ctx.debug.arm_regs.bcr[i], i, ctx.debug.arm_regs.bvr[i] );
693 fprintf( stderr, ",wcr0=%08x,wvr0=%08x",
694 ctx.debug.arm_regs.wcr[0], ctx.debug.arm_regs.wvr[0] );
696 if (ctx.flags & SERVER_CTX_FLOATING_POINT)
698 for (i = 0; i < 32; i++)
700 fprintf( stderr, ",d%u=", i );
701 dump_uint64( "", &ctx.fp.arm_regs.d[i] );
703 fprintf( stderr, ",fpscr=%08x", ctx.fp.arm_regs.fpscr );
705 break;
706 case CPU_ARM64:
707 if (ctx.flags & SERVER_CTX_CONTROL)
709 dump_uint64( ",sp=", &ctx.ctl.arm64_regs.sp );
710 dump_uint64( ",pc=", &ctx.ctl.arm64_regs.pc );
711 dump_uint64( ",pstate=", &ctx.ctl.arm64_regs.pstate );
713 if (ctx.flags & SERVER_CTX_INTEGER)
715 for (i = 0; i < 31; i++)
717 fprintf( stderr, ",x%u=", i );
718 dump_uint64( "", &ctx.integer.arm64_regs.x[i] );
721 if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
723 for (i = 0; i < 8; i++)
725 fprintf( stderr, ",bcr%u=%08x,bvr%u=", i, ctx.debug.arm64_regs.bcr[i], i );
726 dump_uint64( "", &ctx.debug.arm64_regs.bvr[i] );
728 for (i = 0; i < 2; i++)
730 fprintf( stderr, ",wcr%u=%08x,wvr%u=", i, ctx.debug.arm64_regs.wcr[i], i );
731 dump_uint64( "", &ctx.debug.arm64_regs.wvr[i] );
734 if (ctx.flags & SERVER_CTX_FLOATING_POINT)
736 for (i = 0; i < 32; i++)
738 fprintf( stderr, ",q%u=", i );
739 dump_uint64( "", &ctx.fp.arm64_regs.q[i].high );
740 dump_uint64( "", &ctx.fp.arm64_regs.q[i].low );
742 fprintf( stderr, ",fpcr=%08x,fpsr=%08x", ctx.fp.arm64_regs.fpcr, ctx.fp.arm64_regs.fpsr );
744 break;
746 fputc( '}', stderr );
747 remove_data( size );
750 static void dump_varargs_debug_event( const char *prefix, data_size_t size )
752 debug_event_t event;
753 unsigned int i;
755 if (!size)
757 fprintf( stderr, "%s{}", prefix );
758 return;
760 size = min( size, sizeof(event) );
761 memset( &event, 0, sizeof(event) );
762 memcpy( &event, cur_data, size );
764 switch(event.code)
766 case EXCEPTION_DEBUG_EVENT:
767 fprintf( stderr, "%s{exception,first=%d,exc_code=%08x,flags=%08x", prefix,
768 event.exception.first, event.exception.exc_code, event.exception.flags );
769 dump_uint64( ",record=", &event.exception.record );
770 dump_uint64( ",address=", &event.exception.address );
771 fprintf( stderr, ",params={" );
772 event.exception.nb_params = min( event.exception.nb_params, EXCEPTION_MAXIMUM_PARAMETERS );
773 for (i = 0; i < event.exception.nb_params; i++)
775 dump_uint64( "", &event.exception.params[i] );
776 if (i < event.exception.nb_params) fputc( ',', stderr );
778 fprintf( stderr, "}}" );
779 break;
780 case CREATE_THREAD_DEBUG_EVENT:
781 fprintf( stderr, "%s{create_thread,thread=%04x", prefix, event.create_thread.handle );
782 dump_uint64( ",teb=", &event.create_thread.teb );
783 dump_uint64( ",start=", &event.create_thread.start );
784 fputc( '}', stderr );
785 break;
786 case CREATE_PROCESS_DEBUG_EVENT:
787 fprintf( stderr, "%s{create_process,file=%04x,process=%04x,thread=%04x", prefix,
788 event.create_process.file, event.create_process.process,
789 event.create_process.thread );
790 dump_uint64( ",base=", &event.create_process.base );
791 fprintf( stderr, ",offset=%d,size=%d",
792 event.create_process.dbg_offset, event.create_process.dbg_size );
793 dump_uint64( ",teb=", &event.create_process.teb );
794 dump_uint64( ",start=", &event.create_process.start );
795 dump_uint64( ",name=", &event.create_process.name );
796 fprintf( stderr, ",unicode=%d}", event.create_process.unicode );
797 break;
798 case EXIT_THREAD_DEBUG_EVENT:
799 fprintf( stderr, "%s{exit_thread,code=%d}", prefix, event.exit.exit_code );
800 break;
801 case EXIT_PROCESS_DEBUG_EVENT:
802 fprintf( stderr, "%s{exit_process,code=%d}", prefix, event.exit.exit_code );
803 break;
804 case LOAD_DLL_DEBUG_EVENT:
805 fprintf( stderr, "%s{load_dll,file=%04x", prefix, event.load_dll.handle );
806 dump_uint64( ",base=", &event.load_dll.base );
807 fprintf( stderr, ",offset=%d,size=%d",
808 event.load_dll.dbg_offset, event.load_dll.dbg_size );
809 dump_uint64( ",name=", &event.load_dll.name );
810 fprintf( stderr, ",unicode=%d}", event.load_dll.unicode );
811 break;
812 case UNLOAD_DLL_DEBUG_EVENT:
813 fprintf( stderr, "%s{unload_dll", prefix );
814 dump_uint64( ",base=", &event.unload_dll.base );
815 fputc( '}', stderr );
816 break;
817 case 0: /* zero is the code returned on timeouts */
818 fprintf( stderr, "%s{}", prefix );
819 break;
820 default:
821 fprintf( stderr, "%s{code=??? (%d)}", prefix, event.code );
822 break;
824 remove_data( size );
827 /* dump a unicode string contained in a buffer; helper for dump_varargs_startup_info */
828 static data_size_t dump_inline_unicode_string( const char *prefix, data_size_t pos, data_size_t len, data_size_t total_size )
830 fputs( prefix, stderr );
831 if (pos >= total_size) return pos;
832 if (len > total_size - pos) len = total_size - pos;
833 dump_strW( (const WCHAR *)cur_data + pos/sizeof(WCHAR), len, stderr, "\"\"" );
834 return pos + (len / sizeof(WCHAR)) * sizeof(WCHAR);
837 static void dump_varargs_startup_info( const char *prefix, data_size_t size )
839 startup_info_t info;
840 data_size_t pos = sizeof(info);
842 memset( &info, 0, sizeof(info) );
843 memcpy( &info, cur_data, min( size, sizeof(info) ));
845 fprintf( stderr,
846 "%s{debug_flags=%x,console_flags=%x,console=%04x,hstdin=%04x,hstdout=%04x,hstderr=%04x,"
847 "x=%u,y=%u,xsize=%u,ysize=%u,xchars=%u,ychars=%u,attribute=%02x,flags=%x,show=%u",
848 prefix, info.debug_flags, info.console_flags, info.console,
849 info.hstdin, info.hstdout, info.hstderr, info.x, info.y, info.xsize, info.ysize,
850 info.xchars, info.ychars, info.attribute, info.flags, info.show );
851 pos = dump_inline_unicode_string( ",curdir=L\"", pos, info.curdir_len, size );
852 pos = dump_inline_unicode_string( "\",dllpath=L\"", pos, info.dllpath_len, size );
853 pos = dump_inline_unicode_string( "\",imagepath=L\"", pos, info.imagepath_len, size );
854 pos = dump_inline_unicode_string( "\",cmdline=L\"", pos, info.cmdline_len, size );
855 pos = dump_inline_unicode_string( "\",title=L\"", pos, info.title_len, size );
856 pos = dump_inline_unicode_string( "\",desktop=L\"", pos, info.desktop_len, size );
857 pos = dump_inline_unicode_string( "\",shellinfo=L\"", pos, info.shellinfo_len, size );
858 pos = dump_inline_unicode_string( "\",runtime=L\"", pos, info.runtime_len, size );
859 fprintf( stderr, "\"}" );
860 remove_data( size );
863 static void dump_varargs_input_records( const char *prefix, data_size_t size )
865 const INPUT_RECORD *rec = cur_data;
866 data_size_t len = size / sizeof(*rec);
868 fprintf( stderr,"%s{", prefix );
869 while (len > 0)
871 fprintf( stderr, "{%04x,...}", rec->EventType );
872 rec++;
873 if (--len) fputc( ',', stderr );
875 fputc( '}', stderr );
876 remove_data( size );
879 static void dump_varargs_rectangles( const char *prefix, data_size_t size )
881 const rectangle_t *rect = cur_data;
882 data_size_t len = size / sizeof(*rect);
884 fprintf( stderr,"%s{", prefix );
885 while (len > 0)
887 dump_rectangle( "", rect++ );
888 if (--len) fputc( ',', stderr );
890 fputc( '}', stderr );
891 remove_data( size );
894 static void dump_varargs_message_data( const char *prefix, data_size_t size )
896 /* FIXME: dump the structured data */
897 dump_varargs_bytes( prefix, size );
900 static void dump_varargs_properties( const char *prefix, data_size_t size )
902 const property_data_t *prop = cur_data;
903 data_size_t len = size / sizeof(*prop);
905 fprintf( stderr,"%s{", prefix );
906 while (len > 0)
908 fprintf( stderr, "{atom=%04x,str=%d", prop->atom, prop->string );
909 dump_uint64( ",data=", &prop->data );
910 fputc( '}', stderr );
911 prop++;
912 if (--len) fputc( ',', stderr );
914 fputc( '}', stderr );
915 remove_data( size );
918 static void dump_varargs_LUID_AND_ATTRIBUTES( const char *prefix, data_size_t size )
920 const LUID_AND_ATTRIBUTES *lat = cur_data;
921 data_size_t len = size / sizeof(*lat);
923 fprintf( stderr,"%s{", prefix );
924 while (len > 0)
926 fprintf( stderr, "{luid=%08x%08x,attr=%x}",
927 lat->Luid.HighPart, lat->Luid.LowPart, lat->Attributes );
928 lat++;
929 if (--len) fputc( ',', stderr );
931 fputc( '}', stderr );
932 remove_data( size );
935 static void dump_inline_sid( const char *prefix, const SID *sid, data_size_t size )
937 DWORD i;
939 /* security check */
940 if ((FIELD_OFFSET(SID, SubAuthority[0]) > size) ||
941 (FIELD_OFFSET(SID, SubAuthority[sid->SubAuthorityCount]) > size))
943 fprintf( stderr, "<invalid sid>" );
944 return;
947 fprintf( stderr,"%s{", prefix );
948 fprintf( stderr, "S-%u-%u", sid->Revision, MAKELONG(
949 MAKEWORD( sid->IdentifierAuthority.Value[5],
950 sid->IdentifierAuthority.Value[4] ),
951 MAKEWORD( sid->IdentifierAuthority.Value[3],
952 sid->IdentifierAuthority.Value[2] ) ) );
953 for (i = 0; i < sid->SubAuthorityCount; i++)
954 fprintf( stderr, "-%u", sid->SubAuthority[i] );
955 fputc( '}', stderr );
958 static void dump_varargs_SID( const char *prefix, data_size_t size )
960 const SID *sid = cur_data;
961 dump_inline_sid( prefix, sid, size );
962 remove_data( size );
965 static void dump_inline_acl( const char *prefix, const ACL *acl, data_size_t size )
967 const ACE_HEADER *ace;
968 ULONG i;
970 fprintf( stderr,"%s{", prefix );
971 if (size)
973 if (size < sizeof(ACL))
975 fprintf( stderr, "<invalid acl>}" );
976 return;
978 size -= sizeof(ACL);
979 ace = (const ACE_HEADER *)(acl + 1);
980 for (i = 0; i < acl->AceCount; i++)
982 const SID *sid = NULL;
983 data_size_t sid_size = 0;
985 if (size < sizeof(ACE_HEADER) || size < ace->AceSize) break;
986 size -= ace->AceSize;
987 if (i != 0) fputc( ',', stderr );
988 fprintf( stderr, "{AceType=" );
989 switch (ace->AceType)
991 case ACCESS_DENIED_ACE_TYPE:
992 sid = (const SID *)&((const ACCESS_DENIED_ACE *)ace)->SidStart;
993 sid_size = ace->AceSize - FIELD_OFFSET(ACCESS_DENIED_ACE, SidStart);
994 fprintf( stderr, "ACCESS_DENIED_ACE_TYPE,Mask=%x",
995 ((const ACCESS_DENIED_ACE *)ace)->Mask );
996 break;
997 case ACCESS_ALLOWED_ACE_TYPE:
998 sid = (const SID *)&((const ACCESS_ALLOWED_ACE *)ace)->SidStart;
999 sid_size = ace->AceSize - FIELD_OFFSET(ACCESS_ALLOWED_ACE, SidStart);
1000 fprintf( stderr, "ACCESS_ALLOWED_ACE_TYPE,Mask=%x",
1001 ((const ACCESS_ALLOWED_ACE *)ace)->Mask );
1002 break;
1003 case SYSTEM_AUDIT_ACE_TYPE:
1004 sid = (const SID *)&((const SYSTEM_AUDIT_ACE *)ace)->SidStart;
1005 sid_size = ace->AceSize - FIELD_OFFSET(SYSTEM_AUDIT_ACE, SidStart);
1006 fprintf( stderr, "SYSTEM_AUDIT_ACE_TYPE,Mask=%x",
1007 ((const SYSTEM_AUDIT_ACE *)ace)->Mask );
1008 break;
1009 case SYSTEM_ALARM_ACE_TYPE:
1010 sid = (const SID *)&((const SYSTEM_ALARM_ACE *)ace)->SidStart;
1011 sid_size = ace->AceSize - FIELD_OFFSET(SYSTEM_ALARM_ACE, SidStart);
1012 fprintf( stderr, "SYSTEM_ALARM_ACE_TYPE,Mask=%x",
1013 ((const SYSTEM_ALARM_ACE *)ace)->Mask );
1014 break;
1015 case SYSTEM_MANDATORY_LABEL_ACE_TYPE:
1016 sid = (const SID *)&((const SYSTEM_MANDATORY_LABEL_ACE *)ace)->SidStart;
1017 sid_size = ace->AceSize - FIELD_OFFSET(SYSTEM_MANDATORY_LABEL_ACE, SidStart);
1018 fprintf( stderr, "SYSTEM_MANDATORY_LABEL_ACE_TYPE,Mask=%x",
1019 ((const SYSTEM_MANDATORY_LABEL_ACE *)ace)->Mask );
1020 break;
1021 default:
1022 fprintf( stderr, "unknown<%d>", ace->AceType );
1023 break;
1025 fprintf( stderr, ",AceFlags=%x", ace->AceFlags );
1026 if (sid)
1027 dump_inline_sid( ",Sid=", sid, sid_size );
1028 ace = (const ACE_HEADER *)((const char *)ace + ace->AceSize);
1029 fputc( '}', stderr );
1032 fputc( '}', stderr );
1035 static void dump_varargs_ACL( const char *prefix, data_size_t size )
1037 const ACL *acl = cur_data;
1038 dump_inline_acl( prefix, acl, size );
1039 remove_data( size );
1042 static void dump_inline_security_descriptor( const char *prefix, const struct security_descriptor *sd, data_size_t size )
1044 fprintf( stderr,"%s{", prefix );
1045 if (size >= sizeof(struct security_descriptor))
1047 size_t offset = sizeof(struct security_descriptor);
1048 fprintf( stderr, "control=%08x", sd->control );
1049 if ((sd->owner_len > FIELD_OFFSET(SID, SubAuthority[255])) || (offset + sd->owner_len > size))
1050 return;
1051 if (sd->owner_len)
1052 dump_inline_sid( ",owner=", (const SID *)((const char *)sd + offset), sd->owner_len );
1053 else
1054 fprintf( stderr, ",owner=<not present>" );
1055 offset += sd->owner_len;
1056 if ((sd->group_len > FIELD_OFFSET(SID, SubAuthority[255])) || (offset + sd->group_len > size))
1057 return;
1058 if (sd->group_len)
1059 dump_inline_sid( ",group=", (const SID *)((const char *)sd + offset), sd->group_len );
1060 else
1061 fprintf( stderr, ",group=<not present>" );
1062 offset += sd->group_len;
1063 if ((sd->sacl_len >= MAX_ACL_LEN) || (offset + sd->sacl_len > size))
1064 return;
1065 dump_inline_acl( ",sacl=", (const ACL *)((const char *)sd + offset), sd->sacl_len );
1066 offset += sd->sacl_len;
1067 if ((sd->dacl_len >= MAX_ACL_LEN) || (offset + sd->dacl_len > size))
1068 return;
1069 dump_inline_acl( ",dacl=", (const ACL *)((const char *)sd + offset), sd->dacl_len );
1070 offset += sd->dacl_len;
1072 fputc( '}', stderr );
1075 static void dump_varargs_security_descriptor( const char *prefix, data_size_t size )
1077 const struct security_descriptor *sd = cur_data;
1078 dump_inline_security_descriptor( prefix, sd, size );
1079 remove_data( size );
1082 static void dump_varargs_token_groups( const char *prefix, data_size_t size )
1084 const struct token_groups *tg = cur_data;
1086 fprintf( stderr,"%s{", prefix );
1087 if (size >= sizeof(struct token_groups))
1089 size_t offset = sizeof(*tg);
1090 fprintf( stderr, "count=%08x,", tg->count );
1091 if (tg->count * sizeof(unsigned int) <= size)
1093 unsigned int i;
1094 const unsigned int *attr = (const unsigned int *)(tg + 1);
1096 offset += tg->count * sizeof(unsigned int);
1098 fputc( '[', stderr );
1099 for (i = 0; i < tg->count; i++)
1101 const SID *sid = (const SID *)((const char *)cur_data + offset);
1102 if (i != 0)
1103 fputc( ',', stderr );
1104 fputc( '{', stderr );
1105 fprintf( stderr, "attributes=%08x", attr[i] );
1106 dump_inline_sid( ",sid=", sid, size - offset );
1107 if ((offset + FIELD_OFFSET(SID, SubAuthority[0]) > size) ||
1108 (offset + FIELD_OFFSET(SID, SubAuthority[sid->SubAuthorityCount]) > size))
1109 break;
1110 offset += FIELD_OFFSET(SID, SubAuthority[sid->SubAuthorityCount]);
1111 fputc( '}', stderr );
1113 fputc( ']', stderr );
1116 fputc( '}', stderr );
1119 static void dump_varargs_object_attributes( const char *prefix, data_size_t size )
1121 const struct object_attributes *objattr = cur_data;
1123 fprintf( stderr,"%s{", prefix );
1124 if (size)
1126 const WCHAR *str;
1128 if (size < sizeof(*objattr) ||
1129 (size - sizeof(*objattr) < objattr->sd_len) ||
1130 (size - sizeof(*objattr) - objattr->sd_len < objattr->name_len))
1132 fprintf( stderr, "***invalid***}" );
1133 remove_data( size );
1134 return;
1137 fprintf( stderr, "rootdir=%04x,attributes=%08x", objattr->rootdir, objattr->attributes );
1138 dump_inline_security_descriptor( ",sd=", (const struct security_descriptor *)(objattr + 1), objattr->sd_len );
1139 str = (const WCHAR *)objattr + (sizeof(*objattr) + objattr->sd_len) / sizeof(WCHAR);
1140 fprintf( stderr, ",name=L\"" );
1141 dump_strW( str, objattr->name_len, stderr, "\"\"" );
1142 fputc( '\"', stderr );
1143 remove_data( (sizeof(*objattr) + (objattr->sd_len & ~1) + (objattr->name_len & ~1) + 3) & ~3 );
1145 fputc( '}', stderr );
1148 static void dump_varargs_filesystem_event( const char *prefix, data_size_t size )
1150 static const char * const actions[] = {
1151 NULL,
1152 "ADDED",
1153 "REMOVED",
1154 "MODIFIED",
1155 "RENAMED_OLD_NAME",
1156 "RENAMED_NEW_NAME",
1157 "ADDED_STREAM",
1158 "REMOVED_STREAM",
1159 "MODIFIED_STREAM"
1162 fprintf( stderr,"%s{", prefix );
1163 while (size)
1165 const struct filesystem_event *event = cur_data;
1166 data_size_t len = (offsetof( struct filesystem_event, name[event->len] ) + sizeof(int)-1)
1167 / sizeof(int) * sizeof(int);
1168 if (size < len) break;
1169 if (event->action < ARRAY_SIZE( actions ) && actions[event->action])
1170 fprintf( stderr, "{action=%s", actions[event->action] );
1171 else
1172 fprintf( stderr, "{action=%u", event->action );
1173 fprintf( stderr, ",name=\"%.*s\"}", event->len, event->name );
1174 size -= len;
1175 remove_data( len );
1176 if (size)fputc( ',', stderr );
1178 fputc( '}', stderr );
1181 static void dump_varargs_pe_image_info( const char *prefix, data_size_t size )
1183 pe_image_info_t info;
1185 if (!size)
1187 fprintf( stderr, "%s{}", prefix );
1188 return;
1190 memset( &info, 0, sizeof(info) );
1191 memcpy( &info, cur_data, min( size, sizeof(info) ));
1193 fprintf( stderr, "%s{", prefix );
1194 dump_uint64( "base=", &info.base );
1195 dump_uint64( ",entry_point=", &info.entry_point );
1196 dump_uint64( ",map_size=", &info.map_size );
1197 dump_uint64( ",stack_size=", &info.stack_size );
1198 dump_uint64( ",stack_commit=", &info.stack_commit );
1199 fprintf( stderr, ",zerobits=%08x,subsystem=%08x,subsystem_low=%04x,subsystem_high=%04x,gp=%08x"
1200 ",image_charact=%04x,dll_charact=%04x,machine=%04x,contains_code=%u,image_flags=%02x"
1201 ",loader_flags=%08x,header_size=%08x,file_size=%08x,checksum=%08x",
1202 info.zerobits, info.subsystem, info.subsystem_low, info.subsystem_high, info.gp,
1203 info.image_charact, info.dll_charact, info.machine, info.contains_code, info.image_flags,
1204 info.loader_flags, info.header_size, info.file_size, info.checksum );
1205 dump_client_cpu( ",cpu=", &info.cpu );
1206 fputc( '}', stderr );
1207 remove_data( size );
1210 static void dump_varargs_rawinput_devices(const char *prefix, data_size_t size )
1212 const struct rawinput_device *device;
1214 fprintf( stderr, "%s{", prefix );
1215 while (size >= sizeof(*device))
1217 device = cur_data;
1218 fprintf( stderr, "{usage_page=%04x,usage=%04x,flags=%08x,target=%08x}",
1219 device->usage_page, device->usage, device->flags, device->target );
1220 size -= sizeof(*device);
1221 remove_data( sizeof(*device) );
1222 if (size) fputc( ',', stderr );
1224 fputc( '}', stderr );
1227 static void dump_varargs_handle_infos( const char *prefix, data_size_t size )
1229 const struct handle_info *handle;
1231 fprintf( stderr, "%s{", prefix );
1232 while (size >= sizeof(*handle))
1234 handle = cur_data;
1235 fprintf( stderr, "{owner=%04x,handle=%04x,access=%08x}",
1236 handle->owner, handle->handle, handle->access );
1237 size -= sizeof(*handle);
1238 remove_data( sizeof(*handle) );
1239 if (size) fputc( ',', stderr );
1241 fputc( '}', stderr );
1244 typedef void (*dump_func)( const void *req );
1246 /* Everything below this line is generated automatically by tools/make_requests */
1247 /* ### make_requests begin ### */
1249 static void dump_new_process_request( const struct new_process_request *req )
1251 fprintf( stderr, " parent_process=%04x", req->parent_process );
1252 fprintf( stderr, ", inherit_all=%d", req->inherit_all );
1253 fprintf( stderr, ", create_flags=%08x", req->create_flags );
1254 fprintf( stderr, ", socket_fd=%d", req->socket_fd );
1255 fprintf( stderr, ", exe_file=%04x", req->exe_file );
1256 fprintf( stderr, ", access=%08x", req->access );
1257 dump_client_cpu( ", cpu=", &req->cpu );
1258 fprintf( stderr, ", info_size=%u", req->info_size );
1259 dump_varargs_object_attributes( ", objattr=", cur_size );
1260 dump_varargs_startup_info( ", info=", min(cur_size,req->info_size) );
1261 dump_varargs_unicode_str( ", env=", cur_size );
1264 static void dump_new_process_reply( const struct new_process_reply *req )
1266 fprintf( stderr, " info=%04x", req->info );
1267 fprintf( stderr, ", pid=%04x", req->pid );
1268 fprintf( stderr, ", handle=%04x", req->handle );
1271 static void dump_exec_process_request( const struct exec_process_request *req )
1273 fprintf( stderr, " socket_fd=%d", req->socket_fd );
1274 dump_client_cpu( ", cpu=", &req->cpu );
1277 static void dump_get_new_process_info_request( const struct get_new_process_info_request *req )
1279 fprintf( stderr, " info=%04x", req->info );
1282 static void dump_get_new_process_info_reply( const struct get_new_process_info_reply *req )
1284 fprintf( stderr, " success=%d", req->success );
1285 fprintf( stderr, ", exit_code=%d", req->exit_code );
1288 static void dump_new_thread_request( const struct new_thread_request *req )
1290 fprintf( stderr, " process=%04x", req->process );
1291 fprintf( stderr, ", access=%08x", req->access );
1292 fprintf( stderr, ", suspend=%d", req->suspend );
1293 fprintf( stderr, ", request_fd=%d", req->request_fd );
1294 dump_varargs_object_attributes( ", objattr=", cur_size );
1297 static void dump_new_thread_reply( const struct new_thread_reply *req )
1299 fprintf( stderr, " tid=%04x", req->tid );
1300 fprintf( stderr, ", handle=%04x", req->handle );
1303 static void dump_get_startup_info_request( const struct get_startup_info_request *req )
1307 static void dump_get_startup_info_reply( const struct get_startup_info_reply *req )
1309 fprintf( stderr, " info_size=%u", req->info_size );
1310 dump_varargs_startup_info( ", info=", min(cur_size,req->info_size) );
1311 dump_varargs_unicode_str( ", env=", cur_size );
1314 static void dump_init_process_done_request( const struct init_process_done_request *req )
1316 fprintf( stderr, " gui=%d", req->gui );
1317 dump_uint64( ", module=", &req->module );
1318 dump_uint64( ", ldt_copy=", &req->ldt_copy );
1319 dump_uint64( ", entry=", &req->entry );
1320 fprintf( stderr, ", usd_handle=%04x", req->usd_handle );
1323 static void dump_init_process_done_reply( const struct init_process_done_reply *req )
1325 fprintf( stderr, " suspend=%d", req->suspend );
1328 static void dump_init_thread_request( const struct init_thread_request *req )
1330 fprintf( stderr, " unix_pid=%d", req->unix_pid );
1331 fprintf( stderr, ", unix_tid=%d", req->unix_tid );
1332 fprintf( stderr, ", debug_level=%d", req->debug_level );
1333 dump_uint64( ", teb=", &req->teb );
1334 dump_uint64( ", entry=", &req->entry );
1335 fprintf( stderr, ", reply_fd=%d", req->reply_fd );
1336 fprintf( stderr, ", wait_fd=%d", req->wait_fd );
1337 dump_client_cpu( ", cpu=", &req->cpu );
1340 static void dump_init_thread_reply( const struct init_thread_reply *req )
1342 fprintf( stderr, " pid=%04x", req->pid );
1343 fprintf( stderr, ", tid=%04x", req->tid );
1344 dump_timeout( ", server_start=", &req->server_start );
1345 fprintf( stderr, ", info_size=%u", req->info_size );
1346 fprintf( stderr, ", version=%d", req->version );
1347 fprintf( stderr, ", all_cpus=%08x", req->all_cpus );
1348 fprintf( stderr, ", suspend=%d", req->suspend );
1351 static void dump_terminate_process_request( const struct terminate_process_request *req )
1353 fprintf( stderr, " handle=%04x", req->handle );
1354 fprintf( stderr, ", exit_code=%d", req->exit_code );
1357 static void dump_terminate_process_reply( const struct terminate_process_reply *req )
1359 fprintf( stderr, " self=%d", req->self );
1362 static void dump_terminate_thread_request( const struct terminate_thread_request *req )
1364 fprintf( stderr, " handle=%04x", req->handle );
1365 fprintf( stderr, ", exit_code=%d", req->exit_code );
1368 static void dump_terminate_thread_reply( const struct terminate_thread_reply *req )
1370 fprintf( stderr, " self=%d", req->self );
1371 fprintf( stderr, ", last=%d", req->last );
1374 static void dump_get_process_info_request( const struct get_process_info_request *req )
1376 fprintf( stderr, " handle=%04x", req->handle );
1379 static void dump_get_process_info_reply( const struct get_process_info_reply *req )
1381 fprintf( stderr, " pid=%04x", req->pid );
1382 fprintf( stderr, ", ppid=%04x", req->ppid );
1383 dump_uint64( ", affinity=", &req->affinity );
1384 dump_uint64( ", peb=", &req->peb );
1385 dump_timeout( ", start_time=", &req->start_time );
1386 dump_timeout( ", end_time=", &req->end_time );
1387 fprintf( stderr, ", exit_code=%d", req->exit_code );
1388 fprintf( stderr, ", priority=%d", req->priority );
1389 dump_client_cpu( ", cpu=", &req->cpu );
1390 fprintf( stderr, ", debugger_present=%d", req->debugger_present );
1391 fprintf( stderr, ", debug_children=%d", req->debug_children );
1394 static void dump_get_process_vm_counters_request( const struct get_process_vm_counters_request *req )
1396 fprintf( stderr, " handle=%04x", req->handle );
1399 static void dump_get_process_vm_counters_reply( const struct get_process_vm_counters_reply *req )
1401 dump_uint64( " peak_virtual_size=", &req->peak_virtual_size );
1402 dump_uint64( ", virtual_size=", &req->virtual_size );
1403 dump_uint64( ", peak_working_set_size=", &req->peak_working_set_size );
1404 dump_uint64( ", working_set_size=", &req->working_set_size );
1405 dump_uint64( ", pagefile_usage=", &req->pagefile_usage );
1406 dump_uint64( ", peak_pagefile_usage=", &req->peak_pagefile_usage );
1409 static void dump_set_process_info_request( const struct set_process_info_request *req )
1411 fprintf( stderr, " handle=%04x", req->handle );
1412 fprintf( stderr, ", mask=%d", req->mask );
1413 fprintf( stderr, ", priority=%d", req->priority );
1414 dump_uint64( ", affinity=", &req->affinity );
1417 static void dump_get_thread_info_request( const struct get_thread_info_request *req )
1419 fprintf( stderr, " handle=%04x", req->handle );
1420 fprintf( stderr, ", tid_in=%04x", req->tid_in );
1423 static void dump_get_thread_info_reply( const struct get_thread_info_reply *req )
1425 fprintf( stderr, " pid=%04x", req->pid );
1426 fprintf( stderr, ", tid=%04x", req->tid );
1427 dump_uint64( ", teb=", &req->teb );
1428 dump_uint64( ", entry_point=", &req->entry_point );
1429 dump_uint64( ", affinity=", &req->affinity );
1430 fprintf( stderr, ", exit_code=%d", req->exit_code );
1431 fprintf( stderr, ", priority=%d", req->priority );
1432 fprintf( stderr, ", last=%d", req->last );
1433 fprintf( stderr, ", suspend_count=%d", req->suspend_count );
1434 fprintf( stderr, ", desc_len=%u", req->desc_len );
1435 dump_varargs_unicode_str( ", desc=", cur_size );
1438 static void dump_get_thread_times_request( const struct get_thread_times_request *req )
1440 fprintf( stderr, " handle=%04x", req->handle );
1443 static void dump_get_thread_times_reply( const struct get_thread_times_reply *req )
1445 dump_timeout( " creation_time=", &req->creation_time );
1446 dump_timeout( ", exit_time=", &req->exit_time );
1449 static void dump_set_thread_info_request( const struct set_thread_info_request *req )
1451 fprintf( stderr, " handle=%04x", req->handle );
1452 fprintf( stderr, ", mask=%d", req->mask );
1453 fprintf( stderr, ", priority=%d", req->priority );
1454 dump_uint64( ", affinity=", &req->affinity );
1455 dump_uint64( ", entry_point=", &req->entry_point );
1456 fprintf( stderr, ", token=%04x", req->token );
1457 dump_varargs_unicode_str( ", desc=", cur_size );
1460 static void dump_get_dll_info_request( const struct get_dll_info_request *req )
1462 fprintf( stderr, " handle=%04x", req->handle );
1463 dump_uint64( ", base_address=", &req->base_address );
1466 static void dump_get_dll_info_reply( const struct get_dll_info_reply *req )
1468 dump_uint64( " entry_point=", &req->entry_point );
1469 fprintf( stderr, ", filename_len=%u", req->filename_len );
1470 dump_varargs_unicode_str( ", filename=", cur_size );
1473 static void dump_suspend_thread_request( const struct suspend_thread_request *req )
1475 fprintf( stderr, " handle=%04x", req->handle );
1478 static void dump_suspend_thread_reply( const struct suspend_thread_reply *req )
1480 fprintf( stderr, " count=%d", req->count );
1483 static void dump_resume_thread_request( const struct resume_thread_request *req )
1485 fprintf( stderr, " handle=%04x", req->handle );
1488 static void dump_resume_thread_reply( const struct resume_thread_reply *req )
1490 fprintf( stderr, " count=%d", req->count );
1493 static void dump_load_dll_request( const struct load_dll_request *req )
1495 fprintf( stderr, " dbg_offset=%u", req->dbg_offset );
1496 dump_uint64( ", base=", &req->base );
1497 dump_uint64( ", name=", &req->name );
1498 fprintf( stderr, ", dbg_size=%u", req->dbg_size );
1499 dump_varargs_unicode_str( ", filename=", cur_size );
1502 static void dump_unload_dll_request( const struct unload_dll_request *req )
1504 dump_uint64( " base=", &req->base );
1507 static void dump_queue_apc_request( const struct queue_apc_request *req )
1509 fprintf( stderr, " handle=%04x", req->handle );
1510 dump_apc_call( ", call=", &req->call );
1513 static void dump_queue_apc_reply( const struct queue_apc_reply *req )
1515 fprintf( stderr, " handle=%04x", req->handle );
1516 fprintf( stderr, ", self=%d", req->self );
1519 static void dump_get_apc_result_request( const struct get_apc_result_request *req )
1521 fprintf( stderr, " handle=%04x", req->handle );
1524 static void dump_get_apc_result_reply( const struct get_apc_result_reply *req )
1526 dump_apc_result( " result=", &req->result );
1529 static void dump_close_handle_request( const struct close_handle_request *req )
1531 fprintf( stderr, " handle=%04x", req->handle );
1534 static void dump_set_handle_info_request( const struct set_handle_info_request *req )
1536 fprintf( stderr, " handle=%04x", req->handle );
1537 fprintf( stderr, ", flags=%d", req->flags );
1538 fprintf( stderr, ", mask=%d", req->mask );
1541 static void dump_set_handle_info_reply( const struct set_handle_info_reply *req )
1543 fprintf( stderr, " old_flags=%d", req->old_flags );
1546 static void dump_dup_handle_request( const struct dup_handle_request *req )
1548 fprintf( stderr, " src_process=%04x", req->src_process );
1549 fprintf( stderr, ", src_handle=%04x", req->src_handle );
1550 fprintf( stderr, ", dst_process=%04x", req->dst_process );
1551 fprintf( stderr, ", access=%08x", req->access );
1552 fprintf( stderr, ", attributes=%08x", req->attributes );
1553 fprintf( stderr, ", options=%08x", req->options );
1556 static void dump_dup_handle_reply( const struct dup_handle_reply *req )
1558 fprintf( stderr, " handle=%04x", req->handle );
1559 fprintf( stderr, ", self=%d", req->self );
1560 fprintf( stderr, ", closed=%d", req->closed );
1563 static void dump_open_process_request( const struct open_process_request *req )
1565 fprintf( stderr, " pid=%04x", req->pid );
1566 fprintf( stderr, ", access=%08x", req->access );
1567 fprintf( stderr, ", attributes=%08x", req->attributes );
1570 static void dump_open_process_reply( const struct open_process_reply *req )
1572 fprintf( stderr, " handle=%04x", req->handle );
1575 static void dump_open_thread_request( const struct open_thread_request *req )
1577 fprintf( stderr, " tid=%04x", req->tid );
1578 fprintf( stderr, ", access=%08x", req->access );
1579 fprintf( stderr, ", attributes=%08x", req->attributes );
1582 static void dump_open_thread_reply( const struct open_thread_reply *req )
1584 fprintf( stderr, " handle=%04x", req->handle );
1587 static void dump_select_request( const struct select_request *req )
1589 fprintf( stderr, " flags=%d", req->flags );
1590 dump_uint64( ", cookie=", &req->cookie );
1591 dump_abstime( ", timeout=", &req->timeout );
1592 fprintf( stderr, ", size=%u", req->size );
1593 fprintf( stderr, ", prev_apc=%04x", req->prev_apc );
1594 dump_varargs_apc_result( ", result=", cur_size );
1595 dump_varargs_select_op( ", data=", min(cur_size,req->size) );
1596 dump_varargs_context( ", context=", cur_size );
1599 static void dump_select_reply( const struct select_reply *req )
1601 dump_apc_call( " call=", &req->call );
1602 fprintf( stderr, ", apc_handle=%04x", req->apc_handle );
1603 dump_varargs_context( ", context=", cur_size );
1606 static void dump_create_event_request( const struct create_event_request *req )
1608 fprintf( stderr, " access=%08x", req->access );
1609 fprintf( stderr, ", manual_reset=%d", req->manual_reset );
1610 fprintf( stderr, ", initial_state=%d", req->initial_state );
1611 dump_varargs_object_attributes( ", objattr=", cur_size );
1614 static void dump_create_event_reply( const struct create_event_reply *req )
1616 fprintf( stderr, " handle=%04x", req->handle );
1619 static void dump_event_op_request( const struct event_op_request *req )
1621 fprintf( stderr, " handle=%04x", req->handle );
1622 fprintf( stderr, ", op=%d", req->op );
1625 static void dump_event_op_reply( const struct event_op_reply *req )
1627 fprintf( stderr, " state=%d", req->state );
1630 static void dump_query_event_request( const struct query_event_request *req )
1632 fprintf( stderr, " handle=%04x", req->handle );
1635 static void dump_query_event_reply( const struct query_event_reply *req )
1637 fprintf( stderr, " manual_reset=%d", req->manual_reset );
1638 fprintf( stderr, ", state=%d", req->state );
1641 static void dump_open_event_request( const struct open_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_event_reply( const struct open_event_reply *req )
1651 fprintf( stderr, " handle=%04x", req->handle );
1654 static void dump_create_keyed_event_request( const struct create_keyed_event_request *req )
1656 fprintf( stderr, " access=%08x", req->access );
1657 dump_varargs_object_attributes( ", objattr=", cur_size );
1660 static void dump_create_keyed_event_reply( const struct create_keyed_event_reply *req )
1662 fprintf( stderr, " handle=%04x", req->handle );
1665 static void dump_open_keyed_event_request( const struct open_keyed_event_request *req )
1667 fprintf( stderr, " access=%08x", req->access );
1668 fprintf( stderr, ", attributes=%08x", req->attributes );
1669 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1670 dump_varargs_unicode_str( ", name=", cur_size );
1673 static void dump_open_keyed_event_reply( const struct open_keyed_event_reply *req )
1675 fprintf( stderr, " handle=%04x", req->handle );
1678 static void dump_create_mutex_request( const struct create_mutex_request *req )
1680 fprintf( stderr, " access=%08x", req->access );
1681 fprintf( stderr, ", owned=%d", req->owned );
1682 dump_varargs_object_attributes( ", objattr=", cur_size );
1685 static void dump_create_mutex_reply( const struct create_mutex_reply *req )
1687 fprintf( stderr, " handle=%04x", req->handle );
1690 static void dump_release_mutex_request( const struct release_mutex_request *req )
1692 fprintf( stderr, " handle=%04x", req->handle );
1695 static void dump_release_mutex_reply( const struct release_mutex_reply *req )
1697 fprintf( stderr, " prev_count=%08x", req->prev_count );
1700 static void dump_open_mutex_request( const struct open_mutex_request *req )
1702 fprintf( stderr, " access=%08x", req->access );
1703 fprintf( stderr, ", attributes=%08x", req->attributes );
1704 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1705 dump_varargs_unicode_str( ", name=", cur_size );
1708 static void dump_open_mutex_reply( const struct open_mutex_reply *req )
1710 fprintf( stderr, " handle=%04x", req->handle );
1713 static void dump_query_mutex_request( const struct query_mutex_request *req )
1715 fprintf( stderr, " handle=%04x", req->handle );
1718 static void dump_query_mutex_reply( const struct query_mutex_reply *req )
1720 fprintf( stderr, " count=%08x", req->count );
1721 fprintf( stderr, ", owned=%d", req->owned );
1722 fprintf( stderr, ", abandoned=%d", req->abandoned );
1725 static void dump_create_semaphore_request( const struct create_semaphore_request *req )
1727 fprintf( stderr, " access=%08x", req->access );
1728 fprintf( stderr, ", initial=%08x", req->initial );
1729 fprintf( stderr, ", max=%08x", req->max );
1730 dump_varargs_object_attributes( ", objattr=", cur_size );
1733 static void dump_create_semaphore_reply( const struct create_semaphore_reply *req )
1735 fprintf( stderr, " handle=%04x", req->handle );
1738 static void dump_release_semaphore_request( const struct release_semaphore_request *req )
1740 fprintf( stderr, " handle=%04x", req->handle );
1741 fprintf( stderr, ", count=%08x", req->count );
1744 static void dump_release_semaphore_reply( const struct release_semaphore_reply *req )
1746 fprintf( stderr, " prev_count=%08x", req->prev_count );
1749 static void dump_query_semaphore_request( const struct query_semaphore_request *req )
1751 fprintf( stderr, " handle=%04x", req->handle );
1754 static void dump_query_semaphore_reply( const struct query_semaphore_reply *req )
1756 fprintf( stderr, " current=%08x", req->current );
1757 fprintf( stderr, ", max=%08x", req->max );
1760 static void dump_open_semaphore_request( const struct open_semaphore_request *req )
1762 fprintf( stderr, " access=%08x", req->access );
1763 fprintf( stderr, ", attributes=%08x", req->attributes );
1764 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1765 dump_varargs_unicode_str( ", name=", cur_size );
1768 static void dump_open_semaphore_reply( const struct open_semaphore_reply *req )
1770 fprintf( stderr, " handle=%04x", req->handle );
1773 static void dump_create_file_request( const struct create_file_request *req )
1775 fprintf( stderr, " access=%08x", req->access );
1776 fprintf( stderr, ", sharing=%08x", req->sharing );
1777 fprintf( stderr, ", create=%d", req->create );
1778 fprintf( stderr, ", options=%08x", req->options );
1779 fprintf( stderr, ", attrs=%08x", req->attrs );
1780 dump_varargs_object_attributes( ", objattr=", cur_size );
1781 dump_varargs_string( ", filename=", cur_size );
1784 static void dump_create_file_reply( const struct create_file_reply *req )
1786 fprintf( stderr, " handle=%04x", req->handle );
1789 static void dump_open_file_object_request( const struct open_file_object_request *req )
1791 fprintf( stderr, " access=%08x", req->access );
1792 fprintf( stderr, ", attributes=%08x", req->attributes );
1793 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1794 fprintf( stderr, ", sharing=%08x", req->sharing );
1795 fprintf( stderr, ", options=%08x", req->options );
1796 dump_varargs_unicode_str( ", filename=", cur_size );
1799 static void dump_open_file_object_reply( const struct open_file_object_reply *req )
1801 fprintf( stderr, " handle=%04x", req->handle );
1804 static void dump_alloc_file_handle_request( const struct alloc_file_handle_request *req )
1806 fprintf( stderr, " access=%08x", req->access );
1807 fprintf( stderr, ", attributes=%08x", req->attributes );
1808 fprintf( stderr, ", fd=%d", req->fd );
1811 static void dump_alloc_file_handle_reply( const struct alloc_file_handle_reply *req )
1813 fprintf( stderr, " handle=%04x", req->handle );
1816 static void dump_get_handle_unix_name_request( const struct get_handle_unix_name_request *req )
1818 fprintf( stderr, " handle=%04x", req->handle );
1821 static void dump_get_handle_unix_name_reply( const struct get_handle_unix_name_reply *req )
1823 fprintf( stderr, " name_len=%u", req->name_len );
1824 dump_varargs_string( ", name=", cur_size );
1827 static void dump_get_handle_fd_request( const struct get_handle_fd_request *req )
1829 fprintf( stderr, " handle=%04x", req->handle );
1832 static void dump_get_handle_fd_reply( const struct get_handle_fd_reply *req )
1834 fprintf( stderr, " type=%d", req->type );
1835 fprintf( stderr, ", cacheable=%d", req->cacheable );
1836 fprintf( stderr, ", access=%08x", req->access );
1837 fprintf( stderr, ", options=%08x", req->options );
1840 static void dump_get_directory_cache_entry_request( const struct get_directory_cache_entry_request *req )
1842 fprintf( stderr, " handle=%04x", req->handle );
1845 static void dump_get_directory_cache_entry_reply( const struct get_directory_cache_entry_reply *req )
1847 fprintf( stderr, " entry=%d", req->entry );
1848 dump_varargs_ints( ", free=", cur_size );
1851 static void dump_flush_request( const struct flush_request *req )
1853 dump_async_data( " async=", &req->async );
1856 static void dump_flush_reply( const struct flush_reply *req )
1858 fprintf( stderr, " event=%04x", req->event );
1861 static void dump_get_file_info_request( const struct get_file_info_request *req )
1863 fprintf( stderr, " handle=%04x", req->handle );
1864 fprintf( stderr, ", info_class=%08x", req->info_class );
1867 static void dump_get_file_info_reply( const struct get_file_info_reply *req )
1869 dump_varargs_bytes( " data=", cur_size );
1872 static void dump_get_volume_info_request( const struct get_volume_info_request *req )
1874 fprintf( stderr, " handle=%04x", req->handle );
1875 fprintf( stderr, ", info_class=%08x", req->info_class );
1878 static void dump_get_volume_info_reply( const struct get_volume_info_reply *req )
1880 dump_varargs_bytes( " data=", cur_size );
1883 static void dump_lock_file_request( const struct lock_file_request *req )
1885 fprintf( stderr, " handle=%04x", req->handle );
1886 dump_uint64( ", offset=", &req->offset );
1887 dump_uint64( ", count=", &req->count );
1888 fprintf( stderr, ", shared=%d", req->shared );
1889 fprintf( stderr, ", wait=%d", req->wait );
1892 static void dump_lock_file_reply( const struct lock_file_reply *req )
1894 fprintf( stderr, " handle=%04x", req->handle );
1895 fprintf( stderr, ", overlapped=%d", req->overlapped );
1898 static void dump_unlock_file_request( const struct unlock_file_request *req )
1900 fprintf( stderr, " handle=%04x", req->handle );
1901 dump_uint64( ", offset=", &req->offset );
1902 dump_uint64( ", count=", &req->count );
1905 static void dump_create_socket_request( const struct create_socket_request *req )
1907 fprintf( stderr, " access=%08x", req->access );
1908 fprintf( stderr, ", attributes=%08x", req->attributes );
1909 fprintf( stderr, ", family=%d", req->family );
1910 fprintf( stderr, ", type=%d", req->type );
1911 fprintf( stderr, ", protocol=%d", req->protocol );
1912 fprintf( stderr, ", flags=%08x", req->flags );
1915 static void dump_create_socket_reply( const struct create_socket_reply *req )
1917 fprintf( stderr, " handle=%04x", req->handle );
1920 static void dump_accept_socket_request( const struct accept_socket_request *req )
1922 fprintf( stderr, " lhandle=%04x", req->lhandle );
1923 fprintf( stderr, ", access=%08x", req->access );
1924 fprintf( stderr, ", attributes=%08x", req->attributes );
1927 static void dump_accept_socket_reply( const struct accept_socket_reply *req )
1929 fprintf( stderr, " handle=%04x", req->handle );
1932 static void dump_accept_into_socket_request( const struct accept_into_socket_request *req )
1934 fprintf( stderr, " lhandle=%04x", req->lhandle );
1935 fprintf( stderr, ", ahandle=%04x", req->ahandle );
1938 static void dump_set_socket_event_request( const struct set_socket_event_request *req )
1940 fprintf( stderr, " handle=%04x", req->handle );
1941 fprintf( stderr, ", mask=%08x", req->mask );
1942 fprintf( stderr, ", event=%04x", req->event );
1943 fprintf( stderr, ", window=%08x", req->window );
1944 fprintf( stderr, ", msg=%08x", req->msg );
1947 static void dump_get_socket_event_request( const struct get_socket_event_request *req )
1949 fprintf( stderr, " handle=%04x", req->handle );
1950 fprintf( stderr, ", service=%d", req->service );
1951 fprintf( stderr, ", c_event=%04x", req->c_event );
1954 static void dump_get_socket_event_reply( const struct get_socket_event_reply *req )
1956 fprintf( stderr, " mask=%08x", req->mask );
1957 fprintf( stderr, ", pmask=%08x", req->pmask );
1958 fprintf( stderr, ", state=%08x", req->state );
1959 dump_varargs_ints( ", errors=", cur_size );
1962 static void dump_get_socket_info_request( const struct get_socket_info_request *req )
1964 fprintf( stderr, " handle=%04x", req->handle );
1967 static void dump_get_socket_info_reply( const struct get_socket_info_reply *req )
1969 fprintf( stderr, " family=%d", req->family );
1970 fprintf( stderr, ", type=%d", req->type );
1971 fprintf( stderr, ", protocol=%d", req->protocol );
1974 static void dump_enable_socket_event_request( const struct enable_socket_event_request *req )
1976 fprintf( stderr, " handle=%04x", req->handle );
1977 fprintf( stderr, ", mask=%08x", req->mask );
1978 fprintf( stderr, ", sstate=%08x", req->sstate );
1979 fprintf( stderr, ", cstate=%08x", req->cstate );
1982 static void dump_set_socket_deferred_request( const struct set_socket_deferred_request *req )
1984 fprintf( stderr, " handle=%04x", req->handle );
1985 fprintf( stderr, ", deferred=%04x", req->deferred );
1988 static void dump_alloc_console_request( const struct alloc_console_request *req )
1990 fprintf( stderr, " access=%08x", req->access );
1991 fprintf( stderr, ", attributes=%08x", req->attributes );
1992 fprintf( stderr, ", pid=%04x", req->pid );
1993 fprintf( stderr, ", input_fd=%d", req->input_fd );
1996 static void dump_alloc_console_reply( const struct alloc_console_reply *req )
1998 fprintf( stderr, " handle_in=%04x", req->handle_in );
1999 fprintf( stderr, ", event=%04x", req->event );
2002 static void dump_free_console_request( const struct free_console_request *req )
2006 static void dump_get_console_renderer_events_request( const struct get_console_renderer_events_request *req )
2008 fprintf( stderr, " handle=%04x", req->handle );
2011 static void dump_get_console_renderer_events_reply( const struct get_console_renderer_events_reply *req )
2013 dump_varargs_bytes( " data=", cur_size );
2016 static void dump_open_console_request( const struct open_console_request *req )
2018 fprintf( stderr, " from=%04x", req->from );
2019 fprintf( stderr, ", access=%08x", req->access );
2020 fprintf( stderr, ", attributes=%08x", req->attributes );
2021 fprintf( stderr, ", share=%d", req->share );
2024 static void dump_open_console_reply( const struct open_console_reply *req )
2026 fprintf( stderr, " handle=%04x", req->handle );
2029 static void dump_attach_console_request( const struct attach_console_request *req )
2031 fprintf( stderr, " pid=%04x", req->pid );
2034 static void dump_attach_console_reply( const struct attach_console_reply *req )
2036 fprintf( stderr, " std_in=%04x", req->std_in );
2037 fprintf( stderr, ", std_out=%04x", req->std_out );
2038 fprintf( stderr, ", std_err=%04x", req->std_err );
2041 static void dump_get_console_wait_event_request( const struct get_console_wait_event_request *req )
2043 fprintf( stderr, " handle=%04x", req->handle );
2046 static void dump_get_console_wait_event_reply( const struct get_console_wait_event_reply *req )
2048 fprintf( stderr, " event=%04x", req->event );
2051 static void dump_get_console_mode_request( const struct get_console_mode_request *req )
2053 fprintf( stderr, " handle=%04x", req->handle );
2056 static void dump_get_console_mode_reply( const struct get_console_mode_reply *req )
2058 fprintf( stderr, " mode=%d", req->mode );
2061 static void dump_set_console_mode_request( const struct set_console_mode_request *req )
2063 fprintf( stderr, " handle=%04x", req->handle );
2064 fprintf( stderr, ", mode=%d", req->mode );
2067 static void dump_set_console_input_info_request( const struct set_console_input_info_request *req )
2069 fprintf( stderr, " handle=%04x", req->handle );
2070 fprintf( stderr, ", mask=%d", req->mask );
2071 fprintf( stderr, ", active_sb=%04x", req->active_sb );
2072 fprintf( stderr, ", history_mode=%d", req->history_mode );
2073 fprintf( stderr, ", history_size=%d", req->history_size );
2074 fprintf( stderr, ", edition_mode=%d", req->edition_mode );
2075 fprintf( stderr, ", input_cp=%d", req->input_cp );
2076 fprintf( stderr, ", output_cp=%d", req->output_cp );
2077 fprintf( stderr, ", win=%08x", req->win );
2078 dump_varargs_unicode_str( ", title=", cur_size );
2081 static void dump_get_console_input_info_request( const struct get_console_input_info_request *req )
2083 fprintf( stderr, " handle=%04x", req->handle );
2086 static void dump_get_console_input_info_reply( const struct get_console_input_info_reply *req )
2088 fprintf( stderr, " history_mode=%d", req->history_mode );
2089 fprintf( stderr, ", history_size=%d", req->history_size );
2090 fprintf( stderr, ", history_index=%d", req->history_index );
2091 fprintf( stderr, ", edition_mode=%d", req->edition_mode );
2092 fprintf( stderr, ", input_cp=%d", req->input_cp );
2093 fprintf( stderr, ", output_cp=%d", req->output_cp );
2094 fprintf( stderr, ", win=%08x", req->win );
2095 dump_varargs_unicode_str( ", title=", cur_size );
2098 static void dump_append_console_input_history_request( const struct append_console_input_history_request *req )
2100 fprintf( stderr, " handle=%04x", req->handle );
2101 dump_varargs_unicode_str( ", line=", cur_size );
2104 static void dump_get_console_input_history_request( const struct get_console_input_history_request *req )
2106 fprintf( stderr, " handle=%04x", req->handle );
2107 fprintf( stderr, ", index=%d", req->index );
2110 static void dump_get_console_input_history_reply( const struct get_console_input_history_reply *req )
2112 fprintf( stderr, " total=%d", req->total );
2113 dump_varargs_unicode_str( ", line=", cur_size );
2116 static void dump_create_console_output_request( const struct create_console_output_request *req )
2118 fprintf( stderr, " handle_in=%04x", req->handle_in );
2119 fprintf( stderr, ", access=%08x", req->access );
2120 fprintf( stderr, ", attributes=%08x", req->attributes );
2121 fprintf( stderr, ", share=%08x", req->share );
2122 fprintf( stderr, ", fd=%d", req->fd );
2125 static void dump_create_console_output_reply( const struct create_console_output_reply *req )
2127 fprintf( stderr, " handle_out=%04x", req->handle_out );
2130 static void dump_set_console_output_info_request( const struct set_console_output_info_request *req )
2132 fprintf( stderr, " handle=%04x", req->handle );
2133 fprintf( stderr, ", mask=%d", req->mask );
2134 fprintf( stderr, ", cursor_size=%d", req->cursor_size );
2135 fprintf( stderr, ", cursor_visible=%d", req->cursor_visible );
2136 fprintf( stderr, ", cursor_x=%d", req->cursor_x );
2137 fprintf( stderr, ", cursor_y=%d", req->cursor_y );
2138 fprintf( stderr, ", width=%d", req->width );
2139 fprintf( stderr, ", height=%d", req->height );
2140 fprintf( stderr, ", attr=%d", req->attr );
2141 fprintf( stderr, ", popup_attr=%d", req->popup_attr );
2142 fprintf( stderr, ", win_left=%d", req->win_left );
2143 fprintf( stderr, ", win_top=%d", req->win_top );
2144 fprintf( stderr, ", win_right=%d", req->win_right );
2145 fprintf( stderr, ", win_bottom=%d", req->win_bottom );
2146 fprintf( stderr, ", max_width=%d", req->max_width );
2147 fprintf( stderr, ", max_height=%d", req->max_height );
2148 fprintf( stderr, ", font_width=%d", req->font_width );
2149 fprintf( stderr, ", font_height=%d", req->font_height );
2150 fprintf( stderr, ", font_weight=%d", req->font_weight );
2151 fprintf( stderr, ", font_pitch_family=%d", req->font_pitch_family );
2152 dump_varargs_uints( ", colors=", min(cur_size,64) );
2153 dump_varargs_unicode_str( ", face_name=", cur_size );
2156 static void dump_get_console_output_info_request( const struct get_console_output_info_request *req )
2158 fprintf( stderr, " handle=%04x", req->handle );
2161 static void dump_get_console_output_info_reply( const struct get_console_output_info_reply *req )
2163 fprintf( stderr, " cursor_size=%d", req->cursor_size );
2164 fprintf( stderr, ", cursor_visible=%d", req->cursor_visible );
2165 fprintf( stderr, ", cursor_x=%d", req->cursor_x );
2166 fprintf( stderr, ", cursor_y=%d", req->cursor_y );
2167 fprintf( stderr, ", width=%d", req->width );
2168 fprintf( stderr, ", height=%d", req->height );
2169 fprintf( stderr, ", attr=%d", req->attr );
2170 fprintf( stderr, ", popup_attr=%d", req->popup_attr );
2171 fprintf( stderr, ", win_left=%d", req->win_left );
2172 fprintf( stderr, ", win_top=%d", req->win_top );
2173 fprintf( stderr, ", win_right=%d", req->win_right );
2174 fprintf( stderr, ", win_bottom=%d", req->win_bottom );
2175 fprintf( stderr, ", max_width=%d", req->max_width );
2176 fprintf( stderr, ", max_height=%d", req->max_height );
2177 fprintf( stderr, ", font_width=%d", req->font_width );
2178 fprintf( stderr, ", font_height=%d", req->font_height );
2179 fprintf( stderr, ", font_weight=%d", req->font_weight );
2180 fprintf( stderr, ", font_pitch_family=%d", req->font_pitch_family );
2181 dump_varargs_uints( ", colors=", min(cur_size,64) );
2182 dump_varargs_unicode_str( ", face_name=", cur_size );
2185 static void dump_write_console_input_request( const struct write_console_input_request *req )
2187 fprintf( stderr, " handle=%04x", req->handle );
2188 dump_varargs_input_records( ", rec=", cur_size );
2191 static void dump_write_console_input_reply( const struct write_console_input_reply *req )
2193 fprintf( stderr, " written=%d", req->written );
2196 static void dump_read_console_input_request( const struct read_console_input_request *req )
2198 fprintf( stderr, " handle=%04x", req->handle );
2199 fprintf( stderr, ", flush=%d", req->flush );
2202 static void dump_read_console_input_reply( const struct read_console_input_reply *req )
2204 fprintf( stderr, " read=%d", req->read );
2205 dump_varargs_input_records( ", rec=", cur_size );
2208 static void dump_write_console_output_request( const struct write_console_output_request *req )
2210 fprintf( stderr, " handle=%04x", req->handle );
2211 fprintf( stderr, ", x=%d", req->x );
2212 fprintf( stderr, ", y=%d", req->y );
2213 fprintf( stderr, ", mode=%d", req->mode );
2214 fprintf( stderr, ", wrap=%d", req->wrap );
2215 dump_varargs_bytes( ", data=", cur_size );
2218 static void dump_write_console_output_reply( const struct write_console_output_reply *req )
2220 fprintf( stderr, " written=%d", req->written );
2221 fprintf( stderr, ", width=%d", req->width );
2222 fprintf( stderr, ", height=%d", req->height );
2225 static void dump_fill_console_output_request( const struct fill_console_output_request *req )
2227 fprintf( stderr, " handle=%04x", req->handle );
2228 fprintf( stderr, ", x=%d", req->x );
2229 fprintf( stderr, ", y=%d", req->y );
2230 fprintf( stderr, ", mode=%d", req->mode );
2231 fprintf( stderr, ", count=%d", req->count );
2232 fprintf( stderr, ", wrap=%d", req->wrap );
2233 dump_char_info( ", data=", &req->data );
2236 static void dump_fill_console_output_reply( const struct fill_console_output_reply *req )
2238 fprintf( stderr, " written=%d", req->written );
2241 static void dump_read_console_output_request( const struct read_console_output_request *req )
2243 fprintf( stderr, " handle=%04x", req->handle );
2244 fprintf( stderr, ", x=%d", req->x );
2245 fprintf( stderr, ", y=%d", req->y );
2246 fprintf( stderr, ", mode=%d", req->mode );
2247 fprintf( stderr, ", wrap=%d", req->wrap );
2250 static void dump_read_console_output_reply( const struct read_console_output_reply *req )
2252 fprintf( stderr, " width=%d", req->width );
2253 fprintf( stderr, ", height=%d", req->height );
2254 dump_varargs_bytes( ", data=", cur_size );
2257 static void dump_move_console_output_request( const struct move_console_output_request *req )
2259 fprintf( stderr, " handle=%04x", req->handle );
2260 fprintf( stderr, ", x_src=%d", req->x_src );
2261 fprintf( stderr, ", y_src=%d", req->y_src );
2262 fprintf( stderr, ", x_dst=%d", req->x_dst );
2263 fprintf( stderr, ", y_dst=%d", req->y_dst );
2264 fprintf( stderr, ", w=%d", req->w );
2265 fprintf( stderr, ", h=%d", req->h );
2268 static void dump_send_console_signal_request( const struct send_console_signal_request *req )
2270 fprintf( stderr, " signal=%d", req->signal );
2271 fprintf( stderr, ", group_id=%04x", req->group_id );
2274 static void dump_read_directory_changes_request( const struct read_directory_changes_request *req )
2276 fprintf( stderr, " filter=%08x", req->filter );
2277 fprintf( stderr, ", subtree=%d", req->subtree );
2278 fprintf( stderr, ", want_data=%d", req->want_data );
2279 dump_async_data( ", async=", &req->async );
2282 static void dump_read_change_request( const struct read_change_request *req )
2284 fprintf( stderr, " handle=%04x", req->handle );
2287 static void dump_read_change_reply( const struct read_change_reply *req )
2289 dump_varargs_filesystem_event( " events=", cur_size );
2292 static void dump_create_mapping_request( const struct create_mapping_request *req )
2294 fprintf( stderr, " access=%08x", req->access );
2295 fprintf( stderr, ", flags=%08x", req->flags );
2296 fprintf( stderr, ", file_access=%08x", req->file_access );
2297 dump_uint64( ", size=", &req->size );
2298 fprintf( stderr, ", file_handle=%04x", req->file_handle );
2299 dump_varargs_object_attributes( ", objattr=", cur_size );
2302 static void dump_create_mapping_reply( const struct create_mapping_reply *req )
2304 fprintf( stderr, " handle=%04x", req->handle );
2307 static void dump_open_mapping_request( const struct open_mapping_request *req )
2309 fprintf( stderr, " access=%08x", req->access );
2310 fprintf( stderr, ", attributes=%08x", req->attributes );
2311 fprintf( stderr, ", rootdir=%04x", req->rootdir );
2312 dump_varargs_unicode_str( ", name=", cur_size );
2315 static void dump_open_mapping_reply( const struct open_mapping_reply *req )
2317 fprintf( stderr, " handle=%04x", req->handle );
2320 static void dump_get_mapping_info_request( const struct get_mapping_info_request *req )
2322 fprintf( stderr, " handle=%04x", req->handle );
2323 fprintf( stderr, ", access=%08x", req->access );
2326 static void dump_get_mapping_info_reply( const struct get_mapping_info_reply *req )
2328 dump_uint64( " size=", &req->size );
2329 fprintf( stderr, ", flags=%08x", req->flags );
2330 fprintf( stderr, ", shared_file=%04x", req->shared_file );
2331 dump_varargs_pe_image_info( ", image=", cur_size );
2334 static void dump_map_view_request( const struct map_view_request *req )
2336 fprintf( stderr, " mapping=%04x", req->mapping );
2337 fprintf( stderr, ", access=%08x", req->access );
2338 dump_uint64( ", base=", &req->base );
2339 dump_uint64( ", size=", &req->size );
2340 dump_uint64( ", start=", &req->start );
2343 static void dump_unmap_view_request( const struct unmap_view_request *req )
2345 dump_uint64( " base=", &req->base );
2348 static void dump_get_mapping_committed_range_request( const struct get_mapping_committed_range_request *req )
2350 dump_uint64( " base=", &req->base );
2351 dump_uint64( ", offset=", &req->offset );
2354 static void dump_get_mapping_committed_range_reply( const struct get_mapping_committed_range_reply *req )
2356 dump_uint64( " size=", &req->size );
2357 fprintf( stderr, ", committed=%d", req->committed );
2360 static void dump_add_mapping_committed_range_request( const struct add_mapping_committed_range_request *req )
2362 dump_uint64( " base=", &req->base );
2363 dump_uint64( ", offset=", &req->offset );
2364 dump_uint64( ", size=", &req->size );
2367 static void dump_is_same_mapping_request( const struct is_same_mapping_request *req )
2369 dump_uint64( " base1=", &req->base1 );
2370 dump_uint64( ", base2=", &req->base2 );
2373 static void dump_create_snapshot_request( const struct create_snapshot_request *req )
2375 fprintf( stderr, " attributes=%08x", req->attributes );
2376 fprintf( stderr, ", flags=%08x", req->flags );
2379 static void dump_create_snapshot_reply( const struct create_snapshot_reply *req )
2381 fprintf( stderr, " handle=%04x", req->handle );
2384 static void dump_next_process_request( const struct next_process_request *req )
2386 fprintf( stderr, " handle=%04x", req->handle );
2387 fprintf( stderr, ", reset=%d", req->reset );
2390 static void dump_next_process_reply( const struct next_process_reply *req )
2392 fprintf( stderr, " count=%d", req->count );
2393 fprintf( stderr, ", pid=%04x", req->pid );
2394 fprintf( stderr, ", ppid=%04x", req->ppid );
2395 fprintf( stderr, ", threads=%d", req->threads );
2396 fprintf( stderr, ", priority=%d", req->priority );
2397 fprintf( stderr, ", handles=%d", req->handles );
2398 fprintf( stderr, ", unix_pid=%d", req->unix_pid );
2399 dump_varargs_unicode_str( ", filename=", cur_size );
2402 static void dump_next_thread_request( const struct next_thread_request *req )
2404 fprintf( stderr, " handle=%04x", req->handle );
2405 fprintf( stderr, ", reset=%d", req->reset );
2408 static void dump_next_thread_reply( const struct next_thread_reply *req )
2410 fprintf( stderr, " count=%d", req->count );
2411 fprintf( stderr, ", pid=%04x", req->pid );
2412 fprintf( stderr, ", tid=%04x", req->tid );
2413 fprintf( stderr, ", base_pri=%d", req->base_pri );
2414 fprintf( stderr, ", delta_pri=%d", req->delta_pri );
2417 static void dump_wait_debug_event_request( const struct wait_debug_event_request *req )
2419 fprintf( stderr, " get_handle=%d", req->get_handle );
2422 static void dump_wait_debug_event_reply( const struct wait_debug_event_reply *req )
2424 fprintf( stderr, " pid=%04x", req->pid );
2425 fprintf( stderr, ", tid=%04x", req->tid );
2426 fprintf( stderr, ", wait=%04x", req->wait );
2427 dump_varargs_debug_event( ", event=", cur_size );
2430 static void dump_queue_exception_event_request( const struct queue_exception_event_request *req )
2432 fprintf( stderr, " first=%d", req->first );
2433 fprintf( stderr, ", code=%08x", req->code );
2434 fprintf( stderr, ", flags=%08x", req->flags );
2435 dump_uint64( ", record=", &req->record );
2436 dump_uint64( ", address=", &req->address );
2437 fprintf( stderr, ", len=%u", req->len );
2438 dump_varargs_uints64( ", params=", min(cur_size,req->len) );
2441 static void dump_queue_exception_event_reply( const struct queue_exception_event_reply *req )
2443 fprintf( stderr, " handle=%04x", req->handle );
2446 static void dump_get_exception_status_request( const struct get_exception_status_request *req )
2448 fprintf( stderr, " handle=%04x", req->handle );
2451 static void dump_continue_debug_event_request( const struct continue_debug_event_request *req )
2453 fprintf( stderr, " pid=%04x", req->pid );
2454 fprintf( stderr, ", tid=%04x", req->tid );
2455 fprintf( stderr, ", status=%d", req->status );
2458 static void dump_debug_process_request( const struct debug_process_request *req )
2460 fprintf( stderr, " pid=%04x", req->pid );
2461 fprintf( stderr, ", attach=%d", req->attach );
2464 static void dump_set_debugger_kill_on_exit_request( const struct set_debugger_kill_on_exit_request *req )
2466 fprintf( stderr, " kill_on_exit=%d", req->kill_on_exit );
2469 static void dump_read_process_memory_request( const struct read_process_memory_request *req )
2471 fprintf( stderr, " handle=%04x", req->handle );
2472 dump_uint64( ", addr=", &req->addr );
2475 static void dump_read_process_memory_reply( const struct read_process_memory_reply *req )
2477 dump_varargs_bytes( " data=", cur_size );
2480 static void dump_write_process_memory_request( const struct write_process_memory_request *req )
2482 fprintf( stderr, " handle=%04x", req->handle );
2483 dump_uint64( ", addr=", &req->addr );
2484 dump_varargs_bytes( ", data=", cur_size );
2487 static void dump_create_key_request( const struct create_key_request *req )
2489 fprintf( stderr, " access=%08x", req->access );
2490 fprintf( stderr, ", options=%08x", req->options );
2491 dump_varargs_object_attributes( ", objattr=", cur_size );
2492 dump_varargs_unicode_str( ", class=", cur_size );
2495 static void dump_create_key_reply( const struct create_key_reply *req )
2497 fprintf( stderr, " hkey=%04x", req->hkey );
2498 fprintf( stderr, ", created=%d", req->created );
2501 static void dump_open_key_request( const struct open_key_request *req )
2503 fprintf( stderr, " parent=%04x", req->parent );
2504 fprintf( stderr, ", access=%08x", req->access );
2505 fprintf( stderr, ", attributes=%08x", req->attributes );
2506 dump_varargs_unicode_str( ", name=", cur_size );
2509 static void dump_open_key_reply( const struct open_key_reply *req )
2511 fprintf( stderr, " hkey=%04x", req->hkey );
2514 static void dump_delete_key_request( const struct delete_key_request *req )
2516 fprintf( stderr, " hkey=%04x", req->hkey );
2519 static void dump_flush_key_request( const struct flush_key_request *req )
2521 fprintf( stderr, " hkey=%04x", req->hkey );
2524 static void dump_enum_key_request( const struct enum_key_request *req )
2526 fprintf( stderr, " hkey=%04x", req->hkey );
2527 fprintf( stderr, ", index=%d", req->index );
2528 fprintf( stderr, ", info_class=%d", req->info_class );
2531 static void dump_enum_key_reply( const struct enum_key_reply *req )
2533 fprintf( stderr, " subkeys=%d", req->subkeys );
2534 fprintf( stderr, ", max_subkey=%d", req->max_subkey );
2535 fprintf( stderr, ", max_class=%d", req->max_class );
2536 fprintf( stderr, ", values=%d", req->values );
2537 fprintf( stderr, ", max_value=%d", req->max_value );
2538 fprintf( stderr, ", max_data=%d", req->max_data );
2539 dump_timeout( ", modif=", &req->modif );
2540 fprintf( stderr, ", total=%u", req->total );
2541 fprintf( stderr, ", namelen=%u", req->namelen );
2542 dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
2543 dump_varargs_unicode_str( ", class=", cur_size );
2546 static void dump_set_key_value_request( const struct set_key_value_request *req )
2548 fprintf( stderr, " hkey=%04x", req->hkey );
2549 fprintf( stderr, ", type=%d", req->type );
2550 fprintf( stderr, ", namelen=%u", req->namelen );
2551 dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
2552 dump_varargs_bytes( ", data=", cur_size );
2555 static void dump_get_key_value_request( const struct get_key_value_request *req )
2557 fprintf( stderr, " hkey=%04x", req->hkey );
2558 dump_varargs_unicode_str( ", name=", cur_size );
2561 static void dump_get_key_value_reply( const struct get_key_value_reply *req )
2563 fprintf( stderr, " type=%d", req->type );
2564 fprintf( stderr, ", total=%u", req->total );
2565 dump_varargs_bytes( ", data=", cur_size );
2568 static void dump_enum_key_value_request( const struct enum_key_value_request *req )
2570 fprintf( stderr, " hkey=%04x", req->hkey );
2571 fprintf( stderr, ", index=%d", req->index );
2572 fprintf( stderr, ", info_class=%d", req->info_class );
2575 static void dump_enum_key_value_reply( const struct enum_key_value_reply *req )
2577 fprintf( stderr, " type=%d", req->type );
2578 fprintf( stderr, ", total=%u", req->total );
2579 fprintf( stderr, ", namelen=%u", req->namelen );
2580 dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
2581 dump_varargs_bytes( ", data=", cur_size );
2584 static void dump_delete_key_value_request( const struct delete_key_value_request *req )
2586 fprintf( stderr, " hkey=%04x", req->hkey );
2587 dump_varargs_unicode_str( ", name=", cur_size );
2590 static void dump_load_registry_request( const struct load_registry_request *req )
2592 fprintf( stderr, " file=%04x", req->file );
2593 dump_varargs_object_attributes( ", objattr=", cur_size );
2596 static void dump_unload_registry_request( const struct unload_registry_request *req )
2598 fprintf( stderr, " hkey=%04x", req->hkey );
2601 static void dump_save_registry_request( const struct save_registry_request *req )
2603 fprintf( stderr, " hkey=%04x", req->hkey );
2604 fprintf( stderr, ", file=%04x", req->file );
2607 static void dump_set_registry_notification_request( const struct set_registry_notification_request *req )
2609 fprintf( stderr, " hkey=%04x", req->hkey );
2610 fprintf( stderr, ", event=%04x", req->event );
2611 fprintf( stderr, ", subtree=%d", req->subtree );
2612 fprintf( stderr, ", filter=%08x", req->filter );
2615 static void dump_create_timer_request( const struct create_timer_request *req )
2617 fprintf( stderr, " access=%08x", req->access );
2618 fprintf( stderr, ", manual=%d", req->manual );
2619 dump_varargs_object_attributes( ", objattr=", cur_size );
2622 static void dump_create_timer_reply( const struct create_timer_reply *req )
2624 fprintf( stderr, " handle=%04x", req->handle );
2627 static void dump_open_timer_request( const struct open_timer_request *req )
2629 fprintf( stderr, " access=%08x", req->access );
2630 fprintf( stderr, ", attributes=%08x", req->attributes );
2631 fprintf( stderr, ", rootdir=%04x", req->rootdir );
2632 dump_varargs_unicode_str( ", name=", cur_size );
2635 static void dump_open_timer_reply( const struct open_timer_reply *req )
2637 fprintf( stderr, " handle=%04x", req->handle );
2640 static void dump_set_timer_request( const struct set_timer_request *req )
2642 fprintf( stderr, " handle=%04x", req->handle );
2643 dump_timeout( ", expire=", &req->expire );
2644 dump_uint64( ", callback=", &req->callback );
2645 dump_uint64( ", arg=", &req->arg );
2646 fprintf( stderr, ", period=%d", req->period );
2649 static void dump_set_timer_reply( const struct set_timer_reply *req )
2651 fprintf( stderr, " signaled=%d", req->signaled );
2654 static void dump_cancel_timer_request( const struct cancel_timer_request *req )
2656 fprintf( stderr, " handle=%04x", req->handle );
2659 static void dump_cancel_timer_reply( const struct cancel_timer_reply *req )
2661 fprintf( stderr, " signaled=%d", req->signaled );
2664 static void dump_get_timer_info_request( const struct get_timer_info_request *req )
2666 fprintf( stderr, " handle=%04x", req->handle );
2669 static void dump_get_timer_info_reply( const struct get_timer_info_reply *req )
2671 dump_timeout( " when=", &req->when );
2672 fprintf( stderr, ", signaled=%d", req->signaled );
2675 static void dump_get_thread_context_request( const struct get_thread_context_request *req )
2677 fprintf( stderr, " handle=%04x", req->handle );
2678 fprintf( stderr, ", flags=%08x", req->flags );
2681 static void dump_get_thread_context_reply( const struct get_thread_context_reply *req )
2683 fprintf( stderr, " self=%d", req->self );
2684 fprintf( stderr, ", handle=%04x", req->handle );
2685 dump_varargs_context( ", context=", cur_size );
2688 static void dump_set_thread_context_request( const struct set_thread_context_request *req )
2690 fprintf( stderr, " handle=%04x", req->handle );
2691 dump_varargs_context( ", context=", cur_size );
2694 static void dump_set_thread_context_reply( const struct set_thread_context_reply *req )
2696 fprintf( stderr, " self=%d", req->self );
2699 static void dump_get_selector_entry_request( const struct get_selector_entry_request *req )
2701 fprintf( stderr, " handle=%04x", req->handle );
2702 fprintf( stderr, ", entry=%d", req->entry );
2705 static void dump_get_selector_entry_reply( const struct get_selector_entry_reply *req )
2707 fprintf( stderr, " base=%08x", req->base );
2708 fprintf( stderr, ", limit=%08x", req->limit );
2709 fprintf( stderr, ", flags=%02x", req->flags );
2712 static void dump_add_atom_request( const struct add_atom_request *req )
2714 fprintf( stderr, " table=%04x", req->table );
2715 dump_varargs_unicode_str( ", name=", cur_size );
2718 static void dump_add_atom_reply( const struct add_atom_reply *req )
2720 fprintf( stderr, " atom=%04x", req->atom );
2723 static void dump_delete_atom_request( const struct delete_atom_request *req )
2725 fprintf( stderr, " table=%04x", req->table );
2726 fprintf( stderr, ", atom=%04x", req->atom );
2729 static void dump_find_atom_request( const struct find_atom_request *req )
2731 fprintf( stderr, " table=%04x", req->table );
2732 dump_varargs_unicode_str( ", name=", cur_size );
2735 static void dump_find_atom_reply( const struct find_atom_reply *req )
2737 fprintf( stderr, " atom=%04x", req->atom );
2740 static void dump_get_atom_information_request( const struct get_atom_information_request *req )
2742 fprintf( stderr, " table=%04x", req->table );
2743 fprintf( stderr, ", atom=%04x", req->atom );
2746 static void dump_get_atom_information_reply( const struct get_atom_information_reply *req )
2748 fprintf( stderr, " count=%d", req->count );
2749 fprintf( stderr, ", pinned=%d", req->pinned );
2750 fprintf( stderr, ", total=%u", req->total );
2751 dump_varargs_unicode_str( ", name=", cur_size );
2754 static void dump_set_atom_information_request( const struct set_atom_information_request *req )
2756 fprintf( stderr, " table=%04x", req->table );
2757 fprintf( stderr, ", atom=%04x", req->atom );
2758 fprintf( stderr, ", pinned=%d", req->pinned );
2761 static void dump_empty_atom_table_request( const struct empty_atom_table_request *req )
2763 fprintf( stderr, " table=%04x", req->table );
2764 fprintf( stderr, ", if_pinned=%d", req->if_pinned );
2767 static void dump_init_atom_table_request( const struct init_atom_table_request *req )
2769 fprintf( stderr, " entries=%d", req->entries );
2772 static void dump_init_atom_table_reply( const struct init_atom_table_reply *req )
2774 fprintf( stderr, " table=%04x", req->table );
2777 static void dump_get_msg_queue_request( const struct get_msg_queue_request *req )
2781 static void dump_get_msg_queue_reply( const struct get_msg_queue_reply *req )
2783 fprintf( stderr, " handle=%04x", req->handle );
2786 static void dump_set_queue_fd_request( const struct set_queue_fd_request *req )
2788 fprintf( stderr, " handle=%04x", req->handle );
2791 static void dump_set_queue_mask_request( const struct set_queue_mask_request *req )
2793 fprintf( stderr, " wake_mask=%08x", req->wake_mask );
2794 fprintf( stderr, ", changed_mask=%08x", req->changed_mask );
2795 fprintf( stderr, ", skip_wait=%d", req->skip_wait );
2798 static void dump_set_queue_mask_reply( const struct set_queue_mask_reply *req )
2800 fprintf( stderr, " wake_bits=%08x", req->wake_bits );
2801 fprintf( stderr, ", changed_bits=%08x", req->changed_bits );
2804 static void dump_get_queue_status_request( const struct get_queue_status_request *req )
2806 fprintf( stderr, " clear_bits=%08x", req->clear_bits );
2809 static void dump_get_queue_status_reply( const struct get_queue_status_reply *req )
2811 fprintf( stderr, " wake_bits=%08x", req->wake_bits );
2812 fprintf( stderr, ", changed_bits=%08x", req->changed_bits );
2815 static void dump_get_process_idle_event_request( const struct get_process_idle_event_request *req )
2817 fprintf( stderr, " handle=%04x", req->handle );
2820 static void dump_get_process_idle_event_reply( const struct get_process_idle_event_reply *req )
2822 fprintf( stderr, " event=%04x", req->event );
2825 static void dump_send_message_request( const struct send_message_request *req )
2827 fprintf( stderr, " id=%04x", req->id );
2828 fprintf( stderr, ", type=%d", req->type );
2829 fprintf( stderr, ", flags=%d", req->flags );
2830 fprintf( stderr, ", win=%08x", req->win );
2831 fprintf( stderr, ", msg=%08x", req->msg );
2832 dump_uint64( ", wparam=", &req->wparam );
2833 dump_uint64( ", lparam=", &req->lparam );
2834 dump_timeout( ", timeout=", &req->timeout );
2835 dump_varargs_message_data( ", data=", cur_size );
2838 static void dump_post_quit_message_request( const struct post_quit_message_request *req )
2840 fprintf( stderr, " exit_code=%d", req->exit_code );
2843 static void dump_send_hardware_message_request( const struct send_hardware_message_request *req )
2845 fprintf( stderr, " win=%08x", req->win );
2846 dump_hw_input( ", input=", &req->input );
2847 fprintf( stderr, ", flags=%08x", req->flags );
2850 static void dump_send_hardware_message_reply( const struct send_hardware_message_reply *req )
2852 fprintf( stderr, " wait=%d", req->wait );
2853 fprintf( stderr, ", prev_x=%d", req->prev_x );
2854 fprintf( stderr, ", prev_y=%d", req->prev_y );
2855 fprintf( stderr, ", new_x=%d", req->new_x );
2856 fprintf( stderr, ", new_y=%d", req->new_y );
2857 dump_varargs_bytes( ", keystate=", cur_size );
2860 static void dump_get_message_request( const struct get_message_request *req )
2862 fprintf( stderr, " flags=%08x", req->flags );
2863 fprintf( stderr, ", get_win=%08x", req->get_win );
2864 fprintf( stderr, ", get_first=%08x", req->get_first );
2865 fprintf( stderr, ", get_last=%08x", req->get_last );
2866 fprintf( stderr, ", hw_id=%08x", req->hw_id );
2867 fprintf( stderr, ", wake_mask=%08x", req->wake_mask );
2868 fprintf( stderr, ", changed_mask=%08x", req->changed_mask );
2871 static void dump_get_message_reply( const struct get_message_reply *req )
2873 fprintf( stderr, " win=%08x", req->win );
2874 fprintf( stderr, ", msg=%08x", req->msg );
2875 dump_uint64( ", wparam=", &req->wparam );
2876 dump_uint64( ", lparam=", &req->lparam );
2877 fprintf( stderr, ", type=%d", req->type );
2878 fprintf( stderr, ", x=%d", req->x );
2879 fprintf( stderr, ", y=%d", req->y );
2880 fprintf( stderr, ", time=%08x", req->time );
2881 fprintf( stderr, ", active_hooks=%08x", req->active_hooks );
2882 fprintf( stderr, ", total=%u", req->total );
2883 dump_varargs_message_data( ", data=", cur_size );
2886 static void dump_reply_message_request( const struct reply_message_request *req )
2888 fprintf( stderr, " remove=%d", req->remove );
2889 dump_uint64( ", result=", &req->result );
2890 dump_varargs_bytes( ", data=", cur_size );
2893 static void dump_accept_hardware_message_request( const struct accept_hardware_message_request *req )
2895 fprintf( stderr, " hw_id=%08x", req->hw_id );
2896 fprintf( stderr, ", remove=%d", req->remove );
2899 static void dump_get_message_reply_request( const struct get_message_reply_request *req )
2901 fprintf( stderr, " cancel=%d", req->cancel );
2904 static void dump_get_message_reply_reply( const struct get_message_reply_reply *req )
2906 dump_uint64( " result=", &req->result );
2907 dump_varargs_bytes( ", data=", cur_size );
2910 static void dump_set_win_timer_request( const struct set_win_timer_request *req )
2912 fprintf( stderr, " win=%08x", req->win );
2913 fprintf( stderr, ", msg=%08x", req->msg );
2914 fprintf( stderr, ", rate=%08x", req->rate );
2915 dump_uint64( ", id=", &req->id );
2916 dump_uint64( ", lparam=", &req->lparam );
2919 static void dump_set_win_timer_reply( const struct set_win_timer_reply *req )
2921 dump_uint64( " id=", &req->id );
2924 static void dump_kill_win_timer_request( const struct kill_win_timer_request *req )
2926 fprintf( stderr, " win=%08x", req->win );
2927 dump_uint64( ", id=", &req->id );
2928 fprintf( stderr, ", msg=%08x", req->msg );
2931 static void dump_is_window_hung_request( const struct is_window_hung_request *req )
2933 fprintf( stderr, " win=%08x", req->win );
2936 static void dump_is_window_hung_reply( const struct is_window_hung_reply *req )
2938 fprintf( stderr, " is_hung=%d", req->is_hung );
2941 static void dump_get_serial_info_request( const struct get_serial_info_request *req )
2943 fprintf( stderr, " handle=%04x", req->handle );
2944 fprintf( stderr, ", flags=%d", req->flags );
2947 static void dump_get_serial_info_reply( const struct get_serial_info_reply *req )
2949 fprintf( stderr, " eventmask=%08x", req->eventmask );
2950 fprintf( stderr, ", cookie=%08x", req->cookie );
2951 fprintf( stderr, ", pending_write=%08x", req->pending_write );
2954 static void dump_set_serial_info_request( const struct set_serial_info_request *req )
2956 fprintf( stderr, " handle=%04x", req->handle );
2957 fprintf( stderr, ", flags=%d", req->flags );
2960 static void dump_register_async_request( const struct register_async_request *req )
2962 fprintf( stderr, " type=%d", req->type );
2963 dump_async_data( ", async=", &req->async );
2964 fprintf( stderr, ", count=%d", req->count );
2967 static void dump_cancel_async_request( const struct cancel_async_request *req )
2969 fprintf( stderr, " handle=%04x", req->handle );
2970 dump_uint64( ", iosb=", &req->iosb );
2971 fprintf( stderr, ", only_thread=%d", req->only_thread );
2974 static void dump_get_async_result_request( const struct get_async_result_request *req )
2976 dump_uint64( " user_arg=", &req->user_arg );
2979 static void dump_get_async_result_reply( const struct get_async_result_reply *req )
2981 fprintf( stderr, " size=%u", req->size );
2982 dump_varargs_bytes( ", out_data=", cur_size );
2985 static void dump_read_request( const struct read_request *req )
2987 dump_async_data( " async=", &req->async );
2988 dump_uint64( ", pos=", &req->pos );
2991 static void dump_read_reply( const struct read_reply *req )
2993 fprintf( stderr, " wait=%04x", req->wait );
2994 fprintf( stderr, ", options=%08x", req->options );
2995 dump_varargs_bytes( ", data=", cur_size );
2998 static void dump_write_request( const struct write_request *req )
3000 dump_async_data( " async=", &req->async );
3001 dump_uint64( ", pos=", &req->pos );
3002 dump_varargs_bytes( ", data=", cur_size );
3005 static void dump_write_reply( const struct write_reply *req )
3007 fprintf( stderr, " wait=%04x", req->wait );
3008 fprintf( stderr, ", options=%08x", req->options );
3009 fprintf( stderr, ", size=%u", req->size );
3012 static void dump_ioctl_request( const struct ioctl_request *req )
3014 dump_ioctl_code( " code=", &req->code );
3015 dump_async_data( ", async=", &req->async );
3016 dump_varargs_bytes( ", in_data=", cur_size );
3019 static void dump_ioctl_reply( const struct ioctl_reply *req )
3021 fprintf( stderr, " wait=%04x", req->wait );
3022 fprintf( stderr, ", options=%08x", req->options );
3023 dump_varargs_bytes( ", out_data=", cur_size );
3026 static void dump_set_irp_result_request( const struct set_irp_result_request *req )
3028 fprintf( stderr, " handle=%04x", req->handle );
3029 fprintf( stderr, ", status=%08x", req->status );
3030 fprintf( stderr, ", size=%u", req->size );
3031 dump_varargs_bytes( ", data=", cur_size );
3034 static void dump_create_named_pipe_request( const struct create_named_pipe_request *req )
3036 fprintf( stderr, " access=%08x", req->access );
3037 fprintf( stderr, ", options=%08x", req->options );
3038 fprintf( stderr, ", sharing=%08x", req->sharing );
3039 fprintf( stderr, ", maxinstances=%08x", req->maxinstances );
3040 fprintf( stderr, ", outsize=%08x", req->outsize );
3041 fprintf( stderr, ", insize=%08x", req->insize );
3042 dump_timeout( ", timeout=", &req->timeout );
3043 fprintf( stderr, ", flags=%08x", req->flags );
3044 dump_varargs_object_attributes( ", objattr=", cur_size );
3047 static void dump_create_named_pipe_reply( const struct create_named_pipe_reply *req )
3049 fprintf( stderr, " handle=%04x", req->handle );
3052 static void dump_set_named_pipe_info_request( const struct set_named_pipe_info_request *req )
3054 fprintf( stderr, " handle=%04x", req->handle );
3055 fprintf( stderr, ", flags=%08x", req->flags );
3058 static void dump_create_window_request( const struct create_window_request *req )
3060 fprintf( stderr, " parent=%08x", req->parent );
3061 fprintf( stderr, ", owner=%08x", req->owner );
3062 fprintf( stderr, ", atom=%04x", req->atom );
3063 dump_uint64( ", instance=", &req->instance );
3064 fprintf( stderr, ", dpi=%d", req->dpi );
3065 fprintf( stderr, ", awareness=%d", req->awareness );
3066 dump_varargs_unicode_str( ", class=", cur_size );
3069 static void dump_create_window_reply( const struct create_window_reply *req )
3071 fprintf( stderr, " handle=%08x", req->handle );
3072 fprintf( stderr, ", parent=%08x", req->parent );
3073 fprintf( stderr, ", owner=%08x", req->owner );
3074 fprintf( stderr, ", extra=%d", req->extra );
3075 dump_uint64( ", class_ptr=", &req->class_ptr );
3076 fprintf( stderr, ", dpi=%d", req->dpi );
3077 fprintf( stderr, ", awareness=%d", req->awareness );
3080 static void dump_destroy_window_request( const struct destroy_window_request *req )
3082 fprintf( stderr, " handle=%08x", req->handle );
3085 static void dump_get_desktop_window_request( const struct get_desktop_window_request *req )
3087 fprintf( stderr, " force=%d", req->force );
3090 static void dump_get_desktop_window_reply( const struct get_desktop_window_reply *req )
3092 fprintf( stderr, " top_window=%08x", req->top_window );
3093 fprintf( stderr, ", msg_window=%08x", req->msg_window );
3096 static void dump_set_window_owner_request( const struct set_window_owner_request *req )
3098 fprintf( stderr, " handle=%08x", req->handle );
3099 fprintf( stderr, ", owner=%08x", req->owner );
3102 static void dump_set_window_owner_reply( const struct set_window_owner_reply *req )
3104 fprintf( stderr, " full_owner=%08x", req->full_owner );
3105 fprintf( stderr, ", prev_owner=%08x", req->prev_owner );
3108 static void dump_get_window_info_request( const struct get_window_info_request *req )
3110 fprintf( stderr, " handle=%08x", req->handle );
3113 static void dump_get_window_info_reply( const struct get_window_info_reply *req )
3115 fprintf( stderr, " full_handle=%08x", req->full_handle );
3116 fprintf( stderr, ", last_active=%08x", req->last_active );
3117 fprintf( stderr, ", pid=%04x", req->pid );
3118 fprintf( stderr, ", tid=%04x", req->tid );
3119 fprintf( stderr, ", atom=%04x", req->atom );
3120 fprintf( stderr, ", is_unicode=%d", req->is_unicode );
3121 fprintf( stderr, ", dpi=%d", req->dpi );
3122 fprintf( stderr, ", awareness=%d", req->awareness );
3125 static void dump_set_window_info_request( const struct set_window_info_request *req )
3127 fprintf( stderr, " flags=%04x", req->flags );
3128 fprintf( stderr, ", is_unicode=%d", req->is_unicode );
3129 fprintf( stderr, ", handle=%08x", req->handle );
3130 fprintf( stderr, ", style=%08x", req->style );
3131 fprintf( stderr, ", ex_style=%08x", req->ex_style );
3132 fprintf( stderr, ", id=%08x", req->id );
3133 dump_uint64( ", instance=", &req->instance );
3134 dump_uint64( ", user_data=", &req->user_data );
3135 fprintf( stderr, ", extra_offset=%d", req->extra_offset );
3136 fprintf( stderr, ", extra_size=%u", req->extra_size );
3137 dump_uint64( ", extra_value=", &req->extra_value );
3140 static void dump_set_window_info_reply( const struct set_window_info_reply *req )
3142 fprintf( stderr, " old_style=%08x", req->old_style );
3143 fprintf( stderr, ", old_ex_style=%08x", req->old_ex_style );
3144 dump_uint64( ", old_instance=", &req->old_instance );
3145 dump_uint64( ", old_user_data=", &req->old_user_data );
3146 dump_uint64( ", old_extra_value=", &req->old_extra_value );
3147 fprintf( stderr, ", old_id=%08x", req->old_id );
3150 static void dump_set_parent_request( const struct set_parent_request *req )
3152 fprintf( stderr, " handle=%08x", req->handle );
3153 fprintf( stderr, ", parent=%08x", req->parent );
3156 static void dump_set_parent_reply( const struct set_parent_reply *req )
3158 fprintf( stderr, " old_parent=%08x", req->old_parent );
3159 fprintf( stderr, ", full_parent=%08x", req->full_parent );
3160 fprintf( stderr, ", dpi=%d", req->dpi );
3161 fprintf( stderr, ", awareness=%d", req->awareness );
3164 static void dump_get_window_parents_request( const struct get_window_parents_request *req )
3166 fprintf( stderr, " handle=%08x", req->handle );
3169 static void dump_get_window_parents_reply( const struct get_window_parents_reply *req )
3171 fprintf( stderr, " count=%d", req->count );
3172 dump_varargs_user_handles( ", parents=", cur_size );
3175 static void dump_get_window_children_request( const struct get_window_children_request *req )
3177 fprintf( stderr, " desktop=%04x", req->desktop );
3178 fprintf( stderr, ", parent=%08x", req->parent );
3179 fprintf( stderr, ", atom=%04x", req->atom );
3180 fprintf( stderr, ", tid=%04x", req->tid );
3181 dump_varargs_unicode_str( ", class=", cur_size );
3184 static void dump_get_window_children_reply( const struct get_window_children_reply *req )
3186 fprintf( stderr, " count=%d", req->count );
3187 dump_varargs_user_handles( ", children=", cur_size );
3190 static void dump_get_window_children_from_point_request( const struct get_window_children_from_point_request *req )
3192 fprintf( stderr, " parent=%08x", req->parent );
3193 fprintf( stderr, ", x=%d", req->x );
3194 fprintf( stderr, ", y=%d", req->y );
3195 fprintf( stderr, ", dpi=%d", req->dpi );
3198 static void dump_get_window_children_from_point_reply( const struct get_window_children_from_point_reply *req )
3200 fprintf( stderr, " count=%d", req->count );
3201 dump_varargs_user_handles( ", children=", cur_size );
3204 static void dump_get_window_tree_request( const struct get_window_tree_request *req )
3206 fprintf( stderr, " handle=%08x", req->handle );
3209 static void dump_get_window_tree_reply( const struct get_window_tree_reply *req )
3211 fprintf( stderr, " parent=%08x", req->parent );
3212 fprintf( stderr, ", owner=%08x", req->owner );
3213 fprintf( stderr, ", next_sibling=%08x", req->next_sibling );
3214 fprintf( stderr, ", prev_sibling=%08x", req->prev_sibling );
3215 fprintf( stderr, ", first_sibling=%08x", req->first_sibling );
3216 fprintf( stderr, ", last_sibling=%08x", req->last_sibling );
3217 fprintf( stderr, ", first_child=%08x", req->first_child );
3218 fprintf( stderr, ", last_child=%08x", req->last_child );
3221 static void dump_set_window_pos_request( const struct set_window_pos_request *req )
3223 fprintf( stderr, " swp_flags=%04x", req->swp_flags );
3224 fprintf( stderr, ", paint_flags=%04x", req->paint_flags );
3225 fprintf( stderr, ", handle=%08x", req->handle );
3226 fprintf( stderr, ", previous=%08x", req->previous );
3227 dump_rectangle( ", window=", &req->window );
3228 dump_rectangle( ", client=", &req->client );
3229 dump_varargs_rectangles( ", valid=", cur_size );
3232 static void dump_set_window_pos_reply( const struct set_window_pos_reply *req )
3234 fprintf( stderr, " new_style=%08x", req->new_style );
3235 fprintf( stderr, ", new_ex_style=%08x", req->new_ex_style );
3236 fprintf( stderr, ", surface_win=%08x", req->surface_win );
3237 fprintf( stderr, ", needs_update=%d", req->needs_update );
3240 static void dump_get_window_rectangles_request( const struct get_window_rectangles_request *req )
3242 fprintf( stderr, " handle=%08x", req->handle );
3243 fprintf( stderr, ", relative=%d", req->relative );
3244 fprintf( stderr, ", dpi=%d", req->dpi );
3247 static void dump_get_window_rectangles_reply( const struct get_window_rectangles_reply *req )
3249 dump_rectangle( " window=", &req->window );
3250 dump_rectangle( ", client=", &req->client );
3253 static void dump_get_window_text_request( const struct get_window_text_request *req )
3255 fprintf( stderr, " handle=%08x", req->handle );
3258 static void dump_get_window_text_reply( const struct get_window_text_reply *req )
3260 fprintf( stderr, " length=%u", req->length );
3261 dump_varargs_unicode_str( ", text=", cur_size );
3264 static void dump_set_window_text_request( const struct set_window_text_request *req )
3266 fprintf( stderr, " handle=%08x", req->handle );
3267 dump_varargs_unicode_str( ", text=", cur_size );
3270 static void dump_get_windows_offset_request( const struct get_windows_offset_request *req )
3272 fprintf( stderr, " from=%08x", req->from );
3273 fprintf( stderr, ", to=%08x", req->to );
3274 fprintf( stderr, ", dpi=%d", req->dpi );
3277 static void dump_get_windows_offset_reply( const struct get_windows_offset_reply *req )
3279 fprintf( stderr, " x=%d", req->x );
3280 fprintf( stderr, ", y=%d", req->y );
3281 fprintf( stderr, ", mirror=%d", req->mirror );
3284 static void dump_get_visible_region_request( const struct get_visible_region_request *req )
3286 fprintf( stderr, " window=%08x", req->window );
3287 fprintf( stderr, ", flags=%08x", req->flags );
3290 static void dump_get_visible_region_reply( const struct get_visible_region_reply *req )
3292 fprintf( stderr, " top_win=%08x", req->top_win );
3293 dump_rectangle( ", top_rect=", &req->top_rect );
3294 dump_rectangle( ", win_rect=", &req->win_rect );
3295 fprintf( stderr, ", paint_flags=%08x", req->paint_flags );
3296 fprintf( stderr, ", total_size=%u", req->total_size );
3297 dump_varargs_rectangles( ", region=", cur_size );
3300 static void dump_get_surface_region_request( const struct get_surface_region_request *req )
3302 fprintf( stderr, " window=%08x", req->window );
3305 static void dump_get_surface_region_reply( const struct get_surface_region_reply *req )
3307 dump_rectangle( " visible_rect=", &req->visible_rect );
3308 fprintf( stderr, ", total_size=%u", req->total_size );
3309 dump_varargs_rectangles( ", region=", cur_size );
3312 static void dump_get_window_region_request( const struct get_window_region_request *req )
3314 fprintf( stderr, " window=%08x", req->window );
3317 static void dump_get_window_region_reply( const struct get_window_region_reply *req )
3319 fprintf( stderr, " total_size=%u", req->total_size );
3320 dump_varargs_rectangles( ", region=", cur_size );
3323 static void dump_set_window_region_request( const struct set_window_region_request *req )
3325 fprintf( stderr, " window=%08x", req->window );
3326 fprintf( stderr, ", redraw=%d", req->redraw );
3327 dump_varargs_rectangles( ", region=", cur_size );
3330 static void dump_get_update_region_request( const struct get_update_region_request *req )
3332 fprintf( stderr, " window=%08x", req->window );
3333 fprintf( stderr, ", from_child=%08x", req->from_child );
3334 fprintf( stderr, ", flags=%08x", req->flags );
3337 static void dump_get_update_region_reply( const struct get_update_region_reply *req )
3339 fprintf( stderr, " child=%08x", req->child );
3340 fprintf( stderr, ", flags=%08x", req->flags );
3341 fprintf( stderr, ", total_size=%u", req->total_size );
3342 dump_varargs_rectangles( ", region=", cur_size );
3345 static void dump_update_window_zorder_request( const struct update_window_zorder_request *req )
3347 fprintf( stderr, " window=%08x", req->window );
3348 dump_rectangle( ", rect=", &req->rect );
3351 static void dump_redraw_window_request( const struct redraw_window_request *req )
3353 fprintf( stderr, " window=%08x", req->window );
3354 fprintf( stderr, ", flags=%08x", req->flags );
3355 dump_varargs_rectangles( ", region=", cur_size );
3358 static void dump_set_window_property_request( const struct set_window_property_request *req )
3360 fprintf( stderr, " window=%08x", req->window );
3361 dump_uint64( ", data=", &req->data );
3362 fprintf( stderr, ", atom=%04x", req->atom );
3363 dump_varargs_unicode_str( ", name=", cur_size );
3366 static void dump_remove_window_property_request( const struct remove_window_property_request *req )
3368 fprintf( stderr, " window=%08x", req->window );
3369 fprintf( stderr, ", atom=%04x", req->atom );
3370 dump_varargs_unicode_str( ", name=", cur_size );
3373 static void dump_remove_window_property_reply( const struct remove_window_property_reply *req )
3375 dump_uint64( " data=", &req->data );
3378 static void dump_get_window_property_request( const struct get_window_property_request *req )
3380 fprintf( stderr, " window=%08x", req->window );
3381 fprintf( stderr, ", atom=%04x", req->atom );
3382 dump_varargs_unicode_str( ", name=", cur_size );
3385 static void dump_get_window_property_reply( const struct get_window_property_reply *req )
3387 dump_uint64( " data=", &req->data );
3390 static void dump_get_window_properties_request( const struct get_window_properties_request *req )
3392 fprintf( stderr, " window=%08x", req->window );
3395 static void dump_get_window_properties_reply( const struct get_window_properties_reply *req )
3397 fprintf( stderr, " total=%d", req->total );
3398 dump_varargs_properties( ", props=", cur_size );
3401 static void dump_create_winstation_request( const struct create_winstation_request *req )
3403 fprintf( stderr, " flags=%08x", req->flags );
3404 fprintf( stderr, ", access=%08x", req->access );
3405 fprintf( stderr, ", attributes=%08x", req->attributes );
3406 fprintf( stderr, ", rootdir=%04x", req->rootdir );
3407 dump_varargs_unicode_str( ", name=", cur_size );
3410 static void dump_create_winstation_reply( const struct create_winstation_reply *req )
3412 fprintf( stderr, " handle=%04x", req->handle );
3415 static void dump_open_winstation_request( const struct open_winstation_request *req )
3417 fprintf( stderr, " access=%08x", req->access );
3418 fprintf( stderr, ", attributes=%08x", req->attributes );
3419 fprintf( stderr, ", rootdir=%04x", req->rootdir );
3420 dump_varargs_unicode_str( ", name=", cur_size );
3423 static void dump_open_winstation_reply( const struct open_winstation_reply *req )
3425 fprintf( stderr, " handle=%04x", req->handle );
3428 static void dump_close_winstation_request( const struct close_winstation_request *req )
3430 fprintf( stderr, " handle=%04x", req->handle );
3433 static void dump_get_process_winstation_request( const struct get_process_winstation_request *req )
3437 static void dump_get_process_winstation_reply( const struct get_process_winstation_reply *req )
3439 fprintf( stderr, " handle=%04x", req->handle );
3442 static void dump_set_process_winstation_request( const struct set_process_winstation_request *req )
3444 fprintf( stderr, " handle=%04x", req->handle );
3447 static void dump_enum_winstation_request( const struct enum_winstation_request *req )
3449 fprintf( stderr, " index=%08x", req->index );
3452 static void dump_enum_winstation_reply( const struct enum_winstation_reply *req )
3454 fprintf( stderr, " next=%08x", req->next );
3455 dump_varargs_unicode_str( ", name=", cur_size );
3458 static void dump_create_desktop_request( const struct create_desktop_request *req )
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_create_desktop_reply( const struct create_desktop_reply *req )
3468 fprintf( stderr, " handle=%04x", req->handle );
3471 static void dump_open_desktop_request( const struct open_desktop_request *req )
3473 fprintf( stderr, " winsta=%04x", req->winsta );
3474 fprintf( stderr, ", flags=%08x", req->flags );
3475 fprintf( stderr, ", access=%08x", req->access );
3476 fprintf( stderr, ", attributes=%08x", req->attributes );
3477 dump_varargs_unicode_str( ", name=", cur_size );
3480 static void dump_open_desktop_reply( const struct open_desktop_reply *req )
3482 fprintf( stderr, " handle=%04x", req->handle );
3485 static void dump_open_input_desktop_request( const struct open_input_desktop_request *req )
3487 fprintf( stderr, " flags=%08x", req->flags );
3488 fprintf( stderr, ", access=%08x", req->access );
3489 fprintf( stderr, ", attributes=%08x", req->attributes );
3492 static void dump_open_input_desktop_reply( const struct open_input_desktop_reply *req )
3494 fprintf( stderr, " handle=%04x", req->handle );
3497 static void dump_close_desktop_request( const struct close_desktop_request *req )
3499 fprintf( stderr, " handle=%04x", req->handle );
3502 static void dump_get_thread_desktop_request( const struct get_thread_desktop_request *req )
3504 fprintf( stderr, " tid=%04x", req->tid );
3507 static void dump_get_thread_desktop_reply( const struct get_thread_desktop_reply *req )
3509 fprintf( stderr, " handle=%04x", req->handle );
3512 static void dump_set_thread_desktop_request( const struct set_thread_desktop_request *req )
3514 fprintf( stderr, " handle=%04x", req->handle );
3517 static void dump_enum_desktop_request( const struct enum_desktop_request *req )
3519 fprintf( stderr, " winstation=%04x", req->winstation );
3520 fprintf( stderr, ", index=%08x", req->index );
3523 static void dump_enum_desktop_reply( const struct enum_desktop_reply *req )
3525 fprintf( stderr, " next=%08x", req->next );
3526 dump_varargs_unicode_str( ", name=", cur_size );
3529 static void dump_set_user_object_info_request( const struct set_user_object_info_request *req )
3531 fprintf( stderr, " handle=%04x", req->handle );
3532 fprintf( stderr, ", flags=%08x", req->flags );
3533 fprintf( stderr, ", obj_flags=%08x", req->obj_flags );
3536 static void dump_set_user_object_info_reply( const struct set_user_object_info_reply *req )
3538 fprintf( stderr, " is_desktop=%d", req->is_desktop );
3539 fprintf( stderr, ", old_obj_flags=%08x", req->old_obj_flags );
3540 dump_varargs_unicode_str( ", name=", cur_size );
3543 static void dump_register_hotkey_request( const struct register_hotkey_request *req )
3545 fprintf( stderr, " window=%08x", req->window );
3546 fprintf( stderr, ", id=%d", req->id );
3547 fprintf( stderr, ", flags=%08x", req->flags );
3548 fprintf( stderr, ", vkey=%08x", req->vkey );
3551 static void dump_register_hotkey_reply( const struct register_hotkey_reply *req )
3553 fprintf( stderr, " replaced=%d", req->replaced );
3554 fprintf( stderr, ", flags=%08x", req->flags );
3555 fprintf( stderr, ", vkey=%08x", req->vkey );
3558 static void dump_unregister_hotkey_request( const struct unregister_hotkey_request *req )
3560 fprintf( stderr, " window=%08x", req->window );
3561 fprintf( stderr, ", id=%d", req->id );
3564 static void dump_unregister_hotkey_reply( const struct unregister_hotkey_reply *req )
3566 fprintf( stderr, " flags=%08x", req->flags );
3567 fprintf( stderr, ", vkey=%08x", req->vkey );
3570 static void dump_attach_thread_input_request( const struct attach_thread_input_request *req )
3572 fprintf( stderr, " tid_from=%04x", req->tid_from );
3573 fprintf( stderr, ", tid_to=%04x", req->tid_to );
3574 fprintf( stderr, ", attach=%d", req->attach );
3577 static void dump_get_thread_input_request( const struct get_thread_input_request *req )
3579 fprintf( stderr, " tid=%04x", req->tid );
3582 static void dump_get_thread_input_reply( const struct get_thread_input_reply *req )
3584 fprintf( stderr, " focus=%08x", req->focus );
3585 fprintf( stderr, ", capture=%08x", req->capture );
3586 fprintf( stderr, ", active=%08x", req->active );
3587 fprintf( stderr, ", foreground=%08x", req->foreground );
3588 fprintf( stderr, ", menu_owner=%08x", req->menu_owner );
3589 fprintf( stderr, ", move_size=%08x", req->move_size );
3590 fprintf( stderr, ", caret=%08x", req->caret );
3591 fprintf( stderr, ", cursor=%08x", req->cursor );
3592 fprintf( stderr, ", show_count=%d", req->show_count );
3593 dump_rectangle( ", rect=", &req->rect );
3596 static void dump_get_last_input_time_request( const struct get_last_input_time_request *req )
3600 static void dump_get_last_input_time_reply( const struct get_last_input_time_reply *req )
3602 fprintf( stderr, " time=%08x", req->time );
3605 static void dump_get_key_state_request( const struct get_key_state_request *req )
3607 fprintf( stderr, " tid=%04x", req->tid );
3608 fprintf( stderr, ", key=%d", req->key );
3611 static void dump_get_key_state_reply( const struct get_key_state_reply *req )
3613 fprintf( stderr, " state=%02x", req->state );
3614 dump_varargs_bytes( ", keystate=", cur_size );
3617 static void dump_set_key_state_request( const struct set_key_state_request *req )
3619 fprintf( stderr, " tid=%04x", req->tid );
3620 fprintf( stderr, ", async=%d", req->async );
3621 dump_varargs_bytes( ", keystate=", cur_size );
3624 static void dump_set_foreground_window_request( const struct set_foreground_window_request *req )
3626 fprintf( stderr, " handle=%08x", req->handle );
3629 static void dump_set_foreground_window_reply( const struct set_foreground_window_reply *req )
3631 fprintf( stderr, " previous=%08x", req->previous );
3632 fprintf( stderr, ", send_msg_old=%d", req->send_msg_old );
3633 fprintf( stderr, ", send_msg_new=%d", req->send_msg_new );
3636 static void dump_set_focus_window_request( const struct set_focus_window_request *req )
3638 fprintf( stderr, " handle=%08x", req->handle );
3641 static void dump_set_focus_window_reply( const struct set_focus_window_reply *req )
3643 fprintf( stderr, " previous=%08x", req->previous );
3646 static void dump_set_active_window_request( const struct set_active_window_request *req )
3648 fprintf( stderr, " handle=%08x", req->handle );
3651 static void dump_set_active_window_reply( const struct set_active_window_reply *req )
3653 fprintf( stderr, " previous=%08x", req->previous );
3656 static void dump_set_capture_window_request( const struct set_capture_window_request *req )
3658 fprintf( stderr, " handle=%08x", req->handle );
3659 fprintf( stderr, ", flags=%08x", req->flags );
3662 static void dump_set_capture_window_reply( const struct set_capture_window_reply *req )
3664 fprintf( stderr, " previous=%08x", req->previous );
3665 fprintf( stderr, ", full_handle=%08x", req->full_handle );
3668 static void dump_set_caret_window_request( const struct set_caret_window_request *req )
3670 fprintf( stderr, " handle=%08x", req->handle );
3671 fprintf( stderr, ", width=%d", req->width );
3672 fprintf( stderr, ", height=%d", req->height );
3675 static void dump_set_caret_window_reply( const struct set_caret_window_reply *req )
3677 fprintf( stderr, " previous=%08x", req->previous );
3678 dump_rectangle( ", old_rect=", &req->old_rect );
3679 fprintf( stderr, ", old_hide=%d", req->old_hide );
3680 fprintf( stderr, ", old_state=%d", req->old_state );
3683 static void dump_set_caret_info_request( const struct set_caret_info_request *req )
3685 fprintf( stderr, " flags=%08x", req->flags );
3686 fprintf( stderr, ", handle=%08x", req->handle );
3687 fprintf( stderr, ", x=%d", req->x );
3688 fprintf( stderr, ", y=%d", req->y );
3689 fprintf( stderr, ", hide=%d", req->hide );
3690 fprintf( stderr, ", state=%d", req->state );
3693 static void dump_set_caret_info_reply( const struct set_caret_info_reply *req )
3695 fprintf( stderr, " full_handle=%08x", req->full_handle );
3696 dump_rectangle( ", old_rect=", &req->old_rect );
3697 fprintf( stderr, ", old_hide=%d", req->old_hide );
3698 fprintf( stderr, ", old_state=%d", req->old_state );
3701 static void dump_set_hook_request( const struct set_hook_request *req )
3703 fprintf( stderr, " id=%d", req->id );
3704 fprintf( stderr, ", pid=%04x", req->pid );
3705 fprintf( stderr, ", tid=%04x", req->tid );
3706 fprintf( stderr, ", event_min=%d", req->event_min );
3707 fprintf( stderr, ", event_max=%d", req->event_max );
3708 dump_uint64( ", proc=", &req->proc );
3709 fprintf( stderr, ", flags=%d", req->flags );
3710 fprintf( stderr, ", unicode=%d", req->unicode );
3711 dump_varargs_unicode_str( ", module=", cur_size );
3714 static void dump_set_hook_reply( const struct set_hook_reply *req )
3716 fprintf( stderr, " handle=%08x", req->handle );
3717 fprintf( stderr, ", active_hooks=%08x", req->active_hooks );
3720 static void dump_remove_hook_request( const struct remove_hook_request *req )
3722 fprintf( stderr, " handle=%08x", req->handle );
3723 dump_uint64( ", proc=", &req->proc );
3724 fprintf( stderr, ", id=%d", req->id );
3727 static void dump_remove_hook_reply( const struct remove_hook_reply *req )
3729 fprintf( stderr, " active_hooks=%08x", req->active_hooks );
3732 static void dump_start_hook_chain_request( const struct start_hook_chain_request *req )
3734 fprintf( stderr, " id=%d", req->id );
3735 fprintf( stderr, ", event=%d", req->event );
3736 fprintf( stderr, ", window=%08x", req->window );
3737 fprintf( stderr, ", object_id=%d", req->object_id );
3738 fprintf( stderr, ", child_id=%d", req->child_id );
3741 static void dump_start_hook_chain_reply( const struct start_hook_chain_reply *req )
3743 fprintf( stderr, " handle=%08x", req->handle );
3744 fprintf( stderr, ", pid=%04x", req->pid );
3745 fprintf( stderr, ", tid=%04x", req->tid );
3746 fprintf( stderr, ", unicode=%d", req->unicode );
3747 dump_uint64( ", proc=", &req->proc );
3748 fprintf( stderr, ", active_hooks=%08x", req->active_hooks );
3749 dump_varargs_unicode_str( ", module=", cur_size );
3752 static void dump_finish_hook_chain_request( const struct finish_hook_chain_request *req )
3754 fprintf( stderr, " id=%d", req->id );
3757 static void dump_get_hook_info_request( const struct get_hook_info_request *req )
3759 fprintf( stderr, " handle=%08x", req->handle );
3760 fprintf( stderr, ", get_next=%d", req->get_next );
3761 fprintf( stderr, ", event=%d", req->event );
3762 fprintf( stderr, ", window=%08x", req->window );
3763 fprintf( stderr, ", object_id=%d", req->object_id );
3764 fprintf( stderr, ", child_id=%d", req->child_id );
3767 static void dump_get_hook_info_reply( const struct get_hook_info_reply *req )
3769 fprintf( stderr, " handle=%08x", req->handle );
3770 fprintf( stderr, ", id=%d", req->id );
3771 fprintf( stderr, ", pid=%04x", req->pid );
3772 fprintf( stderr, ", tid=%04x", req->tid );
3773 dump_uint64( ", proc=", &req->proc );
3774 fprintf( stderr, ", unicode=%d", req->unicode );
3775 dump_varargs_unicode_str( ", module=", cur_size );
3778 static void dump_create_class_request( const struct create_class_request *req )
3780 fprintf( stderr, " local=%d", req->local );
3781 fprintf( stderr, ", atom=%04x", req->atom );
3782 fprintf( stderr, ", style=%08x", req->style );
3783 dump_uint64( ", instance=", &req->instance );
3784 fprintf( stderr, ", extra=%d", req->extra );
3785 fprintf( stderr, ", win_extra=%d", req->win_extra );
3786 dump_uint64( ", client_ptr=", &req->client_ptr );
3787 fprintf( stderr, ", name_offset=%u", req->name_offset );
3788 dump_varargs_unicode_str( ", name=", cur_size );
3791 static void dump_create_class_reply( const struct create_class_reply *req )
3793 fprintf( stderr, " atom=%04x", req->atom );
3796 static void dump_destroy_class_request( const struct destroy_class_request *req )
3798 fprintf( stderr, " atom=%04x", req->atom );
3799 dump_uint64( ", instance=", &req->instance );
3800 dump_varargs_unicode_str( ", name=", cur_size );
3803 static void dump_destroy_class_reply( const struct destroy_class_reply *req )
3805 dump_uint64( " client_ptr=", &req->client_ptr );
3808 static void dump_set_class_info_request( const struct set_class_info_request *req )
3810 fprintf( stderr, " window=%08x", req->window );
3811 fprintf( stderr, ", flags=%08x", req->flags );
3812 fprintf( stderr, ", atom=%04x", req->atom );
3813 fprintf( stderr, ", style=%08x", req->style );
3814 fprintf( stderr, ", win_extra=%d", req->win_extra );
3815 dump_uint64( ", instance=", &req->instance );
3816 fprintf( stderr, ", extra_offset=%d", req->extra_offset );
3817 fprintf( stderr, ", extra_size=%u", req->extra_size );
3818 dump_uint64( ", extra_value=", &req->extra_value );
3821 static void dump_set_class_info_reply( const struct set_class_info_reply *req )
3823 fprintf( stderr, " old_atom=%04x", req->old_atom );
3824 fprintf( stderr, ", base_atom=%04x", req->base_atom );
3825 dump_uint64( ", old_instance=", &req->old_instance );
3826 dump_uint64( ", old_extra_value=", &req->old_extra_value );
3827 fprintf( stderr, ", old_style=%08x", req->old_style );
3828 fprintf( stderr, ", old_extra=%d", req->old_extra );
3829 fprintf( stderr, ", old_win_extra=%d", req->old_win_extra );
3832 static void dump_open_clipboard_request( const struct open_clipboard_request *req )
3834 fprintf( stderr, " window=%08x", req->window );
3837 static void dump_open_clipboard_reply( const struct open_clipboard_reply *req )
3839 fprintf( stderr, " owner=%08x", req->owner );
3842 static void dump_close_clipboard_request( const struct close_clipboard_request *req )
3846 static void dump_close_clipboard_reply( const struct close_clipboard_reply *req )
3848 fprintf( stderr, " viewer=%08x", req->viewer );
3849 fprintf( stderr, ", owner=%08x", req->owner );
3852 static void dump_empty_clipboard_request( const struct empty_clipboard_request *req )
3856 static void dump_set_clipboard_data_request( const struct set_clipboard_data_request *req )
3858 fprintf( stderr, " format=%08x", req->format );
3859 fprintf( stderr, ", lcid=%08x", req->lcid );
3860 dump_varargs_bytes( ", data=", cur_size );
3863 static void dump_set_clipboard_data_reply( const struct set_clipboard_data_reply *req )
3865 fprintf( stderr, " seqno=%08x", req->seqno );
3868 static void dump_get_clipboard_data_request( const struct get_clipboard_data_request *req )
3870 fprintf( stderr, " format=%08x", req->format );
3871 fprintf( stderr, ", render=%d", req->render );
3872 fprintf( stderr, ", cached=%d", req->cached );
3873 fprintf( stderr, ", seqno=%08x", req->seqno );
3876 static void dump_get_clipboard_data_reply( const struct get_clipboard_data_reply *req )
3878 fprintf( stderr, " from=%08x", req->from );
3879 fprintf( stderr, ", owner=%08x", req->owner );
3880 fprintf( stderr, ", seqno=%08x", req->seqno );
3881 fprintf( stderr, ", total=%u", req->total );
3882 dump_varargs_bytes( ", data=", cur_size );
3885 static void dump_get_clipboard_formats_request( const struct get_clipboard_formats_request *req )
3887 fprintf( stderr, " format=%08x", req->format );
3890 static void dump_get_clipboard_formats_reply( const struct get_clipboard_formats_reply *req )
3892 fprintf( stderr, " count=%08x", req->count );
3893 dump_varargs_uints( ", formats=", cur_size );
3896 static void dump_enum_clipboard_formats_request( const struct enum_clipboard_formats_request *req )
3898 fprintf( stderr, " previous=%08x", req->previous );
3901 static void dump_enum_clipboard_formats_reply( const struct enum_clipboard_formats_reply *req )
3903 fprintf( stderr, " format=%08x", req->format );
3906 static void dump_release_clipboard_request( const struct release_clipboard_request *req )
3908 fprintf( stderr, " owner=%08x", req->owner );
3911 static void dump_release_clipboard_reply( const struct release_clipboard_reply *req )
3913 fprintf( stderr, " viewer=%08x", req->viewer );
3914 fprintf( stderr, ", owner=%08x", req->owner );
3917 static void dump_get_clipboard_info_request( const struct get_clipboard_info_request *req )
3921 static void dump_get_clipboard_info_reply( const struct get_clipboard_info_reply *req )
3923 fprintf( stderr, " window=%08x", req->window );
3924 fprintf( stderr, ", owner=%08x", req->owner );
3925 fprintf( stderr, ", viewer=%08x", req->viewer );
3926 fprintf( stderr, ", seqno=%08x", req->seqno );
3929 static void dump_set_clipboard_viewer_request( const struct set_clipboard_viewer_request *req )
3931 fprintf( stderr, " viewer=%08x", req->viewer );
3932 fprintf( stderr, ", previous=%08x", req->previous );
3935 static void dump_set_clipboard_viewer_reply( const struct set_clipboard_viewer_reply *req )
3937 fprintf( stderr, " old_viewer=%08x", req->old_viewer );
3938 fprintf( stderr, ", owner=%08x", req->owner );
3941 static void dump_add_clipboard_listener_request( const struct add_clipboard_listener_request *req )
3943 fprintf( stderr, " window=%08x", req->window );
3946 static void dump_remove_clipboard_listener_request( const struct remove_clipboard_listener_request *req )
3948 fprintf( stderr, " window=%08x", req->window );
3951 static void dump_open_token_request( const struct open_token_request *req )
3953 fprintf( stderr, " handle=%04x", req->handle );
3954 fprintf( stderr, ", access=%08x", req->access );
3955 fprintf( stderr, ", attributes=%08x", req->attributes );
3956 fprintf( stderr, ", flags=%08x", req->flags );
3959 static void dump_open_token_reply( const struct open_token_reply *req )
3961 fprintf( stderr, " token=%04x", req->token );
3964 static void dump_set_global_windows_request( const struct set_global_windows_request *req )
3966 fprintf( stderr, " flags=%08x", req->flags );
3967 fprintf( stderr, ", shell_window=%08x", req->shell_window );
3968 fprintf( stderr, ", shell_listview=%08x", req->shell_listview );
3969 fprintf( stderr, ", progman_window=%08x", req->progman_window );
3970 fprintf( stderr, ", taskman_window=%08x", req->taskman_window );
3973 static void dump_set_global_windows_reply( const struct set_global_windows_reply *req )
3975 fprintf( stderr, " old_shell_window=%08x", req->old_shell_window );
3976 fprintf( stderr, ", old_shell_listview=%08x", req->old_shell_listview );
3977 fprintf( stderr, ", old_progman_window=%08x", req->old_progman_window );
3978 fprintf( stderr, ", old_taskman_window=%08x", req->old_taskman_window );
3981 static void dump_adjust_token_privileges_request( const struct adjust_token_privileges_request *req )
3983 fprintf( stderr, " handle=%04x", req->handle );
3984 fprintf( stderr, ", disable_all=%d", req->disable_all );
3985 fprintf( stderr, ", get_modified_state=%d", req->get_modified_state );
3986 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3989 static void dump_adjust_token_privileges_reply( const struct adjust_token_privileges_reply *req )
3991 fprintf( stderr, " len=%08x", req->len );
3992 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3995 static void dump_get_token_privileges_request( const struct get_token_privileges_request *req )
3997 fprintf( stderr, " handle=%04x", req->handle );
4000 static void dump_get_token_privileges_reply( const struct get_token_privileges_reply *req )
4002 fprintf( stderr, " len=%08x", req->len );
4003 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
4006 static void dump_check_token_privileges_request( const struct check_token_privileges_request *req )
4008 fprintf( stderr, " handle=%04x", req->handle );
4009 fprintf( stderr, ", all_required=%d", req->all_required );
4010 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
4013 static void dump_check_token_privileges_reply( const struct check_token_privileges_reply *req )
4015 fprintf( stderr, " has_privileges=%d", req->has_privileges );
4016 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
4019 static void dump_duplicate_token_request( const struct duplicate_token_request *req )
4021 fprintf( stderr, " handle=%04x", req->handle );
4022 fprintf( stderr, ", access=%08x", req->access );
4023 fprintf( stderr, ", primary=%d", req->primary );
4024 fprintf( stderr, ", impersonation_level=%d", req->impersonation_level );
4025 dump_varargs_object_attributes( ", objattr=", cur_size );
4028 static void dump_duplicate_token_reply( const struct duplicate_token_reply *req )
4030 fprintf( stderr, " new_handle=%04x", req->new_handle );
4033 static void dump_access_check_request( const struct access_check_request *req )
4035 fprintf( stderr, " handle=%04x", req->handle );
4036 fprintf( stderr, ", desired_access=%08x", req->desired_access );
4037 fprintf( stderr, ", mapping_read=%08x", req->mapping_read );
4038 fprintf( stderr, ", mapping_write=%08x", req->mapping_write );
4039 fprintf( stderr, ", mapping_execute=%08x", req->mapping_execute );
4040 fprintf( stderr, ", mapping_all=%08x", req->mapping_all );
4041 dump_varargs_security_descriptor( ", sd=", cur_size );
4044 static void dump_access_check_reply( const struct access_check_reply *req )
4046 fprintf( stderr, " access_granted=%08x", req->access_granted );
4047 fprintf( stderr, ", access_status=%08x", req->access_status );
4048 fprintf( stderr, ", privileges_len=%08x", req->privileges_len );
4049 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
4052 static void dump_get_token_sid_request( const struct get_token_sid_request *req )
4054 fprintf( stderr, " handle=%04x", req->handle );
4055 fprintf( stderr, ", which_sid=%08x", req->which_sid );
4058 static void dump_get_token_sid_reply( const struct get_token_sid_reply *req )
4060 fprintf( stderr, " sid_len=%u", req->sid_len );
4061 dump_varargs_SID( ", sid=", cur_size );
4064 static void dump_get_token_groups_request( const struct get_token_groups_request *req )
4066 fprintf( stderr, " handle=%04x", req->handle );
4069 static void dump_get_token_groups_reply( const struct get_token_groups_reply *req )
4071 fprintf( stderr, " user_len=%u", req->user_len );
4072 dump_varargs_token_groups( ", user=", cur_size );
4075 static void dump_get_token_default_dacl_request( const struct get_token_default_dacl_request *req )
4077 fprintf( stderr, " handle=%04x", req->handle );
4080 static void dump_get_token_default_dacl_reply( const struct get_token_default_dacl_reply *req )
4082 fprintf( stderr, " acl_len=%u", req->acl_len );
4083 dump_varargs_ACL( ", acl=", cur_size );
4086 static void dump_set_token_default_dacl_request( const struct set_token_default_dacl_request *req )
4088 fprintf( stderr, " handle=%04x", req->handle );
4089 dump_varargs_ACL( ", acl=", cur_size );
4092 static void dump_set_security_object_request( const struct set_security_object_request *req )
4094 fprintf( stderr, " handle=%04x", req->handle );
4095 fprintf( stderr, ", security_info=%08x", req->security_info );
4096 dump_varargs_security_descriptor( ", sd=", cur_size );
4099 static void dump_get_security_object_request( const struct get_security_object_request *req )
4101 fprintf( stderr, " handle=%04x", req->handle );
4102 fprintf( stderr, ", security_info=%08x", req->security_info );
4105 static void dump_get_security_object_reply( const struct get_security_object_reply *req )
4107 fprintf( stderr, " sd_len=%08x", req->sd_len );
4108 dump_varargs_security_descriptor( ", sd=", cur_size );
4111 static void dump_get_system_handles_request( const struct get_system_handles_request *req )
4115 static void dump_get_system_handles_reply( const struct get_system_handles_reply *req )
4117 fprintf( stderr, " count=%08x", req->count );
4118 dump_varargs_handle_infos( ", data=", cur_size );
4121 static void dump_create_mailslot_request( const struct create_mailslot_request *req )
4123 fprintf( stderr, " access=%08x", req->access );
4124 dump_timeout( ", read_timeout=", &req->read_timeout );
4125 fprintf( stderr, ", max_msgsize=%08x", req->max_msgsize );
4126 dump_varargs_object_attributes( ", objattr=", cur_size );
4129 static void dump_create_mailslot_reply( const struct create_mailslot_reply *req )
4131 fprintf( stderr, " handle=%04x", req->handle );
4134 static void dump_set_mailslot_info_request( const struct set_mailslot_info_request *req )
4136 fprintf( stderr, " handle=%04x", req->handle );
4137 dump_timeout( ", read_timeout=", &req->read_timeout );
4138 fprintf( stderr, ", flags=%08x", req->flags );
4141 static void dump_set_mailslot_info_reply( const struct set_mailslot_info_reply *req )
4143 dump_timeout( " read_timeout=", &req->read_timeout );
4144 fprintf( stderr, ", max_msgsize=%08x", req->max_msgsize );
4147 static void dump_create_directory_request( const struct create_directory_request *req )
4149 fprintf( stderr, " access=%08x", req->access );
4150 dump_varargs_object_attributes( ", objattr=", cur_size );
4153 static void dump_create_directory_reply( const struct create_directory_reply *req )
4155 fprintf( stderr, " handle=%04x", req->handle );
4158 static void dump_open_directory_request( const struct open_directory_request *req )
4160 fprintf( stderr, " access=%08x", req->access );
4161 fprintf( stderr, ", attributes=%08x", req->attributes );
4162 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4163 dump_varargs_unicode_str( ", directory_name=", cur_size );
4166 static void dump_open_directory_reply( const struct open_directory_reply *req )
4168 fprintf( stderr, " handle=%04x", req->handle );
4171 static void dump_get_directory_entry_request( const struct get_directory_entry_request *req )
4173 fprintf( stderr, " handle=%04x", req->handle );
4174 fprintf( stderr, ", index=%08x", req->index );
4177 static void dump_get_directory_entry_reply( const struct get_directory_entry_reply *req )
4179 fprintf( stderr, " name_len=%u", req->name_len );
4180 dump_varargs_unicode_str( ", name=", min(cur_size,req->name_len) );
4181 dump_varargs_unicode_str( ", type=", cur_size );
4184 static void dump_create_symlink_request( const struct create_symlink_request *req )
4186 fprintf( stderr, " access=%08x", req->access );
4187 dump_varargs_object_attributes( ", objattr=", cur_size );
4188 dump_varargs_unicode_str( ", target_name=", cur_size );
4191 static void dump_create_symlink_reply( const struct create_symlink_reply *req )
4193 fprintf( stderr, " handle=%04x", req->handle );
4196 static void dump_open_symlink_request( const struct open_symlink_request *req )
4198 fprintf( stderr, " access=%08x", req->access );
4199 fprintf( stderr, ", attributes=%08x", req->attributes );
4200 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4201 dump_varargs_unicode_str( ", name=", cur_size );
4204 static void dump_open_symlink_reply( const struct open_symlink_reply *req )
4206 fprintf( stderr, " handle=%04x", req->handle );
4209 static void dump_query_symlink_request( const struct query_symlink_request *req )
4211 fprintf( stderr, " handle=%04x", req->handle );
4214 static void dump_query_symlink_reply( const struct query_symlink_reply *req )
4216 fprintf( stderr, " total=%u", req->total );
4217 dump_varargs_unicode_str( ", target_name=", cur_size );
4220 static void dump_get_object_info_request( const struct get_object_info_request *req )
4222 fprintf( stderr, " handle=%04x", req->handle );
4225 static void dump_get_object_info_reply( const struct get_object_info_reply *req )
4227 fprintf( stderr, " access=%08x", req->access );
4228 fprintf( stderr, ", ref_count=%08x", req->ref_count );
4229 fprintf( stderr, ", handle_count=%08x", req->handle_count );
4230 fprintf( stderr, ", total=%u", req->total );
4231 dump_varargs_unicode_str( ", name=", cur_size );
4234 static void dump_get_object_type_request( const struct get_object_type_request *req )
4236 fprintf( stderr, " handle=%04x", req->handle );
4239 static void dump_get_object_type_reply( const struct get_object_type_reply *req )
4241 fprintf( stderr, " total=%u", req->total );
4242 dump_varargs_unicode_str( ", type=", cur_size );
4245 static void dump_unlink_object_request( const struct unlink_object_request *req )
4247 fprintf( stderr, " handle=%04x", req->handle );
4250 static void dump_get_token_impersonation_level_request( const struct get_token_impersonation_level_request *req )
4252 fprintf( stderr, " handle=%04x", req->handle );
4255 static void dump_get_token_impersonation_level_reply( const struct get_token_impersonation_level_reply *req )
4257 fprintf( stderr, " impersonation_level=%d", req->impersonation_level );
4260 static void dump_allocate_locally_unique_id_request( const struct allocate_locally_unique_id_request *req )
4264 static void dump_allocate_locally_unique_id_reply( const struct allocate_locally_unique_id_reply *req )
4266 dump_luid( " luid=", &req->luid );
4269 static void dump_create_device_manager_request( const struct create_device_manager_request *req )
4271 fprintf( stderr, " access=%08x", req->access );
4272 fprintf( stderr, ", attributes=%08x", req->attributes );
4275 static void dump_create_device_manager_reply( const struct create_device_manager_reply *req )
4277 fprintf( stderr, " handle=%04x", req->handle );
4280 static void dump_create_device_request( const struct create_device_request *req )
4282 fprintf( stderr, " rootdir=%04x", req->rootdir );
4283 dump_uint64( ", user_ptr=", &req->user_ptr );
4284 fprintf( stderr, ", manager=%04x", req->manager );
4285 dump_varargs_unicode_str( ", name=", cur_size );
4288 static void dump_delete_device_request( const struct delete_device_request *req )
4290 fprintf( stderr, " manager=%04x", req->manager );
4291 dump_uint64( ", device=", &req->device );
4294 static void dump_get_next_device_request_request( const struct get_next_device_request_request *req )
4296 fprintf( stderr, " manager=%04x", req->manager );
4297 fprintf( stderr, ", prev=%04x", req->prev );
4298 fprintf( stderr, ", status=%08x", req->status );
4299 dump_uint64( ", user_ptr=", &req->user_ptr );
4302 static void dump_get_next_device_request_reply( const struct get_next_device_request_reply *req )
4304 dump_irp_params( " params=", &req->params );
4305 fprintf( stderr, ", next=%04x", req->next );
4306 fprintf( stderr, ", client_tid=%04x", req->client_tid );
4307 dump_uint64( ", client_thread=", &req->client_thread );
4308 fprintf( stderr, ", in_size=%u", req->in_size );
4309 dump_varargs_bytes( ", next_data=", cur_size );
4312 static void dump_get_kernel_object_ptr_request( const struct get_kernel_object_ptr_request *req )
4314 fprintf( stderr, " manager=%04x", req->manager );
4315 fprintf( stderr, ", handle=%04x", req->handle );
4318 static void dump_get_kernel_object_ptr_reply( const struct get_kernel_object_ptr_reply *req )
4320 dump_uint64( " user_ptr=", &req->user_ptr );
4323 static void dump_set_kernel_object_ptr_request( const struct set_kernel_object_ptr_request *req )
4325 fprintf( stderr, " manager=%04x", req->manager );
4326 fprintf( stderr, ", handle=%04x", req->handle );
4327 dump_uint64( ", user_ptr=", &req->user_ptr );
4330 static void dump_grab_kernel_object_request( const struct grab_kernel_object_request *req )
4332 fprintf( stderr, " manager=%04x", req->manager );
4333 dump_uint64( ", user_ptr=", &req->user_ptr );
4336 static void dump_release_kernel_object_request( const struct release_kernel_object_request *req )
4338 fprintf( stderr, " manager=%04x", req->manager );
4339 dump_uint64( ", user_ptr=", &req->user_ptr );
4342 static void dump_get_kernel_object_handle_request( const struct get_kernel_object_handle_request *req )
4344 fprintf( stderr, " manager=%04x", req->manager );
4345 dump_uint64( ", user_ptr=", &req->user_ptr );
4346 fprintf( stderr, ", access=%08x", req->access );
4349 static void dump_get_kernel_object_handle_reply( const struct get_kernel_object_handle_reply *req )
4351 fprintf( stderr, " handle=%04x", req->handle );
4354 static void dump_make_process_system_request( const struct make_process_system_request *req )
4358 static void dump_make_process_system_reply( const struct make_process_system_reply *req )
4360 fprintf( stderr, " event=%04x", req->event );
4363 static void dump_get_token_statistics_request( const struct get_token_statistics_request *req )
4365 fprintf( stderr, " handle=%04x", req->handle );
4368 static void dump_get_token_statistics_reply( const struct get_token_statistics_reply *req )
4370 dump_luid( " token_id=", &req->token_id );
4371 dump_luid( ", modified_id=", &req->modified_id );
4372 fprintf( stderr, ", primary=%d", req->primary );
4373 fprintf( stderr, ", impersonation_level=%d", req->impersonation_level );
4374 fprintf( stderr, ", group_count=%d", req->group_count );
4375 fprintf( stderr, ", privilege_count=%d", req->privilege_count );
4378 static void dump_create_completion_request( const struct create_completion_request *req )
4380 fprintf( stderr, " access=%08x", req->access );
4381 fprintf( stderr, ", concurrent=%08x", req->concurrent );
4382 dump_varargs_object_attributes( ", objattr=", cur_size );
4385 static void dump_create_completion_reply( const struct create_completion_reply *req )
4387 fprintf( stderr, " handle=%04x", req->handle );
4390 static void dump_open_completion_request( const struct open_completion_request *req )
4392 fprintf( stderr, " access=%08x", req->access );
4393 fprintf( stderr, ", attributes=%08x", req->attributes );
4394 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4395 dump_varargs_unicode_str( ", filename=", cur_size );
4398 static void dump_open_completion_reply( const struct open_completion_reply *req )
4400 fprintf( stderr, " handle=%04x", req->handle );
4403 static void dump_add_completion_request( const struct add_completion_request *req )
4405 fprintf( stderr, " handle=%04x", req->handle );
4406 dump_uint64( ", ckey=", &req->ckey );
4407 dump_uint64( ", cvalue=", &req->cvalue );
4408 dump_uint64( ", information=", &req->information );
4409 fprintf( stderr, ", status=%08x", req->status );
4412 static void dump_remove_completion_request( const struct remove_completion_request *req )
4414 fprintf( stderr, " handle=%04x", req->handle );
4417 static void dump_remove_completion_reply( const struct remove_completion_reply *req )
4419 dump_uint64( " ckey=", &req->ckey );
4420 dump_uint64( ", cvalue=", &req->cvalue );
4421 dump_uint64( ", information=", &req->information );
4422 fprintf( stderr, ", status=%08x", req->status );
4425 static void dump_query_completion_request( const struct query_completion_request *req )
4427 fprintf( stderr, " handle=%04x", req->handle );
4430 static void dump_query_completion_reply( const struct query_completion_reply *req )
4432 fprintf( stderr, " depth=%08x", req->depth );
4435 static void dump_set_completion_info_request( const struct set_completion_info_request *req )
4437 fprintf( stderr, " handle=%04x", req->handle );
4438 dump_uint64( ", ckey=", &req->ckey );
4439 fprintf( stderr, ", chandle=%04x", req->chandle );
4442 static void dump_add_fd_completion_request( const struct add_fd_completion_request *req )
4444 fprintf( stderr, " handle=%04x", req->handle );
4445 dump_uint64( ", cvalue=", &req->cvalue );
4446 dump_uint64( ", information=", &req->information );
4447 fprintf( stderr, ", status=%08x", req->status );
4448 fprintf( stderr, ", async=%d", req->async );
4451 static void dump_set_fd_completion_mode_request( const struct set_fd_completion_mode_request *req )
4453 fprintf( stderr, " handle=%04x", req->handle );
4454 fprintf( stderr, ", flags=%08x", req->flags );
4457 static void dump_set_fd_disp_info_request( const struct set_fd_disp_info_request *req )
4459 fprintf( stderr, " handle=%04x", req->handle );
4460 fprintf( stderr, ", unlink=%d", req->unlink );
4463 static void dump_set_fd_name_info_request( const struct set_fd_name_info_request *req )
4465 fprintf( stderr, " handle=%04x", req->handle );
4466 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4467 fprintf( stderr, ", link=%d", req->link );
4468 fprintf( stderr, ", replace=%d", req->replace );
4469 dump_varargs_string( ", filename=", cur_size );
4472 static void dump_get_window_layered_info_request( const struct get_window_layered_info_request *req )
4474 fprintf( stderr, " handle=%08x", req->handle );
4477 static void dump_get_window_layered_info_reply( const struct get_window_layered_info_reply *req )
4479 fprintf( stderr, " color_key=%08x", req->color_key );
4480 fprintf( stderr, ", alpha=%08x", req->alpha );
4481 fprintf( stderr, ", flags=%08x", req->flags );
4484 static void dump_set_window_layered_info_request( const struct set_window_layered_info_request *req )
4486 fprintf( stderr, " handle=%08x", req->handle );
4487 fprintf( stderr, ", color_key=%08x", req->color_key );
4488 fprintf( stderr, ", alpha=%08x", req->alpha );
4489 fprintf( stderr, ", flags=%08x", req->flags );
4492 static void dump_alloc_user_handle_request( const struct alloc_user_handle_request *req )
4496 static void dump_alloc_user_handle_reply( const struct alloc_user_handle_reply *req )
4498 fprintf( stderr, " handle=%08x", req->handle );
4501 static void dump_free_user_handle_request( const struct free_user_handle_request *req )
4503 fprintf( stderr, " handle=%08x", req->handle );
4506 static void dump_set_cursor_request( const struct set_cursor_request *req )
4508 fprintf( stderr, " flags=%08x", req->flags );
4509 fprintf( stderr, ", handle=%08x", req->handle );
4510 fprintf( stderr, ", show_count=%d", req->show_count );
4511 fprintf( stderr, ", x=%d", req->x );
4512 fprintf( stderr, ", y=%d", req->y );
4513 dump_rectangle( ", clip=", &req->clip );
4514 fprintf( stderr, ", clip_msg=%08x", req->clip_msg );
4517 static void dump_set_cursor_reply( const struct set_cursor_reply *req )
4519 fprintf( stderr, " prev_handle=%08x", req->prev_handle );
4520 fprintf( stderr, ", prev_count=%d", req->prev_count );
4521 fprintf( stderr, ", prev_x=%d", req->prev_x );
4522 fprintf( stderr, ", prev_y=%d", req->prev_y );
4523 fprintf( stderr, ", new_x=%d", req->new_x );
4524 fprintf( stderr, ", new_y=%d", req->new_y );
4525 dump_rectangle( ", new_clip=", &req->new_clip );
4526 fprintf( stderr, ", last_change=%08x", req->last_change );
4529 static void dump_update_rawinput_devices_request( const struct update_rawinput_devices_request *req )
4531 dump_varargs_rawinput_devices( " devices=", cur_size );
4534 static void dump_create_job_request( const struct create_job_request *req )
4536 fprintf( stderr, " access=%08x", req->access );
4537 dump_varargs_object_attributes( ", objattr=", cur_size );
4540 static void dump_create_job_reply( const struct create_job_reply *req )
4542 fprintf( stderr, " handle=%04x", req->handle );
4545 static void dump_open_job_request( const struct open_job_request *req )
4547 fprintf( stderr, " access=%08x", req->access );
4548 fprintf( stderr, ", attributes=%08x", req->attributes );
4549 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4550 dump_varargs_unicode_str( ", name=", cur_size );
4553 static void dump_open_job_reply( const struct open_job_reply *req )
4555 fprintf( stderr, " handle=%04x", req->handle );
4558 static void dump_assign_job_request( const struct assign_job_request *req )
4560 fprintf( stderr, " job=%04x", req->job );
4561 fprintf( stderr, ", process=%04x", req->process );
4564 static void dump_process_in_job_request( const struct process_in_job_request *req )
4566 fprintf( stderr, " job=%04x", req->job );
4567 fprintf( stderr, ", process=%04x", req->process );
4570 static void dump_set_job_limits_request( const struct set_job_limits_request *req )
4572 fprintf( stderr, " handle=%04x", req->handle );
4573 fprintf( stderr, ", limit_flags=%08x", req->limit_flags );
4576 static void dump_set_job_completion_port_request( const struct set_job_completion_port_request *req )
4578 fprintf( stderr, " job=%04x", req->job );
4579 fprintf( stderr, ", port=%04x", req->port );
4580 dump_uint64( ", key=", &req->key );
4583 static void dump_terminate_job_request( const struct terminate_job_request *req )
4585 fprintf( stderr, " handle=%04x", req->handle );
4586 fprintf( stderr, ", status=%d", req->status );
4589 static void dump_suspend_process_request( const struct suspend_process_request *req )
4591 fprintf( stderr, " handle=%04x", req->handle );
4594 static void dump_resume_process_request( const struct resume_process_request *req )
4596 fprintf( stderr, " handle=%04x", req->handle );
4599 static const dump_func req_dumpers[REQ_NB_REQUESTS] = {
4600 (dump_func)dump_new_process_request,
4601 (dump_func)dump_exec_process_request,
4602 (dump_func)dump_get_new_process_info_request,
4603 (dump_func)dump_new_thread_request,
4604 (dump_func)dump_get_startup_info_request,
4605 (dump_func)dump_init_process_done_request,
4606 (dump_func)dump_init_thread_request,
4607 (dump_func)dump_terminate_process_request,
4608 (dump_func)dump_terminate_thread_request,
4609 (dump_func)dump_get_process_info_request,
4610 (dump_func)dump_get_process_vm_counters_request,
4611 (dump_func)dump_set_process_info_request,
4612 (dump_func)dump_get_thread_info_request,
4613 (dump_func)dump_get_thread_times_request,
4614 (dump_func)dump_set_thread_info_request,
4615 (dump_func)dump_get_dll_info_request,
4616 (dump_func)dump_suspend_thread_request,
4617 (dump_func)dump_resume_thread_request,
4618 (dump_func)dump_load_dll_request,
4619 (dump_func)dump_unload_dll_request,
4620 (dump_func)dump_queue_apc_request,
4621 (dump_func)dump_get_apc_result_request,
4622 (dump_func)dump_close_handle_request,
4623 (dump_func)dump_set_handle_info_request,
4624 (dump_func)dump_dup_handle_request,
4625 (dump_func)dump_open_process_request,
4626 (dump_func)dump_open_thread_request,
4627 (dump_func)dump_select_request,
4628 (dump_func)dump_create_event_request,
4629 (dump_func)dump_event_op_request,
4630 (dump_func)dump_query_event_request,
4631 (dump_func)dump_open_event_request,
4632 (dump_func)dump_create_keyed_event_request,
4633 (dump_func)dump_open_keyed_event_request,
4634 (dump_func)dump_create_mutex_request,
4635 (dump_func)dump_release_mutex_request,
4636 (dump_func)dump_open_mutex_request,
4637 (dump_func)dump_query_mutex_request,
4638 (dump_func)dump_create_semaphore_request,
4639 (dump_func)dump_release_semaphore_request,
4640 (dump_func)dump_query_semaphore_request,
4641 (dump_func)dump_open_semaphore_request,
4642 (dump_func)dump_create_file_request,
4643 (dump_func)dump_open_file_object_request,
4644 (dump_func)dump_alloc_file_handle_request,
4645 (dump_func)dump_get_handle_unix_name_request,
4646 (dump_func)dump_get_handle_fd_request,
4647 (dump_func)dump_get_directory_cache_entry_request,
4648 (dump_func)dump_flush_request,
4649 (dump_func)dump_get_file_info_request,
4650 (dump_func)dump_get_volume_info_request,
4651 (dump_func)dump_lock_file_request,
4652 (dump_func)dump_unlock_file_request,
4653 (dump_func)dump_create_socket_request,
4654 (dump_func)dump_accept_socket_request,
4655 (dump_func)dump_accept_into_socket_request,
4656 (dump_func)dump_set_socket_event_request,
4657 (dump_func)dump_get_socket_event_request,
4658 (dump_func)dump_get_socket_info_request,
4659 (dump_func)dump_enable_socket_event_request,
4660 (dump_func)dump_set_socket_deferred_request,
4661 (dump_func)dump_alloc_console_request,
4662 (dump_func)dump_free_console_request,
4663 (dump_func)dump_get_console_renderer_events_request,
4664 (dump_func)dump_open_console_request,
4665 (dump_func)dump_attach_console_request,
4666 (dump_func)dump_get_console_wait_event_request,
4667 (dump_func)dump_get_console_mode_request,
4668 (dump_func)dump_set_console_mode_request,
4669 (dump_func)dump_set_console_input_info_request,
4670 (dump_func)dump_get_console_input_info_request,
4671 (dump_func)dump_append_console_input_history_request,
4672 (dump_func)dump_get_console_input_history_request,
4673 (dump_func)dump_create_console_output_request,
4674 (dump_func)dump_set_console_output_info_request,
4675 (dump_func)dump_get_console_output_info_request,
4676 (dump_func)dump_write_console_input_request,
4677 (dump_func)dump_read_console_input_request,
4678 (dump_func)dump_write_console_output_request,
4679 (dump_func)dump_fill_console_output_request,
4680 (dump_func)dump_read_console_output_request,
4681 (dump_func)dump_move_console_output_request,
4682 (dump_func)dump_send_console_signal_request,
4683 (dump_func)dump_read_directory_changes_request,
4684 (dump_func)dump_read_change_request,
4685 (dump_func)dump_create_mapping_request,
4686 (dump_func)dump_open_mapping_request,
4687 (dump_func)dump_get_mapping_info_request,
4688 (dump_func)dump_map_view_request,
4689 (dump_func)dump_unmap_view_request,
4690 (dump_func)dump_get_mapping_committed_range_request,
4691 (dump_func)dump_add_mapping_committed_range_request,
4692 (dump_func)dump_is_same_mapping_request,
4693 (dump_func)dump_create_snapshot_request,
4694 (dump_func)dump_next_process_request,
4695 (dump_func)dump_next_thread_request,
4696 (dump_func)dump_wait_debug_event_request,
4697 (dump_func)dump_queue_exception_event_request,
4698 (dump_func)dump_get_exception_status_request,
4699 (dump_func)dump_continue_debug_event_request,
4700 (dump_func)dump_debug_process_request,
4701 (dump_func)dump_set_debugger_kill_on_exit_request,
4702 (dump_func)dump_read_process_memory_request,
4703 (dump_func)dump_write_process_memory_request,
4704 (dump_func)dump_create_key_request,
4705 (dump_func)dump_open_key_request,
4706 (dump_func)dump_delete_key_request,
4707 (dump_func)dump_flush_key_request,
4708 (dump_func)dump_enum_key_request,
4709 (dump_func)dump_set_key_value_request,
4710 (dump_func)dump_get_key_value_request,
4711 (dump_func)dump_enum_key_value_request,
4712 (dump_func)dump_delete_key_value_request,
4713 (dump_func)dump_load_registry_request,
4714 (dump_func)dump_unload_registry_request,
4715 (dump_func)dump_save_registry_request,
4716 (dump_func)dump_set_registry_notification_request,
4717 (dump_func)dump_create_timer_request,
4718 (dump_func)dump_open_timer_request,
4719 (dump_func)dump_set_timer_request,
4720 (dump_func)dump_cancel_timer_request,
4721 (dump_func)dump_get_timer_info_request,
4722 (dump_func)dump_get_thread_context_request,
4723 (dump_func)dump_set_thread_context_request,
4724 (dump_func)dump_get_selector_entry_request,
4725 (dump_func)dump_add_atom_request,
4726 (dump_func)dump_delete_atom_request,
4727 (dump_func)dump_find_atom_request,
4728 (dump_func)dump_get_atom_information_request,
4729 (dump_func)dump_set_atom_information_request,
4730 (dump_func)dump_empty_atom_table_request,
4731 (dump_func)dump_init_atom_table_request,
4732 (dump_func)dump_get_msg_queue_request,
4733 (dump_func)dump_set_queue_fd_request,
4734 (dump_func)dump_set_queue_mask_request,
4735 (dump_func)dump_get_queue_status_request,
4736 (dump_func)dump_get_process_idle_event_request,
4737 (dump_func)dump_send_message_request,
4738 (dump_func)dump_post_quit_message_request,
4739 (dump_func)dump_send_hardware_message_request,
4740 (dump_func)dump_get_message_request,
4741 (dump_func)dump_reply_message_request,
4742 (dump_func)dump_accept_hardware_message_request,
4743 (dump_func)dump_get_message_reply_request,
4744 (dump_func)dump_set_win_timer_request,
4745 (dump_func)dump_kill_win_timer_request,
4746 (dump_func)dump_is_window_hung_request,
4747 (dump_func)dump_get_serial_info_request,
4748 (dump_func)dump_set_serial_info_request,
4749 (dump_func)dump_register_async_request,
4750 (dump_func)dump_cancel_async_request,
4751 (dump_func)dump_get_async_result_request,
4752 (dump_func)dump_read_request,
4753 (dump_func)dump_write_request,
4754 (dump_func)dump_ioctl_request,
4755 (dump_func)dump_set_irp_result_request,
4756 (dump_func)dump_create_named_pipe_request,
4757 (dump_func)dump_set_named_pipe_info_request,
4758 (dump_func)dump_create_window_request,
4759 (dump_func)dump_destroy_window_request,
4760 (dump_func)dump_get_desktop_window_request,
4761 (dump_func)dump_set_window_owner_request,
4762 (dump_func)dump_get_window_info_request,
4763 (dump_func)dump_set_window_info_request,
4764 (dump_func)dump_set_parent_request,
4765 (dump_func)dump_get_window_parents_request,
4766 (dump_func)dump_get_window_children_request,
4767 (dump_func)dump_get_window_children_from_point_request,
4768 (dump_func)dump_get_window_tree_request,
4769 (dump_func)dump_set_window_pos_request,
4770 (dump_func)dump_get_window_rectangles_request,
4771 (dump_func)dump_get_window_text_request,
4772 (dump_func)dump_set_window_text_request,
4773 (dump_func)dump_get_windows_offset_request,
4774 (dump_func)dump_get_visible_region_request,
4775 (dump_func)dump_get_surface_region_request,
4776 (dump_func)dump_get_window_region_request,
4777 (dump_func)dump_set_window_region_request,
4778 (dump_func)dump_get_update_region_request,
4779 (dump_func)dump_update_window_zorder_request,
4780 (dump_func)dump_redraw_window_request,
4781 (dump_func)dump_set_window_property_request,
4782 (dump_func)dump_remove_window_property_request,
4783 (dump_func)dump_get_window_property_request,
4784 (dump_func)dump_get_window_properties_request,
4785 (dump_func)dump_create_winstation_request,
4786 (dump_func)dump_open_winstation_request,
4787 (dump_func)dump_close_winstation_request,
4788 (dump_func)dump_get_process_winstation_request,
4789 (dump_func)dump_set_process_winstation_request,
4790 (dump_func)dump_enum_winstation_request,
4791 (dump_func)dump_create_desktop_request,
4792 (dump_func)dump_open_desktop_request,
4793 (dump_func)dump_open_input_desktop_request,
4794 (dump_func)dump_close_desktop_request,
4795 (dump_func)dump_get_thread_desktop_request,
4796 (dump_func)dump_set_thread_desktop_request,
4797 (dump_func)dump_enum_desktop_request,
4798 (dump_func)dump_set_user_object_info_request,
4799 (dump_func)dump_register_hotkey_request,
4800 (dump_func)dump_unregister_hotkey_request,
4801 (dump_func)dump_attach_thread_input_request,
4802 (dump_func)dump_get_thread_input_request,
4803 (dump_func)dump_get_last_input_time_request,
4804 (dump_func)dump_get_key_state_request,
4805 (dump_func)dump_set_key_state_request,
4806 (dump_func)dump_set_foreground_window_request,
4807 (dump_func)dump_set_focus_window_request,
4808 (dump_func)dump_set_active_window_request,
4809 (dump_func)dump_set_capture_window_request,
4810 (dump_func)dump_set_caret_window_request,
4811 (dump_func)dump_set_caret_info_request,
4812 (dump_func)dump_set_hook_request,
4813 (dump_func)dump_remove_hook_request,
4814 (dump_func)dump_start_hook_chain_request,
4815 (dump_func)dump_finish_hook_chain_request,
4816 (dump_func)dump_get_hook_info_request,
4817 (dump_func)dump_create_class_request,
4818 (dump_func)dump_destroy_class_request,
4819 (dump_func)dump_set_class_info_request,
4820 (dump_func)dump_open_clipboard_request,
4821 (dump_func)dump_close_clipboard_request,
4822 (dump_func)dump_empty_clipboard_request,
4823 (dump_func)dump_set_clipboard_data_request,
4824 (dump_func)dump_get_clipboard_data_request,
4825 (dump_func)dump_get_clipboard_formats_request,
4826 (dump_func)dump_enum_clipboard_formats_request,
4827 (dump_func)dump_release_clipboard_request,
4828 (dump_func)dump_get_clipboard_info_request,
4829 (dump_func)dump_set_clipboard_viewer_request,
4830 (dump_func)dump_add_clipboard_listener_request,
4831 (dump_func)dump_remove_clipboard_listener_request,
4832 (dump_func)dump_open_token_request,
4833 (dump_func)dump_set_global_windows_request,
4834 (dump_func)dump_adjust_token_privileges_request,
4835 (dump_func)dump_get_token_privileges_request,
4836 (dump_func)dump_check_token_privileges_request,
4837 (dump_func)dump_duplicate_token_request,
4838 (dump_func)dump_access_check_request,
4839 (dump_func)dump_get_token_sid_request,
4840 (dump_func)dump_get_token_groups_request,
4841 (dump_func)dump_get_token_default_dacl_request,
4842 (dump_func)dump_set_token_default_dacl_request,
4843 (dump_func)dump_set_security_object_request,
4844 (dump_func)dump_get_security_object_request,
4845 (dump_func)dump_get_system_handles_request,
4846 (dump_func)dump_create_mailslot_request,
4847 (dump_func)dump_set_mailslot_info_request,
4848 (dump_func)dump_create_directory_request,
4849 (dump_func)dump_open_directory_request,
4850 (dump_func)dump_get_directory_entry_request,
4851 (dump_func)dump_create_symlink_request,
4852 (dump_func)dump_open_symlink_request,
4853 (dump_func)dump_query_symlink_request,
4854 (dump_func)dump_get_object_info_request,
4855 (dump_func)dump_get_object_type_request,
4856 (dump_func)dump_unlink_object_request,
4857 (dump_func)dump_get_token_impersonation_level_request,
4858 (dump_func)dump_allocate_locally_unique_id_request,
4859 (dump_func)dump_create_device_manager_request,
4860 (dump_func)dump_create_device_request,
4861 (dump_func)dump_delete_device_request,
4862 (dump_func)dump_get_next_device_request_request,
4863 (dump_func)dump_get_kernel_object_ptr_request,
4864 (dump_func)dump_set_kernel_object_ptr_request,
4865 (dump_func)dump_grab_kernel_object_request,
4866 (dump_func)dump_release_kernel_object_request,
4867 (dump_func)dump_get_kernel_object_handle_request,
4868 (dump_func)dump_make_process_system_request,
4869 (dump_func)dump_get_token_statistics_request,
4870 (dump_func)dump_create_completion_request,
4871 (dump_func)dump_open_completion_request,
4872 (dump_func)dump_add_completion_request,
4873 (dump_func)dump_remove_completion_request,
4874 (dump_func)dump_query_completion_request,
4875 (dump_func)dump_set_completion_info_request,
4876 (dump_func)dump_add_fd_completion_request,
4877 (dump_func)dump_set_fd_completion_mode_request,
4878 (dump_func)dump_set_fd_disp_info_request,
4879 (dump_func)dump_set_fd_name_info_request,
4880 (dump_func)dump_get_window_layered_info_request,
4881 (dump_func)dump_set_window_layered_info_request,
4882 (dump_func)dump_alloc_user_handle_request,
4883 (dump_func)dump_free_user_handle_request,
4884 (dump_func)dump_set_cursor_request,
4885 (dump_func)dump_update_rawinput_devices_request,
4886 (dump_func)dump_create_job_request,
4887 (dump_func)dump_open_job_request,
4888 (dump_func)dump_assign_job_request,
4889 (dump_func)dump_process_in_job_request,
4890 (dump_func)dump_set_job_limits_request,
4891 (dump_func)dump_set_job_completion_port_request,
4892 (dump_func)dump_terminate_job_request,
4893 (dump_func)dump_suspend_process_request,
4894 (dump_func)dump_resume_process_request,
4897 static const dump_func reply_dumpers[REQ_NB_REQUESTS] = {
4898 (dump_func)dump_new_process_reply,
4899 NULL,
4900 (dump_func)dump_get_new_process_info_reply,
4901 (dump_func)dump_new_thread_reply,
4902 (dump_func)dump_get_startup_info_reply,
4903 (dump_func)dump_init_process_done_reply,
4904 (dump_func)dump_init_thread_reply,
4905 (dump_func)dump_terminate_process_reply,
4906 (dump_func)dump_terminate_thread_reply,
4907 (dump_func)dump_get_process_info_reply,
4908 (dump_func)dump_get_process_vm_counters_reply,
4909 NULL,
4910 (dump_func)dump_get_thread_info_reply,
4911 (dump_func)dump_get_thread_times_reply,
4912 NULL,
4913 (dump_func)dump_get_dll_info_reply,
4914 (dump_func)dump_suspend_thread_reply,
4915 (dump_func)dump_resume_thread_reply,
4916 NULL,
4917 NULL,
4918 (dump_func)dump_queue_apc_reply,
4919 (dump_func)dump_get_apc_result_reply,
4920 NULL,
4921 (dump_func)dump_set_handle_info_reply,
4922 (dump_func)dump_dup_handle_reply,
4923 (dump_func)dump_open_process_reply,
4924 (dump_func)dump_open_thread_reply,
4925 (dump_func)dump_select_reply,
4926 (dump_func)dump_create_event_reply,
4927 (dump_func)dump_event_op_reply,
4928 (dump_func)dump_query_event_reply,
4929 (dump_func)dump_open_event_reply,
4930 (dump_func)dump_create_keyed_event_reply,
4931 (dump_func)dump_open_keyed_event_reply,
4932 (dump_func)dump_create_mutex_reply,
4933 (dump_func)dump_release_mutex_reply,
4934 (dump_func)dump_open_mutex_reply,
4935 (dump_func)dump_query_mutex_reply,
4936 (dump_func)dump_create_semaphore_reply,
4937 (dump_func)dump_release_semaphore_reply,
4938 (dump_func)dump_query_semaphore_reply,
4939 (dump_func)dump_open_semaphore_reply,
4940 (dump_func)dump_create_file_reply,
4941 (dump_func)dump_open_file_object_reply,
4942 (dump_func)dump_alloc_file_handle_reply,
4943 (dump_func)dump_get_handle_unix_name_reply,
4944 (dump_func)dump_get_handle_fd_reply,
4945 (dump_func)dump_get_directory_cache_entry_reply,
4946 (dump_func)dump_flush_reply,
4947 (dump_func)dump_get_file_info_reply,
4948 (dump_func)dump_get_volume_info_reply,
4949 (dump_func)dump_lock_file_reply,
4950 NULL,
4951 (dump_func)dump_create_socket_reply,
4952 (dump_func)dump_accept_socket_reply,
4953 NULL,
4954 NULL,
4955 (dump_func)dump_get_socket_event_reply,
4956 (dump_func)dump_get_socket_info_reply,
4957 NULL,
4958 NULL,
4959 (dump_func)dump_alloc_console_reply,
4960 NULL,
4961 (dump_func)dump_get_console_renderer_events_reply,
4962 (dump_func)dump_open_console_reply,
4963 (dump_func)dump_attach_console_reply,
4964 (dump_func)dump_get_console_wait_event_reply,
4965 (dump_func)dump_get_console_mode_reply,
4966 NULL,
4967 NULL,
4968 (dump_func)dump_get_console_input_info_reply,
4969 NULL,
4970 (dump_func)dump_get_console_input_history_reply,
4971 (dump_func)dump_create_console_output_reply,
4972 NULL,
4973 (dump_func)dump_get_console_output_info_reply,
4974 (dump_func)dump_write_console_input_reply,
4975 (dump_func)dump_read_console_input_reply,
4976 (dump_func)dump_write_console_output_reply,
4977 (dump_func)dump_fill_console_output_reply,
4978 (dump_func)dump_read_console_output_reply,
4979 NULL,
4980 NULL,
4981 NULL,
4982 (dump_func)dump_read_change_reply,
4983 (dump_func)dump_create_mapping_reply,
4984 (dump_func)dump_open_mapping_reply,
4985 (dump_func)dump_get_mapping_info_reply,
4986 NULL,
4987 NULL,
4988 (dump_func)dump_get_mapping_committed_range_reply,
4989 NULL,
4990 NULL,
4991 (dump_func)dump_create_snapshot_reply,
4992 (dump_func)dump_next_process_reply,
4993 (dump_func)dump_next_thread_reply,
4994 (dump_func)dump_wait_debug_event_reply,
4995 (dump_func)dump_queue_exception_event_reply,
4996 NULL,
4997 NULL,
4998 NULL,
4999 NULL,
5000 (dump_func)dump_read_process_memory_reply,
5001 NULL,
5002 (dump_func)dump_create_key_reply,
5003 (dump_func)dump_open_key_reply,
5004 NULL,
5005 NULL,
5006 (dump_func)dump_enum_key_reply,
5007 NULL,
5008 (dump_func)dump_get_key_value_reply,
5009 (dump_func)dump_enum_key_value_reply,
5010 NULL,
5011 NULL,
5012 NULL,
5013 NULL,
5014 NULL,
5015 (dump_func)dump_create_timer_reply,
5016 (dump_func)dump_open_timer_reply,
5017 (dump_func)dump_set_timer_reply,
5018 (dump_func)dump_cancel_timer_reply,
5019 (dump_func)dump_get_timer_info_reply,
5020 (dump_func)dump_get_thread_context_reply,
5021 (dump_func)dump_set_thread_context_reply,
5022 (dump_func)dump_get_selector_entry_reply,
5023 (dump_func)dump_add_atom_reply,
5024 NULL,
5025 (dump_func)dump_find_atom_reply,
5026 (dump_func)dump_get_atom_information_reply,
5027 NULL,
5028 NULL,
5029 (dump_func)dump_init_atom_table_reply,
5030 (dump_func)dump_get_msg_queue_reply,
5031 NULL,
5032 (dump_func)dump_set_queue_mask_reply,
5033 (dump_func)dump_get_queue_status_reply,
5034 (dump_func)dump_get_process_idle_event_reply,
5035 NULL,
5036 NULL,
5037 (dump_func)dump_send_hardware_message_reply,
5038 (dump_func)dump_get_message_reply,
5039 NULL,
5040 NULL,
5041 (dump_func)dump_get_message_reply_reply,
5042 (dump_func)dump_set_win_timer_reply,
5043 NULL,
5044 (dump_func)dump_is_window_hung_reply,
5045 (dump_func)dump_get_serial_info_reply,
5046 NULL,
5047 NULL,
5048 NULL,
5049 (dump_func)dump_get_async_result_reply,
5050 (dump_func)dump_read_reply,
5051 (dump_func)dump_write_reply,
5052 (dump_func)dump_ioctl_reply,
5053 NULL,
5054 (dump_func)dump_create_named_pipe_reply,
5055 NULL,
5056 (dump_func)dump_create_window_reply,
5057 NULL,
5058 (dump_func)dump_get_desktop_window_reply,
5059 (dump_func)dump_set_window_owner_reply,
5060 (dump_func)dump_get_window_info_reply,
5061 (dump_func)dump_set_window_info_reply,
5062 (dump_func)dump_set_parent_reply,
5063 (dump_func)dump_get_window_parents_reply,
5064 (dump_func)dump_get_window_children_reply,
5065 (dump_func)dump_get_window_children_from_point_reply,
5066 (dump_func)dump_get_window_tree_reply,
5067 (dump_func)dump_set_window_pos_reply,
5068 (dump_func)dump_get_window_rectangles_reply,
5069 (dump_func)dump_get_window_text_reply,
5070 NULL,
5071 (dump_func)dump_get_windows_offset_reply,
5072 (dump_func)dump_get_visible_region_reply,
5073 (dump_func)dump_get_surface_region_reply,
5074 (dump_func)dump_get_window_region_reply,
5075 NULL,
5076 (dump_func)dump_get_update_region_reply,
5077 NULL,
5078 NULL,
5079 NULL,
5080 (dump_func)dump_remove_window_property_reply,
5081 (dump_func)dump_get_window_property_reply,
5082 (dump_func)dump_get_window_properties_reply,
5083 (dump_func)dump_create_winstation_reply,
5084 (dump_func)dump_open_winstation_reply,
5085 NULL,
5086 (dump_func)dump_get_process_winstation_reply,
5087 NULL,
5088 (dump_func)dump_enum_winstation_reply,
5089 (dump_func)dump_create_desktop_reply,
5090 (dump_func)dump_open_desktop_reply,
5091 (dump_func)dump_open_input_desktop_reply,
5092 NULL,
5093 (dump_func)dump_get_thread_desktop_reply,
5094 NULL,
5095 (dump_func)dump_enum_desktop_reply,
5096 (dump_func)dump_set_user_object_info_reply,
5097 (dump_func)dump_register_hotkey_reply,
5098 (dump_func)dump_unregister_hotkey_reply,
5099 NULL,
5100 (dump_func)dump_get_thread_input_reply,
5101 (dump_func)dump_get_last_input_time_reply,
5102 (dump_func)dump_get_key_state_reply,
5103 NULL,
5104 (dump_func)dump_set_foreground_window_reply,
5105 (dump_func)dump_set_focus_window_reply,
5106 (dump_func)dump_set_active_window_reply,
5107 (dump_func)dump_set_capture_window_reply,
5108 (dump_func)dump_set_caret_window_reply,
5109 (dump_func)dump_set_caret_info_reply,
5110 (dump_func)dump_set_hook_reply,
5111 (dump_func)dump_remove_hook_reply,
5112 (dump_func)dump_start_hook_chain_reply,
5113 NULL,
5114 (dump_func)dump_get_hook_info_reply,
5115 (dump_func)dump_create_class_reply,
5116 (dump_func)dump_destroy_class_reply,
5117 (dump_func)dump_set_class_info_reply,
5118 (dump_func)dump_open_clipboard_reply,
5119 (dump_func)dump_close_clipboard_reply,
5120 NULL,
5121 (dump_func)dump_set_clipboard_data_reply,
5122 (dump_func)dump_get_clipboard_data_reply,
5123 (dump_func)dump_get_clipboard_formats_reply,
5124 (dump_func)dump_enum_clipboard_formats_reply,
5125 (dump_func)dump_release_clipboard_reply,
5126 (dump_func)dump_get_clipboard_info_reply,
5127 (dump_func)dump_set_clipboard_viewer_reply,
5128 NULL,
5129 NULL,
5130 (dump_func)dump_open_token_reply,
5131 (dump_func)dump_set_global_windows_reply,
5132 (dump_func)dump_adjust_token_privileges_reply,
5133 (dump_func)dump_get_token_privileges_reply,
5134 (dump_func)dump_check_token_privileges_reply,
5135 (dump_func)dump_duplicate_token_reply,
5136 (dump_func)dump_access_check_reply,
5137 (dump_func)dump_get_token_sid_reply,
5138 (dump_func)dump_get_token_groups_reply,
5139 (dump_func)dump_get_token_default_dacl_reply,
5140 NULL,
5141 NULL,
5142 (dump_func)dump_get_security_object_reply,
5143 (dump_func)dump_get_system_handles_reply,
5144 (dump_func)dump_create_mailslot_reply,
5145 (dump_func)dump_set_mailslot_info_reply,
5146 (dump_func)dump_create_directory_reply,
5147 (dump_func)dump_open_directory_reply,
5148 (dump_func)dump_get_directory_entry_reply,
5149 (dump_func)dump_create_symlink_reply,
5150 (dump_func)dump_open_symlink_reply,
5151 (dump_func)dump_query_symlink_reply,
5152 (dump_func)dump_get_object_info_reply,
5153 (dump_func)dump_get_object_type_reply,
5154 NULL,
5155 (dump_func)dump_get_token_impersonation_level_reply,
5156 (dump_func)dump_allocate_locally_unique_id_reply,
5157 (dump_func)dump_create_device_manager_reply,
5158 NULL,
5159 NULL,
5160 (dump_func)dump_get_next_device_request_reply,
5161 (dump_func)dump_get_kernel_object_ptr_reply,
5162 NULL,
5163 NULL,
5164 NULL,
5165 (dump_func)dump_get_kernel_object_handle_reply,
5166 (dump_func)dump_make_process_system_reply,
5167 (dump_func)dump_get_token_statistics_reply,
5168 (dump_func)dump_create_completion_reply,
5169 (dump_func)dump_open_completion_reply,
5170 NULL,
5171 (dump_func)dump_remove_completion_reply,
5172 (dump_func)dump_query_completion_reply,
5173 NULL,
5174 NULL,
5175 NULL,
5176 NULL,
5177 NULL,
5178 (dump_func)dump_get_window_layered_info_reply,
5179 NULL,
5180 (dump_func)dump_alloc_user_handle_reply,
5181 NULL,
5182 (dump_func)dump_set_cursor_reply,
5183 NULL,
5184 (dump_func)dump_create_job_reply,
5185 (dump_func)dump_open_job_reply,
5186 NULL,
5187 NULL,
5188 NULL,
5189 NULL,
5190 NULL,
5191 NULL,
5192 NULL,
5195 static const char * const req_names[REQ_NB_REQUESTS] = {
5196 "new_process",
5197 "exec_process",
5198 "get_new_process_info",
5199 "new_thread",
5200 "get_startup_info",
5201 "init_process_done",
5202 "init_thread",
5203 "terminate_process",
5204 "terminate_thread",
5205 "get_process_info",
5206 "get_process_vm_counters",
5207 "set_process_info",
5208 "get_thread_info",
5209 "get_thread_times",
5210 "set_thread_info",
5211 "get_dll_info",
5212 "suspend_thread",
5213 "resume_thread",
5214 "load_dll",
5215 "unload_dll",
5216 "queue_apc",
5217 "get_apc_result",
5218 "close_handle",
5219 "set_handle_info",
5220 "dup_handle",
5221 "open_process",
5222 "open_thread",
5223 "select",
5224 "create_event",
5225 "event_op",
5226 "query_event",
5227 "open_event",
5228 "create_keyed_event",
5229 "open_keyed_event",
5230 "create_mutex",
5231 "release_mutex",
5232 "open_mutex",
5233 "query_mutex",
5234 "create_semaphore",
5235 "release_semaphore",
5236 "query_semaphore",
5237 "open_semaphore",
5238 "create_file",
5239 "open_file_object",
5240 "alloc_file_handle",
5241 "get_handle_unix_name",
5242 "get_handle_fd",
5243 "get_directory_cache_entry",
5244 "flush",
5245 "get_file_info",
5246 "get_volume_info",
5247 "lock_file",
5248 "unlock_file",
5249 "create_socket",
5250 "accept_socket",
5251 "accept_into_socket",
5252 "set_socket_event",
5253 "get_socket_event",
5254 "get_socket_info",
5255 "enable_socket_event",
5256 "set_socket_deferred",
5257 "alloc_console",
5258 "free_console",
5259 "get_console_renderer_events",
5260 "open_console",
5261 "attach_console",
5262 "get_console_wait_event",
5263 "get_console_mode",
5264 "set_console_mode",
5265 "set_console_input_info",
5266 "get_console_input_info",
5267 "append_console_input_history",
5268 "get_console_input_history",
5269 "create_console_output",
5270 "set_console_output_info",
5271 "get_console_output_info",
5272 "write_console_input",
5273 "read_console_input",
5274 "write_console_output",
5275 "fill_console_output",
5276 "read_console_output",
5277 "move_console_output",
5278 "send_console_signal",
5279 "read_directory_changes",
5280 "read_change",
5281 "create_mapping",
5282 "open_mapping",
5283 "get_mapping_info",
5284 "map_view",
5285 "unmap_view",
5286 "get_mapping_committed_range",
5287 "add_mapping_committed_range",
5288 "is_same_mapping",
5289 "create_snapshot",
5290 "next_process",
5291 "next_thread",
5292 "wait_debug_event",
5293 "queue_exception_event",
5294 "get_exception_status",
5295 "continue_debug_event",
5296 "debug_process",
5297 "set_debugger_kill_on_exit",
5298 "read_process_memory",
5299 "write_process_memory",
5300 "create_key",
5301 "open_key",
5302 "delete_key",
5303 "flush_key",
5304 "enum_key",
5305 "set_key_value",
5306 "get_key_value",
5307 "enum_key_value",
5308 "delete_key_value",
5309 "load_registry",
5310 "unload_registry",
5311 "save_registry",
5312 "set_registry_notification",
5313 "create_timer",
5314 "open_timer",
5315 "set_timer",
5316 "cancel_timer",
5317 "get_timer_info",
5318 "get_thread_context",
5319 "set_thread_context",
5320 "get_selector_entry",
5321 "add_atom",
5322 "delete_atom",
5323 "find_atom",
5324 "get_atom_information",
5325 "set_atom_information",
5326 "empty_atom_table",
5327 "init_atom_table",
5328 "get_msg_queue",
5329 "set_queue_fd",
5330 "set_queue_mask",
5331 "get_queue_status",
5332 "get_process_idle_event",
5333 "send_message",
5334 "post_quit_message",
5335 "send_hardware_message",
5336 "get_message",
5337 "reply_message",
5338 "accept_hardware_message",
5339 "get_message_reply",
5340 "set_win_timer",
5341 "kill_win_timer",
5342 "is_window_hung",
5343 "get_serial_info",
5344 "set_serial_info",
5345 "register_async",
5346 "cancel_async",
5347 "get_async_result",
5348 "read",
5349 "write",
5350 "ioctl",
5351 "set_irp_result",
5352 "create_named_pipe",
5353 "set_named_pipe_info",
5354 "create_window",
5355 "destroy_window",
5356 "get_desktop_window",
5357 "set_window_owner",
5358 "get_window_info",
5359 "set_window_info",
5360 "set_parent",
5361 "get_window_parents",
5362 "get_window_children",
5363 "get_window_children_from_point",
5364 "get_window_tree",
5365 "set_window_pos",
5366 "get_window_rectangles",
5367 "get_window_text",
5368 "set_window_text",
5369 "get_windows_offset",
5370 "get_visible_region",
5371 "get_surface_region",
5372 "get_window_region",
5373 "set_window_region",
5374 "get_update_region",
5375 "update_window_zorder",
5376 "redraw_window",
5377 "set_window_property",
5378 "remove_window_property",
5379 "get_window_property",
5380 "get_window_properties",
5381 "create_winstation",
5382 "open_winstation",
5383 "close_winstation",
5384 "get_process_winstation",
5385 "set_process_winstation",
5386 "enum_winstation",
5387 "create_desktop",
5388 "open_desktop",
5389 "open_input_desktop",
5390 "close_desktop",
5391 "get_thread_desktop",
5392 "set_thread_desktop",
5393 "enum_desktop",
5394 "set_user_object_info",
5395 "register_hotkey",
5396 "unregister_hotkey",
5397 "attach_thread_input",
5398 "get_thread_input",
5399 "get_last_input_time",
5400 "get_key_state",
5401 "set_key_state",
5402 "set_foreground_window",
5403 "set_focus_window",
5404 "set_active_window",
5405 "set_capture_window",
5406 "set_caret_window",
5407 "set_caret_info",
5408 "set_hook",
5409 "remove_hook",
5410 "start_hook_chain",
5411 "finish_hook_chain",
5412 "get_hook_info",
5413 "create_class",
5414 "destroy_class",
5415 "set_class_info",
5416 "open_clipboard",
5417 "close_clipboard",
5418 "empty_clipboard",
5419 "set_clipboard_data",
5420 "get_clipboard_data",
5421 "get_clipboard_formats",
5422 "enum_clipboard_formats",
5423 "release_clipboard",
5424 "get_clipboard_info",
5425 "set_clipboard_viewer",
5426 "add_clipboard_listener",
5427 "remove_clipboard_listener",
5428 "open_token",
5429 "set_global_windows",
5430 "adjust_token_privileges",
5431 "get_token_privileges",
5432 "check_token_privileges",
5433 "duplicate_token",
5434 "access_check",
5435 "get_token_sid",
5436 "get_token_groups",
5437 "get_token_default_dacl",
5438 "set_token_default_dacl",
5439 "set_security_object",
5440 "get_security_object",
5441 "get_system_handles",
5442 "create_mailslot",
5443 "set_mailslot_info",
5444 "create_directory",
5445 "open_directory",
5446 "get_directory_entry",
5447 "create_symlink",
5448 "open_symlink",
5449 "query_symlink",
5450 "get_object_info",
5451 "get_object_type",
5452 "unlink_object",
5453 "get_token_impersonation_level",
5454 "allocate_locally_unique_id",
5455 "create_device_manager",
5456 "create_device",
5457 "delete_device",
5458 "get_next_device_request",
5459 "get_kernel_object_ptr",
5460 "set_kernel_object_ptr",
5461 "grab_kernel_object",
5462 "release_kernel_object",
5463 "get_kernel_object_handle",
5464 "make_process_system",
5465 "get_token_statistics",
5466 "create_completion",
5467 "open_completion",
5468 "add_completion",
5469 "remove_completion",
5470 "query_completion",
5471 "set_completion_info",
5472 "add_fd_completion",
5473 "set_fd_completion_mode",
5474 "set_fd_disp_info",
5475 "set_fd_name_info",
5476 "get_window_layered_info",
5477 "set_window_layered_info",
5478 "alloc_user_handle",
5479 "free_user_handle",
5480 "set_cursor",
5481 "update_rawinput_devices",
5482 "create_job",
5483 "open_job",
5484 "assign_job",
5485 "process_in_job",
5486 "set_job_limits",
5487 "set_job_completion_port",
5488 "terminate_job",
5489 "suspend_process",
5490 "resume_process",
5493 static const struct
5495 const char *name;
5496 unsigned int value;
5497 } status_names[] =
5499 { "ABANDONED_WAIT_0", STATUS_ABANDONED_WAIT_0 },
5500 { "ACCESS_DENIED", STATUS_ACCESS_DENIED },
5501 { "ACCESS_VIOLATION", STATUS_ACCESS_VIOLATION },
5502 { "ADDRESS_ALREADY_ASSOCIATED", STATUS_ADDRESS_ALREADY_ASSOCIATED },
5503 { "ALERTED", STATUS_ALERTED },
5504 { "ALIAS_EXISTS", STATUS_ALIAS_EXISTS },
5505 { "BAD_DEVICE_TYPE", STATUS_BAD_DEVICE_TYPE },
5506 { "BAD_IMPERSONATION_LEVEL", STATUS_BAD_IMPERSONATION_LEVEL },
5507 { "BUFFER_OVERFLOW", STATUS_BUFFER_OVERFLOW },
5508 { "BUFFER_TOO_SMALL", STATUS_BUFFER_TOO_SMALL },
5509 { "CANCELLED", STATUS_CANCELLED },
5510 { "CANNOT_DELETE", STATUS_CANNOT_DELETE },
5511 { "CANT_OPEN_ANONYMOUS", STATUS_CANT_OPEN_ANONYMOUS },
5512 { "CANT_WAIT", STATUS_CANT_WAIT },
5513 { "CHILD_MUST_BE_VOLATILE", STATUS_CHILD_MUST_BE_VOLATILE },
5514 { "CONNECTION_ABORTED", STATUS_CONNECTION_ABORTED },
5515 { "CONNECTION_DISCONNECTED", STATUS_CONNECTION_DISCONNECTED },
5516 { "CONNECTION_REFUSED", STATUS_CONNECTION_REFUSED },
5517 { "CONNECTION_RESET", STATUS_CONNECTION_RESET },
5518 { "DEBUGGER_INACTIVE", STATUS_DEBUGGER_INACTIVE },
5519 { "DEVICE_BUSY", STATUS_DEVICE_BUSY },
5520 { "DIRECTORY_NOT_EMPTY", STATUS_DIRECTORY_NOT_EMPTY },
5521 { "DISK_FULL", STATUS_DISK_FULL },
5522 { "DLL_NOT_FOUND", STATUS_DLL_NOT_FOUND },
5523 { "ERROR_CLASS_ALREADY_EXISTS", 0xc0010000 | ERROR_CLASS_ALREADY_EXISTS },
5524 { "ERROR_CLASS_DOES_NOT_EXIST", 0xc0010000 | ERROR_CLASS_DOES_NOT_EXIST },
5525 { "ERROR_CLASS_HAS_WINDOWS", 0xc0010000 | ERROR_CLASS_HAS_WINDOWS },
5526 { "ERROR_CLIPBOARD_NOT_OPEN", 0xc0010000 | ERROR_CLIPBOARD_NOT_OPEN },
5527 { "ERROR_HOTKEY_ALREADY_REGISTERED", 0xc0010000 | ERROR_HOTKEY_ALREADY_REGISTERED },
5528 { "ERROR_HOTKEY_NOT_REGISTERED", 0xc0010000 | ERROR_HOTKEY_NOT_REGISTERED },
5529 { "ERROR_INVALID_CURSOR_HANDLE", 0xc0010000 | ERROR_INVALID_CURSOR_HANDLE },
5530 { "ERROR_INVALID_INDEX", 0xc0010000 | ERROR_INVALID_INDEX },
5531 { "ERROR_INVALID_WINDOW_HANDLE", 0xc0010000 | ERROR_INVALID_WINDOW_HANDLE },
5532 { "ERROR_NO_MORE_USER_HANDLES", 0xc0010000 | ERROR_NO_MORE_USER_HANDLES },
5533 { "ERROR_WINDOW_OF_OTHER_THREAD", 0xc0010000 | ERROR_WINDOW_OF_OTHER_THREAD },
5534 { "FILE_DELETED", STATUS_FILE_DELETED },
5535 { "FILE_IS_A_DIRECTORY", STATUS_FILE_IS_A_DIRECTORY },
5536 { "FILE_LOCK_CONFLICT", STATUS_FILE_LOCK_CONFLICT },
5537 { "GENERIC_NOT_MAPPED", STATUS_GENERIC_NOT_MAPPED },
5538 { "HANDLES_CLOSED", STATUS_HANDLES_CLOSED },
5539 { "HANDLE_NOT_CLOSABLE", STATUS_HANDLE_NOT_CLOSABLE },
5540 { "HOST_UNREACHABLE", STATUS_HOST_UNREACHABLE },
5541 { "ILLEGAL_FUNCTION", STATUS_ILLEGAL_FUNCTION },
5542 { "INFO_LENGTH_MISMATCH", STATUS_INFO_LENGTH_MISMATCH },
5543 { "INSTANCE_NOT_AVAILABLE", STATUS_INSTANCE_NOT_AVAILABLE },
5544 { "INSUFFICIENT_RESOURCES", STATUS_INSUFFICIENT_RESOURCES },
5545 { "INVALID_CID", STATUS_INVALID_CID },
5546 { "INVALID_DEVICE_REQUEST", STATUS_INVALID_DEVICE_REQUEST },
5547 { "INVALID_FILE_FOR_SECTION", STATUS_INVALID_FILE_FOR_SECTION },
5548 { "INVALID_HANDLE", STATUS_INVALID_HANDLE },
5549 { "INVALID_IMAGE_FORMAT", STATUS_INVALID_IMAGE_FORMAT },
5550 { "INVALID_IMAGE_NE_FORMAT", STATUS_INVALID_IMAGE_NE_FORMAT },
5551 { "INVALID_IMAGE_NOT_MZ", STATUS_INVALID_IMAGE_NOT_MZ },
5552 { "INVALID_IMAGE_PROTECT", STATUS_INVALID_IMAGE_PROTECT },
5553 { "INVALID_IMAGE_WIN_16", STATUS_INVALID_IMAGE_WIN_16 },
5554 { "INVALID_IMAGE_WIN_64", STATUS_INVALID_IMAGE_WIN_64 },
5555 { "INVALID_LOCK_SEQUENCE", STATUS_INVALID_LOCK_SEQUENCE },
5556 { "INVALID_OWNER", STATUS_INVALID_OWNER },
5557 { "INVALID_PARAMETER", STATUS_INVALID_PARAMETER },
5558 { "INVALID_PIPE_STATE", STATUS_INVALID_PIPE_STATE },
5559 { "INVALID_READ_MODE", STATUS_INVALID_READ_MODE },
5560 { "INVALID_SECURITY_DESCR", STATUS_INVALID_SECURITY_DESCR },
5561 { "IO_TIMEOUT", STATUS_IO_TIMEOUT },
5562 { "KERNEL_APC", STATUS_KERNEL_APC },
5563 { "KEY_DELETED", STATUS_KEY_DELETED },
5564 { "MAPPED_FILE_SIZE_ZERO", STATUS_MAPPED_FILE_SIZE_ZERO },
5565 { "MORE_PROCESSING_REQUIRED", STATUS_MORE_PROCESSING_REQUIRED },
5566 { "MUTANT_NOT_OWNED", STATUS_MUTANT_NOT_OWNED },
5567 { "NAME_TOO_LONG", STATUS_NAME_TOO_LONG },
5568 { "NETWORK_BUSY", STATUS_NETWORK_BUSY },
5569 { "NETWORK_UNREACHABLE", STATUS_NETWORK_UNREACHABLE },
5570 { "NOT_ALL_ASSIGNED", STATUS_NOT_ALL_ASSIGNED },
5571 { "NOT_A_DIRECTORY", STATUS_NOT_A_DIRECTORY },
5572 { "NOT_FOUND", STATUS_NOT_FOUND },
5573 { "NOT_IMPLEMENTED", STATUS_NOT_IMPLEMENTED },
5574 { "NOT_MAPPED_VIEW", STATUS_NOT_MAPPED_VIEW },
5575 { "NOT_REGISTRY_FILE", STATUS_NOT_REGISTRY_FILE },
5576 { "NOT_SAME_DEVICE", STATUS_NOT_SAME_DEVICE },
5577 { "NOT_SUPPORTED", STATUS_NOT_SUPPORTED },
5578 { "NO_DATA_DETECTED", STATUS_NO_DATA_DETECTED },
5579 { "NO_IMPERSONATION_TOKEN", STATUS_NO_IMPERSONATION_TOKEN },
5580 { "NO_MEMORY", STATUS_NO_MEMORY },
5581 { "NO_MORE_ENTRIES", STATUS_NO_MORE_ENTRIES },
5582 { "NO_MORE_FILES", STATUS_NO_MORE_FILES },
5583 { "NO_SUCH_DEVICE", STATUS_NO_SUCH_DEVICE },
5584 { "NO_SUCH_FILE", STATUS_NO_SUCH_FILE },
5585 { "NO_TOKEN", STATUS_NO_TOKEN },
5586 { "OBJECT_NAME_COLLISION", STATUS_OBJECT_NAME_COLLISION },
5587 { "OBJECT_NAME_EXISTS", STATUS_OBJECT_NAME_EXISTS },
5588 { "OBJECT_NAME_INVALID", STATUS_OBJECT_NAME_INVALID },
5589 { "OBJECT_NAME_NOT_FOUND", STATUS_OBJECT_NAME_NOT_FOUND },
5590 { "OBJECT_PATH_INVALID", STATUS_OBJECT_PATH_INVALID },
5591 { "OBJECT_PATH_NOT_FOUND", STATUS_OBJECT_PATH_NOT_FOUND },
5592 { "OBJECT_PATH_SYNTAX_BAD", STATUS_OBJECT_PATH_SYNTAX_BAD },
5593 { "OBJECT_TYPE_MISMATCH", STATUS_OBJECT_TYPE_MISMATCH },
5594 { "PENDING", STATUS_PENDING },
5595 { "PIPE_BROKEN", STATUS_PIPE_BROKEN },
5596 { "PIPE_BUSY", STATUS_PIPE_BUSY },
5597 { "PIPE_CLOSING", STATUS_PIPE_CLOSING },
5598 { "PIPE_CONNECTED", STATUS_PIPE_CONNECTED },
5599 { "PIPE_DISCONNECTED", STATUS_PIPE_DISCONNECTED },
5600 { "PIPE_EMPTY", STATUS_PIPE_EMPTY },
5601 { "PIPE_LISTENING", STATUS_PIPE_LISTENING },
5602 { "PIPE_NOT_AVAILABLE", STATUS_PIPE_NOT_AVAILABLE },
5603 { "PRIVILEGE_NOT_HELD", STATUS_PRIVILEGE_NOT_HELD },
5604 { "PROCESS_IN_JOB", STATUS_PROCESS_IN_JOB },
5605 { "PROCESS_IS_TERMINATING", STATUS_PROCESS_IS_TERMINATING },
5606 { "PROCESS_NOT_IN_JOB", STATUS_PROCESS_NOT_IN_JOB },
5607 { "REPARSE_POINT_NOT_RESOLVED", STATUS_REPARSE_POINT_NOT_RESOLVED },
5608 { "SECTION_TOO_BIG", STATUS_SECTION_TOO_BIG },
5609 { "SEMAPHORE_LIMIT_EXCEEDED", STATUS_SEMAPHORE_LIMIT_EXCEEDED },
5610 { "SHARING_VIOLATION", STATUS_SHARING_VIOLATION },
5611 { "SHUTDOWN_IN_PROGRESS", STATUS_SHUTDOWN_IN_PROGRESS },
5612 { "SUSPEND_COUNT_EXCEEDED", STATUS_SUSPEND_COUNT_EXCEEDED },
5613 { "THREAD_IS_TERMINATING", STATUS_THREAD_IS_TERMINATING },
5614 { "TIMEOUT", STATUS_TIMEOUT },
5615 { "TOO_MANY_OPENED_FILES", STATUS_TOO_MANY_OPENED_FILES },
5616 { "UNSUCCESSFUL", STATUS_UNSUCCESSFUL },
5617 { "USER_APC", STATUS_USER_APC },
5618 { "USER_MAPPED_FILE", STATUS_USER_MAPPED_FILE },
5619 { "VOLUME_DISMOUNTED", STATUS_VOLUME_DISMOUNTED },
5620 { "WAS_LOCKED", STATUS_WAS_LOCKED },
5621 { "WSAEACCES", 0xc0010000 | WSAEACCES },
5622 { "WSAEADDRINUSE", 0xc0010000 | WSAEADDRINUSE },
5623 { "WSAEADDRNOTAVAIL", 0xc0010000 | WSAEADDRNOTAVAIL },
5624 { "WSAEAFNOSUPPORT", 0xc0010000 | WSAEAFNOSUPPORT },
5625 { "WSAEALREADY", 0xc0010000 | WSAEALREADY },
5626 { "WSAEBADF", 0xc0010000 | WSAEBADF },
5627 { "WSAECONNABORTED", 0xc0010000 | WSAECONNABORTED },
5628 { "WSAECONNREFUSED", 0xc0010000 | WSAECONNREFUSED },
5629 { "WSAECONNRESET", 0xc0010000 | WSAECONNRESET },
5630 { "WSAEDESTADDRREQ", 0xc0010000 | WSAEDESTADDRREQ },
5631 { "WSAEDQUOT", 0xc0010000 | WSAEDQUOT },
5632 { "WSAEFAULT", 0xc0010000 | WSAEFAULT },
5633 { "WSAEHOSTDOWN", 0xc0010000 | WSAEHOSTDOWN },
5634 { "WSAEHOSTUNREACH", 0xc0010000 | WSAEHOSTUNREACH },
5635 { "WSAEINPROGRESS", 0xc0010000 | WSAEINPROGRESS },
5636 { "WSAEINTR", 0xc0010000 | WSAEINTR },
5637 { "WSAEINVAL", 0xc0010000 | WSAEINVAL },
5638 { "WSAEISCONN", 0xc0010000 | WSAEISCONN },
5639 { "WSAELOOP", 0xc0010000 | WSAELOOP },
5640 { "WSAEMFILE", 0xc0010000 | WSAEMFILE },
5641 { "WSAEMSGSIZE", 0xc0010000 | WSAEMSGSIZE },
5642 { "WSAENAMETOOLONG", 0xc0010000 | WSAENAMETOOLONG },
5643 { "WSAENETDOWN", 0xc0010000 | WSAENETDOWN },
5644 { "WSAENETRESET", 0xc0010000 | WSAENETRESET },
5645 { "WSAENETUNREACH", 0xc0010000 | WSAENETUNREACH },
5646 { "WSAENOBUFS", 0xc0010000 | WSAENOBUFS },
5647 { "WSAENOPROTOOPT", 0xc0010000 | WSAENOPROTOOPT },
5648 { "WSAENOTCONN", 0xc0010000 | WSAENOTCONN },
5649 { "WSAENOTEMPTY", 0xc0010000 | WSAENOTEMPTY },
5650 { "WSAENOTSOCK", 0xc0010000 | WSAENOTSOCK },
5651 { "WSAEOPNOTSUPP", 0xc0010000 | WSAEOPNOTSUPP },
5652 { "WSAEPFNOSUPPORT", 0xc0010000 | WSAEPFNOSUPPORT },
5653 { "WSAEPROCLIM", 0xc0010000 | WSAEPROCLIM },
5654 { "WSAEPROTONOSUPPORT", 0xc0010000 | WSAEPROTONOSUPPORT },
5655 { "WSAEPROTOTYPE", 0xc0010000 | WSAEPROTOTYPE },
5656 { "WSAEREMOTE", 0xc0010000 | WSAEREMOTE },
5657 { "WSAESHUTDOWN", 0xc0010000 | WSAESHUTDOWN },
5658 { "WSAESOCKTNOSUPPORT", 0xc0010000 | WSAESOCKTNOSUPPORT },
5659 { "WSAESTALE", 0xc0010000 | WSAESTALE },
5660 { "WSAETIMEDOUT", 0xc0010000 | WSAETIMEDOUT },
5661 { "WSAETOOMANYREFS", 0xc0010000 | WSAETOOMANYREFS },
5662 { "WSAEUSERS", 0xc0010000 | WSAEUSERS },
5663 { "WSAEWOULDBLOCK", 0xc0010000 | WSAEWOULDBLOCK },
5664 { NULL, 0 }
5667 /* ### make_requests end ### */
5668 /* Everything above this line is generated automatically by tools/make_requests */
5670 static const char *get_status_name( unsigned int status )
5672 int i;
5673 static char buffer[10];
5675 if (status)
5677 for (i = 0; status_names[i].name; i++)
5678 if (status_names[i].value == status) return status_names[i].name;
5680 sprintf( buffer, "%x", status );
5681 return buffer;
5684 void trace_request(void)
5686 enum request req = current->req.request_header.req;
5687 if (req < REQ_NB_REQUESTS)
5689 fprintf( stderr, "%04x: %s(", current->id, req_names[req] );
5690 if (req_dumpers[req])
5692 cur_data = get_req_data();
5693 cur_size = get_req_data_size();
5694 req_dumpers[req]( &current->req );
5696 fprintf( stderr, " )\n" );
5698 else fprintf( stderr, "%04x: %d(?)\n", current->id, req );
5701 void trace_reply( enum request req, const union generic_reply *reply )
5703 if (req < REQ_NB_REQUESTS)
5705 fprintf( stderr, "%04x: %s() = %s",
5706 current->id, req_names[req], get_status_name(current->error) );
5707 if (reply_dumpers[req])
5709 fprintf( stderr, " {" );
5710 cur_data = current->reply_data;
5711 cur_size = reply->reply_header.reply_size;
5712 reply_dumpers[req]( reply );
5713 fprintf( stderr, " }" );
5715 fputc( '\n', stderr );
5717 else fprintf( stderr, "%04x: %d() = %s\n",
5718 current->id, req, get_status_name(current->error) );