rpcrt4/tests: Use standard wine_dbgstr_longlong.
[wine.git] / server / trace.c
blobac0f8b01b0d71827f0de05f470811474f3b93bb1
1 /*
2 * Server request tracing
4 * Copyright (C) 1999 Alexandre Julliard
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #include "config.h"
22 #include "wine/port.h"
24 #include <ctype.h>
25 #include <stdarg.h>
26 #include <stdio.h>
27 #include <sys/types.h>
29 #ifdef HAVE_SYS_UIO_H
30 #include <sys/uio.h>
31 #endif
33 #include "ntstatus.h"
34 #define WIN32_NO_STATUS
35 #include "windef.h"
36 #include "winbase.h"
37 #include "wincon.h"
38 #include "winternl.h"
39 #include "winuser.h"
40 #include "winioctl.h"
41 #include "ddk/wdm.h"
42 #include "ddk/ntddser.h"
43 #define USE_WS_PREFIX
44 #include "winsock2.h"
45 #include "file.h"
46 #include "request.h"
47 #include "unicode.h"
49 static const void *cur_data;
50 static data_size_t cur_size;
52 static const char *get_status_name( unsigned int status );
54 /* utility functions */
56 static inline void remove_data( data_size_t size )
58 cur_data = (const char *)cur_data + size;
59 cur_size -= size;
62 static void dump_uints( const char *prefix, const unsigned int *ptr, int len )
64 fprintf( stderr, "%s{", prefix );
65 while (len > 0)
67 fprintf( stderr, "%08x", *ptr++ );
68 if (--len) fputc( ',', stderr );
70 fputc( '}', stderr );
73 static void dump_handles( const char *prefix, const obj_handle_t *data, data_size_t size )
75 data_size_t len = size / sizeof(*data);
77 fprintf( stderr,"%s{", prefix );
78 while (len > 0)
80 fprintf( stderr, "%04x", *data++ );
81 if (--len) fputc( ',', stderr );
83 fputc( '}', stderr );
86 static void dump_timeout( const char *prefix, const timeout_t *time )
88 fprintf( stderr, "%s%s", prefix, get_timeout_str(*time) );
91 static void dump_uint64( const char *prefix, const unsigned __int64 *val )
93 if ((unsigned int)*val != *val)
94 fprintf( stderr, "%s%x%08x", prefix, (unsigned int)(*val >> 32), (unsigned int)*val );
95 else
96 fprintf( stderr, "%s%08x", prefix, (unsigned int)*val );
99 static void dump_rectangle( const char *prefix, const rectangle_t *rect )
101 fprintf( stderr, "%s{%d,%d;%d,%d}", prefix,
102 rect->left, rect->top, rect->right, rect->bottom );
105 static void dump_char_info( const char *prefix, const char_info_t *info )
107 fprintf( stderr, "%s{'", prefix );
108 dump_strW( &info->ch, 1, stderr, "\'\'" );
109 fprintf( stderr, "',%04x}", info->attr );
112 static void dump_ioctl_code( const char *prefix, const ioctl_code_t *code )
114 switch(*code)
116 #define CASE(c) case c: fprintf( stderr, "%s%s", prefix, #c ); break
117 CASE(FSCTL_DISMOUNT_VOLUME);
118 CASE(FSCTL_PIPE_DISCONNECT);
119 CASE(FSCTL_PIPE_LISTEN);
120 CASE(FSCTL_PIPE_PEEK);
121 CASE(FSCTL_PIPE_WAIT);
122 CASE(IOCTL_SERIAL_GET_TIMEOUTS);
123 CASE(IOCTL_SERIAL_GET_WAIT_MASK);
124 CASE(IOCTL_SERIAL_SET_TIMEOUTS);
125 CASE(IOCTL_SERIAL_SET_WAIT_MASK);
126 CASE(WS_SIO_ADDRESS_LIST_CHANGE);
127 default: fprintf( stderr, "%s%08x", prefix, *code ); break;
128 #undef CASE
132 static void dump_cpu_type( const char *prefix, const cpu_type_t *code )
134 switch (*code)
136 #define CASE(c) case CPU_##c: fprintf( stderr, "%s%s", prefix, #c ); break
137 CASE(x86);
138 CASE(x86_64);
139 CASE(POWERPC);
140 CASE(ARM);
141 CASE(ARM64);
142 default: fprintf( stderr, "%s%u", prefix, *code ); break;
143 #undef CASE
147 static void dump_apc_call( const char *prefix, const apc_call_t *call )
149 fprintf( stderr, "%s{", prefix );
150 switch(call->type)
152 case APC_NONE:
153 fprintf( stderr, "APC_NONE" );
154 break;
155 case APC_USER:
156 dump_uint64( "APC_USER,func=", &call->user.func );
157 dump_uint64( ",args={", &call->user.args[0] );
158 dump_uint64( ",", &call->user.args[1] );
159 dump_uint64( ",", &call->user.args[2] );
160 fputc( '}', stderr );
161 break;
162 case APC_TIMER:
163 dump_timeout( "APC_TIMER,time=", &call->timer.time );
164 dump_uint64( ",arg=", &call->timer.arg );
165 break;
166 case APC_ASYNC_IO:
167 dump_uint64( "APC_ASYNC_IO,user=", &call->async_io.user );
168 dump_uint64( ",sb=", &call->async_io.sb );
169 fprintf( stderr, ",status=%s", get_status_name(call->async_io.status) );
170 break;
171 case APC_VIRTUAL_ALLOC:
172 dump_uint64( "APC_VIRTUAL_ALLOC,addr==", &call->virtual_alloc.addr );
173 dump_uint64( ",size=", &call->virtual_alloc.size );
174 fprintf( stderr, ",zero_bits=%u,op_type=%x,prot=%x",
175 call->virtual_alloc.zero_bits, call->virtual_alloc.op_type,
176 call->virtual_alloc.prot );
177 break;
178 case APC_VIRTUAL_FREE:
179 dump_uint64( "APC_VIRTUAL_FREE,addr=", &call->virtual_free.addr );
180 dump_uint64( ",size=", &call->virtual_free.size );
181 fprintf( stderr, ",op_type=%x", call->virtual_free.op_type );
182 break;
183 case APC_VIRTUAL_QUERY:
184 dump_uint64( "APC_VIRTUAL_QUERY,addr=", &call->virtual_query.addr );
185 break;
186 case APC_VIRTUAL_PROTECT:
187 dump_uint64( "APC_VIRTUAL_PROTECT,addr=", &call->virtual_protect.addr );
188 dump_uint64( ",size=", &call->virtual_protect.size );
189 fprintf( stderr, ",prot=%x", call->virtual_protect.prot );
190 break;
191 case APC_VIRTUAL_FLUSH:
192 dump_uint64( "APC_VIRTUAL_FLUSH,addr=", &call->virtual_flush.addr );
193 dump_uint64( ",size=", &call->virtual_flush.size );
194 break;
195 case APC_VIRTUAL_LOCK:
196 dump_uint64( "APC_VIRTUAL_LOCK,addr=", &call->virtual_lock.addr );
197 dump_uint64( ",size=", &call->virtual_lock.size );
198 break;
199 case APC_VIRTUAL_UNLOCK:
200 dump_uint64( "APC_VIRTUAL_UNLOCK,addr=", &call->virtual_unlock.addr );
201 dump_uint64( ",size=", &call->virtual_unlock.size );
202 break;
203 case APC_MAP_VIEW:
204 fprintf( stderr, "APC_MAP_VIEW,handle=%04x", call->map_view.handle );
205 dump_uint64( ",addr=", &call->map_view.addr );
206 dump_uint64( ",size=", &call->map_view.size );
207 dump_uint64( ",offset=", &call->map_view.offset );
208 fprintf( stderr, ",zero_bits=%u,alloc_type=%x,prot=%x",
209 call->map_view.zero_bits, call->map_view.alloc_type, call->map_view.prot );
210 break;
211 case APC_UNMAP_VIEW:
212 dump_uint64( "APC_UNMAP_VIEW,addr=", &call->unmap_view.addr );
213 break;
214 case APC_CREATE_THREAD:
215 dump_uint64( "APC_CREATE_THREAD,func=", &call->create_thread.func );
216 dump_uint64( ",arg=", &call->create_thread.arg );
217 dump_uint64( ",reserve=", &call->create_thread.reserve );
218 dump_uint64( ",commit=", &call->create_thread.commit );
219 fprintf( stderr, ",suspend=%u", call->create_thread.suspend );
220 break;
221 default:
222 fprintf( stderr, "type=%u", call->type );
223 break;
225 fputc( '}', stderr );
228 static void dump_apc_result( const char *prefix, const apc_result_t *result )
230 fprintf( stderr, "%s{", prefix );
231 switch(result->type)
233 case APC_NONE:
234 break;
235 case APC_ASYNC_IO:
236 fprintf( stderr, "APC_ASYNC_IO,status=%s,total=%u",
237 get_status_name( result->async_io.status ), result->async_io.total );
238 break;
239 case APC_VIRTUAL_ALLOC:
240 fprintf( stderr, "APC_VIRTUAL_ALLOC,status=%s",
241 get_status_name( result->virtual_alloc.status ));
242 dump_uint64( ",addr=", &result->virtual_alloc.addr );
243 dump_uint64( ",size=", &result->virtual_alloc.size );
244 break;
245 case APC_VIRTUAL_FREE:
246 fprintf( stderr, "APC_VIRTUAL_FREE,status=%s",
247 get_status_name( result->virtual_free.status ));
248 dump_uint64( ",addr=", &result->virtual_free.addr );
249 dump_uint64( ",size=", &result->virtual_free.size );
250 break;
251 case APC_VIRTUAL_QUERY:
252 fprintf( stderr, "APC_VIRTUAL_QUERY,status=%s",
253 get_status_name( result->virtual_query.status ));
254 dump_uint64( ",base=", &result->virtual_query.base );
255 dump_uint64( ",alloc_base=", &result->virtual_query.alloc_base );
256 dump_uint64( ",size=", &result->virtual_query.size );
257 fprintf( stderr, ",state=%x,prot=%x,alloc_prot=%x,alloc_type=%x",
258 result->virtual_query.state, result->virtual_query.prot,
259 result->virtual_query.alloc_prot, result->virtual_query.alloc_type );
260 break;
261 case APC_VIRTUAL_PROTECT:
262 fprintf( stderr, "APC_VIRTUAL_PROTECT,status=%s",
263 get_status_name( result->virtual_protect.status ));
264 dump_uint64( ",addr=", &result->virtual_protect.addr );
265 dump_uint64( ",size=", &result->virtual_protect.size );
266 fprintf( stderr, ",prot=%x", result->virtual_protect.prot );
267 break;
268 case APC_VIRTUAL_FLUSH:
269 fprintf( stderr, "APC_VIRTUAL_FLUSH,status=%s",
270 get_status_name( result->virtual_flush.status ));
271 dump_uint64( ",addr=", &result->virtual_flush.addr );
272 dump_uint64( ",size=", &result->virtual_flush.size );
273 break;
274 case APC_VIRTUAL_LOCK:
275 fprintf( stderr, "APC_VIRTUAL_LOCK,status=%s",
276 get_status_name( result->virtual_lock.status ));
277 dump_uint64( ",addr=", &result->virtual_lock.addr );
278 dump_uint64( ",size=", &result->virtual_lock.size );
279 break;
280 case APC_VIRTUAL_UNLOCK:
281 fprintf( stderr, "APC_VIRTUAL_UNLOCK,status=%s",
282 get_status_name( result->virtual_unlock.status ));
283 dump_uint64( ",addr=", &result->virtual_unlock.addr );
284 dump_uint64( ",size=", &result->virtual_unlock.size );
285 break;
286 case APC_MAP_VIEW:
287 fprintf( stderr, "APC_MAP_VIEW,status=%s",
288 get_status_name( result->map_view.status ));
289 dump_uint64( ",addr=", &result->map_view.addr );
290 dump_uint64( ",size=", &result->map_view.size );
291 break;
292 case APC_UNMAP_VIEW:
293 fprintf( stderr, "APC_UNMAP_VIEW,status=%s",
294 get_status_name( result->unmap_view.status ) );
295 break;
296 case APC_CREATE_THREAD:
297 fprintf( stderr, "APC_CREATE_THREAD,status=%s,tid=%04x,handle=%04x",
298 get_status_name( result->create_thread.status ),
299 result->create_thread.tid, result->create_thread.handle );
300 break;
301 default:
302 fprintf( stderr, "type=%u", result->type );
303 break;
305 fputc( '}', stderr );
308 static void dump_async_data( const char *prefix, const async_data_t *data )
310 fprintf( stderr, "%s{handle=%04x,event=%04x", prefix, data->handle, data->event );
311 dump_uint64( ",iosb=", &data->iosb );
312 dump_uint64( ",user=", &data->user );
313 dump_uint64( ",apc=", &data->apc );
314 dump_uint64( ",apc_context=", &data->apc_context );
315 fputc( '}', stderr );
318 static void dump_irp_params( const char *prefix, const irp_params_t *data )
320 switch (data->major)
322 case IRP_MJ_CREATE:
323 fprintf( stderr, "%s{major=CREATE,access=%08x,sharing=%08x,options=%08x",
324 prefix, data->create.access, data->create.sharing, data->create.options );
325 dump_uint64( ",device=", &data->create.device );
326 fputc( '}', stderr );
327 break;
328 case IRP_MJ_CLOSE:
329 fprintf( stderr, "%s{major=CLOSE", prefix );
330 dump_uint64( ",file=", &data->close.file );
331 fputc( '}', stderr );
332 break;
333 case IRP_MJ_READ:
334 fprintf( stderr, "%s{major=READ,key=%08x", prefix, data->read.key );
335 dump_uint64( ",pos=", &data->read.pos );
336 dump_uint64( ",file=", &data->read.file );
337 fputc( '}', stderr );
338 break;
339 case IRP_MJ_WRITE:
340 fprintf( stderr, "%s{major=WRITE,key=%08x", prefix, data->write.key );
341 dump_uint64( ",pos=", &data->write.pos );
342 dump_uint64( ",file=", &data->write.file );
343 fputc( '}', stderr );
344 break;
345 case IRP_MJ_FLUSH_BUFFERS:
346 fprintf( stderr, "%s{major=FLUSH_BUFFERS", prefix );
347 dump_uint64( ",file=", &data->flush.file );
348 fputc( '}', stderr );
349 break;
350 case IRP_MJ_DEVICE_CONTROL:
351 fprintf( stderr, "%s{major=DEVICE_CONTROL", prefix );
352 dump_ioctl_code( ",code=", &data->ioctl.code );
353 dump_uint64( ",file=", &data->ioctl.file );
354 fputc( '}', stderr );
355 break;
356 case IRP_MJ_MAXIMUM_FUNCTION + 1: /* invalid */
357 fprintf( stderr, "%s{}", prefix );
358 break;
359 default:
360 fprintf( stderr, "%s{major=%u}", prefix, data->major );
361 break;
365 static void dump_hw_input( const char *prefix, const hw_input_t *input )
367 switch (input->type)
369 case INPUT_MOUSE:
370 fprintf( stderr, "%s{type=MOUSE,x=%d,y=%d,data=%08x,flags=%08x,time=%u",
371 prefix, input->mouse.x, input->mouse.y, input->mouse.data, input->mouse.flags,
372 input->mouse.time );
373 dump_uint64( ",info=", &input->mouse.info );
374 fputc( '}', stderr );
375 break;
376 case INPUT_KEYBOARD:
377 fprintf( stderr, "%s{type=KEYBOARD,vkey=%04hx,scan=%04hx,flags=%08x,time=%u",
378 prefix, input->kbd.vkey, input->kbd.scan, input->kbd.flags, input->kbd.time );
379 dump_uint64( ",info=", &input->kbd.info );
380 fputc( '}', stderr );
381 break;
382 case INPUT_HARDWARE:
383 fprintf( stderr, "%s{type=HARDWARE,msg=%04x", prefix, input->hw.msg );
384 dump_uint64( ",lparam=", &input->hw.lparam );
385 fputc( '}', stderr );
386 break;
387 default:
388 fprintf( stderr, "%s{type=%04x}", prefix, input->type );
389 break;
393 static void dump_luid( const char *prefix, const luid_t *luid )
395 fprintf( stderr, "%s%d.%u", prefix, luid->high_part, luid->low_part );
398 static void dump_varargs_ints( const char *prefix, data_size_t size )
400 const int *data = cur_data;
401 data_size_t len = size / sizeof(*data);
403 fprintf( stderr,"%s{", prefix );
404 while (len > 0)
406 fprintf( stderr, "%d", *data++ );
407 if (--len) fputc( ',', stderr );
409 fputc( '}', stderr );
410 remove_data( size );
413 static void dump_varargs_uints( const char *prefix, data_size_t size )
415 const unsigned int *data = cur_data;
417 dump_uints( prefix, data, size / sizeof(*data) );
418 remove_data( size );
421 static void dump_varargs_uints64( const char *prefix, data_size_t size )
423 const unsigned __int64 *data = cur_data;
424 data_size_t len = size / sizeof(*data);
426 fprintf( stderr,"%s{", prefix );
427 while (len > 0)
429 dump_uint64( "", data++ );
430 if (--len) fputc( ',', stderr );
432 fputc( '}', stderr );
433 remove_data( size );
436 static void dump_varargs_apc_result( const char *prefix, data_size_t size )
438 const apc_result_t *result = cur_data;
440 if (size >= sizeof(*result))
442 dump_apc_result( prefix, result );
443 size = sizeof(*result);
445 remove_data( size );
448 static void dump_varargs_select_op( const char *prefix, data_size_t size )
450 select_op_t data;
452 if (!size)
454 fprintf( stderr, "%s{}", prefix );
455 return;
457 memset( &data, 0, sizeof(data) );
458 memcpy( &data, cur_data, min( size, sizeof(data) ));
460 fprintf( stderr, "%s{", prefix );
461 switch (data.op)
463 case SELECT_NONE:
464 fprintf( stderr, "NONE" );
465 break;
466 case SELECT_WAIT:
467 case SELECT_WAIT_ALL:
468 fprintf( stderr, "%s", data.op == SELECT_WAIT ? "WAIT" : "WAIT_ALL" );
469 if (size > offsetof( select_op_t, wait.handles ))
470 dump_handles( ",handles=", data.wait.handles,
471 min( size, sizeof(data.wait) ) - offsetof( select_op_t, wait.handles ));
472 break;
473 case SELECT_SIGNAL_AND_WAIT:
474 fprintf( stderr, "SIGNAL_AND_WAIT,signal=%04x,wait=%04x",
475 data.signal_and_wait.signal, data.signal_and_wait.wait );
476 break;
477 case SELECT_KEYED_EVENT_WAIT:
478 case SELECT_KEYED_EVENT_RELEASE:
479 fprintf( stderr, "KEYED_EVENT_%s,handle=%04x",
480 data.op == SELECT_KEYED_EVENT_WAIT ? "WAIT" : "RELEASE",
481 data.keyed_event.handle );
482 dump_uint64( ",key=", &data.keyed_event.key );
483 break;
484 default:
485 fprintf( stderr, "op=%u", data.op );
486 break;
488 fputc( '}', stderr );
489 remove_data( size );
492 static void dump_varargs_user_handles( const char *prefix, data_size_t size )
494 const user_handle_t *data = cur_data;
495 data_size_t len = size / sizeof(*data);
497 fprintf( stderr,"%s{", prefix );
498 while (len > 0)
500 fprintf( stderr, "%08x", *data++ );
501 if (--len) fputc( ',', stderr );
503 fputc( '}', stderr );
504 remove_data( size );
507 static void dump_varargs_bytes( const char *prefix, data_size_t size )
509 const unsigned char *data = cur_data;
510 data_size_t len = min( 1024, size );
512 fprintf( stderr,"%s{", prefix );
513 while (len > 0)
515 fprintf( stderr, "%02x", *data++ );
516 if (--len) fputc( ',', stderr );
518 if (size > 1024) fprintf( stderr, "...(total %u)", size );
519 fputc( '}', stderr );
520 remove_data( size );
523 static void dump_varargs_string( const char *prefix, data_size_t size )
525 fprintf( stderr, "%s\"%.*s\"", prefix, (int)size, (const char *)cur_data );
526 remove_data( size );
529 static void dump_varargs_unicode_str( const char *prefix, data_size_t size )
531 fprintf( stderr, "%sL\"", prefix );
532 dump_strW( cur_data, size / sizeof(WCHAR), stderr, "\"\"" );
533 fputc( '\"', stderr );
534 remove_data( size );
537 static void dump_varargs_context( const char *prefix, data_size_t size )
539 const context_t *context = cur_data;
540 context_t ctx;
541 unsigned int i;
543 if (!size)
545 fprintf( stderr, "%s{}", prefix );
546 return;
548 size = min( size, sizeof(ctx) );
549 memset( &ctx, 0, sizeof(ctx) );
550 memcpy( &ctx, context, size );
552 fprintf( stderr,"%s{", prefix );
553 dump_cpu_type( "cpu=", &ctx.cpu );
554 switch (ctx.cpu)
556 case CPU_x86:
557 if (ctx.flags & SERVER_CTX_CONTROL)
558 fprintf( stderr, ",eip=%08x,esp=%08x,ebp=%08x,eflags=%08x,cs=%04x,ss=%04x",
559 ctx.ctl.i386_regs.eip, ctx.ctl.i386_regs.esp, ctx.ctl.i386_regs.ebp,
560 ctx.ctl.i386_regs.eflags, ctx.ctl.i386_regs.cs, ctx.ctl.i386_regs.ss );
561 if (ctx.flags & SERVER_CTX_SEGMENTS)
562 fprintf( stderr, ",ds=%04x,es=%04x,fs=%04x,gs=%04x",
563 ctx.seg.i386_regs.ds, ctx.seg.i386_regs.es,
564 ctx.seg.i386_regs.fs, ctx.seg.i386_regs.gs );
565 if (ctx.flags & SERVER_CTX_INTEGER)
566 fprintf( stderr, ",eax=%08x,ebx=%08x,ecx=%08x,edx=%08x,esi=%08x,edi=%08x",
567 ctx.integer.i386_regs.eax, ctx.integer.i386_regs.ebx, ctx.integer.i386_regs.ecx,
568 ctx.integer.i386_regs.edx, ctx.integer.i386_regs.esi, ctx.integer.i386_regs.edi );
569 if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
570 fprintf( stderr, ",dr0=%08x,dr1=%08x,dr2=%08x,dr3=%08x,dr6=%08x,dr7=%08x",
571 ctx.debug.i386_regs.dr0, ctx.debug.i386_regs.dr1, ctx.debug.i386_regs.dr2,
572 ctx.debug.i386_regs.dr3, ctx.debug.i386_regs.dr6, ctx.debug.i386_regs.dr7 );
573 if (ctx.flags & SERVER_CTX_FLOATING_POINT)
575 fprintf( stderr, ",fp.ctrl=%08x,fp.status=%08x,fp.tag=%08x,fp.err_off=%08x,fp.err_sel=%08x",
576 ctx.fp.i386_regs.ctrl, ctx.fp.i386_regs.status, ctx.fp.i386_regs.tag,
577 ctx.fp.i386_regs.err_off, ctx.fp.i386_regs.err_sel );
578 fprintf( stderr, ",fp.data_off=%08x,fp.data_sel=%08x,fp.cr0npx=%08x",
579 ctx.fp.i386_regs.data_off, ctx.fp.i386_regs.data_sel, ctx.fp.i386_regs.cr0npx );
580 for (i = 0; i < 8; i++)
582 long double reg = 0;
583 memcpy( &reg, &ctx.fp.i386_regs.regs[10 * i], 10 );
584 fprintf( stderr, ",fp.reg%u=%Lg", i, reg );
587 if (ctx.flags & SERVER_CTX_EXTENDED_REGISTERS)
588 dump_uints( ",extended=", (const unsigned int *)ctx.ext.i386_regs,
589 sizeof(ctx.ext.i386_regs) / sizeof(int) );
590 break;
591 case CPU_x86_64:
592 if (ctx.flags & SERVER_CTX_CONTROL)
594 dump_uint64( ",rip=", &ctx.ctl.x86_64_regs.rip );
595 dump_uint64( ",rbp=", &ctx.ctl.x86_64_regs.rbp );
596 dump_uint64( ",rsp=", &ctx.ctl.x86_64_regs.rsp );
597 fprintf( stderr, ",cs=%04x,ss=%04x,flags=%08x",
598 ctx.ctl.x86_64_regs.cs, ctx.ctl.x86_64_regs.ss, ctx.ctl.x86_64_regs.flags );
600 if (ctx.flags & SERVER_CTX_INTEGER)
602 dump_uint64( ",rax=", &ctx.integer.x86_64_regs.rax );
603 dump_uint64( ",rbx=", &ctx.integer.x86_64_regs.rbx );
604 dump_uint64( ",rcx=", &ctx.integer.x86_64_regs.rcx );
605 dump_uint64( ",rdx=", &ctx.integer.x86_64_regs.rdx );
606 dump_uint64( ",rsi=", &ctx.integer.x86_64_regs.rsi );
607 dump_uint64( ",rdi=", &ctx.integer.x86_64_regs.rdi );
608 dump_uint64( ",r8=", &ctx.integer.x86_64_regs.r8 );
609 dump_uint64( ",r9=", &ctx.integer.x86_64_regs.r9 );
610 dump_uint64( ",r10=", &ctx.integer.x86_64_regs.r10 );
611 dump_uint64( ",r11=", &ctx.integer.x86_64_regs.r11 );
612 dump_uint64( ",r12=", &ctx.integer.x86_64_regs.r12 );
613 dump_uint64( ",r13=", &ctx.integer.x86_64_regs.r13 );
614 dump_uint64( ",r14=", &ctx.integer.x86_64_regs.r14 );
615 dump_uint64( ",r15=", &ctx.integer.x86_64_regs.r15 );
617 if (ctx.flags & SERVER_CTX_SEGMENTS)
618 fprintf( stderr, ",ds=%04x,es=%04x,fs=%04x,gs=%04x",
619 ctx.seg.x86_64_regs.ds, ctx.seg.x86_64_regs.es,
620 ctx.seg.x86_64_regs.fs, ctx.seg.x86_64_regs.gs );
621 if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
623 dump_uint64( ",dr0=", &ctx.debug.x86_64_regs.dr0 );
624 dump_uint64( ",dr1=", &ctx.debug.x86_64_regs.dr1 );
625 dump_uint64( ",dr2=", &ctx.debug.x86_64_regs.dr2 );
626 dump_uint64( ",dr3=", &ctx.debug.x86_64_regs.dr3 );
627 dump_uint64( ",dr6=", &ctx.debug.x86_64_regs.dr6 );
628 dump_uint64( ",dr7=", &ctx.debug.x86_64_regs.dr7 );
630 if (ctx.flags & SERVER_CTX_FLOATING_POINT)
632 for (i = 0; i < 32; i++)
633 fprintf( stderr, ",fp%u=%08x%08x%08x%08x", i,
634 (unsigned int)(ctx.fp.x86_64_regs.fpregs[i].high >> 32),
635 (unsigned int)ctx.fp.x86_64_regs.fpregs[i].high,
636 (unsigned int)(ctx.fp.x86_64_regs.fpregs[i].low >> 32),
637 (unsigned int)ctx.fp.x86_64_regs.fpregs[i].low );
639 break;
640 case CPU_POWERPC:
641 if (ctx.flags & SERVER_CTX_CONTROL)
642 fprintf( stderr, ",iar=%08x,msr=%08x,ctr=%08x,lr=%08x,dar=%08x,dsisr=%08x,trap=%08x",
643 ctx.ctl.powerpc_regs.iar, ctx.ctl.powerpc_regs.msr, ctx.ctl.powerpc_regs.ctr,
644 ctx.ctl.powerpc_regs.lr, ctx.ctl.powerpc_regs.dar, ctx.ctl.powerpc_regs.dsisr,
645 ctx.ctl.powerpc_regs.trap );
646 if (ctx.flags & SERVER_CTX_INTEGER)
648 for (i = 0; i < 32; i++) fprintf( stderr, ",gpr%u=%08x", i, ctx.integer.powerpc_regs.gpr[i] );
649 fprintf( stderr, ",cr=%08x,xer=%08x",
650 ctx.integer.powerpc_regs.cr, ctx.integer.powerpc_regs.xer );
652 if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
653 for (i = 0; i < 8; i++) fprintf( stderr, ",dr%u=%08x", i, ctx.debug.powerpc_regs.dr[i] );
654 if (ctx.flags & SERVER_CTX_FLOATING_POINT)
656 for (i = 0; i < 32; i++) fprintf( stderr, ",fpr%u=%g", i, ctx.fp.powerpc_regs.fpr[i] );
657 fprintf( stderr, ",fpscr=%g", ctx.fp.powerpc_regs.fpscr );
659 break;
660 case CPU_ARM:
661 if (ctx.flags & SERVER_CTX_CONTROL)
662 fprintf( stderr, ",sp=%08x,lr=%08x,pc=%08x,cpsr=%08x",
663 ctx.ctl.arm_regs.sp, ctx.ctl.arm_regs.lr,
664 ctx.ctl.arm_regs.pc, ctx.ctl.arm_regs.cpsr );
665 if (ctx.flags & SERVER_CTX_INTEGER)
666 for (i = 0; i < 13; i++) fprintf( stderr, ",r%u=%08x", i, ctx.integer.arm_regs.r[i] );
667 break;
668 case CPU_ARM64:
669 if (ctx.flags & SERVER_CTX_CONTROL)
671 dump_uint64( ",sp=", &ctx.ctl.arm64_regs.sp );
672 dump_uint64( ",pc=", &ctx.ctl.arm64_regs.pc );
673 dump_uint64( ",pstate=", &ctx.ctl.arm64_regs.pstate );
675 if (ctx.flags & SERVER_CTX_INTEGER)
677 dump_uint64( ",x0=", &ctx.integer.arm64_regs.x[0] );
678 dump_uint64( ",x1=", &ctx.integer.arm64_regs.x[1] );
679 dump_uint64( ",x2=", &ctx.integer.arm64_regs.x[2] );
680 dump_uint64( ",x3=", &ctx.integer.arm64_regs.x[3] );
681 dump_uint64( ",x4=", &ctx.integer.arm64_regs.x[4] );
682 dump_uint64( ",x5=", &ctx.integer.arm64_regs.x[5] );
683 dump_uint64( ",x6=", &ctx.integer.arm64_regs.x[6] );
684 dump_uint64( ",x7=", &ctx.integer.arm64_regs.x[7] );
685 dump_uint64( ",x8=", &ctx.integer.arm64_regs.x[8] );
686 dump_uint64( ",x9=", &ctx.integer.arm64_regs.x[9] );
687 dump_uint64( ",x10=", &ctx.integer.arm64_regs.x[10] );
688 dump_uint64( ",x11=", &ctx.integer.arm64_regs.x[11] );
689 dump_uint64( ",x12=", &ctx.integer.arm64_regs.x[12] );
690 dump_uint64( ",x13=", &ctx.integer.arm64_regs.x[13] );
691 dump_uint64( ",x14=", &ctx.integer.arm64_regs.x[14] );
692 dump_uint64( ",x15=", &ctx.integer.arm64_regs.x[15] );
693 dump_uint64( ",x16=", &ctx.integer.arm64_regs.x[16] );
694 dump_uint64( ",x17=", &ctx.integer.arm64_regs.x[17] );
695 dump_uint64( ",x18=", &ctx.integer.arm64_regs.x[18] );
696 dump_uint64( ",x19=", &ctx.integer.arm64_regs.x[19] );
697 dump_uint64( ",x20=", &ctx.integer.arm64_regs.x[20] );
698 dump_uint64( ",x21=", &ctx.integer.arm64_regs.x[21] );
699 dump_uint64( ",x22=", &ctx.integer.arm64_regs.x[22] );
700 dump_uint64( ",x23=", &ctx.integer.arm64_regs.x[23] );
701 dump_uint64( ",x24=", &ctx.integer.arm64_regs.x[24] );
702 dump_uint64( ",x25=", &ctx.integer.arm64_regs.x[25] );
703 dump_uint64( ",x26=", &ctx.integer.arm64_regs.x[26] );
704 dump_uint64( ",x27=", &ctx.integer.arm64_regs.x[27] );
705 dump_uint64( ",x28=", &ctx.integer.arm64_regs.x[28] );
706 dump_uint64( ",x29=", &ctx.integer.arm64_regs.x[29] );
707 dump_uint64( ",x30=", &ctx.integer.arm64_regs.x[30] );
709 break;
711 fputc( '}', stderr );
712 remove_data( size );
715 static void dump_varargs_debug_event( const char *prefix, data_size_t size )
717 debug_event_t event;
718 unsigned int i;
720 if (!size)
722 fprintf( stderr, "%s{}", prefix );
723 return;
725 size = min( size, sizeof(event) );
726 memset( &event, 0, sizeof(event) );
727 memcpy( &event, cur_data, size );
729 switch(event.code)
731 case EXCEPTION_DEBUG_EVENT:
732 fprintf( stderr, "%s{exception,first=%d,exc_code=%08x,flags=%08x", prefix,
733 event.exception.first, event.exception.exc_code, event.exception.flags );
734 dump_uint64( ",record=", &event.exception.record );
735 dump_uint64( ",address=", &event.exception.address );
736 fprintf( stderr, ",params={" );
737 event.exception.nb_params = min( event.exception.nb_params, EXCEPTION_MAXIMUM_PARAMETERS );
738 for (i = 0; i < event.exception.nb_params; i++)
740 dump_uint64( "", &event.exception.params[i] );
741 if (i < event.exception.nb_params) fputc( ',', stderr );
743 fprintf( stderr, "}}" );
744 break;
745 case CREATE_THREAD_DEBUG_EVENT:
746 fprintf( stderr, "%s{create_thread,thread=%04x", prefix, event.create_thread.handle );
747 dump_uint64( ",teb=", &event.create_thread.teb );
748 dump_uint64( ",start=", &event.create_thread.start );
749 fputc( '}', stderr );
750 break;
751 case CREATE_PROCESS_DEBUG_EVENT:
752 fprintf( stderr, "%s{create_process,file=%04x,process=%04x,thread=%04x", prefix,
753 event.create_process.file, event.create_process.process,
754 event.create_process.thread );
755 dump_uint64( ",base=", &event.create_process.base );
756 fprintf( stderr, ",offset=%d,size=%d",
757 event.create_process.dbg_offset, event.create_process.dbg_size );
758 dump_uint64( ",teb=", &event.create_process.teb );
759 dump_uint64( ",start=", &event.create_process.start );
760 dump_uint64( ",name=", &event.create_process.name );
761 fprintf( stderr, ",unicode=%d}", event.create_process.unicode );
762 break;
763 case EXIT_THREAD_DEBUG_EVENT:
764 fprintf( stderr, "%s{exit_thread,code=%d}", prefix, event.exit.exit_code );
765 break;
766 case EXIT_PROCESS_DEBUG_EVENT:
767 fprintf( stderr, "%s{exit_process,code=%d}", prefix, event.exit.exit_code );
768 break;
769 case LOAD_DLL_DEBUG_EVENT:
770 fprintf( stderr, "%s{load_dll,file=%04x", prefix, event.load_dll.handle );
771 dump_uint64( ",base=", &event.load_dll.base );
772 fprintf( stderr, ",offset=%d,size=%d",
773 event.load_dll.dbg_offset, event.load_dll.dbg_size );
774 dump_uint64( ",name=", &event.load_dll.name );
775 fprintf( stderr, ",unicode=%d}", event.load_dll.unicode );
776 break;
777 case UNLOAD_DLL_DEBUG_EVENT:
778 fprintf( stderr, "%s{unload_dll", prefix );
779 dump_uint64( ",base=", &event.unload_dll.base );
780 fputc( '}', stderr );
781 break;
782 case 0: /* zero is the code returned on timeouts */
783 fprintf( stderr, "%s{}", prefix );
784 break;
785 default:
786 fprintf( stderr, "%s{code=??? (%d)}", prefix, event.code );
787 break;
789 remove_data( size );
792 /* dump a unicode string contained in a buffer; helper for dump_varargs_startup_info */
793 static data_size_t dump_inline_unicode_string( const char *prefix, data_size_t pos, data_size_t len, data_size_t total_size )
795 fputs( prefix, stderr );
796 if (pos >= total_size) return pos;
797 if (len > total_size - pos) len = total_size - pos;
798 len /= sizeof(WCHAR);
799 dump_strW( (const WCHAR *)cur_data + pos/sizeof(WCHAR), len, stderr, "\"\"" );
800 return pos + len * sizeof(WCHAR);
803 static void dump_varargs_startup_info( const char *prefix, data_size_t size )
805 startup_info_t info;
806 data_size_t pos = sizeof(info);
808 memset( &info, 0, sizeof(info) );
809 memcpy( &info, cur_data, min( size, sizeof(info) ));
811 fprintf( stderr,
812 "%s{debug_flags=%x,console_flags=%x,console=%04x,hstdin=%04x,hstdout=%04x,hstderr=%04x,"
813 "x=%u,y=%u,xsize=%u,ysize=%u,xchars=%u,ychars=%u,attribute=%02x,flags=%x,show=%u",
814 prefix, info.debug_flags, info.console_flags, info.console,
815 info.hstdin, info.hstdout, info.hstderr, info.x, info.y, info.xsize, info.ysize,
816 info.xchars, info.ychars, info.attribute, info.flags, info.show );
817 pos = dump_inline_unicode_string( ",curdir=L\"", pos, info.curdir_len, size );
818 pos = dump_inline_unicode_string( "\",dllpath=L\"", pos, info.dllpath_len, size );
819 pos = dump_inline_unicode_string( "\",imagepath=L\"", pos, info.imagepath_len, size );
820 pos = dump_inline_unicode_string( "\",cmdline=L\"", pos, info.cmdline_len, size );
821 pos = dump_inline_unicode_string( "\",title=L\"", pos, info.title_len, size );
822 pos = dump_inline_unicode_string( "\",desktop=L\"", pos, info.desktop_len, size );
823 pos = dump_inline_unicode_string( "\",shellinfo=L\"", pos, info.shellinfo_len, size );
824 pos = dump_inline_unicode_string( "\",runtime=L\"", pos, info.runtime_len, size );
825 fprintf( stderr, "\"}" );
826 remove_data( size );
829 static void dump_varargs_input_records( const char *prefix, data_size_t size )
831 const INPUT_RECORD *rec = cur_data;
832 data_size_t len = size / sizeof(*rec);
834 fprintf( stderr,"%s{", prefix );
835 while (len > 0)
837 fprintf( stderr, "{%04x,...}", rec->EventType );
838 rec++;
839 if (--len) fputc( ',', stderr );
841 fputc( '}', stderr );
842 remove_data( size );
845 static void dump_varargs_rectangles( const char *prefix, data_size_t size )
847 const rectangle_t *rect = cur_data;
848 data_size_t len = size / sizeof(*rect);
850 fprintf( stderr,"%s{", prefix );
851 while (len > 0)
853 dump_rectangle( "", rect++ );
854 if (--len) fputc( ',', stderr );
856 fputc( '}', stderr );
857 remove_data( size );
860 static void dump_varargs_message_data( const char *prefix, data_size_t size )
862 /* FIXME: dump the structured data */
863 dump_varargs_bytes( prefix, size );
866 static void dump_varargs_properties( const char *prefix, data_size_t size )
868 const property_data_t *prop = cur_data;
869 data_size_t len = size / sizeof(*prop);
871 fprintf( stderr,"%s{", prefix );
872 while (len > 0)
874 fprintf( stderr, "{atom=%04x,str=%d", prop->atom, prop->string );
875 dump_uint64( ",data=", &prop->data );
876 fputc( '}', stderr );
877 prop++;
878 if (--len) fputc( ',', stderr );
880 fputc( '}', stderr );
881 remove_data( size );
884 static void dump_varargs_LUID_AND_ATTRIBUTES( const char *prefix, data_size_t size )
886 const LUID_AND_ATTRIBUTES *lat = cur_data;
887 data_size_t len = size / sizeof(*lat);
889 fprintf( stderr,"%s{", prefix );
890 while (len > 0)
892 fprintf( stderr, "{luid=%08x%08x,attr=%x}",
893 lat->Luid.HighPart, lat->Luid.LowPart, lat->Attributes );
894 lat++;
895 if (--len) fputc( ',', stderr );
897 fputc( '}', stderr );
898 remove_data( size );
901 static void dump_inline_sid( const char *prefix, const SID *sid, data_size_t size )
903 DWORD i;
905 /* security check */
906 if ((FIELD_OFFSET(SID, SubAuthority[0]) > size) ||
907 (FIELD_OFFSET(SID, SubAuthority[sid->SubAuthorityCount]) > size))
909 fprintf( stderr, "<invalid sid>" );
910 return;
913 fprintf( stderr,"%s{", prefix );
914 fprintf( stderr, "S-%u-%u", sid->Revision, MAKELONG(
915 MAKEWORD( sid->IdentifierAuthority.Value[5],
916 sid->IdentifierAuthority.Value[4] ),
917 MAKEWORD( sid->IdentifierAuthority.Value[3],
918 sid->IdentifierAuthority.Value[2] ) ) );
919 for (i = 0; i < sid->SubAuthorityCount; i++)
920 fprintf( stderr, "-%u", sid->SubAuthority[i] );
921 fputc( '}', stderr );
924 static void dump_varargs_SID( const char *prefix, data_size_t size )
926 const SID *sid = cur_data;
927 dump_inline_sid( prefix, sid, size );
928 remove_data( size );
931 static void dump_inline_acl( const char *prefix, const ACL *acl, data_size_t size )
933 const ACE_HEADER *ace;
934 ULONG i;
936 fprintf( stderr,"%s{", prefix );
937 if (size)
939 if (size < sizeof(ACL))
941 fprintf( stderr, "<invalid acl>}" );
942 return;
944 size -= sizeof(ACL);
945 ace = (const ACE_HEADER *)(acl + 1);
946 for (i = 0; i < acl->AceCount; i++)
948 const SID *sid = NULL;
949 data_size_t sid_size = 0;
951 if (size < sizeof(ACE_HEADER) || size < ace->AceSize) break;
952 size -= ace->AceSize;
953 if (i != 0) fputc( ',', stderr );
954 fprintf( stderr, "{AceType=" );
955 switch (ace->AceType)
957 case ACCESS_DENIED_ACE_TYPE:
958 sid = (const SID *)&((const ACCESS_DENIED_ACE *)ace)->SidStart;
959 sid_size = ace->AceSize - FIELD_OFFSET(ACCESS_DENIED_ACE, SidStart);
960 fprintf( stderr, "ACCESS_DENIED_ACE_TYPE,Mask=%x",
961 ((const ACCESS_DENIED_ACE *)ace)->Mask );
962 break;
963 case ACCESS_ALLOWED_ACE_TYPE:
964 sid = (const SID *)&((const ACCESS_ALLOWED_ACE *)ace)->SidStart;
965 sid_size = ace->AceSize - FIELD_OFFSET(ACCESS_ALLOWED_ACE, SidStart);
966 fprintf( stderr, "ACCESS_ALLOWED_ACE_TYPE,Mask=%x",
967 ((const ACCESS_ALLOWED_ACE *)ace)->Mask );
968 break;
969 case SYSTEM_AUDIT_ACE_TYPE:
970 sid = (const SID *)&((const SYSTEM_AUDIT_ACE *)ace)->SidStart;
971 sid_size = ace->AceSize - FIELD_OFFSET(SYSTEM_AUDIT_ACE, SidStart);
972 fprintf( stderr, "SYSTEM_AUDIT_ACE_TYPE,Mask=%x",
973 ((const SYSTEM_AUDIT_ACE *)ace)->Mask );
974 break;
975 case SYSTEM_ALARM_ACE_TYPE:
976 sid = (const SID *)&((const SYSTEM_ALARM_ACE *)ace)->SidStart;
977 sid_size = ace->AceSize - FIELD_OFFSET(SYSTEM_ALARM_ACE, SidStart);
978 fprintf( stderr, "SYSTEM_ALARM_ACE_TYPE,Mask=%x",
979 ((const SYSTEM_ALARM_ACE *)ace)->Mask );
980 break;
981 case SYSTEM_MANDATORY_LABEL_ACE_TYPE:
982 sid = (const SID *)&((const SYSTEM_MANDATORY_LABEL_ACE *)ace)->SidStart;
983 sid_size = ace->AceSize - FIELD_OFFSET(SYSTEM_MANDATORY_LABEL_ACE, SidStart);
984 fprintf( stderr, "SYSTEM_MANDATORY_LABEL_ACE_TYPE,Mask=%x",
985 ((const SYSTEM_MANDATORY_LABEL_ACE *)ace)->Mask );
986 break;
987 default:
988 fprintf( stderr, "unknown<%d>", ace->AceType );
989 break;
991 fprintf( stderr, ",AceFlags=%x", ace->AceFlags );
992 if (sid)
993 dump_inline_sid( ",Sid=", sid, sid_size );
994 ace = (const ACE_HEADER *)((const char *)ace + ace->AceSize);
995 fputc( '}', stderr );
998 fputc( '}', stderr );
1001 static void dump_varargs_ACL( const char *prefix, data_size_t size )
1003 const ACL *acl = cur_data;
1004 dump_inline_acl( prefix, acl, size );
1005 remove_data( size );
1008 static void dump_inline_security_descriptor( const char *prefix, const struct security_descriptor *sd, data_size_t size )
1010 fprintf( stderr,"%s{", prefix );
1011 if (size >= sizeof(struct security_descriptor))
1013 size_t offset = sizeof(struct security_descriptor);
1014 fprintf( stderr, "control=%08x", sd->control );
1015 if ((sd->owner_len > FIELD_OFFSET(SID, SubAuthority[255])) || (offset + sd->owner_len > size))
1016 return;
1017 if (sd->owner_len)
1018 dump_inline_sid( ",owner=", (const SID *)((const char *)sd + offset), sd->owner_len );
1019 else
1020 fprintf( stderr, ",owner=<not present>" );
1021 offset += sd->owner_len;
1022 if ((sd->group_len > FIELD_OFFSET(SID, SubAuthority[255])) || (offset + sd->group_len > size))
1023 return;
1024 if (sd->group_len)
1025 dump_inline_sid( ",group=", (const SID *)((const char *)sd + offset), sd->group_len );
1026 else
1027 fprintf( stderr, ",group=<not present>" );
1028 offset += sd->group_len;
1029 if ((sd->sacl_len >= MAX_ACL_LEN) || (offset + sd->sacl_len > size))
1030 return;
1031 dump_inline_acl( ",sacl=", (const ACL *)((const char *)sd + offset), sd->sacl_len );
1032 offset += sd->sacl_len;
1033 if ((sd->dacl_len >= MAX_ACL_LEN) || (offset + sd->dacl_len > size))
1034 return;
1035 dump_inline_acl( ",dacl=", (const ACL *)((const char *)sd + offset), sd->dacl_len );
1036 offset += sd->dacl_len;
1038 fputc( '}', stderr );
1041 static void dump_varargs_security_descriptor( const char *prefix, data_size_t size )
1043 const struct security_descriptor *sd = cur_data;
1044 dump_inline_security_descriptor( prefix, sd, size );
1045 remove_data( size );
1048 static void dump_varargs_token_groups( const char *prefix, data_size_t size )
1050 const struct token_groups *tg = cur_data;
1052 fprintf( stderr,"%s{", prefix );
1053 if (size >= sizeof(struct token_groups))
1055 size_t offset = sizeof(*tg);
1056 fprintf( stderr, "count=%08x,", tg->count );
1057 if (tg->count * sizeof(unsigned int) <= size)
1059 unsigned int i;
1060 const unsigned int *attr = (const unsigned int *)(tg + 1);
1062 offset += tg->count * sizeof(unsigned int);
1064 fputc( '[', stderr );
1065 for (i = 0; i < tg->count; i++)
1067 const SID *sid = (const SID *)((const char *)cur_data + offset);
1068 if (i != 0)
1069 fputc( ',', stderr );
1070 fputc( '{', stderr );
1071 fprintf( stderr, "attributes=%08x", attr[i] );
1072 dump_inline_sid( ",sid=", sid, size - offset );
1073 if ((offset + FIELD_OFFSET(SID, SubAuthority[0]) > size) ||
1074 (offset + FIELD_OFFSET(SID, SubAuthority[sid->SubAuthorityCount]) > size))
1075 break;
1076 offset += FIELD_OFFSET(SID, SubAuthority[sid->SubAuthorityCount]);
1077 fputc( '}', stderr );
1079 fputc( ']', stderr );
1082 fputc( '}', stderr );
1085 static void dump_varargs_object_attributes( const char *prefix, data_size_t size )
1087 const struct object_attributes *objattr = cur_data;
1089 fprintf( stderr,"%s{", prefix );
1090 if (size)
1092 const WCHAR *str;
1094 if (size < sizeof(*objattr) ||
1095 (size - sizeof(*objattr) < objattr->sd_len) ||
1096 (size - sizeof(*objattr) - objattr->sd_len < objattr->name_len))
1098 fprintf( stderr, "***invalid***}" );
1099 remove_data( size );
1100 return;
1103 fprintf( stderr, "rootdir=%04x,attributes=%08x", objattr->rootdir, objattr->attributes );
1104 dump_inline_security_descriptor( ",sd=", (const struct security_descriptor *)(objattr + 1), objattr->sd_len );
1105 str = (const WCHAR *)objattr + (sizeof(*objattr) + objattr->sd_len) / sizeof(WCHAR);
1106 fprintf( stderr, ",name=L\"" );
1107 dump_strW( str, objattr->name_len / sizeof(WCHAR), stderr, "\"\"" );
1108 fputc( '\"', stderr );
1109 remove_data( ((sizeof(*objattr) + objattr->sd_len) / sizeof(WCHAR)) * sizeof(WCHAR) +
1110 (objattr->name_len / sizeof(WCHAR)) * sizeof(WCHAR) );
1112 fputc( '}', stderr );
1115 static void dump_varargs_filesystem_event( const char *prefix, data_size_t size )
1117 static const char * const actions[] = {
1118 NULL,
1119 "ADDED",
1120 "REMOVED",
1121 "MODIFIED",
1122 "RENAMED_OLD_NAME",
1123 "RENAMED_NEW_NAME",
1124 "ADDED_STREAM",
1125 "REMOVED_STREAM",
1126 "MODIFIED_STREAM"
1129 fprintf( stderr,"%s{", prefix );
1130 while (size)
1132 const struct filesystem_event *event = cur_data;
1133 data_size_t len = (offsetof( struct filesystem_event, name[event->len] ) + sizeof(int)-1)
1134 / sizeof(int) * sizeof(int);
1135 if (size < len) break;
1136 if (event->action < sizeof(actions)/sizeof(actions[0]) && actions[event->action])
1137 fprintf( stderr, "{action=%s", actions[event->action] );
1138 else
1139 fprintf( stderr, "{action=%u", event->action );
1140 fprintf( stderr, ",name=\"%.*s\"}", event->len, event->name );
1141 size -= len;
1142 remove_data( len );
1143 if (size)fputc( ',', stderr );
1145 fputc( '}', stderr );
1148 static void dump_varargs_pe_image_info( const char *prefix, data_size_t size )
1150 pe_image_info_t info;
1152 if (!size)
1154 fprintf( stderr, "%s{}", prefix );
1155 return;
1157 memset( &info, 0, sizeof(info) );
1158 memcpy( &info, cur_data, min( size, sizeof(info) ));
1160 fprintf( stderr, "%s{", prefix );
1161 dump_uint64( "base=", &info.base );
1162 dump_uint64( ",entry_point=", &info.entry_point );
1163 dump_uint64( ",map_size=", &info.map_size );
1164 dump_uint64( ",stack_size=", &info.stack_size );
1165 dump_uint64( ",stack_commit=", &info.stack_commit );
1166 fprintf( stderr, ",zerobits=%08x,subsystem=%08x,subsystem_low=%04x,subsystem_high=%04x,gp=%08x"
1167 ",image_charact=%04x,dll_charact=%04x,machine=%04x,contains_code=%u,image_flags=%02x"
1168 ",loader_flags=%08x,header_size=%08x,file_size=%08x,checksum=%08x}",
1169 info.zerobits, info.subsystem, info.subsystem_low, info.subsystem_high, info.gp,
1170 info.image_charact, info.dll_charact, info.machine, info.contains_code, info.image_flags,
1171 info.loader_flags, info.header_size, info.file_size, info.checksum );
1172 remove_data( size );
1175 static void dump_varargs_rawinput_devices(const char *prefix, data_size_t size )
1177 const struct rawinput_device *device;
1179 fprintf( stderr, "%s{", prefix );
1180 while (size >= sizeof(*device))
1182 device = cur_data;
1183 fprintf( stderr, "{usage_page=%04x,usage=%04x,flags=%08x,target=%08x}",
1184 device->usage_page, device->usage, device->flags, device->target );
1185 size -= sizeof(*device);
1186 remove_data( sizeof(*device) );
1187 if (size) fputc( ',', stderr );
1189 fputc( '}', stderr );
1192 static void dump_varargs_handle_infos( const char *prefix, data_size_t size )
1194 const struct handle_info *handle;
1196 fprintf( stderr, "%s{", prefix );
1197 while (size >= sizeof(*handle))
1199 handle = cur_data;
1200 fprintf( stderr, "{owner=%04x,handle=%04x,access=%08x}",
1201 handle->owner, handle->handle, handle->access );
1202 size -= sizeof(*handle);
1203 remove_data( sizeof(*handle) );
1204 if (size) fputc( ',', stderr );
1206 fputc( '}', stderr );
1209 typedef void (*dump_func)( const void *req );
1211 /* Everything below this line is generated automatically by tools/make_requests */
1212 /* ### make_requests begin ### */
1214 static void dump_new_process_request( const struct new_process_request *req )
1216 fprintf( stderr, " inherit_all=%d", req->inherit_all );
1217 fprintf( stderr, ", create_flags=%08x", req->create_flags );
1218 fprintf( stderr, ", socket_fd=%d", req->socket_fd );
1219 fprintf( stderr, ", exe_file=%04x", req->exe_file );
1220 fprintf( stderr, ", process_access=%08x", req->process_access );
1221 fprintf( stderr, ", process_attr=%08x", req->process_attr );
1222 fprintf( stderr, ", thread_access=%08x", req->thread_access );
1223 fprintf( stderr, ", thread_attr=%08x", req->thread_attr );
1224 dump_cpu_type( ", cpu=", &req->cpu );
1225 fprintf( stderr, ", info_size=%u", req->info_size );
1226 dump_varargs_startup_info( ", info=", min(cur_size,req->info_size) );
1227 dump_varargs_unicode_str( ", env=", cur_size );
1230 static void dump_new_process_reply( const struct new_process_reply *req )
1232 fprintf( stderr, " info=%04x", req->info );
1233 fprintf( stderr, ", pid=%04x", req->pid );
1234 fprintf( stderr, ", phandle=%04x", req->phandle );
1235 fprintf( stderr, ", tid=%04x", req->tid );
1236 fprintf( stderr, ", thandle=%04x", req->thandle );
1239 static void dump_get_new_process_info_request( const struct get_new_process_info_request *req )
1241 fprintf( stderr, " info=%04x", req->info );
1244 static void dump_get_new_process_info_reply( const struct get_new_process_info_reply *req )
1246 fprintf( stderr, " success=%d", req->success );
1247 fprintf( stderr, ", exit_code=%d", req->exit_code );
1250 static void dump_new_thread_request( const struct new_thread_request *req )
1252 fprintf( stderr, " access=%08x", req->access );
1253 fprintf( stderr, ", attributes=%08x", req->attributes );
1254 fprintf( stderr, ", suspend=%d", req->suspend );
1255 fprintf( stderr, ", request_fd=%d", req->request_fd );
1258 static void dump_new_thread_reply( const struct new_thread_reply *req )
1260 fprintf( stderr, " tid=%04x", req->tid );
1261 fprintf( stderr, ", handle=%04x", req->handle );
1264 static void dump_get_startup_info_request( const struct get_startup_info_request *req )
1268 static void dump_get_startup_info_reply( const struct get_startup_info_reply *req )
1270 fprintf( stderr, " exe_file=%04x", req->exe_file );
1271 fprintf( stderr, ", info_size=%u", req->info_size );
1272 dump_varargs_startup_info( ", info=", min(cur_size,req->info_size) );
1273 dump_varargs_unicode_str( ", env=", cur_size );
1276 static void dump_init_process_done_request( const struct init_process_done_request *req )
1278 fprintf( stderr, " gui=%d", req->gui );
1279 dump_uint64( ", module=", &req->module );
1280 dump_uint64( ", ldt_copy=", &req->ldt_copy );
1281 dump_uint64( ", entry=", &req->entry );
1284 static void dump_init_thread_request( const struct init_thread_request *req )
1286 fprintf( stderr, " unix_pid=%d", req->unix_pid );
1287 fprintf( stderr, ", unix_tid=%d", req->unix_tid );
1288 fprintf( stderr, ", debug_level=%d", req->debug_level );
1289 dump_uint64( ", teb=", &req->teb );
1290 dump_uint64( ", entry=", &req->entry );
1291 fprintf( stderr, ", reply_fd=%d", req->reply_fd );
1292 fprintf( stderr, ", wait_fd=%d", req->wait_fd );
1293 dump_cpu_type( ", cpu=", &req->cpu );
1296 static void dump_init_thread_reply( const struct init_thread_reply *req )
1298 fprintf( stderr, " pid=%04x", req->pid );
1299 fprintf( stderr, ", tid=%04x", req->tid );
1300 dump_timeout( ", server_start=", &req->server_start );
1301 fprintf( stderr, ", info_size=%u", req->info_size );
1302 fprintf( stderr, ", version=%d", req->version );
1303 fprintf( stderr, ", all_cpus=%08x", req->all_cpus );
1306 static void dump_terminate_process_request( const struct terminate_process_request *req )
1308 fprintf( stderr, " handle=%04x", req->handle );
1309 fprintf( stderr, ", exit_code=%d", req->exit_code );
1312 static void dump_terminate_process_reply( const struct terminate_process_reply *req )
1314 fprintf( stderr, " self=%d", req->self );
1317 static void dump_terminate_thread_request( const struct terminate_thread_request *req )
1319 fprintf( stderr, " handle=%04x", req->handle );
1320 fprintf( stderr, ", exit_code=%d", req->exit_code );
1323 static void dump_terminate_thread_reply( const struct terminate_thread_reply *req )
1325 fprintf( stderr, " self=%d", req->self );
1326 fprintf( stderr, ", last=%d", req->last );
1329 static void dump_get_process_info_request( const struct get_process_info_request *req )
1331 fprintf( stderr, " handle=%04x", req->handle );
1334 static void dump_get_process_info_reply( const struct get_process_info_reply *req )
1336 fprintf( stderr, " pid=%04x", req->pid );
1337 fprintf( stderr, ", ppid=%04x", req->ppid );
1338 dump_uint64( ", affinity=", &req->affinity );
1339 dump_uint64( ", peb=", &req->peb );
1340 dump_timeout( ", start_time=", &req->start_time );
1341 dump_timeout( ", end_time=", &req->end_time );
1342 fprintf( stderr, ", exit_code=%d", req->exit_code );
1343 fprintf( stderr, ", priority=%d", req->priority );
1344 dump_cpu_type( ", cpu=", &req->cpu );
1345 fprintf( stderr, ", debugger_present=%d", req->debugger_present );
1346 fprintf( stderr, ", debug_children=%d", req->debug_children );
1349 static void dump_get_process_vm_counters_request( const struct get_process_vm_counters_request *req )
1351 fprintf( stderr, " handle=%04x", req->handle );
1354 static void dump_get_process_vm_counters_reply( const struct get_process_vm_counters_reply *req )
1356 dump_uint64( " peak_virtual_size=", &req->peak_virtual_size );
1357 dump_uint64( ", virtual_size=", &req->virtual_size );
1358 dump_uint64( ", peak_working_set_size=", &req->peak_working_set_size );
1359 dump_uint64( ", working_set_size=", &req->working_set_size );
1360 dump_uint64( ", pagefile_usage=", &req->pagefile_usage );
1361 dump_uint64( ", peak_pagefile_usage=", &req->peak_pagefile_usage );
1364 static void dump_set_process_info_request( const struct set_process_info_request *req )
1366 fprintf( stderr, " handle=%04x", req->handle );
1367 fprintf( stderr, ", mask=%d", req->mask );
1368 fprintf( stderr, ", priority=%d", req->priority );
1369 dump_uint64( ", affinity=", &req->affinity );
1372 static void dump_get_thread_info_request( const struct get_thread_info_request *req )
1374 fprintf( stderr, " handle=%04x", req->handle );
1375 fprintf( stderr, ", tid_in=%04x", req->tid_in );
1378 static void dump_get_thread_info_reply( const struct get_thread_info_reply *req )
1380 fprintf( stderr, " pid=%04x", req->pid );
1381 fprintf( stderr, ", tid=%04x", req->tid );
1382 dump_uint64( ", teb=", &req->teb );
1383 dump_uint64( ", entry_point=", &req->entry_point );
1384 dump_uint64( ", affinity=", &req->affinity );
1385 fprintf( stderr, ", exit_code=%d", req->exit_code );
1386 fprintf( stderr, ", priority=%d", req->priority );
1387 fprintf( stderr, ", last=%d", req->last );
1390 static void dump_get_thread_times_request( const struct get_thread_times_request *req )
1392 fprintf( stderr, " handle=%04x", req->handle );
1395 static void dump_get_thread_times_reply( const struct get_thread_times_reply *req )
1397 dump_timeout( " creation_time=", &req->creation_time );
1398 dump_timeout( ", exit_time=", &req->exit_time );
1401 static void dump_set_thread_info_request( const struct set_thread_info_request *req )
1403 fprintf( stderr, " handle=%04x", req->handle );
1404 fprintf( stderr, ", mask=%d", req->mask );
1405 fprintf( stderr, ", priority=%d", req->priority );
1406 dump_uint64( ", affinity=", &req->affinity );
1407 dump_uint64( ", entry_point=", &req->entry_point );
1408 fprintf( stderr, ", token=%04x", req->token );
1411 static void dump_get_dll_info_request( const struct get_dll_info_request *req )
1413 fprintf( stderr, " handle=%04x", req->handle );
1414 dump_uint64( ", base_address=", &req->base_address );
1417 static void dump_get_dll_info_reply( const struct get_dll_info_reply *req )
1419 dump_uint64( " entry_point=", &req->entry_point );
1420 fprintf( stderr, ", size=%u", req->size );
1421 fprintf( stderr, ", filename_len=%u", req->filename_len );
1422 dump_varargs_unicode_str( ", filename=", cur_size );
1425 static void dump_suspend_thread_request( const struct suspend_thread_request *req )
1427 fprintf( stderr, " handle=%04x", req->handle );
1430 static void dump_suspend_thread_reply( const struct suspend_thread_reply *req )
1432 fprintf( stderr, " count=%d", req->count );
1435 static void dump_resume_thread_request( const struct resume_thread_request *req )
1437 fprintf( stderr, " handle=%04x", req->handle );
1440 static void dump_resume_thread_reply( const struct resume_thread_reply *req )
1442 fprintf( stderr, " count=%d", req->count );
1445 static void dump_load_dll_request( const struct load_dll_request *req )
1447 fprintf( stderr, " mapping=%04x", req->mapping );
1448 dump_uint64( ", base=", &req->base );
1449 dump_uint64( ", name=", &req->name );
1450 fprintf( stderr, ", size=%u", req->size );
1451 fprintf( stderr, ", dbg_offset=%d", req->dbg_offset );
1452 fprintf( stderr, ", dbg_size=%d", req->dbg_size );
1453 dump_varargs_unicode_str( ", filename=", cur_size );
1456 static void dump_unload_dll_request( const struct unload_dll_request *req )
1458 dump_uint64( " base=", &req->base );
1461 static void dump_queue_apc_request( const struct queue_apc_request *req )
1463 fprintf( stderr, " handle=%04x", req->handle );
1464 dump_apc_call( ", call=", &req->call );
1467 static void dump_queue_apc_reply( const struct queue_apc_reply *req )
1469 fprintf( stderr, " handle=%04x", req->handle );
1470 fprintf( stderr, ", self=%d", req->self );
1473 static void dump_get_apc_result_request( const struct get_apc_result_request *req )
1475 fprintf( stderr, " handle=%04x", req->handle );
1478 static void dump_get_apc_result_reply( const struct get_apc_result_reply *req )
1480 dump_apc_result( " result=", &req->result );
1483 static void dump_close_handle_request( const struct close_handle_request *req )
1485 fprintf( stderr, " handle=%04x", req->handle );
1488 static void dump_set_handle_info_request( const struct set_handle_info_request *req )
1490 fprintf( stderr, " handle=%04x", req->handle );
1491 fprintf( stderr, ", flags=%d", req->flags );
1492 fprintf( stderr, ", mask=%d", req->mask );
1495 static void dump_set_handle_info_reply( const struct set_handle_info_reply *req )
1497 fprintf( stderr, " old_flags=%d", req->old_flags );
1500 static void dump_dup_handle_request( const struct dup_handle_request *req )
1502 fprintf( stderr, " src_process=%04x", req->src_process );
1503 fprintf( stderr, ", src_handle=%04x", req->src_handle );
1504 fprintf( stderr, ", dst_process=%04x", req->dst_process );
1505 fprintf( stderr, ", access=%08x", req->access );
1506 fprintf( stderr, ", attributes=%08x", req->attributes );
1507 fprintf( stderr, ", options=%08x", req->options );
1510 static void dump_dup_handle_reply( const struct dup_handle_reply *req )
1512 fprintf( stderr, " handle=%04x", req->handle );
1513 fprintf( stderr, ", self=%d", req->self );
1514 fprintf( stderr, ", closed=%d", req->closed );
1517 static void dump_open_process_request( const struct open_process_request *req )
1519 fprintf( stderr, " pid=%04x", req->pid );
1520 fprintf( stderr, ", access=%08x", req->access );
1521 fprintf( stderr, ", attributes=%08x", req->attributes );
1524 static void dump_open_process_reply( const struct open_process_reply *req )
1526 fprintf( stderr, " handle=%04x", req->handle );
1529 static void dump_open_thread_request( const struct open_thread_request *req )
1531 fprintf( stderr, " tid=%04x", req->tid );
1532 fprintf( stderr, ", access=%08x", req->access );
1533 fprintf( stderr, ", attributes=%08x", req->attributes );
1536 static void dump_open_thread_reply( const struct open_thread_reply *req )
1538 fprintf( stderr, " handle=%04x", req->handle );
1541 static void dump_select_request( const struct select_request *req )
1543 fprintf( stderr, " flags=%d", req->flags );
1544 dump_uint64( ", cookie=", &req->cookie );
1545 dump_timeout( ", timeout=", &req->timeout );
1546 fprintf( stderr, ", prev_apc=%04x", req->prev_apc );
1547 dump_varargs_apc_result( ", result=", cur_size );
1548 dump_varargs_select_op( ", data=", cur_size );
1551 static void dump_select_reply( const struct select_reply *req )
1553 dump_timeout( " timeout=", &req->timeout );
1554 dump_apc_call( ", call=", &req->call );
1555 fprintf( stderr, ", apc_handle=%04x", req->apc_handle );
1558 static void dump_create_event_request( const struct create_event_request *req )
1560 fprintf( stderr, " access=%08x", req->access );
1561 fprintf( stderr, ", manual_reset=%d", req->manual_reset );
1562 fprintf( stderr, ", initial_state=%d", req->initial_state );
1563 dump_varargs_object_attributes( ", objattr=", cur_size );
1566 static void dump_create_event_reply( const struct create_event_reply *req )
1568 fprintf( stderr, " handle=%04x", req->handle );
1571 static void dump_event_op_request( const struct event_op_request *req )
1573 fprintf( stderr, " handle=%04x", req->handle );
1574 fprintf( stderr, ", op=%d", req->op );
1577 static void dump_query_event_request( const struct query_event_request *req )
1579 fprintf( stderr, " handle=%04x", req->handle );
1582 static void dump_query_event_reply( const struct query_event_reply *req )
1584 fprintf( stderr, " manual_reset=%d", req->manual_reset );
1585 fprintf( stderr, ", state=%d", req->state );
1588 static void dump_open_event_request( const struct open_event_request *req )
1590 fprintf( stderr, " access=%08x", req->access );
1591 fprintf( stderr, ", attributes=%08x", req->attributes );
1592 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1593 dump_varargs_unicode_str( ", name=", cur_size );
1596 static void dump_open_event_reply( const struct open_event_reply *req )
1598 fprintf( stderr, " handle=%04x", req->handle );
1601 static void dump_create_keyed_event_request( const struct create_keyed_event_request *req )
1603 fprintf( stderr, " access=%08x", req->access );
1604 dump_varargs_object_attributes( ", objattr=", cur_size );
1607 static void dump_create_keyed_event_reply( const struct create_keyed_event_reply *req )
1609 fprintf( stderr, " handle=%04x", req->handle );
1612 static void dump_open_keyed_event_request( const struct open_keyed_event_request *req )
1614 fprintf( stderr, " access=%08x", req->access );
1615 fprintf( stderr, ", attributes=%08x", req->attributes );
1616 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1617 dump_varargs_unicode_str( ", name=", cur_size );
1620 static void dump_open_keyed_event_reply( const struct open_keyed_event_reply *req )
1622 fprintf( stderr, " handle=%04x", req->handle );
1625 static void dump_create_mutex_request( const struct create_mutex_request *req )
1627 fprintf( stderr, " access=%08x", req->access );
1628 fprintf( stderr, ", owned=%d", req->owned );
1629 dump_varargs_object_attributes( ", objattr=", cur_size );
1632 static void dump_create_mutex_reply( const struct create_mutex_reply *req )
1634 fprintf( stderr, " handle=%04x", req->handle );
1637 static void dump_release_mutex_request( const struct release_mutex_request *req )
1639 fprintf( stderr, " handle=%04x", req->handle );
1642 static void dump_release_mutex_reply( const struct release_mutex_reply *req )
1644 fprintf( stderr, " prev_count=%08x", req->prev_count );
1647 static void dump_open_mutex_request( const struct open_mutex_request *req )
1649 fprintf( stderr, " access=%08x", req->access );
1650 fprintf( stderr, ", attributes=%08x", req->attributes );
1651 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1652 dump_varargs_unicode_str( ", name=", cur_size );
1655 static void dump_open_mutex_reply( const struct open_mutex_reply *req )
1657 fprintf( stderr, " handle=%04x", req->handle );
1660 static void dump_query_mutex_request( const struct query_mutex_request *req )
1662 fprintf( stderr, " handle=%04x", req->handle );
1665 static void dump_query_mutex_reply( const struct query_mutex_reply *req )
1667 fprintf( stderr, " count=%08x", req->count );
1668 fprintf( stderr, ", owned=%d", req->owned );
1669 fprintf( stderr, ", abandoned=%d", req->abandoned );
1672 static void dump_create_semaphore_request( const struct create_semaphore_request *req )
1674 fprintf( stderr, " access=%08x", req->access );
1675 fprintf( stderr, ", initial=%08x", req->initial );
1676 fprintf( stderr, ", max=%08x", req->max );
1677 dump_varargs_object_attributes( ", objattr=", cur_size );
1680 static void dump_create_semaphore_reply( const struct create_semaphore_reply *req )
1682 fprintf( stderr, " handle=%04x", req->handle );
1685 static void dump_release_semaphore_request( const struct release_semaphore_request *req )
1687 fprintf( stderr, " handle=%04x", req->handle );
1688 fprintf( stderr, ", count=%08x", req->count );
1691 static void dump_release_semaphore_reply( const struct release_semaphore_reply *req )
1693 fprintf( stderr, " prev_count=%08x", req->prev_count );
1696 static void dump_query_semaphore_request( const struct query_semaphore_request *req )
1698 fprintf( stderr, " handle=%04x", req->handle );
1701 static void dump_query_semaphore_reply( const struct query_semaphore_reply *req )
1703 fprintf( stderr, " current=%08x", req->current );
1704 fprintf( stderr, ", max=%08x", req->max );
1707 static void dump_open_semaphore_request( const struct open_semaphore_request *req )
1709 fprintf( stderr, " access=%08x", req->access );
1710 fprintf( stderr, ", attributes=%08x", req->attributes );
1711 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1712 dump_varargs_unicode_str( ", name=", cur_size );
1715 static void dump_open_semaphore_reply( const struct open_semaphore_reply *req )
1717 fprintf( stderr, " handle=%04x", req->handle );
1720 static void dump_create_file_request( const struct create_file_request *req )
1722 fprintf( stderr, " access=%08x", req->access );
1723 fprintf( stderr, ", sharing=%08x", req->sharing );
1724 fprintf( stderr, ", create=%d", req->create );
1725 fprintf( stderr, ", options=%08x", req->options );
1726 fprintf( stderr, ", attrs=%08x", req->attrs );
1727 dump_varargs_object_attributes( ", objattr=", cur_size );
1728 dump_varargs_string( ", filename=", cur_size );
1731 static void dump_create_file_reply( const struct create_file_reply *req )
1733 fprintf( stderr, " handle=%04x", req->handle );
1736 static void dump_open_file_object_request( const struct open_file_object_request *req )
1738 fprintf( stderr, " access=%08x", req->access );
1739 fprintf( stderr, ", attributes=%08x", req->attributes );
1740 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1741 fprintf( stderr, ", sharing=%08x", req->sharing );
1742 fprintf( stderr, ", options=%08x", req->options );
1743 dump_varargs_unicode_str( ", filename=", cur_size );
1746 static void dump_open_file_object_reply( const struct open_file_object_reply *req )
1748 fprintf( stderr, " handle=%04x", req->handle );
1751 static void dump_alloc_file_handle_request( const struct alloc_file_handle_request *req )
1753 fprintf( stderr, " access=%08x", req->access );
1754 fprintf( stderr, ", attributes=%08x", req->attributes );
1755 fprintf( stderr, ", fd=%d", req->fd );
1758 static void dump_alloc_file_handle_reply( const struct alloc_file_handle_reply *req )
1760 fprintf( stderr, " handle=%04x", req->handle );
1763 static void dump_get_handle_unix_name_request( const struct get_handle_unix_name_request *req )
1765 fprintf( stderr, " handle=%04x", req->handle );
1768 static void dump_get_handle_unix_name_reply( const struct get_handle_unix_name_reply *req )
1770 fprintf( stderr, " name_len=%u", req->name_len );
1771 dump_varargs_string( ", name=", cur_size );
1774 static void dump_get_handle_fd_request( const struct get_handle_fd_request *req )
1776 fprintf( stderr, " handle=%04x", req->handle );
1779 static void dump_get_handle_fd_reply( const struct get_handle_fd_reply *req )
1781 fprintf( stderr, " type=%d", req->type );
1782 fprintf( stderr, ", cacheable=%d", req->cacheable );
1783 fprintf( stderr, ", access=%08x", req->access );
1784 fprintf( stderr, ", options=%08x", req->options );
1787 static void dump_get_directory_cache_entry_request( const struct get_directory_cache_entry_request *req )
1789 fprintf( stderr, " handle=%04x", req->handle );
1792 static void dump_get_directory_cache_entry_reply( const struct get_directory_cache_entry_reply *req )
1794 fprintf( stderr, " entry=%d", req->entry );
1795 dump_varargs_ints( ", free=", cur_size );
1798 static void dump_flush_request( const struct flush_request *req )
1800 dump_async_data( " async=", &req->async );
1803 static void dump_flush_reply( const struct flush_reply *req )
1805 fprintf( stderr, " event=%04x", req->event );
1808 static void dump_lock_file_request( const struct lock_file_request *req )
1810 fprintf( stderr, " handle=%04x", req->handle );
1811 dump_uint64( ", offset=", &req->offset );
1812 dump_uint64( ", count=", &req->count );
1813 fprintf( stderr, ", shared=%d", req->shared );
1814 fprintf( stderr, ", wait=%d", req->wait );
1817 static void dump_lock_file_reply( const struct lock_file_reply *req )
1819 fprintf( stderr, " handle=%04x", req->handle );
1820 fprintf( stderr, ", overlapped=%d", req->overlapped );
1823 static void dump_unlock_file_request( const struct unlock_file_request *req )
1825 fprintf( stderr, " handle=%04x", req->handle );
1826 dump_uint64( ", offset=", &req->offset );
1827 dump_uint64( ", count=", &req->count );
1830 static void dump_create_socket_request( const struct create_socket_request *req )
1832 fprintf( stderr, " access=%08x", req->access );
1833 fprintf( stderr, ", attributes=%08x", req->attributes );
1834 fprintf( stderr, ", family=%d", req->family );
1835 fprintf( stderr, ", type=%d", req->type );
1836 fprintf( stderr, ", protocol=%d", req->protocol );
1837 fprintf( stderr, ", flags=%08x", req->flags );
1840 static void dump_create_socket_reply( const struct create_socket_reply *req )
1842 fprintf( stderr, " handle=%04x", req->handle );
1845 static void dump_accept_socket_request( const struct accept_socket_request *req )
1847 fprintf( stderr, " lhandle=%04x", req->lhandle );
1848 fprintf( stderr, ", access=%08x", req->access );
1849 fprintf( stderr, ", attributes=%08x", req->attributes );
1852 static void dump_accept_socket_reply( const struct accept_socket_reply *req )
1854 fprintf( stderr, " handle=%04x", req->handle );
1857 static void dump_accept_into_socket_request( const struct accept_into_socket_request *req )
1859 fprintf( stderr, " lhandle=%04x", req->lhandle );
1860 fprintf( stderr, ", ahandle=%04x", req->ahandle );
1863 static void dump_set_socket_event_request( const struct set_socket_event_request *req )
1865 fprintf( stderr, " handle=%04x", req->handle );
1866 fprintf( stderr, ", mask=%08x", req->mask );
1867 fprintf( stderr, ", event=%04x", req->event );
1868 fprintf( stderr, ", window=%08x", req->window );
1869 fprintf( stderr, ", msg=%08x", req->msg );
1872 static void dump_get_socket_event_request( const struct get_socket_event_request *req )
1874 fprintf( stderr, " handle=%04x", req->handle );
1875 fprintf( stderr, ", service=%d", req->service );
1876 fprintf( stderr, ", c_event=%04x", req->c_event );
1879 static void dump_get_socket_event_reply( const struct get_socket_event_reply *req )
1881 fprintf( stderr, " mask=%08x", req->mask );
1882 fprintf( stderr, ", pmask=%08x", req->pmask );
1883 fprintf( stderr, ", state=%08x", req->state );
1884 dump_varargs_ints( ", errors=", cur_size );
1887 static void dump_get_socket_info_request( const struct get_socket_info_request *req )
1889 fprintf( stderr, " handle=%04x", req->handle );
1892 static void dump_get_socket_info_reply( const struct get_socket_info_reply *req )
1894 fprintf( stderr, " family=%d", req->family );
1895 fprintf( stderr, ", type=%d", req->type );
1896 fprintf( stderr, ", protocol=%d", req->protocol );
1899 static void dump_enable_socket_event_request( const struct enable_socket_event_request *req )
1901 fprintf( stderr, " handle=%04x", req->handle );
1902 fprintf( stderr, ", mask=%08x", req->mask );
1903 fprintf( stderr, ", sstate=%08x", req->sstate );
1904 fprintf( stderr, ", cstate=%08x", req->cstate );
1907 static void dump_set_socket_deferred_request( const struct set_socket_deferred_request *req )
1909 fprintf( stderr, " handle=%04x", req->handle );
1910 fprintf( stderr, ", deferred=%04x", req->deferred );
1913 static void dump_alloc_console_request( const struct alloc_console_request *req )
1915 fprintf( stderr, " access=%08x", req->access );
1916 fprintf( stderr, ", attributes=%08x", req->attributes );
1917 fprintf( stderr, ", pid=%04x", req->pid );
1918 fprintf( stderr, ", input_fd=%d", req->input_fd );
1921 static void dump_alloc_console_reply( const struct alloc_console_reply *req )
1923 fprintf( stderr, " handle_in=%04x", req->handle_in );
1924 fprintf( stderr, ", event=%04x", req->event );
1927 static void dump_free_console_request( const struct free_console_request *req )
1931 static void dump_get_console_renderer_events_request( const struct get_console_renderer_events_request *req )
1933 fprintf( stderr, " handle=%04x", req->handle );
1936 static void dump_get_console_renderer_events_reply( const struct get_console_renderer_events_reply *req )
1938 dump_varargs_bytes( " data=", cur_size );
1941 static void dump_open_console_request( const struct open_console_request *req )
1943 fprintf( stderr, " from=%04x", req->from );
1944 fprintf( stderr, ", access=%08x", req->access );
1945 fprintf( stderr, ", attributes=%08x", req->attributes );
1946 fprintf( stderr, ", share=%d", req->share );
1949 static void dump_open_console_reply( const struct open_console_reply *req )
1951 fprintf( stderr, " handle=%04x", req->handle );
1954 static void dump_get_console_wait_event_request( const struct get_console_wait_event_request *req )
1958 static void dump_get_console_wait_event_reply( const struct get_console_wait_event_reply *req )
1960 fprintf( stderr, " handle=%04x", req->handle );
1963 static void dump_get_console_mode_request( const struct get_console_mode_request *req )
1965 fprintf( stderr, " handle=%04x", req->handle );
1968 static void dump_get_console_mode_reply( const struct get_console_mode_reply *req )
1970 fprintf( stderr, " mode=%d", req->mode );
1973 static void dump_set_console_mode_request( const struct set_console_mode_request *req )
1975 fprintf( stderr, " handle=%04x", req->handle );
1976 fprintf( stderr, ", mode=%d", req->mode );
1979 static void dump_set_console_input_info_request( const struct set_console_input_info_request *req )
1981 fprintf( stderr, " handle=%04x", req->handle );
1982 fprintf( stderr, ", mask=%d", req->mask );
1983 fprintf( stderr, ", active_sb=%04x", req->active_sb );
1984 fprintf( stderr, ", history_mode=%d", req->history_mode );
1985 fprintf( stderr, ", history_size=%d", req->history_size );
1986 fprintf( stderr, ", edition_mode=%d", req->edition_mode );
1987 fprintf( stderr, ", input_cp=%d", req->input_cp );
1988 fprintf( stderr, ", output_cp=%d", req->output_cp );
1989 fprintf( stderr, ", win=%08x", req->win );
1990 dump_varargs_unicode_str( ", title=", cur_size );
1993 static void dump_get_console_input_info_request( const struct get_console_input_info_request *req )
1995 fprintf( stderr, " handle=%04x", req->handle );
1998 static void dump_get_console_input_info_reply( const struct get_console_input_info_reply *req )
2000 fprintf( stderr, " history_mode=%d", req->history_mode );
2001 fprintf( stderr, ", history_size=%d", req->history_size );
2002 fprintf( stderr, ", history_index=%d", req->history_index );
2003 fprintf( stderr, ", edition_mode=%d", req->edition_mode );
2004 fprintf( stderr, ", input_cp=%d", req->input_cp );
2005 fprintf( stderr, ", output_cp=%d", req->output_cp );
2006 fprintf( stderr, ", win=%08x", req->win );
2007 dump_varargs_unicode_str( ", title=", cur_size );
2010 static void dump_append_console_input_history_request( const struct append_console_input_history_request *req )
2012 fprintf( stderr, " handle=%04x", req->handle );
2013 dump_varargs_unicode_str( ", line=", cur_size );
2016 static void dump_get_console_input_history_request( const struct get_console_input_history_request *req )
2018 fprintf( stderr, " handle=%04x", req->handle );
2019 fprintf( stderr, ", index=%d", req->index );
2022 static void dump_get_console_input_history_reply( const struct get_console_input_history_reply *req )
2024 fprintf( stderr, " total=%d", req->total );
2025 dump_varargs_unicode_str( ", line=", cur_size );
2028 static void dump_create_console_output_request( const struct create_console_output_request *req )
2030 fprintf( stderr, " handle_in=%04x", req->handle_in );
2031 fprintf( stderr, ", access=%08x", req->access );
2032 fprintf( stderr, ", attributes=%08x", req->attributes );
2033 fprintf( stderr, ", share=%08x", req->share );
2034 fprintf( stderr, ", fd=%d", req->fd );
2037 static void dump_create_console_output_reply( const struct create_console_output_reply *req )
2039 fprintf( stderr, " handle_out=%04x", req->handle_out );
2042 static void dump_set_console_output_info_request( const struct set_console_output_info_request *req )
2044 fprintf( stderr, " handle=%04x", req->handle );
2045 fprintf( stderr, ", mask=%d", req->mask );
2046 fprintf( stderr, ", cursor_size=%d", req->cursor_size );
2047 fprintf( stderr, ", cursor_visible=%d", req->cursor_visible );
2048 fprintf( stderr, ", cursor_x=%d", req->cursor_x );
2049 fprintf( stderr, ", cursor_y=%d", req->cursor_y );
2050 fprintf( stderr, ", width=%d", req->width );
2051 fprintf( stderr, ", height=%d", req->height );
2052 fprintf( stderr, ", attr=%d", req->attr );
2053 fprintf( stderr, ", popup_attr=%d", req->popup_attr );
2054 fprintf( stderr, ", win_left=%d", req->win_left );
2055 fprintf( stderr, ", win_top=%d", req->win_top );
2056 fprintf( stderr, ", win_right=%d", req->win_right );
2057 fprintf( stderr, ", win_bottom=%d", req->win_bottom );
2058 fprintf( stderr, ", max_width=%d", req->max_width );
2059 fprintf( stderr, ", max_height=%d", req->max_height );
2060 fprintf( stderr, ", font_width=%d", req->font_width );
2061 fprintf( stderr, ", font_height=%d", req->font_height );
2062 dump_varargs_uints( ", colors=", cur_size );
2065 static void dump_get_console_output_info_request( const struct get_console_output_info_request *req )
2067 fprintf( stderr, " handle=%04x", req->handle );
2070 static void dump_get_console_output_info_reply( const struct get_console_output_info_reply *req )
2072 fprintf( stderr, " cursor_size=%d", req->cursor_size );
2073 fprintf( stderr, ", cursor_visible=%d", req->cursor_visible );
2074 fprintf( stderr, ", cursor_x=%d", req->cursor_x );
2075 fprintf( stderr, ", cursor_y=%d", req->cursor_y );
2076 fprintf( stderr, ", width=%d", req->width );
2077 fprintf( stderr, ", height=%d", req->height );
2078 fprintf( stderr, ", attr=%d", req->attr );
2079 fprintf( stderr, ", popup_attr=%d", req->popup_attr );
2080 fprintf( stderr, ", win_left=%d", req->win_left );
2081 fprintf( stderr, ", win_top=%d", req->win_top );
2082 fprintf( stderr, ", win_right=%d", req->win_right );
2083 fprintf( stderr, ", win_bottom=%d", req->win_bottom );
2084 fprintf( stderr, ", max_width=%d", req->max_width );
2085 fprintf( stderr, ", max_height=%d", req->max_height );
2086 fprintf( stderr, ", font_width=%d", req->font_width );
2087 fprintf( stderr, ", font_height=%d", req->font_height );
2088 dump_varargs_uints( ", colors=", cur_size );
2091 static void dump_write_console_input_request( const struct write_console_input_request *req )
2093 fprintf( stderr, " handle=%04x", req->handle );
2094 dump_varargs_input_records( ", rec=", cur_size );
2097 static void dump_write_console_input_reply( const struct write_console_input_reply *req )
2099 fprintf( stderr, " written=%d", req->written );
2102 static void dump_read_console_input_request( const struct read_console_input_request *req )
2104 fprintf( stderr, " handle=%04x", req->handle );
2105 fprintf( stderr, ", flush=%d", req->flush );
2108 static void dump_read_console_input_reply( const struct read_console_input_reply *req )
2110 fprintf( stderr, " read=%d", req->read );
2111 dump_varargs_input_records( ", rec=", cur_size );
2114 static void dump_write_console_output_request( const struct write_console_output_request *req )
2116 fprintf( stderr, " handle=%04x", req->handle );
2117 fprintf( stderr, ", x=%d", req->x );
2118 fprintf( stderr, ", y=%d", req->y );
2119 fprintf( stderr, ", mode=%d", req->mode );
2120 fprintf( stderr, ", wrap=%d", req->wrap );
2121 dump_varargs_bytes( ", data=", cur_size );
2124 static void dump_write_console_output_reply( const struct write_console_output_reply *req )
2126 fprintf( stderr, " written=%d", req->written );
2127 fprintf( stderr, ", width=%d", req->width );
2128 fprintf( stderr, ", height=%d", req->height );
2131 static void dump_fill_console_output_request( const struct fill_console_output_request *req )
2133 fprintf( stderr, " handle=%04x", req->handle );
2134 fprintf( stderr, ", x=%d", req->x );
2135 fprintf( stderr, ", y=%d", req->y );
2136 fprintf( stderr, ", mode=%d", req->mode );
2137 fprintf( stderr, ", count=%d", req->count );
2138 fprintf( stderr, ", wrap=%d", req->wrap );
2139 dump_char_info( ", data=", &req->data );
2142 static void dump_fill_console_output_reply( const struct fill_console_output_reply *req )
2144 fprintf( stderr, " written=%d", req->written );
2147 static void dump_read_console_output_request( const struct read_console_output_request *req )
2149 fprintf( stderr, " handle=%04x", req->handle );
2150 fprintf( stderr, ", x=%d", req->x );
2151 fprintf( stderr, ", y=%d", req->y );
2152 fprintf( stderr, ", mode=%d", req->mode );
2153 fprintf( stderr, ", wrap=%d", req->wrap );
2156 static void dump_read_console_output_reply( const struct read_console_output_reply *req )
2158 fprintf( stderr, " width=%d", req->width );
2159 fprintf( stderr, ", height=%d", req->height );
2160 dump_varargs_bytes( ", data=", cur_size );
2163 static void dump_move_console_output_request( const struct move_console_output_request *req )
2165 fprintf( stderr, " handle=%04x", req->handle );
2166 fprintf( stderr, ", x_src=%d", req->x_src );
2167 fprintf( stderr, ", y_src=%d", req->y_src );
2168 fprintf( stderr, ", x_dst=%d", req->x_dst );
2169 fprintf( stderr, ", y_dst=%d", req->y_dst );
2170 fprintf( stderr, ", w=%d", req->w );
2171 fprintf( stderr, ", h=%d", req->h );
2174 static void dump_send_console_signal_request( const struct send_console_signal_request *req )
2176 fprintf( stderr, " signal=%d", req->signal );
2177 fprintf( stderr, ", group_id=%04x", req->group_id );
2180 static void dump_read_directory_changes_request( const struct read_directory_changes_request *req )
2182 fprintf( stderr, " filter=%08x", req->filter );
2183 fprintf( stderr, ", subtree=%d", req->subtree );
2184 fprintf( stderr, ", want_data=%d", req->want_data );
2185 dump_async_data( ", async=", &req->async );
2188 static void dump_read_change_request( const struct read_change_request *req )
2190 fprintf( stderr, " handle=%04x", req->handle );
2193 static void dump_read_change_reply( const struct read_change_reply *req )
2195 dump_varargs_filesystem_event( " events=", cur_size );
2198 static void dump_create_mapping_request( const struct create_mapping_request *req )
2200 fprintf( stderr, " access=%08x", req->access );
2201 fprintf( stderr, ", flags=%08x", req->flags );
2202 fprintf( stderr, ", protect=%08x", req->protect );
2203 dump_uint64( ", size=", &req->size );
2204 fprintf( stderr, ", file_handle=%04x", req->file_handle );
2205 dump_varargs_object_attributes( ", objattr=", cur_size );
2208 static void dump_create_mapping_reply( const struct create_mapping_reply *req )
2210 fprintf( stderr, " handle=%04x", req->handle );
2213 static void dump_open_mapping_request( const struct open_mapping_request *req )
2215 fprintf( stderr, " access=%08x", req->access );
2216 fprintf( stderr, ", attributes=%08x", req->attributes );
2217 fprintf( stderr, ", rootdir=%04x", req->rootdir );
2218 dump_varargs_unicode_str( ", name=", cur_size );
2221 static void dump_open_mapping_reply( const struct open_mapping_reply *req )
2223 fprintf( stderr, " handle=%04x", req->handle );
2226 static void dump_get_mapping_info_request( const struct get_mapping_info_request *req )
2228 fprintf( stderr, " handle=%04x", req->handle );
2229 fprintf( stderr, ", access=%08x", req->access );
2232 static void dump_get_mapping_info_reply( const struct get_mapping_info_reply *req )
2234 dump_uint64( " size=", &req->size );
2235 fprintf( stderr, ", flags=%08x", req->flags );
2236 fprintf( stderr, ", protect=%d", req->protect );
2237 fprintf( stderr, ", mapping=%04x", req->mapping );
2238 fprintf( stderr, ", shared_file=%04x", req->shared_file );
2239 dump_varargs_pe_image_info( ", image=", cur_size );
2242 static void dump_get_mapping_committed_range_request( const struct get_mapping_committed_range_request *req )
2244 fprintf( stderr, " handle=%04x", req->handle );
2245 dump_uint64( ", offset=", &req->offset );
2248 static void dump_get_mapping_committed_range_reply( const struct get_mapping_committed_range_reply *req )
2250 dump_uint64( " size=", &req->size );
2251 fprintf( stderr, ", committed=%d", req->committed );
2254 static void dump_add_mapping_committed_range_request( const struct add_mapping_committed_range_request *req )
2256 fprintf( stderr, " handle=%04x", req->handle );
2257 dump_uint64( ", offset=", &req->offset );
2258 dump_uint64( ", size=", &req->size );
2261 static void dump_create_snapshot_request( const struct create_snapshot_request *req )
2263 fprintf( stderr, " attributes=%08x", req->attributes );
2264 fprintf( stderr, ", flags=%08x", req->flags );
2267 static void dump_create_snapshot_reply( const struct create_snapshot_reply *req )
2269 fprintf( stderr, " handle=%04x", req->handle );
2272 static void dump_next_process_request( const struct next_process_request *req )
2274 fprintf( stderr, " handle=%04x", req->handle );
2275 fprintf( stderr, ", reset=%d", req->reset );
2278 static void dump_next_process_reply( const struct next_process_reply *req )
2280 fprintf( stderr, " count=%d", req->count );
2281 fprintf( stderr, ", pid=%04x", req->pid );
2282 fprintf( stderr, ", ppid=%04x", req->ppid );
2283 fprintf( stderr, ", threads=%d", req->threads );
2284 fprintf( stderr, ", priority=%d", req->priority );
2285 fprintf( stderr, ", handles=%d", req->handles );
2286 fprintf( stderr, ", unix_pid=%d", req->unix_pid );
2287 dump_varargs_unicode_str( ", filename=", cur_size );
2290 static void dump_next_thread_request( const struct next_thread_request *req )
2292 fprintf( stderr, " handle=%04x", req->handle );
2293 fprintf( stderr, ", reset=%d", req->reset );
2296 static void dump_next_thread_reply( const struct next_thread_reply *req )
2298 fprintf( stderr, " count=%d", req->count );
2299 fprintf( stderr, ", pid=%04x", req->pid );
2300 fprintf( stderr, ", tid=%04x", req->tid );
2301 fprintf( stderr, ", base_pri=%d", req->base_pri );
2302 fprintf( stderr, ", delta_pri=%d", req->delta_pri );
2305 static void dump_wait_debug_event_request( const struct wait_debug_event_request *req )
2307 fprintf( stderr, " get_handle=%d", req->get_handle );
2310 static void dump_wait_debug_event_reply( const struct wait_debug_event_reply *req )
2312 fprintf( stderr, " pid=%04x", req->pid );
2313 fprintf( stderr, ", tid=%04x", req->tid );
2314 fprintf( stderr, ", wait=%04x", req->wait );
2315 dump_varargs_debug_event( ", event=", cur_size );
2318 static void dump_queue_exception_event_request( const struct queue_exception_event_request *req )
2320 fprintf( stderr, " first=%d", req->first );
2321 fprintf( stderr, ", code=%08x", req->code );
2322 fprintf( stderr, ", flags=%08x", req->flags );
2323 dump_uint64( ", record=", &req->record );
2324 dump_uint64( ", address=", &req->address );
2325 fprintf( stderr, ", len=%u", req->len );
2326 dump_varargs_uints64( ", params=", min(cur_size,req->len) );
2327 dump_varargs_context( ", context=", cur_size );
2330 static void dump_queue_exception_event_reply( const struct queue_exception_event_reply *req )
2332 fprintf( stderr, " handle=%04x", req->handle );
2335 static void dump_get_exception_status_request( const struct get_exception_status_request *req )
2337 fprintf( stderr, " handle=%04x", req->handle );
2340 static void dump_get_exception_status_reply( const struct get_exception_status_reply *req )
2342 dump_varargs_context( " context=", cur_size );
2345 static void dump_continue_debug_event_request( const struct continue_debug_event_request *req )
2347 fprintf( stderr, " pid=%04x", req->pid );
2348 fprintf( stderr, ", tid=%04x", req->tid );
2349 fprintf( stderr, ", status=%d", req->status );
2352 static void dump_debug_process_request( const struct debug_process_request *req )
2354 fprintf( stderr, " pid=%04x", req->pid );
2355 fprintf( stderr, ", attach=%d", req->attach );
2358 static void dump_debug_break_request( const struct debug_break_request *req )
2360 fprintf( stderr, " handle=%04x", req->handle );
2363 static void dump_debug_break_reply( const struct debug_break_reply *req )
2365 fprintf( stderr, " self=%d", req->self );
2368 static void dump_set_debugger_kill_on_exit_request( const struct set_debugger_kill_on_exit_request *req )
2370 fprintf( stderr, " kill_on_exit=%d", req->kill_on_exit );
2373 static void dump_read_process_memory_request( const struct read_process_memory_request *req )
2375 fprintf( stderr, " handle=%04x", req->handle );
2376 dump_uint64( ", addr=", &req->addr );
2379 static void dump_read_process_memory_reply( const struct read_process_memory_reply *req )
2381 dump_varargs_bytes( " data=", cur_size );
2384 static void dump_write_process_memory_request( const struct write_process_memory_request *req )
2386 fprintf( stderr, " handle=%04x", req->handle );
2387 dump_uint64( ", addr=", &req->addr );
2388 dump_varargs_bytes( ", data=", cur_size );
2391 static void dump_create_key_request( const struct create_key_request *req )
2393 fprintf( stderr, " access=%08x", req->access );
2394 fprintf( stderr, ", options=%08x", req->options );
2395 dump_varargs_object_attributes( ", objattr=", cur_size );
2396 dump_varargs_unicode_str( ", class=", cur_size );
2399 static void dump_create_key_reply( const struct create_key_reply *req )
2401 fprintf( stderr, " hkey=%04x", req->hkey );
2402 fprintf( stderr, ", created=%d", req->created );
2405 static void dump_open_key_request( const struct open_key_request *req )
2407 fprintf( stderr, " parent=%04x", req->parent );
2408 fprintf( stderr, ", access=%08x", req->access );
2409 fprintf( stderr, ", attributes=%08x", req->attributes );
2410 dump_varargs_unicode_str( ", name=", cur_size );
2413 static void dump_open_key_reply( const struct open_key_reply *req )
2415 fprintf( stderr, " hkey=%04x", req->hkey );
2418 static void dump_delete_key_request( const struct delete_key_request *req )
2420 fprintf( stderr, " hkey=%04x", req->hkey );
2423 static void dump_flush_key_request( const struct flush_key_request *req )
2425 fprintf( stderr, " hkey=%04x", req->hkey );
2428 static void dump_enum_key_request( const struct enum_key_request *req )
2430 fprintf( stderr, " hkey=%04x", req->hkey );
2431 fprintf( stderr, ", index=%d", req->index );
2432 fprintf( stderr, ", info_class=%d", req->info_class );
2435 static void dump_enum_key_reply( const struct enum_key_reply *req )
2437 fprintf( stderr, " subkeys=%d", req->subkeys );
2438 fprintf( stderr, ", max_subkey=%d", req->max_subkey );
2439 fprintf( stderr, ", max_class=%d", req->max_class );
2440 fprintf( stderr, ", values=%d", req->values );
2441 fprintf( stderr, ", max_value=%d", req->max_value );
2442 fprintf( stderr, ", max_data=%d", req->max_data );
2443 dump_timeout( ", modif=", &req->modif );
2444 fprintf( stderr, ", total=%u", req->total );
2445 fprintf( stderr, ", namelen=%u", req->namelen );
2446 dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
2447 dump_varargs_unicode_str( ", class=", cur_size );
2450 static void dump_set_key_value_request( const struct set_key_value_request *req )
2452 fprintf( stderr, " hkey=%04x", req->hkey );
2453 fprintf( stderr, ", type=%d", req->type );
2454 fprintf( stderr, ", namelen=%u", req->namelen );
2455 dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
2456 dump_varargs_bytes( ", data=", cur_size );
2459 static void dump_get_key_value_request( const struct get_key_value_request *req )
2461 fprintf( stderr, " hkey=%04x", req->hkey );
2462 dump_varargs_unicode_str( ", name=", cur_size );
2465 static void dump_get_key_value_reply( const struct get_key_value_reply *req )
2467 fprintf( stderr, " type=%d", req->type );
2468 fprintf( stderr, ", total=%u", req->total );
2469 dump_varargs_bytes( ", data=", cur_size );
2472 static void dump_enum_key_value_request( const struct enum_key_value_request *req )
2474 fprintf( stderr, " hkey=%04x", req->hkey );
2475 fprintf( stderr, ", index=%d", req->index );
2476 fprintf( stderr, ", info_class=%d", req->info_class );
2479 static void dump_enum_key_value_reply( const struct enum_key_value_reply *req )
2481 fprintf( stderr, " type=%d", req->type );
2482 fprintf( stderr, ", total=%u", req->total );
2483 fprintf( stderr, ", namelen=%u", req->namelen );
2484 dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
2485 dump_varargs_bytes( ", data=", cur_size );
2488 static void dump_delete_key_value_request( const struct delete_key_value_request *req )
2490 fprintf( stderr, " hkey=%04x", req->hkey );
2491 dump_varargs_unicode_str( ", name=", cur_size );
2494 static void dump_load_registry_request( const struct load_registry_request *req )
2496 fprintf( stderr, " file=%04x", req->file );
2497 dump_varargs_object_attributes( ", objattr=", cur_size );
2500 static void dump_unload_registry_request( const struct unload_registry_request *req )
2502 fprintf( stderr, " hkey=%04x", req->hkey );
2505 static void dump_save_registry_request( const struct save_registry_request *req )
2507 fprintf( stderr, " hkey=%04x", req->hkey );
2508 fprintf( stderr, ", file=%04x", req->file );
2511 static void dump_set_registry_notification_request( const struct set_registry_notification_request *req )
2513 fprintf( stderr, " hkey=%04x", req->hkey );
2514 fprintf( stderr, ", event=%04x", req->event );
2515 fprintf( stderr, ", subtree=%d", req->subtree );
2516 fprintf( stderr, ", filter=%08x", req->filter );
2519 static void dump_create_timer_request( const struct create_timer_request *req )
2521 fprintf( stderr, " access=%08x", req->access );
2522 fprintf( stderr, ", manual=%d", req->manual );
2523 dump_varargs_object_attributes( ", objattr=", cur_size );
2526 static void dump_create_timer_reply( const struct create_timer_reply *req )
2528 fprintf( stderr, " handle=%04x", req->handle );
2531 static void dump_open_timer_request( const struct open_timer_request *req )
2533 fprintf( stderr, " access=%08x", req->access );
2534 fprintf( stderr, ", attributes=%08x", req->attributes );
2535 fprintf( stderr, ", rootdir=%04x", req->rootdir );
2536 dump_varargs_unicode_str( ", name=", cur_size );
2539 static void dump_open_timer_reply( const struct open_timer_reply *req )
2541 fprintf( stderr, " handle=%04x", req->handle );
2544 static void dump_set_timer_request( const struct set_timer_request *req )
2546 fprintf( stderr, " handle=%04x", req->handle );
2547 dump_timeout( ", expire=", &req->expire );
2548 dump_uint64( ", callback=", &req->callback );
2549 dump_uint64( ", arg=", &req->arg );
2550 fprintf( stderr, ", period=%d", req->period );
2553 static void dump_set_timer_reply( const struct set_timer_reply *req )
2555 fprintf( stderr, " signaled=%d", req->signaled );
2558 static void dump_cancel_timer_request( const struct cancel_timer_request *req )
2560 fprintf( stderr, " handle=%04x", req->handle );
2563 static void dump_cancel_timer_reply( const struct cancel_timer_reply *req )
2565 fprintf( stderr, " signaled=%d", req->signaled );
2568 static void dump_get_timer_info_request( const struct get_timer_info_request *req )
2570 fprintf( stderr, " handle=%04x", req->handle );
2573 static void dump_get_timer_info_reply( const struct get_timer_info_reply *req )
2575 dump_timeout( " when=", &req->when );
2576 fprintf( stderr, ", signaled=%d", req->signaled );
2579 static void dump_get_thread_context_request( const struct get_thread_context_request *req )
2581 fprintf( stderr, " handle=%04x", req->handle );
2582 fprintf( stderr, ", flags=%08x", req->flags );
2583 fprintf( stderr, ", suspend=%d", req->suspend );
2586 static void dump_get_thread_context_reply( const struct get_thread_context_reply *req )
2588 fprintf( stderr, " self=%d", req->self );
2589 dump_varargs_context( ", context=", cur_size );
2592 static void dump_set_thread_context_request( const struct set_thread_context_request *req )
2594 fprintf( stderr, " handle=%04x", req->handle );
2595 fprintf( stderr, ", suspend=%d", req->suspend );
2596 dump_varargs_context( ", context=", cur_size );
2599 static void dump_set_thread_context_reply( const struct set_thread_context_reply *req )
2601 fprintf( stderr, " self=%d", req->self );
2604 static void dump_get_selector_entry_request( const struct get_selector_entry_request *req )
2606 fprintf( stderr, " handle=%04x", req->handle );
2607 fprintf( stderr, ", entry=%d", req->entry );
2610 static void dump_get_selector_entry_reply( const struct get_selector_entry_reply *req )
2612 fprintf( stderr, " base=%08x", req->base );
2613 fprintf( stderr, ", limit=%08x", req->limit );
2614 fprintf( stderr, ", flags=%02x", req->flags );
2617 static void dump_add_atom_request( const struct add_atom_request *req )
2619 fprintf( stderr, " table=%04x", req->table );
2620 dump_varargs_unicode_str( ", name=", cur_size );
2623 static void dump_add_atom_reply( const struct add_atom_reply *req )
2625 fprintf( stderr, " atom=%04x", req->atom );
2628 static void dump_delete_atom_request( const struct delete_atom_request *req )
2630 fprintf( stderr, " table=%04x", req->table );
2631 fprintf( stderr, ", atom=%04x", req->atom );
2634 static void dump_find_atom_request( const struct find_atom_request *req )
2636 fprintf( stderr, " table=%04x", req->table );
2637 dump_varargs_unicode_str( ", name=", cur_size );
2640 static void dump_find_atom_reply( const struct find_atom_reply *req )
2642 fprintf( stderr, " atom=%04x", req->atom );
2645 static void dump_get_atom_information_request( const struct get_atom_information_request *req )
2647 fprintf( stderr, " table=%04x", req->table );
2648 fprintf( stderr, ", atom=%04x", req->atom );
2651 static void dump_get_atom_information_reply( const struct get_atom_information_reply *req )
2653 fprintf( stderr, " count=%d", req->count );
2654 fprintf( stderr, ", pinned=%d", req->pinned );
2655 fprintf( stderr, ", total=%u", req->total );
2656 dump_varargs_unicode_str( ", name=", cur_size );
2659 static void dump_set_atom_information_request( const struct set_atom_information_request *req )
2661 fprintf( stderr, " table=%04x", req->table );
2662 fprintf( stderr, ", atom=%04x", req->atom );
2663 fprintf( stderr, ", pinned=%d", req->pinned );
2666 static void dump_empty_atom_table_request( const struct empty_atom_table_request *req )
2668 fprintf( stderr, " table=%04x", req->table );
2669 fprintf( stderr, ", if_pinned=%d", req->if_pinned );
2672 static void dump_init_atom_table_request( const struct init_atom_table_request *req )
2674 fprintf( stderr, " entries=%d", req->entries );
2677 static void dump_init_atom_table_reply( const struct init_atom_table_reply *req )
2679 fprintf( stderr, " table=%04x", req->table );
2682 static void dump_get_msg_queue_request( const struct get_msg_queue_request *req )
2686 static void dump_get_msg_queue_reply( const struct get_msg_queue_reply *req )
2688 fprintf( stderr, " handle=%04x", req->handle );
2691 static void dump_set_queue_fd_request( const struct set_queue_fd_request *req )
2693 fprintf( stderr, " handle=%04x", req->handle );
2696 static void dump_set_queue_mask_request( const struct set_queue_mask_request *req )
2698 fprintf( stderr, " wake_mask=%08x", req->wake_mask );
2699 fprintf( stderr, ", changed_mask=%08x", req->changed_mask );
2700 fprintf( stderr, ", skip_wait=%d", req->skip_wait );
2703 static void dump_set_queue_mask_reply( const struct set_queue_mask_reply *req )
2705 fprintf( stderr, " wake_bits=%08x", req->wake_bits );
2706 fprintf( stderr, ", changed_bits=%08x", req->changed_bits );
2709 static void dump_get_queue_status_request( const struct get_queue_status_request *req )
2711 fprintf( stderr, " clear_bits=%08x", req->clear_bits );
2714 static void dump_get_queue_status_reply( const struct get_queue_status_reply *req )
2716 fprintf( stderr, " wake_bits=%08x", req->wake_bits );
2717 fprintf( stderr, ", changed_bits=%08x", req->changed_bits );
2720 static void dump_get_process_idle_event_request( const struct get_process_idle_event_request *req )
2722 fprintf( stderr, " handle=%04x", req->handle );
2725 static void dump_get_process_idle_event_reply( const struct get_process_idle_event_reply *req )
2727 fprintf( stderr, " event=%04x", req->event );
2730 static void dump_send_message_request( const struct send_message_request *req )
2732 fprintf( stderr, " id=%04x", req->id );
2733 fprintf( stderr, ", type=%d", req->type );
2734 fprintf( stderr, ", flags=%d", req->flags );
2735 fprintf( stderr, ", win=%08x", req->win );
2736 fprintf( stderr, ", msg=%08x", req->msg );
2737 dump_uint64( ", wparam=", &req->wparam );
2738 dump_uint64( ", lparam=", &req->lparam );
2739 dump_timeout( ", timeout=", &req->timeout );
2740 dump_varargs_message_data( ", data=", cur_size );
2743 static void dump_post_quit_message_request( const struct post_quit_message_request *req )
2745 fprintf( stderr, " exit_code=%d", req->exit_code );
2748 static void dump_send_hardware_message_request( const struct send_hardware_message_request *req )
2750 fprintf( stderr, " win=%08x", req->win );
2751 dump_hw_input( ", input=", &req->input );
2752 fprintf( stderr, ", flags=%08x", req->flags );
2755 static void dump_send_hardware_message_reply( const struct send_hardware_message_reply *req )
2757 fprintf( stderr, " wait=%d", req->wait );
2758 fprintf( stderr, ", prev_x=%d", req->prev_x );
2759 fprintf( stderr, ", prev_y=%d", req->prev_y );
2760 fprintf( stderr, ", new_x=%d", req->new_x );
2761 fprintf( stderr, ", new_y=%d", req->new_y );
2762 dump_varargs_bytes( ", keystate=", cur_size );
2765 static void dump_get_message_request( const struct get_message_request *req )
2767 fprintf( stderr, " flags=%08x", req->flags );
2768 fprintf( stderr, ", get_win=%08x", req->get_win );
2769 fprintf( stderr, ", get_first=%08x", req->get_first );
2770 fprintf( stderr, ", get_last=%08x", req->get_last );
2771 fprintf( stderr, ", hw_id=%08x", req->hw_id );
2772 fprintf( stderr, ", wake_mask=%08x", req->wake_mask );
2773 fprintf( stderr, ", changed_mask=%08x", req->changed_mask );
2776 static void dump_get_message_reply( const struct get_message_reply *req )
2778 fprintf( stderr, " win=%08x", req->win );
2779 fprintf( stderr, ", msg=%08x", req->msg );
2780 dump_uint64( ", wparam=", &req->wparam );
2781 dump_uint64( ", lparam=", &req->lparam );
2782 fprintf( stderr, ", type=%d", req->type );
2783 fprintf( stderr, ", x=%d", req->x );
2784 fprintf( stderr, ", y=%d", req->y );
2785 fprintf( stderr, ", time=%08x", req->time );
2786 fprintf( stderr, ", active_hooks=%08x", req->active_hooks );
2787 fprintf( stderr, ", total=%u", req->total );
2788 dump_varargs_message_data( ", data=", cur_size );
2791 static void dump_reply_message_request( const struct reply_message_request *req )
2793 fprintf( stderr, " remove=%d", req->remove );
2794 dump_uint64( ", result=", &req->result );
2795 dump_varargs_bytes( ", data=", cur_size );
2798 static void dump_accept_hardware_message_request( const struct accept_hardware_message_request *req )
2800 fprintf( stderr, " hw_id=%08x", req->hw_id );
2801 fprintf( stderr, ", remove=%d", req->remove );
2804 static void dump_get_message_reply_request( const struct get_message_reply_request *req )
2806 fprintf( stderr, " cancel=%d", req->cancel );
2809 static void dump_get_message_reply_reply( const struct get_message_reply_reply *req )
2811 dump_uint64( " result=", &req->result );
2812 dump_varargs_bytes( ", data=", cur_size );
2815 static void dump_set_win_timer_request( const struct set_win_timer_request *req )
2817 fprintf( stderr, " win=%08x", req->win );
2818 fprintf( stderr, ", msg=%08x", req->msg );
2819 fprintf( stderr, ", rate=%08x", req->rate );
2820 dump_uint64( ", id=", &req->id );
2821 dump_uint64( ", lparam=", &req->lparam );
2824 static void dump_set_win_timer_reply( const struct set_win_timer_reply *req )
2826 dump_uint64( " id=", &req->id );
2829 static void dump_kill_win_timer_request( const struct kill_win_timer_request *req )
2831 fprintf( stderr, " win=%08x", req->win );
2832 dump_uint64( ", id=", &req->id );
2833 fprintf( stderr, ", msg=%08x", req->msg );
2836 static void dump_is_window_hung_request( const struct is_window_hung_request *req )
2838 fprintf( stderr, " win=%08x", req->win );
2841 static void dump_is_window_hung_reply( const struct is_window_hung_reply *req )
2843 fprintf( stderr, " is_hung=%d", req->is_hung );
2846 static void dump_get_serial_info_request( const struct get_serial_info_request *req )
2848 fprintf( stderr, " handle=%04x", req->handle );
2849 fprintf( stderr, ", flags=%d", req->flags );
2852 static void dump_get_serial_info_reply( const struct get_serial_info_reply *req )
2854 fprintf( stderr, " eventmask=%08x", req->eventmask );
2855 fprintf( stderr, ", cookie=%08x", req->cookie );
2856 fprintf( stderr, ", pending_write=%08x", req->pending_write );
2859 static void dump_set_serial_info_request( const struct set_serial_info_request *req )
2861 fprintf( stderr, " handle=%04x", req->handle );
2862 fprintf( stderr, ", flags=%d", req->flags );
2865 static void dump_register_async_request( const struct register_async_request *req )
2867 fprintf( stderr, " type=%d", req->type );
2868 dump_async_data( ", async=", &req->async );
2869 fprintf( stderr, ", count=%d", req->count );
2872 static void dump_cancel_async_request( const struct cancel_async_request *req )
2874 fprintf( stderr, " handle=%04x", req->handle );
2875 dump_uint64( ", iosb=", &req->iosb );
2876 fprintf( stderr, ", only_thread=%d", req->only_thread );
2879 static void dump_get_async_result_request( const struct get_async_result_request *req )
2881 dump_uint64( " user_arg=", &req->user_arg );
2884 static void dump_get_async_result_reply( const struct get_async_result_reply *req )
2886 fprintf( stderr, " size=%u", req->size );
2887 dump_varargs_bytes( ", out_data=", cur_size );
2890 static void dump_read_request( const struct read_request *req )
2892 dump_async_data( " async=", &req->async );
2893 dump_uint64( ", pos=", &req->pos );
2896 static void dump_read_reply( const struct read_reply *req )
2898 fprintf( stderr, " wait=%04x", req->wait );
2899 fprintf( stderr, ", options=%08x", req->options );
2900 dump_varargs_bytes( ", data=", cur_size );
2903 static void dump_write_request( const struct write_request *req )
2905 dump_async_data( " async=", &req->async );
2906 dump_uint64( ", pos=", &req->pos );
2907 dump_varargs_bytes( ", data=", cur_size );
2910 static void dump_write_reply( const struct write_reply *req )
2912 fprintf( stderr, " wait=%04x", req->wait );
2913 fprintf( stderr, ", options=%08x", req->options );
2914 fprintf( stderr, ", size=%u", req->size );
2917 static void dump_ioctl_request( const struct ioctl_request *req )
2919 dump_ioctl_code( " code=", &req->code );
2920 dump_async_data( ", async=", &req->async );
2921 dump_varargs_bytes( ", in_data=", cur_size );
2924 static void dump_ioctl_reply( const struct ioctl_reply *req )
2926 fprintf( stderr, " wait=%04x", req->wait );
2927 fprintf( stderr, ", options=%08x", req->options );
2928 dump_varargs_bytes( ", out_data=", cur_size );
2931 static void dump_set_irp_result_request( const struct set_irp_result_request *req )
2933 fprintf( stderr, " handle=%04x", req->handle );
2934 fprintf( stderr, ", status=%08x", req->status );
2935 fprintf( stderr, ", size=%u", req->size );
2936 dump_uint64( ", file_ptr=", &req->file_ptr );
2937 dump_varargs_bytes( ", data=", cur_size );
2940 static void dump_create_named_pipe_request( const struct create_named_pipe_request *req )
2942 fprintf( stderr, " access=%08x", req->access );
2943 fprintf( stderr, ", options=%08x", req->options );
2944 fprintf( stderr, ", sharing=%08x", req->sharing );
2945 fprintf( stderr, ", maxinstances=%08x", req->maxinstances );
2946 fprintf( stderr, ", outsize=%08x", req->outsize );
2947 fprintf( stderr, ", insize=%08x", req->insize );
2948 dump_timeout( ", timeout=", &req->timeout );
2949 fprintf( stderr, ", flags=%08x", req->flags );
2950 dump_varargs_object_attributes( ", objattr=", cur_size );
2953 static void dump_create_named_pipe_reply( const struct create_named_pipe_reply *req )
2955 fprintf( stderr, " handle=%04x", req->handle );
2958 static void dump_get_named_pipe_info_request( const struct get_named_pipe_info_request *req )
2960 fprintf( stderr, " handle=%04x", req->handle );
2963 static void dump_get_named_pipe_info_reply( const struct get_named_pipe_info_reply *req )
2965 fprintf( stderr, " flags=%08x", req->flags );
2966 fprintf( stderr, ", sharing=%08x", req->sharing );
2967 fprintf( stderr, ", maxinstances=%08x", req->maxinstances );
2968 fprintf( stderr, ", instances=%08x", req->instances );
2969 fprintf( stderr, ", outsize=%08x", req->outsize );
2970 fprintf( stderr, ", insize=%08x", req->insize );
2973 static void dump_set_named_pipe_info_request( const struct set_named_pipe_info_request *req )
2975 fprintf( stderr, " handle=%04x", req->handle );
2976 fprintf( stderr, ", flags=%08x", req->flags );
2979 static void dump_create_window_request( const struct create_window_request *req )
2981 fprintf( stderr, " parent=%08x", req->parent );
2982 fprintf( stderr, ", owner=%08x", req->owner );
2983 fprintf( stderr, ", atom=%04x", req->atom );
2984 dump_uint64( ", instance=", &req->instance );
2985 dump_varargs_unicode_str( ", class=", cur_size );
2988 static void dump_create_window_reply( const struct create_window_reply *req )
2990 fprintf( stderr, " handle=%08x", req->handle );
2991 fprintf( stderr, ", parent=%08x", req->parent );
2992 fprintf( stderr, ", owner=%08x", req->owner );
2993 fprintf( stderr, ", extra=%d", req->extra );
2994 dump_uint64( ", class_ptr=", &req->class_ptr );
2997 static void dump_destroy_window_request( const struct destroy_window_request *req )
2999 fprintf( stderr, " handle=%08x", req->handle );
3002 static void dump_get_desktop_window_request( const struct get_desktop_window_request *req )
3004 fprintf( stderr, " force=%d", req->force );
3007 static void dump_get_desktop_window_reply( const struct get_desktop_window_reply *req )
3009 fprintf( stderr, " top_window=%08x", req->top_window );
3010 fprintf( stderr, ", msg_window=%08x", req->msg_window );
3013 static void dump_set_window_owner_request( const struct set_window_owner_request *req )
3015 fprintf( stderr, " handle=%08x", req->handle );
3016 fprintf( stderr, ", owner=%08x", req->owner );
3019 static void dump_set_window_owner_reply( const struct set_window_owner_reply *req )
3021 fprintf( stderr, " full_owner=%08x", req->full_owner );
3022 fprintf( stderr, ", prev_owner=%08x", req->prev_owner );
3025 static void dump_get_window_info_request( const struct get_window_info_request *req )
3027 fprintf( stderr, " handle=%08x", req->handle );
3030 static void dump_get_window_info_reply( const struct get_window_info_reply *req )
3032 fprintf( stderr, " full_handle=%08x", req->full_handle );
3033 fprintf( stderr, ", last_active=%08x", req->last_active );
3034 fprintf( stderr, ", pid=%04x", req->pid );
3035 fprintf( stderr, ", tid=%04x", req->tid );
3036 fprintf( stderr, ", atom=%04x", req->atom );
3037 fprintf( stderr, ", is_unicode=%d", req->is_unicode );
3040 static void dump_set_window_info_request( const struct set_window_info_request *req )
3042 fprintf( stderr, " flags=%04x", req->flags );
3043 fprintf( stderr, ", is_unicode=%d", req->is_unicode );
3044 fprintf( stderr, ", handle=%08x", req->handle );
3045 fprintf( stderr, ", style=%08x", req->style );
3046 fprintf( stderr, ", ex_style=%08x", req->ex_style );
3047 fprintf( stderr, ", id=%08x", req->id );
3048 dump_uint64( ", instance=", &req->instance );
3049 dump_uint64( ", user_data=", &req->user_data );
3050 fprintf( stderr, ", extra_offset=%d", req->extra_offset );
3051 fprintf( stderr, ", extra_size=%u", req->extra_size );
3052 dump_uint64( ", extra_value=", &req->extra_value );
3055 static void dump_set_window_info_reply( const struct set_window_info_reply *req )
3057 fprintf( stderr, " old_style=%08x", req->old_style );
3058 fprintf( stderr, ", old_ex_style=%08x", req->old_ex_style );
3059 dump_uint64( ", old_instance=", &req->old_instance );
3060 dump_uint64( ", old_user_data=", &req->old_user_data );
3061 dump_uint64( ", old_extra_value=", &req->old_extra_value );
3062 fprintf( stderr, ", old_id=%08x", req->old_id );
3065 static void dump_set_parent_request( const struct set_parent_request *req )
3067 fprintf( stderr, " handle=%08x", req->handle );
3068 fprintf( stderr, ", parent=%08x", req->parent );
3071 static void dump_set_parent_reply( const struct set_parent_reply *req )
3073 fprintf( stderr, " old_parent=%08x", req->old_parent );
3074 fprintf( stderr, ", full_parent=%08x", req->full_parent );
3077 static void dump_get_window_parents_request( const struct get_window_parents_request *req )
3079 fprintf( stderr, " handle=%08x", req->handle );
3082 static void dump_get_window_parents_reply( const struct get_window_parents_reply *req )
3084 fprintf( stderr, " count=%d", req->count );
3085 dump_varargs_user_handles( ", parents=", cur_size );
3088 static void dump_get_window_children_request( const struct get_window_children_request *req )
3090 fprintf( stderr, " desktop=%04x", req->desktop );
3091 fprintf( stderr, ", parent=%08x", req->parent );
3092 fprintf( stderr, ", atom=%04x", req->atom );
3093 fprintf( stderr, ", tid=%04x", req->tid );
3094 dump_varargs_unicode_str( ", class=", cur_size );
3097 static void dump_get_window_children_reply( const struct get_window_children_reply *req )
3099 fprintf( stderr, " count=%d", req->count );
3100 dump_varargs_user_handles( ", children=", cur_size );
3103 static void dump_get_window_children_from_point_request( const struct get_window_children_from_point_request *req )
3105 fprintf( stderr, " parent=%08x", req->parent );
3106 fprintf( stderr, ", x=%d", req->x );
3107 fprintf( stderr, ", y=%d", req->y );
3110 static void dump_get_window_children_from_point_reply( const struct get_window_children_from_point_reply *req )
3112 fprintf( stderr, " count=%d", req->count );
3113 dump_varargs_user_handles( ", children=", cur_size );
3116 static void dump_get_window_tree_request( const struct get_window_tree_request *req )
3118 fprintf( stderr, " handle=%08x", req->handle );
3121 static void dump_get_window_tree_reply( const struct get_window_tree_reply *req )
3123 fprintf( stderr, " parent=%08x", req->parent );
3124 fprintf( stderr, ", owner=%08x", req->owner );
3125 fprintf( stderr, ", next_sibling=%08x", req->next_sibling );
3126 fprintf( stderr, ", prev_sibling=%08x", req->prev_sibling );
3127 fprintf( stderr, ", first_sibling=%08x", req->first_sibling );
3128 fprintf( stderr, ", last_sibling=%08x", req->last_sibling );
3129 fprintf( stderr, ", first_child=%08x", req->first_child );
3130 fprintf( stderr, ", last_child=%08x", req->last_child );
3133 static void dump_set_window_pos_request( const struct set_window_pos_request *req )
3135 fprintf( stderr, " swp_flags=%04x", req->swp_flags );
3136 fprintf( stderr, ", paint_flags=%04x", req->paint_flags );
3137 fprintf( stderr, ", handle=%08x", req->handle );
3138 fprintf( stderr, ", previous=%08x", req->previous );
3139 dump_rectangle( ", window=", &req->window );
3140 dump_rectangle( ", client=", &req->client );
3141 dump_varargs_rectangles( ", valid=", cur_size );
3144 static void dump_set_window_pos_reply( const struct set_window_pos_reply *req )
3146 fprintf( stderr, " new_style=%08x", req->new_style );
3147 fprintf( stderr, ", new_ex_style=%08x", req->new_ex_style );
3148 fprintf( stderr, ", surface_win=%08x", req->surface_win );
3149 fprintf( stderr, ", needs_update=%d", req->needs_update );
3152 static void dump_get_window_rectangles_request( const struct get_window_rectangles_request *req )
3154 fprintf( stderr, " handle=%08x", req->handle );
3155 fprintf( stderr, ", relative=%d", req->relative );
3158 static void dump_get_window_rectangles_reply( const struct get_window_rectangles_reply *req )
3160 dump_rectangle( " window=", &req->window );
3161 dump_rectangle( ", visible=", &req->visible );
3162 dump_rectangle( ", client=", &req->client );
3165 static void dump_get_window_text_request( const struct get_window_text_request *req )
3167 fprintf( stderr, " handle=%08x", req->handle );
3170 static void dump_get_window_text_reply( const struct get_window_text_reply *req )
3172 dump_varargs_unicode_str( " text=", cur_size );
3175 static void dump_set_window_text_request( const struct set_window_text_request *req )
3177 fprintf( stderr, " handle=%08x", req->handle );
3178 dump_varargs_unicode_str( ", text=", cur_size );
3181 static void dump_get_windows_offset_request( const struct get_windows_offset_request *req )
3183 fprintf( stderr, " from=%08x", req->from );
3184 fprintf( stderr, ", to=%08x", req->to );
3187 static void dump_get_windows_offset_reply( const struct get_windows_offset_reply *req )
3189 fprintf( stderr, " x=%d", req->x );
3190 fprintf( stderr, ", y=%d", req->y );
3191 fprintf( stderr, ", mirror=%d", req->mirror );
3194 static void dump_get_visible_region_request( const struct get_visible_region_request *req )
3196 fprintf( stderr, " window=%08x", req->window );
3197 fprintf( stderr, ", flags=%08x", req->flags );
3200 static void dump_get_visible_region_reply( const struct get_visible_region_reply *req )
3202 fprintf( stderr, " top_win=%08x", req->top_win );
3203 dump_rectangle( ", top_rect=", &req->top_rect );
3204 dump_rectangle( ", win_rect=", &req->win_rect );
3205 fprintf( stderr, ", paint_flags=%08x", req->paint_flags );
3206 fprintf( stderr, ", total_size=%u", req->total_size );
3207 dump_varargs_rectangles( ", region=", cur_size );
3210 static void dump_get_surface_region_request( const struct get_surface_region_request *req )
3212 fprintf( stderr, " window=%08x", req->window );
3215 static void dump_get_surface_region_reply( const struct get_surface_region_reply *req )
3217 dump_rectangle( " visible_rect=", &req->visible_rect );
3218 fprintf( stderr, ", total_size=%u", req->total_size );
3219 dump_varargs_rectangles( ", region=", cur_size );
3222 static void dump_get_window_region_request( const struct get_window_region_request *req )
3224 fprintf( stderr, " window=%08x", req->window );
3227 static void dump_get_window_region_reply( const struct get_window_region_reply *req )
3229 fprintf( stderr, " total_size=%u", req->total_size );
3230 dump_varargs_rectangles( ", region=", cur_size );
3233 static void dump_set_window_region_request( const struct set_window_region_request *req )
3235 fprintf( stderr, " window=%08x", req->window );
3236 fprintf( stderr, ", redraw=%d", req->redraw );
3237 dump_varargs_rectangles( ", region=", cur_size );
3240 static void dump_get_update_region_request( const struct get_update_region_request *req )
3242 fprintf( stderr, " window=%08x", req->window );
3243 fprintf( stderr, ", from_child=%08x", req->from_child );
3244 fprintf( stderr, ", flags=%08x", req->flags );
3247 static void dump_get_update_region_reply( const struct get_update_region_reply *req )
3249 fprintf( stderr, " child=%08x", req->child );
3250 fprintf( stderr, ", flags=%08x", req->flags );
3251 fprintf( stderr, ", total_size=%u", req->total_size );
3252 dump_varargs_rectangles( ", region=", cur_size );
3255 static void dump_update_window_zorder_request( const struct update_window_zorder_request *req )
3257 fprintf( stderr, " window=%08x", req->window );
3258 dump_rectangle( ", rect=", &req->rect );
3261 static void dump_redraw_window_request( const struct redraw_window_request *req )
3263 fprintf( stderr, " window=%08x", req->window );
3264 fprintf( stderr, ", flags=%08x", req->flags );
3265 dump_varargs_rectangles( ", region=", cur_size );
3268 static void dump_set_window_property_request( const struct set_window_property_request *req )
3270 fprintf( stderr, " window=%08x", req->window );
3271 dump_uint64( ", data=", &req->data );
3272 fprintf( stderr, ", atom=%04x", req->atom );
3273 dump_varargs_unicode_str( ", name=", cur_size );
3276 static void dump_remove_window_property_request( const struct remove_window_property_request *req )
3278 fprintf( stderr, " window=%08x", req->window );
3279 fprintf( stderr, ", atom=%04x", req->atom );
3280 dump_varargs_unicode_str( ", name=", cur_size );
3283 static void dump_remove_window_property_reply( const struct remove_window_property_reply *req )
3285 dump_uint64( " data=", &req->data );
3288 static void dump_get_window_property_request( const struct get_window_property_request *req )
3290 fprintf( stderr, " window=%08x", req->window );
3291 fprintf( stderr, ", atom=%04x", req->atom );
3292 dump_varargs_unicode_str( ", name=", cur_size );
3295 static void dump_get_window_property_reply( const struct get_window_property_reply *req )
3297 dump_uint64( " data=", &req->data );
3300 static void dump_get_window_properties_request( const struct get_window_properties_request *req )
3302 fprintf( stderr, " window=%08x", req->window );
3305 static void dump_get_window_properties_reply( const struct get_window_properties_reply *req )
3307 fprintf( stderr, " total=%d", req->total );
3308 dump_varargs_properties( ", props=", cur_size );
3311 static void dump_create_winstation_request( const struct create_winstation_request *req )
3313 fprintf( stderr, " flags=%08x", req->flags );
3314 fprintf( stderr, ", access=%08x", req->access );
3315 fprintf( stderr, ", attributes=%08x", req->attributes );
3316 fprintf( stderr, ", rootdir=%04x", req->rootdir );
3317 dump_varargs_unicode_str( ", name=", cur_size );
3320 static void dump_create_winstation_reply( const struct create_winstation_reply *req )
3322 fprintf( stderr, " handle=%04x", req->handle );
3325 static void dump_open_winstation_request( const struct open_winstation_request *req )
3327 fprintf( stderr, " access=%08x", req->access );
3328 fprintf( stderr, ", attributes=%08x", req->attributes );
3329 fprintf( stderr, ", rootdir=%04x", req->rootdir );
3330 dump_varargs_unicode_str( ", name=", cur_size );
3333 static void dump_open_winstation_reply( const struct open_winstation_reply *req )
3335 fprintf( stderr, " handle=%04x", req->handle );
3338 static void dump_close_winstation_request( const struct close_winstation_request *req )
3340 fprintf( stderr, " handle=%04x", req->handle );
3343 static void dump_get_process_winstation_request( const struct get_process_winstation_request *req )
3347 static void dump_get_process_winstation_reply( const struct get_process_winstation_reply *req )
3349 fprintf( stderr, " handle=%04x", req->handle );
3352 static void dump_set_process_winstation_request( const struct set_process_winstation_request *req )
3354 fprintf( stderr, " handle=%04x", req->handle );
3357 static void dump_enum_winstation_request( const struct enum_winstation_request *req )
3359 fprintf( stderr, " index=%08x", req->index );
3362 static void dump_enum_winstation_reply( const struct enum_winstation_reply *req )
3364 fprintf( stderr, " next=%08x", req->next );
3365 dump_varargs_unicode_str( ", name=", cur_size );
3368 static void dump_create_desktop_request( const struct create_desktop_request *req )
3370 fprintf( stderr, " flags=%08x", req->flags );
3371 fprintf( stderr, ", access=%08x", req->access );
3372 fprintf( stderr, ", attributes=%08x", req->attributes );
3373 dump_varargs_unicode_str( ", name=", cur_size );
3376 static void dump_create_desktop_reply( const struct create_desktop_reply *req )
3378 fprintf( stderr, " handle=%04x", req->handle );
3381 static void dump_open_desktop_request( const struct open_desktop_request *req )
3383 fprintf( stderr, " winsta=%04x", req->winsta );
3384 fprintf( stderr, ", flags=%08x", req->flags );
3385 fprintf( stderr, ", access=%08x", req->access );
3386 fprintf( stderr, ", attributes=%08x", req->attributes );
3387 dump_varargs_unicode_str( ", name=", cur_size );
3390 static void dump_open_desktop_reply( const struct open_desktop_reply *req )
3392 fprintf( stderr, " handle=%04x", req->handle );
3395 static void dump_open_input_desktop_request( const struct open_input_desktop_request *req )
3397 fprintf( stderr, " flags=%08x", req->flags );
3398 fprintf( stderr, ", access=%08x", req->access );
3399 fprintf( stderr, ", attributes=%08x", req->attributes );
3402 static void dump_open_input_desktop_reply( const struct open_input_desktop_reply *req )
3404 fprintf( stderr, " handle=%04x", req->handle );
3407 static void dump_close_desktop_request( const struct close_desktop_request *req )
3409 fprintf( stderr, " handle=%04x", req->handle );
3412 static void dump_get_thread_desktop_request( const struct get_thread_desktop_request *req )
3414 fprintf( stderr, " tid=%04x", req->tid );
3417 static void dump_get_thread_desktop_reply( const struct get_thread_desktop_reply *req )
3419 fprintf( stderr, " handle=%04x", req->handle );
3422 static void dump_set_thread_desktop_request( const struct set_thread_desktop_request *req )
3424 fprintf( stderr, " handle=%04x", req->handle );
3427 static void dump_enum_desktop_request( const struct enum_desktop_request *req )
3429 fprintf( stderr, " winstation=%04x", req->winstation );
3430 fprintf( stderr, ", index=%08x", req->index );
3433 static void dump_enum_desktop_reply( const struct enum_desktop_reply *req )
3435 fprintf( stderr, " next=%08x", req->next );
3436 dump_varargs_unicode_str( ", name=", cur_size );
3439 static void dump_set_user_object_info_request( const struct set_user_object_info_request *req )
3441 fprintf( stderr, " handle=%04x", req->handle );
3442 fprintf( stderr, ", flags=%08x", req->flags );
3443 fprintf( stderr, ", obj_flags=%08x", req->obj_flags );
3446 static void dump_set_user_object_info_reply( const struct set_user_object_info_reply *req )
3448 fprintf( stderr, " is_desktop=%d", req->is_desktop );
3449 fprintf( stderr, ", old_obj_flags=%08x", req->old_obj_flags );
3450 dump_varargs_unicode_str( ", name=", cur_size );
3453 static void dump_register_hotkey_request( const struct register_hotkey_request *req )
3455 fprintf( stderr, " window=%08x", req->window );
3456 fprintf( stderr, ", id=%d", req->id );
3457 fprintf( stderr, ", flags=%08x", req->flags );
3458 fprintf( stderr, ", vkey=%08x", req->vkey );
3461 static void dump_register_hotkey_reply( const struct register_hotkey_reply *req )
3463 fprintf( stderr, " replaced=%d", req->replaced );
3464 fprintf( stderr, ", flags=%08x", req->flags );
3465 fprintf( stderr, ", vkey=%08x", req->vkey );
3468 static void dump_unregister_hotkey_request( const struct unregister_hotkey_request *req )
3470 fprintf( stderr, " window=%08x", req->window );
3471 fprintf( stderr, ", id=%d", req->id );
3474 static void dump_unregister_hotkey_reply( const struct unregister_hotkey_reply *req )
3476 fprintf( stderr, " flags=%08x", req->flags );
3477 fprintf( stderr, ", vkey=%08x", req->vkey );
3480 static void dump_attach_thread_input_request( const struct attach_thread_input_request *req )
3482 fprintf( stderr, " tid_from=%04x", req->tid_from );
3483 fprintf( stderr, ", tid_to=%04x", req->tid_to );
3484 fprintf( stderr, ", attach=%d", req->attach );
3487 static void dump_get_thread_input_request( const struct get_thread_input_request *req )
3489 fprintf( stderr, " tid=%04x", req->tid );
3492 static void dump_get_thread_input_reply( const struct get_thread_input_reply *req )
3494 fprintf( stderr, " focus=%08x", req->focus );
3495 fprintf( stderr, ", capture=%08x", req->capture );
3496 fprintf( stderr, ", active=%08x", req->active );
3497 fprintf( stderr, ", foreground=%08x", req->foreground );
3498 fprintf( stderr, ", menu_owner=%08x", req->menu_owner );
3499 fprintf( stderr, ", move_size=%08x", req->move_size );
3500 fprintf( stderr, ", caret=%08x", req->caret );
3501 fprintf( stderr, ", cursor=%08x", req->cursor );
3502 fprintf( stderr, ", show_count=%d", req->show_count );
3503 dump_rectangle( ", rect=", &req->rect );
3506 static void dump_get_last_input_time_request( const struct get_last_input_time_request *req )
3510 static void dump_get_last_input_time_reply( const struct get_last_input_time_reply *req )
3512 fprintf( stderr, " time=%08x", req->time );
3515 static void dump_get_key_state_request( const struct get_key_state_request *req )
3517 fprintf( stderr, " tid=%04x", req->tid );
3518 fprintf( stderr, ", key=%d", req->key );
3521 static void dump_get_key_state_reply( const struct get_key_state_reply *req )
3523 fprintf( stderr, " state=%02x", req->state );
3524 dump_varargs_bytes( ", keystate=", cur_size );
3527 static void dump_set_key_state_request( const struct set_key_state_request *req )
3529 fprintf( stderr, " tid=%04x", req->tid );
3530 fprintf( stderr, ", async=%d", req->async );
3531 dump_varargs_bytes( ", keystate=", cur_size );
3534 static void dump_set_foreground_window_request( const struct set_foreground_window_request *req )
3536 fprintf( stderr, " handle=%08x", req->handle );
3539 static void dump_set_foreground_window_reply( const struct set_foreground_window_reply *req )
3541 fprintf( stderr, " previous=%08x", req->previous );
3542 fprintf( stderr, ", send_msg_old=%d", req->send_msg_old );
3543 fprintf( stderr, ", send_msg_new=%d", req->send_msg_new );
3546 static void dump_set_focus_window_request( const struct set_focus_window_request *req )
3548 fprintf( stderr, " handle=%08x", req->handle );
3551 static void dump_set_focus_window_reply( const struct set_focus_window_reply *req )
3553 fprintf( stderr, " previous=%08x", req->previous );
3556 static void dump_set_active_window_request( const struct set_active_window_request *req )
3558 fprintf( stderr, " handle=%08x", req->handle );
3561 static void dump_set_active_window_reply( const struct set_active_window_reply *req )
3563 fprintf( stderr, " previous=%08x", req->previous );
3566 static void dump_set_capture_window_request( const struct set_capture_window_request *req )
3568 fprintf( stderr, " handle=%08x", req->handle );
3569 fprintf( stderr, ", flags=%08x", req->flags );
3572 static void dump_set_capture_window_reply( const struct set_capture_window_reply *req )
3574 fprintf( stderr, " previous=%08x", req->previous );
3575 fprintf( stderr, ", full_handle=%08x", req->full_handle );
3578 static void dump_set_caret_window_request( const struct set_caret_window_request *req )
3580 fprintf( stderr, " handle=%08x", req->handle );
3581 fprintf( stderr, ", width=%d", req->width );
3582 fprintf( stderr, ", height=%d", req->height );
3585 static void dump_set_caret_window_reply( const struct set_caret_window_reply *req )
3587 fprintf( stderr, " previous=%08x", req->previous );
3588 dump_rectangle( ", old_rect=", &req->old_rect );
3589 fprintf( stderr, ", old_hide=%d", req->old_hide );
3590 fprintf( stderr, ", old_state=%d", req->old_state );
3593 static void dump_set_caret_info_request( const struct set_caret_info_request *req )
3595 fprintf( stderr, " flags=%08x", req->flags );
3596 fprintf( stderr, ", handle=%08x", req->handle );
3597 fprintf( stderr, ", x=%d", req->x );
3598 fprintf( stderr, ", y=%d", req->y );
3599 fprintf( stderr, ", hide=%d", req->hide );
3600 fprintf( stderr, ", state=%d", req->state );
3603 static void dump_set_caret_info_reply( const struct set_caret_info_reply *req )
3605 fprintf( stderr, " full_handle=%08x", req->full_handle );
3606 dump_rectangle( ", old_rect=", &req->old_rect );
3607 fprintf( stderr, ", old_hide=%d", req->old_hide );
3608 fprintf( stderr, ", old_state=%d", req->old_state );
3611 static void dump_set_hook_request( const struct set_hook_request *req )
3613 fprintf( stderr, " id=%d", req->id );
3614 fprintf( stderr, ", pid=%04x", req->pid );
3615 fprintf( stderr, ", tid=%04x", req->tid );
3616 fprintf( stderr, ", event_min=%d", req->event_min );
3617 fprintf( stderr, ", event_max=%d", req->event_max );
3618 dump_uint64( ", proc=", &req->proc );
3619 fprintf( stderr, ", flags=%d", req->flags );
3620 fprintf( stderr, ", unicode=%d", req->unicode );
3621 dump_varargs_unicode_str( ", module=", cur_size );
3624 static void dump_set_hook_reply( const struct set_hook_reply *req )
3626 fprintf( stderr, " handle=%08x", req->handle );
3627 fprintf( stderr, ", active_hooks=%08x", req->active_hooks );
3630 static void dump_remove_hook_request( const struct remove_hook_request *req )
3632 fprintf( stderr, " handle=%08x", req->handle );
3633 dump_uint64( ", proc=", &req->proc );
3634 fprintf( stderr, ", id=%d", req->id );
3637 static void dump_remove_hook_reply( const struct remove_hook_reply *req )
3639 fprintf( stderr, " active_hooks=%08x", req->active_hooks );
3642 static void dump_start_hook_chain_request( const struct start_hook_chain_request *req )
3644 fprintf( stderr, " id=%d", req->id );
3645 fprintf( stderr, ", event=%d", req->event );
3646 fprintf( stderr, ", window=%08x", req->window );
3647 fprintf( stderr, ", object_id=%d", req->object_id );
3648 fprintf( stderr, ", child_id=%d", req->child_id );
3651 static void dump_start_hook_chain_reply( const struct start_hook_chain_reply *req )
3653 fprintf( stderr, " handle=%08x", req->handle );
3654 fprintf( stderr, ", pid=%04x", req->pid );
3655 fprintf( stderr, ", tid=%04x", req->tid );
3656 fprintf( stderr, ", unicode=%d", req->unicode );
3657 dump_uint64( ", proc=", &req->proc );
3658 fprintf( stderr, ", active_hooks=%08x", req->active_hooks );
3659 dump_varargs_unicode_str( ", module=", cur_size );
3662 static void dump_finish_hook_chain_request( const struct finish_hook_chain_request *req )
3664 fprintf( stderr, " id=%d", req->id );
3667 static void dump_get_hook_info_request( const struct get_hook_info_request *req )
3669 fprintf( stderr, " handle=%08x", req->handle );
3670 fprintf( stderr, ", get_next=%d", req->get_next );
3671 fprintf( stderr, ", event=%d", req->event );
3672 fprintf( stderr, ", window=%08x", req->window );
3673 fprintf( stderr, ", object_id=%d", req->object_id );
3674 fprintf( stderr, ", child_id=%d", req->child_id );
3677 static void dump_get_hook_info_reply( const struct get_hook_info_reply *req )
3679 fprintf( stderr, " handle=%08x", req->handle );
3680 fprintf( stderr, ", id=%d", req->id );
3681 fprintf( stderr, ", pid=%04x", req->pid );
3682 fprintf( stderr, ", tid=%04x", req->tid );
3683 dump_uint64( ", proc=", &req->proc );
3684 fprintf( stderr, ", unicode=%d", req->unicode );
3685 dump_varargs_unicode_str( ", module=", cur_size );
3688 static void dump_create_class_request( const struct create_class_request *req )
3690 fprintf( stderr, " local=%d", req->local );
3691 fprintf( stderr, ", atom=%04x", req->atom );
3692 fprintf( stderr, ", style=%08x", req->style );
3693 dump_uint64( ", instance=", &req->instance );
3694 fprintf( stderr, ", extra=%d", req->extra );
3695 fprintf( stderr, ", win_extra=%d", req->win_extra );
3696 dump_uint64( ", client_ptr=", &req->client_ptr );
3697 dump_varargs_unicode_str( ", name=", cur_size );
3700 static void dump_create_class_reply( const struct create_class_reply *req )
3702 fprintf( stderr, " atom=%04x", req->atom );
3705 static void dump_destroy_class_request( const struct destroy_class_request *req )
3707 fprintf( stderr, " atom=%04x", req->atom );
3708 dump_uint64( ", instance=", &req->instance );
3709 dump_varargs_unicode_str( ", name=", cur_size );
3712 static void dump_destroy_class_reply( const struct destroy_class_reply *req )
3714 dump_uint64( " client_ptr=", &req->client_ptr );
3717 static void dump_set_class_info_request( const struct set_class_info_request *req )
3719 fprintf( stderr, " window=%08x", req->window );
3720 fprintf( stderr, ", flags=%08x", req->flags );
3721 fprintf( stderr, ", atom=%04x", req->atom );
3722 fprintf( stderr, ", style=%08x", req->style );
3723 fprintf( stderr, ", win_extra=%d", req->win_extra );
3724 dump_uint64( ", instance=", &req->instance );
3725 fprintf( stderr, ", extra_offset=%d", req->extra_offset );
3726 fprintf( stderr, ", extra_size=%u", req->extra_size );
3727 dump_uint64( ", extra_value=", &req->extra_value );
3730 static void dump_set_class_info_reply( const struct set_class_info_reply *req )
3732 fprintf( stderr, " old_atom=%04x", req->old_atom );
3733 fprintf( stderr, ", old_style=%08x", req->old_style );
3734 fprintf( stderr, ", old_extra=%d", req->old_extra );
3735 fprintf( stderr, ", old_win_extra=%d", req->old_win_extra );
3736 dump_uint64( ", old_instance=", &req->old_instance );
3737 dump_uint64( ", old_extra_value=", &req->old_extra_value );
3740 static void dump_open_clipboard_request( const struct open_clipboard_request *req )
3742 fprintf( stderr, " window=%08x", req->window );
3745 static void dump_open_clipboard_reply( const struct open_clipboard_reply *req )
3747 fprintf( stderr, " owner=%08x", req->owner );
3750 static void dump_close_clipboard_request( const struct close_clipboard_request *req )
3754 static void dump_close_clipboard_reply( const struct close_clipboard_reply *req )
3756 fprintf( stderr, " viewer=%08x", req->viewer );
3757 fprintf( stderr, ", owner=%08x", req->owner );
3760 static void dump_empty_clipboard_request( const struct empty_clipboard_request *req )
3764 static void dump_set_clipboard_data_request( const struct set_clipboard_data_request *req )
3766 fprintf( stderr, " format=%08x", req->format );
3767 fprintf( stderr, ", lcid=%08x", req->lcid );
3768 dump_varargs_bytes( ", data=", cur_size );
3771 static void dump_set_clipboard_data_reply( const struct set_clipboard_data_reply *req )
3773 fprintf( stderr, " seqno=%08x", req->seqno );
3776 static void dump_get_clipboard_data_request( const struct get_clipboard_data_request *req )
3778 fprintf( stderr, " format=%08x", req->format );
3779 fprintf( stderr, ", render=%d", req->render );
3780 fprintf( stderr, ", cached=%d", req->cached );
3781 fprintf( stderr, ", seqno=%08x", req->seqno );
3784 static void dump_get_clipboard_data_reply( const struct get_clipboard_data_reply *req )
3786 fprintf( stderr, " from=%08x", req->from );
3787 fprintf( stderr, ", owner=%08x", req->owner );
3788 fprintf( stderr, ", seqno=%08x", req->seqno );
3789 fprintf( stderr, ", total=%u", req->total );
3790 dump_varargs_bytes( ", data=", cur_size );
3793 static void dump_get_clipboard_formats_request( const struct get_clipboard_formats_request *req )
3795 fprintf( stderr, " format=%08x", req->format );
3798 static void dump_get_clipboard_formats_reply( const struct get_clipboard_formats_reply *req )
3800 fprintf( stderr, " count=%08x", req->count );
3801 dump_varargs_uints( ", formats=", cur_size );
3804 static void dump_enum_clipboard_formats_request( const struct enum_clipboard_formats_request *req )
3806 fprintf( stderr, " previous=%08x", req->previous );
3809 static void dump_enum_clipboard_formats_reply( const struct enum_clipboard_formats_reply *req )
3811 fprintf( stderr, " format=%08x", req->format );
3814 static void dump_release_clipboard_request( const struct release_clipboard_request *req )
3816 fprintf( stderr, " owner=%08x", req->owner );
3819 static void dump_release_clipboard_reply( const struct release_clipboard_reply *req )
3821 fprintf( stderr, " viewer=%08x", req->viewer );
3822 fprintf( stderr, ", owner=%08x", req->owner );
3825 static void dump_get_clipboard_info_request( const struct get_clipboard_info_request *req )
3829 static void dump_get_clipboard_info_reply( const struct get_clipboard_info_reply *req )
3831 fprintf( stderr, " window=%08x", req->window );
3832 fprintf( stderr, ", owner=%08x", req->owner );
3833 fprintf( stderr, ", viewer=%08x", req->viewer );
3834 fprintf( stderr, ", seqno=%08x", req->seqno );
3837 static void dump_set_clipboard_viewer_request( const struct set_clipboard_viewer_request *req )
3839 fprintf( stderr, " viewer=%08x", req->viewer );
3840 fprintf( stderr, ", previous=%08x", req->previous );
3843 static void dump_set_clipboard_viewer_reply( const struct set_clipboard_viewer_reply *req )
3845 fprintf( stderr, " old_viewer=%08x", req->old_viewer );
3846 fprintf( stderr, ", owner=%08x", req->owner );
3849 static void dump_add_clipboard_listener_request( const struct add_clipboard_listener_request *req )
3851 fprintf( stderr, " window=%08x", req->window );
3854 static void dump_remove_clipboard_listener_request( const struct remove_clipboard_listener_request *req )
3856 fprintf( stderr, " window=%08x", req->window );
3859 static void dump_open_token_request( const struct open_token_request *req )
3861 fprintf( stderr, " handle=%04x", req->handle );
3862 fprintf( stderr, ", access=%08x", req->access );
3863 fprintf( stderr, ", attributes=%08x", req->attributes );
3864 fprintf( stderr, ", flags=%08x", req->flags );
3867 static void dump_open_token_reply( const struct open_token_reply *req )
3869 fprintf( stderr, " token=%04x", req->token );
3872 static void dump_set_global_windows_request( const struct set_global_windows_request *req )
3874 fprintf( stderr, " flags=%08x", req->flags );
3875 fprintf( stderr, ", shell_window=%08x", req->shell_window );
3876 fprintf( stderr, ", shell_listview=%08x", req->shell_listview );
3877 fprintf( stderr, ", progman_window=%08x", req->progman_window );
3878 fprintf( stderr, ", taskman_window=%08x", req->taskman_window );
3881 static void dump_set_global_windows_reply( const struct set_global_windows_reply *req )
3883 fprintf( stderr, " old_shell_window=%08x", req->old_shell_window );
3884 fprintf( stderr, ", old_shell_listview=%08x", req->old_shell_listview );
3885 fprintf( stderr, ", old_progman_window=%08x", req->old_progman_window );
3886 fprintf( stderr, ", old_taskman_window=%08x", req->old_taskman_window );
3889 static void dump_adjust_token_privileges_request( const struct adjust_token_privileges_request *req )
3891 fprintf( stderr, " handle=%04x", req->handle );
3892 fprintf( stderr, ", disable_all=%d", req->disable_all );
3893 fprintf( stderr, ", get_modified_state=%d", req->get_modified_state );
3894 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3897 static void dump_adjust_token_privileges_reply( const struct adjust_token_privileges_reply *req )
3899 fprintf( stderr, " len=%08x", req->len );
3900 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3903 static void dump_get_token_privileges_request( const struct get_token_privileges_request *req )
3905 fprintf( stderr, " handle=%04x", req->handle );
3908 static void dump_get_token_privileges_reply( const struct get_token_privileges_reply *req )
3910 fprintf( stderr, " len=%08x", req->len );
3911 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3914 static void dump_check_token_privileges_request( const struct check_token_privileges_request *req )
3916 fprintf( stderr, " handle=%04x", req->handle );
3917 fprintf( stderr, ", all_required=%d", req->all_required );
3918 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3921 static void dump_check_token_privileges_reply( const struct check_token_privileges_reply *req )
3923 fprintf( stderr, " has_privileges=%d", req->has_privileges );
3924 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3927 static void dump_duplicate_token_request( const struct duplicate_token_request *req )
3929 fprintf( stderr, " handle=%04x", req->handle );
3930 fprintf( stderr, ", access=%08x", req->access );
3931 fprintf( stderr, ", primary=%d", req->primary );
3932 fprintf( stderr, ", impersonation_level=%d", req->impersonation_level );
3933 dump_varargs_object_attributes( ", objattr=", cur_size );
3936 static void dump_duplicate_token_reply( const struct duplicate_token_reply *req )
3938 fprintf( stderr, " new_handle=%04x", req->new_handle );
3941 static void dump_access_check_request( const struct access_check_request *req )
3943 fprintf( stderr, " handle=%04x", req->handle );
3944 fprintf( stderr, ", desired_access=%08x", req->desired_access );
3945 fprintf( stderr, ", mapping_read=%08x", req->mapping_read );
3946 fprintf( stderr, ", mapping_write=%08x", req->mapping_write );
3947 fprintf( stderr, ", mapping_execute=%08x", req->mapping_execute );
3948 fprintf( stderr, ", mapping_all=%08x", req->mapping_all );
3949 dump_varargs_security_descriptor( ", sd=", cur_size );
3952 static void dump_access_check_reply( const struct access_check_reply *req )
3954 fprintf( stderr, " access_granted=%08x", req->access_granted );
3955 fprintf( stderr, ", access_status=%08x", req->access_status );
3956 fprintf( stderr, ", privileges_len=%08x", req->privileges_len );
3957 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3960 static void dump_get_token_sid_request( const struct get_token_sid_request *req )
3962 fprintf( stderr, " handle=%04x", req->handle );
3963 fprintf( stderr, ", which_sid=%08x", req->which_sid );
3966 static void dump_get_token_sid_reply( const struct get_token_sid_reply *req )
3968 fprintf( stderr, " sid_len=%u", req->sid_len );
3969 dump_varargs_SID( ", sid=", cur_size );
3972 static void dump_get_token_groups_request( const struct get_token_groups_request *req )
3974 fprintf( stderr, " handle=%04x", req->handle );
3977 static void dump_get_token_groups_reply( const struct get_token_groups_reply *req )
3979 fprintf( stderr, " user_len=%u", req->user_len );
3980 dump_varargs_token_groups( ", user=", cur_size );
3983 static void dump_get_token_default_dacl_request( const struct get_token_default_dacl_request *req )
3985 fprintf( stderr, " handle=%04x", req->handle );
3988 static void dump_get_token_default_dacl_reply( const struct get_token_default_dacl_reply *req )
3990 fprintf( stderr, " acl_len=%u", req->acl_len );
3991 dump_varargs_ACL( ", acl=", cur_size );
3994 static void dump_set_token_default_dacl_request( const struct set_token_default_dacl_request *req )
3996 fprintf( stderr, " handle=%04x", req->handle );
3997 dump_varargs_ACL( ", acl=", cur_size );
4000 static void dump_set_security_object_request( const struct set_security_object_request *req )
4002 fprintf( stderr, " handle=%04x", req->handle );
4003 fprintf( stderr, ", security_info=%08x", req->security_info );
4004 dump_varargs_security_descriptor( ", sd=", cur_size );
4007 static void dump_get_security_object_request( const struct get_security_object_request *req )
4009 fprintf( stderr, " handle=%04x", req->handle );
4010 fprintf( stderr, ", security_info=%08x", req->security_info );
4013 static void dump_get_security_object_reply( const struct get_security_object_reply *req )
4015 fprintf( stderr, " sd_len=%08x", req->sd_len );
4016 dump_varargs_security_descriptor( ", sd=", cur_size );
4019 static void dump_get_system_handles_request( const struct get_system_handles_request *req )
4023 static void dump_get_system_handles_reply( const struct get_system_handles_reply *req )
4025 fprintf( stderr, " count=%08x", req->count );
4026 dump_varargs_handle_infos( ", data=", cur_size );
4029 static void dump_create_mailslot_request( const struct create_mailslot_request *req )
4031 fprintf( stderr, " access=%08x", req->access );
4032 dump_timeout( ", read_timeout=", &req->read_timeout );
4033 fprintf( stderr, ", max_msgsize=%08x", req->max_msgsize );
4034 dump_varargs_object_attributes( ", objattr=", cur_size );
4037 static void dump_create_mailslot_reply( const struct create_mailslot_reply *req )
4039 fprintf( stderr, " handle=%04x", req->handle );
4042 static void dump_set_mailslot_info_request( const struct set_mailslot_info_request *req )
4044 fprintf( stderr, " handle=%04x", req->handle );
4045 dump_timeout( ", read_timeout=", &req->read_timeout );
4046 fprintf( stderr, ", flags=%08x", req->flags );
4049 static void dump_set_mailslot_info_reply( const struct set_mailslot_info_reply *req )
4051 dump_timeout( " read_timeout=", &req->read_timeout );
4052 fprintf( stderr, ", max_msgsize=%08x", req->max_msgsize );
4055 static void dump_create_directory_request( const struct create_directory_request *req )
4057 fprintf( stderr, " access=%08x", req->access );
4058 dump_varargs_object_attributes( ", objattr=", cur_size );
4061 static void dump_create_directory_reply( const struct create_directory_reply *req )
4063 fprintf( stderr, " handle=%04x", req->handle );
4066 static void dump_open_directory_request( const struct open_directory_request *req )
4068 fprintf( stderr, " access=%08x", req->access );
4069 fprintf( stderr, ", attributes=%08x", req->attributes );
4070 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4071 dump_varargs_unicode_str( ", directory_name=", cur_size );
4074 static void dump_open_directory_reply( const struct open_directory_reply *req )
4076 fprintf( stderr, " handle=%04x", req->handle );
4079 static void dump_get_directory_entry_request( const struct get_directory_entry_request *req )
4081 fprintf( stderr, " handle=%04x", req->handle );
4082 fprintf( stderr, ", index=%08x", req->index );
4085 static void dump_get_directory_entry_reply( const struct get_directory_entry_reply *req )
4087 fprintf( stderr, " name_len=%u", req->name_len );
4088 dump_varargs_unicode_str( ", name=", min(cur_size,req->name_len) );
4089 dump_varargs_unicode_str( ", type=", cur_size );
4092 static void dump_create_symlink_request( const struct create_symlink_request *req )
4094 fprintf( stderr, " access=%08x", req->access );
4095 dump_varargs_object_attributes( ", objattr=", cur_size );
4096 dump_varargs_unicode_str( ", target_name=", cur_size );
4099 static void dump_create_symlink_reply( const struct create_symlink_reply *req )
4101 fprintf( stderr, " handle=%04x", req->handle );
4104 static void dump_open_symlink_request( const struct open_symlink_request *req )
4106 fprintf( stderr, " access=%08x", req->access );
4107 fprintf( stderr, ", attributes=%08x", req->attributes );
4108 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4109 dump_varargs_unicode_str( ", name=", cur_size );
4112 static void dump_open_symlink_reply( const struct open_symlink_reply *req )
4114 fprintf( stderr, " handle=%04x", req->handle );
4117 static void dump_query_symlink_request( const struct query_symlink_request *req )
4119 fprintf( stderr, " handle=%04x", req->handle );
4122 static void dump_query_symlink_reply( const struct query_symlink_reply *req )
4124 fprintf( stderr, " total=%u", req->total );
4125 dump_varargs_unicode_str( ", target_name=", cur_size );
4128 static void dump_get_object_info_request( const struct get_object_info_request *req )
4130 fprintf( stderr, " handle=%04x", req->handle );
4133 static void dump_get_object_info_reply( const struct get_object_info_reply *req )
4135 fprintf( stderr, " access=%08x", req->access );
4136 fprintf( stderr, ", ref_count=%08x", req->ref_count );
4137 fprintf( stderr, ", handle_count=%08x", req->handle_count );
4138 fprintf( stderr, ", total=%u", req->total );
4139 dump_varargs_unicode_str( ", name=", cur_size );
4142 static void dump_get_object_type_request( const struct get_object_type_request *req )
4144 fprintf( stderr, " handle=%04x", req->handle );
4147 static void dump_get_object_type_reply( const struct get_object_type_reply *req )
4149 fprintf( stderr, " total=%u", req->total );
4150 dump_varargs_unicode_str( ", type=", cur_size );
4153 static void dump_unlink_object_request( const struct unlink_object_request *req )
4155 fprintf( stderr, " handle=%04x", req->handle );
4158 static void dump_get_token_impersonation_level_request( const struct get_token_impersonation_level_request *req )
4160 fprintf( stderr, " handle=%04x", req->handle );
4163 static void dump_get_token_impersonation_level_reply( const struct get_token_impersonation_level_reply *req )
4165 fprintf( stderr, " impersonation_level=%d", req->impersonation_level );
4168 static void dump_allocate_locally_unique_id_request( const struct allocate_locally_unique_id_request *req )
4172 static void dump_allocate_locally_unique_id_reply( const struct allocate_locally_unique_id_reply *req )
4174 dump_luid( " luid=", &req->luid );
4177 static void dump_create_device_manager_request( const struct create_device_manager_request *req )
4179 fprintf( stderr, " access=%08x", req->access );
4180 fprintf( stderr, ", attributes=%08x", req->attributes );
4183 static void dump_create_device_manager_reply( const struct create_device_manager_reply *req )
4185 fprintf( stderr, " handle=%04x", req->handle );
4188 static void dump_create_device_request( const struct create_device_request *req )
4190 fprintf( stderr, " access=%08x", req->access );
4191 fprintf( stderr, ", attributes=%08x", req->attributes );
4192 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4193 dump_uint64( ", user_ptr=", &req->user_ptr );
4194 fprintf( stderr, ", manager=%04x", req->manager );
4195 dump_varargs_unicode_str( ", name=", cur_size );
4198 static void dump_create_device_reply( const struct create_device_reply *req )
4200 fprintf( stderr, " handle=%04x", req->handle );
4203 static void dump_delete_device_request( const struct delete_device_request *req )
4205 fprintf( stderr, " handle=%04x", req->handle );
4208 static void dump_get_next_device_request_request( const struct get_next_device_request_request *req )
4210 fprintf( stderr, " manager=%04x", req->manager );
4211 fprintf( stderr, ", prev=%04x", req->prev );
4212 fprintf( stderr, ", status=%08x", req->status );
4215 static void dump_get_next_device_request_reply( const struct get_next_device_request_reply *req )
4217 dump_irp_params( " params=", &req->params );
4218 fprintf( stderr, ", next=%04x", req->next );
4219 fprintf( stderr, ", client_pid=%04x", req->client_pid );
4220 fprintf( stderr, ", client_tid=%04x", req->client_tid );
4221 fprintf( stderr, ", in_size=%u", req->in_size );
4222 fprintf( stderr, ", out_size=%u", req->out_size );
4223 dump_varargs_bytes( ", next_data=", cur_size );
4226 static void dump_make_process_system_request( const struct make_process_system_request *req )
4230 static void dump_make_process_system_reply( const struct make_process_system_reply *req )
4232 fprintf( stderr, " event=%04x", req->event );
4235 static void dump_get_token_statistics_request( const struct get_token_statistics_request *req )
4237 fprintf( stderr, " handle=%04x", req->handle );
4240 static void dump_get_token_statistics_reply( const struct get_token_statistics_reply *req )
4242 dump_luid( " token_id=", &req->token_id );
4243 dump_luid( ", modified_id=", &req->modified_id );
4244 fprintf( stderr, ", primary=%d", req->primary );
4245 fprintf( stderr, ", impersonation_level=%d", req->impersonation_level );
4246 fprintf( stderr, ", group_count=%d", req->group_count );
4247 fprintf( stderr, ", privilege_count=%d", req->privilege_count );
4250 static void dump_create_completion_request( const struct create_completion_request *req )
4252 fprintf( stderr, " access=%08x", req->access );
4253 fprintf( stderr, ", concurrent=%08x", req->concurrent );
4254 dump_varargs_object_attributes( ", objattr=", cur_size );
4257 static void dump_create_completion_reply( const struct create_completion_reply *req )
4259 fprintf( stderr, " handle=%04x", req->handle );
4262 static void dump_open_completion_request( const struct open_completion_request *req )
4264 fprintf( stderr, " access=%08x", req->access );
4265 fprintf( stderr, ", attributes=%08x", req->attributes );
4266 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4267 dump_varargs_unicode_str( ", filename=", cur_size );
4270 static void dump_open_completion_reply( const struct open_completion_reply *req )
4272 fprintf( stderr, " handle=%04x", req->handle );
4275 static void dump_add_completion_request( const struct add_completion_request *req )
4277 fprintf( stderr, " handle=%04x", req->handle );
4278 dump_uint64( ", ckey=", &req->ckey );
4279 dump_uint64( ", cvalue=", &req->cvalue );
4280 dump_uint64( ", information=", &req->information );
4281 fprintf( stderr, ", status=%08x", req->status );
4284 static void dump_remove_completion_request( const struct remove_completion_request *req )
4286 fprintf( stderr, " handle=%04x", req->handle );
4289 static void dump_remove_completion_reply( const struct remove_completion_reply *req )
4291 dump_uint64( " ckey=", &req->ckey );
4292 dump_uint64( ", cvalue=", &req->cvalue );
4293 dump_uint64( ", information=", &req->information );
4294 fprintf( stderr, ", status=%08x", req->status );
4297 static void dump_query_completion_request( const struct query_completion_request *req )
4299 fprintf( stderr, " handle=%04x", req->handle );
4302 static void dump_query_completion_reply( const struct query_completion_reply *req )
4304 fprintf( stderr, " depth=%08x", req->depth );
4307 static void dump_set_completion_info_request( const struct set_completion_info_request *req )
4309 fprintf( stderr, " handle=%04x", req->handle );
4310 dump_uint64( ", ckey=", &req->ckey );
4311 fprintf( stderr, ", chandle=%04x", req->chandle );
4314 static void dump_add_fd_completion_request( const struct add_fd_completion_request *req )
4316 fprintf( stderr, " handle=%04x", req->handle );
4317 dump_uint64( ", cvalue=", &req->cvalue );
4318 dump_uint64( ", information=", &req->information );
4319 fprintf( stderr, ", status=%08x", req->status );
4322 static void dump_set_fd_disp_info_request( const struct set_fd_disp_info_request *req )
4324 fprintf( stderr, " handle=%04x", req->handle );
4325 fprintf( stderr, ", unlink=%d", req->unlink );
4328 static void dump_set_fd_name_info_request( const struct set_fd_name_info_request *req )
4330 fprintf( stderr, " handle=%04x", req->handle );
4331 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4332 fprintf( stderr, ", link=%d", req->link );
4333 dump_varargs_string( ", filename=", cur_size );
4336 static void dump_get_window_layered_info_request( const struct get_window_layered_info_request *req )
4338 fprintf( stderr, " handle=%08x", req->handle );
4341 static void dump_get_window_layered_info_reply( const struct get_window_layered_info_reply *req )
4343 fprintf( stderr, " color_key=%08x", req->color_key );
4344 fprintf( stderr, ", alpha=%08x", req->alpha );
4345 fprintf( stderr, ", flags=%08x", req->flags );
4348 static void dump_set_window_layered_info_request( const struct set_window_layered_info_request *req )
4350 fprintf( stderr, " handle=%08x", req->handle );
4351 fprintf( stderr, ", color_key=%08x", req->color_key );
4352 fprintf( stderr, ", alpha=%08x", req->alpha );
4353 fprintf( stderr, ", flags=%08x", req->flags );
4356 static void dump_alloc_user_handle_request( const struct alloc_user_handle_request *req )
4360 static void dump_alloc_user_handle_reply( const struct alloc_user_handle_reply *req )
4362 fprintf( stderr, " handle=%08x", req->handle );
4365 static void dump_free_user_handle_request( const struct free_user_handle_request *req )
4367 fprintf( stderr, " handle=%08x", req->handle );
4370 static void dump_set_cursor_request( const struct set_cursor_request *req )
4372 fprintf( stderr, " flags=%08x", req->flags );
4373 fprintf( stderr, ", handle=%08x", req->handle );
4374 fprintf( stderr, ", show_count=%d", req->show_count );
4375 fprintf( stderr, ", x=%d", req->x );
4376 fprintf( stderr, ", y=%d", req->y );
4377 dump_rectangle( ", clip=", &req->clip );
4378 fprintf( stderr, ", clip_msg=%08x", req->clip_msg );
4381 static void dump_set_cursor_reply( const struct set_cursor_reply *req )
4383 fprintf( stderr, " prev_handle=%08x", req->prev_handle );
4384 fprintf( stderr, ", prev_count=%d", req->prev_count );
4385 fprintf( stderr, ", prev_x=%d", req->prev_x );
4386 fprintf( stderr, ", prev_y=%d", req->prev_y );
4387 fprintf( stderr, ", new_x=%d", req->new_x );
4388 fprintf( stderr, ", new_y=%d", req->new_y );
4389 dump_rectangle( ", new_clip=", &req->new_clip );
4390 fprintf( stderr, ", last_change=%08x", req->last_change );
4393 static void dump_update_rawinput_devices_request( const struct update_rawinput_devices_request *req )
4395 dump_varargs_rawinput_devices( " devices=", cur_size );
4398 static void dump_get_suspend_context_request( const struct get_suspend_context_request *req )
4402 static void dump_get_suspend_context_reply( const struct get_suspend_context_reply *req )
4404 dump_varargs_context( " context=", cur_size );
4407 static void dump_set_suspend_context_request( const struct set_suspend_context_request *req )
4409 dump_varargs_context( " context=", cur_size );
4412 static void dump_create_job_request( const struct create_job_request *req )
4414 fprintf( stderr, " access=%08x", req->access );
4415 dump_varargs_object_attributes( ", objattr=", cur_size );
4418 static void dump_create_job_reply( const struct create_job_reply *req )
4420 fprintf( stderr, " handle=%04x", req->handle );
4423 static void dump_open_job_request( const struct open_job_request *req )
4425 fprintf( stderr, " access=%08x", req->access );
4426 fprintf( stderr, ", attributes=%08x", req->attributes );
4427 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4428 dump_varargs_unicode_str( ", name=", cur_size );
4431 static void dump_open_job_reply( const struct open_job_reply *req )
4433 fprintf( stderr, " handle=%04x", req->handle );
4436 static void dump_assign_job_request( const struct assign_job_request *req )
4438 fprintf( stderr, " job=%04x", req->job );
4439 fprintf( stderr, ", process=%04x", req->process );
4442 static void dump_process_in_job_request( const struct process_in_job_request *req )
4444 fprintf( stderr, " job=%04x", req->job );
4445 fprintf( stderr, ", process=%04x", req->process );
4448 static void dump_set_job_limits_request( const struct set_job_limits_request *req )
4450 fprintf( stderr, " handle=%04x", req->handle );
4451 fprintf( stderr, ", limit_flags=%08x", req->limit_flags );
4454 static void dump_set_job_completion_port_request( const struct set_job_completion_port_request *req )
4456 fprintf( stderr, " job=%04x", req->job );
4457 fprintf( stderr, ", port=%04x", req->port );
4458 dump_uint64( ", key=", &req->key );
4461 static void dump_terminate_job_request( const struct terminate_job_request *req )
4463 fprintf( stderr, " handle=%04x", req->handle );
4464 fprintf( stderr, ", status=%d", req->status );
4467 static const dump_func req_dumpers[REQ_NB_REQUESTS] = {
4468 (dump_func)dump_new_process_request,
4469 (dump_func)dump_get_new_process_info_request,
4470 (dump_func)dump_new_thread_request,
4471 (dump_func)dump_get_startup_info_request,
4472 (dump_func)dump_init_process_done_request,
4473 (dump_func)dump_init_thread_request,
4474 (dump_func)dump_terminate_process_request,
4475 (dump_func)dump_terminate_thread_request,
4476 (dump_func)dump_get_process_info_request,
4477 (dump_func)dump_get_process_vm_counters_request,
4478 (dump_func)dump_set_process_info_request,
4479 (dump_func)dump_get_thread_info_request,
4480 (dump_func)dump_get_thread_times_request,
4481 (dump_func)dump_set_thread_info_request,
4482 (dump_func)dump_get_dll_info_request,
4483 (dump_func)dump_suspend_thread_request,
4484 (dump_func)dump_resume_thread_request,
4485 (dump_func)dump_load_dll_request,
4486 (dump_func)dump_unload_dll_request,
4487 (dump_func)dump_queue_apc_request,
4488 (dump_func)dump_get_apc_result_request,
4489 (dump_func)dump_close_handle_request,
4490 (dump_func)dump_set_handle_info_request,
4491 (dump_func)dump_dup_handle_request,
4492 (dump_func)dump_open_process_request,
4493 (dump_func)dump_open_thread_request,
4494 (dump_func)dump_select_request,
4495 (dump_func)dump_create_event_request,
4496 (dump_func)dump_event_op_request,
4497 (dump_func)dump_query_event_request,
4498 (dump_func)dump_open_event_request,
4499 (dump_func)dump_create_keyed_event_request,
4500 (dump_func)dump_open_keyed_event_request,
4501 (dump_func)dump_create_mutex_request,
4502 (dump_func)dump_release_mutex_request,
4503 (dump_func)dump_open_mutex_request,
4504 (dump_func)dump_query_mutex_request,
4505 (dump_func)dump_create_semaphore_request,
4506 (dump_func)dump_release_semaphore_request,
4507 (dump_func)dump_query_semaphore_request,
4508 (dump_func)dump_open_semaphore_request,
4509 (dump_func)dump_create_file_request,
4510 (dump_func)dump_open_file_object_request,
4511 (dump_func)dump_alloc_file_handle_request,
4512 (dump_func)dump_get_handle_unix_name_request,
4513 (dump_func)dump_get_handle_fd_request,
4514 (dump_func)dump_get_directory_cache_entry_request,
4515 (dump_func)dump_flush_request,
4516 (dump_func)dump_lock_file_request,
4517 (dump_func)dump_unlock_file_request,
4518 (dump_func)dump_create_socket_request,
4519 (dump_func)dump_accept_socket_request,
4520 (dump_func)dump_accept_into_socket_request,
4521 (dump_func)dump_set_socket_event_request,
4522 (dump_func)dump_get_socket_event_request,
4523 (dump_func)dump_get_socket_info_request,
4524 (dump_func)dump_enable_socket_event_request,
4525 (dump_func)dump_set_socket_deferred_request,
4526 (dump_func)dump_alloc_console_request,
4527 (dump_func)dump_free_console_request,
4528 (dump_func)dump_get_console_renderer_events_request,
4529 (dump_func)dump_open_console_request,
4530 (dump_func)dump_get_console_wait_event_request,
4531 (dump_func)dump_get_console_mode_request,
4532 (dump_func)dump_set_console_mode_request,
4533 (dump_func)dump_set_console_input_info_request,
4534 (dump_func)dump_get_console_input_info_request,
4535 (dump_func)dump_append_console_input_history_request,
4536 (dump_func)dump_get_console_input_history_request,
4537 (dump_func)dump_create_console_output_request,
4538 (dump_func)dump_set_console_output_info_request,
4539 (dump_func)dump_get_console_output_info_request,
4540 (dump_func)dump_write_console_input_request,
4541 (dump_func)dump_read_console_input_request,
4542 (dump_func)dump_write_console_output_request,
4543 (dump_func)dump_fill_console_output_request,
4544 (dump_func)dump_read_console_output_request,
4545 (dump_func)dump_move_console_output_request,
4546 (dump_func)dump_send_console_signal_request,
4547 (dump_func)dump_read_directory_changes_request,
4548 (dump_func)dump_read_change_request,
4549 (dump_func)dump_create_mapping_request,
4550 (dump_func)dump_open_mapping_request,
4551 (dump_func)dump_get_mapping_info_request,
4552 (dump_func)dump_get_mapping_committed_range_request,
4553 (dump_func)dump_add_mapping_committed_range_request,
4554 (dump_func)dump_create_snapshot_request,
4555 (dump_func)dump_next_process_request,
4556 (dump_func)dump_next_thread_request,
4557 (dump_func)dump_wait_debug_event_request,
4558 (dump_func)dump_queue_exception_event_request,
4559 (dump_func)dump_get_exception_status_request,
4560 (dump_func)dump_continue_debug_event_request,
4561 (dump_func)dump_debug_process_request,
4562 (dump_func)dump_debug_break_request,
4563 (dump_func)dump_set_debugger_kill_on_exit_request,
4564 (dump_func)dump_read_process_memory_request,
4565 (dump_func)dump_write_process_memory_request,
4566 (dump_func)dump_create_key_request,
4567 (dump_func)dump_open_key_request,
4568 (dump_func)dump_delete_key_request,
4569 (dump_func)dump_flush_key_request,
4570 (dump_func)dump_enum_key_request,
4571 (dump_func)dump_set_key_value_request,
4572 (dump_func)dump_get_key_value_request,
4573 (dump_func)dump_enum_key_value_request,
4574 (dump_func)dump_delete_key_value_request,
4575 (dump_func)dump_load_registry_request,
4576 (dump_func)dump_unload_registry_request,
4577 (dump_func)dump_save_registry_request,
4578 (dump_func)dump_set_registry_notification_request,
4579 (dump_func)dump_create_timer_request,
4580 (dump_func)dump_open_timer_request,
4581 (dump_func)dump_set_timer_request,
4582 (dump_func)dump_cancel_timer_request,
4583 (dump_func)dump_get_timer_info_request,
4584 (dump_func)dump_get_thread_context_request,
4585 (dump_func)dump_set_thread_context_request,
4586 (dump_func)dump_get_selector_entry_request,
4587 (dump_func)dump_add_atom_request,
4588 (dump_func)dump_delete_atom_request,
4589 (dump_func)dump_find_atom_request,
4590 (dump_func)dump_get_atom_information_request,
4591 (dump_func)dump_set_atom_information_request,
4592 (dump_func)dump_empty_atom_table_request,
4593 (dump_func)dump_init_atom_table_request,
4594 (dump_func)dump_get_msg_queue_request,
4595 (dump_func)dump_set_queue_fd_request,
4596 (dump_func)dump_set_queue_mask_request,
4597 (dump_func)dump_get_queue_status_request,
4598 (dump_func)dump_get_process_idle_event_request,
4599 (dump_func)dump_send_message_request,
4600 (dump_func)dump_post_quit_message_request,
4601 (dump_func)dump_send_hardware_message_request,
4602 (dump_func)dump_get_message_request,
4603 (dump_func)dump_reply_message_request,
4604 (dump_func)dump_accept_hardware_message_request,
4605 (dump_func)dump_get_message_reply_request,
4606 (dump_func)dump_set_win_timer_request,
4607 (dump_func)dump_kill_win_timer_request,
4608 (dump_func)dump_is_window_hung_request,
4609 (dump_func)dump_get_serial_info_request,
4610 (dump_func)dump_set_serial_info_request,
4611 (dump_func)dump_register_async_request,
4612 (dump_func)dump_cancel_async_request,
4613 (dump_func)dump_get_async_result_request,
4614 (dump_func)dump_read_request,
4615 (dump_func)dump_write_request,
4616 (dump_func)dump_ioctl_request,
4617 (dump_func)dump_set_irp_result_request,
4618 (dump_func)dump_create_named_pipe_request,
4619 (dump_func)dump_get_named_pipe_info_request,
4620 (dump_func)dump_set_named_pipe_info_request,
4621 (dump_func)dump_create_window_request,
4622 (dump_func)dump_destroy_window_request,
4623 (dump_func)dump_get_desktop_window_request,
4624 (dump_func)dump_set_window_owner_request,
4625 (dump_func)dump_get_window_info_request,
4626 (dump_func)dump_set_window_info_request,
4627 (dump_func)dump_set_parent_request,
4628 (dump_func)dump_get_window_parents_request,
4629 (dump_func)dump_get_window_children_request,
4630 (dump_func)dump_get_window_children_from_point_request,
4631 (dump_func)dump_get_window_tree_request,
4632 (dump_func)dump_set_window_pos_request,
4633 (dump_func)dump_get_window_rectangles_request,
4634 (dump_func)dump_get_window_text_request,
4635 (dump_func)dump_set_window_text_request,
4636 (dump_func)dump_get_windows_offset_request,
4637 (dump_func)dump_get_visible_region_request,
4638 (dump_func)dump_get_surface_region_request,
4639 (dump_func)dump_get_window_region_request,
4640 (dump_func)dump_set_window_region_request,
4641 (dump_func)dump_get_update_region_request,
4642 (dump_func)dump_update_window_zorder_request,
4643 (dump_func)dump_redraw_window_request,
4644 (dump_func)dump_set_window_property_request,
4645 (dump_func)dump_remove_window_property_request,
4646 (dump_func)dump_get_window_property_request,
4647 (dump_func)dump_get_window_properties_request,
4648 (dump_func)dump_create_winstation_request,
4649 (dump_func)dump_open_winstation_request,
4650 (dump_func)dump_close_winstation_request,
4651 (dump_func)dump_get_process_winstation_request,
4652 (dump_func)dump_set_process_winstation_request,
4653 (dump_func)dump_enum_winstation_request,
4654 (dump_func)dump_create_desktop_request,
4655 (dump_func)dump_open_desktop_request,
4656 (dump_func)dump_open_input_desktop_request,
4657 (dump_func)dump_close_desktop_request,
4658 (dump_func)dump_get_thread_desktop_request,
4659 (dump_func)dump_set_thread_desktop_request,
4660 (dump_func)dump_enum_desktop_request,
4661 (dump_func)dump_set_user_object_info_request,
4662 (dump_func)dump_register_hotkey_request,
4663 (dump_func)dump_unregister_hotkey_request,
4664 (dump_func)dump_attach_thread_input_request,
4665 (dump_func)dump_get_thread_input_request,
4666 (dump_func)dump_get_last_input_time_request,
4667 (dump_func)dump_get_key_state_request,
4668 (dump_func)dump_set_key_state_request,
4669 (dump_func)dump_set_foreground_window_request,
4670 (dump_func)dump_set_focus_window_request,
4671 (dump_func)dump_set_active_window_request,
4672 (dump_func)dump_set_capture_window_request,
4673 (dump_func)dump_set_caret_window_request,
4674 (dump_func)dump_set_caret_info_request,
4675 (dump_func)dump_set_hook_request,
4676 (dump_func)dump_remove_hook_request,
4677 (dump_func)dump_start_hook_chain_request,
4678 (dump_func)dump_finish_hook_chain_request,
4679 (dump_func)dump_get_hook_info_request,
4680 (dump_func)dump_create_class_request,
4681 (dump_func)dump_destroy_class_request,
4682 (dump_func)dump_set_class_info_request,
4683 (dump_func)dump_open_clipboard_request,
4684 (dump_func)dump_close_clipboard_request,
4685 (dump_func)dump_empty_clipboard_request,
4686 (dump_func)dump_set_clipboard_data_request,
4687 (dump_func)dump_get_clipboard_data_request,
4688 (dump_func)dump_get_clipboard_formats_request,
4689 (dump_func)dump_enum_clipboard_formats_request,
4690 (dump_func)dump_release_clipboard_request,
4691 (dump_func)dump_get_clipboard_info_request,
4692 (dump_func)dump_set_clipboard_viewer_request,
4693 (dump_func)dump_add_clipboard_listener_request,
4694 (dump_func)dump_remove_clipboard_listener_request,
4695 (dump_func)dump_open_token_request,
4696 (dump_func)dump_set_global_windows_request,
4697 (dump_func)dump_adjust_token_privileges_request,
4698 (dump_func)dump_get_token_privileges_request,
4699 (dump_func)dump_check_token_privileges_request,
4700 (dump_func)dump_duplicate_token_request,
4701 (dump_func)dump_access_check_request,
4702 (dump_func)dump_get_token_sid_request,
4703 (dump_func)dump_get_token_groups_request,
4704 (dump_func)dump_get_token_default_dacl_request,
4705 (dump_func)dump_set_token_default_dacl_request,
4706 (dump_func)dump_set_security_object_request,
4707 (dump_func)dump_get_security_object_request,
4708 (dump_func)dump_get_system_handles_request,
4709 (dump_func)dump_create_mailslot_request,
4710 (dump_func)dump_set_mailslot_info_request,
4711 (dump_func)dump_create_directory_request,
4712 (dump_func)dump_open_directory_request,
4713 (dump_func)dump_get_directory_entry_request,
4714 (dump_func)dump_create_symlink_request,
4715 (dump_func)dump_open_symlink_request,
4716 (dump_func)dump_query_symlink_request,
4717 (dump_func)dump_get_object_info_request,
4718 (dump_func)dump_get_object_type_request,
4719 (dump_func)dump_unlink_object_request,
4720 (dump_func)dump_get_token_impersonation_level_request,
4721 (dump_func)dump_allocate_locally_unique_id_request,
4722 (dump_func)dump_create_device_manager_request,
4723 (dump_func)dump_create_device_request,
4724 (dump_func)dump_delete_device_request,
4725 (dump_func)dump_get_next_device_request_request,
4726 (dump_func)dump_make_process_system_request,
4727 (dump_func)dump_get_token_statistics_request,
4728 (dump_func)dump_create_completion_request,
4729 (dump_func)dump_open_completion_request,
4730 (dump_func)dump_add_completion_request,
4731 (dump_func)dump_remove_completion_request,
4732 (dump_func)dump_query_completion_request,
4733 (dump_func)dump_set_completion_info_request,
4734 (dump_func)dump_add_fd_completion_request,
4735 (dump_func)dump_set_fd_disp_info_request,
4736 (dump_func)dump_set_fd_name_info_request,
4737 (dump_func)dump_get_window_layered_info_request,
4738 (dump_func)dump_set_window_layered_info_request,
4739 (dump_func)dump_alloc_user_handle_request,
4740 (dump_func)dump_free_user_handle_request,
4741 (dump_func)dump_set_cursor_request,
4742 (dump_func)dump_update_rawinput_devices_request,
4743 (dump_func)dump_get_suspend_context_request,
4744 (dump_func)dump_set_suspend_context_request,
4745 (dump_func)dump_create_job_request,
4746 (dump_func)dump_open_job_request,
4747 (dump_func)dump_assign_job_request,
4748 (dump_func)dump_process_in_job_request,
4749 (dump_func)dump_set_job_limits_request,
4750 (dump_func)dump_set_job_completion_port_request,
4751 (dump_func)dump_terminate_job_request,
4754 static const dump_func reply_dumpers[REQ_NB_REQUESTS] = {
4755 (dump_func)dump_new_process_reply,
4756 (dump_func)dump_get_new_process_info_reply,
4757 (dump_func)dump_new_thread_reply,
4758 (dump_func)dump_get_startup_info_reply,
4759 NULL,
4760 (dump_func)dump_init_thread_reply,
4761 (dump_func)dump_terminate_process_reply,
4762 (dump_func)dump_terminate_thread_reply,
4763 (dump_func)dump_get_process_info_reply,
4764 (dump_func)dump_get_process_vm_counters_reply,
4765 NULL,
4766 (dump_func)dump_get_thread_info_reply,
4767 (dump_func)dump_get_thread_times_reply,
4768 NULL,
4769 (dump_func)dump_get_dll_info_reply,
4770 (dump_func)dump_suspend_thread_reply,
4771 (dump_func)dump_resume_thread_reply,
4772 NULL,
4773 NULL,
4774 (dump_func)dump_queue_apc_reply,
4775 (dump_func)dump_get_apc_result_reply,
4776 NULL,
4777 (dump_func)dump_set_handle_info_reply,
4778 (dump_func)dump_dup_handle_reply,
4779 (dump_func)dump_open_process_reply,
4780 (dump_func)dump_open_thread_reply,
4781 (dump_func)dump_select_reply,
4782 (dump_func)dump_create_event_reply,
4783 NULL,
4784 (dump_func)dump_query_event_reply,
4785 (dump_func)dump_open_event_reply,
4786 (dump_func)dump_create_keyed_event_reply,
4787 (dump_func)dump_open_keyed_event_reply,
4788 (dump_func)dump_create_mutex_reply,
4789 (dump_func)dump_release_mutex_reply,
4790 (dump_func)dump_open_mutex_reply,
4791 (dump_func)dump_query_mutex_reply,
4792 (dump_func)dump_create_semaphore_reply,
4793 (dump_func)dump_release_semaphore_reply,
4794 (dump_func)dump_query_semaphore_reply,
4795 (dump_func)dump_open_semaphore_reply,
4796 (dump_func)dump_create_file_reply,
4797 (dump_func)dump_open_file_object_reply,
4798 (dump_func)dump_alloc_file_handle_reply,
4799 (dump_func)dump_get_handle_unix_name_reply,
4800 (dump_func)dump_get_handle_fd_reply,
4801 (dump_func)dump_get_directory_cache_entry_reply,
4802 (dump_func)dump_flush_reply,
4803 (dump_func)dump_lock_file_reply,
4804 NULL,
4805 (dump_func)dump_create_socket_reply,
4806 (dump_func)dump_accept_socket_reply,
4807 NULL,
4808 NULL,
4809 (dump_func)dump_get_socket_event_reply,
4810 (dump_func)dump_get_socket_info_reply,
4811 NULL,
4812 NULL,
4813 (dump_func)dump_alloc_console_reply,
4814 NULL,
4815 (dump_func)dump_get_console_renderer_events_reply,
4816 (dump_func)dump_open_console_reply,
4817 (dump_func)dump_get_console_wait_event_reply,
4818 (dump_func)dump_get_console_mode_reply,
4819 NULL,
4820 NULL,
4821 (dump_func)dump_get_console_input_info_reply,
4822 NULL,
4823 (dump_func)dump_get_console_input_history_reply,
4824 (dump_func)dump_create_console_output_reply,
4825 NULL,
4826 (dump_func)dump_get_console_output_info_reply,
4827 (dump_func)dump_write_console_input_reply,
4828 (dump_func)dump_read_console_input_reply,
4829 (dump_func)dump_write_console_output_reply,
4830 (dump_func)dump_fill_console_output_reply,
4831 (dump_func)dump_read_console_output_reply,
4832 NULL,
4833 NULL,
4834 NULL,
4835 (dump_func)dump_read_change_reply,
4836 (dump_func)dump_create_mapping_reply,
4837 (dump_func)dump_open_mapping_reply,
4838 (dump_func)dump_get_mapping_info_reply,
4839 (dump_func)dump_get_mapping_committed_range_reply,
4840 NULL,
4841 (dump_func)dump_create_snapshot_reply,
4842 (dump_func)dump_next_process_reply,
4843 (dump_func)dump_next_thread_reply,
4844 (dump_func)dump_wait_debug_event_reply,
4845 (dump_func)dump_queue_exception_event_reply,
4846 (dump_func)dump_get_exception_status_reply,
4847 NULL,
4848 NULL,
4849 (dump_func)dump_debug_break_reply,
4850 NULL,
4851 (dump_func)dump_read_process_memory_reply,
4852 NULL,
4853 (dump_func)dump_create_key_reply,
4854 (dump_func)dump_open_key_reply,
4855 NULL,
4856 NULL,
4857 (dump_func)dump_enum_key_reply,
4858 NULL,
4859 (dump_func)dump_get_key_value_reply,
4860 (dump_func)dump_enum_key_value_reply,
4861 NULL,
4862 NULL,
4863 NULL,
4864 NULL,
4865 NULL,
4866 (dump_func)dump_create_timer_reply,
4867 (dump_func)dump_open_timer_reply,
4868 (dump_func)dump_set_timer_reply,
4869 (dump_func)dump_cancel_timer_reply,
4870 (dump_func)dump_get_timer_info_reply,
4871 (dump_func)dump_get_thread_context_reply,
4872 (dump_func)dump_set_thread_context_reply,
4873 (dump_func)dump_get_selector_entry_reply,
4874 (dump_func)dump_add_atom_reply,
4875 NULL,
4876 (dump_func)dump_find_atom_reply,
4877 (dump_func)dump_get_atom_information_reply,
4878 NULL,
4879 NULL,
4880 (dump_func)dump_init_atom_table_reply,
4881 (dump_func)dump_get_msg_queue_reply,
4882 NULL,
4883 (dump_func)dump_set_queue_mask_reply,
4884 (dump_func)dump_get_queue_status_reply,
4885 (dump_func)dump_get_process_idle_event_reply,
4886 NULL,
4887 NULL,
4888 (dump_func)dump_send_hardware_message_reply,
4889 (dump_func)dump_get_message_reply,
4890 NULL,
4891 NULL,
4892 (dump_func)dump_get_message_reply_reply,
4893 (dump_func)dump_set_win_timer_reply,
4894 NULL,
4895 (dump_func)dump_is_window_hung_reply,
4896 (dump_func)dump_get_serial_info_reply,
4897 NULL,
4898 NULL,
4899 NULL,
4900 (dump_func)dump_get_async_result_reply,
4901 (dump_func)dump_read_reply,
4902 (dump_func)dump_write_reply,
4903 (dump_func)dump_ioctl_reply,
4904 NULL,
4905 (dump_func)dump_create_named_pipe_reply,
4906 (dump_func)dump_get_named_pipe_info_reply,
4907 NULL,
4908 (dump_func)dump_create_window_reply,
4909 NULL,
4910 (dump_func)dump_get_desktop_window_reply,
4911 (dump_func)dump_set_window_owner_reply,
4912 (dump_func)dump_get_window_info_reply,
4913 (dump_func)dump_set_window_info_reply,
4914 (dump_func)dump_set_parent_reply,
4915 (dump_func)dump_get_window_parents_reply,
4916 (dump_func)dump_get_window_children_reply,
4917 (dump_func)dump_get_window_children_from_point_reply,
4918 (dump_func)dump_get_window_tree_reply,
4919 (dump_func)dump_set_window_pos_reply,
4920 (dump_func)dump_get_window_rectangles_reply,
4921 (dump_func)dump_get_window_text_reply,
4922 NULL,
4923 (dump_func)dump_get_windows_offset_reply,
4924 (dump_func)dump_get_visible_region_reply,
4925 (dump_func)dump_get_surface_region_reply,
4926 (dump_func)dump_get_window_region_reply,
4927 NULL,
4928 (dump_func)dump_get_update_region_reply,
4929 NULL,
4930 NULL,
4931 NULL,
4932 (dump_func)dump_remove_window_property_reply,
4933 (dump_func)dump_get_window_property_reply,
4934 (dump_func)dump_get_window_properties_reply,
4935 (dump_func)dump_create_winstation_reply,
4936 (dump_func)dump_open_winstation_reply,
4937 NULL,
4938 (dump_func)dump_get_process_winstation_reply,
4939 NULL,
4940 (dump_func)dump_enum_winstation_reply,
4941 (dump_func)dump_create_desktop_reply,
4942 (dump_func)dump_open_desktop_reply,
4943 (dump_func)dump_open_input_desktop_reply,
4944 NULL,
4945 (dump_func)dump_get_thread_desktop_reply,
4946 NULL,
4947 (dump_func)dump_enum_desktop_reply,
4948 (dump_func)dump_set_user_object_info_reply,
4949 (dump_func)dump_register_hotkey_reply,
4950 (dump_func)dump_unregister_hotkey_reply,
4951 NULL,
4952 (dump_func)dump_get_thread_input_reply,
4953 (dump_func)dump_get_last_input_time_reply,
4954 (dump_func)dump_get_key_state_reply,
4955 NULL,
4956 (dump_func)dump_set_foreground_window_reply,
4957 (dump_func)dump_set_focus_window_reply,
4958 (dump_func)dump_set_active_window_reply,
4959 (dump_func)dump_set_capture_window_reply,
4960 (dump_func)dump_set_caret_window_reply,
4961 (dump_func)dump_set_caret_info_reply,
4962 (dump_func)dump_set_hook_reply,
4963 (dump_func)dump_remove_hook_reply,
4964 (dump_func)dump_start_hook_chain_reply,
4965 NULL,
4966 (dump_func)dump_get_hook_info_reply,
4967 (dump_func)dump_create_class_reply,
4968 (dump_func)dump_destroy_class_reply,
4969 (dump_func)dump_set_class_info_reply,
4970 (dump_func)dump_open_clipboard_reply,
4971 (dump_func)dump_close_clipboard_reply,
4972 NULL,
4973 (dump_func)dump_set_clipboard_data_reply,
4974 (dump_func)dump_get_clipboard_data_reply,
4975 (dump_func)dump_get_clipboard_formats_reply,
4976 (dump_func)dump_enum_clipboard_formats_reply,
4977 (dump_func)dump_release_clipboard_reply,
4978 (dump_func)dump_get_clipboard_info_reply,
4979 (dump_func)dump_set_clipboard_viewer_reply,
4980 NULL,
4981 NULL,
4982 (dump_func)dump_open_token_reply,
4983 (dump_func)dump_set_global_windows_reply,
4984 (dump_func)dump_adjust_token_privileges_reply,
4985 (dump_func)dump_get_token_privileges_reply,
4986 (dump_func)dump_check_token_privileges_reply,
4987 (dump_func)dump_duplicate_token_reply,
4988 (dump_func)dump_access_check_reply,
4989 (dump_func)dump_get_token_sid_reply,
4990 (dump_func)dump_get_token_groups_reply,
4991 (dump_func)dump_get_token_default_dacl_reply,
4992 NULL,
4993 NULL,
4994 (dump_func)dump_get_security_object_reply,
4995 (dump_func)dump_get_system_handles_reply,
4996 (dump_func)dump_create_mailslot_reply,
4997 (dump_func)dump_set_mailslot_info_reply,
4998 (dump_func)dump_create_directory_reply,
4999 (dump_func)dump_open_directory_reply,
5000 (dump_func)dump_get_directory_entry_reply,
5001 (dump_func)dump_create_symlink_reply,
5002 (dump_func)dump_open_symlink_reply,
5003 (dump_func)dump_query_symlink_reply,
5004 (dump_func)dump_get_object_info_reply,
5005 (dump_func)dump_get_object_type_reply,
5006 NULL,
5007 (dump_func)dump_get_token_impersonation_level_reply,
5008 (dump_func)dump_allocate_locally_unique_id_reply,
5009 (dump_func)dump_create_device_manager_reply,
5010 (dump_func)dump_create_device_reply,
5011 NULL,
5012 (dump_func)dump_get_next_device_request_reply,
5013 (dump_func)dump_make_process_system_reply,
5014 (dump_func)dump_get_token_statistics_reply,
5015 (dump_func)dump_create_completion_reply,
5016 (dump_func)dump_open_completion_reply,
5017 NULL,
5018 (dump_func)dump_remove_completion_reply,
5019 (dump_func)dump_query_completion_reply,
5020 NULL,
5021 NULL,
5022 NULL,
5023 NULL,
5024 (dump_func)dump_get_window_layered_info_reply,
5025 NULL,
5026 (dump_func)dump_alloc_user_handle_reply,
5027 NULL,
5028 (dump_func)dump_set_cursor_reply,
5029 NULL,
5030 (dump_func)dump_get_suspend_context_reply,
5031 NULL,
5032 (dump_func)dump_create_job_reply,
5033 (dump_func)dump_open_job_reply,
5034 NULL,
5035 NULL,
5036 NULL,
5037 NULL,
5038 NULL,
5041 static const char * const req_names[REQ_NB_REQUESTS] = {
5042 "new_process",
5043 "get_new_process_info",
5044 "new_thread",
5045 "get_startup_info",
5046 "init_process_done",
5047 "init_thread",
5048 "terminate_process",
5049 "terminate_thread",
5050 "get_process_info",
5051 "get_process_vm_counters",
5052 "set_process_info",
5053 "get_thread_info",
5054 "get_thread_times",
5055 "set_thread_info",
5056 "get_dll_info",
5057 "suspend_thread",
5058 "resume_thread",
5059 "load_dll",
5060 "unload_dll",
5061 "queue_apc",
5062 "get_apc_result",
5063 "close_handle",
5064 "set_handle_info",
5065 "dup_handle",
5066 "open_process",
5067 "open_thread",
5068 "select",
5069 "create_event",
5070 "event_op",
5071 "query_event",
5072 "open_event",
5073 "create_keyed_event",
5074 "open_keyed_event",
5075 "create_mutex",
5076 "release_mutex",
5077 "open_mutex",
5078 "query_mutex",
5079 "create_semaphore",
5080 "release_semaphore",
5081 "query_semaphore",
5082 "open_semaphore",
5083 "create_file",
5084 "open_file_object",
5085 "alloc_file_handle",
5086 "get_handle_unix_name",
5087 "get_handle_fd",
5088 "get_directory_cache_entry",
5089 "flush",
5090 "lock_file",
5091 "unlock_file",
5092 "create_socket",
5093 "accept_socket",
5094 "accept_into_socket",
5095 "set_socket_event",
5096 "get_socket_event",
5097 "get_socket_info",
5098 "enable_socket_event",
5099 "set_socket_deferred",
5100 "alloc_console",
5101 "free_console",
5102 "get_console_renderer_events",
5103 "open_console",
5104 "get_console_wait_event",
5105 "get_console_mode",
5106 "set_console_mode",
5107 "set_console_input_info",
5108 "get_console_input_info",
5109 "append_console_input_history",
5110 "get_console_input_history",
5111 "create_console_output",
5112 "set_console_output_info",
5113 "get_console_output_info",
5114 "write_console_input",
5115 "read_console_input",
5116 "write_console_output",
5117 "fill_console_output",
5118 "read_console_output",
5119 "move_console_output",
5120 "send_console_signal",
5121 "read_directory_changes",
5122 "read_change",
5123 "create_mapping",
5124 "open_mapping",
5125 "get_mapping_info",
5126 "get_mapping_committed_range",
5127 "add_mapping_committed_range",
5128 "create_snapshot",
5129 "next_process",
5130 "next_thread",
5131 "wait_debug_event",
5132 "queue_exception_event",
5133 "get_exception_status",
5134 "continue_debug_event",
5135 "debug_process",
5136 "debug_break",
5137 "set_debugger_kill_on_exit",
5138 "read_process_memory",
5139 "write_process_memory",
5140 "create_key",
5141 "open_key",
5142 "delete_key",
5143 "flush_key",
5144 "enum_key",
5145 "set_key_value",
5146 "get_key_value",
5147 "enum_key_value",
5148 "delete_key_value",
5149 "load_registry",
5150 "unload_registry",
5151 "save_registry",
5152 "set_registry_notification",
5153 "create_timer",
5154 "open_timer",
5155 "set_timer",
5156 "cancel_timer",
5157 "get_timer_info",
5158 "get_thread_context",
5159 "set_thread_context",
5160 "get_selector_entry",
5161 "add_atom",
5162 "delete_atom",
5163 "find_atom",
5164 "get_atom_information",
5165 "set_atom_information",
5166 "empty_atom_table",
5167 "init_atom_table",
5168 "get_msg_queue",
5169 "set_queue_fd",
5170 "set_queue_mask",
5171 "get_queue_status",
5172 "get_process_idle_event",
5173 "send_message",
5174 "post_quit_message",
5175 "send_hardware_message",
5176 "get_message",
5177 "reply_message",
5178 "accept_hardware_message",
5179 "get_message_reply",
5180 "set_win_timer",
5181 "kill_win_timer",
5182 "is_window_hung",
5183 "get_serial_info",
5184 "set_serial_info",
5185 "register_async",
5186 "cancel_async",
5187 "get_async_result",
5188 "read",
5189 "write",
5190 "ioctl",
5191 "set_irp_result",
5192 "create_named_pipe",
5193 "get_named_pipe_info",
5194 "set_named_pipe_info",
5195 "create_window",
5196 "destroy_window",
5197 "get_desktop_window",
5198 "set_window_owner",
5199 "get_window_info",
5200 "set_window_info",
5201 "set_parent",
5202 "get_window_parents",
5203 "get_window_children",
5204 "get_window_children_from_point",
5205 "get_window_tree",
5206 "set_window_pos",
5207 "get_window_rectangles",
5208 "get_window_text",
5209 "set_window_text",
5210 "get_windows_offset",
5211 "get_visible_region",
5212 "get_surface_region",
5213 "get_window_region",
5214 "set_window_region",
5215 "get_update_region",
5216 "update_window_zorder",
5217 "redraw_window",
5218 "set_window_property",
5219 "remove_window_property",
5220 "get_window_property",
5221 "get_window_properties",
5222 "create_winstation",
5223 "open_winstation",
5224 "close_winstation",
5225 "get_process_winstation",
5226 "set_process_winstation",
5227 "enum_winstation",
5228 "create_desktop",
5229 "open_desktop",
5230 "open_input_desktop",
5231 "close_desktop",
5232 "get_thread_desktop",
5233 "set_thread_desktop",
5234 "enum_desktop",
5235 "set_user_object_info",
5236 "register_hotkey",
5237 "unregister_hotkey",
5238 "attach_thread_input",
5239 "get_thread_input",
5240 "get_last_input_time",
5241 "get_key_state",
5242 "set_key_state",
5243 "set_foreground_window",
5244 "set_focus_window",
5245 "set_active_window",
5246 "set_capture_window",
5247 "set_caret_window",
5248 "set_caret_info",
5249 "set_hook",
5250 "remove_hook",
5251 "start_hook_chain",
5252 "finish_hook_chain",
5253 "get_hook_info",
5254 "create_class",
5255 "destroy_class",
5256 "set_class_info",
5257 "open_clipboard",
5258 "close_clipboard",
5259 "empty_clipboard",
5260 "set_clipboard_data",
5261 "get_clipboard_data",
5262 "get_clipboard_formats",
5263 "enum_clipboard_formats",
5264 "release_clipboard",
5265 "get_clipboard_info",
5266 "set_clipboard_viewer",
5267 "add_clipboard_listener",
5268 "remove_clipboard_listener",
5269 "open_token",
5270 "set_global_windows",
5271 "adjust_token_privileges",
5272 "get_token_privileges",
5273 "check_token_privileges",
5274 "duplicate_token",
5275 "access_check",
5276 "get_token_sid",
5277 "get_token_groups",
5278 "get_token_default_dacl",
5279 "set_token_default_dacl",
5280 "set_security_object",
5281 "get_security_object",
5282 "get_system_handles",
5283 "create_mailslot",
5284 "set_mailslot_info",
5285 "create_directory",
5286 "open_directory",
5287 "get_directory_entry",
5288 "create_symlink",
5289 "open_symlink",
5290 "query_symlink",
5291 "get_object_info",
5292 "get_object_type",
5293 "unlink_object",
5294 "get_token_impersonation_level",
5295 "allocate_locally_unique_id",
5296 "create_device_manager",
5297 "create_device",
5298 "delete_device",
5299 "get_next_device_request",
5300 "make_process_system",
5301 "get_token_statistics",
5302 "create_completion",
5303 "open_completion",
5304 "add_completion",
5305 "remove_completion",
5306 "query_completion",
5307 "set_completion_info",
5308 "add_fd_completion",
5309 "set_fd_disp_info",
5310 "set_fd_name_info",
5311 "get_window_layered_info",
5312 "set_window_layered_info",
5313 "alloc_user_handle",
5314 "free_user_handle",
5315 "set_cursor",
5316 "update_rawinput_devices",
5317 "get_suspend_context",
5318 "set_suspend_context",
5319 "create_job",
5320 "open_job",
5321 "assign_job",
5322 "process_in_job",
5323 "set_job_limits",
5324 "set_job_completion_port",
5325 "terminate_job",
5328 static const struct
5330 const char *name;
5331 unsigned int value;
5332 } status_names[] =
5334 { "ABANDONED_WAIT_0", STATUS_ABANDONED_WAIT_0 },
5335 { "ACCESS_DENIED", STATUS_ACCESS_DENIED },
5336 { "ACCESS_VIOLATION", STATUS_ACCESS_VIOLATION },
5337 { "ADDRESS_ALREADY_ASSOCIATED", STATUS_ADDRESS_ALREADY_ASSOCIATED },
5338 { "ALERTED", STATUS_ALERTED },
5339 { "ALIAS_EXISTS", STATUS_ALIAS_EXISTS },
5340 { "BAD_DEVICE_TYPE", STATUS_BAD_DEVICE_TYPE },
5341 { "BAD_IMPERSONATION_LEVEL", STATUS_BAD_IMPERSONATION_LEVEL },
5342 { "BREAKPOINT", STATUS_BREAKPOINT },
5343 { "BUFFER_OVERFLOW", STATUS_BUFFER_OVERFLOW },
5344 { "BUFFER_TOO_SMALL", STATUS_BUFFER_TOO_SMALL },
5345 { "CANCELLED", STATUS_CANCELLED },
5346 { "CANNOT_DELETE", STATUS_CANNOT_DELETE },
5347 { "CANT_OPEN_ANONYMOUS", STATUS_CANT_OPEN_ANONYMOUS },
5348 { "CANT_WAIT", STATUS_CANT_WAIT },
5349 { "CHILD_MUST_BE_VOLATILE", STATUS_CHILD_MUST_BE_VOLATILE },
5350 { "CONNECTION_ABORTED", STATUS_CONNECTION_ABORTED },
5351 { "CONNECTION_DISCONNECTED", STATUS_CONNECTION_DISCONNECTED },
5352 { "CONNECTION_REFUSED", STATUS_CONNECTION_REFUSED },
5353 { "CONNECTION_RESET", STATUS_CONNECTION_RESET },
5354 { "DEBUGGER_INACTIVE", STATUS_DEBUGGER_INACTIVE },
5355 { "DEVICE_BUSY", STATUS_DEVICE_BUSY },
5356 { "DIRECTORY_NOT_EMPTY", STATUS_DIRECTORY_NOT_EMPTY },
5357 { "DISK_FULL", STATUS_DISK_FULL },
5358 { "DLL_NOT_FOUND", STATUS_DLL_NOT_FOUND },
5359 { "ERROR_CLASS_ALREADY_EXISTS", 0xc0010000 | ERROR_CLASS_ALREADY_EXISTS },
5360 { "ERROR_CLASS_DOES_NOT_EXIST", 0xc0010000 | ERROR_CLASS_DOES_NOT_EXIST },
5361 { "ERROR_CLASS_HAS_WINDOWS", 0xc0010000 | ERROR_CLASS_HAS_WINDOWS },
5362 { "ERROR_CLIPBOARD_NOT_OPEN", 0xc0010000 | ERROR_CLIPBOARD_NOT_OPEN },
5363 { "ERROR_HOTKEY_ALREADY_REGISTERED", 0xc0010000 | ERROR_HOTKEY_ALREADY_REGISTERED },
5364 { "ERROR_HOTKEY_NOT_REGISTERED", 0xc0010000 | ERROR_HOTKEY_NOT_REGISTERED },
5365 { "ERROR_INVALID_CURSOR_HANDLE", 0xc0010000 | ERROR_INVALID_CURSOR_HANDLE },
5366 { "ERROR_INVALID_INDEX", 0xc0010000 | ERROR_INVALID_INDEX },
5367 { "ERROR_INVALID_WINDOW_HANDLE", 0xc0010000 | ERROR_INVALID_WINDOW_HANDLE },
5368 { "ERROR_NO_MORE_USER_HANDLES", 0xc0010000 | ERROR_NO_MORE_USER_HANDLES },
5369 { "ERROR_WINDOW_OF_OTHER_THREAD", 0xc0010000 | ERROR_WINDOW_OF_OTHER_THREAD },
5370 { "FILE_DELETED", STATUS_FILE_DELETED },
5371 { "FILE_IS_A_DIRECTORY", STATUS_FILE_IS_A_DIRECTORY },
5372 { "FILE_LOCK_CONFLICT", STATUS_FILE_LOCK_CONFLICT },
5373 { "GENERIC_NOT_MAPPED", STATUS_GENERIC_NOT_MAPPED },
5374 { "HANDLES_CLOSED", STATUS_HANDLES_CLOSED },
5375 { "HANDLE_NOT_CLOSABLE", STATUS_HANDLE_NOT_CLOSABLE },
5376 { "HOST_UNREACHABLE", STATUS_HOST_UNREACHABLE },
5377 { "ILLEGAL_FUNCTION", STATUS_ILLEGAL_FUNCTION },
5378 { "INFO_LENGTH_MISMATCH", STATUS_INFO_LENGTH_MISMATCH },
5379 { "INSTANCE_NOT_AVAILABLE", STATUS_INSTANCE_NOT_AVAILABLE },
5380 { "INSUFFICIENT_RESOURCES", STATUS_INSUFFICIENT_RESOURCES },
5381 { "INVALID_CID", STATUS_INVALID_CID },
5382 { "INVALID_DEVICE_REQUEST", STATUS_INVALID_DEVICE_REQUEST },
5383 { "INVALID_FILE_FOR_SECTION", STATUS_INVALID_FILE_FOR_SECTION },
5384 { "INVALID_HANDLE", STATUS_INVALID_HANDLE },
5385 { "INVALID_IMAGE_FORMAT", STATUS_INVALID_IMAGE_FORMAT },
5386 { "INVALID_IMAGE_NE_FORMAT", STATUS_INVALID_IMAGE_NE_FORMAT },
5387 { "INVALID_IMAGE_NOT_MZ", STATUS_INVALID_IMAGE_NOT_MZ },
5388 { "INVALID_IMAGE_PROTECT", STATUS_INVALID_IMAGE_PROTECT },
5389 { "INVALID_IMAGE_WIN_64", STATUS_INVALID_IMAGE_WIN_64 },
5390 { "INVALID_LOCK_SEQUENCE", STATUS_INVALID_LOCK_SEQUENCE },
5391 { "INVALID_OWNER", STATUS_INVALID_OWNER },
5392 { "INVALID_PARAMETER", STATUS_INVALID_PARAMETER },
5393 { "INVALID_SECURITY_DESCR", STATUS_INVALID_SECURITY_DESCR },
5394 { "IO_TIMEOUT", STATUS_IO_TIMEOUT },
5395 { "KEY_DELETED", STATUS_KEY_DELETED },
5396 { "MAPPED_FILE_SIZE_ZERO", STATUS_MAPPED_FILE_SIZE_ZERO },
5397 { "MORE_PROCESSING_REQUIRED", STATUS_MORE_PROCESSING_REQUIRED },
5398 { "MUTANT_NOT_OWNED", STATUS_MUTANT_NOT_OWNED },
5399 { "NAME_TOO_LONG", STATUS_NAME_TOO_LONG },
5400 { "NETWORK_BUSY", STATUS_NETWORK_BUSY },
5401 { "NETWORK_UNREACHABLE", STATUS_NETWORK_UNREACHABLE },
5402 { "NOT_ALL_ASSIGNED", STATUS_NOT_ALL_ASSIGNED },
5403 { "NOT_A_DIRECTORY", STATUS_NOT_A_DIRECTORY },
5404 { "NOT_FOUND", STATUS_NOT_FOUND },
5405 { "NOT_IMPLEMENTED", STATUS_NOT_IMPLEMENTED },
5406 { "NOT_REGISTRY_FILE", STATUS_NOT_REGISTRY_FILE },
5407 { "NOT_SUPPORTED", STATUS_NOT_SUPPORTED },
5408 { "NO_DATA_DETECTED", STATUS_NO_DATA_DETECTED },
5409 { "NO_IMPERSONATION_TOKEN", STATUS_NO_IMPERSONATION_TOKEN },
5410 { "NO_MEMORY", STATUS_NO_MEMORY },
5411 { "NO_MORE_ENTRIES", STATUS_NO_MORE_ENTRIES },
5412 { "NO_MORE_FILES", STATUS_NO_MORE_FILES },
5413 { "NO_SUCH_DEVICE", STATUS_NO_SUCH_DEVICE },
5414 { "NO_SUCH_FILE", STATUS_NO_SUCH_FILE },
5415 { "NO_TOKEN", STATUS_NO_TOKEN },
5416 { "OBJECT_NAME_COLLISION", STATUS_OBJECT_NAME_COLLISION },
5417 { "OBJECT_NAME_EXISTS", STATUS_OBJECT_NAME_EXISTS },
5418 { "OBJECT_NAME_INVALID", STATUS_OBJECT_NAME_INVALID },
5419 { "OBJECT_NAME_NOT_FOUND", STATUS_OBJECT_NAME_NOT_FOUND },
5420 { "OBJECT_PATH_INVALID", STATUS_OBJECT_PATH_INVALID },
5421 { "OBJECT_PATH_NOT_FOUND", STATUS_OBJECT_PATH_NOT_FOUND },
5422 { "OBJECT_PATH_SYNTAX_BAD", STATUS_OBJECT_PATH_SYNTAX_BAD },
5423 { "OBJECT_TYPE_MISMATCH", STATUS_OBJECT_TYPE_MISMATCH },
5424 { "PENDING", STATUS_PENDING },
5425 { "PIPE_BROKEN", STATUS_PIPE_BROKEN },
5426 { "PIPE_CONNECTED", STATUS_PIPE_CONNECTED },
5427 { "PIPE_DISCONNECTED", STATUS_PIPE_DISCONNECTED },
5428 { "PIPE_LISTENING", STATUS_PIPE_LISTENING },
5429 { "PIPE_NOT_AVAILABLE", STATUS_PIPE_NOT_AVAILABLE },
5430 { "PRIVILEGE_NOT_HELD", STATUS_PRIVILEGE_NOT_HELD },
5431 { "PROCESS_IN_JOB", STATUS_PROCESS_IN_JOB },
5432 { "PROCESS_IS_TERMINATING", STATUS_PROCESS_IS_TERMINATING },
5433 { "PROCESS_NOT_IN_JOB", STATUS_PROCESS_NOT_IN_JOB },
5434 { "SECTION_TOO_BIG", STATUS_SECTION_TOO_BIG },
5435 { "SEMAPHORE_LIMIT_EXCEEDED", STATUS_SEMAPHORE_LIMIT_EXCEEDED },
5436 { "SHARING_VIOLATION", STATUS_SHARING_VIOLATION },
5437 { "SHUTDOWN_IN_PROGRESS", STATUS_SHUTDOWN_IN_PROGRESS },
5438 { "SUSPEND_COUNT_EXCEEDED", STATUS_SUSPEND_COUNT_EXCEEDED },
5439 { "THREAD_IS_TERMINATING", STATUS_THREAD_IS_TERMINATING },
5440 { "TIMEOUT", STATUS_TIMEOUT },
5441 { "TOO_MANY_OPENED_FILES", STATUS_TOO_MANY_OPENED_FILES },
5442 { "UNSUCCESSFUL", STATUS_UNSUCCESSFUL },
5443 { "USER_APC", STATUS_USER_APC },
5444 { "USER_MAPPED_FILE", STATUS_USER_MAPPED_FILE },
5445 { "VOLUME_DISMOUNTED", STATUS_VOLUME_DISMOUNTED },
5446 { "WAS_LOCKED", STATUS_WAS_LOCKED },
5447 { NULL, 0 }
5450 /* ### make_requests end ### */
5451 /* Everything above this line is generated automatically by tools/make_requests */
5453 static const char *get_status_name( unsigned int status )
5455 int i;
5456 static char buffer[10];
5458 if (status)
5460 for (i = 0; status_names[i].name; i++)
5461 if (status_names[i].value == status) return status_names[i].name;
5463 sprintf( buffer, "%x", status );
5464 return buffer;
5467 void trace_request(void)
5469 enum request req = current->req.request_header.req;
5470 if (req < REQ_NB_REQUESTS)
5472 fprintf( stderr, "%04x: %s(", current->id, req_names[req] );
5473 if (req_dumpers[req])
5475 cur_data = get_req_data();
5476 cur_size = get_req_data_size();
5477 req_dumpers[req]( &current->req );
5479 fprintf( stderr, " )\n" );
5481 else fprintf( stderr, "%04x: %d(?)\n", current->id, req );
5484 void trace_reply( enum request req, const union generic_reply *reply )
5486 if (req < REQ_NB_REQUESTS)
5488 fprintf( stderr, "%04x: %s() = %s",
5489 current->id, req_names[req], get_status_name(current->error) );
5490 if (reply_dumpers[req])
5492 fprintf( stderr, " {" );
5493 cur_data = current->reply_data;
5494 cur_size = reply->reply_header.reply_size;
5495 reply_dumpers[req]( reply );
5496 fprintf( stderr, " }" );
5498 fputc( '\n', stderr );
5500 else fprintf( stderr, "%04x: %d() = %s\n",
5501 current->id, req, get_status_name(current->error) );