mmsystem.dll16: Pass through MCI_LIST, MCI_SETAUDIO, and MCI_SETVIDEO.
[wine.git] / server / trace.c
blob6662d9af20749b79c4a544ae5ee4b062a3f5868e
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_process_done_reply( const struct init_process_done_reply *req )
1286 fprintf( stderr, " suspend=%d", req->suspend );
1289 static void dump_init_thread_request( const struct init_thread_request *req )
1291 fprintf( stderr, " unix_pid=%d", req->unix_pid );
1292 fprintf( stderr, ", unix_tid=%d", req->unix_tid );
1293 fprintf( stderr, ", debug_level=%d", req->debug_level );
1294 dump_uint64( ", teb=", &req->teb );
1295 dump_uint64( ", entry=", &req->entry );
1296 fprintf( stderr, ", reply_fd=%d", req->reply_fd );
1297 fprintf( stderr, ", wait_fd=%d", req->wait_fd );
1298 dump_cpu_type( ", cpu=", &req->cpu );
1301 static void dump_init_thread_reply( const struct init_thread_reply *req )
1303 fprintf( stderr, " pid=%04x", req->pid );
1304 fprintf( stderr, ", tid=%04x", req->tid );
1305 dump_timeout( ", server_start=", &req->server_start );
1306 fprintf( stderr, ", info_size=%u", req->info_size );
1307 fprintf( stderr, ", version=%d", req->version );
1308 fprintf( stderr, ", all_cpus=%08x", req->all_cpus );
1311 static void dump_terminate_process_request( const struct terminate_process_request *req )
1313 fprintf( stderr, " handle=%04x", req->handle );
1314 fprintf( stderr, ", exit_code=%d", req->exit_code );
1317 static void dump_terminate_process_reply( const struct terminate_process_reply *req )
1319 fprintf( stderr, " self=%d", req->self );
1322 static void dump_terminate_thread_request( const struct terminate_thread_request *req )
1324 fprintf( stderr, " handle=%04x", req->handle );
1325 fprintf( stderr, ", exit_code=%d", req->exit_code );
1328 static void dump_terminate_thread_reply( const struct terminate_thread_reply *req )
1330 fprintf( stderr, " self=%d", req->self );
1331 fprintf( stderr, ", last=%d", req->last );
1334 static void dump_get_process_info_request( const struct get_process_info_request *req )
1336 fprintf( stderr, " handle=%04x", req->handle );
1339 static void dump_get_process_info_reply( const struct get_process_info_reply *req )
1341 fprintf( stderr, " pid=%04x", req->pid );
1342 fprintf( stderr, ", ppid=%04x", req->ppid );
1343 dump_uint64( ", affinity=", &req->affinity );
1344 dump_uint64( ", peb=", &req->peb );
1345 dump_timeout( ", start_time=", &req->start_time );
1346 dump_timeout( ", end_time=", &req->end_time );
1347 fprintf( stderr, ", exit_code=%d", req->exit_code );
1348 fprintf( stderr, ", priority=%d", req->priority );
1349 dump_cpu_type( ", cpu=", &req->cpu );
1350 fprintf( stderr, ", debugger_present=%d", req->debugger_present );
1351 fprintf( stderr, ", debug_children=%d", req->debug_children );
1354 static void dump_get_process_vm_counters_request( const struct get_process_vm_counters_request *req )
1356 fprintf( stderr, " handle=%04x", req->handle );
1359 static void dump_get_process_vm_counters_reply( const struct get_process_vm_counters_reply *req )
1361 dump_uint64( " peak_virtual_size=", &req->peak_virtual_size );
1362 dump_uint64( ", virtual_size=", &req->virtual_size );
1363 dump_uint64( ", peak_working_set_size=", &req->peak_working_set_size );
1364 dump_uint64( ", working_set_size=", &req->working_set_size );
1365 dump_uint64( ", pagefile_usage=", &req->pagefile_usage );
1366 dump_uint64( ", peak_pagefile_usage=", &req->peak_pagefile_usage );
1369 static void dump_set_process_info_request( const struct set_process_info_request *req )
1371 fprintf( stderr, " handle=%04x", req->handle );
1372 fprintf( stderr, ", mask=%d", req->mask );
1373 fprintf( stderr, ", priority=%d", req->priority );
1374 dump_uint64( ", affinity=", &req->affinity );
1377 static void dump_get_thread_info_request( const struct get_thread_info_request *req )
1379 fprintf( stderr, " handle=%04x", req->handle );
1380 fprintf( stderr, ", tid_in=%04x", req->tid_in );
1383 static void dump_get_thread_info_reply( const struct get_thread_info_reply *req )
1385 fprintf( stderr, " pid=%04x", req->pid );
1386 fprintf( stderr, ", tid=%04x", req->tid );
1387 dump_uint64( ", teb=", &req->teb );
1388 dump_uint64( ", entry_point=", &req->entry_point );
1389 dump_uint64( ", affinity=", &req->affinity );
1390 fprintf( stderr, ", exit_code=%d", req->exit_code );
1391 fprintf( stderr, ", priority=%d", req->priority );
1392 fprintf( stderr, ", last=%d", req->last );
1395 static void dump_get_thread_times_request( const struct get_thread_times_request *req )
1397 fprintf( stderr, " handle=%04x", req->handle );
1400 static void dump_get_thread_times_reply( const struct get_thread_times_reply *req )
1402 dump_timeout( " creation_time=", &req->creation_time );
1403 dump_timeout( ", exit_time=", &req->exit_time );
1406 static void dump_set_thread_info_request( const struct set_thread_info_request *req )
1408 fprintf( stderr, " handle=%04x", req->handle );
1409 fprintf( stderr, ", mask=%d", req->mask );
1410 fprintf( stderr, ", priority=%d", req->priority );
1411 dump_uint64( ", affinity=", &req->affinity );
1412 dump_uint64( ", entry_point=", &req->entry_point );
1413 fprintf( stderr, ", token=%04x", req->token );
1416 static void dump_get_dll_info_request( const struct get_dll_info_request *req )
1418 fprintf( stderr, " handle=%04x", req->handle );
1419 dump_uint64( ", base_address=", &req->base_address );
1422 static void dump_get_dll_info_reply( const struct get_dll_info_reply *req )
1424 dump_uint64( " entry_point=", &req->entry_point );
1425 fprintf( stderr, ", filename_len=%u", req->filename_len );
1426 dump_varargs_unicode_str( ", filename=", cur_size );
1429 static void dump_suspend_thread_request( const struct suspend_thread_request *req )
1431 fprintf( stderr, " handle=%04x", req->handle );
1434 static void dump_suspend_thread_reply( const struct suspend_thread_reply *req )
1436 fprintf( stderr, " count=%d", req->count );
1439 static void dump_resume_thread_request( const struct resume_thread_request *req )
1441 fprintf( stderr, " handle=%04x", req->handle );
1444 static void dump_resume_thread_reply( const struct resume_thread_reply *req )
1446 fprintf( stderr, " count=%d", req->count );
1449 static void dump_load_dll_request( const struct load_dll_request *req )
1451 fprintf( stderr, " dbg_offset=%u", req->dbg_offset );
1452 dump_uint64( ", base=", &req->base );
1453 dump_uint64( ", name=", &req->name );
1454 fprintf( stderr, ", dbg_size=%u", req->dbg_size );
1455 dump_varargs_unicode_str( ", filename=", cur_size );
1458 static void dump_unload_dll_request( const struct unload_dll_request *req )
1460 dump_uint64( " base=", &req->base );
1463 static void dump_queue_apc_request( const struct queue_apc_request *req )
1465 fprintf( stderr, " handle=%04x", req->handle );
1466 dump_apc_call( ", call=", &req->call );
1469 static void dump_queue_apc_reply( const struct queue_apc_reply *req )
1471 fprintf( stderr, " handle=%04x", req->handle );
1472 fprintf( stderr, ", self=%d", req->self );
1475 static void dump_get_apc_result_request( const struct get_apc_result_request *req )
1477 fprintf( stderr, " handle=%04x", req->handle );
1480 static void dump_get_apc_result_reply( const struct get_apc_result_reply *req )
1482 dump_apc_result( " result=", &req->result );
1485 static void dump_close_handle_request( const struct close_handle_request *req )
1487 fprintf( stderr, " handle=%04x", req->handle );
1490 static void dump_set_handle_info_request( const struct set_handle_info_request *req )
1492 fprintf( stderr, " handle=%04x", req->handle );
1493 fprintf( stderr, ", flags=%d", req->flags );
1494 fprintf( stderr, ", mask=%d", req->mask );
1497 static void dump_set_handle_info_reply( const struct set_handle_info_reply *req )
1499 fprintf( stderr, " old_flags=%d", req->old_flags );
1502 static void dump_dup_handle_request( const struct dup_handle_request *req )
1504 fprintf( stderr, " src_process=%04x", req->src_process );
1505 fprintf( stderr, ", src_handle=%04x", req->src_handle );
1506 fprintf( stderr, ", dst_process=%04x", req->dst_process );
1507 fprintf( stderr, ", access=%08x", req->access );
1508 fprintf( stderr, ", attributes=%08x", req->attributes );
1509 fprintf( stderr, ", options=%08x", req->options );
1512 static void dump_dup_handle_reply( const struct dup_handle_reply *req )
1514 fprintf( stderr, " handle=%04x", req->handle );
1515 fprintf( stderr, ", self=%d", req->self );
1516 fprintf( stderr, ", closed=%d", req->closed );
1519 static void dump_open_process_request( const struct open_process_request *req )
1521 fprintf( stderr, " pid=%04x", req->pid );
1522 fprintf( stderr, ", access=%08x", req->access );
1523 fprintf( stderr, ", attributes=%08x", req->attributes );
1526 static void dump_open_process_reply( const struct open_process_reply *req )
1528 fprintf( stderr, " handle=%04x", req->handle );
1531 static void dump_open_thread_request( const struct open_thread_request *req )
1533 fprintf( stderr, " tid=%04x", req->tid );
1534 fprintf( stderr, ", access=%08x", req->access );
1535 fprintf( stderr, ", attributes=%08x", req->attributes );
1538 static void dump_open_thread_reply( const struct open_thread_reply *req )
1540 fprintf( stderr, " handle=%04x", req->handle );
1543 static void dump_select_request( const struct select_request *req )
1545 fprintf( stderr, " flags=%d", req->flags );
1546 dump_uint64( ", cookie=", &req->cookie );
1547 dump_timeout( ", timeout=", &req->timeout );
1548 fprintf( stderr, ", prev_apc=%04x", req->prev_apc );
1549 dump_varargs_apc_result( ", result=", cur_size );
1550 dump_varargs_select_op( ", data=", cur_size );
1553 static void dump_select_reply( const struct select_reply *req )
1555 dump_timeout( " timeout=", &req->timeout );
1556 dump_apc_call( ", call=", &req->call );
1557 fprintf( stderr, ", apc_handle=%04x", req->apc_handle );
1560 static void dump_create_event_request( const struct create_event_request *req )
1562 fprintf( stderr, " access=%08x", req->access );
1563 fprintf( stderr, ", manual_reset=%d", req->manual_reset );
1564 fprintf( stderr, ", initial_state=%d", req->initial_state );
1565 dump_varargs_object_attributes( ", objattr=", cur_size );
1568 static void dump_create_event_reply( const struct create_event_reply *req )
1570 fprintf( stderr, " handle=%04x", req->handle );
1573 static void dump_event_op_request( const struct event_op_request *req )
1575 fprintf( stderr, " handle=%04x", req->handle );
1576 fprintf( stderr, ", op=%d", req->op );
1579 static void dump_query_event_request( const struct query_event_request *req )
1581 fprintf( stderr, " handle=%04x", req->handle );
1584 static void dump_query_event_reply( const struct query_event_reply *req )
1586 fprintf( stderr, " manual_reset=%d", req->manual_reset );
1587 fprintf( stderr, ", state=%d", req->state );
1590 static void dump_open_event_request( const struct open_event_request *req )
1592 fprintf( stderr, " access=%08x", req->access );
1593 fprintf( stderr, ", attributes=%08x", req->attributes );
1594 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1595 dump_varargs_unicode_str( ", name=", cur_size );
1598 static void dump_open_event_reply( const struct open_event_reply *req )
1600 fprintf( stderr, " handle=%04x", req->handle );
1603 static void dump_create_keyed_event_request( const struct create_keyed_event_request *req )
1605 fprintf( stderr, " access=%08x", req->access );
1606 dump_varargs_object_attributes( ", objattr=", cur_size );
1609 static void dump_create_keyed_event_reply( const struct create_keyed_event_reply *req )
1611 fprintf( stderr, " handle=%04x", req->handle );
1614 static void dump_open_keyed_event_request( const struct open_keyed_event_request *req )
1616 fprintf( stderr, " access=%08x", req->access );
1617 fprintf( stderr, ", attributes=%08x", req->attributes );
1618 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1619 dump_varargs_unicode_str( ", name=", cur_size );
1622 static void dump_open_keyed_event_reply( const struct open_keyed_event_reply *req )
1624 fprintf( stderr, " handle=%04x", req->handle );
1627 static void dump_create_mutex_request( const struct create_mutex_request *req )
1629 fprintf( stderr, " access=%08x", req->access );
1630 fprintf( stderr, ", owned=%d", req->owned );
1631 dump_varargs_object_attributes( ", objattr=", cur_size );
1634 static void dump_create_mutex_reply( const struct create_mutex_reply *req )
1636 fprintf( stderr, " handle=%04x", req->handle );
1639 static void dump_release_mutex_request( const struct release_mutex_request *req )
1641 fprintf( stderr, " handle=%04x", req->handle );
1644 static void dump_release_mutex_reply( const struct release_mutex_reply *req )
1646 fprintf( stderr, " prev_count=%08x", req->prev_count );
1649 static void dump_open_mutex_request( const struct open_mutex_request *req )
1651 fprintf( stderr, " access=%08x", req->access );
1652 fprintf( stderr, ", attributes=%08x", req->attributes );
1653 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1654 dump_varargs_unicode_str( ", name=", cur_size );
1657 static void dump_open_mutex_reply( const struct open_mutex_reply *req )
1659 fprintf( stderr, " handle=%04x", req->handle );
1662 static void dump_query_mutex_request( const struct query_mutex_request *req )
1664 fprintf( stderr, " handle=%04x", req->handle );
1667 static void dump_query_mutex_reply( const struct query_mutex_reply *req )
1669 fprintf( stderr, " count=%08x", req->count );
1670 fprintf( stderr, ", owned=%d", req->owned );
1671 fprintf( stderr, ", abandoned=%d", req->abandoned );
1674 static void dump_create_semaphore_request( const struct create_semaphore_request *req )
1676 fprintf( stderr, " access=%08x", req->access );
1677 fprintf( stderr, ", initial=%08x", req->initial );
1678 fprintf( stderr, ", max=%08x", req->max );
1679 dump_varargs_object_attributes( ", objattr=", cur_size );
1682 static void dump_create_semaphore_reply( const struct create_semaphore_reply *req )
1684 fprintf( stderr, " handle=%04x", req->handle );
1687 static void dump_release_semaphore_request( const struct release_semaphore_request *req )
1689 fprintf( stderr, " handle=%04x", req->handle );
1690 fprintf( stderr, ", count=%08x", req->count );
1693 static void dump_release_semaphore_reply( const struct release_semaphore_reply *req )
1695 fprintf( stderr, " prev_count=%08x", req->prev_count );
1698 static void dump_query_semaphore_request( const struct query_semaphore_request *req )
1700 fprintf( stderr, " handle=%04x", req->handle );
1703 static void dump_query_semaphore_reply( const struct query_semaphore_reply *req )
1705 fprintf( stderr, " current=%08x", req->current );
1706 fprintf( stderr, ", max=%08x", req->max );
1709 static void dump_open_semaphore_request( const struct open_semaphore_request *req )
1711 fprintf( stderr, " access=%08x", req->access );
1712 fprintf( stderr, ", attributes=%08x", req->attributes );
1713 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1714 dump_varargs_unicode_str( ", name=", cur_size );
1717 static void dump_open_semaphore_reply( const struct open_semaphore_reply *req )
1719 fprintf( stderr, " handle=%04x", req->handle );
1722 static void dump_create_file_request( const struct create_file_request *req )
1724 fprintf( stderr, " access=%08x", req->access );
1725 fprintf( stderr, ", sharing=%08x", req->sharing );
1726 fprintf( stderr, ", create=%d", req->create );
1727 fprintf( stderr, ", options=%08x", req->options );
1728 fprintf( stderr, ", attrs=%08x", req->attrs );
1729 dump_varargs_object_attributes( ", objattr=", cur_size );
1730 dump_varargs_string( ", filename=", cur_size );
1733 static void dump_create_file_reply( const struct create_file_reply *req )
1735 fprintf( stderr, " handle=%04x", req->handle );
1738 static void dump_open_file_object_request( const struct open_file_object_request *req )
1740 fprintf( stderr, " access=%08x", req->access );
1741 fprintf( stderr, ", attributes=%08x", req->attributes );
1742 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1743 fprintf( stderr, ", sharing=%08x", req->sharing );
1744 fprintf( stderr, ", options=%08x", req->options );
1745 dump_varargs_unicode_str( ", filename=", cur_size );
1748 static void dump_open_file_object_reply( const struct open_file_object_reply *req )
1750 fprintf( stderr, " handle=%04x", req->handle );
1753 static void dump_alloc_file_handle_request( const struct alloc_file_handle_request *req )
1755 fprintf( stderr, " access=%08x", req->access );
1756 fprintf( stderr, ", attributes=%08x", req->attributes );
1757 fprintf( stderr, ", fd=%d", req->fd );
1760 static void dump_alloc_file_handle_reply( const struct alloc_file_handle_reply *req )
1762 fprintf( stderr, " handle=%04x", req->handle );
1765 static void dump_get_handle_unix_name_request( const struct get_handle_unix_name_request *req )
1767 fprintf( stderr, " handle=%04x", req->handle );
1770 static void dump_get_handle_unix_name_reply( const struct get_handle_unix_name_reply *req )
1772 fprintf( stderr, " name_len=%u", req->name_len );
1773 dump_varargs_string( ", name=", cur_size );
1776 static void dump_get_handle_fd_request( const struct get_handle_fd_request *req )
1778 fprintf( stderr, " handle=%04x", req->handle );
1781 static void dump_get_handle_fd_reply( const struct get_handle_fd_reply *req )
1783 fprintf( stderr, " type=%d", req->type );
1784 fprintf( stderr, ", cacheable=%d", req->cacheable );
1785 fprintf( stderr, ", access=%08x", req->access );
1786 fprintf( stderr, ", options=%08x", req->options );
1789 static void dump_get_directory_cache_entry_request( const struct get_directory_cache_entry_request *req )
1791 fprintf( stderr, " handle=%04x", req->handle );
1794 static void dump_get_directory_cache_entry_reply( const struct get_directory_cache_entry_reply *req )
1796 fprintf( stderr, " entry=%d", req->entry );
1797 dump_varargs_ints( ", free=", cur_size );
1800 static void dump_flush_request( const struct flush_request *req )
1802 dump_async_data( " async=", &req->async );
1805 static void dump_flush_reply( const struct flush_reply *req )
1807 fprintf( stderr, " event=%04x", req->event );
1810 static void dump_get_volume_info_request( const struct get_volume_info_request *req )
1812 fprintf( stderr, " handle=%04x", req->handle );
1813 fprintf( stderr, ", info_class=%08x", req->info_class );
1816 static void dump_get_volume_info_reply( const struct get_volume_info_reply *req )
1818 dump_varargs_bytes( " data=", cur_size );
1821 static void dump_lock_file_request( const struct lock_file_request *req )
1823 fprintf( stderr, " handle=%04x", req->handle );
1824 dump_uint64( ", offset=", &req->offset );
1825 dump_uint64( ", count=", &req->count );
1826 fprintf( stderr, ", shared=%d", req->shared );
1827 fprintf( stderr, ", wait=%d", req->wait );
1830 static void dump_lock_file_reply( const struct lock_file_reply *req )
1832 fprintf( stderr, " handle=%04x", req->handle );
1833 fprintf( stderr, ", overlapped=%d", req->overlapped );
1836 static void dump_unlock_file_request( const struct unlock_file_request *req )
1838 fprintf( stderr, " handle=%04x", req->handle );
1839 dump_uint64( ", offset=", &req->offset );
1840 dump_uint64( ", count=", &req->count );
1843 static void dump_create_socket_request( const struct create_socket_request *req )
1845 fprintf( stderr, " access=%08x", req->access );
1846 fprintf( stderr, ", attributes=%08x", req->attributes );
1847 fprintf( stderr, ", family=%d", req->family );
1848 fprintf( stderr, ", type=%d", req->type );
1849 fprintf( stderr, ", protocol=%d", req->protocol );
1850 fprintf( stderr, ", flags=%08x", req->flags );
1853 static void dump_create_socket_reply( const struct create_socket_reply *req )
1855 fprintf( stderr, " handle=%04x", req->handle );
1858 static void dump_accept_socket_request( const struct accept_socket_request *req )
1860 fprintf( stderr, " lhandle=%04x", req->lhandle );
1861 fprintf( stderr, ", access=%08x", req->access );
1862 fprintf( stderr, ", attributes=%08x", req->attributes );
1865 static void dump_accept_socket_reply( const struct accept_socket_reply *req )
1867 fprintf( stderr, " handle=%04x", req->handle );
1870 static void dump_accept_into_socket_request( const struct accept_into_socket_request *req )
1872 fprintf( stderr, " lhandle=%04x", req->lhandle );
1873 fprintf( stderr, ", ahandle=%04x", req->ahandle );
1876 static void dump_set_socket_event_request( const struct set_socket_event_request *req )
1878 fprintf( stderr, " handle=%04x", req->handle );
1879 fprintf( stderr, ", mask=%08x", req->mask );
1880 fprintf( stderr, ", event=%04x", req->event );
1881 fprintf( stderr, ", window=%08x", req->window );
1882 fprintf( stderr, ", msg=%08x", req->msg );
1885 static void dump_get_socket_event_request( const struct get_socket_event_request *req )
1887 fprintf( stderr, " handle=%04x", req->handle );
1888 fprintf( stderr, ", service=%d", req->service );
1889 fprintf( stderr, ", c_event=%04x", req->c_event );
1892 static void dump_get_socket_event_reply( const struct get_socket_event_reply *req )
1894 fprintf( stderr, " mask=%08x", req->mask );
1895 fprintf( stderr, ", pmask=%08x", req->pmask );
1896 fprintf( stderr, ", state=%08x", req->state );
1897 dump_varargs_ints( ", errors=", cur_size );
1900 static void dump_get_socket_info_request( const struct get_socket_info_request *req )
1902 fprintf( stderr, " handle=%04x", req->handle );
1905 static void dump_get_socket_info_reply( const struct get_socket_info_reply *req )
1907 fprintf( stderr, " family=%d", req->family );
1908 fprintf( stderr, ", type=%d", req->type );
1909 fprintf( stderr, ", protocol=%d", req->protocol );
1912 static void dump_enable_socket_event_request( const struct enable_socket_event_request *req )
1914 fprintf( stderr, " handle=%04x", req->handle );
1915 fprintf( stderr, ", mask=%08x", req->mask );
1916 fprintf( stderr, ", sstate=%08x", req->sstate );
1917 fprintf( stderr, ", cstate=%08x", req->cstate );
1920 static void dump_set_socket_deferred_request( const struct set_socket_deferred_request *req )
1922 fprintf( stderr, " handle=%04x", req->handle );
1923 fprintf( stderr, ", deferred=%04x", req->deferred );
1926 static void dump_alloc_console_request( const struct alloc_console_request *req )
1928 fprintf( stderr, " access=%08x", req->access );
1929 fprintf( stderr, ", attributes=%08x", req->attributes );
1930 fprintf( stderr, ", pid=%04x", req->pid );
1931 fprintf( stderr, ", input_fd=%d", req->input_fd );
1934 static void dump_alloc_console_reply( const struct alloc_console_reply *req )
1936 fprintf( stderr, " handle_in=%04x", req->handle_in );
1937 fprintf( stderr, ", event=%04x", req->event );
1940 static void dump_free_console_request( const struct free_console_request *req )
1944 static void dump_get_console_renderer_events_request( const struct get_console_renderer_events_request *req )
1946 fprintf( stderr, " handle=%04x", req->handle );
1949 static void dump_get_console_renderer_events_reply( const struct get_console_renderer_events_reply *req )
1951 dump_varargs_bytes( " data=", cur_size );
1954 static void dump_open_console_request( const struct open_console_request *req )
1956 fprintf( stderr, " from=%04x", req->from );
1957 fprintf( stderr, ", access=%08x", req->access );
1958 fprintf( stderr, ", attributes=%08x", req->attributes );
1959 fprintf( stderr, ", share=%d", req->share );
1962 static void dump_open_console_reply( const struct open_console_reply *req )
1964 fprintf( stderr, " handle=%04x", req->handle );
1967 static void dump_get_console_wait_event_request( const struct get_console_wait_event_request *req )
1971 static void dump_get_console_wait_event_reply( const struct get_console_wait_event_reply *req )
1973 fprintf( stderr, " handle=%04x", req->handle );
1976 static void dump_get_console_mode_request( const struct get_console_mode_request *req )
1978 fprintf( stderr, " handle=%04x", req->handle );
1981 static void dump_get_console_mode_reply( const struct get_console_mode_reply *req )
1983 fprintf( stderr, " mode=%d", req->mode );
1986 static void dump_set_console_mode_request( const struct set_console_mode_request *req )
1988 fprintf( stderr, " handle=%04x", req->handle );
1989 fprintf( stderr, ", mode=%d", req->mode );
1992 static void dump_set_console_input_info_request( const struct set_console_input_info_request *req )
1994 fprintf( stderr, " handle=%04x", req->handle );
1995 fprintf( stderr, ", mask=%d", req->mask );
1996 fprintf( stderr, ", active_sb=%04x", req->active_sb );
1997 fprintf( stderr, ", history_mode=%d", req->history_mode );
1998 fprintf( stderr, ", history_size=%d", req->history_size );
1999 fprintf( stderr, ", edition_mode=%d", req->edition_mode );
2000 fprintf( stderr, ", input_cp=%d", req->input_cp );
2001 fprintf( stderr, ", output_cp=%d", req->output_cp );
2002 fprintf( stderr, ", win=%08x", req->win );
2003 dump_varargs_unicode_str( ", title=", cur_size );
2006 static void dump_get_console_input_info_request( const struct get_console_input_info_request *req )
2008 fprintf( stderr, " handle=%04x", req->handle );
2011 static void dump_get_console_input_info_reply( const struct get_console_input_info_reply *req )
2013 fprintf( stderr, " history_mode=%d", req->history_mode );
2014 fprintf( stderr, ", history_size=%d", req->history_size );
2015 fprintf( stderr, ", history_index=%d", req->history_index );
2016 fprintf( stderr, ", edition_mode=%d", req->edition_mode );
2017 fprintf( stderr, ", input_cp=%d", req->input_cp );
2018 fprintf( stderr, ", output_cp=%d", req->output_cp );
2019 fprintf( stderr, ", win=%08x", req->win );
2020 dump_varargs_unicode_str( ", title=", cur_size );
2023 static void dump_append_console_input_history_request( const struct append_console_input_history_request *req )
2025 fprintf( stderr, " handle=%04x", req->handle );
2026 dump_varargs_unicode_str( ", line=", cur_size );
2029 static void dump_get_console_input_history_request( const struct get_console_input_history_request *req )
2031 fprintf( stderr, " handle=%04x", req->handle );
2032 fprintf( stderr, ", index=%d", req->index );
2035 static void dump_get_console_input_history_reply( const struct get_console_input_history_reply *req )
2037 fprintf( stderr, " total=%d", req->total );
2038 dump_varargs_unicode_str( ", line=", cur_size );
2041 static void dump_create_console_output_request( const struct create_console_output_request *req )
2043 fprintf( stderr, " handle_in=%04x", req->handle_in );
2044 fprintf( stderr, ", access=%08x", req->access );
2045 fprintf( stderr, ", attributes=%08x", req->attributes );
2046 fprintf( stderr, ", share=%08x", req->share );
2047 fprintf( stderr, ", fd=%d", req->fd );
2050 static void dump_create_console_output_reply( const struct create_console_output_reply *req )
2052 fprintf( stderr, " handle_out=%04x", req->handle_out );
2055 static void dump_set_console_output_info_request( const struct set_console_output_info_request *req )
2057 fprintf( stderr, " handle=%04x", req->handle );
2058 fprintf( stderr, ", mask=%d", req->mask );
2059 fprintf( stderr, ", cursor_size=%d", req->cursor_size );
2060 fprintf( stderr, ", cursor_visible=%d", req->cursor_visible );
2061 fprintf( stderr, ", cursor_x=%d", req->cursor_x );
2062 fprintf( stderr, ", cursor_y=%d", req->cursor_y );
2063 fprintf( stderr, ", width=%d", req->width );
2064 fprintf( stderr, ", height=%d", req->height );
2065 fprintf( stderr, ", attr=%d", req->attr );
2066 fprintf( stderr, ", popup_attr=%d", req->popup_attr );
2067 fprintf( stderr, ", win_left=%d", req->win_left );
2068 fprintf( stderr, ", win_top=%d", req->win_top );
2069 fprintf( stderr, ", win_right=%d", req->win_right );
2070 fprintf( stderr, ", win_bottom=%d", req->win_bottom );
2071 fprintf( stderr, ", max_width=%d", req->max_width );
2072 fprintf( stderr, ", max_height=%d", req->max_height );
2073 fprintf( stderr, ", font_width=%d", req->font_width );
2074 fprintf( stderr, ", font_height=%d", req->font_height );
2075 dump_varargs_uints( ", colors=", cur_size );
2078 static void dump_get_console_output_info_request( const struct get_console_output_info_request *req )
2080 fprintf( stderr, " handle=%04x", req->handle );
2083 static void dump_get_console_output_info_reply( const struct get_console_output_info_reply *req )
2085 fprintf( stderr, " cursor_size=%d", req->cursor_size );
2086 fprintf( stderr, ", cursor_visible=%d", req->cursor_visible );
2087 fprintf( stderr, ", cursor_x=%d", req->cursor_x );
2088 fprintf( stderr, ", cursor_y=%d", req->cursor_y );
2089 fprintf( stderr, ", width=%d", req->width );
2090 fprintf( stderr, ", height=%d", req->height );
2091 fprintf( stderr, ", attr=%d", req->attr );
2092 fprintf( stderr, ", popup_attr=%d", req->popup_attr );
2093 fprintf( stderr, ", win_left=%d", req->win_left );
2094 fprintf( stderr, ", win_top=%d", req->win_top );
2095 fprintf( stderr, ", win_right=%d", req->win_right );
2096 fprintf( stderr, ", win_bottom=%d", req->win_bottom );
2097 fprintf( stderr, ", max_width=%d", req->max_width );
2098 fprintf( stderr, ", max_height=%d", req->max_height );
2099 fprintf( stderr, ", font_width=%d", req->font_width );
2100 fprintf( stderr, ", font_height=%d", req->font_height );
2101 dump_varargs_uints( ", colors=", cur_size );
2104 static void dump_write_console_input_request( const struct write_console_input_request *req )
2106 fprintf( stderr, " handle=%04x", req->handle );
2107 dump_varargs_input_records( ", rec=", cur_size );
2110 static void dump_write_console_input_reply( const struct write_console_input_reply *req )
2112 fprintf( stderr, " written=%d", req->written );
2115 static void dump_read_console_input_request( const struct read_console_input_request *req )
2117 fprintf( stderr, " handle=%04x", req->handle );
2118 fprintf( stderr, ", flush=%d", req->flush );
2121 static void dump_read_console_input_reply( const struct read_console_input_reply *req )
2123 fprintf( stderr, " read=%d", req->read );
2124 dump_varargs_input_records( ", rec=", cur_size );
2127 static void dump_write_console_output_request( const struct write_console_output_request *req )
2129 fprintf( stderr, " handle=%04x", req->handle );
2130 fprintf( stderr, ", x=%d", req->x );
2131 fprintf( stderr, ", y=%d", req->y );
2132 fprintf( stderr, ", mode=%d", req->mode );
2133 fprintf( stderr, ", wrap=%d", req->wrap );
2134 dump_varargs_bytes( ", data=", cur_size );
2137 static void dump_write_console_output_reply( const struct write_console_output_reply *req )
2139 fprintf( stderr, " written=%d", req->written );
2140 fprintf( stderr, ", width=%d", req->width );
2141 fprintf( stderr, ", height=%d", req->height );
2144 static void dump_fill_console_output_request( const struct fill_console_output_request *req )
2146 fprintf( stderr, " handle=%04x", req->handle );
2147 fprintf( stderr, ", x=%d", req->x );
2148 fprintf( stderr, ", y=%d", req->y );
2149 fprintf( stderr, ", mode=%d", req->mode );
2150 fprintf( stderr, ", count=%d", req->count );
2151 fprintf( stderr, ", wrap=%d", req->wrap );
2152 dump_char_info( ", data=", &req->data );
2155 static void dump_fill_console_output_reply( const struct fill_console_output_reply *req )
2157 fprintf( stderr, " written=%d", req->written );
2160 static void dump_read_console_output_request( const struct read_console_output_request *req )
2162 fprintf( stderr, " handle=%04x", req->handle );
2163 fprintf( stderr, ", x=%d", req->x );
2164 fprintf( stderr, ", y=%d", req->y );
2165 fprintf( stderr, ", mode=%d", req->mode );
2166 fprintf( stderr, ", wrap=%d", req->wrap );
2169 static void dump_read_console_output_reply( const struct read_console_output_reply *req )
2171 fprintf( stderr, " width=%d", req->width );
2172 fprintf( stderr, ", height=%d", req->height );
2173 dump_varargs_bytes( ", data=", cur_size );
2176 static void dump_move_console_output_request( const struct move_console_output_request *req )
2178 fprintf( stderr, " handle=%04x", req->handle );
2179 fprintf( stderr, ", x_src=%d", req->x_src );
2180 fprintf( stderr, ", y_src=%d", req->y_src );
2181 fprintf( stderr, ", x_dst=%d", req->x_dst );
2182 fprintf( stderr, ", y_dst=%d", req->y_dst );
2183 fprintf( stderr, ", w=%d", req->w );
2184 fprintf( stderr, ", h=%d", req->h );
2187 static void dump_send_console_signal_request( const struct send_console_signal_request *req )
2189 fprintf( stderr, " signal=%d", req->signal );
2190 fprintf( stderr, ", group_id=%04x", req->group_id );
2193 static void dump_read_directory_changes_request( const struct read_directory_changes_request *req )
2195 fprintf( stderr, " filter=%08x", req->filter );
2196 fprintf( stderr, ", subtree=%d", req->subtree );
2197 fprintf( stderr, ", want_data=%d", req->want_data );
2198 dump_async_data( ", async=", &req->async );
2201 static void dump_read_change_request( const struct read_change_request *req )
2203 fprintf( stderr, " handle=%04x", req->handle );
2206 static void dump_read_change_reply( const struct read_change_reply *req )
2208 dump_varargs_filesystem_event( " events=", cur_size );
2211 static void dump_create_mapping_request( const struct create_mapping_request *req )
2213 fprintf( stderr, " access=%08x", req->access );
2214 fprintf( stderr, ", flags=%08x", req->flags );
2215 fprintf( stderr, ", file_access=%08x", req->file_access );
2216 dump_uint64( ", size=", &req->size );
2217 fprintf( stderr, ", file_handle=%04x", req->file_handle );
2218 dump_varargs_object_attributes( ", objattr=", cur_size );
2221 static void dump_create_mapping_reply( const struct create_mapping_reply *req )
2223 fprintf( stderr, " handle=%04x", req->handle );
2226 static void dump_open_mapping_request( const struct open_mapping_request *req )
2228 fprintf( stderr, " access=%08x", req->access );
2229 fprintf( stderr, ", attributes=%08x", req->attributes );
2230 fprintf( stderr, ", rootdir=%04x", req->rootdir );
2231 dump_varargs_unicode_str( ", name=", cur_size );
2234 static void dump_open_mapping_reply( const struct open_mapping_reply *req )
2236 fprintf( stderr, " handle=%04x", req->handle );
2239 static void dump_get_mapping_info_request( const struct get_mapping_info_request *req )
2241 fprintf( stderr, " handle=%04x", req->handle );
2242 fprintf( stderr, ", access=%08x", req->access );
2245 static void dump_get_mapping_info_reply( const struct get_mapping_info_reply *req )
2247 dump_uint64( " size=", &req->size );
2248 fprintf( stderr, ", flags=%08x", req->flags );
2249 fprintf( stderr, ", shared_file=%04x", req->shared_file );
2250 dump_varargs_pe_image_info( ", image=", cur_size );
2253 static void dump_map_view_request( const struct map_view_request *req )
2255 fprintf( stderr, " mapping=%04x", req->mapping );
2256 fprintf( stderr, ", access=%08x", req->access );
2257 dump_uint64( ", base=", &req->base );
2258 dump_uint64( ", size=", &req->size );
2259 dump_uint64( ", start=", &req->start );
2262 static void dump_unmap_view_request( const struct unmap_view_request *req )
2264 dump_uint64( " base=", &req->base );
2267 static void dump_get_mapping_committed_range_request( const struct get_mapping_committed_range_request *req )
2269 dump_uint64( " base=", &req->base );
2270 dump_uint64( ", offset=", &req->offset );
2273 static void dump_get_mapping_committed_range_reply( const struct get_mapping_committed_range_reply *req )
2275 dump_uint64( " size=", &req->size );
2276 fprintf( stderr, ", committed=%d", req->committed );
2279 static void dump_add_mapping_committed_range_request( const struct add_mapping_committed_range_request *req )
2281 dump_uint64( " base=", &req->base );
2282 dump_uint64( ", offset=", &req->offset );
2283 dump_uint64( ", size=", &req->size );
2286 static void dump_is_same_mapping_request( const struct is_same_mapping_request *req )
2288 dump_uint64( " base1=", &req->base1 );
2289 dump_uint64( ", base2=", &req->base2 );
2292 static void dump_create_snapshot_request( const struct create_snapshot_request *req )
2294 fprintf( stderr, " attributes=%08x", req->attributes );
2295 fprintf( stderr, ", flags=%08x", req->flags );
2298 static void dump_create_snapshot_reply( const struct create_snapshot_reply *req )
2300 fprintf( stderr, " handle=%04x", req->handle );
2303 static void dump_next_process_request( const struct next_process_request *req )
2305 fprintf( stderr, " handle=%04x", req->handle );
2306 fprintf( stderr, ", reset=%d", req->reset );
2309 static void dump_next_process_reply( const struct next_process_reply *req )
2311 fprintf( stderr, " count=%d", req->count );
2312 fprintf( stderr, ", pid=%04x", req->pid );
2313 fprintf( stderr, ", ppid=%04x", req->ppid );
2314 fprintf( stderr, ", threads=%d", req->threads );
2315 fprintf( stderr, ", priority=%d", req->priority );
2316 fprintf( stderr, ", handles=%d", req->handles );
2317 fprintf( stderr, ", unix_pid=%d", req->unix_pid );
2318 dump_varargs_unicode_str( ", filename=", cur_size );
2321 static void dump_next_thread_request( const struct next_thread_request *req )
2323 fprintf( stderr, " handle=%04x", req->handle );
2324 fprintf( stderr, ", reset=%d", req->reset );
2327 static void dump_next_thread_reply( const struct next_thread_reply *req )
2329 fprintf( stderr, " count=%d", req->count );
2330 fprintf( stderr, ", pid=%04x", req->pid );
2331 fprintf( stderr, ", tid=%04x", req->tid );
2332 fprintf( stderr, ", base_pri=%d", req->base_pri );
2333 fprintf( stderr, ", delta_pri=%d", req->delta_pri );
2336 static void dump_wait_debug_event_request( const struct wait_debug_event_request *req )
2338 fprintf( stderr, " get_handle=%d", req->get_handle );
2341 static void dump_wait_debug_event_reply( const struct wait_debug_event_reply *req )
2343 fprintf( stderr, " pid=%04x", req->pid );
2344 fprintf( stderr, ", tid=%04x", req->tid );
2345 fprintf( stderr, ", wait=%04x", req->wait );
2346 dump_varargs_debug_event( ", event=", cur_size );
2349 static void dump_queue_exception_event_request( const struct queue_exception_event_request *req )
2351 fprintf( stderr, " first=%d", req->first );
2352 fprintf( stderr, ", code=%08x", req->code );
2353 fprintf( stderr, ", flags=%08x", req->flags );
2354 dump_uint64( ", record=", &req->record );
2355 dump_uint64( ", address=", &req->address );
2356 fprintf( stderr, ", len=%u", req->len );
2357 dump_varargs_uints64( ", params=", min(cur_size,req->len) );
2358 dump_varargs_context( ", context=", cur_size );
2361 static void dump_queue_exception_event_reply( const struct queue_exception_event_reply *req )
2363 fprintf( stderr, " handle=%04x", req->handle );
2366 static void dump_get_exception_status_request( const struct get_exception_status_request *req )
2368 fprintf( stderr, " handle=%04x", req->handle );
2371 static void dump_get_exception_status_reply( const struct get_exception_status_reply *req )
2373 dump_varargs_context( " context=", cur_size );
2376 static void dump_continue_debug_event_request( const struct continue_debug_event_request *req )
2378 fprintf( stderr, " pid=%04x", req->pid );
2379 fprintf( stderr, ", tid=%04x", req->tid );
2380 fprintf( stderr, ", status=%d", req->status );
2383 static void dump_debug_process_request( const struct debug_process_request *req )
2385 fprintf( stderr, " pid=%04x", req->pid );
2386 fprintf( stderr, ", attach=%d", req->attach );
2389 static void dump_debug_break_request( const struct debug_break_request *req )
2391 fprintf( stderr, " handle=%04x", req->handle );
2394 static void dump_debug_break_reply( const struct debug_break_reply *req )
2396 fprintf( stderr, " self=%d", req->self );
2399 static void dump_set_debugger_kill_on_exit_request( const struct set_debugger_kill_on_exit_request *req )
2401 fprintf( stderr, " kill_on_exit=%d", req->kill_on_exit );
2404 static void dump_read_process_memory_request( const struct read_process_memory_request *req )
2406 fprintf( stderr, " handle=%04x", req->handle );
2407 dump_uint64( ", addr=", &req->addr );
2410 static void dump_read_process_memory_reply( const struct read_process_memory_reply *req )
2412 dump_varargs_bytes( " data=", cur_size );
2415 static void dump_write_process_memory_request( const struct write_process_memory_request *req )
2417 fprintf( stderr, " handle=%04x", req->handle );
2418 dump_uint64( ", addr=", &req->addr );
2419 dump_varargs_bytes( ", data=", cur_size );
2422 static void dump_create_key_request( const struct create_key_request *req )
2424 fprintf( stderr, " access=%08x", req->access );
2425 fprintf( stderr, ", options=%08x", req->options );
2426 dump_varargs_object_attributes( ", objattr=", cur_size );
2427 dump_varargs_unicode_str( ", class=", cur_size );
2430 static void dump_create_key_reply( const struct create_key_reply *req )
2432 fprintf( stderr, " hkey=%04x", req->hkey );
2433 fprintf( stderr, ", created=%d", req->created );
2436 static void dump_open_key_request( const struct open_key_request *req )
2438 fprintf( stderr, " parent=%04x", req->parent );
2439 fprintf( stderr, ", access=%08x", req->access );
2440 fprintf( stderr, ", attributes=%08x", req->attributes );
2441 dump_varargs_unicode_str( ", name=", cur_size );
2444 static void dump_open_key_reply( const struct open_key_reply *req )
2446 fprintf( stderr, " hkey=%04x", req->hkey );
2449 static void dump_delete_key_request( const struct delete_key_request *req )
2451 fprintf( stderr, " hkey=%04x", req->hkey );
2454 static void dump_flush_key_request( const struct flush_key_request *req )
2456 fprintf( stderr, " hkey=%04x", req->hkey );
2459 static void dump_enum_key_request( const struct enum_key_request *req )
2461 fprintf( stderr, " hkey=%04x", req->hkey );
2462 fprintf( stderr, ", index=%d", req->index );
2463 fprintf( stderr, ", info_class=%d", req->info_class );
2466 static void dump_enum_key_reply( const struct enum_key_reply *req )
2468 fprintf( stderr, " subkeys=%d", req->subkeys );
2469 fprintf( stderr, ", max_subkey=%d", req->max_subkey );
2470 fprintf( stderr, ", max_class=%d", req->max_class );
2471 fprintf( stderr, ", values=%d", req->values );
2472 fprintf( stderr, ", max_value=%d", req->max_value );
2473 fprintf( stderr, ", max_data=%d", req->max_data );
2474 dump_timeout( ", modif=", &req->modif );
2475 fprintf( stderr, ", total=%u", req->total );
2476 fprintf( stderr, ", namelen=%u", req->namelen );
2477 dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
2478 dump_varargs_unicode_str( ", class=", cur_size );
2481 static void dump_set_key_value_request( const struct set_key_value_request *req )
2483 fprintf( stderr, " hkey=%04x", req->hkey );
2484 fprintf( stderr, ", type=%d", req->type );
2485 fprintf( stderr, ", namelen=%u", req->namelen );
2486 dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
2487 dump_varargs_bytes( ", data=", cur_size );
2490 static void dump_get_key_value_request( const struct get_key_value_request *req )
2492 fprintf( stderr, " hkey=%04x", req->hkey );
2493 dump_varargs_unicode_str( ", name=", cur_size );
2496 static void dump_get_key_value_reply( const struct get_key_value_reply *req )
2498 fprintf( stderr, " type=%d", req->type );
2499 fprintf( stderr, ", total=%u", req->total );
2500 dump_varargs_bytes( ", data=", cur_size );
2503 static void dump_enum_key_value_request( const struct enum_key_value_request *req )
2505 fprintf( stderr, " hkey=%04x", req->hkey );
2506 fprintf( stderr, ", index=%d", req->index );
2507 fprintf( stderr, ", info_class=%d", req->info_class );
2510 static void dump_enum_key_value_reply( const struct enum_key_value_reply *req )
2512 fprintf( stderr, " type=%d", req->type );
2513 fprintf( stderr, ", total=%u", req->total );
2514 fprintf( stderr, ", namelen=%u", req->namelen );
2515 dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
2516 dump_varargs_bytes( ", data=", cur_size );
2519 static void dump_delete_key_value_request( const struct delete_key_value_request *req )
2521 fprintf( stderr, " hkey=%04x", req->hkey );
2522 dump_varargs_unicode_str( ", name=", cur_size );
2525 static void dump_load_registry_request( const struct load_registry_request *req )
2527 fprintf( stderr, " file=%04x", req->file );
2528 dump_varargs_object_attributes( ", objattr=", cur_size );
2531 static void dump_unload_registry_request( const struct unload_registry_request *req )
2533 fprintf( stderr, " hkey=%04x", req->hkey );
2536 static void dump_save_registry_request( const struct save_registry_request *req )
2538 fprintf( stderr, " hkey=%04x", req->hkey );
2539 fprintf( stderr, ", file=%04x", req->file );
2542 static void dump_set_registry_notification_request( const struct set_registry_notification_request *req )
2544 fprintf( stderr, " hkey=%04x", req->hkey );
2545 fprintf( stderr, ", event=%04x", req->event );
2546 fprintf( stderr, ", subtree=%d", req->subtree );
2547 fprintf( stderr, ", filter=%08x", req->filter );
2550 static void dump_create_timer_request( const struct create_timer_request *req )
2552 fprintf( stderr, " access=%08x", req->access );
2553 fprintf( stderr, ", manual=%d", req->manual );
2554 dump_varargs_object_attributes( ", objattr=", cur_size );
2557 static void dump_create_timer_reply( const struct create_timer_reply *req )
2559 fprintf( stderr, " handle=%04x", req->handle );
2562 static void dump_open_timer_request( const struct open_timer_request *req )
2564 fprintf( stderr, " access=%08x", req->access );
2565 fprintf( stderr, ", attributes=%08x", req->attributes );
2566 fprintf( stderr, ", rootdir=%04x", req->rootdir );
2567 dump_varargs_unicode_str( ", name=", cur_size );
2570 static void dump_open_timer_reply( const struct open_timer_reply *req )
2572 fprintf( stderr, " handle=%04x", req->handle );
2575 static void dump_set_timer_request( const struct set_timer_request *req )
2577 fprintf( stderr, " handle=%04x", req->handle );
2578 dump_timeout( ", expire=", &req->expire );
2579 dump_uint64( ", callback=", &req->callback );
2580 dump_uint64( ", arg=", &req->arg );
2581 fprintf( stderr, ", period=%d", req->period );
2584 static void dump_set_timer_reply( const struct set_timer_reply *req )
2586 fprintf( stderr, " signaled=%d", req->signaled );
2589 static void dump_cancel_timer_request( const struct cancel_timer_request *req )
2591 fprintf( stderr, " handle=%04x", req->handle );
2594 static void dump_cancel_timer_reply( const struct cancel_timer_reply *req )
2596 fprintf( stderr, " signaled=%d", req->signaled );
2599 static void dump_get_timer_info_request( const struct get_timer_info_request *req )
2601 fprintf( stderr, " handle=%04x", req->handle );
2604 static void dump_get_timer_info_reply( const struct get_timer_info_reply *req )
2606 dump_timeout( " when=", &req->when );
2607 fprintf( stderr, ", signaled=%d", req->signaled );
2610 static void dump_get_thread_context_request( const struct get_thread_context_request *req )
2612 fprintf( stderr, " handle=%04x", req->handle );
2613 fprintf( stderr, ", flags=%08x", req->flags );
2614 fprintf( stderr, ", suspend=%d", req->suspend );
2617 static void dump_get_thread_context_reply( const struct get_thread_context_reply *req )
2619 fprintf( stderr, " self=%d", req->self );
2620 dump_varargs_context( ", context=", cur_size );
2623 static void dump_set_thread_context_request( const struct set_thread_context_request *req )
2625 fprintf( stderr, " handle=%04x", req->handle );
2626 fprintf( stderr, ", suspend=%d", req->suspend );
2627 dump_varargs_context( ", context=", cur_size );
2630 static void dump_set_thread_context_reply( const struct set_thread_context_reply *req )
2632 fprintf( stderr, " self=%d", req->self );
2635 static void dump_get_selector_entry_request( const struct get_selector_entry_request *req )
2637 fprintf( stderr, " handle=%04x", req->handle );
2638 fprintf( stderr, ", entry=%d", req->entry );
2641 static void dump_get_selector_entry_reply( const struct get_selector_entry_reply *req )
2643 fprintf( stderr, " base=%08x", req->base );
2644 fprintf( stderr, ", limit=%08x", req->limit );
2645 fprintf( stderr, ", flags=%02x", req->flags );
2648 static void dump_add_atom_request( const struct add_atom_request *req )
2650 fprintf( stderr, " table=%04x", req->table );
2651 dump_varargs_unicode_str( ", name=", cur_size );
2654 static void dump_add_atom_reply( const struct add_atom_reply *req )
2656 fprintf( stderr, " atom=%04x", req->atom );
2659 static void dump_delete_atom_request( const struct delete_atom_request *req )
2661 fprintf( stderr, " table=%04x", req->table );
2662 fprintf( stderr, ", atom=%04x", req->atom );
2665 static void dump_find_atom_request( const struct find_atom_request *req )
2667 fprintf( stderr, " table=%04x", req->table );
2668 dump_varargs_unicode_str( ", name=", cur_size );
2671 static void dump_find_atom_reply( const struct find_atom_reply *req )
2673 fprintf( stderr, " atom=%04x", req->atom );
2676 static void dump_get_atom_information_request( const struct get_atom_information_request *req )
2678 fprintf( stderr, " table=%04x", req->table );
2679 fprintf( stderr, ", atom=%04x", req->atom );
2682 static void dump_get_atom_information_reply( const struct get_atom_information_reply *req )
2684 fprintf( stderr, " count=%d", req->count );
2685 fprintf( stderr, ", pinned=%d", req->pinned );
2686 fprintf( stderr, ", total=%u", req->total );
2687 dump_varargs_unicode_str( ", name=", cur_size );
2690 static void dump_set_atom_information_request( const struct set_atom_information_request *req )
2692 fprintf( stderr, " table=%04x", req->table );
2693 fprintf( stderr, ", atom=%04x", req->atom );
2694 fprintf( stderr, ", pinned=%d", req->pinned );
2697 static void dump_empty_atom_table_request( const struct empty_atom_table_request *req )
2699 fprintf( stderr, " table=%04x", req->table );
2700 fprintf( stderr, ", if_pinned=%d", req->if_pinned );
2703 static void dump_init_atom_table_request( const struct init_atom_table_request *req )
2705 fprintf( stderr, " entries=%d", req->entries );
2708 static void dump_init_atom_table_reply( const struct init_atom_table_reply *req )
2710 fprintf( stderr, " table=%04x", req->table );
2713 static void dump_get_msg_queue_request( const struct get_msg_queue_request *req )
2717 static void dump_get_msg_queue_reply( const struct get_msg_queue_reply *req )
2719 fprintf( stderr, " handle=%04x", req->handle );
2722 static void dump_set_queue_fd_request( const struct set_queue_fd_request *req )
2724 fprintf( stderr, " handle=%04x", req->handle );
2727 static void dump_set_queue_mask_request( const struct set_queue_mask_request *req )
2729 fprintf( stderr, " wake_mask=%08x", req->wake_mask );
2730 fprintf( stderr, ", changed_mask=%08x", req->changed_mask );
2731 fprintf( stderr, ", skip_wait=%d", req->skip_wait );
2734 static void dump_set_queue_mask_reply( const struct set_queue_mask_reply *req )
2736 fprintf( stderr, " wake_bits=%08x", req->wake_bits );
2737 fprintf( stderr, ", changed_bits=%08x", req->changed_bits );
2740 static void dump_get_queue_status_request( const struct get_queue_status_request *req )
2742 fprintf( stderr, " clear_bits=%08x", req->clear_bits );
2745 static void dump_get_queue_status_reply( const struct get_queue_status_reply *req )
2747 fprintf( stderr, " wake_bits=%08x", req->wake_bits );
2748 fprintf( stderr, ", changed_bits=%08x", req->changed_bits );
2751 static void dump_get_process_idle_event_request( const struct get_process_idle_event_request *req )
2753 fprintf( stderr, " handle=%04x", req->handle );
2756 static void dump_get_process_idle_event_reply( const struct get_process_idle_event_reply *req )
2758 fprintf( stderr, " event=%04x", req->event );
2761 static void dump_send_message_request( const struct send_message_request *req )
2763 fprintf( stderr, " id=%04x", req->id );
2764 fprintf( stderr, ", type=%d", req->type );
2765 fprintf( stderr, ", flags=%d", req->flags );
2766 fprintf( stderr, ", win=%08x", req->win );
2767 fprintf( stderr, ", msg=%08x", req->msg );
2768 dump_uint64( ", wparam=", &req->wparam );
2769 dump_uint64( ", lparam=", &req->lparam );
2770 dump_timeout( ", timeout=", &req->timeout );
2771 dump_varargs_message_data( ", data=", cur_size );
2774 static void dump_post_quit_message_request( const struct post_quit_message_request *req )
2776 fprintf( stderr, " exit_code=%d", req->exit_code );
2779 static void dump_send_hardware_message_request( const struct send_hardware_message_request *req )
2781 fprintf( stderr, " win=%08x", req->win );
2782 dump_hw_input( ", input=", &req->input );
2783 fprintf( stderr, ", flags=%08x", req->flags );
2786 static void dump_send_hardware_message_reply( const struct send_hardware_message_reply *req )
2788 fprintf( stderr, " wait=%d", req->wait );
2789 fprintf( stderr, ", prev_x=%d", req->prev_x );
2790 fprintf( stderr, ", prev_y=%d", req->prev_y );
2791 fprintf( stderr, ", new_x=%d", req->new_x );
2792 fprintf( stderr, ", new_y=%d", req->new_y );
2793 dump_varargs_bytes( ", keystate=", cur_size );
2796 static void dump_get_message_request( const struct get_message_request *req )
2798 fprintf( stderr, " flags=%08x", req->flags );
2799 fprintf( stderr, ", get_win=%08x", req->get_win );
2800 fprintf( stderr, ", get_first=%08x", req->get_first );
2801 fprintf( stderr, ", get_last=%08x", req->get_last );
2802 fprintf( stderr, ", hw_id=%08x", req->hw_id );
2803 fprintf( stderr, ", wake_mask=%08x", req->wake_mask );
2804 fprintf( stderr, ", changed_mask=%08x", req->changed_mask );
2807 static void dump_get_message_reply( const struct get_message_reply *req )
2809 fprintf( stderr, " win=%08x", req->win );
2810 fprintf( stderr, ", msg=%08x", req->msg );
2811 dump_uint64( ", wparam=", &req->wparam );
2812 dump_uint64( ", lparam=", &req->lparam );
2813 fprintf( stderr, ", type=%d", req->type );
2814 fprintf( stderr, ", x=%d", req->x );
2815 fprintf( stderr, ", y=%d", req->y );
2816 fprintf( stderr, ", time=%08x", req->time );
2817 fprintf( stderr, ", active_hooks=%08x", req->active_hooks );
2818 fprintf( stderr, ", total=%u", req->total );
2819 dump_varargs_message_data( ", data=", cur_size );
2822 static void dump_reply_message_request( const struct reply_message_request *req )
2824 fprintf( stderr, " remove=%d", req->remove );
2825 dump_uint64( ", result=", &req->result );
2826 dump_varargs_bytes( ", data=", cur_size );
2829 static void dump_accept_hardware_message_request( const struct accept_hardware_message_request *req )
2831 fprintf( stderr, " hw_id=%08x", req->hw_id );
2832 fprintf( stderr, ", remove=%d", req->remove );
2835 static void dump_get_message_reply_request( const struct get_message_reply_request *req )
2837 fprintf( stderr, " cancel=%d", req->cancel );
2840 static void dump_get_message_reply_reply( const struct get_message_reply_reply *req )
2842 dump_uint64( " result=", &req->result );
2843 dump_varargs_bytes( ", data=", cur_size );
2846 static void dump_set_win_timer_request( const struct set_win_timer_request *req )
2848 fprintf( stderr, " win=%08x", req->win );
2849 fprintf( stderr, ", msg=%08x", req->msg );
2850 fprintf( stderr, ", rate=%08x", req->rate );
2851 dump_uint64( ", id=", &req->id );
2852 dump_uint64( ", lparam=", &req->lparam );
2855 static void dump_set_win_timer_reply( const struct set_win_timer_reply *req )
2857 dump_uint64( " id=", &req->id );
2860 static void dump_kill_win_timer_request( const struct kill_win_timer_request *req )
2862 fprintf( stderr, " win=%08x", req->win );
2863 dump_uint64( ", id=", &req->id );
2864 fprintf( stderr, ", msg=%08x", req->msg );
2867 static void dump_is_window_hung_request( const struct is_window_hung_request *req )
2869 fprintf( stderr, " win=%08x", req->win );
2872 static void dump_is_window_hung_reply( const struct is_window_hung_reply *req )
2874 fprintf( stderr, " is_hung=%d", req->is_hung );
2877 static void dump_get_serial_info_request( const struct get_serial_info_request *req )
2879 fprintf( stderr, " handle=%04x", req->handle );
2880 fprintf( stderr, ", flags=%d", req->flags );
2883 static void dump_get_serial_info_reply( const struct get_serial_info_reply *req )
2885 fprintf( stderr, " eventmask=%08x", req->eventmask );
2886 fprintf( stderr, ", cookie=%08x", req->cookie );
2887 fprintf( stderr, ", pending_write=%08x", req->pending_write );
2890 static void dump_set_serial_info_request( const struct set_serial_info_request *req )
2892 fprintf( stderr, " handle=%04x", req->handle );
2893 fprintf( stderr, ", flags=%d", req->flags );
2896 static void dump_register_async_request( const struct register_async_request *req )
2898 fprintf( stderr, " type=%d", req->type );
2899 dump_async_data( ", async=", &req->async );
2900 fprintf( stderr, ", count=%d", req->count );
2903 static void dump_cancel_async_request( const struct cancel_async_request *req )
2905 fprintf( stderr, " handle=%04x", req->handle );
2906 dump_uint64( ", iosb=", &req->iosb );
2907 fprintf( stderr, ", only_thread=%d", req->only_thread );
2910 static void dump_get_async_result_request( const struct get_async_result_request *req )
2912 dump_uint64( " user_arg=", &req->user_arg );
2915 static void dump_get_async_result_reply( const struct get_async_result_reply *req )
2917 fprintf( stderr, " size=%u", req->size );
2918 dump_varargs_bytes( ", out_data=", cur_size );
2921 static void dump_read_request( const struct read_request *req )
2923 dump_async_data( " async=", &req->async );
2924 dump_uint64( ", pos=", &req->pos );
2927 static void dump_read_reply( const struct read_reply *req )
2929 fprintf( stderr, " wait=%04x", req->wait );
2930 fprintf( stderr, ", options=%08x", req->options );
2931 dump_varargs_bytes( ", data=", cur_size );
2934 static void dump_write_request( const struct write_request *req )
2936 dump_async_data( " async=", &req->async );
2937 dump_uint64( ", pos=", &req->pos );
2938 dump_varargs_bytes( ", data=", cur_size );
2941 static void dump_write_reply( const struct write_reply *req )
2943 fprintf( stderr, " wait=%04x", req->wait );
2944 fprintf( stderr, ", options=%08x", req->options );
2945 fprintf( stderr, ", size=%u", req->size );
2948 static void dump_ioctl_request( const struct ioctl_request *req )
2950 dump_ioctl_code( " code=", &req->code );
2951 dump_async_data( ", async=", &req->async );
2952 dump_varargs_bytes( ", in_data=", cur_size );
2955 static void dump_ioctl_reply( const struct ioctl_reply *req )
2957 fprintf( stderr, " wait=%04x", req->wait );
2958 fprintf( stderr, ", options=%08x", req->options );
2959 dump_varargs_bytes( ", out_data=", cur_size );
2962 static void dump_set_irp_result_request( const struct set_irp_result_request *req )
2964 fprintf( stderr, " handle=%04x", req->handle );
2965 fprintf( stderr, ", status=%08x", req->status );
2966 fprintf( stderr, ", size=%u", req->size );
2967 dump_uint64( ", file_ptr=", &req->file_ptr );
2968 dump_varargs_bytes( ", data=", cur_size );
2971 static void dump_create_named_pipe_request( const struct create_named_pipe_request *req )
2973 fprintf( stderr, " access=%08x", req->access );
2974 fprintf( stderr, ", options=%08x", req->options );
2975 fprintf( stderr, ", sharing=%08x", req->sharing );
2976 fprintf( stderr, ", maxinstances=%08x", req->maxinstances );
2977 fprintf( stderr, ", outsize=%08x", req->outsize );
2978 fprintf( stderr, ", insize=%08x", req->insize );
2979 dump_timeout( ", timeout=", &req->timeout );
2980 fprintf( stderr, ", flags=%08x", req->flags );
2981 dump_varargs_object_attributes( ", objattr=", cur_size );
2984 static void dump_create_named_pipe_reply( const struct create_named_pipe_reply *req )
2986 fprintf( stderr, " handle=%04x", req->handle );
2989 static void dump_get_named_pipe_info_request( const struct get_named_pipe_info_request *req )
2991 fprintf( stderr, " handle=%04x", req->handle );
2994 static void dump_get_named_pipe_info_reply( const struct get_named_pipe_info_reply *req )
2996 fprintf( stderr, " flags=%08x", req->flags );
2997 fprintf( stderr, ", sharing=%08x", req->sharing );
2998 fprintf( stderr, ", maxinstances=%08x", req->maxinstances );
2999 fprintf( stderr, ", instances=%08x", req->instances );
3000 fprintf( stderr, ", outsize=%08x", req->outsize );
3001 fprintf( stderr, ", insize=%08x", req->insize );
3004 static void dump_set_named_pipe_info_request( const struct set_named_pipe_info_request *req )
3006 fprintf( stderr, " handle=%04x", req->handle );
3007 fprintf( stderr, ", flags=%08x", req->flags );
3010 static void dump_create_window_request( const struct create_window_request *req )
3012 fprintf( stderr, " parent=%08x", req->parent );
3013 fprintf( stderr, ", owner=%08x", req->owner );
3014 fprintf( stderr, ", atom=%04x", req->atom );
3015 dump_uint64( ", instance=", &req->instance );
3016 dump_varargs_unicode_str( ", class=", cur_size );
3019 static void dump_create_window_reply( const struct create_window_reply *req )
3021 fprintf( stderr, " handle=%08x", req->handle );
3022 fprintf( stderr, ", parent=%08x", req->parent );
3023 fprintf( stderr, ", owner=%08x", req->owner );
3024 fprintf( stderr, ", extra=%d", req->extra );
3025 dump_uint64( ", class_ptr=", &req->class_ptr );
3028 static void dump_destroy_window_request( const struct destroy_window_request *req )
3030 fprintf( stderr, " handle=%08x", req->handle );
3033 static void dump_get_desktop_window_request( const struct get_desktop_window_request *req )
3035 fprintf( stderr, " force=%d", req->force );
3038 static void dump_get_desktop_window_reply( const struct get_desktop_window_reply *req )
3040 fprintf( stderr, " top_window=%08x", req->top_window );
3041 fprintf( stderr, ", msg_window=%08x", req->msg_window );
3044 static void dump_set_window_owner_request( const struct set_window_owner_request *req )
3046 fprintf( stderr, " handle=%08x", req->handle );
3047 fprintf( stderr, ", owner=%08x", req->owner );
3050 static void dump_set_window_owner_reply( const struct set_window_owner_reply *req )
3052 fprintf( stderr, " full_owner=%08x", req->full_owner );
3053 fprintf( stderr, ", prev_owner=%08x", req->prev_owner );
3056 static void dump_get_window_info_request( const struct get_window_info_request *req )
3058 fprintf( stderr, " handle=%08x", req->handle );
3061 static void dump_get_window_info_reply( const struct get_window_info_reply *req )
3063 fprintf( stderr, " full_handle=%08x", req->full_handle );
3064 fprintf( stderr, ", last_active=%08x", req->last_active );
3065 fprintf( stderr, ", pid=%04x", req->pid );
3066 fprintf( stderr, ", tid=%04x", req->tid );
3067 fprintf( stderr, ", atom=%04x", req->atom );
3068 fprintf( stderr, ", is_unicode=%d", req->is_unicode );
3071 static void dump_set_window_info_request( const struct set_window_info_request *req )
3073 fprintf( stderr, " flags=%04x", req->flags );
3074 fprintf( stderr, ", is_unicode=%d", req->is_unicode );
3075 fprintf( stderr, ", handle=%08x", req->handle );
3076 fprintf( stderr, ", style=%08x", req->style );
3077 fprintf( stderr, ", ex_style=%08x", req->ex_style );
3078 fprintf( stderr, ", id=%08x", req->id );
3079 dump_uint64( ", instance=", &req->instance );
3080 dump_uint64( ", user_data=", &req->user_data );
3081 fprintf( stderr, ", extra_offset=%d", req->extra_offset );
3082 fprintf( stderr, ", extra_size=%u", req->extra_size );
3083 dump_uint64( ", extra_value=", &req->extra_value );
3086 static void dump_set_window_info_reply( const struct set_window_info_reply *req )
3088 fprintf( stderr, " old_style=%08x", req->old_style );
3089 fprintf( stderr, ", old_ex_style=%08x", req->old_ex_style );
3090 dump_uint64( ", old_instance=", &req->old_instance );
3091 dump_uint64( ", old_user_data=", &req->old_user_data );
3092 dump_uint64( ", old_extra_value=", &req->old_extra_value );
3093 fprintf( stderr, ", old_id=%08x", req->old_id );
3096 static void dump_set_parent_request( const struct set_parent_request *req )
3098 fprintf( stderr, " handle=%08x", req->handle );
3099 fprintf( stderr, ", parent=%08x", req->parent );
3102 static void dump_set_parent_reply( const struct set_parent_reply *req )
3104 fprintf( stderr, " old_parent=%08x", req->old_parent );
3105 fprintf( stderr, ", full_parent=%08x", req->full_parent );
3108 static void dump_get_window_parents_request( const struct get_window_parents_request *req )
3110 fprintf( stderr, " handle=%08x", req->handle );
3113 static void dump_get_window_parents_reply( const struct get_window_parents_reply *req )
3115 fprintf( stderr, " count=%d", req->count );
3116 dump_varargs_user_handles( ", parents=", cur_size );
3119 static void dump_get_window_children_request( const struct get_window_children_request *req )
3121 fprintf( stderr, " desktop=%04x", req->desktop );
3122 fprintf( stderr, ", parent=%08x", req->parent );
3123 fprintf( stderr, ", atom=%04x", req->atom );
3124 fprintf( stderr, ", tid=%04x", req->tid );
3125 dump_varargs_unicode_str( ", class=", cur_size );
3128 static void dump_get_window_children_reply( const struct get_window_children_reply *req )
3130 fprintf( stderr, " count=%d", req->count );
3131 dump_varargs_user_handles( ", children=", cur_size );
3134 static void dump_get_window_children_from_point_request( const struct get_window_children_from_point_request *req )
3136 fprintf( stderr, " parent=%08x", req->parent );
3137 fprintf( stderr, ", x=%d", req->x );
3138 fprintf( stderr, ", y=%d", req->y );
3141 static void dump_get_window_children_from_point_reply( const struct get_window_children_from_point_reply *req )
3143 fprintf( stderr, " count=%d", req->count );
3144 dump_varargs_user_handles( ", children=", cur_size );
3147 static void dump_get_window_tree_request( const struct get_window_tree_request *req )
3149 fprintf( stderr, " handle=%08x", req->handle );
3152 static void dump_get_window_tree_reply( const struct get_window_tree_reply *req )
3154 fprintf( stderr, " parent=%08x", req->parent );
3155 fprintf( stderr, ", owner=%08x", req->owner );
3156 fprintf( stderr, ", next_sibling=%08x", req->next_sibling );
3157 fprintf( stderr, ", prev_sibling=%08x", req->prev_sibling );
3158 fprintf( stderr, ", first_sibling=%08x", req->first_sibling );
3159 fprintf( stderr, ", last_sibling=%08x", req->last_sibling );
3160 fprintf( stderr, ", first_child=%08x", req->first_child );
3161 fprintf( stderr, ", last_child=%08x", req->last_child );
3164 static void dump_set_window_pos_request( const struct set_window_pos_request *req )
3166 fprintf( stderr, " swp_flags=%04x", req->swp_flags );
3167 fprintf( stderr, ", paint_flags=%04x", req->paint_flags );
3168 fprintf( stderr, ", handle=%08x", req->handle );
3169 fprintf( stderr, ", previous=%08x", req->previous );
3170 dump_rectangle( ", window=", &req->window );
3171 dump_rectangle( ", client=", &req->client );
3172 dump_varargs_rectangles( ", valid=", cur_size );
3175 static void dump_set_window_pos_reply( const struct set_window_pos_reply *req )
3177 fprintf( stderr, " new_style=%08x", req->new_style );
3178 fprintf( stderr, ", new_ex_style=%08x", req->new_ex_style );
3179 fprintf( stderr, ", surface_win=%08x", req->surface_win );
3180 fprintf( stderr, ", needs_update=%d", req->needs_update );
3183 static void dump_get_window_rectangles_request( const struct get_window_rectangles_request *req )
3185 fprintf( stderr, " handle=%08x", req->handle );
3186 fprintf( stderr, ", relative=%d", req->relative );
3189 static void dump_get_window_rectangles_reply( const struct get_window_rectangles_reply *req )
3191 dump_rectangle( " window=", &req->window );
3192 dump_rectangle( ", visible=", &req->visible );
3193 dump_rectangle( ", client=", &req->client );
3196 static void dump_get_window_text_request( const struct get_window_text_request *req )
3198 fprintf( stderr, " handle=%08x", req->handle );
3201 static void dump_get_window_text_reply( const struct get_window_text_reply *req )
3203 dump_varargs_unicode_str( " text=", cur_size );
3206 static void dump_set_window_text_request( const struct set_window_text_request *req )
3208 fprintf( stderr, " handle=%08x", req->handle );
3209 dump_varargs_unicode_str( ", text=", cur_size );
3212 static void dump_get_windows_offset_request( const struct get_windows_offset_request *req )
3214 fprintf( stderr, " from=%08x", req->from );
3215 fprintf( stderr, ", to=%08x", req->to );
3218 static void dump_get_windows_offset_reply( const struct get_windows_offset_reply *req )
3220 fprintf( stderr, " x=%d", req->x );
3221 fprintf( stderr, ", y=%d", req->y );
3222 fprintf( stderr, ", mirror=%d", req->mirror );
3225 static void dump_get_visible_region_request( const struct get_visible_region_request *req )
3227 fprintf( stderr, " window=%08x", req->window );
3228 fprintf( stderr, ", flags=%08x", req->flags );
3231 static void dump_get_visible_region_reply( const struct get_visible_region_reply *req )
3233 fprintf( stderr, " top_win=%08x", req->top_win );
3234 dump_rectangle( ", top_rect=", &req->top_rect );
3235 dump_rectangle( ", win_rect=", &req->win_rect );
3236 fprintf( stderr, ", paint_flags=%08x", req->paint_flags );
3237 fprintf( stderr, ", total_size=%u", req->total_size );
3238 dump_varargs_rectangles( ", region=", cur_size );
3241 static void dump_get_surface_region_request( const struct get_surface_region_request *req )
3243 fprintf( stderr, " window=%08x", req->window );
3246 static void dump_get_surface_region_reply( const struct get_surface_region_reply *req )
3248 dump_rectangle( " visible_rect=", &req->visible_rect );
3249 fprintf( stderr, ", total_size=%u", req->total_size );
3250 dump_varargs_rectangles( ", region=", cur_size );
3253 static void dump_get_window_region_request( const struct get_window_region_request *req )
3255 fprintf( stderr, " window=%08x", req->window );
3258 static void dump_get_window_region_reply( const struct get_window_region_reply *req )
3260 fprintf( stderr, " total_size=%u", req->total_size );
3261 dump_varargs_rectangles( ", region=", cur_size );
3264 static void dump_set_window_region_request( const struct set_window_region_request *req )
3266 fprintf( stderr, " window=%08x", req->window );
3267 fprintf( stderr, ", redraw=%d", req->redraw );
3268 dump_varargs_rectangles( ", region=", cur_size );
3271 static void dump_get_update_region_request( const struct get_update_region_request *req )
3273 fprintf( stderr, " window=%08x", req->window );
3274 fprintf( stderr, ", from_child=%08x", req->from_child );
3275 fprintf( stderr, ", flags=%08x", req->flags );
3278 static void dump_get_update_region_reply( const struct get_update_region_reply *req )
3280 fprintf( stderr, " child=%08x", req->child );
3281 fprintf( stderr, ", flags=%08x", req->flags );
3282 fprintf( stderr, ", total_size=%u", req->total_size );
3283 dump_varargs_rectangles( ", region=", cur_size );
3286 static void dump_update_window_zorder_request( const struct update_window_zorder_request *req )
3288 fprintf( stderr, " window=%08x", req->window );
3289 dump_rectangle( ", rect=", &req->rect );
3292 static void dump_redraw_window_request( const struct redraw_window_request *req )
3294 fprintf( stderr, " window=%08x", req->window );
3295 fprintf( stderr, ", flags=%08x", req->flags );
3296 dump_varargs_rectangles( ", region=", cur_size );
3299 static void dump_set_window_property_request( const struct set_window_property_request *req )
3301 fprintf( stderr, " window=%08x", req->window );
3302 dump_uint64( ", data=", &req->data );
3303 fprintf( stderr, ", atom=%04x", req->atom );
3304 dump_varargs_unicode_str( ", name=", cur_size );
3307 static void dump_remove_window_property_request( const struct remove_window_property_request *req )
3309 fprintf( stderr, " window=%08x", req->window );
3310 fprintf( stderr, ", atom=%04x", req->atom );
3311 dump_varargs_unicode_str( ", name=", cur_size );
3314 static void dump_remove_window_property_reply( const struct remove_window_property_reply *req )
3316 dump_uint64( " data=", &req->data );
3319 static void dump_get_window_property_request( const struct get_window_property_request *req )
3321 fprintf( stderr, " window=%08x", req->window );
3322 fprintf( stderr, ", atom=%04x", req->atom );
3323 dump_varargs_unicode_str( ", name=", cur_size );
3326 static void dump_get_window_property_reply( const struct get_window_property_reply *req )
3328 dump_uint64( " data=", &req->data );
3331 static void dump_get_window_properties_request( const struct get_window_properties_request *req )
3333 fprintf( stderr, " window=%08x", req->window );
3336 static void dump_get_window_properties_reply( const struct get_window_properties_reply *req )
3338 fprintf( stderr, " total=%d", req->total );
3339 dump_varargs_properties( ", props=", cur_size );
3342 static void dump_create_winstation_request( const struct create_winstation_request *req )
3344 fprintf( stderr, " flags=%08x", req->flags );
3345 fprintf( stderr, ", access=%08x", req->access );
3346 fprintf( stderr, ", attributes=%08x", req->attributes );
3347 fprintf( stderr, ", rootdir=%04x", req->rootdir );
3348 dump_varargs_unicode_str( ", name=", cur_size );
3351 static void dump_create_winstation_reply( const struct create_winstation_reply *req )
3353 fprintf( stderr, " handle=%04x", req->handle );
3356 static void dump_open_winstation_request( const struct open_winstation_request *req )
3358 fprintf( stderr, " access=%08x", req->access );
3359 fprintf( stderr, ", attributes=%08x", req->attributes );
3360 fprintf( stderr, ", rootdir=%04x", req->rootdir );
3361 dump_varargs_unicode_str( ", name=", cur_size );
3364 static void dump_open_winstation_reply( const struct open_winstation_reply *req )
3366 fprintf( stderr, " handle=%04x", req->handle );
3369 static void dump_close_winstation_request( const struct close_winstation_request *req )
3371 fprintf( stderr, " handle=%04x", req->handle );
3374 static void dump_get_process_winstation_request( const struct get_process_winstation_request *req )
3378 static void dump_get_process_winstation_reply( const struct get_process_winstation_reply *req )
3380 fprintf( stderr, " handle=%04x", req->handle );
3383 static void dump_set_process_winstation_request( const struct set_process_winstation_request *req )
3385 fprintf( stderr, " handle=%04x", req->handle );
3388 static void dump_enum_winstation_request( const struct enum_winstation_request *req )
3390 fprintf( stderr, " index=%08x", req->index );
3393 static void dump_enum_winstation_reply( const struct enum_winstation_reply *req )
3395 fprintf( stderr, " next=%08x", req->next );
3396 dump_varargs_unicode_str( ", name=", cur_size );
3399 static void dump_create_desktop_request( const struct create_desktop_request *req )
3401 fprintf( stderr, " flags=%08x", req->flags );
3402 fprintf( stderr, ", access=%08x", req->access );
3403 fprintf( stderr, ", attributes=%08x", req->attributes );
3404 dump_varargs_unicode_str( ", name=", cur_size );
3407 static void dump_create_desktop_reply( const struct create_desktop_reply *req )
3409 fprintf( stderr, " handle=%04x", req->handle );
3412 static void dump_open_desktop_request( const struct open_desktop_request *req )
3414 fprintf( stderr, " winsta=%04x", req->winsta );
3415 fprintf( stderr, ", flags=%08x", req->flags );
3416 fprintf( stderr, ", access=%08x", req->access );
3417 fprintf( stderr, ", attributes=%08x", req->attributes );
3418 dump_varargs_unicode_str( ", name=", cur_size );
3421 static void dump_open_desktop_reply( const struct open_desktop_reply *req )
3423 fprintf( stderr, " handle=%04x", req->handle );
3426 static void dump_open_input_desktop_request( const struct open_input_desktop_request *req )
3428 fprintf( stderr, " flags=%08x", req->flags );
3429 fprintf( stderr, ", access=%08x", req->access );
3430 fprintf( stderr, ", attributes=%08x", req->attributes );
3433 static void dump_open_input_desktop_reply( const struct open_input_desktop_reply *req )
3435 fprintf( stderr, " handle=%04x", req->handle );
3438 static void dump_close_desktop_request( const struct close_desktop_request *req )
3440 fprintf( stderr, " handle=%04x", req->handle );
3443 static void dump_get_thread_desktop_request( const struct get_thread_desktop_request *req )
3445 fprintf( stderr, " tid=%04x", req->tid );
3448 static void dump_get_thread_desktop_reply( const struct get_thread_desktop_reply *req )
3450 fprintf( stderr, " handle=%04x", req->handle );
3453 static void dump_set_thread_desktop_request( const struct set_thread_desktop_request *req )
3455 fprintf( stderr, " handle=%04x", req->handle );
3458 static void dump_enum_desktop_request( const struct enum_desktop_request *req )
3460 fprintf( stderr, " winstation=%04x", req->winstation );
3461 fprintf( stderr, ", index=%08x", req->index );
3464 static void dump_enum_desktop_reply( const struct enum_desktop_reply *req )
3466 fprintf( stderr, " next=%08x", req->next );
3467 dump_varargs_unicode_str( ", name=", cur_size );
3470 static void dump_set_user_object_info_request( const struct set_user_object_info_request *req )
3472 fprintf( stderr, " handle=%04x", req->handle );
3473 fprintf( stderr, ", flags=%08x", req->flags );
3474 fprintf( stderr, ", obj_flags=%08x", req->obj_flags );
3477 static void dump_set_user_object_info_reply( const struct set_user_object_info_reply *req )
3479 fprintf( stderr, " is_desktop=%d", req->is_desktop );
3480 fprintf( stderr, ", old_obj_flags=%08x", req->old_obj_flags );
3481 dump_varargs_unicode_str( ", name=", cur_size );
3484 static void dump_register_hotkey_request( const struct register_hotkey_request *req )
3486 fprintf( stderr, " window=%08x", req->window );
3487 fprintf( stderr, ", id=%d", req->id );
3488 fprintf( stderr, ", flags=%08x", req->flags );
3489 fprintf( stderr, ", vkey=%08x", req->vkey );
3492 static void dump_register_hotkey_reply( const struct register_hotkey_reply *req )
3494 fprintf( stderr, " replaced=%d", req->replaced );
3495 fprintf( stderr, ", flags=%08x", req->flags );
3496 fprintf( stderr, ", vkey=%08x", req->vkey );
3499 static void dump_unregister_hotkey_request( const struct unregister_hotkey_request *req )
3501 fprintf( stderr, " window=%08x", req->window );
3502 fprintf( stderr, ", id=%d", req->id );
3505 static void dump_unregister_hotkey_reply( const struct unregister_hotkey_reply *req )
3507 fprintf( stderr, " flags=%08x", req->flags );
3508 fprintf( stderr, ", vkey=%08x", req->vkey );
3511 static void dump_attach_thread_input_request( const struct attach_thread_input_request *req )
3513 fprintf( stderr, " tid_from=%04x", req->tid_from );
3514 fprintf( stderr, ", tid_to=%04x", req->tid_to );
3515 fprintf( stderr, ", attach=%d", req->attach );
3518 static void dump_get_thread_input_request( const struct get_thread_input_request *req )
3520 fprintf( stderr, " tid=%04x", req->tid );
3523 static void dump_get_thread_input_reply( const struct get_thread_input_reply *req )
3525 fprintf( stderr, " focus=%08x", req->focus );
3526 fprintf( stderr, ", capture=%08x", req->capture );
3527 fprintf( stderr, ", active=%08x", req->active );
3528 fprintf( stderr, ", foreground=%08x", req->foreground );
3529 fprintf( stderr, ", menu_owner=%08x", req->menu_owner );
3530 fprintf( stderr, ", move_size=%08x", req->move_size );
3531 fprintf( stderr, ", caret=%08x", req->caret );
3532 fprintf( stderr, ", cursor=%08x", req->cursor );
3533 fprintf( stderr, ", show_count=%d", req->show_count );
3534 dump_rectangle( ", rect=", &req->rect );
3537 static void dump_get_last_input_time_request( const struct get_last_input_time_request *req )
3541 static void dump_get_last_input_time_reply( const struct get_last_input_time_reply *req )
3543 fprintf( stderr, " time=%08x", req->time );
3546 static void dump_get_key_state_request( const struct get_key_state_request *req )
3548 fprintf( stderr, " tid=%04x", req->tid );
3549 fprintf( stderr, ", key=%d", req->key );
3552 static void dump_get_key_state_reply( const struct get_key_state_reply *req )
3554 fprintf( stderr, " state=%02x", req->state );
3555 dump_varargs_bytes( ", keystate=", cur_size );
3558 static void dump_set_key_state_request( const struct set_key_state_request *req )
3560 fprintf( stderr, " tid=%04x", req->tid );
3561 fprintf( stderr, ", async=%d", req->async );
3562 dump_varargs_bytes( ", keystate=", cur_size );
3565 static void dump_set_foreground_window_request( const struct set_foreground_window_request *req )
3567 fprintf( stderr, " handle=%08x", req->handle );
3570 static void dump_set_foreground_window_reply( const struct set_foreground_window_reply *req )
3572 fprintf( stderr, " previous=%08x", req->previous );
3573 fprintf( stderr, ", send_msg_old=%d", req->send_msg_old );
3574 fprintf( stderr, ", send_msg_new=%d", req->send_msg_new );
3577 static void dump_set_focus_window_request( const struct set_focus_window_request *req )
3579 fprintf( stderr, " handle=%08x", req->handle );
3582 static void dump_set_focus_window_reply( const struct set_focus_window_reply *req )
3584 fprintf( stderr, " previous=%08x", req->previous );
3587 static void dump_set_active_window_request( const struct set_active_window_request *req )
3589 fprintf( stderr, " handle=%08x", req->handle );
3592 static void dump_set_active_window_reply( const struct set_active_window_reply *req )
3594 fprintf( stderr, " previous=%08x", req->previous );
3597 static void dump_set_capture_window_request( const struct set_capture_window_request *req )
3599 fprintf( stderr, " handle=%08x", req->handle );
3600 fprintf( stderr, ", flags=%08x", req->flags );
3603 static void dump_set_capture_window_reply( const struct set_capture_window_reply *req )
3605 fprintf( stderr, " previous=%08x", req->previous );
3606 fprintf( stderr, ", full_handle=%08x", req->full_handle );
3609 static void dump_set_caret_window_request( const struct set_caret_window_request *req )
3611 fprintf( stderr, " handle=%08x", req->handle );
3612 fprintf( stderr, ", width=%d", req->width );
3613 fprintf( stderr, ", height=%d", req->height );
3616 static void dump_set_caret_window_reply( const struct set_caret_window_reply *req )
3618 fprintf( stderr, " previous=%08x", req->previous );
3619 dump_rectangle( ", old_rect=", &req->old_rect );
3620 fprintf( stderr, ", old_hide=%d", req->old_hide );
3621 fprintf( stderr, ", old_state=%d", req->old_state );
3624 static void dump_set_caret_info_request( const struct set_caret_info_request *req )
3626 fprintf( stderr, " flags=%08x", req->flags );
3627 fprintf( stderr, ", handle=%08x", req->handle );
3628 fprintf( stderr, ", x=%d", req->x );
3629 fprintf( stderr, ", y=%d", req->y );
3630 fprintf( stderr, ", hide=%d", req->hide );
3631 fprintf( stderr, ", state=%d", req->state );
3634 static void dump_set_caret_info_reply( const struct set_caret_info_reply *req )
3636 fprintf( stderr, " full_handle=%08x", req->full_handle );
3637 dump_rectangle( ", old_rect=", &req->old_rect );
3638 fprintf( stderr, ", old_hide=%d", req->old_hide );
3639 fprintf( stderr, ", old_state=%d", req->old_state );
3642 static void dump_set_hook_request( const struct set_hook_request *req )
3644 fprintf( stderr, " id=%d", req->id );
3645 fprintf( stderr, ", pid=%04x", req->pid );
3646 fprintf( stderr, ", tid=%04x", req->tid );
3647 fprintf( stderr, ", event_min=%d", req->event_min );
3648 fprintf( stderr, ", event_max=%d", req->event_max );
3649 dump_uint64( ", proc=", &req->proc );
3650 fprintf( stderr, ", flags=%d", req->flags );
3651 fprintf( stderr, ", unicode=%d", req->unicode );
3652 dump_varargs_unicode_str( ", module=", cur_size );
3655 static void dump_set_hook_reply( const struct set_hook_reply *req )
3657 fprintf( stderr, " handle=%08x", req->handle );
3658 fprintf( stderr, ", active_hooks=%08x", req->active_hooks );
3661 static void dump_remove_hook_request( const struct remove_hook_request *req )
3663 fprintf( stderr, " handle=%08x", req->handle );
3664 dump_uint64( ", proc=", &req->proc );
3665 fprintf( stderr, ", id=%d", req->id );
3668 static void dump_remove_hook_reply( const struct remove_hook_reply *req )
3670 fprintf( stderr, " active_hooks=%08x", req->active_hooks );
3673 static void dump_start_hook_chain_request( const struct start_hook_chain_request *req )
3675 fprintf( stderr, " id=%d", req->id );
3676 fprintf( stderr, ", event=%d", req->event );
3677 fprintf( stderr, ", window=%08x", req->window );
3678 fprintf( stderr, ", object_id=%d", req->object_id );
3679 fprintf( stderr, ", child_id=%d", req->child_id );
3682 static void dump_start_hook_chain_reply( const struct start_hook_chain_reply *req )
3684 fprintf( stderr, " handle=%08x", req->handle );
3685 fprintf( stderr, ", pid=%04x", req->pid );
3686 fprintf( stderr, ", tid=%04x", req->tid );
3687 fprintf( stderr, ", unicode=%d", req->unicode );
3688 dump_uint64( ", proc=", &req->proc );
3689 fprintf( stderr, ", active_hooks=%08x", req->active_hooks );
3690 dump_varargs_unicode_str( ", module=", cur_size );
3693 static void dump_finish_hook_chain_request( const struct finish_hook_chain_request *req )
3695 fprintf( stderr, " id=%d", req->id );
3698 static void dump_get_hook_info_request( const struct get_hook_info_request *req )
3700 fprintf( stderr, " handle=%08x", req->handle );
3701 fprintf( stderr, ", get_next=%d", req->get_next );
3702 fprintf( stderr, ", event=%d", req->event );
3703 fprintf( stderr, ", window=%08x", req->window );
3704 fprintf( stderr, ", object_id=%d", req->object_id );
3705 fprintf( stderr, ", child_id=%d", req->child_id );
3708 static void dump_get_hook_info_reply( const struct get_hook_info_reply *req )
3710 fprintf( stderr, " handle=%08x", req->handle );
3711 fprintf( stderr, ", id=%d", req->id );
3712 fprintf( stderr, ", pid=%04x", req->pid );
3713 fprintf( stderr, ", tid=%04x", req->tid );
3714 dump_uint64( ", proc=", &req->proc );
3715 fprintf( stderr, ", unicode=%d", req->unicode );
3716 dump_varargs_unicode_str( ", module=", cur_size );
3719 static void dump_create_class_request( const struct create_class_request *req )
3721 fprintf( stderr, " local=%d", req->local );
3722 fprintf( stderr, ", atom=%04x", req->atom );
3723 fprintf( stderr, ", style=%08x", req->style );
3724 dump_uint64( ", instance=", &req->instance );
3725 fprintf( stderr, ", extra=%d", req->extra );
3726 fprintf( stderr, ", win_extra=%d", req->win_extra );
3727 dump_uint64( ", client_ptr=", &req->client_ptr );
3728 dump_varargs_unicode_str( ", name=", cur_size );
3731 static void dump_create_class_reply( const struct create_class_reply *req )
3733 fprintf( stderr, " atom=%04x", req->atom );
3736 static void dump_destroy_class_request( const struct destroy_class_request *req )
3738 fprintf( stderr, " atom=%04x", req->atom );
3739 dump_uint64( ", instance=", &req->instance );
3740 dump_varargs_unicode_str( ", name=", cur_size );
3743 static void dump_destroy_class_reply( const struct destroy_class_reply *req )
3745 dump_uint64( " client_ptr=", &req->client_ptr );
3748 static void dump_set_class_info_request( const struct set_class_info_request *req )
3750 fprintf( stderr, " window=%08x", req->window );
3751 fprintf( stderr, ", flags=%08x", req->flags );
3752 fprintf( stderr, ", atom=%04x", req->atom );
3753 fprintf( stderr, ", style=%08x", req->style );
3754 fprintf( stderr, ", win_extra=%d", req->win_extra );
3755 dump_uint64( ", instance=", &req->instance );
3756 fprintf( stderr, ", extra_offset=%d", req->extra_offset );
3757 fprintf( stderr, ", extra_size=%u", req->extra_size );
3758 dump_uint64( ", extra_value=", &req->extra_value );
3761 static void dump_set_class_info_reply( const struct set_class_info_reply *req )
3763 fprintf( stderr, " old_atom=%04x", req->old_atom );
3764 fprintf( stderr, ", old_style=%08x", req->old_style );
3765 fprintf( stderr, ", old_extra=%d", req->old_extra );
3766 fprintf( stderr, ", old_win_extra=%d", req->old_win_extra );
3767 dump_uint64( ", old_instance=", &req->old_instance );
3768 dump_uint64( ", old_extra_value=", &req->old_extra_value );
3771 static void dump_open_clipboard_request( const struct open_clipboard_request *req )
3773 fprintf( stderr, " window=%08x", req->window );
3776 static void dump_open_clipboard_reply( const struct open_clipboard_reply *req )
3778 fprintf( stderr, " owner=%08x", req->owner );
3781 static void dump_close_clipboard_request( const struct close_clipboard_request *req )
3785 static void dump_close_clipboard_reply( const struct close_clipboard_reply *req )
3787 fprintf( stderr, " viewer=%08x", req->viewer );
3788 fprintf( stderr, ", owner=%08x", req->owner );
3791 static void dump_empty_clipboard_request( const struct empty_clipboard_request *req )
3795 static void dump_set_clipboard_data_request( const struct set_clipboard_data_request *req )
3797 fprintf( stderr, " format=%08x", req->format );
3798 fprintf( stderr, ", lcid=%08x", req->lcid );
3799 dump_varargs_bytes( ", data=", cur_size );
3802 static void dump_set_clipboard_data_reply( const struct set_clipboard_data_reply *req )
3804 fprintf( stderr, " seqno=%08x", req->seqno );
3807 static void dump_get_clipboard_data_request( const struct get_clipboard_data_request *req )
3809 fprintf( stderr, " format=%08x", req->format );
3810 fprintf( stderr, ", render=%d", req->render );
3811 fprintf( stderr, ", cached=%d", req->cached );
3812 fprintf( stderr, ", seqno=%08x", req->seqno );
3815 static void dump_get_clipboard_data_reply( const struct get_clipboard_data_reply *req )
3817 fprintf( stderr, " from=%08x", req->from );
3818 fprintf( stderr, ", owner=%08x", req->owner );
3819 fprintf( stderr, ", seqno=%08x", req->seqno );
3820 fprintf( stderr, ", total=%u", req->total );
3821 dump_varargs_bytes( ", data=", cur_size );
3824 static void dump_get_clipboard_formats_request( const struct get_clipboard_formats_request *req )
3826 fprintf( stderr, " format=%08x", req->format );
3829 static void dump_get_clipboard_formats_reply( const struct get_clipboard_formats_reply *req )
3831 fprintf( stderr, " count=%08x", req->count );
3832 dump_varargs_uints( ", formats=", cur_size );
3835 static void dump_enum_clipboard_formats_request( const struct enum_clipboard_formats_request *req )
3837 fprintf( stderr, " previous=%08x", req->previous );
3840 static void dump_enum_clipboard_formats_reply( const struct enum_clipboard_formats_reply *req )
3842 fprintf( stderr, " format=%08x", req->format );
3845 static void dump_release_clipboard_request( const struct release_clipboard_request *req )
3847 fprintf( stderr, " owner=%08x", req->owner );
3850 static void dump_release_clipboard_reply( const struct release_clipboard_reply *req )
3852 fprintf( stderr, " viewer=%08x", req->viewer );
3853 fprintf( stderr, ", owner=%08x", req->owner );
3856 static void dump_get_clipboard_info_request( const struct get_clipboard_info_request *req )
3860 static void dump_get_clipboard_info_reply( const struct get_clipboard_info_reply *req )
3862 fprintf( stderr, " window=%08x", req->window );
3863 fprintf( stderr, ", owner=%08x", req->owner );
3864 fprintf( stderr, ", viewer=%08x", req->viewer );
3865 fprintf( stderr, ", seqno=%08x", req->seqno );
3868 static void dump_set_clipboard_viewer_request( const struct set_clipboard_viewer_request *req )
3870 fprintf( stderr, " viewer=%08x", req->viewer );
3871 fprintf( stderr, ", previous=%08x", req->previous );
3874 static void dump_set_clipboard_viewer_reply( const struct set_clipboard_viewer_reply *req )
3876 fprintf( stderr, " old_viewer=%08x", req->old_viewer );
3877 fprintf( stderr, ", owner=%08x", req->owner );
3880 static void dump_add_clipboard_listener_request( const struct add_clipboard_listener_request *req )
3882 fprintf( stderr, " window=%08x", req->window );
3885 static void dump_remove_clipboard_listener_request( const struct remove_clipboard_listener_request *req )
3887 fprintf( stderr, " window=%08x", req->window );
3890 static void dump_open_token_request( const struct open_token_request *req )
3892 fprintf( stderr, " handle=%04x", req->handle );
3893 fprintf( stderr, ", access=%08x", req->access );
3894 fprintf( stderr, ", attributes=%08x", req->attributes );
3895 fprintf( stderr, ", flags=%08x", req->flags );
3898 static void dump_open_token_reply( const struct open_token_reply *req )
3900 fprintf( stderr, " token=%04x", req->token );
3903 static void dump_set_global_windows_request( const struct set_global_windows_request *req )
3905 fprintf( stderr, " flags=%08x", req->flags );
3906 fprintf( stderr, ", shell_window=%08x", req->shell_window );
3907 fprintf( stderr, ", shell_listview=%08x", req->shell_listview );
3908 fprintf( stderr, ", progman_window=%08x", req->progman_window );
3909 fprintf( stderr, ", taskman_window=%08x", req->taskman_window );
3912 static void dump_set_global_windows_reply( const struct set_global_windows_reply *req )
3914 fprintf( stderr, " old_shell_window=%08x", req->old_shell_window );
3915 fprintf( stderr, ", old_shell_listview=%08x", req->old_shell_listview );
3916 fprintf( stderr, ", old_progman_window=%08x", req->old_progman_window );
3917 fprintf( stderr, ", old_taskman_window=%08x", req->old_taskman_window );
3920 static void dump_adjust_token_privileges_request( const struct adjust_token_privileges_request *req )
3922 fprintf( stderr, " handle=%04x", req->handle );
3923 fprintf( stderr, ", disable_all=%d", req->disable_all );
3924 fprintf( stderr, ", get_modified_state=%d", req->get_modified_state );
3925 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3928 static void dump_adjust_token_privileges_reply( const struct adjust_token_privileges_reply *req )
3930 fprintf( stderr, " len=%08x", req->len );
3931 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3934 static void dump_get_token_privileges_request( const struct get_token_privileges_request *req )
3936 fprintf( stderr, " handle=%04x", req->handle );
3939 static void dump_get_token_privileges_reply( const struct get_token_privileges_reply *req )
3941 fprintf( stderr, " len=%08x", req->len );
3942 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3945 static void dump_check_token_privileges_request( const struct check_token_privileges_request *req )
3947 fprintf( stderr, " handle=%04x", req->handle );
3948 fprintf( stderr, ", all_required=%d", req->all_required );
3949 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3952 static void dump_check_token_privileges_reply( const struct check_token_privileges_reply *req )
3954 fprintf( stderr, " has_privileges=%d", req->has_privileges );
3955 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3958 static void dump_duplicate_token_request( const struct duplicate_token_request *req )
3960 fprintf( stderr, " handle=%04x", req->handle );
3961 fprintf( stderr, ", access=%08x", req->access );
3962 fprintf( stderr, ", primary=%d", req->primary );
3963 fprintf( stderr, ", impersonation_level=%d", req->impersonation_level );
3964 dump_varargs_object_attributes( ", objattr=", cur_size );
3967 static void dump_duplicate_token_reply( const struct duplicate_token_reply *req )
3969 fprintf( stderr, " new_handle=%04x", req->new_handle );
3972 static void dump_access_check_request( const struct access_check_request *req )
3974 fprintf( stderr, " handle=%04x", req->handle );
3975 fprintf( stderr, ", desired_access=%08x", req->desired_access );
3976 fprintf( stderr, ", mapping_read=%08x", req->mapping_read );
3977 fprintf( stderr, ", mapping_write=%08x", req->mapping_write );
3978 fprintf( stderr, ", mapping_execute=%08x", req->mapping_execute );
3979 fprintf( stderr, ", mapping_all=%08x", req->mapping_all );
3980 dump_varargs_security_descriptor( ", sd=", cur_size );
3983 static void dump_access_check_reply( const struct access_check_reply *req )
3985 fprintf( stderr, " access_granted=%08x", req->access_granted );
3986 fprintf( stderr, ", access_status=%08x", req->access_status );
3987 fprintf( stderr, ", privileges_len=%08x", req->privileges_len );
3988 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3991 static void dump_get_token_sid_request( const struct get_token_sid_request *req )
3993 fprintf( stderr, " handle=%04x", req->handle );
3994 fprintf( stderr, ", which_sid=%08x", req->which_sid );
3997 static void dump_get_token_sid_reply( const struct get_token_sid_reply *req )
3999 fprintf( stderr, " sid_len=%u", req->sid_len );
4000 dump_varargs_SID( ", sid=", cur_size );
4003 static void dump_get_token_groups_request( const struct get_token_groups_request *req )
4005 fprintf( stderr, " handle=%04x", req->handle );
4008 static void dump_get_token_groups_reply( const struct get_token_groups_reply *req )
4010 fprintf( stderr, " user_len=%u", req->user_len );
4011 dump_varargs_token_groups( ", user=", cur_size );
4014 static void dump_get_token_default_dacl_request( const struct get_token_default_dacl_request *req )
4016 fprintf( stderr, " handle=%04x", req->handle );
4019 static void dump_get_token_default_dacl_reply( const struct get_token_default_dacl_reply *req )
4021 fprintf( stderr, " acl_len=%u", req->acl_len );
4022 dump_varargs_ACL( ", acl=", cur_size );
4025 static void dump_set_token_default_dacl_request( const struct set_token_default_dacl_request *req )
4027 fprintf( stderr, " handle=%04x", req->handle );
4028 dump_varargs_ACL( ", acl=", cur_size );
4031 static void dump_set_security_object_request( const struct set_security_object_request *req )
4033 fprintf( stderr, " handle=%04x", req->handle );
4034 fprintf( stderr, ", security_info=%08x", req->security_info );
4035 dump_varargs_security_descriptor( ", sd=", cur_size );
4038 static void dump_get_security_object_request( const struct get_security_object_request *req )
4040 fprintf( stderr, " handle=%04x", req->handle );
4041 fprintf( stderr, ", security_info=%08x", req->security_info );
4044 static void dump_get_security_object_reply( const struct get_security_object_reply *req )
4046 fprintf( stderr, " sd_len=%08x", req->sd_len );
4047 dump_varargs_security_descriptor( ", sd=", cur_size );
4050 static void dump_get_system_handles_request( const struct get_system_handles_request *req )
4054 static void dump_get_system_handles_reply( const struct get_system_handles_reply *req )
4056 fprintf( stderr, " count=%08x", req->count );
4057 dump_varargs_handle_infos( ", data=", cur_size );
4060 static void dump_create_mailslot_request( const struct create_mailslot_request *req )
4062 fprintf( stderr, " access=%08x", req->access );
4063 dump_timeout( ", read_timeout=", &req->read_timeout );
4064 fprintf( stderr, ", max_msgsize=%08x", req->max_msgsize );
4065 dump_varargs_object_attributes( ", objattr=", cur_size );
4068 static void dump_create_mailslot_reply( const struct create_mailslot_reply *req )
4070 fprintf( stderr, " handle=%04x", req->handle );
4073 static void dump_set_mailslot_info_request( const struct set_mailslot_info_request *req )
4075 fprintf( stderr, " handle=%04x", req->handle );
4076 dump_timeout( ", read_timeout=", &req->read_timeout );
4077 fprintf( stderr, ", flags=%08x", req->flags );
4080 static void dump_set_mailslot_info_reply( const struct set_mailslot_info_reply *req )
4082 dump_timeout( " read_timeout=", &req->read_timeout );
4083 fprintf( stderr, ", max_msgsize=%08x", req->max_msgsize );
4086 static void dump_create_directory_request( const struct create_directory_request *req )
4088 fprintf( stderr, " access=%08x", req->access );
4089 dump_varargs_object_attributes( ", objattr=", cur_size );
4092 static void dump_create_directory_reply( const struct create_directory_reply *req )
4094 fprintf( stderr, " handle=%04x", req->handle );
4097 static void dump_open_directory_request( const struct open_directory_request *req )
4099 fprintf( stderr, " access=%08x", req->access );
4100 fprintf( stderr, ", attributes=%08x", req->attributes );
4101 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4102 dump_varargs_unicode_str( ", directory_name=", cur_size );
4105 static void dump_open_directory_reply( const struct open_directory_reply *req )
4107 fprintf( stderr, " handle=%04x", req->handle );
4110 static void dump_get_directory_entry_request( const struct get_directory_entry_request *req )
4112 fprintf( stderr, " handle=%04x", req->handle );
4113 fprintf( stderr, ", index=%08x", req->index );
4116 static void dump_get_directory_entry_reply( const struct get_directory_entry_reply *req )
4118 fprintf( stderr, " name_len=%u", req->name_len );
4119 dump_varargs_unicode_str( ", name=", min(cur_size,req->name_len) );
4120 dump_varargs_unicode_str( ", type=", cur_size );
4123 static void dump_create_symlink_request( const struct create_symlink_request *req )
4125 fprintf( stderr, " access=%08x", req->access );
4126 dump_varargs_object_attributes( ", objattr=", cur_size );
4127 dump_varargs_unicode_str( ", target_name=", cur_size );
4130 static void dump_create_symlink_reply( const struct create_symlink_reply *req )
4132 fprintf( stderr, " handle=%04x", req->handle );
4135 static void dump_open_symlink_request( const struct open_symlink_request *req )
4137 fprintf( stderr, " access=%08x", req->access );
4138 fprintf( stderr, ", attributes=%08x", req->attributes );
4139 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4140 dump_varargs_unicode_str( ", name=", cur_size );
4143 static void dump_open_symlink_reply( const struct open_symlink_reply *req )
4145 fprintf( stderr, " handle=%04x", req->handle );
4148 static void dump_query_symlink_request( const struct query_symlink_request *req )
4150 fprintf( stderr, " handle=%04x", req->handle );
4153 static void dump_query_symlink_reply( const struct query_symlink_reply *req )
4155 fprintf( stderr, " total=%u", req->total );
4156 dump_varargs_unicode_str( ", target_name=", cur_size );
4159 static void dump_get_object_info_request( const struct get_object_info_request *req )
4161 fprintf( stderr, " handle=%04x", req->handle );
4164 static void dump_get_object_info_reply( const struct get_object_info_reply *req )
4166 fprintf( stderr, " access=%08x", req->access );
4167 fprintf( stderr, ", ref_count=%08x", req->ref_count );
4168 fprintf( stderr, ", handle_count=%08x", req->handle_count );
4169 fprintf( stderr, ", total=%u", req->total );
4170 dump_varargs_unicode_str( ", name=", cur_size );
4173 static void dump_get_object_type_request( const struct get_object_type_request *req )
4175 fprintf( stderr, " handle=%04x", req->handle );
4178 static void dump_get_object_type_reply( const struct get_object_type_reply *req )
4180 fprintf( stderr, " total=%u", req->total );
4181 dump_varargs_unicode_str( ", type=", cur_size );
4184 static void dump_unlink_object_request( const struct unlink_object_request *req )
4186 fprintf( stderr, " handle=%04x", req->handle );
4189 static void dump_get_token_impersonation_level_request( const struct get_token_impersonation_level_request *req )
4191 fprintf( stderr, " handle=%04x", req->handle );
4194 static void dump_get_token_impersonation_level_reply( const struct get_token_impersonation_level_reply *req )
4196 fprintf( stderr, " impersonation_level=%d", req->impersonation_level );
4199 static void dump_allocate_locally_unique_id_request( const struct allocate_locally_unique_id_request *req )
4203 static void dump_allocate_locally_unique_id_reply( const struct allocate_locally_unique_id_reply *req )
4205 dump_luid( " luid=", &req->luid );
4208 static void dump_create_device_manager_request( const struct create_device_manager_request *req )
4210 fprintf( stderr, " access=%08x", req->access );
4211 fprintf( stderr, ", attributes=%08x", req->attributes );
4214 static void dump_create_device_manager_reply( const struct create_device_manager_reply *req )
4216 fprintf( stderr, " handle=%04x", req->handle );
4219 static void dump_create_device_request( const struct create_device_request *req )
4221 fprintf( stderr, " access=%08x", req->access );
4222 fprintf( stderr, ", attributes=%08x", req->attributes );
4223 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4224 dump_uint64( ", user_ptr=", &req->user_ptr );
4225 fprintf( stderr, ", manager=%04x", req->manager );
4226 dump_varargs_unicode_str( ", name=", cur_size );
4229 static void dump_create_device_reply( const struct create_device_reply *req )
4231 fprintf( stderr, " handle=%04x", req->handle );
4234 static void dump_delete_device_request( const struct delete_device_request *req )
4236 fprintf( stderr, " handle=%04x", req->handle );
4239 static void dump_get_next_device_request_request( const struct get_next_device_request_request *req )
4241 fprintf( stderr, " manager=%04x", req->manager );
4242 fprintf( stderr, ", prev=%04x", req->prev );
4243 fprintf( stderr, ", status=%08x", req->status );
4246 static void dump_get_next_device_request_reply( const struct get_next_device_request_reply *req )
4248 dump_irp_params( " params=", &req->params );
4249 fprintf( stderr, ", next=%04x", req->next );
4250 fprintf( stderr, ", client_pid=%04x", req->client_pid );
4251 fprintf( stderr, ", client_tid=%04x", req->client_tid );
4252 fprintf( stderr, ", in_size=%u", req->in_size );
4253 fprintf( stderr, ", out_size=%u", req->out_size );
4254 dump_varargs_bytes( ", next_data=", cur_size );
4257 static void dump_make_process_system_request( const struct make_process_system_request *req )
4261 static void dump_make_process_system_reply( const struct make_process_system_reply *req )
4263 fprintf( stderr, " event=%04x", req->event );
4266 static void dump_get_token_statistics_request( const struct get_token_statistics_request *req )
4268 fprintf( stderr, " handle=%04x", req->handle );
4271 static void dump_get_token_statistics_reply( const struct get_token_statistics_reply *req )
4273 dump_luid( " token_id=", &req->token_id );
4274 dump_luid( ", modified_id=", &req->modified_id );
4275 fprintf( stderr, ", primary=%d", req->primary );
4276 fprintf( stderr, ", impersonation_level=%d", req->impersonation_level );
4277 fprintf( stderr, ", group_count=%d", req->group_count );
4278 fprintf( stderr, ", privilege_count=%d", req->privilege_count );
4281 static void dump_create_completion_request( const struct create_completion_request *req )
4283 fprintf( stderr, " access=%08x", req->access );
4284 fprintf( stderr, ", concurrent=%08x", req->concurrent );
4285 dump_varargs_object_attributes( ", objattr=", cur_size );
4288 static void dump_create_completion_reply( const struct create_completion_reply *req )
4290 fprintf( stderr, " handle=%04x", req->handle );
4293 static void dump_open_completion_request( const struct open_completion_request *req )
4295 fprintf( stderr, " access=%08x", req->access );
4296 fprintf( stderr, ", attributes=%08x", req->attributes );
4297 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4298 dump_varargs_unicode_str( ", filename=", cur_size );
4301 static void dump_open_completion_reply( const struct open_completion_reply *req )
4303 fprintf( stderr, " handle=%04x", req->handle );
4306 static void dump_add_completion_request( const struct add_completion_request *req )
4308 fprintf( stderr, " handle=%04x", req->handle );
4309 dump_uint64( ", ckey=", &req->ckey );
4310 dump_uint64( ", cvalue=", &req->cvalue );
4311 dump_uint64( ", information=", &req->information );
4312 fprintf( stderr, ", status=%08x", req->status );
4315 static void dump_remove_completion_request( const struct remove_completion_request *req )
4317 fprintf( stderr, " handle=%04x", req->handle );
4320 static void dump_remove_completion_reply( const struct remove_completion_reply *req )
4322 dump_uint64( " ckey=", &req->ckey );
4323 dump_uint64( ", cvalue=", &req->cvalue );
4324 dump_uint64( ", information=", &req->information );
4325 fprintf( stderr, ", status=%08x", req->status );
4328 static void dump_query_completion_request( const struct query_completion_request *req )
4330 fprintf( stderr, " handle=%04x", req->handle );
4333 static void dump_query_completion_reply( const struct query_completion_reply *req )
4335 fprintf( stderr, " depth=%08x", req->depth );
4338 static void dump_set_completion_info_request( const struct set_completion_info_request *req )
4340 fprintf( stderr, " handle=%04x", req->handle );
4341 dump_uint64( ", ckey=", &req->ckey );
4342 fprintf( stderr, ", chandle=%04x", req->chandle );
4345 static void dump_add_fd_completion_request( const struct add_fd_completion_request *req )
4347 fprintf( stderr, " handle=%04x", req->handle );
4348 dump_uint64( ", cvalue=", &req->cvalue );
4349 dump_uint64( ", information=", &req->information );
4350 fprintf( stderr, ", status=%08x", req->status );
4353 static void dump_set_fd_disp_info_request( const struct set_fd_disp_info_request *req )
4355 fprintf( stderr, " handle=%04x", req->handle );
4356 fprintf( stderr, ", unlink=%d", req->unlink );
4359 static void dump_set_fd_name_info_request( const struct set_fd_name_info_request *req )
4361 fprintf( stderr, " handle=%04x", req->handle );
4362 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4363 fprintf( stderr, ", link=%d", req->link );
4364 dump_varargs_string( ", filename=", cur_size );
4367 static void dump_get_window_layered_info_request( const struct get_window_layered_info_request *req )
4369 fprintf( stderr, " handle=%08x", req->handle );
4372 static void dump_get_window_layered_info_reply( const struct get_window_layered_info_reply *req )
4374 fprintf( stderr, " color_key=%08x", req->color_key );
4375 fprintf( stderr, ", alpha=%08x", req->alpha );
4376 fprintf( stderr, ", flags=%08x", req->flags );
4379 static void dump_set_window_layered_info_request( const struct set_window_layered_info_request *req )
4381 fprintf( stderr, " handle=%08x", req->handle );
4382 fprintf( stderr, ", color_key=%08x", req->color_key );
4383 fprintf( stderr, ", alpha=%08x", req->alpha );
4384 fprintf( stderr, ", flags=%08x", req->flags );
4387 static void dump_alloc_user_handle_request( const struct alloc_user_handle_request *req )
4391 static void dump_alloc_user_handle_reply( const struct alloc_user_handle_reply *req )
4393 fprintf( stderr, " handle=%08x", req->handle );
4396 static void dump_free_user_handle_request( const struct free_user_handle_request *req )
4398 fprintf( stderr, " handle=%08x", req->handle );
4401 static void dump_set_cursor_request( const struct set_cursor_request *req )
4403 fprintf( stderr, " flags=%08x", req->flags );
4404 fprintf( stderr, ", handle=%08x", req->handle );
4405 fprintf( stderr, ", show_count=%d", req->show_count );
4406 fprintf( stderr, ", x=%d", req->x );
4407 fprintf( stderr, ", y=%d", req->y );
4408 dump_rectangle( ", clip=", &req->clip );
4409 fprintf( stderr, ", clip_msg=%08x", req->clip_msg );
4412 static void dump_set_cursor_reply( const struct set_cursor_reply *req )
4414 fprintf( stderr, " prev_handle=%08x", req->prev_handle );
4415 fprintf( stderr, ", prev_count=%d", req->prev_count );
4416 fprintf( stderr, ", prev_x=%d", req->prev_x );
4417 fprintf( stderr, ", prev_y=%d", req->prev_y );
4418 fprintf( stderr, ", new_x=%d", req->new_x );
4419 fprintf( stderr, ", new_y=%d", req->new_y );
4420 dump_rectangle( ", new_clip=", &req->new_clip );
4421 fprintf( stderr, ", last_change=%08x", req->last_change );
4424 static void dump_update_rawinput_devices_request( const struct update_rawinput_devices_request *req )
4426 dump_varargs_rawinput_devices( " devices=", cur_size );
4429 static void dump_get_suspend_context_request( const struct get_suspend_context_request *req )
4433 static void dump_get_suspend_context_reply( const struct get_suspend_context_reply *req )
4435 dump_varargs_context( " context=", cur_size );
4438 static void dump_set_suspend_context_request( const struct set_suspend_context_request *req )
4440 dump_varargs_context( " context=", cur_size );
4443 static void dump_create_job_request( const struct create_job_request *req )
4445 fprintf( stderr, " access=%08x", req->access );
4446 dump_varargs_object_attributes( ", objattr=", cur_size );
4449 static void dump_create_job_reply( const struct create_job_reply *req )
4451 fprintf( stderr, " handle=%04x", req->handle );
4454 static void dump_open_job_request( const struct open_job_request *req )
4456 fprintf( stderr, " access=%08x", req->access );
4457 fprintf( stderr, ", attributes=%08x", req->attributes );
4458 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4459 dump_varargs_unicode_str( ", name=", cur_size );
4462 static void dump_open_job_reply( const struct open_job_reply *req )
4464 fprintf( stderr, " handle=%04x", req->handle );
4467 static void dump_assign_job_request( const struct assign_job_request *req )
4469 fprintf( stderr, " job=%04x", req->job );
4470 fprintf( stderr, ", process=%04x", req->process );
4473 static void dump_process_in_job_request( const struct process_in_job_request *req )
4475 fprintf( stderr, " job=%04x", req->job );
4476 fprintf( stderr, ", process=%04x", req->process );
4479 static void dump_set_job_limits_request( const struct set_job_limits_request *req )
4481 fprintf( stderr, " handle=%04x", req->handle );
4482 fprintf( stderr, ", limit_flags=%08x", req->limit_flags );
4485 static void dump_set_job_completion_port_request( const struct set_job_completion_port_request *req )
4487 fprintf( stderr, " job=%04x", req->job );
4488 fprintf( stderr, ", port=%04x", req->port );
4489 dump_uint64( ", key=", &req->key );
4492 static void dump_terminate_job_request( const struct terminate_job_request *req )
4494 fprintf( stderr, " handle=%04x", req->handle );
4495 fprintf( stderr, ", status=%d", req->status );
4498 static const dump_func req_dumpers[REQ_NB_REQUESTS] = {
4499 (dump_func)dump_new_process_request,
4500 (dump_func)dump_get_new_process_info_request,
4501 (dump_func)dump_new_thread_request,
4502 (dump_func)dump_get_startup_info_request,
4503 (dump_func)dump_init_process_done_request,
4504 (dump_func)dump_init_thread_request,
4505 (dump_func)dump_terminate_process_request,
4506 (dump_func)dump_terminate_thread_request,
4507 (dump_func)dump_get_process_info_request,
4508 (dump_func)dump_get_process_vm_counters_request,
4509 (dump_func)dump_set_process_info_request,
4510 (dump_func)dump_get_thread_info_request,
4511 (dump_func)dump_get_thread_times_request,
4512 (dump_func)dump_set_thread_info_request,
4513 (dump_func)dump_get_dll_info_request,
4514 (dump_func)dump_suspend_thread_request,
4515 (dump_func)dump_resume_thread_request,
4516 (dump_func)dump_load_dll_request,
4517 (dump_func)dump_unload_dll_request,
4518 (dump_func)dump_queue_apc_request,
4519 (dump_func)dump_get_apc_result_request,
4520 (dump_func)dump_close_handle_request,
4521 (dump_func)dump_set_handle_info_request,
4522 (dump_func)dump_dup_handle_request,
4523 (dump_func)dump_open_process_request,
4524 (dump_func)dump_open_thread_request,
4525 (dump_func)dump_select_request,
4526 (dump_func)dump_create_event_request,
4527 (dump_func)dump_event_op_request,
4528 (dump_func)dump_query_event_request,
4529 (dump_func)dump_open_event_request,
4530 (dump_func)dump_create_keyed_event_request,
4531 (dump_func)dump_open_keyed_event_request,
4532 (dump_func)dump_create_mutex_request,
4533 (dump_func)dump_release_mutex_request,
4534 (dump_func)dump_open_mutex_request,
4535 (dump_func)dump_query_mutex_request,
4536 (dump_func)dump_create_semaphore_request,
4537 (dump_func)dump_release_semaphore_request,
4538 (dump_func)dump_query_semaphore_request,
4539 (dump_func)dump_open_semaphore_request,
4540 (dump_func)dump_create_file_request,
4541 (dump_func)dump_open_file_object_request,
4542 (dump_func)dump_alloc_file_handle_request,
4543 (dump_func)dump_get_handle_unix_name_request,
4544 (dump_func)dump_get_handle_fd_request,
4545 (dump_func)dump_get_directory_cache_entry_request,
4546 (dump_func)dump_flush_request,
4547 (dump_func)dump_get_volume_info_request,
4548 (dump_func)dump_lock_file_request,
4549 (dump_func)dump_unlock_file_request,
4550 (dump_func)dump_create_socket_request,
4551 (dump_func)dump_accept_socket_request,
4552 (dump_func)dump_accept_into_socket_request,
4553 (dump_func)dump_set_socket_event_request,
4554 (dump_func)dump_get_socket_event_request,
4555 (dump_func)dump_get_socket_info_request,
4556 (dump_func)dump_enable_socket_event_request,
4557 (dump_func)dump_set_socket_deferred_request,
4558 (dump_func)dump_alloc_console_request,
4559 (dump_func)dump_free_console_request,
4560 (dump_func)dump_get_console_renderer_events_request,
4561 (dump_func)dump_open_console_request,
4562 (dump_func)dump_get_console_wait_event_request,
4563 (dump_func)dump_get_console_mode_request,
4564 (dump_func)dump_set_console_mode_request,
4565 (dump_func)dump_set_console_input_info_request,
4566 (dump_func)dump_get_console_input_info_request,
4567 (dump_func)dump_append_console_input_history_request,
4568 (dump_func)dump_get_console_input_history_request,
4569 (dump_func)dump_create_console_output_request,
4570 (dump_func)dump_set_console_output_info_request,
4571 (dump_func)dump_get_console_output_info_request,
4572 (dump_func)dump_write_console_input_request,
4573 (dump_func)dump_read_console_input_request,
4574 (dump_func)dump_write_console_output_request,
4575 (dump_func)dump_fill_console_output_request,
4576 (dump_func)dump_read_console_output_request,
4577 (dump_func)dump_move_console_output_request,
4578 (dump_func)dump_send_console_signal_request,
4579 (dump_func)dump_read_directory_changes_request,
4580 (dump_func)dump_read_change_request,
4581 (dump_func)dump_create_mapping_request,
4582 (dump_func)dump_open_mapping_request,
4583 (dump_func)dump_get_mapping_info_request,
4584 (dump_func)dump_map_view_request,
4585 (dump_func)dump_unmap_view_request,
4586 (dump_func)dump_get_mapping_committed_range_request,
4587 (dump_func)dump_add_mapping_committed_range_request,
4588 (dump_func)dump_is_same_mapping_request,
4589 (dump_func)dump_create_snapshot_request,
4590 (dump_func)dump_next_process_request,
4591 (dump_func)dump_next_thread_request,
4592 (dump_func)dump_wait_debug_event_request,
4593 (dump_func)dump_queue_exception_event_request,
4594 (dump_func)dump_get_exception_status_request,
4595 (dump_func)dump_continue_debug_event_request,
4596 (dump_func)dump_debug_process_request,
4597 (dump_func)dump_debug_break_request,
4598 (dump_func)dump_set_debugger_kill_on_exit_request,
4599 (dump_func)dump_read_process_memory_request,
4600 (dump_func)dump_write_process_memory_request,
4601 (dump_func)dump_create_key_request,
4602 (dump_func)dump_open_key_request,
4603 (dump_func)dump_delete_key_request,
4604 (dump_func)dump_flush_key_request,
4605 (dump_func)dump_enum_key_request,
4606 (dump_func)dump_set_key_value_request,
4607 (dump_func)dump_get_key_value_request,
4608 (dump_func)dump_enum_key_value_request,
4609 (dump_func)dump_delete_key_value_request,
4610 (dump_func)dump_load_registry_request,
4611 (dump_func)dump_unload_registry_request,
4612 (dump_func)dump_save_registry_request,
4613 (dump_func)dump_set_registry_notification_request,
4614 (dump_func)dump_create_timer_request,
4615 (dump_func)dump_open_timer_request,
4616 (dump_func)dump_set_timer_request,
4617 (dump_func)dump_cancel_timer_request,
4618 (dump_func)dump_get_timer_info_request,
4619 (dump_func)dump_get_thread_context_request,
4620 (dump_func)dump_set_thread_context_request,
4621 (dump_func)dump_get_selector_entry_request,
4622 (dump_func)dump_add_atom_request,
4623 (dump_func)dump_delete_atom_request,
4624 (dump_func)dump_find_atom_request,
4625 (dump_func)dump_get_atom_information_request,
4626 (dump_func)dump_set_atom_information_request,
4627 (dump_func)dump_empty_atom_table_request,
4628 (dump_func)dump_init_atom_table_request,
4629 (dump_func)dump_get_msg_queue_request,
4630 (dump_func)dump_set_queue_fd_request,
4631 (dump_func)dump_set_queue_mask_request,
4632 (dump_func)dump_get_queue_status_request,
4633 (dump_func)dump_get_process_idle_event_request,
4634 (dump_func)dump_send_message_request,
4635 (dump_func)dump_post_quit_message_request,
4636 (dump_func)dump_send_hardware_message_request,
4637 (dump_func)dump_get_message_request,
4638 (dump_func)dump_reply_message_request,
4639 (dump_func)dump_accept_hardware_message_request,
4640 (dump_func)dump_get_message_reply_request,
4641 (dump_func)dump_set_win_timer_request,
4642 (dump_func)dump_kill_win_timer_request,
4643 (dump_func)dump_is_window_hung_request,
4644 (dump_func)dump_get_serial_info_request,
4645 (dump_func)dump_set_serial_info_request,
4646 (dump_func)dump_register_async_request,
4647 (dump_func)dump_cancel_async_request,
4648 (dump_func)dump_get_async_result_request,
4649 (dump_func)dump_read_request,
4650 (dump_func)dump_write_request,
4651 (dump_func)dump_ioctl_request,
4652 (dump_func)dump_set_irp_result_request,
4653 (dump_func)dump_create_named_pipe_request,
4654 (dump_func)dump_get_named_pipe_info_request,
4655 (dump_func)dump_set_named_pipe_info_request,
4656 (dump_func)dump_create_window_request,
4657 (dump_func)dump_destroy_window_request,
4658 (dump_func)dump_get_desktop_window_request,
4659 (dump_func)dump_set_window_owner_request,
4660 (dump_func)dump_get_window_info_request,
4661 (dump_func)dump_set_window_info_request,
4662 (dump_func)dump_set_parent_request,
4663 (dump_func)dump_get_window_parents_request,
4664 (dump_func)dump_get_window_children_request,
4665 (dump_func)dump_get_window_children_from_point_request,
4666 (dump_func)dump_get_window_tree_request,
4667 (dump_func)dump_set_window_pos_request,
4668 (dump_func)dump_get_window_rectangles_request,
4669 (dump_func)dump_get_window_text_request,
4670 (dump_func)dump_set_window_text_request,
4671 (dump_func)dump_get_windows_offset_request,
4672 (dump_func)dump_get_visible_region_request,
4673 (dump_func)dump_get_surface_region_request,
4674 (dump_func)dump_get_window_region_request,
4675 (dump_func)dump_set_window_region_request,
4676 (dump_func)dump_get_update_region_request,
4677 (dump_func)dump_update_window_zorder_request,
4678 (dump_func)dump_redraw_window_request,
4679 (dump_func)dump_set_window_property_request,
4680 (dump_func)dump_remove_window_property_request,
4681 (dump_func)dump_get_window_property_request,
4682 (dump_func)dump_get_window_properties_request,
4683 (dump_func)dump_create_winstation_request,
4684 (dump_func)dump_open_winstation_request,
4685 (dump_func)dump_close_winstation_request,
4686 (dump_func)dump_get_process_winstation_request,
4687 (dump_func)dump_set_process_winstation_request,
4688 (dump_func)dump_enum_winstation_request,
4689 (dump_func)dump_create_desktop_request,
4690 (dump_func)dump_open_desktop_request,
4691 (dump_func)dump_open_input_desktop_request,
4692 (dump_func)dump_close_desktop_request,
4693 (dump_func)dump_get_thread_desktop_request,
4694 (dump_func)dump_set_thread_desktop_request,
4695 (dump_func)dump_enum_desktop_request,
4696 (dump_func)dump_set_user_object_info_request,
4697 (dump_func)dump_register_hotkey_request,
4698 (dump_func)dump_unregister_hotkey_request,
4699 (dump_func)dump_attach_thread_input_request,
4700 (dump_func)dump_get_thread_input_request,
4701 (dump_func)dump_get_last_input_time_request,
4702 (dump_func)dump_get_key_state_request,
4703 (dump_func)dump_set_key_state_request,
4704 (dump_func)dump_set_foreground_window_request,
4705 (dump_func)dump_set_focus_window_request,
4706 (dump_func)dump_set_active_window_request,
4707 (dump_func)dump_set_capture_window_request,
4708 (dump_func)dump_set_caret_window_request,
4709 (dump_func)dump_set_caret_info_request,
4710 (dump_func)dump_set_hook_request,
4711 (dump_func)dump_remove_hook_request,
4712 (dump_func)dump_start_hook_chain_request,
4713 (dump_func)dump_finish_hook_chain_request,
4714 (dump_func)dump_get_hook_info_request,
4715 (dump_func)dump_create_class_request,
4716 (dump_func)dump_destroy_class_request,
4717 (dump_func)dump_set_class_info_request,
4718 (dump_func)dump_open_clipboard_request,
4719 (dump_func)dump_close_clipboard_request,
4720 (dump_func)dump_empty_clipboard_request,
4721 (dump_func)dump_set_clipboard_data_request,
4722 (dump_func)dump_get_clipboard_data_request,
4723 (dump_func)dump_get_clipboard_formats_request,
4724 (dump_func)dump_enum_clipboard_formats_request,
4725 (dump_func)dump_release_clipboard_request,
4726 (dump_func)dump_get_clipboard_info_request,
4727 (dump_func)dump_set_clipboard_viewer_request,
4728 (dump_func)dump_add_clipboard_listener_request,
4729 (dump_func)dump_remove_clipboard_listener_request,
4730 (dump_func)dump_open_token_request,
4731 (dump_func)dump_set_global_windows_request,
4732 (dump_func)dump_adjust_token_privileges_request,
4733 (dump_func)dump_get_token_privileges_request,
4734 (dump_func)dump_check_token_privileges_request,
4735 (dump_func)dump_duplicate_token_request,
4736 (dump_func)dump_access_check_request,
4737 (dump_func)dump_get_token_sid_request,
4738 (dump_func)dump_get_token_groups_request,
4739 (dump_func)dump_get_token_default_dacl_request,
4740 (dump_func)dump_set_token_default_dacl_request,
4741 (dump_func)dump_set_security_object_request,
4742 (dump_func)dump_get_security_object_request,
4743 (dump_func)dump_get_system_handles_request,
4744 (dump_func)dump_create_mailslot_request,
4745 (dump_func)dump_set_mailslot_info_request,
4746 (dump_func)dump_create_directory_request,
4747 (dump_func)dump_open_directory_request,
4748 (dump_func)dump_get_directory_entry_request,
4749 (dump_func)dump_create_symlink_request,
4750 (dump_func)dump_open_symlink_request,
4751 (dump_func)dump_query_symlink_request,
4752 (dump_func)dump_get_object_info_request,
4753 (dump_func)dump_get_object_type_request,
4754 (dump_func)dump_unlink_object_request,
4755 (dump_func)dump_get_token_impersonation_level_request,
4756 (dump_func)dump_allocate_locally_unique_id_request,
4757 (dump_func)dump_create_device_manager_request,
4758 (dump_func)dump_create_device_request,
4759 (dump_func)dump_delete_device_request,
4760 (dump_func)dump_get_next_device_request_request,
4761 (dump_func)dump_make_process_system_request,
4762 (dump_func)dump_get_token_statistics_request,
4763 (dump_func)dump_create_completion_request,
4764 (dump_func)dump_open_completion_request,
4765 (dump_func)dump_add_completion_request,
4766 (dump_func)dump_remove_completion_request,
4767 (dump_func)dump_query_completion_request,
4768 (dump_func)dump_set_completion_info_request,
4769 (dump_func)dump_add_fd_completion_request,
4770 (dump_func)dump_set_fd_disp_info_request,
4771 (dump_func)dump_set_fd_name_info_request,
4772 (dump_func)dump_get_window_layered_info_request,
4773 (dump_func)dump_set_window_layered_info_request,
4774 (dump_func)dump_alloc_user_handle_request,
4775 (dump_func)dump_free_user_handle_request,
4776 (dump_func)dump_set_cursor_request,
4777 (dump_func)dump_update_rawinput_devices_request,
4778 (dump_func)dump_get_suspend_context_request,
4779 (dump_func)dump_set_suspend_context_request,
4780 (dump_func)dump_create_job_request,
4781 (dump_func)dump_open_job_request,
4782 (dump_func)dump_assign_job_request,
4783 (dump_func)dump_process_in_job_request,
4784 (dump_func)dump_set_job_limits_request,
4785 (dump_func)dump_set_job_completion_port_request,
4786 (dump_func)dump_terminate_job_request,
4789 static const dump_func reply_dumpers[REQ_NB_REQUESTS] = {
4790 (dump_func)dump_new_process_reply,
4791 (dump_func)dump_get_new_process_info_reply,
4792 (dump_func)dump_new_thread_reply,
4793 (dump_func)dump_get_startup_info_reply,
4794 (dump_func)dump_init_process_done_reply,
4795 (dump_func)dump_init_thread_reply,
4796 (dump_func)dump_terminate_process_reply,
4797 (dump_func)dump_terminate_thread_reply,
4798 (dump_func)dump_get_process_info_reply,
4799 (dump_func)dump_get_process_vm_counters_reply,
4800 NULL,
4801 (dump_func)dump_get_thread_info_reply,
4802 (dump_func)dump_get_thread_times_reply,
4803 NULL,
4804 (dump_func)dump_get_dll_info_reply,
4805 (dump_func)dump_suspend_thread_reply,
4806 (dump_func)dump_resume_thread_reply,
4807 NULL,
4808 NULL,
4809 (dump_func)dump_queue_apc_reply,
4810 (dump_func)dump_get_apc_result_reply,
4811 NULL,
4812 (dump_func)dump_set_handle_info_reply,
4813 (dump_func)dump_dup_handle_reply,
4814 (dump_func)dump_open_process_reply,
4815 (dump_func)dump_open_thread_reply,
4816 (dump_func)dump_select_reply,
4817 (dump_func)dump_create_event_reply,
4818 NULL,
4819 (dump_func)dump_query_event_reply,
4820 (dump_func)dump_open_event_reply,
4821 (dump_func)dump_create_keyed_event_reply,
4822 (dump_func)dump_open_keyed_event_reply,
4823 (dump_func)dump_create_mutex_reply,
4824 (dump_func)dump_release_mutex_reply,
4825 (dump_func)dump_open_mutex_reply,
4826 (dump_func)dump_query_mutex_reply,
4827 (dump_func)dump_create_semaphore_reply,
4828 (dump_func)dump_release_semaphore_reply,
4829 (dump_func)dump_query_semaphore_reply,
4830 (dump_func)dump_open_semaphore_reply,
4831 (dump_func)dump_create_file_reply,
4832 (dump_func)dump_open_file_object_reply,
4833 (dump_func)dump_alloc_file_handle_reply,
4834 (dump_func)dump_get_handle_unix_name_reply,
4835 (dump_func)dump_get_handle_fd_reply,
4836 (dump_func)dump_get_directory_cache_entry_reply,
4837 (dump_func)dump_flush_reply,
4838 (dump_func)dump_get_volume_info_reply,
4839 (dump_func)dump_lock_file_reply,
4840 NULL,
4841 (dump_func)dump_create_socket_reply,
4842 (dump_func)dump_accept_socket_reply,
4843 NULL,
4844 NULL,
4845 (dump_func)dump_get_socket_event_reply,
4846 (dump_func)dump_get_socket_info_reply,
4847 NULL,
4848 NULL,
4849 (dump_func)dump_alloc_console_reply,
4850 NULL,
4851 (dump_func)dump_get_console_renderer_events_reply,
4852 (dump_func)dump_open_console_reply,
4853 (dump_func)dump_get_console_wait_event_reply,
4854 (dump_func)dump_get_console_mode_reply,
4855 NULL,
4856 NULL,
4857 (dump_func)dump_get_console_input_info_reply,
4858 NULL,
4859 (dump_func)dump_get_console_input_history_reply,
4860 (dump_func)dump_create_console_output_reply,
4861 NULL,
4862 (dump_func)dump_get_console_output_info_reply,
4863 (dump_func)dump_write_console_input_reply,
4864 (dump_func)dump_read_console_input_reply,
4865 (dump_func)dump_write_console_output_reply,
4866 (dump_func)dump_fill_console_output_reply,
4867 (dump_func)dump_read_console_output_reply,
4868 NULL,
4869 NULL,
4870 NULL,
4871 (dump_func)dump_read_change_reply,
4872 (dump_func)dump_create_mapping_reply,
4873 (dump_func)dump_open_mapping_reply,
4874 (dump_func)dump_get_mapping_info_reply,
4875 NULL,
4876 NULL,
4877 (dump_func)dump_get_mapping_committed_range_reply,
4878 NULL,
4879 NULL,
4880 (dump_func)dump_create_snapshot_reply,
4881 (dump_func)dump_next_process_reply,
4882 (dump_func)dump_next_thread_reply,
4883 (dump_func)dump_wait_debug_event_reply,
4884 (dump_func)dump_queue_exception_event_reply,
4885 (dump_func)dump_get_exception_status_reply,
4886 NULL,
4887 NULL,
4888 (dump_func)dump_debug_break_reply,
4889 NULL,
4890 (dump_func)dump_read_process_memory_reply,
4891 NULL,
4892 (dump_func)dump_create_key_reply,
4893 (dump_func)dump_open_key_reply,
4894 NULL,
4895 NULL,
4896 (dump_func)dump_enum_key_reply,
4897 NULL,
4898 (dump_func)dump_get_key_value_reply,
4899 (dump_func)dump_enum_key_value_reply,
4900 NULL,
4901 NULL,
4902 NULL,
4903 NULL,
4904 NULL,
4905 (dump_func)dump_create_timer_reply,
4906 (dump_func)dump_open_timer_reply,
4907 (dump_func)dump_set_timer_reply,
4908 (dump_func)dump_cancel_timer_reply,
4909 (dump_func)dump_get_timer_info_reply,
4910 (dump_func)dump_get_thread_context_reply,
4911 (dump_func)dump_set_thread_context_reply,
4912 (dump_func)dump_get_selector_entry_reply,
4913 (dump_func)dump_add_atom_reply,
4914 NULL,
4915 (dump_func)dump_find_atom_reply,
4916 (dump_func)dump_get_atom_information_reply,
4917 NULL,
4918 NULL,
4919 (dump_func)dump_init_atom_table_reply,
4920 (dump_func)dump_get_msg_queue_reply,
4921 NULL,
4922 (dump_func)dump_set_queue_mask_reply,
4923 (dump_func)dump_get_queue_status_reply,
4924 (dump_func)dump_get_process_idle_event_reply,
4925 NULL,
4926 NULL,
4927 (dump_func)dump_send_hardware_message_reply,
4928 (dump_func)dump_get_message_reply,
4929 NULL,
4930 NULL,
4931 (dump_func)dump_get_message_reply_reply,
4932 (dump_func)dump_set_win_timer_reply,
4933 NULL,
4934 (dump_func)dump_is_window_hung_reply,
4935 (dump_func)dump_get_serial_info_reply,
4936 NULL,
4937 NULL,
4938 NULL,
4939 (dump_func)dump_get_async_result_reply,
4940 (dump_func)dump_read_reply,
4941 (dump_func)dump_write_reply,
4942 (dump_func)dump_ioctl_reply,
4943 NULL,
4944 (dump_func)dump_create_named_pipe_reply,
4945 (dump_func)dump_get_named_pipe_info_reply,
4946 NULL,
4947 (dump_func)dump_create_window_reply,
4948 NULL,
4949 (dump_func)dump_get_desktop_window_reply,
4950 (dump_func)dump_set_window_owner_reply,
4951 (dump_func)dump_get_window_info_reply,
4952 (dump_func)dump_set_window_info_reply,
4953 (dump_func)dump_set_parent_reply,
4954 (dump_func)dump_get_window_parents_reply,
4955 (dump_func)dump_get_window_children_reply,
4956 (dump_func)dump_get_window_children_from_point_reply,
4957 (dump_func)dump_get_window_tree_reply,
4958 (dump_func)dump_set_window_pos_reply,
4959 (dump_func)dump_get_window_rectangles_reply,
4960 (dump_func)dump_get_window_text_reply,
4961 NULL,
4962 (dump_func)dump_get_windows_offset_reply,
4963 (dump_func)dump_get_visible_region_reply,
4964 (dump_func)dump_get_surface_region_reply,
4965 (dump_func)dump_get_window_region_reply,
4966 NULL,
4967 (dump_func)dump_get_update_region_reply,
4968 NULL,
4969 NULL,
4970 NULL,
4971 (dump_func)dump_remove_window_property_reply,
4972 (dump_func)dump_get_window_property_reply,
4973 (dump_func)dump_get_window_properties_reply,
4974 (dump_func)dump_create_winstation_reply,
4975 (dump_func)dump_open_winstation_reply,
4976 NULL,
4977 (dump_func)dump_get_process_winstation_reply,
4978 NULL,
4979 (dump_func)dump_enum_winstation_reply,
4980 (dump_func)dump_create_desktop_reply,
4981 (dump_func)dump_open_desktop_reply,
4982 (dump_func)dump_open_input_desktop_reply,
4983 NULL,
4984 (dump_func)dump_get_thread_desktop_reply,
4985 NULL,
4986 (dump_func)dump_enum_desktop_reply,
4987 (dump_func)dump_set_user_object_info_reply,
4988 (dump_func)dump_register_hotkey_reply,
4989 (dump_func)dump_unregister_hotkey_reply,
4990 NULL,
4991 (dump_func)dump_get_thread_input_reply,
4992 (dump_func)dump_get_last_input_time_reply,
4993 (dump_func)dump_get_key_state_reply,
4994 NULL,
4995 (dump_func)dump_set_foreground_window_reply,
4996 (dump_func)dump_set_focus_window_reply,
4997 (dump_func)dump_set_active_window_reply,
4998 (dump_func)dump_set_capture_window_reply,
4999 (dump_func)dump_set_caret_window_reply,
5000 (dump_func)dump_set_caret_info_reply,
5001 (dump_func)dump_set_hook_reply,
5002 (dump_func)dump_remove_hook_reply,
5003 (dump_func)dump_start_hook_chain_reply,
5004 NULL,
5005 (dump_func)dump_get_hook_info_reply,
5006 (dump_func)dump_create_class_reply,
5007 (dump_func)dump_destroy_class_reply,
5008 (dump_func)dump_set_class_info_reply,
5009 (dump_func)dump_open_clipboard_reply,
5010 (dump_func)dump_close_clipboard_reply,
5011 NULL,
5012 (dump_func)dump_set_clipboard_data_reply,
5013 (dump_func)dump_get_clipboard_data_reply,
5014 (dump_func)dump_get_clipboard_formats_reply,
5015 (dump_func)dump_enum_clipboard_formats_reply,
5016 (dump_func)dump_release_clipboard_reply,
5017 (dump_func)dump_get_clipboard_info_reply,
5018 (dump_func)dump_set_clipboard_viewer_reply,
5019 NULL,
5020 NULL,
5021 (dump_func)dump_open_token_reply,
5022 (dump_func)dump_set_global_windows_reply,
5023 (dump_func)dump_adjust_token_privileges_reply,
5024 (dump_func)dump_get_token_privileges_reply,
5025 (dump_func)dump_check_token_privileges_reply,
5026 (dump_func)dump_duplicate_token_reply,
5027 (dump_func)dump_access_check_reply,
5028 (dump_func)dump_get_token_sid_reply,
5029 (dump_func)dump_get_token_groups_reply,
5030 (dump_func)dump_get_token_default_dacl_reply,
5031 NULL,
5032 NULL,
5033 (dump_func)dump_get_security_object_reply,
5034 (dump_func)dump_get_system_handles_reply,
5035 (dump_func)dump_create_mailslot_reply,
5036 (dump_func)dump_set_mailslot_info_reply,
5037 (dump_func)dump_create_directory_reply,
5038 (dump_func)dump_open_directory_reply,
5039 (dump_func)dump_get_directory_entry_reply,
5040 (dump_func)dump_create_symlink_reply,
5041 (dump_func)dump_open_symlink_reply,
5042 (dump_func)dump_query_symlink_reply,
5043 (dump_func)dump_get_object_info_reply,
5044 (dump_func)dump_get_object_type_reply,
5045 NULL,
5046 (dump_func)dump_get_token_impersonation_level_reply,
5047 (dump_func)dump_allocate_locally_unique_id_reply,
5048 (dump_func)dump_create_device_manager_reply,
5049 (dump_func)dump_create_device_reply,
5050 NULL,
5051 (dump_func)dump_get_next_device_request_reply,
5052 (dump_func)dump_make_process_system_reply,
5053 (dump_func)dump_get_token_statistics_reply,
5054 (dump_func)dump_create_completion_reply,
5055 (dump_func)dump_open_completion_reply,
5056 NULL,
5057 (dump_func)dump_remove_completion_reply,
5058 (dump_func)dump_query_completion_reply,
5059 NULL,
5060 NULL,
5061 NULL,
5062 NULL,
5063 (dump_func)dump_get_window_layered_info_reply,
5064 NULL,
5065 (dump_func)dump_alloc_user_handle_reply,
5066 NULL,
5067 (dump_func)dump_set_cursor_reply,
5068 NULL,
5069 (dump_func)dump_get_suspend_context_reply,
5070 NULL,
5071 (dump_func)dump_create_job_reply,
5072 (dump_func)dump_open_job_reply,
5073 NULL,
5074 NULL,
5075 NULL,
5076 NULL,
5077 NULL,
5080 static const char * const req_names[REQ_NB_REQUESTS] = {
5081 "new_process",
5082 "get_new_process_info",
5083 "new_thread",
5084 "get_startup_info",
5085 "init_process_done",
5086 "init_thread",
5087 "terminate_process",
5088 "terminate_thread",
5089 "get_process_info",
5090 "get_process_vm_counters",
5091 "set_process_info",
5092 "get_thread_info",
5093 "get_thread_times",
5094 "set_thread_info",
5095 "get_dll_info",
5096 "suspend_thread",
5097 "resume_thread",
5098 "load_dll",
5099 "unload_dll",
5100 "queue_apc",
5101 "get_apc_result",
5102 "close_handle",
5103 "set_handle_info",
5104 "dup_handle",
5105 "open_process",
5106 "open_thread",
5107 "select",
5108 "create_event",
5109 "event_op",
5110 "query_event",
5111 "open_event",
5112 "create_keyed_event",
5113 "open_keyed_event",
5114 "create_mutex",
5115 "release_mutex",
5116 "open_mutex",
5117 "query_mutex",
5118 "create_semaphore",
5119 "release_semaphore",
5120 "query_semaphore",
5121 "open_semaphore",
5122 "create_file",
5123 "open_file_object",
5124 "alloc_file_handle",
5125 "get_handle_unix_name",
5126 "get_handle_fd",
5127 "get_directory_cache_entry",
5128 "flush",
5129 "get_volume_info",
5130 "lock_file",
5131 "unlock_file",
5132 "create_socket",
5133 "accept_socket",
5134 "accept_into_socket",
5135 "set_socket_event",
5136 "get_socket_event",
5137 "get_socket_info",
5138 "enable_socket_event",
5139 "set_socket_deferred",
5140 "alloc_console",
5141 "free_console",
5142 "get_console_renderer_events",
5143 "open_console",
5144 "get_console_wait_event",
5145 "get_console_mode",
5146 "set_console_mode",
5147 "set_console_input_info",
5148 "get_console_input_info",
5149 "append_console_input_history",
5150 "get_console_input_history",
5151 "create_console_output",
5152 "set_console_output_info",
5153 "get_console_output_info",
5154 "write_console_input",
5155 "read_console_input",
5156 "write_console_output",
5157 "fill_console_output",
5158 "read_console_output",
5159 "move_console_output",
5160 "send_console_signal",
5161 "read_directory_changes",
5162 "read_change",
5163 "create_mapping",
5164 "open_mapping",
5165 "get_mapping_info",
5166 "map_view",
5167 "unmap_view",
5168 "get_mapping_committed_range",
5169 "add_mapping_committed_range",
5170 "is_same_mapping",
5171 "create_snapshot",
5172 "next_process",
5173 "next_thread",
5174 "wait_debug_event",
5175 "queue_exception_event",
5176 "get_exception_status",
5177 "continue_debug_event",
5178 "debug_process",
5179 "debug_break",
5180 "set_debugger_kill_on_exit",
5181 "read_process_memory",
5182 "write_process_memory",
5183 "create_key",
5184 "open_key",
5185 "delete_key",
5186 "flush_key",
5187 "enum_key",
5188 "set_key_value",
5189 "get_key_value",
5190 "enum_key_value",
5191 "delete_key_value",
5192 "load_registry",
5193 "unload_registry",
5194 "save_registry",
5195 "set_registry_notification",
5196 "create_timer",
5197 "open_timer",
5198 "set_timer",
5199 "cancel_timer",
5200 "get_timer_info",
5201 "get_thread_context",
5202 "set_thread_context",
5203 "get_selector_entry",
5204 "add_atom",
5205 "delete_atom",
5206 "find_atom",
5207 "get_atom_information",
5208 "set_atom_information",
5209 "empty_atom_table",
5210 "init_atom_table",
5211 "get_msg_queue",
5212 "set_queue_fd",
5213 "set_queue_mask",
5214 "get_queue_status",
5215 "get_process_idle_event",
5216 "send_message",
5217 "post_quit_message",
5218 "send_hardware_message",
5219 "get_message",
5220 "reply_message",
5221 "accept_hardware_message",
5222 "get_message_reply",
5223 "set_win_timer",
5224 "kill_win_timer",
5225 "is_window_hung",
5226 "get_serial_info",
5227 "set_serial_info",
5228 "register_async",
5229 "cancel_async",
5230 "get_async_result",
5231 "read",
5232 "write",
5233 "ioctl",
5234 "set_irp_result",
5235 "create_named_pipe",
5236 "get_named_pipe_info",
5237 "set_named_pipe_info",
5238 "create_window",
5239 "destroy_window",
5240 "get_desktop_window",
5241 "set_window_owner",
5242 "get_window_info",
5243 "set_window_info",
5244 "set_parent",
5245 "get_window_parents",
5246 "get_window_children",
5247 "get_window_children_from_point",
5248 "get_window_tree",
5249 "set_window_pos",
5250 "get_window_rectangles",
5251 "get_window_text",
5252 "set_window_text",
5253 "get_windows_offset",
5254 "get_visible_region",
5255 "get_surface_region",
5256 "get_window_region",
5257 "set_window_region",
5258 "get_update_region",
5259 "update_window_zorder",
5260 "redraw_window",
5261 "set_window_property",
5262 "remove_window_property",
5263 "get_window_property",
5264 "get_window_properties",
5265 "create_winstation",
5266 "open_winstation",
5267 "close_winstation",
5268 "get_process_winstation",
5269 "set_process_winstation",
5270 "enum_winstation",
5271 "create_desktop",
5272 "open_desktop",
5273 "open_input_desktop",
5274 "close_desktop",
5275 "get_thread_desktop",
5276 "set_thread_desktop",
5277 "enum_desktop",
5278 "set_user_object_info",
5279 "register_hotkey",
5280 "unregister_hotkey",
5281 "attach_thread_input",
5282 "get_thread_input",
5283 "get_last_input_time",
5284 "get_key_state",
5285 "set_key_state",
5286 "set_foreground_window",
5287 "set_focus_window",
5288 "set_active_window",
5289 "set_capture_window",
5290 "set_caret_window",
5291 "set_caret_info",
5292 "set_hook",
5293 "remove_hook",
5294 "start_hook_chain",
5295 "finish_hook_chain",
5296 "get_hook_info",
5297 "create_class",
5298 "destroy_class",
5299 "set_class_info",
5300 "open_clipboard",
5301 "close_clipboard",
5302 "empty_clipboard",
5303 "set_clipboard_data",
5304 "get_clipboard_data",
5305 "get_clipboard_formats",
5306 "enum_clipboard_formats",
5307 "release_clipboard",
5308 "get_clipboard_info",
5309 "set_clipboard_viewer",
5310 "add_clipboard_listener",
5311 "remove_clipboard_listener",
5312 "open_token",
5313 "set_global_windows",
5314 "adjust_token_privileges",
5315 "get_token_privileges",
5316 "check_token_privileges",
5317 "duplicate_token",
5318 "access_check",
5319 "get_token_sid",
5320 "get_token_groups",
5321 "get_token_default_dacl",
5322 "set_token_default_dacl",
5323 "set_security_object",
5324 "get_security_object",
5325 "get_system_handles",
5326 "create_mailslot",
5327 "set_mailslot_info",
5328 "create_directory",
5329 "open_directory",
5330 "get_directory_entry",
5331 "create_symlink",
5332 "open_symlink",
5333 "query_symlink",
5334 "get_object_info",
5335 "get_object_type",
5336 "unlink_object",
5337 "get_token_impersonation_level",
5338 "allocate_locally_unique_id",
5339 "create_device_manager",
5340 "create_device",
5341 "delete_device",
5342 "get_next_device_request",
5343 "make_process_system",
5344 "get_token_statistics",
5345 "create_completion",
5346 "open_completion",
5347 "add_completion",
5348 "remove_completion",
5349 "query_completion",
5350 "set_completion_info",
5351 "add_fd_completion",
5352 "set_fd_disp_info",
5353 "set_fd_name_info",
5354 "get_window_layered_info",
5355 "set_window_layered_info",
5356 "alloc_user_handle",
5357 "free_user_handle",
5358 "set_cursor",
5359 "update_rawinput_devices",
5360 "get_suspend_context",
5361 "set_suspend_context",
5362 "create_job",
5363 "open_job",
5364 "assign_job",
5365 "process_in_job",
5366 "set_job_limits",
5367 "set_job_completion_port",
5368 "terminate_job",
5371 static const struct
5373 const char *name;
5374 unsigned int value;
5375 } status_names[] =
5377 { "ABANDONED_WAIT_0", STATUS_ABANDONED_WAIT_0 },
5378 { "ACCESS_DENIED", STATUS_ACCESS_DENIED },
5379 { "ACCESS_VIOLATION", STATUS_ACCESS_VIOLATION },
5380 { "ADDRESS_ALREADY_ASSOCIATED", STATUS_ADDRESS_ALREADY_ASSOCIATED },
5381 { "ALERTED", STATUS_ALERTED },
5382 { "ALIAS_EXISTS", STATUS_ALIAS_EXISTS },
5383 { "BAD_DEVICE_TYPE", STATUS_BAD_DEVICE_TYPE },
5384 { "BAD_IMPERSONATION_LEVEL", STATUS_BAD_IMPERSONATION_LEVEL },
5385 { "BREAKPOINT", STATUS_BREAKPOINT },
5386 { "BUFFER_OVERFLOW", STATUS_BUFFER_OVERFLOW },
5387 { "BUFFER_TOO_SMALL", STATUS_BUFFER_TOO_SMALL },
5388 { "CANCELLED", STATUS_CANCELLED },
5389 { "CANNOT_DELETE", STATUS_CANNOT_DELETE },
5390 { "CANT_OPEN_ANONYMOUS", STATUS_CANT_OPEN_ANONYMOUS },
5391 { "CANT_WAIT", STATUS_CANT_WAIT },
5392 { "CHILD_MUST_BE_VOLATILE", STATUS_CHILD_MUST_BE_VOLATILE },
5393 { "CONNECTION_ABORTED", STATUS_CONNECTION_ABORTED },
5394 { "CONNECTION_DISCONNECTED", STATUS_CONNECTION_DISCONNECTED },
5395 { "CONNECTION_REFUSED", STATUS_CONNECTION_REFUSED },
5396 { "CONNECTION_RESET", STATUS_CONNECTION_RESET },
5397 { "DEBUGGER_INACTIVE", STATUS_DEBUGGER_INACTIVE },
5398 { "DEVICE_BUSY", STATUS_DEVICE_BUSY },
5399 { "DIRECTORY_NOT_EMPTY", STATUS_DIRECTORY_NOT_EMPTY },
5400 { "DISK_FULL", STATUS_DISK_FULL },
5401 { "DLL_NOT_FOUND", STATUS_DLL_NOT_FOUND },
5402 { "ERROR_CLASS_ALREADY_EXISTS", 0xc0010000 | ERROR_CLASS_ALREADY_EXISTS },
5403 { "ERROR_CLASS_DOES_NOT_EXIST", 0xc0010000 | ERROR_CLASS_DOES_NOT_EXIST },
5404 { "ERROR_CLASS_HAS_WINDOWS", 0xc0010000 | ERROR_CLASS_HAS_WINDOWS },
5405 { "ERROR_CLIPBOARD_NOT_OPEN", 0xc0010000 | ERROR_CLIPBOARD_NOT_OPEN },
5406 { "ERROR_HOTKEY_ALREADY_REGISTERED", 0xc0010000 | ERROR_HOTKEY_ALREADY_REGISTERED },
5407 { "ERROR_HOTKEY_NOT_REGISTERED", 0xc0010000 | ERROR_HOTKEY_NOT_REGISTERED },
5408 { "ERROR_INVALID_CURSOR_HANDLE", 0xc0010000 | ERROR_INVALID_CURSOR_HANDLE },
5409 { "ERROR_INVALID_INDEX", 0xc0010000 | ERROR_INVALID_INDEX },
5410 { "ERROR_INVALID_WINDOW_HANDLE", 0xc0010000 | ERROR_INVALID_WINDOW_HANDLE },
5411 { "ERROR_NO_MORE_USER_HANDLES", 0xc0010000 | ERROR_NO_MORE_USER_HANDLES },
5412 { "ERROR_WINDOW_OF_OTHER_THREAD", 0xc0010000 | ERROR_WINDOW_OF_OTHER_THREAD },
5413 { "FILE_DELETED", STATUS_FILE_DELETED },
5414 { "FILE_IS_A_DIRECTORY", STATUS_FILE_IS_A_DIRECTORY },
5415 { "FILE_LOCK_CONFLICT", STATUS_FILE_LOCK_CONFLICT },
5416 { "GENERIC_NOT_MAPPED", STATUS_GENERIC_NOT_MAPPED },
5417 { "HANDLES_CLOSED", STATUS_HANDLES_CLOSED },
5418 { "HANDLE_NOT_CLOSABLE", STATUS_HANDLE_NOT_CLOSABLE },
5419 { "HOST_UNREACHABLE", STATUS_HOST_UNREACHABLE },
5420 { "ILLEGAL_FUNCTION", STATUS_ILLEGAL_FUNCTION },
5421 { "INFO_LENGTH_MISMATCH", STATUS_INFO_LENGTH_MISMATCH },
5422 { "INSTANCE_NOT_AVAILABLE", STATUS_INSTANCE_NOT_AVAILABLE },
5423 { "INSUFFICIENT_RESOURCES", STATUS_INSUFFICIENT_RESOURCES },
5424 { "INVALID_CID", STATUS_INVALID_CID },
5425 { "INVALID_DEVICE_REQUEST", STATUS_INVALID_DEVICE_REQUEST },
5426 { "INVALID_FILE_FOR_SECTION", STATUS_INVALID_FILE_FOR_SECTION },
5427 { "INVALID_HANDLE", STATUS_INVALID_HANDLE },
5428 { "INVALID_IMAGE_FORMAT", STATUS_INVALID_IMAGE_FORMAT },
5429 { "INVALID_IMAGE_NE_FORMAT", STATUS_INVALID_IMAGE_NE_FORMAT },
5430 { "INVALID_IMAGE_NOT_MZ", STATUS_INVALID_IMAGE_NOT_MZ },
5431 { "INVALID_IMAGE_PROTECT", STATUS_INVALID_IMAGE_PROTECT },
5432 { "INVALID_IMAGE_WIN_64", STATUS_INVALID_IMAGE_WIN_64 },
5433 { "INVALID_LOCK_SEQUENCE", STATUS_INVALID_LOCK_SEQUENCE },
5434 { "INVALID_OWNER", STATUS_INVALID_OWNER },
5435 { "INVALID_PARAMETER", STATUS_INVALID_PARAMETER },
5436 { "INVALID_SECURITY_DESCR", STATUS_INVALID_SECURITY_DESCR },
5437 { "IO_TIMEOUT", STATUS_IO_TIMEOUT },
5438 { "KEY_DELETED", STATUS_KEY_DELETED },
5439 { "MAPPED_FILE_SIZE_ZERO", STATUS_MAPPED_FILE_SIZE_ZERO },
5440 { "MORE_PROCESSING_REQUIRED", STATUS_MORE_PROCESSING_REQUIRED },
5441 { "MUTANT_NOT_OWNED", STATUS_MUTANT_NOT_OWNED },
5442 { "NAME_TOO_LONG", STATUS_NAME_TOO_LONG },
5443 { "NETWORK_BUSY", STATUS_NETWORK_BUSY },
5444 { "NETWORK_UNREACHABLE", STATUS_NETWORK_UNREACHABLE },
5445 { "NOT_ALL_ASSIGNED", STATUS_NOT_ALL_ASSIGNED },
5446 { "NOT_A_DIRECTORY", STATUS_NOT_A_DIRECTORY },
5447 { "NOT_FOUND", STATUS_NOT_FOUND },
5448 { "NOT_IMPLEMENTED", STATUS_NOT_IMPLEMENTED },
5449 { "NOT_MAPPED_VIEW", STATUS_NOT_MAPPED_VIEW },
5450 { "NOT_REGISTRY_FILE", STATUS_NOT_REGISTRY_FILE },
5451 { "NOT_SAME_DEVICE", STATUS_NOT_SAME_DEVICE },
5452 { "NOT_SUPPORTED", STATUS_NOT_SUPPORTED },
5453 { "NO_DATA_DETECTED", STATUS_NO_DATA_DETECTED },
5454 { "NO_IMPERSONATION_TOKEN", STATUS_NO_IMPERSONATION_TOKEN },
5455 { "NO_MEMORY", STATUS_NO_MEMORY },
5456 { "NO_MORE_ENTRIES", STATUS_NO_MORE_ENTRIES },
5457 { "NO_MORE_FILES", STATUS_NO_MORE_FILES },
5458 { "NO_SUCH_DEVICE", STATUS_NO_SUCH_DEVICE },
5459 { "NO_SUCH_FILE", STATUS_NO_SUCH_FILE },
5460 { "NO_TOKEN", STATUS_NO_TOKEN },
5461 { "OBJECT_NAME_COLLISION", STATUS_OBJECT_NAME_COLLISION },
5462 { "OBJECT_NAME_EXISTS", STATUS_OBJECT_NAME_EXISTS },
5463 { "OBJECT_NAME_INVALID", STATUS_OBJECT_NAME_INVALID },
5464 { "OBJECT_NAME_NOT_FOUND", STATUS_OBJECT_NAME_NOT_FOUND },
5465 { "OBJECT_PATH_INVALID", STATUS_OBJECT_PATH_INVALID },
5466 { "OBJECT_PATH_NOT_FOUND", STATUS_OBJECT_PATH_NOT_FOUND },
5467 { "OBJECT_PATH_SYNTAX_BAD", STATUS_OBJECT_PATH_SYNTAX_BAD },
5468 { "OBJECT_TYPE_MISMATCH", STATUS_OBJECT_TYPE_MISMATCH },
5469 { "PENDING", STATUS_PENDING },
5470 { "PIPE_BROKEN", STATUS_PIPE_BROKEN },
5471 { "PIPE_CONNECTED", STATUS_PIPE_CONNECTED },
5472 { "PIPE_DISCONNECTED", STATUS_PIPE_DISCONNECTED },
5473 { "PIPE_LISTENING", STATUS_PIPE_LISTENING },
5474 { "PIPE_NOT_AVAILABLE", STATUS_PIPE_NOT_AVAILABLE },
5475 { "PRIVILEGE_NOT_HELD", STATUS_PRIVILEGE_NOT_HELD },
5476 { "PROCESS_IN_JOB", STATUS_PROCESS_IN_JOB },
5477 { "PROCESS_IS_TERMINATING", STATUS_PROCESS_IS_TERMINATING },
5478 { "PROCESS_NOT_IN_JOB", STATUS_PROCESS_NOT_IN_JOB },
5479 { "SECTION_TOO_BIG", STATUS_SECTION_TOO_BIG },
5480 { "SEMAPHORE_LIMIT_EXCEEDED", STATUS_SEMAPHORE_LIMIT_EXCEEDED },
5481 { "SHARING_VIOLATION", STATUS_SHARING_VIOLATION },
5482 { "SHUTDOWN_IN_PROGRESS", STATUS_SHUTDOWN_IN_PROGRESS },
5483 { "SUSPEND_COUNT_EXCEEDED", STATUS_SUSPEND_COUNT_EXCEEDED },
5484 { "THREAD_IS_TERMINATING", STATUS_THREAD_IS_TERMINATING },
5485 { "TIMEOUT", STATUS_TIMEOUT },
5486 { "TOO_MANY_OPENED_FILES", STATUS_TOO_MANY_OPENED_FILES },
5487 { "UNSUCCESSFUL", STATUS_UNSUCCESSFUL },
5488 { "USER_APC", STATUS_USER_APC },
5489 { "USER_MAPPED_FILE", STATUS_USER_MAPPED_FILE },
5490 { "VOLUME_DISMOUNTED", STATUS_VOLUME_DISMOUNTED },
5491 { "WAS_LOCKED", STATUS_WAS_LOCKED },
5492 { NULL, 0 }
5495 /* ### make_requests end ### */
5496 /* Everything above this line is generated automatically by tools/make_requests */
5498 static const char *get_status_name( unsigned int status )
5500 int i;
5501 static char buffer[10];
5503 if (status)
5505 for (i = 0; status_names[i].name; i++)
5506 if (status_names[i].value == status) return status_names[i].name;
5508 sprintf( buffer, "%x", status );
5509 return buffer;
5512 void trace_request(void)
5514 enum request req = current->req.request_header.req;
5515 if (req < REQ_NB_REQUESTS)
5517 fprintf( stderr, "%04x: %s(", current->id, req_names[req] );
5518 if (req_dumpers[req])
5520 cur_data = get_req_data();
5521 cur_size = get_req_data_size();
5522 req_dumpers[req]( &current->req );
5524 fprintf( stderr, " )\n" );
5526 else fprintf( stderr, "%04x: %d(?)\n", current->id, req );
5529 void trace_reply( enum request req, const union generic_reply *reply )
5531 if (req < REQ_NB_REQUESTS)
5533 fprintf( stderr, "%04x: %s() = %s",
5534 current->id, req_names[req], get_status_name(current->error) );
5535 if (reply_dumpers[req])
5537 fprintf( stderr, " {" );
5538 cur_data = current->reply_data;
5539 cur_size = reply->reply_header.reply_size;
5540 reply_dumpers[req]( reply );
5541 fprintf( stderr, " }" );
5543 fputc( '\n', stderr );
5545 else fprintf( stderr, "%04x: %d() = %s\n",
5546 current->id, req, get_status_name(current->error) );