msvcp: Sync spec files.
[wine/multimedia.git] / server / trace.c
bloba183fdedb59552531af0efab5e9ad8d7b0b2d5aa
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 "file.h"
42 #include "request.h"
43 #include "unicode.h"
45 static const void *cur_data;
46 static data_size_t cur_size;
48 static const char *get_status_name( unsigned int status );
50 /* utility functions */
52 static inline void remove_data( data_size_t size )
54 cur_data = (const char *)cur_data + size;
55 cur_size -= size;
58 static void dump_uints( const int *ptr, int len )
60 fputc( '{', stderr );
61 while (len > 0)
63 fprintf( stderr, "%08x", *ptr++ );
64 if (--len) fputc( ',', stderr );
66 fputc( '}', stderr );
69 static void dump_timeout( const char *prefix, const timeout_t *time )
71 fprintf( stderr, "%s%s", prefix, get_timeout_str(*time) );
74 static void dump_uint64( const char *prefix, const unsigned __int64 *val )
76 if ((unsigned int)*val != *val)
77 fprintf( stderr, "%s%x%08x", prefix, (unsigned int)(*val >> 32), (unsigned int)*val );
78 else
79 fprintf( stderr, "%s%08x", prefix, (unsigned int)*val );
82 static void dump_rectangle( const char *prefix, const rectangle_t *rect )
84 fprintf( stderr, "%s{%d,%d;%d,%d}", prefix,
85 rect->left, rect->top, rect->right, rect->bottom );
88 static void dump_char_info( const char *prefix, const char_info_t *info )
90 fprintf( stderr, "%s{'", prefix );
91 dump_strW( &info->ch, 1, stderr, "\'\'" );
92 fprintf( stderr, "',%04x}", info->attr );
95 static void dump_ioctl_code( const char *prefix, const ioctl_code_t *code )
97 switch(*code)
99 #define CASE(c) case c: fprintf( stderr, "%s%s", prefix, #c ); break
100 CASE(FSCTL_DISMOUNT_VOLUME);
101 CASE(FSCTL_PIPE_DISCONNECT);
102 CASE(FSCTL_PIPE_LISTEN);
103 CASE(FSCTL_PIPE_WAIT);
104 default: fprintf( stderr, "%s%08x", prefix, *code ); break;
105 #undef CASE
109 static void dump_cpu_type( const char *prefix, const cpu_type_t *code )
111 switch (*code)
113 #define CASE(c) case CPU_##c: fprintf( stderr, "%s%s", prefix, #c ); break
114 CASE(x86);
115 CASE(x86_64);
116 CASE(POWERPC);
117 default: fprintf( stderr, "%s%u", prefix, *code ); break;
118 #undef CASE
122 static void dump_apc_call( const char *prefix, const apc_call_t *call )
124 fprintf( stderr, "%s{", prefix );
125 switch(call->type)
127 case APC_NONE:
128 fprintf( stderr, "APC_NONE" );
129 break;
130 case APC_USER:
131 dump_uint64( "APC_USER,func=", &call->user.func );
132 dump_uint64( ",args={", &call->user.args[0] );
133 dump_uint64( ",", &call->user.args[1] );
134 dump_uint64( ",", &call->user.args[2] );
135 fputc( '}', stderr );
136 break;
137 case APC_TIMER:
138 dump_timeout( "APC_TIMER,time=", &call->timer.time );
139 dump_uint64( ",arg=", &call->timer.arg );
140 break;
141 case APC_ASYNC_IO:
142 dump_uint64( "APC_ASYNC_IO,func=", &call->async_io.func );
143 dump_uint64( ",user=", &call->async_io.user );
144 dump_uint64( ",sb=", &call->async_io.sb );
145 fprintf( stderr, ",status=%s", get_status_name(call->async_io.status) );
146 break;
147 case APC_VIRTUAL_ALLOC:
148 dump_uint64( "APC_VIRTUAL_ALLOC,addr==", &call->virtual_alloc.addr );
149 dump_uint64( ",size=", &call->virtual_alloc.size );
150 fprintf( stderr, ",zero_bits=%u,op_type=%x,prot=%x",
151 call->virtual_alloc.zero_bits, call->virtual_alloc.op_type,
152 call->virtual_alloc.prot );
153 break;
154 case APC_VIRTUAL_FREE:
155 dump_uint64( "APC_VIRTUAL_FREE,addr=", &call->virtual_free.addr );
156 dump_uint64( ",size=", &call->virtual_free.size );
157 fprintf( stderr, ",op_type=%x", call->virtual_free.op_type );
158 break;
159 case APC_VIRTUAL_QUERY:
160 dump_uint64( "APC_VIRTUAL_QUERY,addr=", &call->virtual_query.addr );
161 break;
162 case APC_VIRTUAL_PROTECT:
163 dump_uint64( "APC_VIRTUAL_PROTECT,addr=", &call->virtual_protect.addr );
164 dump_uint64( ",size=", &call->virtual_protect.size );
165 fprintf( stderr, ",prot=%x", call->virtual_protect.prot );
166 break;
167 case APC_VIRTUAL_FLUSH:
168 dump_uint64( "APC_VIRTUAL_FLUSH,addr=", &call->virtual_flush.addr );
169 dump_uint64( ",size=", &call->virtual_flush.size );
170 break;
171 case APC_VIRTUAL_LOCK:
172 dump_uint64( "APC_VIRTUAL_LOCK,addr=", &call->virtual_lock.addr );
173 dump_uint64( ",size=", &call->virtual_lock.size );
174 break;
175 case APC_VIRTUAL_UNLOCK:
176 dump_uint64( "APC_VIRTUAL_UNLOCK,addr=", &call->virtual_unlock.addr );
177 dump_uint64( ",size=", &call->virtual_unlock.size );
178 break;
179 case APC_MAP_VIEW:
180 fprintf( stderr, "APC_MAP_VIEW,handle=%04x", call->map_view.handle );
181 dump_uint64( ",addr=", &call->map_view.addr );
182 dump_uint64( ",size=", &call->map_view.size );
183 dump_uint64( ",offset=", &call->map_view.offset );
184 fprintf( stderr, ",zero_bits=%u,alloc_type=%x,prot=%x",
185 call->map_view.zero_bits, call->map_view.alloc_type, call->map_view.prot );
186 break;
187 case APC_UNMAP_VIEW:
188 dump_uint64( "APC_UNMAP_VIEW,addr=", &call->unmap_view.addr );
189 break;
190 case APC_CREATE_THREAD:
191 dump_uint64( "APC_CREATE_THREAD,func=", &call->create_thread.func );
192 dump_uint64( ",arg=", &call->create_thread.arg );
193 dump_uint64( ",reserve=", &call->create_thread.reserve );
194 dump_uint64( ",commit=", &call->create_thread.commit );
195 fprintf( stderr, ",suspend=%u", call->create_thread.suspend );
196 break;
197 default:
198 fprintf( stderr, "type=%u", call->type );
199 break;
201 fputc( '}', stderr );
204 static void dump_apc_result( const char *prefix, const apc_result_t *result )
206 fprintf( stderr, "%s{", prefix );
207 switch(result->type)
209 case APC_NONE:
210 break;
211 case APC_ASYNC_IO:
212 fprintf( stderr, "APC_ASYNC_IO,status=%s,total=%u",
213 get_status_name( result->async_io.status ), result->async_io.total );
214 dump_uint64( ",apc=", &result->async_io.apc );
215 break;
216 case APC_VIRTUAL_ALLOC:
217 fprintf( stderr, "APC_VIRTUAL_ALLOC,status=%s",
218 get_status_name( result->virtual_alloc.status ));
219 dump_uint64( ",addr=", &result->virtual_alloc.addr );
220 dump_uint64( ",size=", &result->virtual_alloc.size );
221 break;
222 case APC_VIRTUAL_FREE:
223 fprintf( stderr, "APC_VIRTUAL_FREE,status=%s",
224 get_status_name( result->virtual_free.status ));
225 dump_uint64( ",addr=", &result->virtual_free.addr );
226 dump_uint64( ",size=", &result->virtual_free.size );
227 break;
228 case APC_VIRTUAL_QUERY:
229 fprintf( stderr, "APC_VIRTUAL_QUERY,status=%s",
230 get_status_name( result->virtual_query.status ));
231 dump_uint64( ",base=", &result->virtual_query.base );
232 dump_uint64( ",alloc_base=", &result->virtual_query.alloc_base );
233 dump_uint64( ",size=", &result->virtual_query.size );
234 fprintf( stderr, ",state=%x,prot=%x,alloc_prot=%x,alloc_type=%x",
235 result->virtual_query.state, result->virtual_query.prot,
236 result->virtual_query.alloc_prot, result->virtual_query.alloc_type );
237 break;
238 case APC_VIRTUAL_PROTECT:
239 fprintf( stderr, "APC_VIRTUAL_PROTECT,status=%s",
240 get_status_name( result->virtual_protect.status ));
241 dump_uint64( ",addr=", &result->virtual_protect.addr );
242 dump_uint64( ",size=", &result->virtual_protect.size );
243 fprintf( stderr, ",prot=%x", result->virtual_protect.prot );
244 break;
245 case APC_VIRTUAL_FLUSH:
246 fprintf( stderr, "APC_VIRTUAL_FLUSH,status=%s",
247 get_status_name( result->virtual_flush.status ));
248 dump_uint64( ",addr=", &result->virtual_flush.addr );
249 dump_uint64( ",size=", &result->virtual_flush.size );
250 break;
251 case APC_VIRTUAL_LOCK:
252 fprintf( stderr, "APC_VIRTUAL_LOCK,status=%s",
253 get_status_name( result->virtual_lock.status ));
254 dump_uint64( ",addr=", &result->virtual_lock.addr );
255 dump_uint64( ",size=", &result->virtual_lock.size );
256 break;
257 case APC_VIRTUAL_UNLOCK:
258 fprintf( stderr, "APC_VIRTUAL_UNLOCK,status=%s",
259 get_status_name( result->virtual_unlock.status ));
260 dump_uint64( ",addr=", &result->virtual_unlock.addr );
261 dump_uint64( ",size=", &result->virtual_unlock.size );
262 break;
263 case APC_MAP_VIEW:
264 fprintf( stderr, "APC_MAP_VIEW,status=%s",
265 get_status_name( result->map_view.status ));
266 dump_uint64( ",addr=", &result->map_view.addr );
267 dump_uint64( ",size=", &result->map_view.size );
268 break;
269 case APC_UNMAP_VIEW:
270 fprintf( stderr, "APC_UNMAP_VIEW,status=%s",
271 get_status_name( result->unmap_view.status ) );
272 break;
273 case APC_CREATE_THREAD:
274 fprintf( stderr, "APC_CREATE_THREAD,status=%s,tid=%04x,handle=%04x",
275 get_status_name( result->create_thread.status ),
276 result->create_thread.tid, result->create_thread.handle );
277 break;
278 default:
279 fprintf( stderr, "type=%u", result->type );
280 break;
282 fputc( '}', stderr );
285 static void dump_async_data( const char *prefix, const async_data_t *data )
287 fprintf( stderr, "%s{handle=%04x,event=%04x", prefix, data->handle, data->event );
288 dump_uint64( ",callback=", &data->callback );
289 dump_uint64( ",iosb=", &data->iosb );
290 dump_uint64( ",arg=", &data->arg );
291 dump_uint64( ",cvalue=", &data->cvalue );
292 fputc( '}', stderr );
295 static void dump_hw_input( const char *prefix, const hw_input_t *input )
297 switch (input->type)
299 case INPUT_MOUSE:
300 fprintf( stderr, "%s{type=MOUSE,x=%d,y=%d,data=%08x,flags=%08x,time=%u",
301 prefix, input->mouse.x, input->mouse.y, input->mouse.data, input->mouse.flags,
302 input->mouse.time );
303 dump_uint64( ",info=", &input->mouse.info );
304 fputc( '}', stderr );
305 break;
306 case INPUT_KEYBOARD:
307 fprintf( stderr, "%s{type=KEYBOARD,vkey=%04hx,scan=%04hx,flags=%08x,time=%u",
308 prefix, input->kbd.vkey, input->kbd.scan, input->kbd.flags, input->kbd.time );
309 dump_uint64( ",info=", &input->kbd.info );
310 fputc( '}', stderr );
311 break;
312 case INPUT_HARDWARE:
313 fprintf( stderr, "%s{type=HARDWARE,msg=%04x", prefix, input->hw.msg );
314 dump_uint64( ",lparam=", &input->hw.lparam );
315 fputc( '}', stderr );
316 break;
317 default:
318 fprintf( stderr, "%s{type=%04x}", prefix, input->type );
319 break;
323 static void dump_luid( const char *prefix, const luid_t *luid )
325 fprintf( stderr, "%s%d.%u", prefix, luid->high_part, luid->low_part );
328 static void dump_varargs_ints( const char *prefix, data_size_t size )
330 const int *data = cur_data;
331 data_size_t len = size / sizeof(*data);
333 fprintf( stderr,"%s{", prefix );
334 while (len > 0)
336 fprintf( stderr, "%d", *data++ );
337 if (--len) fputc( ',', stderr );
339 fputc( '}', stderr );
340 remove_data( size );
343 static void dump_varargs_uints64( const char *prefix, data_size_t size )
345 const unsigned __int64 *data = cur_data;
346 data_size_t len = size / sizeof(*data);
348 fprintf( stderr,"%s{", prefix );
349 while (len > 0)
351 dump_uint64( "", data++ );
352 if (--len) fputc( ',', stderr );
354 fputc( '}', stderr );
355 remove_data( size );
358 static void dump_varargs_apc_result( const char *prefix, data_size_t size )
360 const apc_result_t *result = cur_data;
362 if (size >= sizeof(*result))
364 dump_apc_result( prefix, result );
365 size = sizeof(*result);
367 remove_data( size );
370 static void dump_varargs_handles( const char *prefix, data_size_t size )
372 const obj_handle_t *data = cur_data;
373 data_size_t len = size / sizeof(*data);
375 fprintf( stderr,"%s{", prefix );
376 while (len > 0)
378 fprintf( stderr, "%04x", *data++ );
379 if (--len) fputc( ',', stderr );
381 fputc( '}', stderr );
382 remove_data( size );
385 static void dump_varargs_user_handles( const char *prefix, data_size_t size )
387 const user_handle_t *data = cur_data;
388 data_size_t len = size / sizeof(*data);
390 fprintf( stderr,"%s{", prefix );
391 while (len > 0)
393 fprintf( stderr, "%08x", *data++ );
394 if (--len) fputc( ',', stderr );
396 fputc( '}', stderr );
397 remove_data( size );
400 static void dump_varargs_bytes( const char *prefix, data_size_t size )
402 const unsigned char *data = cur_data;
403 data_size_t len = min( 1024, size );
405 fprintf( stderr,"%s{", prefix );
406 while (len > 0)
408 fprintf( stderr, "%02x", *data++ );
409 if (--len) fputc( ',', stderr );
411 if (size > 1024) fprintf( stderr, "...(total %u)", size );
412 fputc( '}', stderr );
413 remove_data( size );
416 static void dump_varargs_string( const char *prefix, data_size_t size )
418 fprintf( stderr, "%s\"%.*s\"", prefix, (int)size, (const char *)cur_data );
419 remove_data( size );
422 static void dump_varargs_unicode_str( const char *prefix, data_size_t size )
424 fprintf( stderr, "%sL\"", prefix );
425 dump_strW( cur_data, size / sizeof(WCHAR), stderr, "\"\"" );
426 fputc( '\"', stderr );
427 remove_data( size );
430 static void dump_varargs_context( const char *prefix, data_size_t size )
432 const context_t *context = cur_data;
433 context_t ctx;
434 unsigned int i;
436 if (!size)
438 fprintf( stderr, "%s{}", prefix );
439 return;
441 size = min( size, sizeof(ctx) );
442 memset( &ctx, 0, sizeof(ctx) );
443 memcpy( &ctx, context, size );
445 fprintf( stderr,"%s{", prefix );
446 dump_cpu_type( "cpu=", &ctx.cpu );
447 switch (ctx.cpu)
449 case CPU_x86:
450 if (ctx.flags & SERVER_CTX_CONTROL)
451 fprintf( stderr, ",eip=%08x,esp=%08x,ebp=%08x,eflags=%08x,cs=%04x,ss=%04x",
452 ctx.ctl.i386_regs.eip, ctx.ctl.i386_regs.esp, ctx.ctl.i386_regs.ebp,
453 ctx.ctl.i386_regs.eflags, ctx.ctl.i386_regs.cs, ctx.ctl.i386_regs.ss );
454 if (ctx.flags & SERVER_CTX_SEGMENTS)
455 fprintf( stderr, ",ds=%04x,es=%04x,fs=%04x,gs=%04x",
456 ctx.seg.i386_regs.ds, ctx.seg.i386_regs.es,
457 ctx.seg.i386_regs.fs, ctx.seg.i386_regs.gs );
458 if (ctx.flags & SERVER_CTX_INTEGER)
459 fprintf( stderr, ",eax=%08x,ebx=%08x,ecx=%08x,edx=%08x,esi=%08x,edi=%08x",
460 ctx.integer.i386_regs.eax, ctx.integer.i386_regs.ebx, ctx.integer.i386_regs.ecx,
461 ctx.integer.i386_regs.edx, ctx.integer.i386_regs.esi, ctx.integer.i386_regs.edi );
462 if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
463 fprintf( stderr, ",dr0=%08x,dr1=%08x,dr2=%08x,dr3=%08x,dr6=%08x,dr7=%08x",
464 ctx.debug.i386_regs.dr0, ctx.debug.i386_regs.dr1, ctx.debug.i386_regs.dr2,
465 ctx.debug.i386_regs.dr3, ctx.debug.i386_regs.dr6, ctx.debug.i386_regs.dr7 );
466 if (ctx.flags & SERVER_CTX_FLOATING_POINT)
468 fprintf( stderr, ",fp.ctrl=%08x,fp.status=%08x,fp.tag=%08x,fp.err_off=%08x,fp.err_sel=%08x",
469 ctx.fp.i386_regs.ctrl, ctx.fp.i386_regs.status, ctx.fp.i386_regs.tag,
470 ctx.fp.i386_regs.err_off, ctx.fp.i386_regs.err_sel );
471 fprintf( stderr, ",fp.data_off=%08x,fp.data_sel=%08x,fp.cr0npx=%08x",
472 ctx.fp.i386_regs.data_off, ctx.fp.i386_regs.data_sel, ctx.fp.i386_regs.cr0npx );
473 for (i = 0; i < 8; i++)
474 fprintf( stderr, ",fp.reg%u=%Lg", i, *(long double *)&ctx.fp.i386_regs.regs[10*i] );
476 if (ctx.flags & SERVER_CTX_EXTENDED_REGISTERS)
478 fprintf( stderr, ",extended=" );
479 dump_uints( (const int *)ctx.ext.i386_regs, sizeof(ctx.ext.i386_regs) / sizeof(int) );
481 break;
482 case CPU_x86_64:
483 if (ctx.flags & SERVER_CTX_CONTROL)
485 dump_uint64( ",rip=", &ctx.ctl.x86_64_regs.rip );
486 dump_uint64( ",rbp=", &ctx.ctl.x86_64_regs.rbp );
487 dump_uint64( ",rsp=", &ctx.ctl.x86_64_regs.rsp );
488 fprintf( stderr, ",cs=%04x,ss=%04x,flags=%08x",
489 ctx.ctl.x86_64_regs.cs, ctx.ctl.x86_64_regs.ss, ctx.ctl.x86_64_regs.flags );
491 if (ctx.flags & SERVER_CTX_INTEGER)
493 dump_uint64( ",rax=", &ctx.integer.x86_64_regs.rax );
494 dump_uint64( ",rbx=", &ctx.integer.x86_64_regs.rbx );
495 dump_uint64( ",rcx=", &ctx.integer.x86_64_regs.rcx );
496 dump_uint64( ",rdx=", &ctx.integer.x86_64_regs.rdx );
497 dump_uint64( ",rsi=", &ctx.integer.x86_64_regs.rsi );
498 dump_uint64( ",rdi=", &ctx.integer.x86_64_regs.rdi );
499 dump_uint64( ",r8=", &ctx.integer.x86_64_regs.r8 );
500 dump_uint64( ",r9=", &ctx.integer.x86_64_regs.r9 );
501 dump_uint64( ",r10=", &ctx.integer.x86_64_regs.r10 );
502 dump_uint64( ",r11=", &ctx.integer.x86_64_regs.r11 );
503 dump_uint64( ",r12=", &ctx.integer.x86_64_regs.r12 );
504 dump_uint64( ",r13=", &ctx.integer.x86_64_regs.r13 );
505 dump_uint64( ",r14=", &ctx.integer.x86_64_regs.r14 );
506 dump_uint64( ",r15=", &ctx.integer.x86_64_regs.r15 );
508 if (ctx.flags & SERVER_CTX_SEGMENTS)
509 fprintf( stderr, ",ds=%04x,es=%04x,fs=%04x,gs=%04x",
510 ctx.seg.x86_64_regs.ds, ctx.seg.x86_64_regs.es,
511 ctx.seg.x86_64_regs.fs, ctx.seg.x86_64_regs.gs );
512 if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
514 dump_uint64( ",dr0=", &ctx.debug.x86_64_regs.dr0 );
515 dump_uint64( ",dr1=", &ctx.debug.x86_64_regs.dr1 );
516 dump_uint64( ",dr2=", &ctx.debug.x86_64_regs.dr2 );
517 dump_uint64( ",dr3=", &ctx.debug.x86_64_regs.dr3 );
518 dump_uint64( ",dr6=", &ctx.debug.x86_64_regs.dr6 );
519 dump_uint64( ",dr7=", &ctx.debug.x86_64_regs.dr7 );
521 if (ctx.flags & SERVER_CTX_FLOATING_POINT)
523 for (i = 0; i < 32; i++)
524 fprintf( stderr, ",fp%u=%08x%08x%08x%08x", i,
525 (unsigned int)(ctx.fp.x86_64_regs.fpregs[i].high >> 32),
526 (unsigned int)ctx.fp.x86_64_regs.fpregs[i].high,
527 (unsigned int)(ctx.fp.x86_64_regs.fpregs[i].low >> 32),
528 (unsigned int)ctx.fp.x86_64_regs.fpregs[i].low );
530 break;
531 case CPU_POWERPC:
532 if (ctx.flags & SERVER_CTX_CONTROL)
533 fprintf( stderr, ",iar=%08x,msr=%08x,ctr=%08x,lr=%08x,dar=%08x,dsisr=%08x,trap=%08x",
534 ctx.ctl.powerpc_regs.iar, ctx.ctl.powerpc_regs.msr, ctx.ctl.powerpc_regs.ctr,
535 ctx.ctl.powerpc_regs.lr, ctx.ctl.powerpc_regs.dar, ctx.ctl.powerpc_regs.dsisr,
536 ctx.ctl.powerpc_regs.trap );
537 if (ctx.flags & SERVER_CTX_INTEGER)
539 for (i = 0; i < 32; i++) fprintf( stderr, ",gpr%u=%08x", i, ctx.integer.powerpc_regs.gpr[i] );
540 fprintf( stderr, ",cr=%08x,xer=%08x",
541 ctx.integer.powerpc_regs.cr, ctx.integer.powerpc_regs.xer );
543 if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
544 for (i = 0; i < 8; i++) fprintf( stderr, ",dr%u=%08x", i, ctx.debug.powerpc_regs.dr[i] );
545 if (ctx.flags & SERVER_CTX_FLOATING_POINT)
547 for (i = 0; i < 32; i++) fprintf( stderr, ",fpr%u=%g", i, ctx.fp.powerpc_regs.fpr[i] );
548 fprintf( stderr, ",fpscr=%g", ctx.fp.powerpc_regs.fpscr );
550 break;
551 case CPU_ARM:
552 if (ctx.flags & SERVER_CTX_CONTROL)
553 fprintf( stderr, ",sp=%08x,lr=%08x,pc=%08x,cpsr=%08x",
554 ctx.ctl.arm_regs.sp, ctx.ctl.arm_regs.lr,
555 ctx.ctl.arm_regs.pc, ctx.ctl.arm_regs.cpsr );
556 if (ctx.flags & SERVER_CTX_INTEGER)
557 for (i = 0; i < 13; i++) fprintf( stderr, ",r%u=%08x", i, ctx.integer.arm_regs.r[i] );
558 break;
559 case CPU_ARM64:
560 if (ctx.flags & SERVER_CTX_CONTROL)
562 dump_uint64( ",sp=", &ctx.ctl.arm64_regs.sp );
563 dump_uint64( ",pc=", &ctx.ctl.arm64_regs.pc );
564 dump_uint64( ",pstate=", &ctx.ctl.arm64_regs.pstate );
566 if (ctx.flags & SERVER_CTX_INTEGER)
568 dump_uint64( ",x0=", &ctx.integer.arm64_regs.x[0] );
569 dump_uint64( ",x1=", &ctx.integer.arm64_regs.x[1] );
570 dump_uint64( ",x2=", &ctx.integer.arm64_regs.x[2] );
571 dump_uint64( ",x3=", &ctx.integer.arm64_regs.x[3] );
572 dump_uint64( ",x4=", &ctx.integer.arm64_regs.x[4] );
573 dump_uint64( ",x5=", &ctx.integer.arm64_regs.x[5] );
574 dump_uint64( ",x6=", &ctx.integer.arm64_regs.x[6] );
575 dump_uint64( ",x7=", &ctx.integer.arm64_regs.x[7] );
576 dump_uint64( ",x8=", &ctx.integer.arm64_regs.x[8] );
577 dump_uint64( ",x9=", &ctx.integer.arm64_regs.x[9] );
578 dump_uint64( ",x10=", &ctx.integer.arm64_regs.x[10] );
579 dump_uint64( ",x11=", &ctx.integer.arm64_regs.x[11] );
580 dump_uint64( ",x12=", &ctx.integer.arm64_regs.x[12] );
581 dump_uint64( ",x13=", &ctx.integer.arm64_regs.x[13] );
582 dump_uint64( ",x14=", &ctx.integer.arm64_regs.x[14] );
583 dump_uint64( ",x15=", &ctx.integer.arm64_regs.x[15] );
584 dump_uint64( ",x16=", &ctx.integer.arm64_regs.x[16] );
585 dump_uint64( ",x17=", &ctx.integer.arm64_regs.x[17] );
586 dump_uint64( ",x18=", &ctx.integer.arm64_regs.x[18] );
587 dump_uint64( ",x19=", &ctx.integer.arm64_regs.x[19] );
588 dump_uint64( ",x20=", &ctx.integer.arm64_regs.x[20] );
589 dump_uint64( ",x21=", &ctx.integer.arm64_regs.x[21] );
590 dump_uint64( ",x22=", &ctx.integer.arm64_regs.x[22] );
591 dump_uint64( ",x23=", &ctx.integer.arm64_regs.x[23] );
592 dump_uint64( ",x24=", &ctx.integer.arm64_regs.x[24] );
593 dump_uint64( ",x25=", &ctx.integer.arm64_regs.x[25] );
594 dump_uint64( ",x26=", &ctx.integer.arm64_regs.x[26] );
595 dump_uint64( ",x27=", &ctx.integer.arm64_regs.x[27] );
596 dump_uint64( ",x28=", &ctx.integer.arm64_regs.x[28] );
597 dump_uint64( ",x29=", &ctx.integer.arm64_regs.x[29] );
598 dump_uint64( ",x30=", &ctx.integer.arm64_regs.x[30] );
600 break;
602 fputc( '}', stderr );
603 remove_data( size );
606 static void dump_varargs_debug_event( const char *prefix, data_size_t size )
608 debug_event_t event;
609 unsigned int i;
611 if (!size)
613 fprintf( stderr, "%s{}", prefix );
614 return;
616 size = min( size, sizeof(event) );
617 memset( &event, 0, sizeof(event) );
618 memcpy( &event, cur_data, size );
620 switch(event.code)
622 case EXCEPTION_DEBUG_EVENT:
623 fprintf( stderr, "%s{exception,first=%d,exc_code=%08x,flags=%08x", prefix,
624 event.exception.first, event.exception.exc_code, event.exception.flags );
625 dump_uint64( ",record=", &event.exception.record );
626 dump_uint64( ",address=", &event.exception.address );
627 fprintf( stderr, ",params={" );
628 event.exception.nb_params = min( event.exception.nb_params, EXCEPTION_MAXIMUM_PARAMETERS );
629 for (i = 0; i < event.exception.nb_params; i++)
631 dump_uint64( "", &event.exception.params[i] );
632 if (i < event.exception.nb_params) fputc( ',', stderr );
634 fprintf( stderr, "}}" );
635 break;
636 case CREATE_THREAD_DEBUG_EVENT:
637 fprintf( stderr, "%s{create_thread,thread=%04x", prefix, event.create_thread.handle );
638 dump_uint64( ",teb=", &event.create_thread.teb );
639 dump_uint64( ",start=", &event.create_thread.start );
640 fputc( '}', stderr );
641 break;
642 case CREATE_PROCESS_DEBUG_EVENT:
643 fprintf( stderr, "%s{create_process,file=%04x,process=%04x,thread=%04x", prefix,
644 event.create_process.file, event.create_process.process,
645 event.create_process.thread );
646 dump_uint64( ",base=", &event.create_process.base );
647 fprintf( stderr, ",offset=%d,size=%d",
648 event.create_process.dbg_offset, event.create_process.dbg_size );
649 dump_uint64( ",teb=", &event.create_process.teb );
650 dump_uint64( ",start=", &event.create_process.start );
651 dump_uint64( ",name=", &event.create_process.name );
652 fprintf( stderr, ",unicode=%d}", event.create_process.unicode );
653 break;
654 case EXIT_THREAD_DEBUG_EVENT:
655 fprintf( stderr, "%s{exit_thread,code=%d}", prefix, event.exit.exit_code );
656 break;
657 case EXIT_PROCESS_DEBUG_EVENT:
658 fprintf( stderr, "%s{exit_process,code=%d}", prefix, event.exit.exit_code );
659 break;
660 case LOAD_DLL_DEBUG_EVENT:
661 fprintf( stderr, "%s{load_dll,file=%04x", prefix, event.load_dll.handle );
662 dump_uint64( ",base=", &event.load_dll.base );
663 fprintf( stderr, ",offset=%d,size=%d",
664 event.load_dll.dbg_offset, event.load_dll.dbg_size );
665 dump_uint64( ",name=", &event.load_dll.name );
666 fprintf( stderr, ",unicode=%d}", event.load_dll.unicode );
667 break;
668 case UNLOAD_DLL_DEBUG_EVENT:
669 fprintf( stderr, "%s{unload_dll", prefix );
670 dump_uint64( ",base=", &event.unload_dll.base );
671 fputc( '}', stderr );
672 break;
673 case OUTPUT_DEBUG_STRING_EVENT:
674 fprintf( stderr, "%s{output_string", prefix );
675 dump_uint64( ",string=", &event.output_string.string );
676 fprintf( stderr, ",len=%u}", event.output_string.length );
677 break;
678 case RIP_EVENT:
679 fprintf( stderr, "%s{rip,err=%d,type=%d}", prefix,
680 event.rip_info.error, event.rip_info.type );
681 break;
682 case 0: /* zero is the code returned on timeouts */
683 fprintf( stderr, "%s{}", prefix );
684 break;
685 default:
686 fprintf( stderr, "%s{code=??? (%d)}", prefix, event.code );
687 break;
689 remove_data( size );
692 /* dump a unicode string contained in a buffer; helper for dump_varargs_startup_info */
693 static data_size_t dump_inline_unicode_string( const char *prefix, data_size_t pos, data_size_t len, data_size_t total_size )
695 fputs( prefix, stderr );
696 if (pos >= total_size) return pos;
697 if (len > total_size - pos) len = total_size - pos;
698 len /= sizeof(WCHAR);
699 dump_strW( (const WCHAR *)cur_data + pos/sizeof(WCHAR), len, stderr, "\"\"" );
700 return pos + len * sizeof(WCHAR);
703 static void dump_varargs_startup_info( const char *prefix, data_size_t size )
705 startup_info_t info;
706 data_size_t pos = sizeof(info);
708 memset( &info, 0, sizeof(info) );
709 memcpy( &info, cur_data, min( size, sizeof(info) ));
711 fprintf( stderr,
712 "%s{debug_flags=%x,console_flags=%x,console=%04x,hstdin=%04x,hstdout=%04x,hstderr=%04x,"
713 "x=%u,y=%u,xsize=%u,ysize=%u,xchars=%u,ychars=%u,attribute=%02x,flags=%x,show=%u",
714 prefix, info.debug_flags, info.console_flags, info.console,
715 info.hstdin, info.hstdout, info.hstderr, info.x, info.y, info.xsize, info.ysize,
716 info.xchars, info.ychars, info.attribute, info.flags, info.show );
717 pos = dump_inline_unicode_string( ",curdir=L\"", pos, info.curdir_len, size );
718 pos = dump_inline_unicode_string( "\",dllpath=L\"", pos, info.dllpath_len, size );
719 pos = dump_inline_unicode_string( "\",imagepath=L\"", pos, info.imagepath_len, size );
720 pos = dump_inline_unicode_string( "\",cmdline=L\"", pos, info.cmdline_len, size );
721 pos = dump_inline_unicode_string( "\",title=L\"", pos, info.title_len, size );
722 pos = dump_inline_unicode_string( "\",desktop=L\"", pos, info.desktop_len, size );
723 pos = dump_inline_unicode_string( "\",shellinfo=L\"", pos, info.shellinfo_len, size );
724 pos = dump_inline_unicode_string( "\",runtime=L\"", pos, info.runtime_len, size );
725 fprintf( stderr, "\"}" );
726 remove_data( size );
729 static void dump_varargs_input_records( const char *prefix, data_size_t size )
731 const INPUT_RECORD *rec = cur_data;
732 data_size_t len = size / sizeof(*rec);
734 fprintf( stderr,"%s{", prefix );
735 while (len > 0)
737 fprintf( stderr, "{%04x,...}", rec->EventType );
738 rec++;
739 if (--len) fputc( ',', stderr );
741 fputc( '}', stderr );
742 remove_data( size );
745 static void dump_varargs_rectangles( const char *prefix, data_size_t size )
747 const rectangle_t *rect = cur_data;
748 data_size_t len = size / sizeof(*rect);
750 fprintf( stderr,"%s{", prefix );
751 while (len > 0)
753 dump_rectangle( "", rect++ );
754 if (--len) fputc( ',', stderr );
756 fputc( '}', stderr );
757 remove_data( size );
760 static void dump_varargs_message_data( const char *prefix, data_size_t size )
762 /* FIXME: dump the structured data */
763 dump_varargs_bytes( prefix, size );
766 static void dump_varargs_properties( const char *prefix, data_size_t size )
768 const property_data_t *prop = cur_data;
769 data_size_t len = size / sizeof(*prop);
771 fprintf( stderr,"%s{", prefix );
772 while (len > 0)
774 fprintf( stderr, "{atom=%04x,str=%d", prop->atom, prop->string );
775 dump_uint64( ",data=", &prop->data );
776 fputc( '}', stderr );
777 prop++;
778 if (--len) fputc( ',', stderr );
780 fputc( '}', stderr );
781 remove_data( size );
784 static void dump_varargs_LUID_AND_ATTRIBUTES( const char *prefix, data_size_t size )
786 const LUID_AND_ATTRIBUTES *lat = cur_data;
787 data_size_t len = size / sizeof(*lat);
789 fprintf( stderr,"%s{", prefix );
790 while (len > 0)
792 fprintf( stderr, "{luid=%08x%08x,attr=%x}",
793 lat->Luid.HighPart, lat->Luid.LowPart, lat->Attributes );
794 lat++;
795 if (--len) fputc( ',', stderr );
797 fputc( '}', stderr );
798 remove_data( size );
801 static void dump_inline_sid( const char *prefix, const SID *sid, data_size_t size )
803 DWORD i;
805 /* security check */
806 if ((FIELD_OFFSET(SID, SubAuthority[0]) > size) ||
807 (FIELD_OFFSET(SID, SubAuthority[sid->SubAuthorityCount]) > size))
809 fprintf( stderr, "<invalid sid>" );
810 return;
813 fprintf( stderr,"%s{", prefix );
814 fprintf( stderr, "S-%u-%u", sid->Revision, MAKELONG(
815 MAKEWORD( sid->IdentifierAuthority.Value[5],
816 sid->IdentifierAuthority.Value[4] ),
817 MAKEWORD( sid->IdentifierAuthority.Value[3],
818 sid->IdentifierAuthority.Value[2] ) ) );
819 for (i = 0; i < sid->SubAuthorityCount; i++)
820 fprintf( stderr, "-%u", sid->SubAuthority[i] );
821 fputc( '}', stderr );
824 static void dump_varargs_SID( const char *prefix, data_size_t size )
826 const SID *sid = cur_data;
827 dump_inline_sid( prefix, sid, size );
828 remove_data( size );
831 static void dump_inline_acl( const char *prefix, const ACL *acl, data_size_t size )
833 const ACE_HEADER *ace;
834 ULONG i;
836 fprintf( stderr,"%s{", prefix );
837 if (size)
839 if (size < sizeof(ACL))
841 fprintf( stderr, "<invalid acl>}" );
842 return;
844 size -= sizeof(ACL);
845 ace = (const ACE_HEADER *)(acl + 1);
846 for (i = 0; i < acl->AceCount; i++)
848 const SID *sid = NULL;
849 data_size_t sid_size = 0;
851 if (size < sizeof(ACE_HEADER) || size < ace->AceSize) break;
852 size -= ace->AceSize;
853 if (i != 0) fputc( ',', stderr );
854 fprintf( stderr, "{AceType=" );
855 switch (ace->AceType)
857 case ACCESS_DENIED_ACE_TYPE:
858 sid = (const SID *)&((const ACCESS_DENIED_ACE *)ace)->SidStart;
859 sid_size = ace->AceSize - FIELD_OFFSET(ACCESS_DENIED_ACE, SidStart);
860 fprintf( stderr, "ACCESS_DENIED_ACE_TYPE,Mask=%x",
861 ((const ACCESS_DENIED_ACE *)ace)->Mask );
862 break;
863 case ACCESS_ALLOWED_ACE_TYPE:
864 sid = (const SID *)&((const ACCESS_ALLOWED_ACE *)ace)->SidStart;
865 sid_size = ace->AceSize - FIELD_OFFSET(ACCESS_ALLOWED_ACE, SidStart);
866 fprintf( stderr, "ACCESS_ALLOWED_ACE_TYPE,Mask=%x",
867 ((const ACCESS_ALLOWED_ACE *)ace)->Mask );
868 break;
869 case SYSTEM_AUDIT_ACE_TYPE:
870 sid = (const SID *)&((const SYSTEM_AUDIT_ACE *)ace)->SidStart;
871 sid_size = ace->AceSize - FIELD_OFFSET(SYSTEM_AUDIT_ACE, SidStart);
872 fprintf( stderr, "SYSTEM_AUDIT_ACE_TYPE,Mask=%x",
873 ((const SYSTEM_AUDIT_ACE *)ace)->Mask );
874 break;
875 case SYSTEM_ALARM_ACE_TYPE:
876 sid = (const SID *)&((const SYSTEM_ALARM_ACE *)ace)->SidStart;
877 sid_size = ace->AceSize - FIELD_OFFSET(SYSTEM_ALARM_ACE, SidStart);
878 fprintf( stderr, "SYSTEM_ALARM_ACE_TYPE,Mask=%x",
879 ((const SYSTEM_ALARM_ACE *)ace)->Mask );
880 break;
881 default:
882 fprintf( stderr, "unknown<%d>", ace->AceType );
883 break;
885 fprintf( stderr, ",AceFlags=%x", ace->AceFlags );
886 if (sid)
887 dump_inline_sid( ",Sid=", sid, sid_size );
888 ace = (const ACE_HEADER *)((const char *)ace + ace->AceSize);
889 fputc( '}', stderr );
892 fputc( '}', stderr );
895 static void dump_varargs_ACL( const char *prefix, data_size_t size )
897 const ACL *acl = cur_data;
898 dump_inline_acl( prefix, acl, size );
899 remove_data( size );
902 static void dump_inline_security_descriptor( const char *prefix, const struct security_descriptor *sd, data_size_t size )
904 fprintf( stderr,"%s{", prefix );
905 if (size >= sizeof(struct security_descriptor))
907 size_t offset = sizeof(struct security_descriptor);
908 fprintf( stderr, "control=%08x", sd->control );
909 if ((sd->owner_len > FIELD_OFFSET(SID, SubAuthority[255])) || (offset + sd->owner_len > size))
910 return;
911 if (sd->owner_len)
912 dump_inline_sid( ",owner=", (const SID *)((const char *)sd + offset), sd->owner_len );
913 else
914 fprintf( stderr, ",owner=<not present>" );
915 offset += sd->owner_len;
916 if ((sd->group_len > FIELD_OFFSET(SID, SubAuthority[255])) || (offset + sd->group_len > size))
917 return;
918 if (sd->group_len)
919 dump_inline_sid( ",group=", (const SID *)((const char *)sd + offset), sd->group_len );
920 else
921 fprintf( stderr, ",group=<not present>" );
922 offset += sd->group_len;
923 if ((sd->sacl_len >= MAX_ACL_LEN) || (offset + sd->sacl_len > size))
924 return;
925 dump_inline_acl( ",sacl=", (const ACL *)((const char *)sd + offset), sd->sacl_len );
926 offset += sd->sacl_len;
927 if ((sd->dacl_len >= MAX_ACL_LEN) || (offset + sd->dacl_len > size))
928 return;
929 dump_inline_acl( ",dacl=", (const ACL *)((const char *)sd + offset), sd->dacl_len );
930 offset += sd->dacl_len;
932 fputc( '}', stderr );
935 static void dump_varargs_security_descriptor( const char *prefix, data_size_t size )
937 const struct security_descriptor *sd = cur_data;
938 dump_inline_security_descriptor( prefix, sd, size );
939 remove_data( size );
942 static void dump_varargs_token_groups( const char *prefix, data_size_t size )
944 const struct token_groups *tg = cur_data;
946 fprintf( stderr,"%s{", prefix );
947 if (size >= sizeof(struct token_groups))
949 size_t offset = sizeof(*tg);
950 fprintf( stderr, "count=%08x,", tg->count );
951 if (tg->count * sizeof(unsigned int) <= size)
953 unsigned int i;
954 const unsigned int *attr = (const unsigned int *)(tg + 1);
956 offset += tg->count * sizeof(unsigned int);
958 fputc( '[', stderr );
959 for (i = 0; i < tg->count; i++)
961 const SID *sid = (const SID *)((const char *)cur_data + offset);
962 if (i != 0)
963 fputc( ',', stderr );
964 fputc( '{', stderr );
965 fprintf( stderr, "attributes=%08x", attr[i] );
966 dump_inline_sid( ",sid=", sid, size - offset );
967 if ((offset + FIELD_OFFSET(SID, SubAuthority[0]) > size) ||
968 (offset + FIELD_OFFSET(SID, SubAuthority[sid->SubAuthorityCount]) > size))
969 break;
970 offset += FIELD_OFFSET(SID, SubAuthority[sid->SubAuthorityCount]);
971 fputc( '}', stderr );
973 fputc( ']', stderr );
976 fputc( '}', stderr );
979 static void dump_varargs_object_attributes( const char *prefix, data_size_t size )
981 const struct object_attributes *objattr = cur_data;
983 fprintf( stderr,"%s{", prefix );
984 if (size >= sizeof(struct object_attributes))
986 const WCHAR *str;
987 fprintf( stderr, "rootdir=%04x", objattr->rootdir );
988 if (objattr->sd_len > size - sizeof(*objattr) ||
989 objattr->name_len > size - sizeof(*objattr) - objattr->sd_len)
990 return;
991 dump_inline_security_descriptor( ",sd=", (const struct security_descriptor *)(objattr + 1), objattr->sd_len );
992 str = (const WCHAR *)objattr + (sizeof(*objattr) + objattr->sd_len) / sizeof(WCHAR);
993 fprintf( stderr, ",name=L\"" );
994 dump_strW( str, objattr->name_len / sizeof(WCHAR), stderr, "\"\"" );
995 fputc( '\"', stderr );
996 remove_data( ((sizeof(*objattr) + objattr->sd_len) / sizeof(WCHAR)) * sizeof(WCHAR) +
997 objattr->name_len );
999 fputc( '}', stderr );
1002 static void dump_varargs_filesystem_event( const char *prefix, data_size_t size )
1004 static const char * const actions[] = {
1005 NULL,
1006 "ADDED",
1007 "REMOVED",
1008 "MODIFIED",
1009 "RENAMED_OLD_NAME",
1010 "RENAMED_NEW_NAME",
1011 "ADDED_STREAM",
1012 "REMOVED_STREAM",
1013 "MODIFIED_STREAM"
1016 fprintf( stderr,"%s{", prefix );
1017 while (size)
1019 const struct filesystem_event *event = cur_data;
1020 data_size_t len = (offsetof( struct filesystem_event, name[event->len] ) + sizeof(int)-1)
1021 / sizeof(int) * sizeof(int);
1022 if (size < len) break;
1023 if (event->action < sizeof(actions)/sizeof(actions[0]) && actions[event->action])
1024 fprintf( stderr, "{action=%s", actions[event->action] );
1025 else
1026 fprintf( stderr, "{action=%u", event->action );
1027 fprintf( stderr, ",name=\"%.*s\"}", event->len, event->name );
1028 size -= len;
1029 remove_data( len );
1030 if (size)fputc( ',', stderr );
1032 fputc( '}', stderr );
1035 static void dump_varargs_rawinput_devices(const char *prefix, data_size_t size )
1037 const struct rawinput_device *device;
1039 fprintf( stderr, "%s{", prefix );
1040 while (size >= sizeof(*device))
1042 device = cur_data;
1043 fprintf( stderr, "{usage_page=%04x,usage=%04x,flags=%08x,target=%08x}",
1044 device->usage_page, device->usage, device->flags, device->target );
1045 size -= sizeof(*device);
1046 remove_data( sizeof(*device) );
1047 if (size) fputc( ',', stderr );
1049 fputc( '}', stderr );
1052 typedef void (*dump_func)( const void *req );
1054 /* Everything below this line is generated automatically by tools/make_requests */
1055 /* ### make_requests begin ### */
1057 static void dump_new_process_request( const struct new_process_request *req )
1059 fprintf( stderr, " inherit_all=%d", req->inherit_all );
1060 fprintf( stderr, ", create_flags=%08x", req->create_flags );
1061 fprintf( stderr, ", socket_fd=%d", req->socket_fd );
1062 fprintf( stderr, ", exe_file=%04x", req->exe_file );
1063 fprintf( stderr, ", process_access=%08x", req->process_access );
1064 fprintf( stderr, ", process_attr=%08x", req->process_attr );
1065 fprintf( stderr, ", thread_access=%08x", req->thread_access );
1066 fprintf( stderr, ", thread_attr=%08x", req->thread_attr );
1067 fprintf( stderr, ", info_size=%u", req->info_size );
1068 dump_varargs_startup_info( ", info=", min(cur_size,req->info_size) );
1069 dump_varargs_unicode_str( ", env=", cur_size );
1072 static void dump_new_process_reply( const struct new_process_reply *req )
1074 fprintf( stderr, " info=%04x", req->info );
1075 fprintf( stderr, ", pid=%04x", req->pid );
1076 fprintf( stderr, ", phandle=%04x", req->phandle );
1077 fprintf( stderr, ", tid=%04x", req->tid );
1078 fprintf( stderr, ", thandle=%04x", req->thandle );
1081 static void dump_get_new_process_info_request( const struct get_new_process_info_request *req )
1083 fprintf( stderr, " info=%04x", req->info );
1086 static void dump_get_new_process_info_reply( const struct get_new_process_info_reply *req )
1088 fprintf( stderr, " success=%d", req->success );
1089 fprintf( stderr, ", exit_code=%d", req->exit_code );
1092 static void dump_new_thread_request( const struct new_thread_request *req )
1094 fprintf( stderr, " access=%08x", req->access );
1095 fprintf( stderr, ", attributes=%08x", req->attributes );
1096 fprintf( stderr, ", suspend=%d", req->suspend );
1097 fprintf( stderr, ", request_fd=%d", req->request_fd );
1100 static void dump_new_thread_reply( const struct new_thread_reply *req )
1102 fprintf( stderr, " tid=%04x", req->tid );
1103 fprintf( stderr, ", handle=%04x", req->handle );
1106 static void dump_get_startup_info_request( const struct get_startup_info_request *req )
1110 static void dump_get_startup_info_reply( const struct get_startup_info_reply *req )
1112 fprintf( stderr, " exe_file=%04x", req->exe_file );
1113 fprintf( stderr, ", info_size=%u", req->info_size );
1114 dump_varargs_startup_info( ", info=", min(cur_size,req->info_size) );
1115 dump_varargs_unicode_str( ", env=", cur_size );
1118 static void dump_init_process_done_request( const struct init_process_done_request *req )
1120 fprintf( stderr, " gui=%d", req->gui );
1121 dump_uint64( ", module=", &req->module );
1122 dump_uint64( ", ldt_copy=", &req->ldt_copy );
1123 dump_uint64( ", entry=", &req->entry );
1126 static void dump_init_thread_request( const struct init_thread_request *req )
1128 fprintf( stderr, " unix_pid=%d", req->unix_pid );
1129 fprintf( stderr, ", unix_tid=%d", req->unix_tid );
1130 fprintf( stderr, ", debug_level=%d", req->debug_level );
1131 dump_uint64( ", teb=", &req->teb );
1132 dump_uint64( ", entry=", &req->entry );
1133 fprintf( stderr, ", reply_fd=%d", req->reply_fd );
1134 fprintf( stderr, ", wait_fd=%d", req->wait_fd );
1135 dump_cpu_type( ", cpu=", &req->cpu );
1138 static void dump_init_thread_reply( const struct init_thread_reply *req )
1140 fprintf( stderr, " pid=%04x", req->pid );
1141 fprintf( stderr, ", tid=%04x", req->tid );
1142 dump_timeout( ", server_start=", &req->server_start );
1143 fprintf( stderr, ", info_size=%u", req->info_size );
1144 fprintf( stderr, ", version=%d", req->version );
1145 fprintf( stderr, ", all_cpus=%08x", req->all_cpus );
1148 static void dump_terminate_process_request( const struct terminate_process_request *req )
1150 fprintf( stderr, " handle=%04x", req->handle );
1151 fprintf( stderr, ", exit_code=%d", req->exit_code );
1154 static void dump_terminate_process_reply( const struct terminate_process_reply *req )
1156 fprintf( stderr, " self=%d", req->self );
1159 static void dump_terminate_thread_request( const struct terminate_thread_request *req )
1161 fprintf( stderr, " handle=%04x", req->handle );
1162 fprintf( stderr, ", exit_code=%d", req->exit_code );
1165 static void dump_terminate_thread_reply( const struct terminate_thread_reply *req )
1167 fprintf( stderr, " self=%d", req->self );
1168 fprintf( stderr, ", last=%d", req->last );
1171 static void dump_get_process_info_request( const struct get_process_info_request *req )
1173 fprintf( stderr, " handle=%04x", req->handle );
1176 static void dump_get_process_info_reply( const struct get_process_info_reply *req )
1178 fprintf( stderr, " pid=%04x", req->pid );
1179 fprintf( stderr, ", ppid=%04x", req->ppid );
1180 dump_uint64( ", affinity=", &req->affinity );
1181 dump_uint64( ", peb=", &req->peb );
1182 dump_timeout( ", start_time=", &req->start_time );
1183 dump_timeout( ", end_time=", &req->end_time );
1184 fprintf( stderr, ", exit_code=%d", req->exit_code );
1185 fprintf( stderr, ", priority=%d", req->priority );
1186 dump_cpu_type( ", cpu=", &req->cpu );
1187 fprintf( stderr, ", debugger_present=%d", req->debugger_present );
1190 static void dump_set_process_info_request( const struct set_process_info_request *req )
1192 fprintf( stderr, " handle=%04x", req->handle );
1193 fprintf( stderr, ", mask=%d", req->mask );
1194 fprintf( stderr, ", priority=%d", req->priority );
1195 dump_uint64( ", affinity=", &req->affinity );
1198 static void dump_get_thread_info_request( const struct get_thread_info_request *req )
1200 fprintf( stderr, " handle=%04x", req->handle );
1201 fprintf( stderr, ", tid_in=%04x", req->tid_in );
1204 static void dump_get_thread_info_reply( const struct get_thread_info_reply *req )
1206 fprintf( stderr, " pid=%04x", req->pid );
1207 fprintf( stderr, ", tid=%04x", req->tid );
1208 dump_uint64( ", teb=", &req->teb );
1209 dump_uint64( ", affinity=", &req->affinity );
1210 dump_timeout( ", creation_time=", &req->creation_time );
1211 dump_timeout( ", exit_time=", &req->exit_time );
1212 fprintf( stderr, ", exit_code=%d", req->exit_code );
1213 fprintf( stderr, ", priority=%d", req->priority );
1214 fprintf( stderr, ", last=%d", req->last );
1217 static void dump_set_thread_info_request( const struct set_thread_info_request *req )
1219 fprintf( stderr, " handle=%04x", req->handle );
1220 fprintf( stderr, ", mask=%d", req->mask );
1221 fprintf( stderr, ", priority=%d", req->priority );
1222 dump_uint64( ", affinity=", &req->affinity );
1223 fprintf( stderr, ", token=%04x", req->token );
1226 static void dump_get_dll_info_request( const struct get_dll_info_request *req )
1228 fprintf( stderr, " handle=%04x", req->handle );
1229 dump_uint64( ", base_address=", &req->base_address );
1232 static void dump_get_dll_info_reply( const struct get_dll_info_reply *req )
1234 dump_uint64( " entry_point=", &req->entry_point );
1235 fprintf( stderr, ", size=%u", req->size );
1236 fprintf( stderr, ", filename_len=%u", req->filename_len );
1237 dump_varargs_unicode_str( ", filename=", cur_size );
1240 static void dump_suspend_thread_request( const struct suspend_thread_request *req )
1242 fprintf( stderr, " handle=%04x", req->handle );
1245 static void dump_suspend_thread_reply( const struct suspend_thread_reply *req )
1247 fprintf( stderr, " count=%d", req->count );
1250 static void dump_resume_thread_request( const struct resume_thread_request *req )
1252 fprintf( stderr, " handle=%04x", req->handle );
1255 static void dump_resume_thread_reply( const struct resume_thread_reply *req )
1257 fprintf( stderr, " count=%d", req->count );
1260 static void dump_load_dll_request( const struct load_dll_request *req )
1262 fprintf( stderr, " mapping=%04x", req->mapping );
1263 dump_uint64( ", base=", &req->base );
1264 dump_uint64( ", name=", &req->name );
1265 fprintf( stderr, ", size=%u", req->size );
1266 fprintf( stderr, ", dbg_offset=%d", req->dbg_offset );
1267 fprintf( stderr, ", dbg_size=%d", req->dbg_size );
1268 dump_varargs_unicode_str( ", filename=", cur_size );
1271 static void dump_unload_dll_request( const struct unload_dll_request *req )
1273 dump_uint64( " base=", &req->base );
1276 static void dump_queue_apc_request( const struct queue_apc_request *req )
1278 fprintf( stderr, " handle=%04x", req->handle );
1279 dump_apc_call( ", call=", &req->call );
1282 static void dump_queue_apc_reply( const struct queue_apc_reply *req )
1284 fprintf( stderr, " handle=%04x", req->handle );
1285 fprintf( stderr, ", self=%d", req->self );
1288 static void dump_get_apc_result_request( const struct get_apc_result_request *req )
1290 fprintf( stderr, " handle=%04x", req->handle );
1293 static void dump_get_apc_result_reply( const struct get_apc_result_reply *req )
1295 dump_apc_result( " result=", &req->result );
1298 static void dump_close_handle_request( const struct close_handle_request *req )
1300 fprintf( stderr, " handle=%04x", req->handle );
1303 static void dump_set_handle_info_request( const struct set_handle_info_request *req )
1305 fprintf( stderr, " handle=%04x", req->handle );
1306 fprintf( stderr, ", flags=%d", req->flags );
1307 fprintf( stderr, ", mask=%d", req->mask );
1310 static void dump_set_handle_info_reply( const struct set_handle_info_reply *req )
1312 fprintf( stderr, " old_flags=%d", req->old_flags );
1315 static void dump_dup_handle_request( const struct dup_handle_request *req )
1317 fprintf( stderr, " src_process=%04x", req->src_process );
1318 fprintf( stderr, ", src_handle=%04x", req->src_handle );
1319 fprintf( stderr, ", dst_process=%04x", req->dst_process );
1320 fprintf( stderr, ", access=%08x", req->access );
1321 fprintf( stderr, ", attributes=%08x", req->attributes );
1322 fprintf( stderr, ", options=%08x", req->options );
1325 static void dump_dup_handle_reply( const struct dup_handle_reply *req )
1327 fprintf( stderr, " handle=%04x", req->handle );
1328 fprintf( stderr, ", self=%d", req->self );
1329 fprintf( stderr, ", closed=%d", req->closed );
1332 static void dump_open_process_request( const struct open_process_request *req )
1334 fprintf( stderr, " pid=%04x", req->pid );
1335 fprintf( stderr, ", access=%08x", req->access );
1336 fprintf( stderr, ", attributes=%08x", req->attributes );
1339 static void dump_open_process_reply( const struct open_process_reply *req )
1341 fprintf( stderr, " handle=%04x", req->handle );
1344 static void dump_open_thread_request( const struct open_thread_request *req )
1346 fprintf( stderr, " tid=%04x", req->tid );
1347 fprintf( stderr, ", access=%08x", req->access );
1348 fprintf( stderr, ", attributes=%08x", req->attributes );
1351 static void dump_open_thread_reply( const struct open_thread_reply *req )
1353 fprintf( stderr, " handle=%04x", req->handle );
1356 static void dump_select_request( const struct select_request *req )
1358 fprintf( stderr, " flags=%d", req->flags );
1359 dump_uint64( ", cookie=", &req->cookie );
1360 fprintf( stderr, ", signal=%04x", req->signal );
1361 fprintf( stderr, ", prev_apc=%04x", req->prev_apc );
1362 dump_timeout( ", timeout=", &req->timeout );
1363 dump_varargs_apc_result( ", result=", cur_size );
1364 dump_varargs_handles( ", handles=", cur_size );
1367 static void dump_select_reply( const struct select_reply *req )
1369 dump_timeout( " timeout=", &req->timeout );
1370 dump_apc_call( ", call=", &req->call );
1371 fprintf( stderr, ", apc_handle=%04x", req->apc_handle );
1374 static void dump_create_event_request( const struct create_event_request *req )
1376 fprintf( stderr, " access=%08x", req->access );
1377 fprintf( stderr, ", attributes=%08x", req->attributes );
1378 fprintf( stderr, ", manual_reset=%d", req->manual_reset );
1379 fprintf( stderr, ", initial_state=%d", req->initial_state );
1380 dump_varargs_object_attributes( ", objattr=", cur_size );
1383 static void dump_create_event_reply( const struct create_event_reply *req )
1385 fprintf( stderr, " handle=%04x", req->handle );
1388 static void dump_event_op_request( const struct event_op_request *req )
1390 fprintf( stderr, " handle=%04x", req->handle );
1391 fprintf( stderr, ", op=%d", req->op );
1394 static void dump_open_event_request( const struct open_event_request *req )
1396 fprintf( stderr, " access=%08x", req->access );
1397 fprintf( stderr, ", attributes=%08x", req->attributes );
1398 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1399 dump_varargs_unicode_str( ", name=", cur_size );
1402 static void dump_open_event_reply( const struct open_event_reply *req )
1404 fprintf( stderr, " handle=%04x", req->handle );
1407 static void dump_create_mutex_request( const struct create_mutex_request *req )
1409 fprintf( stderr, " access=%08x", req->access );
1410 fprintf( stderr, ", attributes=%08x", req->attributes );
1411 fprintf( stderr, ", owned=%d", req->owned );
1412 dump_varargs_object_attributes( ", objattr=", cur_size );
1415 static void dump_create_mutex_reply( const struct create_mutex_reply *req )
1417 fprintf( stderr, " handle=%04x", req->handle );
1420 static void dump_release_mutex_request( const struct release_mutex_request *req )
1422 fprintf( stderr, " handle=%04x", req->handle );
1425 static void dump_release_mutex_reply( const struct release_mutex_reply *req )
1427 fprintf( stderr, " prev_count=%08x", req->prev_count );
1430 static void dump_open_mutex_request( const struct open_mutex_request *req )
1432 fprintf( stderr, " access=%08x", req->access );
1433 fprintf( stderr, ", attributes=%08x", req->attributes );
1434 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1435 dump_varargs_unicode_str( ", name=", cur_size );
1438 static void dump_open_mutex_reply( const struct open_mutex_reply *req )
1440 fprintf( stderr, " handle=%04x", req->handle );
1443 static void dump_create_semaphore_request( const struct create_semaphore_request *req )
1445 fprintf( stderr, " access=%08x", req->access );
1446 fprintf( stderr, ", attributes=%08x", req->attributes );
1447 fprintf( stderr, ", initial=%08x", req->initial );
1448 fprintf( stderr, ", max=%08x", req->max );
1449 dump_varargs_object_attributes( ", objattr=", cur_size );
1452 static void dump_create_semaphore_reply( const struct create_semaphore_reply *req )
1454 fprintf( stderr, " handle=%04x", req->handle );
1457 static void dump_release_semaphore_request( const struct release_semaphore_request *req )
1459 fprintf( stderr, " handle=%04x", req->handle );
1460 fprintf( stderr, ", count=%08x", req->count );
1463 static void dump_release_semaphore_reply( const struct release_semaphore_reply *req )
1465 fprintf( stderr, " prev_count=%08x", req->prev_count );
1468 static void dump_open_semaphore_request( const struct open_semaphore_request *req )
1470 fprintf( stderr, " access=%08x", req->access );
1471 fprintf( stderr, ", attributes=%08x", req->attributes );
1472 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1473 dump_varargs_unicode_str( ", name=", cur_size );
1476 static void dump_open_semaphore_reply( const struct open_semaphore_reply *req )
1478 fprintf( stderr, " handle=%04x", req->handle );
1481 static void dump_create_file_request( const struct create_file_request *req )
1483 fprintf( stderr, " access=%08x", req->access );
1484 fprintf( stderr, ", attributes=%08x", req->attributes );
1485 fprintf( stderr, ", sharing=%08x", req->sharing );
1486 fprintf( stderr, ", create=%d", req->create );
1487 fprintf( stderr, ", options=%08x", req->options );
1488 fprintf( stderr, ", attrs=%08x", req->attrs );
1489 dump_varargs_object_attributes( ", objattr=", cur_size );
1490 dump_varargs_string( ", filename=", cur_size );
1493 static void dump_create_file_reply( const struct create_file_reply *req )
1495 fprintf( stderr, " handle=%04x", req->handle );
1498 static void dump_open_file_object_request( const struct open_file_object_request *req )
1500 fprintf( stderr, " access=%08x", req->access );
1501 fprintf( stderr, ", attributes=%08x", req->attributes );
1502 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1503 fprintf( stderr, ", sharing=%08x", req->sharing );
1504 fprintf( stderr, ", options=%08x", req->options );
1505 dump_varargs_unicode_str( ", filename=", cur_size );
1508 static void dump_open_file_object_reply( const struct open_file_object_reply *req )
1510 fprintf( stderr, " handle=%04x", req->handle );
1513 static void dump_alloc_file_handle_request( const struct alloc_file_handle_request *req )
1515 fprintf( stderr, " access=%08x", req->access );
1516 fprintf( stderr, ", attributes=%08x", req->attributes );
1517 fprintf( stderr, ", fd=%d", req->fd );
1520 static void dump_alloc_file_handle_reply( const struct alloc_file_handle_reply *req )
1522 fprintf( stderr, " handle=%04x", req->handle );
1525 static void dump_get_handle_unix_name_request( const struct get_handle_unix_name_request *req )
1527 fprintf( stderr, " handle=%04x", req->handle );
1530 static void dump_get_handle_unix_name_reply( const struct get_handle_unix_name_reply *req )
1532 fprintf( stderr, " name_len=%u", req->name_len );
1533 dump_varargs_string( ", name=", cur_size );
1536 static void dump_get_handle_fd_request( const struct get_handle_fd_request *req )
1538 fprintf( stderr, " handle=%04x", req->handle );
1541 static void dump_get_handle_fd_reply( const struct get_handle_fd_reply *req )
1543 fprintf( stderr, " type=%d", req->type );
1544 fprintf( stderr, ", cacheable=%d", req->cacheable );
1545 fprintf( stderr, ", access=%08x", req->access );
1546 fprintf( stderr, ", options=%08x", req->options );
1549 static void dump_flush_file_request( const struct flush_file_request *req )
1551 fprintf( stderr, " handle=%04x", req->handle );
1554 static void dump_flush_file_reply( const struct flush_file_reply *req )
1556 fprintf( stderr, " event=%04x", req->event );
1559 static void dump_lock_file_request( const struct lock_file_request *req )
1561 fprintf( stderr, " handle=%04x", req->handle );
1562 dump_uint64( ", offset=", &req->offset );
1563 dump_uint64( ", count=", &req->count );
1564 fprintf( stderr, ", shared=%d", req->shared );
1565 fprintf( stderr, ", wait=%d", req->wait );
1568 static void dump_lock_file_reply( const struct lock_file_reply *req )
1570 fprintf( stderr, " handle=%04x", req->handle );
1571 fprintf( stderr, ", overlapped=%d", req->overlapped );
1574 static void dump_unlock_file_request( const struct unlock_file_request *req )
1576 fprintf( stderr, " handle=%04x", req->handle );
1577 dump_uint64( ", offset=", &req->offset );
1578 dump_uint64( ", count=", &req->count );
1581 static void dump_create_socket_request( const struct create_socket_request *req )
1583 fprintf( stderr, " access=%08x", req->access );
1584 fprintf( stderr, ", attributes=%08x", req->attributes );
1585 fprintf( stderr, ", family=%d", req->family );
1586 fprintf( stderr, ", type=%d", req->type );
1587 fprintf( stderr, ", protocol=%d", req->protocol );
1588 fprintf( stderr, ", flags=%08x", req->flags );
1591 static void dump_create_socket_reply( const struct create_socket_reply *req )
1593 fprintf( stderr, " handle=%04x", req->handle );
1596 static void dump_accept_socket_request( const struct accept_socket_request *req )
1598 fprintf( stderr, " lhandle=%04x", req->lhandle );
1599 fprintf( stderr, ", access=%08x", req->access );
1600 fprintf( stderr, ", attributes=%08x", req->attributes );
1603 static void dump_accept_socket_reply( const struct accept_socket_reply *req )
1605 fprintf( stderr, " handle=%04x", req->handle );
1608 static void dump_accept_into_socket_request( const struct accept_into_socket_request *req )
1610 fprintf( stderr, " lhandle=%04x", req->lhandle );
1611 fprintf( stderr, ", ahandle=%04x", req->ahandle );
1614 static void dump_set_socket_event_request( const struct set_socket_event_request *req )
1616 fprintf( stderr, " handle=%04x", req->handle );
1617 fprintf( stderr, ", mask=%08x", req->mask );
1618 fprintf( stderr, ", event=%04x", req->event );
1619 fprintf( stderr, ", window=%08x", req->window );
1620 fprintf( stderr, ", msg=%08x", req->msg );
1623 static void dump_get_socket_event_request( const struct get_socket_event_request *req )
1625 fprintf( stderr, " handle=%04x", req->handle );
1626 fprintf( stderr, ", service=%d", req->service );
1627 fprintf( stderr, ", c_event=%04x", req->c_event );
1630 static void dump_get_socket_event_reply( const struct get_socket_event_reply *req )
1632 fprintf( stderr, " mask=%08x", req->mask );
1633 fprintf( stderr, ", pmask=%08x", req->pmask );
1634 fprintf( stderr, ", state=%08x", req->state );
1635 dump_varargs_ints( ", errors=", cur_size );
1638 static void dump_enable_socket_event_request( const struct enable_socket_event_request *req )
1640 fprintf( stderr, " handle=%04x", req->handle );
1641 fprintf( stderr, ", mask=%08x", req->mask );
1642 fprintf( stderr, ", sstate=%08x", req->sstate );
1643 fprintf( stderr, ", cstate=%08x", req->cstate );
1646 static void dump_set_socket_deferred_request( const struct set_socket_deferred_request *req )
1648 fprintf( stderr, " handle=%04x", req->handle );
1649 fprintf( stderr, ", deferred=%04x", req->deferred );
1652 static void dump_alloc_console_request( const struct alloc_console_request *req )
1654 fprintf( stderr, " access=%08x", req->access );
1655 fprintf( stderr, ", attributes=%08x", req->attributes );
1656 fprintf( stderr, ", pid=%04x", req->pid );
1657 fprintf( stderr, ", input_fd=%d", req->input_fd );
1660 static void dump_alloc_console_reply( const struct alloc_console_reply *req )
1662 fprintf( stderr, " handle_in=%04x", req->handle_in );
1663 fprintf( stderr, ", event=%04x", req->event );
1666 static void dump_free_console_request( const struct free_console_request *req )
1670 static void dump_get_console_renderer_events_request( const struct get_console_renderer_events_request *req )
1672 fprintf( stderr, " handle=%04x", req->handle );
1675 static void dump_get_console_renderer_events_reply( const struct get_console_renderer_events_reply *req )
1677 dump_varargs_bytes( " data=", cur_size );
1680 static void dump_open_console_request( const struct open_console_request *req )
1682 fprintf( stderr, " from=%04x", req->from );
1683 fprintf( stderr, ", access=%08x", req->access );
1684 fprintf( stderr, ", attributes=%08x", req->attributes );
1685 fprintf( stderr, ", share=%d", req->share );
1688 static void dump_open_console_reply( const struct open_console_reply *req )
1690 fprintf( stderr, " handle=%04x", req->handle );
1693 static void dump_get_console_wait_event_request( const struct get_console_wait_event_request *req )
1697 static void dump_get_console_wait_event_reply( const struct get_console_wait_event_reply *req )
1699 fprintf( stderr, " handle=%04x", req->handle );
1702 static void dump_get_console_mode_request( const struct get_console_mode_request *req )
1704 fprintf( stderr, " handle=%04x", req->handle );
1707 static void dump_get_console_mode_reply( const struct get_console_mode_reply *req )
1709 fprintf( stderr, " mode=%d", req->mode );
1712 static void dump_set_console_mode_request( const struct set_console_mode_request *req )
1714 fprintf( stderr, " handle=%04x", req->handle );
1715 fprintf( stderr, ", mode=%d", req->mode );
1718 static void dump_set_console_input_info_request( const struct set_console_input_info_request *req )
1720 fprintf( stderr, " handle=%04x", req->handle );
1721 fprintf( stderr, ", mask=%d", req->mask );
1722 fprintf( stderr, ", active_sb=%04x", req->active_sb );
1723 fprintf( stderr, ", history_mode=%d", req->history_mode );
1724 fprintf( stderr, ", history_size=%d", req->history_size );
1725 fprintf( stderr, ", edition_mode=%d", req->edition_mode );
1726 fprintf( stderr, ", input_cp=%d", req->input_cp );
1727 fprintf( stderr, ", output_cp=%d", req->output_cp );
1728 fprintf( stderr, ", win=%08x", req->win );
1729 dump_varargs_unicode_str( ", title=", cur_size );
1732 static void dump_get_console_input_info_request( const struct get_console_input_info_request *req )
1734 fprintf( stderr, " handle=%04x", req->handle );
1737 static void dump_get_console_input_info_reply( const struct get_console_input_info_reply *req )
1739 fprintf( stderr, " history_mode=%d", req->history_mode );
1740 fprintf( stderr, ", history_size=%d", req->history_size );
1741 fprintf( stderr, ", history_index=%d", req->history_index );
1742 fprintf( stderr, ", edition_mode=%d", req->edition_mode );
1743 fprintf( stderr, ", input_cp=%d", req->input_cp );
1744 fprintf( stderr, ", output_cp=%d", req->output_cp );
1745 fprintf( stderr, ", win=%08x", req->win );
1746 dump_varargs_unicode_str( ", title=", cur_size );
1749 static void dump_append_console_input_history_request( const struct append_console_input_history_request *req )
1751 fprintf( stderr, " handle=%04x", req->handle );
1752 dump_varargs_unicode_str( ", line=", cur_size );
1755 static void dump_get_console_input_history_request( const struct get_console_input_history_request *req )
1757 fprintf( stderr, " handle=%04x", req->handle );
1758 fprintf( stderr, ", index=%d", req->index );
1761 static void dump_get_console_input_history_reply( const struct get_console_input_history_reply *req )
1763 fprintf( stderr, " total=%d", req->total );
1764 dump_varargs_unicode_str( ", line=", cur_size );
1767 static void dump_create_console_output_request( const struct create_console_output_request *req )
1769 fprintf( stderr, " handle_in=%04x", req->handle_in );
1770 fprintf( stderr, ", access=%08x", req->access );
1771 fprintf( stderr, ", attributes=%08x", req->attributes );
1772 fprintf( stderr, ", share=%08x", req->share );
1773 fprintf( stderr, ", fd=%d", req->fd );
1776 static void dump_create_console_output_reply( const struct create_console_output_reply *req )
1778 fprintf( stderr, " handle_out=%04x", req->handle_out );
1781 static void dump_set_console_output_info_request( const struct set_console_output_info_request *req )
1783 fprintf( stderr, " handle=%04x", req->handle );
1784 fprintf( stderr, ", mask=%d", req->mask );
1785 fprintf( stderr, ", cursor_size=%d", req->cursor_size );
1786 fprintf( stderr, ", cursor_visible=%d", req->cursor_visible );
1787 fprintf( stderr, ", cursor_x=%d", req->cursor_x );
1788 fprintf( stderr, ", cursor_y=%d", req->cursor_y );
1789 fprintf( stderr, ", width=%d", req->width );
1790 fprintf( stderr, ", height=%d", req->height );
1791 fprintf( stderr, ", attr=%d", req->attr );
1792 fprintf( stderr, ", win_left=%d", req->win_left );
1793 fprintf( stderr, ", win_top=%d", req->win_top );
1794 fprintf( stderr, ", win_right=%d", req->win_right );
1795 fprintf( stderr, ", win_bottom=%d", req->win_bottom );
1796 fprintf( stderr, ", max_width=%d", req->max_width );
1797 fprintf( stderr, ", max_height=%d", req->max_height );
1800 static void dump_get_console_output_info_request( const struct get_console_output_info_request *req )
1802 fprintf( stderr, " handle=%04x", req->handle );
1805 static void dump_get_console_output_info_reply( const struct get_console_output_info_reply *req )
1807 fprintf( stderr, " cursor_size=%d", req->cursor_size );
1808 fprintf( stderr, ", cursor_visible=%d", req->cursor_visible );
1809 fprintf( stderr, ", cursor_x=%d", req->cursor_x );
1810 fprintf( stderr, ", cursor_y=%d", req->cursor_y );
1811 fprintf( stderr, ", width=%d", req->width );
1812 fprintf( stderr, ", height=%d", req->height );
1813 fprintf( stderr, ", attr=%d", req->attr );
1814 fprintf( stderr, ", win_left=%d", req->win_left );
1815 fprintf( stderr, ", win_top=%d", req->win_top );
1816 fprintf( stderr, ", win_right=%d", req->win_right );
1817 fprintf( stderr, ", win_bottom=%d", req->win_bottom );
1818 fprintf( stderr, ", max_width=%d", req->max_width );
1819 fprintf( stderr, ", max_height=%d", req->max_height );
1822 static void dump_write_console_input_request( const struct write_console_input_request *req )
1824 fprintf( stderr, " handle=%04x", req->handle );
1825 dump_varargs_input_records( ", rec=", cur_size );
1828 static void dump_write_console_input_reply( const struct write_console_input_reply *req )
1830 fprintf( stderr, " written=%d", req->written );
1833 static void dump_read_console_input_request( const struct read_console_input_request *req )
1835 fprintf( stderr, " handle=%04x", req->handle );
1836 fprintf( stderr, ", flush=%d", req->flush );
1839 static void dump_read_console_input_reply( const struct read_console_input_reply *req )
1841 fprintf( stderr, " read=%d", req->read );
1842 dump_varargs_input_records( ", rec=", cur_size );
1845 static void dump_write_console_output_request( const struct write_console_output_request *req )
1847 fprintf( stderr, " handle=%04x", req->handle );
1848 fprintf( stderr, ", x=%d", req->x );
1849 fprintf( stderr, ", y=%d", req->y );
1850 fprintf( stderr, ", mode=%d", req->mode );
1851 fprintf( stderr, ", wrap=%d", req->wrap );
1852 dump_varargs_bytes( ", data=", cur_size );
1855 static void dump_write_console_output_reply( const struct write_console_output_reply *req )
1857 fprintf( stderr, " written=%d", req->written );
1858 fprintf( stderr, ", width=%d", req->width );
1859 fprintf( stderr, ", height=%d", req->height );
1862 static void dump_fill_console_output_request( const struct fill_console_output_request *req )
1864 fprintf( stderr, " handle=%04x", req->handle );
1865 fprintf( stderr, ", x=%d", req->x );
1866 fprintf( stderr, ", y=%d", req->y );
1867 fprintf( stderr, ", mode=%d", req->mode );
1868 fprintf( stderr, ", count=%d", req->count );
1869 fprintf( stderr, ", wrap=%d", req->wrap );
1870 dump_char_info( ", data=", &req->data );
1873 static void dump_fill_console_output_reply( const struct fill_console_output_reply *req )
1875 fprintf( stderr, " written=%d", req->written );
1878 static void dump_read_console_output_request( const struct read_console_output_request *req )
1880 fprintf( stderr, " handle=%04x", req->handle );
1881 fprintf( stderr, ", x=%d", req->x );
1882 fprintf( stderr, ", y=%d", req->y );
1883 fprintf( stderr, ", mode=%d", req->mode );
1884 fprintf( stderr, ", wrap=%d", req->wrap );
1887 static void dump_read_console_output_reply( const struct read_console_output_reply *req )
1889 fprintf( stderr, " width=%d", req->width );
1890 fprintf( stderr, ", height=%d", req->height );
1891 dump_varargs_bytes( ", data=", cur_size );
1894 static void dump_move_console_output_request( const struct move_console_output_request *req )
1896 fprintf( stderr, " handle=%04x", req->handle );
1897 fprintf( stderr, ", x_src=%d", req->x_src );
1898 fprintf( stderr, ", y_src=%d", req->y_src );
1899 fprintf( stderr, ", x_dst=%d", req->x_dst );
1900 fprintf( stderr, ", y_dst=%d", req->y_dst );
1901 fprintf( stderr, ", w=%d", req->w );
1902 fprintf( stderr, ", h=%d", req->h );
1905 static void dump_send_console_signal_request( const struct send_console_signal_request *req )
1907 fprintf( stderr, " signal=%d", req->signal );
1908 fprintf( stderr, ", group_id=%04x", req->group_id );
1911 static void dump_read_directory_changes_request( const struct read_directory_changes_request *req )
1913 fprintf( stderr, " filter=%08x", req->filter );
1914 fprintf( stderr, ", subtree=%d", req->subtree );
1915 fprintf( stderr, ", want_data=%d", req->want_data );
1916 dump_async_data( ", async=", &req->async );
1919 static void dump_read_change_request( const struct read_change_request *req )
1921 fprintf( stderr, " handle=%04x", req->handle );
1924 static void dump_read_change_reply( const struct read_change_reply *req )
1926 dump_varargs_filesystem_event( " events=", cur_size );
1929 static void dump_create_mapping_request( const struct create_mapping_request *req )
1931 fprintf( stderr, " access=%08x", req->access );
1932 fprintf( stderr, ", attributes=%08x", req->attributes );
1933 fprintf( stderr, ", protect=%08x", req->protect );
1934 dump_uint64( ", size=", &req->size );
1935 fprintf( stderr, ", file_handle=%04x", req->file_handle );
1936 dump_varargs_object_attributes( ", objattr=", cur_size );
1939 static void dump_create_mapping_reply( const struct create_mapping_reply *req )
1941 fprintf( stderr, " handle=%04x", req->handle );
1944 static void dump_open_mapping_request( const struct open_mapping_request *req )
1946 fprintf( stderr, " access=%08x", req->access );
1947 fprintf( stderr, ", attributes=%08x", req->attributes );
1948 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1949 dump_varargs_unicode_str( ", name=", cur_size );
1952 static void dump_open_mapping_reply( const struct open_mapping_reply *req )
1954 fprintf( stderr, " handle=%04x", req->handle );
1957 static void dump_get_mapping_info_request( const struct get_mapping_info_request *req )
1959 fprintf( stderr, " handle=%04x", req->handle );
1960 fprintf( stderr, ", access=%08x", req->access );
1963 static void dump_get_mapping_info_reply( const struct get_mapping_info_reply *req )
1965 dump_uint64( " size=", &req->size );
1966 fprintf( stderr, ", protect=%d", req->protect );
1967 fprintf( stderr, ", header_size=%d", req->header_size );
1968 dump_uint64( ", base=", &req->base );
1969 fprintf( stderr, ", mapping=%04x", req->mapping );
1970 fprintf( stderr, ", shared_file=%04x", req->shared_file );
1973 static void dump_get_mapping_committed_range_request( const struct get_mapping_committed_range_request *req )
1975 fprintf( stderr, " handle=%04x", req->handle );
1976 dump_uint64( ", offset=", &req->offset );
1979 static void dump_get_mapping_committed_range_reply( const struct get_mapping_committed_range_reply *req )
1981 dump_uint64( " size=", &req->size );
1982 fprintf( stderr, ", committed=%d", req->committed );
1985 static void dump_add_mapping_committed_range_request( const struct add_mapping_committed_range_request *req )
1987 fprintf( stderr, " handle=%04x", req->handle );
1988 dump_uint64( ", offset=", &req->offset );
1989 dump_uint64( ", size=", &req->size );
1992 static void dump_create_snapshot_request( const struct create_snapshot_request *req )
1994 fprintf( stderr, " attributes=%08x", req->attributes );
1995 fprintf( stderr, ", flags=%08x", req->flags );
1998 static void dump_create_snapshot_reply( const struct create_snapshot_reply *req )
2000 fprintf( stderr, " handle=%04x", req->handle );
2003 static void dump_next_process_request( const struct next_process_request *req )
2005 fprintf( stderr, " handle=%04x", req->handle );
2006 fprintf( stderr, ", reset=%d", req->reset );
2009 static void dump_next_process_reply( const struct next_process_reply *req )
2011 fprintf( stderr, " count=%d", req->count );
2012 fprintf( stderr, ", pid=%04x", req->pid );
2013 fprintf( stderr, ", ppid=%04x", req->ppid );
2014 fprintf( stderr, ", threads=%d", req->threads );
2015 fprintf( stderr, ", priority=%d", req->priority );
2016 fprintf( stderr, ", handles=%d", req->handles );
2017 fprintf( stderr, ", unix_pid=%d", req->unix_pid );
2018 dump_varargs_unicode_str( ", filename=", cur_size );
2021 static void dump_next_thread_request( const struct next_thread_request *req )
2023 fprintf( stderr, " handle=%04x", req->handle );
2024 fprintf( stderr, ", reset=%d", req->reset );
2027 static void dump_next_thread_reply( const struct next_thread_reply *req )
2029 fprintf( stderr, " count=%d", req->count );
2030 fprintf( stderr, ", pid=%04x", req->pid );
2031 fprintf( stderr, ", tid=%04x", req->tid );
2032 fprintf( stderr, ", base_pri=%d", req->base_pri );
2033 fprintf( stderr, ", delta_pri=%d", req->delta_pri );
2036 static void dump_wait_debug_event_request( const struct wait_debug_event_request *req )
2038 fprintf( stderr, " get_handle=%d", req->get_handle );
2041 static void dump_wait_debug_event_reply( const struct wait_debug_event_reply *req )
2043 fprintf( stderr, " pid=%04x", req->pid );
2044 fprintf( stderr, ", tid=%04x", req->tid );
2045 fprintf( stderr, ", wait=%04x", req->wait );
2046 dump_varargs_debug_event( ", event=", cur_size );
2049 static void dump_queue_exception_event_request( const struct queue_exception_event_request *req )
2051 fprintf( stderr, " first=%d", req->first );
2052 fprintf( stderr, ", code=%08x", req->code );
2053 fprintf( stderr, ", flags=%08x", req->flags );
2054 dump_uint64( ", record=", &req->record );
2055 dump_uint64( ", address=", &req->address );
2056 fprintf( stderr, ", len=%u", req->len );
2057 dump_varargs_uints64( ", params=", min(cur_size,req->len) );
2058 dump_varargs_context( ", context=", cur_size );
2061 static void dump_queue_exception_event_reply( const struct queue_exception_event_reply *req )
2063 fprintf( stderr, " handle=%04x", req->handle );
2066 static void dump_get_exception_status_request( const struct get_exception_status_request *req )
2068 fprintf( stderr, " handle=%04x", req->handle );
2071 static void dump_get_exception_status_reply( const struct get_exception_status_reply *req )
2073 dump_varargs_context( " context=", cur_size );
2076 static void dump_output_debug_string_request( const struct output_debug_string_request *req )
2078 fprintf( stderr, " length=%u", req->length );
2079 dump_uint64( ", string=", &req->string );
2082 static void dump_continue_debug_event_request( const struct continue_debug_event_request *req )
2084 fprintf( stderr, " pid=%04x", req->pid );
2085 fprintf( stderr, ", tid=%04x", req->tid );
2086 fprintf( stderr, ", status=%d", req->status );
2089 static void dump_debug_process_request( const struct debug_process_request *req )
2091 fprintf( stderr, " pid=%04x", req->pid );
2092 fprintf( stderr, ", attach=%d", req->attach );
2095 static void dump_debug_break_request( const struct debug_break_request *req )
2097 fprintf( stderr, " handle=%04x", req->handle );
2100 static void dump_debug_break_reply( const struct debug_break_reply *req )
2102 fprintf( stderr, " self=%d", req->self );
2105 static void dump_set_debugger_kill_on_exit_request( const struct set_debugger_kill_on_exit_request *req )
2107 fprintf( stderr, " kill_on_exit=%d", req->kill_on_exit );
2110 static void dump_read_process_memory_request( const struct read_process_memory_request *req )
2112 fprintf( stderr, " handle=%04x", req->handle );
2113 dump_uint64( ", addr=", &req->addr );
2116 static void dump_read_process_memory_reply( const struct read_process_memory_reply *req )
2118 dump_varargs_bytes( " data=", cur_size );
2121 static void dump_write_process_memory_request( const struct write_process_memory_request *req )
2123 fprintf( stderr, " handle=%04x", req->handle );
2124 dump_uint64( ", addr=", &req->addr );
2125 dump_varargs_bytes( ", data=", cur_size );
2128 static void dump_create_key_request( const struct create_key_request *req )
2130 fprintf( stderr, " parent=%04x", req->parent );
2131 fprintf( stderr, ", access=%08x", req->access );
2132 fprintf( stderr, ", attributes=%08x", req->attributes );
2133 fprintf( stderr, ", options=%08x", req->options );
2134 fprintf( stderr, ", namelen=%u", req->namelen );
2135 dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
2136 dump_varargs_unicode_str( ", class=", cur_size );
2139 static void dump_create_key_reply( const struct create_key_reply *req )
2141 fprintf( stderr, " hkey=%04x", req->hkey );
2142 fprintf( stderr, ", created=%d", req->created );
2145 static void dump_open_key_request( const struct open_key_request *req )
2147 fprintf( stderr, " parent=%04x", req->parent );
2148 fprintf( stderr, ", access=%08x", req->access );
2149 fprintf( stderr, ", attributes=%08x", req->attributes );
2150 dump_varargs_unicode_str( ", name=", cur_size );
2153 static void dump_open_key_reply( const struct open_key_reply *req )
2155 fprintf( stderr, " hkey=%04x", req->hkey );
2158 static void dump_delete_key_request( const struct delete_key_request *req )
2160 fprintf( stderr, " hkey=%04x", req->hkey );
2163 static void dump_flush_key_request( const struct flush_key_request *req )
2165 fprintf( stderr, " hkey=%04x", req->hkey );
2168 static void dump_enum_key_request( const struct enum_key_request *req )
2170 fprintf( stderr, " hkey=%04x", req->hkey );
2171 fprintf( stderr, ", index=%d", req->index );
2172 fprintf( stderr, ", info_class=%d", req->info_class );
2175 static void dump_enum_key_reply( const struct enum_key_reply *req )
2177 fprintf( stderr, " subkeys=%d", req->subkeys );
2178 fprintf( stderr, ", max_subkey=%d", req->max_subkey );
2179 fprintf( stderr, ", max_class=%d", req->max_class );
2180 fprintf( stderr, ", values=%d", req->values );
2181 fprintf( stderr, ", max_value=%d", req->max_value );
2182 fprintf( stderr, ", max_data=%d", req->max_data );
2183 dump_timeout( ", modif=", &req->modif );
2184 fprintf( stderr, ", total=%u", req->total );
2185 fprintf( stderr, ", namelen=%u", req->namelen );
2186 dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
2187 dump_varargs_unicode_str( ", class=", cur_size );
2190 static void dump_set_key_value_request( const struct set_key_value_request *req )
2192 fprintf( stderr, " hkey=%04x", req->hkey );
2193 fprintf( stderr, ", type=%d", req->type );
2194 fprintf( stderr, ", namelen=%u", req->namelen );
2195 dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
2196 dump_varargs_bytes( ", data=", cur_size );
2199 static void dump_get_key_value_request( const struct get_key_value_request *req )
2201 fprintf( stderr, " hkey=%04x", req->hkey );
2202 dump_varargs_unicode_str( ", name=", cur_size );
2205 static void dump_get_key_value_reply( const struct get_key_value_reply *req )
2207 fprintf( stderr, " type=%d", req->type );
2208 fprintf( stderr, ", total=%u", req->total );
2209 dump_varargs_bytes( ", data=", cur_size );
2212 static void dump_enum_key_value_request( const struct enum_key_value_request *req )
2214 fprintf( stderr, " hkey=%04x", req->hkey );
2215 fprintf( stderr, ", index=%d", req->index );
2216 fprintf( stderr, ", info_class=%d", req->info_class );
2219 static void dump_enum_key_value_reply( const struct enum_key_value_reply *req )
2221 fprintf( stderr, " type=%d", req->type );
2222 fprintf( stderr, ", total=%u", req->total );
2223 fprintf( stderr, ", namelen=%u", req->namelen );
2224 dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
2225 dump_varargs_bytes( ", data=", cur_size );
2228 static void dump_delete_key_value_request( const struct delete_key_value_request *req )
2230 fprintf( stderr, " hkey=%04x", req->hkey );
2231 dump_varargs_unicode_str( ", name=", cur_size );
2234 static void dump_load_registry_request( const struct load_registry_request *req )
2236 fprintf( stderr, " hkey=%04x", req->hkey );
2237 fprintf( stderr, ", file=%04x", req->file );
2238 dump_varargs_unicode_str( ", name=", cur_size );
2241 static void dump_unload_registry_request( const struct unload_registry_request *req )
2243 fprintf( stderr, " hkey=%04x", req->hkey );
2246 static void dump_save_registry_request( const struct save_registry_request *req )
2248 fprintf( stderr, " hkey=%04x", req->hkey );
2249 fprintf( stderr, ", file=%04x", req->file );
2252 static void dump_set_registry_notification_request( const struct set_registry_notification_request *req )
2254 fprintf( stderr, " hkey=%04x", req->hkey );
2255 fprintf( stderr, ", event=%04x", req->event );
2256 fprintf( stderr, ", subtree=%d", req->subtree );
2257 fprintf( stderr, ", filter=%08x", req->filter );
2260 static void dump_create_timer_request( const struct create_timer_request *req )
2262 fprintf( stderr, " access=%08x", req->access );
2263 fprintf( stderr, ", attributes=%08x", req->attributes );
2264 fprintf( stderr, ", rootdir=%04x", req->rootdir );
2265 fprintf( stderr, ", manual=%d", req->manual );
2266 dump_varargs_unicode_str( ", name=", cur_size );
2269 static void dump_create_timer_reply( const struct create_timer_reply *req )
2271 fprintf( stderr, " handle=%04x", req->handle );
2274 static void dump_open_timer_request( const struct open_timer_request *req )
2276 fprintf( stderr, " access=%08x", req->access );
2277 fprintf( stderr, ", attributes=%08x", req->attributes );
2278 fprintf( stderr, ", rootdir=%04x", req->rootdir );
2279 dump_varargs_unicode_str( ", name=", cur_size );
2282 static void dump_open_timer_reply( const struct open_timer_reply *req )
2284 fprintf( stderr, " handle=%04x", req->handle );
2287 static void dump_set_timer_request( const struct set_timer_request *req )
2289 fprintf( stderr, " handle=%04x", req->handle );
2290 dump_timeout( ", expire=", &req->expire );
2291 dump_uint64( ", callback=", &req->callback );
2292 dump_uint64( ", arg=", &req->arg );
2293 fprintf( stderr, ", period=%d", req->period );
2296 static void dump_set_timer_reply( const struct set_timer_reply *req )
2298 fprintf( stderr, " signaled=%d", req->signaled );
2301 static void dump_cancel_timer_request( const struct cancel_timer_request *req )
2303 fprintf( stderr, " handle=%04x", req->handle );
2306 static void dump_cancel_timer_reply( const struct cancel_timer_reply *req )
2308 fprintf( stderr, " signaled=%d", req->signaled );
2311 static void dump_get_timer_info_request( const struct get_timer_info_request *req )
2313 fprintf( stderr, " handle=%04x", req->handle );
2316 static void dump_get_timer_info_reply( const struct get_timer_info_reply *req )
2318 dump_timeout( " when=", &req->when );
2319 fprintf( stderr, ", signaled=%d", req->signaled );
2322 static void dump_get_thread_context_request( const struct get_thread_context_request *req )
2324 fprintf( stderr, " handle=%04x", req->handle );
2325 fprintf( stderr, ", flags=%08x", req->flags );
2326 fprintf( stderr, ", suspend=%d", req->suspend );
2329 static void dump_get_thread_context_reply( const struct get_thread_context_reply *req )
2331 fprintf( stderr, " self=%d", req->self );
2332 dump_varargs_context( ", context=", cur_size );
2335 static void dump_set_thread_context_request( const struct set_thread_context_request *req )
2337 fprintf( stderr, " handle=%04x", req->handle );
2338 fprintf( stderr, ", suspend=%d", req->suspend );
2339 dump_varargs_context( ", context=", cur_size );
2342 static void dump_set_thread_context_reply( const struct set_thread_context_reply *req )
2344 fprintf( stderr, " self=%d", req->self );
2347 static void dump_get_selector_entry_request( const struct get_selector_entry_request *req )
2349 fprintf( stderr, " handle=%04x", req->handle );
2350 fprintf( stderr, ", entry=%d", req->entry );
2353 static void dump_get_selector_entry_reply( const struct get_selector_entry_reply *req )
2355 fprintf( stderr, " base=%08x", req->base );
2356 fprintf( stderr, ", limit=%08x", req->limit );
2357 fprintf( stderr, ", flags=%02x", req->flags );
2360 static void dump_add_atom_request( const struct add_atom_request *req )
2362 fprintf( stderr, " table=%04x", req->table );
2363 dump_varargs_unicode_str( ", name=", cur_size );
2366 static void dump_add_atom_reply( const struct add_atom_reply *req )
2368 fprintf( stderr, " atom=%04x", req->atom );
2371 static void dump_delete_atom_request( const struct delete_atom_request *req )
2373 fprintf( stderr, " table=%04x", req->table );
2374 fprintf( stderr, ", atom=%04x", req->atom );
2377 static void dump_find_atom_request( const struct find_atom_request *req )
2379 fprintf( stderr, " table=%04x", req->table );
2380 dump_varargs_unicode_str( ", name=", cur_size );
2383 static void dump_find_atom_reply( const struct find_atom_reply *req )
2385 fprintf( stderr, " atom=%04x", req->atom );
2388 static void dump_get_atom_information_request( const struct get_atom_information_request *req )
2390 fprintf( stderr, " table=%04x", req->table );
2391 fprintf( stderr, ", atom=%04x", req->atom );
2394 static void dump_get_atom_information_reply( const struct get_atom_information_reply *req )
2396 fprintf( stderr, " count=%d", req->count );
2397 fprintf( stderr, ", pinned=%d", req->pinned );
2398 fprintf( stderr, ", total=%u", req->total );
2399 dump_varargs_unicode_str( ", name=", cur_size );
2402 static void dump_set_atom_information_request( const struct set_atom_information_request *req )
2404 fprintf( stderr, " table=%04x", req->table );
2405 fprintf( stderr, ", atom=%04x", req->atom );
2406 fprintf( stderr, ", pinned=%d", req->pinned );
2409 static void dump_empty_atom_table_request( const struct empty_atom_table_request *req )
2411 fprintf( stderr, " table=%04x", req->table );
2412 fprintf( stderr, ", if_pinned=%d", req->if_pinned );
2415 static void dump_init_atom_table_request( const struct init_atom_table_request *req )
2417 fprintf( stderr, " entries=%d", req->entries );
2420 static void dump_init_atom_table_reply( const struct init_atom_table_reply *req )
2422 fprintf( stderr, " table=%04x", req->table );
2425 static void dump_get_msg_queue_request( const struct get_msg_queue_request *req )
2429 static void dump_get_msg_queue_reply( const struct get_msg_queue_reply *req )
2431 fprintf( stderr, " handle=%04x", req->handle );
2434 static void dump_set_queue_fd_request( const struct set_queue_fd_request *req )
2436 fprintf( stderr, " handle=%04x", req->handle );
2439 static void dump_set_queue_mask_request( const struct set_queue_mask_request *req )
2441 fprintf( stderr, " wake_mask=%08x", req->wake_mask );
2442 fprintf( stderr, ", changed_mask=%08x", req->changed_mask );
2443 fprintf( stderr, ", skip_wait=%d", req->skip_wait );
2446 static void dump_set_queue_mask_reply( const struct set_queue_mask_reply *req )
2448 fprintf( stderr, " wake_bits=%08x", req->wake_bits );
2449 fprintf( stderr, ", changed_bits=%08x", req->changed_bits );
2452 static void dump_get_queue_status_request( const struct get_queue_status_request *req )
2454 fprintf( stderr, " clear=%d", req->clear );
2457 static void dump_get_queue_status_reply( const struct get_queue_status_reply *req )
2459 fprintf( stderr, " wake_bits=%08x", req->wake_bits );
2460 fprintf( stderr, ", changed_bits=%08x", req->changed_bits );
2463 static void dump_get_process_idle_event_request( const struct get_process_idle_event_request *req )
2465 fprintf( stderr, " handle=%04x", req->handle );
2468 static void dump_get_process_idle_event_reply( const struct get_process_idle_event_reply *req )
2470 fprintf( stderr, " event=%04x", req->event );
2473 static void dump_send_message_request( const struct send_message_request *req )
2475 fprintf( stderr, " id=%04x", req->id );
2476 fprintf( stderr, ", type=%d", req->type );
2477 fprintf( stderr, ", flags=%d", req->flags );
2478 fprintf( stderr, ", win=%08x", req->win );
2479 fprintf( stderr, ", msg=%08x", req->msg );
2480 dump_uint64( ", wparam=", &req->wparam );
2481 dump_uint64( ", lparam=", &req->lparam );
2482 dump_timeout( ", timeout=", &req->timeout );
2483 dump_varargs_message_data( ", data=", cur_size );
2486 static void dump_post_quit_message_request( const struct post_quit_message_request *req )
2488 fprintf( stderr, " exit_code=%d", req->exit_code );
2491 static void dump_send_hardware_message_request( const struct send_hardware_message_request *req )
2493 fprintf( stderr, " win=%08x", req->win );
2494 dump_hw_input( ", input=", &req->input );
2495 fprintf( stderr, ", flags=%08x", req->flags );
2498 static void dump_send_hardware_message_reply( const struct send_hardware_message_reply *req )
2500 fprintf( stderr, " wait=%d", req->wait );
2501 fprintf( stderr, ", prev_x=%d", req->prev_x );
2502 fprintf( stderr, ", prev_y=%d", req->prev_y );
2503 fprintf( stderr, ", new_x=%d", req->new_x );
2504 fprintf( stderr, ", new_y=%d", req->new_y );
2505 dump_varargs_bytes( ", keystate=", cur_size );
2508 static void dump_get_message_request( const struct get_message_request *req )
2510 fprintf( stderr, " flags=%08x", req->flags );
2511 fprintf( stderr, ", get_win=%08x", req->get_win );
2512 fprintf( stderr, ", get_first=%08x", req->get_first );
2513 fprintf( stderr, ", get_last=%08x", req->get_last );
2514 fprintf( stderr, ", hw_id=%08x", req->hw_id );
2515 fprintf( stderr, ", wake_mask=%08x", req->wake_mask );
2516 fprintf( stderr, ", changed_mask=%08x", req->changed_mask );
2519 static void dump_get_message_reply( const struct get_message_reply *req )
2521 fprintf( stderr, " win=%08x", req->win );
2522 fprintf( stderr, ", msg=%08x", req->msg );
2523 dump_uint64( ", wparam=", &req->wparam );
2524 dump_uint64( ", lparam=", &req->lparam );
2525 fprintf( stderr, ", type=%d", req->type );
2526 fprintf( stderr, ", time=%08x", req->time );
2527 fprintf( stderr, ", active_hooks=%08x", req->active_hooks );
2528 fprintf( stderr, ", total=%u", req->total );
2529 dump_varargs_message_data( ", data=", cur_size );
2532 static void dump_reply_message_request( const struct reply_message_request *req )
2534 fprintf( stderr, " remove=%d", req->remove );
2535 dump_uint64( ", result=", &req->result );
2536 dump_varargs_bytes( ", data=", cur_size );
2539 static void dump_accept_hardware_message_request( const struct accept_hardware_message_request *req )
2541 fprintf( stderr, " hw_id=%08x", req->hw_id );
2542 fprintf( stderr, ", remove=%d", req->remove );
2543 fprintf( stderr, ", new_win=%08x", req->new_win );
2546 static void dump_get_message_reply_request( const struct get_message_reply_request *req )
2548 fprintf( stderr, " cancel=%d", req->cancel );
2551 static void dump_get_message_reply_reply( const struct get_message_reply_reply *req )
2553 dump_uint64( " result=", &req->result );
2554 dump_varargs_bytes( ", data=", cur_size );
2557 static void dump_set_win_timer_request( const struct set_win_timer_request *req )
2559 fprintf( stderr, " win=%08x", req->win );
2560 fprintf( stderr, ", msg=%08x", req->msg );
2561 fprintf( stderr, ", rate=%08x", req->rate );
2562 dump_uint64( ", id=", &req->id );
2563 dump_uint64( ", lparam=", &req->lparam );
2566 static void dump_set_win_timer_reply( const struct set_win_timer_reply *req )
2568 dump_uint64( " id=", &req->id );
2571 static void dump_kill_win_timer_request( const struct kill_win_timer_request *req )
2573 fprintf( stderr, " win=%08x", req->win );
2574 dump_uint64( ", id=", &req->id );
2575 fprintf( stderr, ", msg=%08x", req->msg );
2578 static void dump_is_window_hung_request( const struct is_window_hung_request *req )
2580 fprintf( stderr, " win=%08x", req->win );
2583 static void dump_is_window_hung_reply( const struct is_window_hung_reply *req )
2585 fprintf( stderr, " is_hung=%d", req->is_hung );
2588 static void dump_get_serial_info_request( const struct get_serial_info_request *req )
2590 fprintf( stderr, " handle=%04x", req->handle );
2593 static void dump_get_serial_info_reply( const struct get_serial_info_reply *req )
2595 fprintf( stderr, " readinterval=%08x", req->readinterval );
2596 fprintf( stderr, ", readconst=%08x", req->readconst );
2597 fprintf( stderr, ", readmult=%08x", req->readmult );
2598 fprintf( stderr, ", writeconst=%08x", req->writeconst );
2599 fprintf( stderr, ", writemult=%08x", req->writemult );
2600 fprintf( stderr, ", eventmask=%08x", req->eventmask );
2603 static void dump_set_serial_info_request( const struct set_serial_info_request *req )
2605 fprintf( stderr, " handle=%04x", req->handle );
2606 fprintf( stderr, ", flags=%d", req->flags );
2607 fprintf( stderr, ", readinterval=%08x", req->readinterval );
2608 fprintf( stderr, ", readconst=%08x", req->readconst );
2609 fprintf( stderr, ", readmult=%08x", req->readmult );
2610 fprintf( stderr, ", writeconst=%08x", req->writeconst );
2611 fprintf( stderr, ", writemult=%08x", req->writemult );
2612 fprintf( stderr, ", eventmask=%08x", req->eventmask );
2615 static void dump_register_async_request( const struct register_async_request *req )
2617 fprintf( stderr, " type=%d", req->type );
2618 dump_async_data( ", async=", &req->async );
2619 fprintf( stderr, ", count=%d", req->count );
2622 static void dump_cancel_async_request( const struct cancel_async_request *req )
2624 fprintf( stderr, " handle=%04x", req->handle );
2625 dump_uint64( ", iosb=", &req->iosb );
2626 fprintf( stderr, ", only_thread=%d", req->only_thread );
2629 static void dump_ioctl_request( const struct ioctl_request *req )
2631 dump_ioctl_code( " code=", &req->code );
2632 dump_async_data( ", async=", &req->async );
2633 fprintf( stderr, ", blocking=%d", req->blocking );
2634 dump_varargs_bytes( ", in_data=", cur_size );
2637 static void dump_ioctl_reply( const struct ioctl_reply *req )
2639 fprintf( stderr, " wait=%04x", req->wait );
2640 fprintf( stderr, ", options=%08x", req->options );
2641 dump_varargs_bytes( ", out_data=", cur_size );
2644 static void dump_get_ioctl_result_request( const struct get_ioctl_result_request *req )
2646 fprintf( stderr, " handle=%04x", req->handle );
2647 dump_uint64( ", user_arg=", &req->user_arg );
2650 static void dump_get_ioctl_result_reply( const struct get_ioctl_result_reply *req )
2652 dump_varargs_bytes( " out_data=", cur_size );
2655 static void dump_create_named_pipe_request( const struct create_named_pipe_request *req )
2657 fprintf( stderr, " access=%08x", req->access );
2658 fprintf( stderr, ", attributes=%08x", req->attributes );
2659 fprintf( stderr, ", rootdir=%04x", req->rootdir );
2660 fprintf( stderr, ", options=%08x", req->options );
2661 fprintf( stderr, ", sharing=%08x", req->sharing );
2662 fprintf( stderr, ", maxinstances=%08x", req->maxinstances );
2663 fprintf( stderr, ", outsize=%08x", req->outsize );
2664 fprintf( stderr, ", insize=%08x", req->insize );
2665 dump_timeout( ", timeout=", &req->timeout );
2666 fprintf( stderr, ", flags=%08x", req->flags );
2667 dump_varargs_unicode_str( ", name=", cur_size );
2670 static void dump_create_named_pipe_reply( const struct create_named_pipe_reply *req )
2672 fprintf( stderr, " handle=%04x", req->handle );
2675 static void dump_get_named_pipe_info_request( const struct get_named_pipe_info_request *req )
2677 fprintf( stderr, " handle=%04x", req->handle );
2680 static void dump_get_named_pipe_info_reply( const struct get_named_pipe_info_reply *req )
2682 fprintf( stderr, " flags=%08x", req->flags );
2683 fprintf( stderr, ", sharing=%08x", req->sharing );
2684 fprintf( stderr, ", maxinstances=%08x", req->maxinstances );
2685 fprintf( stderr, ", instances=%08x", req->instances );
2686 fprintf( stderr, ", outsize=%08x", req->outsize );
2687 fprintf( stderr, ", insize=%08x", req->insize );
2690 static void dump_create_window_request( const struct create_window_request *req )
2692 fprintf( stderr, " parent=%08x", req->parent );
2693 fprintf( stderr, ", owner=%08x", req->owner );
2694 fprintf( stderr, ", atom=%04x", req->atom );
2695 dump_uint64( ", instance=", &req->instance );
2696 dump_varargs_unicode_str( ", class=", cur_size );
2699 static void dump_create_window_reply( const struct create_window_reply *req )
2701 fprintf( stderr, " handle=%08x", req->handle );
2702 fprintf( stderr, ", parent=%08x", req->parent );
2703 fprintf( stderr, ", owner=%08x", req->owner );
2704 fprintf( stderr, ", extra=%d", req->extra );
2705 dump_uint64( ", class_ptr=", &req->class_ptr );
2708 static void dump_destroy_window_request( const struct destroy_window_request *req )
2710 fprintf( stderr, " handle=%08x", req->handle );
2713 static void dump_get_desktop_window_request( const struct get_desktop_window_request *req )
2715 fprintf( stderr, " force=%d", req->force );
2718 static void dump_get_desktop_window_reply( const struct get_desktop_window_reply *req )
2720 fprintf( stderr, " top_window=%08x", req->top_window );
2721 fprintf( stderr, ", msg_window=%08x", req->msg_window );
2724 static void dump_set_window_owner_request( const struct set_window_owner_request *req )
2726 fprintf( stderr, " handle=%08x", req->handle );
2727 fprintf( stderr, ", owner=%08x", req->owner );
2730 static void dump_set_window_owner_reply( const struct set_window_owner_reply *req )
2732 fprintf( stderr, " full_owner=%08x", req->full_owner );
2733 fprintf( stderr, ", prev_owner=%08x", req->prev_owner );
2736 static void dump_get_window_info_request( const struct get_window_info_request *req )
2738 fprintf( stderr, " handle=%08x", req->handle );
2741 static void dump_get_window_info_reply( const struct get_window_info_reply *req )
2743 fprintf( stderr, " full_handle=%08x", req->full_handle );
2744 fprintf( stderr, ", last_active=%08x", req->last_active );
2745 fprintf( stderr, ", pid=%04x", req->pid );
2746 fprintf( stderr, ", tid=%04x", req->tid );
2747 fprintf( stderr, ", atom=%04x", req->atom );
2748 fprintf( stderr, ", is_unicode=%d", req->is_unicode );
2751 static void dump_set_window_info_request( const struct set_window_info_request *req )
2753 fprintf( stderr, " flags=%04x", req->flags );
2754 fprintf( stderr, ", is_unicode=%d", req->is_unicode );
2755 fprintf( stderr, ", handle=%08x", req->handle );
2756 fprintf( stderr, ", style=%08x", req->style );
2757 fprintf( stderr, ", ex_style=%08x", req->ex_style );
2758 fprintf( stderr, ", id=%08x", req->id );
2759 dump_uint64( ", instance=", &req->instance );
2760 dump_uint64( ", user_data=", &req->user_data );
2761 fprintf( stderr, ", extra_offset=%d", req->extra_offset );
2762 fprintf( stderr, ", extra_size=%u", req->extra_size );
2763 dump_uint64( ", extra_value=", &req->extra_value );
2766 static void dump_set_window_info_reply( const struct set_window_info_reply *req )
2768 fprintf( stderr, " old_style=%08x", req->old_style );
2769 fprintf( stderr, ", old_ex_style=%08x", req->old_ex_style );
2770 dump_uint64( ", old_instance=", &req->old_instance );
2771 dump_uint64( ", old_user_data=", &req->old_user_data );
2772 dump_uint64( ", old_extra_value=", &req->old_extra_value );
2773 fprintf( stderr, ", old_id=%08x", req->old_id );
2776 static void dump_set_parent_request( const struct set_parent_request *req )
2778 fprintf( stderr, " handle=%08x", req->handle );
2779 fprintf( stderr, ", parent=%08x", req->parent );
2782 static void dump_set_parent_reply( const struct set_parent_reply *req )
2784 fprintf( stderr, " old_parent=%08x", req->old_parent );
2785 fprintf( stderr, ", full_parent=%08x", req->full_parent );
2788 static void dump_get_window_parents_request( const struct get_window_parents_request *req )
2790 fprintf( stderr, " handle=%08x", req->handle );
2793 static void dump_get_window_parents_reply( const struct get_window_parents_reply *req )
2795 fprintf( stderr, " count=%d", req->count );
2796 dump_varargs_user_handles( ", parents=", cur_size );
2799 static void dump_get_window_children_request( const struct get_window_children_request *req )
2801 fprintf( stderr, " desktop=%04x", req->desktop );
2802 fprintf( stderr, ", parent=%08x", req->parent );
2803 fprintf( stderr, ", atom=%04x", req->atom );
2804 fprintf( stderr, ", tid=%04x", req->tid );
2805 dump_varargs_unicode_str( ", class=", cur_size );
2808 static void dump_get_window_children_reply( const struct get_window_children_reply *req )
2810 fprintf( stderr, " count=%d", req->count );
2811 dump_varargs_user_handles( ", children=", cur_size );
2814 static void dump_get_window_children_from_point_request( const struct get_window_children_from_point_request *req )
2816 fprintf( stderr, " parent=%08x", req->parent );
2817 fprintf( stderr, ", x=%d", req->x );
2818 fprintf( stderr, ", y=%d", req->y );
2821 static void dump_get_window_children_from_point_reply( const struct get_window_children_from_point_reply *req )
2823 fprintf( stderr, " count=%d", req->count );
2824 dump_varargs_user_handles( ", children=", cur_size );
2827 static void dump_get_window_tree_request( const struct get_window_tree_request *req )
2829 fprintf( stderr, " handle=%08x", req->handle );
2832 static void dump_get_window_tree_reply( const struct get_window_tree_reply *req )
2834 fprintf( stderr, " parent=%08x", req->parent );
2835 fprintf( stderr, ", owner=%08x", req->owner );
2836 fprintf( stderr, ", next_sibling=%08x", req->next_sibling );
2837 fprintf( stderr, ", prev_sibling=%08x", req->prev_sibling );
2838 fprintf( stderr, ", first_sibling=%08x", req->first_sibling );
2839 fprintf( stderr, ", last_sibling=%08x", req->last_sibling );
2840 fprintf( stderr, ", first_child=%08x", req->first_child );
2841 fprintf( stderr, ", last_child=%08x", req->last_child );
2844 static void dump_set_window_pos_request( const struct set_window_pos_request *req )
2846 fprintf( stderr, " swp_flags=%04x", req->swp_flags );
2847 fprintf( stderr, ", paint_flags=%04x", req->paint_flags );
2848 fprintf( stderr, ", handle=%08x", req->handle );
2849 fprintf( stderr, ", previous=%08x", req->previous );
2850 dump_rectangle( ", window=", &req->window );
2851 dump_rectangle( ", client=", &req->client );
2852 dump_varargs_rectangles( ", valid=", cur_size );
2855 static void dump_set_window_pos_reply( const struct set_window_pos_reply *req )
2857 fprintf( stderr, " new_style=%08x", req->new_style );
2858 fprintf( stderr, ", new_ex_style=%08x", req->new_ex_style );
2859 fprintf( stderr, ", surface_win=%08x", req->surface_win );
2862 static void dump_get_window_rectangles_request( const struct get_window_rectangles_request *req )
2864 fprintf( stderr, " handle=%08x", req->handle );
2865 fprintf( stderr, ", relative=%d", req->relative );
2868 static void dump_get_window_rectangles_reply( const struct get_window_rectangles_reply *req )
2870 dump_rectangle( " window=", &req->window );
2871 dump_rectangle( ", visible=", &req->visible );
2872 dump_rectangle( ", client=", &req->client );
2875 static void dump_get_window_text_request( const struct get_window_text_request *req )
2877 fprintf( stderr, " handle=%08x", req->handle );
2880 static void dump_get_window_text_reply( const struct get_window_text_reply *req )
2882 dump_varargs_unicode_str( " text=", cur_size );
2885 static void dump_set_window_text_request( const struct set_window_text_request *req )
2887 fprintf( stderr, " handle=%08x", req->handle );
2888 dump_varargs_unicode_str( ", text=", cur_size );
2891 static void dump_get_windows_offset_request( const struct get_windows_offset_request *req )
2893 fprintf( stderr, " from=%08x", req->from );
2894 fprintf( stderr, ", to=%08x", req->to );
2897 static void dump_get_windows_offset_reply( const struct get_windows_offset_reply *req )
2899 fprintf( stderr, " x=%d", req->x );
2900 fprintf( stderr, ", y=%d", req->y );
2901 fprintf( stderr, ", mirror=%d", req->mirror );
2904 static void dump_get_visible_region_request( const struct get_visible_region_request *req )
2906 fprintf( stderr, " window=%08x", req->window );
2907 fprintf( stderr, ", flags=%08x", req->flags );
2910 static void dump_get_visible_region_reply( const struct get_visible_region_reply *req )
2912 fprintf( stderr, " top_win=%08x", req->top_win );
2913 dump_rectangle( ", top_rect=", &req->top_rect );
2914 dump_rectangle( ", win_rect=", &req->win_rect );
2915 fprintf( stderr, ", paint_flags=%08x", req->paint_flags );
2916 fprintf( stderr, ", total_size=%u", req->total_size );
2917 dump_varargs_rectangles( ", region=", cur_size );
2920 static void dump_get_surface_region_request( const struct get_surface_region_request *req )
2922 fprintf( stderr, " window=%08x", req->window );
2925 static void dump_get_surface_region_reply( const struct get_surface_region_reply *req )
2927 dump_rectangle( " visible_rect=", &req->visible_rect );
2928 fprintf( stderr, ", total_size=%u", req->total_size );
2929 dump_varargs_rectangles( ", region=", cur_size );
2932 static void dump_get_window_region_request( const struct get_window_region_request *req )
2934 fprintf( stderr, " window=%08x", req->window );
2937 static void dump_get_window_region_reply( const struct get_window_region_reply *req )
2939 fprintf( stderr, " total_size=%u", req->total_size );
2940 dump_varargs_rectangles( ", region=", cur_size );
2943 static void dump_set_window_region_request( const struct set_window_region_request *req )
2945 fprintf( stderr, " window=%08x", req->window );
2946 fprintf( stderr, ", redraw=%d", req->redraw );
2947 dump_varargs_rectangles( ", region=", cur_size );
2950 static void dump_get_update_region_request( const struct get_update_region_request *req )
2952 fprintf( stderr, " window=%08x", req->window );
2953 fprintf( stderr, ", from_child=%08x", req->from_child );
2954 fprintf( stderr, ", flags=%08x", req->flags );
2957 static void dump_get_update_region_reply( const struct get_update_region_reply *req )
2959 fprintf( stderr, " child=%08x", req->child );
2960 fprintf( stderr, ", flags=%08x", req->flags );
2961 fprintf( stderr, ", total_size=%u", req->total_size );
2962 dump_varargs_rectangles( ", region=", cur_size );
2965 static void dump_update_window_zorder_request( const struct update_window_zorder_request *req )
2967 fprintf( stderr, " window=%08x", req->window );
2968 dump_rectangle( ", rect=", &req->rect );
2971 static void dump_redraw_window_request( const struct redraw_window_request *req )
2973 fprintf( stderr, " window=%08x", req->window );
2974 fprintf( stderr, ", flags=%08x", req->flags );
2975 dump_varargs_rectangles( ", region=", cur_size );
2978 static void dump_set_window_property_request( const struct set_window_property_request *req )
2980 fprintf( stderr, " window=%08x", req->window );
2981 dump_uint64( ", data=", &req->data );
2982 fprintf( stderr, ", atom=%04x", req->atom );
2983 dump_varargs_unicode_str( ", name=", cur_size );
2986 static void dump_remove_window_property_request( const struct remove_window_property_request *req )
2988 fprintf( stderr, " window=%08x", req->window );
2989 fprintf( stderr, ", atom=%04x", req->atom );
2990 dump_varargs_unicode_str( ", name=", cur_size );
2993 static void dump_remove_window_property_reply( const struct remove_window_property_reply *req )
2995 dump_uint64( " data=", &req->data );
2998 static void dump_get_window_property_request( const struct get_window_property_request *req )
3000 fprintf( stderr, " window=%08x", req->window );
3001 fprintf( stderr, ", atom=%04x", req->atom );
3002 dump_varargs_unicode_str( ", name=", cur_size );
3005 static void dump_get_window_property_reply( const struct get_window_property_reply *req )
3007 dump_uint64( " data=", &req->data );
3010 static void dump_get_window_properties_request( const struct get_window_properties_request *req )
3012 fprintf( stderr, " window=%08x", req->window );
3015 static void dump_get_window_properties_reply( const struct get_window_properties_reply *req )
3017 fprintf( stderr, " total=%d", req->total );
3018 dump_varargs_properties( ", props=", cur_size );
3021 static void dump_create_winstation_request( const struct create_winstation_request *req )
3023 fprintf( stderr, " flags=%08x", req->flags );
3024 fprintf( stderr, ", access=%08x", req->access );
3025 fprintf( stderr, ", attributes=%08x", req->attributes );
3026 dump_varargs_unicode_str( ", name=", cur_size );
3029 static void dump_create_winstation_reply( const struct create_winstation_reply *req )
3031 fprintf( stderr, " handle=%04x", req->handle );
3034 static void dump_open_winstation_request( const struct open_winstation_request *req )
3036 fprintf( stderr, " access=%08x", req->access );
3037 fprintf( stderr, ", attributes=%08x", req->attributes );
3038 dump_varargs_unicode_str( ", name=", cur_size );
3041 static void dump_open_winstation_reply( const struct open_winstation_reply *req )
3043 fprintf( stderr, " handle=%04x", req->handle );
3046 static void dump_close_winstation_request( const struct close_winstation_request *req )
3048 fprintf( stderr, " handle=%04x", req->handle );
3051 static void dump_get_process_winstation_request( const struct get_process_winstation_request *req )
3055 static void dump_get_process_winstation_reply( const struct get_process_winstation_reply *req )
3057 fprintf( stderr, " handle=%04x", req->handle );
3060 static void dump_set_process_winstation_request( const struct set_process_winstation_request *req )
3062 fprintf( stderr, " handle=%04x", req->handle );
3065 static void dump_enum_winstation_request( const struct enum_winstation_request *req )
3067 fprintf( stderr, " index=%08x", req->index );
3070 static void dump_enum_winstation_reply( const struct enum_winstation_reply *req )
3072 fprintf( stderr, " next=%08x", req->next );
3073 dump_varargs_unicode_str( ", name=", cur_size );
3076 static void dump_create_desktop_request( const struct create_desktop_request *req )
3078 fprintf( stderr, " flags=%08x", req->flags );
3079 fprintf( stderr, ", access=%08x", req->access );
3080 fprintf( stderr, ", attributes=%08x", req->attributes );
3081 dump_varargs_unicode_str( ", name=", cur_size );
3084 static void dump_create_desktop_reply( const struct create_desktop_reply *req )
3086 fprintf( stderr, " handle=%04x", req->handle );
3089 static void dump_open_desktop_request( const struct open_desktop_request *req )
3091 fprintf( stderr, " winsta=%04x", req->winsta );
3092 fprintf( stderr, ", flags=%08x", req->flags );
3093 fprintf( stderr, ", access=%08x", req->access );
3094 fprintf( stderr, ", attributes=%08x", req->attributes );
3095 dump_varargs_unicode_str( ", name=", cur_size );
3098 static void dump_open_desktop_reply( const struct open_desktop_reply *req )
3100 fprintf( stderr, " handle=%04x", req->handle );
3103 static void dump_close_desktop_request( const struct close_desktop_request *req )
3105 fprintf( stderr, " handle=%04x", req->handle );
3108 static void dump_get_thread_desktop_request( const struct get_thread_desktop_request *req )
3110 fprintf( stderr, " tid=%04x", req->tid );
3113 static void dump_get_thread_desktop_reply( const struct get_thread_desktop_reply *req )
3115 fprintf( stderr, " handle=%04x", req->handle );
3118 static void dump_set_thread_desktop_request( const struct set_thread_desktop_request *req )
3120 fprintf( stderr, " handle=%04x", req->handle );
3123 static void dump_enum_desktop_request( const struct enum_desktop_request *req )
3125 fprintf( stderr, " winstation=%04x", req->winstation );
3126 fprintf( stderr, ", index=%08x", req->index );
3129 static void dump_enum_desktop_reply( const struct enum_desktop_reply *req )
3131 fprintf( stderr, " next=%08x", req->next );
3132 dump_varargs_unicode_str( ", name=", cur_size );
3135 static void dump_set_user_object_info_request( const struct set_user_object_info_request *req )
3137 fprintf( stderr, " handle=%04x", req->handle );
3138 fprintf( stderr, ", flags=%08x", req->flags );
3139 fprintf( stderr, ", obj_flags=%08x", req->obj_flags );
3142 static void dump_set_user_object_info_reply( const struct set_user_object_info_reply *req )
3144 fprintf( stderr, " is_desktop=%d", req->is_desktop );
3145 fprintf( stderr, ", old_obj_flags=%08x", req->old_obj_flags );
3146 dump_varargs_unicode_str( ", name=", cur_size );
3149 static void dump_register_hotkey_request( const struct register_hotkey_request *req )
3151 fprintf( stderr, " window=%08x", req->window );
3152 fprintf( stderr, ", id=%d", req->id );
3153 fprintf( stderr, ", flags=%08x", req->flags );
3154 fprintf( stderr, ", vkey=%08x", req->vkey );
3157 static void dump_register_hotkey_reply( const struct register_hotkey_reply *req )
3159 fprintf( stderr, " replaced=%d", req->replaced );
3160 fprintf( stderr, ", flags=%08x", req->flags );
3161 fprintf( stderr, ", vkey=%08x", req->vkey );
3164 static void dump_unregister_hotkey_request( const struct unregister_hotkey_request *req )
3166 fprintf( stderr, " window=%08x", req->window );
3167 fprintf( stderr, ", id=%d", req->id );
3170 static void dump_unregister_hotkey_reply( const struct unregister_hotkey_reply *req )
3172 fprintf( stderr, " flags=%08x", req->flags );
3173 fprintf( stderr, ", vkey=%08x", req->vkey );
3176 static void dump_attach_thread_input_request( const struct attach_thread_input_request *req )
3178 fprintf( stderr, " tid_from=%04x", req->tid_from );
3179 fprintf( stderr, ", tid_to=%04x", req->tid_to );
3180 fprintf( stderr, ", attach=%d", req->attach );
3183 static void dump_get_thread_input_request( const struct get_thread_input_request *req )
3185 fprintf( stderr, " tid=%04x", req->tid );
3188 static void dump_get_thread_input_reply( const struct get_thread_input_reply *req )
3190 fprintf( stderr, " focus=%08x", req->focus );
3191 fprintf( stderr, ", capture=%08x", req->capture );
3192 fprintf( stderr, ", active=%08x", req->active );
3193 fprintf( stderr, ", foreground=%08x", req->foreground );
3194 fprintf( stderr, ", menu_owner=%08x", req->menu_owner );
3195 fprintf( stderr, ", move_size=%08x", req->move_size );
3196 fprintf( stderr, ", caret=%08x", req->caret );
3197 fprintf( stderr, ", cursor=%08x", req->cursor );
3198 fprintf( stderr, ", show_count=%d", req->show_count );
3199 dump_rectangle( ", rect=", &req->rect );
3202 static void dump_get_last_input_time_request( const struct get_last_input_time_request *req )
3206 static void dump_get_last_input_time_reply( const struct get_last_input_time_reply *req )
3208 fprintf( stderr, " time=%08x", req->time );
3211 static void dump_get_key_state_request( const struct get_key_state_request *req )
3213 fprintf( stderr, " tid=%04x", req->tid );
3214 fprintf( stderr, ", key=%d", req->key );
3217 static void dump_get_key_state_reply( const struct get_key_state_reply *req )
3219 fprintf( stderr, " state=%02x", req->state );
3220 dump_varargs_bytes( ", keystate=", cur_size );
3223 static void dump_set_key_state_request( const struct set_key_state_request *req )
3225 fprintf( stderr, " tid=%04x", req->tid );
3226 fprintf( stderr, ", async=%d", req->async );
3227 dump_varargs_bytes( ", keystate=", cur_size );
3230 static void dump_set_foreground_window_request( const struct set_foreground_window_request *req )
3232 fprintf( stderr, " handle=%08x", req->handle );
3235 static void dump_set_foreground_window_reply( const struct set_foreground_window_reply *req )
3237 fprintf( stderr, " previous=%08x", req->previous );
3238 fprintf( stderr, ", send_msg_old=%d", req->send_msg_old );
3239 fprintf( stderr, ", send_msg_new=%d", req->send_msg_new );
3242 static void dump_set_focus_window_request( const struct set_focus_window_request *req )
3244 fprintf( stderr, " handle=%08x", req->handle );
3247 static void dump_set_focus_window_reply( const struct set_focus_window_reply *req )
3249 fprintf( stderr, " previous=%08x", req->previous );
3252 static void dump_set_active_window_request( const struct set_active_window_request *req )
3254 fprintf( stderr, " handle=%08x", req->handle );
3257 static void dump_set_active_window_reply( const struct set_active_window_reply *req )
3259 fprintf( stderr, " previous=%08x", req->previous );
3262 static void dump_set_capture_window_request( const struct set_capture_window_request *req )
3264 fprintf( stderr, " handle=%08x", req->handle );
3265 fprintf( stderr, ", flags=%08x", req->flags );
3268 static void dump_set_capture_window_reply( const struct set_capture_window_reply *req )
3270 fprintf( stderr, " previous=%08x", req->previous );
3271 fprintf( stderr, ", full_handle=%08x", req->full_handle );
3274 static void dump_set_caret_window_request( const struct set_caret_window_request *req )
3276 fprintf( stderr, " handle=%08x", req->handle );
3277 fprintf( stderr, ", width=%d", req->width );
3278 fprintf( stderr, ", height=%d", req->height );
3281 static void dump_set_caret_window_reply( const struct set_caret_window_reply *req )
3283 fprintf( stderr, " previous=%08x", req->previous );
3284 dump_rectangle( ", old_rect=", &req->old_rect );
3285 fprintf( stderr, ", old_hide=%d", req->old_hide );
3286 fprintf( stderr, ", old_state=%d", req->old_state );
3289 static void dump_set_caret_info_request( const struct set_caret_info_request *req )
3291 fprintf( stderr, " flags=%08x", req->flags );
3292 fprintf( stderr, ", handle=%08x", req->handle );
3293 fprintf( stderr, ", x=%d", req->x );
3294 fprintf( stderr, ", y=%d", req->y );
3295 fprintf( stderr, ", hide=%d", req->hide );
3296 fprintf( stderr, ", state=%d", req->state );
3299 static void dump_set_caret_info_reply( const struct set_caret_info_reply *req )
3301 fprintf( stderr, " full_handle=%08x", req->full_handle );
3302 dump_rectangle( ", old_rect=", &req->old_rect );
3303 fprintf( stderr, ", old_hide=%d", req->old_hide );
3304 fprintf( stderr, ", old_state=%d", req->old_state );
3307 static void dump_set_hook_request( const struct set_hook_request *req )
3309 fprintf( stderr, " id=%d", req->id );
3310 fprintf( stderr, ", pid=%04x", req->pid );
3311 fprintf( stderr, ", tid=%04x", req->tid );
3312 fprintf( stderr, ", event_min=%d", req->event_min );
3313 fprintf( stderr, ", event_max=%d", req->event_max );
3314 dump_uint64( ", proc=", &req->proc );
3315 fprintf( stderr, ", flags=%d", req->flags );
3316 fprintf( stderr, ", unicode=%d", req->unicode );
3317 dump_varargs_unicode_str( ", module=", cur_size );
3320 static void dump_set_hook_reply( const struct set_hook_reply *req )
3322 fprintf( stderr, " handle=%08x", req->handle );
3323 fprintf( stderr, ", active_hooks=%08x", req->active_hooks );
3326 static void dump_remove_hook_request( const struct remove_hook_request *req )
3328 fprintf( stderr, " handle=%08x", req->handle );
3329 dump_uint64( ", proc=", &req->proc );
3330 fprintf( stderr, ", id=%d", req->id );
3333 static void dump_remove_hook_reply( const struct remove_hook_reply *req )
3335 fprintf( stderr, " active_hooks=%08x", req->active_hooks );
3338 static void dump_start_hook_chain_request( const struct start_hook_chain_request *req )
3340 fprintf( stderr, " id=%d", req->id );
3341 fprintf( stderr, ", event=%d", req->event );
3342 fprintf( stderr, ", window=%08x", req->window );
3343 fprintf( stderr, ", object_id=%d", req->object_id );
3344 fprintf( stderr, ", child_id=%d", req->child_id );
3347 static void dump_start_hook_chain_reply( const struct start_hook_chain_reply *req )
3349 fprintf( stderr, " handle=%08x", req->handle );
3350 fprintf( stderr, ", pid=%04x", req->pid );
3351 fprintf( stderr, ", tid=%04x", req->tid );
3352 fprintf( stderr, ", unicode=%d", req->unicode );
3353 dump_uint64( ", proc=", &req->proc );
3354 fprintf( stderr, ", active_hooks=%08x", req->active_hooks );
3355 dump_varargs_unicode_str( ", module=", cur_size );
3358 static void dump_finish_hook_chain_request( const struct finish_hook_chain_request *req )
3360 fprintf( stderr, " id=%d", req->id );
3363 static void dump_get_hook_info_request( const struct get_hook_info_request *req )
3365 fprintf( stderr, " handle=%08x", req->handle );
3366 fprintf( stderr, ", get_next=%d", req->get_next );
3367 fprintf( stderr, ", event=%d", req->event );
3368 fprintf( stderr, ", window=%08x", req->window );
3369 fprintf( stderr, ", object_id=%d", req->object_id );
3370 fprintf( stderr, ", child_id=%d", req->child_id );
3373 static void dump_get_hook_info_reply( const struct get_hook_info_reply *req )
3375 fprintf( stderr, " handle=%08x", req->handle );
3376 fprintf( stderr, ", id=%d", req->id );
3377 fprintf( stderr, ", pid=%04x", req->pid );
3378 fprintf( stderr, ", tid=%04x", req->tid );
3379 dump_uint64( ", proc=", &req->proc );
3380 fprintf( stderr, ", unicode=%d", req->unicode );
3381 dump_varargs_unicode_str( ", module=", cur_size );
3384 static void dump_create_class_request( const struct create_class_request *req )
3386 fprintf( stderr, " local=%d", req->local );
3387 fprintf( stderr, ", atom=%04x", req->atom );
3388 fprintf( stderr, ", style=%08x", req->style );
3389 dump_uint64( ", instance=", &req->instance );
3390 fprintf( stderr, ", extra=%d", req->extra );
3391 fprintf( stderr, ", win_extra=%d", req->win_extra );
3392 dump_uint64( ", client_ptr=", &req->client_ptr );
3393 dump_varargs_unicode_str( ", name=", cur_size );
3396 static void dump_create_class_reply( const struct create_class_reply *req )
3398 fprintf( stderr, " atom=%04x", req->atom );
3401 static void dump_destroy_class_request( const struct destroy_class_request *req )
3403 fprintf( stderr, " atom=%04x", req->atom );
3404 dump_uint64( ", instance=", &req->instance );
3405 dump_varargs_unicode_str( ", name=", cur_size );
3408 static void dump_destroy_class_reply( const struct destroy_class_reply *req )
3410 dump_uint64( " client_ptr=", &req->client_ptr );
3413 static void dump_set_class_info_request( const struct set_class_info_request *req )
3415 fprintf( stderr, " window=%08x", req->window );
3416 fprintf( stderr, ", flags=%08x", req->flags );
3417 fprintf( stderr, ", atom=%04x", req->atom );
3418 fprintf( stderr, ", style=%08x", req->style );
3419 fprintf( stderr, ", win_extra=%d", req->win_extra );
3420 dump_uint64( ", instance=", &req->instance );
3421 fprintf( stderr, ", extra_offset=%d", req->extra_offset );
3422 fprintf( stderr, ", extra_size=%u", req->extra_size );
3423 dump_uint64( ", extra_value=", &req->extra_value );
3426 static void dump_set_class_info_reply( const struct set_class_info_reply *req )
3428 fprintf( stderr, " old_atom=%04x", req->old_atom );
3429 fprintf( stderr, ", old_style=%08x", req->old_style );
3430 fprintf( stderr, ", old_extra=%d", req->old_extra );
3431 fprintf( stderr, ", old_win_extra=%d", req->old_win_extra );
3432 dump_uint64( ", old_instance=", &req->old_instance );
3433 dump_uint64( ", old_extra_value=", &req->old_extra_value );
3436 static void dump_set_clipboard_info_request( const struct set_clipboard_info_request *req )
3438 fprintf( stderr, " flags=%08x", req->flags );
3439 fprintf( stderr, ", clipboard=%08x", req->clipboard );
3440 fprintf( stderr, ", owner=%08x", req->owner );
3441 fprintf( stderr, ", viewer=%08x", req->viewer );
3442 fprintf( stderr, ", seqno=%08x", req->seqno );
3445 static void dump_set_clipboard_info_reply( const struct set_clipboard_info_reply *req )
3447 fprintf( stderr, " flags=%08x", req->flags );
3448 fprintf( stderr, ", old_clipboard=%08x", req->old_clipboard );
3449 fprintf( stderr, ", old_owner=%08x", req->old_owner );
3450 fprintf( stderr, ", old_viewer=%08x", req->old_viewer );
3451 fprintf( stderr, ", seqno=%08x", req->seqno );
3454 static void dump_open_token_request( const struct open_token_request *req )
3456 fprintf( stderr, " handle=%04x", req->handle );
3457 fprintf( stderr, ", access=%08x", req->access );
3458 fprintf( stderr, ", attributes=%08x", req->attributes );
3459 fprintf( stderr, ", flags=%08x", req->flags );
3462 static void dump_open_token_reply( const struct open_token_reply *req )
3464 fprintf( stderr, " token=%04x", req->token );
3467 static void dump_set_global_windows_request( const struct set_global_windows_request *req )
3469 fprintf( stderr, " flags=%08x", req->flags );
3470 fprintf( stderr, ", shell_window=%08x", req->shell_window );
3471 fprintf( stderr, ", shell_listview=%08x", req->shell_listview );
3472 fprintf( stderr, ", progman_window=%08x", req->progman_window );
3473 fprintf( stderr, ", taskman_window=%08x", req->taskman_window );
3476 static void dump_set_global_windows_reply( const struct set_global_windows_reply *req )
3478 fprintf( stderr, " old_shell_window=%08x", req->old_shell_window );
3479 fprintf( stderr, ", old_shell_listview=%08x", req->old_shell_listview );
3480 fprintf( stderr, ", old_progman_window=%08x", req->old_progman_window );
3481 fprintf( stderr, ", old_taskman_window=%08x", req->old_taskman_window );
3484 static void dump_adjust_token_privileges_request( const struct adjust_token_privileges_request *req )
3486 fprintf( stderr, " handle=%04x", req->handle );
3487 fprintf( stderr, ", disable_all=%d", req->disable_all );
3488 fprintf( stderr, ", get_modified_state=%d", req->get_modified_state );
3489 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3492 static void dump_adjust_token_privileges_reply( const struct adjust_token_privileges_reply *req )
3494 fprintf( stderr, " len=%08x", req->len );
3495 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3498 static void dump_get_token_privileges_request( const struct get_token_privileges_request *req )
3500 fprintf( stderr, " handle=%04x", req->handle );
3503 static void dump_get_token_privileges_reply( const struct get_token_privileges_reply *req )
3505 fprintf( stderr, " len=%08x", req->len );
3506 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3509 static void dump_check_token_privileges_request( const struct check_token_privileges_request *req )
3511 fprintf( stderr, " handle=%04x", req->handle );
3512 fprintf( stderr, ", all_required=%d", req->all_required );
3513 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3516 static void dump_check_token_privileges_reply( const struct check_token_privileges_reply *req )
3518 fprintf( stderr, " has_privileges=%d", req->has_privileges );
3519 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3522 static void dump_duplicate_token_request( const struct duplicate_token_request *req )
3524 fprintf( stderr, " handle=%04x", req->handle );
3525 fprintf( stderr, ", access=%08x", req->access );
3526 fprintf( stderr, ", attributes=%08x", req->attributes );
3527 fprintf( stderr, ", primary=%d", req->primary );
3528 fprintf( stderr, ", impersonation_level=%d", req->impersonation_level );
3531 static void dump_duplicate_token_reply( const struct duplicate_token_reply *req )
3533 fprintf( stderr, " new_handle=%04x", req->new_handle );
3536 static void dump_access_check_request( const struct access_check_request *req )
3538 fprintf( stderr, " handle=%04x", req->handle );
3539 fprintf( stderr, ", desired_access=%08x", req->desired_access );
3540 fprintf( stderr, ", mapping_read=%08x", req->mapping_read );
3541 fprintf( stderr, ", mapping_write=%08x", req->mapping_write );
3542 fprintf( stderr, ", mapping_execute=%08x", req->mapping_execute );
3543 fprintf( stderr, ", mapping_all=%08x", req->mapping_all );
3544 dump_varargs_security_descriptor( ", sd=", cur_size );
3547 static void dump_access_check_reply( const struct access_check_reply *req )
3549 fprintf( stderr, " access_granted=%08x", req->access_granted );
3550 fprintf( stderr, ", access_status=%08x", req->access_status );
3551 fprintf( stderr, ", privileges_len=%08x", req->privileges_len );
3552 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3555 static void dump_get_token_sid_request( const struct get_token_sid_request *req )
3557 fprintf( stderr, " handle=%04x", req->handle );
3558 fprintf( stderr, ", which_sid=%08x", req->which_sid );
3561 static void dump_get_token_sid_reply( const struct get_token_sid_reply *req )
3563 fprintf( stderr, " sid_len=%u", req->sid_len );
3564 dump_varargs_SID( ", sid=", cur_size );
3567 static void dump_get_token_groups_request( const struct get_token_groups_request *req )
3569 fprintf( stderr, " handle=%04x", req->handle );
3572 static void dump_get_token_groups_reply( const struct get_token_groups_reply *req )
3574 fprintf( stderr, " user_len=%u", req->user_len );
3575 dump_varargs_token_groups( ", user=", cur_size );
3578 static void dump_get_token_default_dacl_request( const struct get_token_default_dacl_request *req )
3580 fprintf( stderr, " handle=%04x", req->handle );
3583 static void dump_get_token_default_dacl_reply( const struct get_token_default_dacl_reply *req )
3585 fprintf( stderr, " acl_len=%u", req->acl_len );
3586 dump_varargs_ACL( ", acl=", cur_size );
3589 static void dump_set_token_default_dacl_request( const struct set_token_default_dacl_request *req )
3591 fprintf( stderr, " handle=%04x", req->handle );
3592 dump_varargs_ACL( ", acl=", cur_size );
3595 static void dump_set_security_object_request( const struct set_security_object_request *req )
3597 fprintf( stderr, " handle=%04x", req->handle );
3598 fprintf( stderr, ", security_info=%08x", req->security_info );
3599 dump_varargs_security_descriptor( ", sd=", cur_size );
3602 static void dump_get_security_object_request( const struct get_security_object_request *req )
3604 fprintf( stderr, " handle=%04x", req->handle );
3605 fprintf( stderr, ", security_info=%08x", req->security_info );
3608 static void dump_get_security_object_reply( const struct get_security_object_reply *req )
3610 fprintf( stderr, " sd_len=%08x", req->sd_len );
3611 dump_varargs_security_descriptor( ", sd=", cur_size );
3614 static void dump_create_mailslot_request( const struct create_mailslot_request *req )
3616 fprintf( stderr, " access=%08x", req->access );
3617 fprintf( stderr, ", attributes=%08x", req->attributes );
3618 fprintf( stderr, ", rootdir=%04x", req->rootdir );
3619 dump_timeout( ", read_timeout=", &req->read_timeout );
3620 fprintf( stderr, ", max_msgsize=%08x", req->max_msgsize );
3621 dump_varargs_unicode_str( ", name=", cur_size );
3624 static void dump_create_mailslot_reply( const struct create_mailslot_reply *req )
3626 fprintf( stderr, " handle=%04x", req->handle );
3629 static void dump_set_mailslot_info_request( const struct set_mailslot_info_request *req )
3631 fprintf( stderr, " handle=%04x", req->handle );
3632 dump_timeout( ", read_timeout=", &req->read_timeout );
3633 fprintf( stderr, ", flags=%08x", req->flags );
3636 static void dump_set_mailslot_info_reply( const struct set_mailslot_info_reply *req )
3638 dump_timeout( " read_timeout=", &req->read_timeout );
3639 fprintf( stderr, ", max_msgsize=%08x", req->max_msgsize );
3642 static void dump_create_directory_request( const struct create_directory_request *req )
3644 fprintf( stderr, " access=%08x", req->access );
3645 fprintf( stderr, ", attributes=%08x", req->attributes );
3646 fprintf( stderr, ", rootdir=%04x", req->rootdir );
3647 dump_varargs_unicode_str( ", directory_name=", cur_size );
3650 static void dump_create_directory_reply( const struct create_directory_reply *req )
3652 fprintf( stderr, " handle=%04x", req->handle );
3655 static void dump_open_directory_request( const struct open_directory_request *req )
3657 fprintf( stderr, " access=%08x", req->access );
3658 fprintf( stderr, ", attributes=%08x", req->attributes );
3659 fprintf( stderr, ", rootdir=%04x", req->rootdir );
3660 dump_varargs_unicode_str( ", directory_name=", cur_size );
3663 static void dump_open_directory_reply( const struct open_directory_reply *req )
3665 fprintf( stderr, " handle=%04x", req->handle );
3668 static void dump_get_directory_entry_request( const struct get_directory_entry_request *req )
3670 fprintf( stderr, " handle=%04x", req->handle );
3671 fprintf( stderr, ", index=%08x", req->index );
3674 static void dump_get_directory_entry_reply( const struct get_directory_entry_reply *req )
3676 fprintf( stderr, " name_len=%u", req->name_len );
3677 dump_varargs_unicode_str( ", name=", min(cur_size,req->name_len) );
3678 dump_varargs_unicode_str( ", type=", cur_size );
3681 static void dump_create_symlink_request( const struct create_symlink_request *req )
3683 fprintf( stderr, " access=%08x", req->access );
3684 fprintf( stderr, ", attributes=%08x", req->attributes );
3685 fprintf( stderr, ", rootdir=%04x", req->rootdir );
3686 fprintf( stderr, ", name_len=%u", req->name_len );
3687 dump_varargs_unicode_str( ", name=", min(cur_size,req->name_len) );
3688 dump_varargs_unicode_str( ", target_name=", cur_size );
3691 static void dump_create_symlink_reply( const struct create_symlink_reply *req )
3693 fprintf( stderr, " handle=%04x", req->handle );
3696 static void dump_open_symlink_request( const struct open_symlink_request *req )
3698 fprintf( stderr, " access=%08x", req->access );
3699 fprintf( stderr, ", attributes=%08x", req->attributes );
3700 fprintf( stderr, ", rootdir=%04x", req->rootdir );
3701 dump_varargs_unicode_str( ", name=", cur_size );
3704 static void dump_open_symlink_reply( const struct open_symlink_reply *req )
3706 fprintf( stderr, " handle=%04x", req->handle );
3709 static void dump_query_symlink_request( const struct query_symlink_request *req )
3711 fprintf( stderr, " handle=%04x", req->handle );
3714 static void dump_query_symlink_reply( const struct query_symlink_reply *req )
3716 fprintf( stderr, " total=%u", req->total );
3717 dump_varargs_unicode_str( ", target_name=", cur_size );
3720 static void dump_get_object_info_request( const struct get_object_info_request *req )
3722 fprintf( stderr, " handle=%04x", req->handle );
3725 static void dump_get_object_info_reply( const struct get_object_info_reply *req )
3727 fprintf( stderr, " access=%08x", req->access );
3728 fprintf( stderr, ", ref_count=%08x", req->ref_count );
3729 fprintf( stderr, ", total=%u", req->total );
3730 dump_varargs_unicode_str( ", name=", cur_size );
3733 static void dump_unlink_object_request( const struct unlink_object_request *req )
3735 fprintf( stderr, " handle=%04x", req->handle );
3738 static void dump_get_token_impersonation_level_request( const struct get_token_impersonation_level_request *req )
3740 fprintf( stderr, " handle=%04x", req->handle );
3743 static void dump_get_token_impersonation_level_reply( const struct get_token_impersonation_level_reply *req )
3745 fprintf( stderr, " impersonation_level=%d", req->impersonation_level );
3748 static void dump_allocate_locally_unique_id_request( const struct allocate_locally_unique_id_request *req )
3752 static void dump_allocate_locally_unique_id_reply( const struct allocate_locally_unique_id_reply *req )
3754 dump_luid( " luid=", &req->luid );
3757 static void dump_create_device_manager_request( const struct create_device_manager_request *req )
3759 fprintf( stderr, " access=%08x", req->access );
3760 fprintf( stderr, ", attributes=%08x", req->attributes );
3763 static void dump_create_device_manager_reply( const struct create_device_manager_reply *req )
3765 fprintf( stderr, " handle=%04x", req->handle );
3768 static void dump_create_device_request( const struct create_device_request *req )
3770 fprintf( stderr, " access=%08x", req->access );
3771 fprintf( stderr, ", attributes=%08x", req->attributes );
3772 fprintf( stderr, ", rootdir=%04x", req->rootdir );
3773 dump_uint64( ", user_ptr=", &req->user_ptr );
3774 fprintf( stderr, ", manager=%04x", req->manager );
3775 dump_varargs_unicode_str( ", name=", cur_size );
3778 static void dump_create_device_reply( const struct create_device_reply *req )
3780 fprintf( stderr, " handle=%04x", req->handle );
3783 static void dump_delete_device_request( const struct delete_device_request *req )
3785 fprintf( stderr, " handle=%04x", req->handle );
3788 static void dump_get_next_device_request_request( const struct get_next_device_request_request *req )
3790 fprintf( stderr, " manager=%04x", req->manager );
3791 fprintf( stderr, ", prev=%04x", req->prev );
3792 fprintf( stderr, ", status=%08x", req->status );
3793 dump_varargs_bytes( ", prev_data=", cur_size );
3796 static void dump_get_next_device_request_reply( const struct get_next_device_request_reply *req )
3798 fprintf( stderr, " next=%04x", req->next );
3799 dump_ioctl_code( ", code=", &req->code );
3800 dump_uint64( ", user_ptr=", &req->user_ptr );
3801 fprintf( stderr, ", client_pid=%04x", req->client_pid );
3802 fprintf( stderr, ", client_tid=%04x", req->client_tid );
3803 fprintf( stderr, ", in_size=%u", req->in_size );
3804 fprintf( stderr, ", out_size=%u", req->out_size );
3805 dump_varargs_bytes( ", next_data=", cur_size );
3808 static void dump_make_process_system_request( const struct make_process_system_request *req )
3812 static void dump_make_process_system_reply( const struct make_process_system_reply *req )
3814 fprintf( stderr, " event=%04x", req->event );
3817 static void dump_get_token_statistics_request( const struct get_token_statistics_request *req )
3819 fprintf( stderr, " handle=%04x", req->handle );
3822 static void dump_get_token_statistics_reply( const struct get_token_statistics_reply *req )
3824 dump_luid( " token_id=", &req->token_id );
3825 dump_luid( ", modified_id=", &req->modified_id );
3826 fprintf( stderr, ", primary=%d", req->primary );
3827 fprintf( stderr, ", impersonation_level=%d", req->impersonation_level );
3828 fprintf( stderr, ", group_count=%d", req->group_count );
3829 fprintf( stderr, ", privilege_count=%d", req->privilege_count );
3832 static void dump_create_completion_request( const struct create_completion_request *req )
3834 fprintf( stderr, " access=%08x", req->access );
3835 fprintf( stderr, ", attributes=%08x", req->attributes );
3836 fprintf( stderr, ", concurrent=%08x", req->concurrent );
3837 fprintf( stderr, ", rootdir=%04x", req->rootdir );
3838 dump_varargs_string( ", filename=", cur_size );
3841 static void dump_create_completion_reply( const struct create_completion_reply *req )
3843 fprintf( stderr, " handle=%04x", req->handle );
3846 static void dump_open_completion_request( const struct open_completion_request *req )
3848 fprintf( stderr, " access=%08x", req->access );
3849 fprintf( stderr, ", attributes=%08x", req->attributes );
3850 fprintf( stderr, ", rootdir=%04x", req->rootdir );
3851 dump_varargs_string( ", filename=", cur_size );
3854 static void dump_open_completion_reply( const struct open_completion_reply *req )
3856 fprintf( stderr, " handle=%04x", req->handle );
3859 static void dump_add_completion_request( const struct add_completion_request *req )
3861 fprintf( stderr, " handle=%04x", req->handle );
3862 dump_uint64( ", ckey=", &req->ckey );
3863 dump_uint64( ", cvalue=", &req->cvalue );
3864 fprintf( stderr, ", information=%08x", req->information );
3865 fprintf( stderr, ", status=%08x", req->status );
3868 static void dump_remove_completion_request( const struct remove_completion_request *req )
3870 fprintf( stderr, " handle=%04x", req->handle );
3873 static void dump_remove_completion_reply( const struct remove_completion_reply *req )
3875 dump_uint64( " ckey=", &req->ckey );
3876 dump_uint64( ", cvalue=", &req->cvalue );
3877 fprintf( stderr, ", information=%08x", req->information );
3878 fprintf( stderr, ", status=%08x", req->status );
3881 static void dump_query_completion_request( const struct query_completion_request *req )
3883 fprintf( stderr, " handle=%04x", req->handle );
3886 static void dump_query_completion_reply( const struct query_completion_reply *req )
3888 fprintf( stderr, " depth=%08x", req->depth );
3891 static void dump_set_completion_info_request( const struct set_completion_info_request *req )
3893 fprintf( stderr, " handle=%04x", req->handle );
3894 dump_uint64( ", ckey=", &req->ckey );
3895 fprintf( stderr, ", chandle=%04x", req->chandle );
3898 static void dump_add_fd_completion_request( const struct add_fd_completion_request *req )
3900 fprintf( stderr, " handle=%04x", req->handle );
3901 dump_uint64( ", cvalue=", &req->cvalue );
3902 fprintf( stderr, ", status=%08x", req->status );
3903 fprintf( stderr, ", information=%08x", req->information );
3906 static void dump_get_window_layered_info_request( const struct get_window_layered_info_request *req )
3908 fprintf( stderr, " handle=%08x", req->handle );
3911 static void dump_get_window_layered_info_reply( const struct get_window_layered_info_reply *req )
3913 fprintf( stderr, " color_key=%08x", req->color_key );
3914 fprintf( stderr, ", alpha=%08x", req->alpha );
3915 fprintf( stderr, ", flags=%08x", req->flags );
3918 static void dump_set_window_layered_info_request( const struct set_window_layered_info_request *req )
3920 fprintf( stderr, " handle=%08x", req->handle );
3921 fprintf( stderr, ", color_key=%08x", req->color_key );
3922 fprintf( stderr, ", alpha=%08x", req->alpha );
3923 fprintf( stderr, ", flags=%08x", req->flags );
3926 static void dump_alloc_user_handle_request( const struct alloc_user_handle_request *req )
3930 static void dump_alloc_user_handle_reply( const struct alloc_user_handle_reply *req )
3932 fprintf( stderr, " handle=%08x", req->handle );
3935 static void dump_free_user_handle_request( const struct free_user_handle_request *req )
3937 fprintf( stderr, " handle=%08x", req->handle );
3940 static void dump_set_cursor_request( const struct set_cursor_request *req )
3942 fprintf( stderr, " flags=%08x", req->flags );
3943 fprintf( stderr, ", handle=%08x", req->handle );
3944 fprintf( stderr, ", show_count=%d", req->show_count );
3945 fprintf( stderr, ", x=%d", req->x );
3946 fprintf( stderr, ", y=%d", req->y );
3947 dump_rectangle( ", clip=", &req->clip );
3948 fprintf( stderr, ", clip_msg=%08x", req->clip_msg );
3951 static void dump_set_cursor_reply( const struct set_cursor_reply *req )
3953 fprintf( stderr, " prev_handle=%08x", req->prev_handle );
3954 fprintf( stderr, ", prev_count=%d", req->prev_count );
3955 fprintf( stderr, ", prev_x=%d", req->prev_x );
3956 fprintf( stderr, ", prev_y=%d", req->prev_y );
3957 fprintf( stderr, ", new_x=%d", req->new_x );
3958 fprintf( stderr, ", new_y=%d", req->new_y );
3959 dump_rectangle( ", new_clip=", &req->new_clip );
3960 fprintf( stderr, ", last_change=%08x", req->last_change );
3963 static void dump_update_rawinput_devices_request( const struct update_rawinput_devices_request *req )
3965 dump_varargs_rawinput_devices( " devices=", cur_size );
3968 static void dump_get_suspend_context_request( const struct get_suspend_context_request *req )
3972 static void dump_get_suspend_context_reply( const struct get_suspend_context_reply *req )
3974 dump_varargs_context( " context=", cur_size );
3977 static void dump_set_suspend_context_request( const struct set_suspend_context_request *req )
3979 dump_varargs_context( " context=", cur_size );
3982 static const dump_func req_dumpers[REQ_NB_REQUESTS] = {
3983 (dump_func)dump_new_process_request,
3984 (dump_func)dump_get_new_process_info_request,
3985 (dump_func)dump_new_thread_request,
3986 (dump_func)dump_get_startup_info_request,
3987 (dump_func)dump_init_process_done_request,
3988 (dump_func)dump_init_thread_request,
3989 (dump_func)dump_terminate_process_request,
3990 (dump_func)dump_terminate_thread_request,
3991 (dump_func)dump_get_process_info_request,
3992 (dump_func)dump_set_process_info_request,
3993 (dump_func)dump_get_thread_info_request,
3994 (dump_func)dump_set_thread_info_request,
3995 (dump_func)dump_get_dll_info_request,
3996 (dump_func)dump_suspend_thread_request,
3997 (dump_func)dump_resume_thread_request,
3998 (dump_func)dump_load_dll_request,
3999 (dump_func)dump_unload_dll_request,
4000 (dump_func)dump_queue_apc_request,
4001 (dump_func)dump_get_apc_result_request,
4002 (dump_func)dump_close_handle_request,
4003 (dump_func)dump_set_handle_info_request,
4004 (dump_func)dump_dup_handle_request,
4005 (dump_func)dump_open_process_request,
4006 (dump_func)dump_open_thread_request,
4007 (dump_func)dump_select_request,
4008 (dump_func)dump_create_event_request,
4009 (dump_func)dump_event_op_request,
4010 (dump_func)dump_open_event_request,
4011 (dump_func)dump_create_mutex_request,
4012 (dump_func)dump_release_mutex_request,
4013 (dump_func)dump_open_mutex_request,
4014 (dump_func)dump_create_semaphore_request,
4015 (dump_func)dump_release_semaphore_request,
4016 (dump_func)dump_open_semaphore_request,
4017 (dump_func)dump_create_file_request,
4018 (dump_func)dump_open_file_object_request,
4019 (dump_func)dump_alloc_file_handle_request,
4020 (dump_func)dump_get_handle_unix_name_request,
4021 (dump_func)dump_get_handle_fd_request,
4022 (dump_func)dump_flush_file_request,
4023 (dump_func)dump_lock_file_request,
4024 (dump_func)dump_unlock_file_request,
4025 (dump_func)dump_create_socket_request,
4026 (dump_func)dump_accept_socket_request,
4027 (dump_func)dump_accept_into_socket_request,
4028 (dump_func)dump_set_socket_event_request,
4029 (dump_func)dump_get_socket_event_request,
4030 (dump_func)dump_enable_socket_event_request,
4031 (dump_func)dump_set_socket_deferred_request,
4032 (dump_func)dump_alloc_console_request,
4033 (dump_func)dump_free_console_request,
4034 (dump_func)dump_get_console_renderer_events_request,
4035 (dump_func)dump_open_console_request,
4036 (dump_func)dump_get_console_wait_event_request,
4037 (dump_func)dump_get_console_mode_request,
4038 (dump_func)dump_set_console_mode_request,
4039 (dump_func)dump_set_console_input_info_request,
4040 (dump_func)dump_get_console_input_info_request,
4041 (dump_func)dump_append_console_input_history_request,
4042 (dump_func)dump_get_console_input_history_request,
4043 (dump_func)dump_create_console_output_request,
4044 (dump_func)dump_set_console_output_info_request,
4045 (dump_func)dump_get_console_output_info_request,
4046 (dump_func)dump_write_console_input_request,
4047 (dump_func)dump_read_console_input_request,
4048 (dump_func)dump_write_console_output_request,
4049 (dump_func)dump_fill_console_output_request,
4050 (dump_func)dump_read_console_output_request,
4051 (dump_func)dump_move_console_output_request,
4052 (dump_func)dump_send_console_signal_request,
4053 (dump_func)dump_read_directory_changes_request,
4054 (dump_func)dump_read_change_request,
4055 (dump_func)dump_create_mapping_request,
4056 (dump_func)dump_open_mapping_request,
4057 (dump_func)dump_get_mapping_info_request,
4058 (dump_func)dump_get_mapping_committed_range_request,
4059 (dump_func)dump_add_mapping_committed_range_request,
4060 (dump_func)dump_create_snapshot_request,
4061 (dump_func)dump_next_process_request,
4062 (dump_func)dump_next_thread_request,
4063 (dump_func)dump_wait_debug_event_request,
4064 (dump_func)dump_queue_exception_event_request,
4065 (dump_func)dump_get_exception_status_request,
4066 (dump_func)dump_output_debug_string_request,
4067 (dump_func)dump_continue_debug_event_request,
4068 (dump_func)dump_debug_process_request,
4069 (dump_func)dump_debug_break_request,
4070 (dump_func)dump_set_debugger_kill_on_exit_request,
4071 (dump_func)dump_read_process_memory_request,
4072 (dump_func)dump_write_process_memory_request,
4073 (dump_func)dump_create_key_request,
4074 (dump_func)dump_open_key_request,
4075 (dump_func)dump_delete_key_request,
4076 (dump_func)dump_flush_key_request,
4077 (dump_func)dump_enum_key_request,
4078 (dump_func)dump_set_key_value_request,
4079 (dump_func)dump_get_key_value_request,
4080 (dump_func)dump_enum_key_value_request,
4081 (dump_func)dump_delete_key_value_request,
4082 (dump_func)dump_load_registry_request,
4083 (dump_func)dump_unload_registry_request,
4084 (dump_func)dump_save_registry_request,
4085 (dump_func)dump_set_registry_notification_request,
4086 (dump_func)dump_create_timer_request,
4087 (dump_func)dump_open_timer_request,
4088 (dump_func)dump_set_timer_request,
4089 (dump_func)dump_cancel_timer_request,
4090 (dump_func)dump_get_timer_info_request,
4091 (dump_func)dump_get_thread_context_request,
4092 (dump_func)dump_set_thread_context_request,
4093 (dump_func)dump_get_selector_entry_request,
4094 (dump_func)dump_add_atom_request,
4095 (dump_func)dump_delete_atom_request,
4096 (dump_func)dump_find_atom_request,
4097 (dump_func)dump_get_atom_information_request,
4098 (dump_func)dump_set_atom_information_request,
4099 (dump_func)dump_empty_atom_table_request,
4100 (dump_func)dump_init_atom_table_request,
4101 (dump_func)dump_get_msg_queue_request,
4102 (dump_func)dump_set_queue_fd_request,
4103 (dump_func)dump_set_queue_mask_request,
4104 (dump_func)dump_get_queue_status_request,
4105 (dump_func)dump_get_process_idle_event_request,
4106 (dump_func)dump_send_message_request,
4107 (dump_func)dump_post_quit_message_request,
4108 (dump_func)dump_send_hardware_message_request,
4109 (dump_func)dump_get_message_request,
4110 (dump_func)dump_reply_message_request,
4111 (dump_func)dump_accept_hardware_message_request,
4112 (dump_func)dump_get_message_reply_request,
4113 (dump_func)dump_set_win_timer_request,
4114 (dump_func)dump_kill_win_timer_request,
4115 (dump_func)dump_is_window_hung_request,
4116 (dump_func)dump_get_serial_info_request,
4117 (dump_func)dump_set_serial_info_request,
4118 (dump_func)dump_register_async_request,
4119 (dump_func)dump_cancel_async_request,
4120 (dump_func)dump_ioctl_request,
4121 (dump_func)dump_get_ioctl_result_request,
4122 (dump_func)dump_create_named_pipe_request,
4123 (dump_func)dump_get_named_pipe_info_request,
4124 (dump_func)dump_create_window_request,
4125 (dump_func)dump_destroy_window_request,
4126 (dump_func)dump_get_desktop_window_request,
4127 (dump_func)dump_set_window_owner_request,
4128 (dump_func)dump_get_window_info_request,
4129 (dump_func)dump_set_window_info_request,
4130 (dump_func)dump_set_parent_request,
4131 (dump_func)dump_get_window_parents_request,
4132 (dump_func)dump_get_window_children_request,
4133 (dump_func)dump_get_window_children_from_point_request,
4134 (dump_func)dump_get_window_tree_request,
4135 (dump_func)dump_set_window_pos_request,
4136 (dump_func)dump_get_window_rectangles_request,
4137 (dump_func)dump_get_window_text_request,
4138 (dump_func)dump_set_window_text_request,
4139 (dump_func)dump_get_windows_offset_request,
4140 (dump_func)dump_get_visible_region_request,
4141 (dump_func)dump_get_surface_region_request,
4142 (dump_func)dump_get_window_region_request,
4143 (dump_func)dump_set_window_region_request,
4144 (dump_func)dump_get_update_region_request,
4145 (dump_func)dump_update_window_zorder_request,
4146 (dump_func)dump_redraw_window_request,
4147 (dump_func)dump_set_window_property_request,
4148 (dump_func)dump_remove_window_property_request,
4149 (dump_func)dump_get_window_property_request,
4150 (dump_func)dump_get_window_properties_request,
4151 (dump_func)dump_create_winstation_request,
4152 (dump_func)dump_open_winstation_request,
4153 (dump_func)dump_close_winstation_request,
4154 (dump_func)dump_get_process_winstation_request,
4155 (dump_func)dump_set_process_winstation_request,
4156 (dump_func)dump_enum_winstation_request,
4157 (dump_func)dump_create_desktop_request,
4158 (dump_func)dump_open_desktop_request,
4159 (dump_func)dump_close_desktop_request,
4160 (dump_func)dump_get_thread_desktop_request,
4161 (dump_func)dump_set_thread_desktop_request,
4162 (dump_func)dump_enum_desktop_request,
4163 (dump_func)dump_set_user_object_info_request,
4164 (dump_func)dump_register_hotkey_request,
4165 (dump_func)dump_unregister_hotkey_request,
4166 (dump_func)dump_attach_thread_input_request,
4167 (dump_func)dump_get_thread_input_request,
4168 (dump_func)dump_get_last_input_time_request,
4169 (dump_func)dump_get_key_state_request,
4170 (dump_func)dump_set_key_state_request,
4171 (dump_func)dump_set_foreground_window_request,
4172 (dump_func)dump_set_focus_window_request,
4173 (dump_func)dump_set_active_window_request,
4174 (dump_func)dump_set_capture_window_request,
4175 (dump_func)dump_set_caret_window_request,
4176 (dump_func)dump_set_caret_info_request,
4177 (dump_func)dump_set_hook_request,
4178 (dump_func)dump_remove_hook_request,
4179 (dump_func)dump_start_hook_chain_request,
4180 (dump_func)dump_finish_hook_chain_request,
4181 (dump_func)dump_get_hook_info_request,
4182 (dump_func)dump_create_class_request,
4183 (dump_func)dump_destroy_class_request,
4184 (dump_func)dump_set_class_info_request,
4185 (dump_func)dump_set_clipboard_info_request,
4186 (dump_func)dump_open_token_request,
4187 (dump_func)dump_set_global_windows_request,
4188 (dump_func)dump_adjust_token_privileges_request,
4189 (dump_func)dump_get_token_privileges_request,
4190 (dump_func)dump_check_token_privileges_request,
4191 (dump_func)dump_duplicate_token_request,
4192 (dump_func)dump_access_check_request,
4193 (dump_func)dump_get_token_sid_request,
4194 (dump_func)dump_get_token_groups_request,
4195 (dump_func)dump_get_token_default_dacl_request,
4196 (dump_func)dump_set_token_default_dacl_request,
4197 (dump_func)dump_set_security_object_request,
4198 (dump_func)dump_get_security_object_request,
4199 (dump_func)dump_create_mailslot_request,
4200 (dump_func)dump_set_mailslot_info_request,
4201 (dump_func)dump_create_directory_request,
4202 (dump_func)dump_open_directory_request,
4203 (dump_func)dump_get_directory_entry_request,
4204 (dump_func)dump_create_symlink_request,
4205 (dump_func)dump_open_symlink_request,
4206 (dump_func)dump_query_symlink_request,
4207 (dump_func)dump_get_object_info_request,
4208 (dump_func)dump_unlink_object_request,
4209 (dump_func)dump_get_token_impersonation_level_request,
4210 (dump_func)dump_allocate_locally_unique_id_request,
4211 (dump_func)dump_create_device_manager_request,
4212 (dump_func)dump_create_device_request,
4213 (dump_func)dump_delete_device_request,
4214 (dump_func)dump_get_next_device_request_request,
4215 (dump_func)dump_make_process_system_request,
4216 (dump_func)dump_get_token_statistics_request,
4217 (dump_func)dump_create_completion_request,
4218 (dump_func)dump_open_completion_request,
4219 (dump_func)dump_add_completion_request,
4220 (dump_func)dump_remove_completion_request,
4221 (dump_func)dump_query_completion_request,
4222 (dump_func)dump_set_completion_info_request,
4223 (dump_func)dump_add_fd_completion_request,
4224 (dump_func)dump_get_window_layered_info_request,
4225 (dump_func)dump_set_window_layered_info_request,
4226 (dump_func)dump_alloc_user_handle_request,
4227 (dump_func)dump_free_user_handle_request,
4228 (dump_func)dump_set_cursor_request,
4229 (dump_func)dump_update_rawinput_devices_request,
4230 (dump_func)dump_get_suspend_context_request,
4231 (dump_func)dump_set_suspend_context_request,
4234 static const dump_func reply_dumpers[REQ_NB_REQUESTS] = {
4235 (dump_func)dump_new_process_reply,
4236 (dump_func)dump_get_new_process_info_reply,
4237 (dump_func)dump_new_thread_reply,
4238 (dump_func)dump_get_startup_info_reply,
4239 NULL,
4240 (dump_func)dump_init_thread_reply,
4241 (dump_func)dump_terminate_process_reply,
4242 (dump_func)dump_terminate_thread_reply,
4243 (dump_func)dump_get_process_info_reply,
4244 NULL,
4245 (dump_func)dump_get_thread_info_reply,
4246 NULL,
4247 (dump_func)dump_get_dll_info_reply,
4248 (dump_func)dump_suspend_thread_reply,
4249 (dump_func)dump_resume_thread_reply,
4250 NULL,
4251 NULL,
4252 (dump_func)dump_queue_apc_reply,
4253 (dump_func)dump_get_apc_result_reply,
4254 NULL,
4255 (dump_func)dump_set_handle_info_reply,
4256 (dump_func)dump_dup_handle_reply,
4257 (dump_func)dump_open_process_reply,
4258 (dump_func)dump_open_thread_reply,
4259 (dump_func)dump_select_reply,
4260 (dump_func)dump_create_event_reply,
4261 NULL,
4262 (dump_func)dump_open_event_reply,
4263 (dump_func)dump_create_mutex_reply,
4264 (dump_func)dump_release_mutex_reply,
4265 (dump_func)dump_open_mutex_reply,
4266 (dump_func)dump_create_semaphore_reply,
4267 (dump_func)dump_release_semaphore_reply,
4268 (dump_func)dump_open_semaphore_reply,
4269 (dump_func)dump_create_file_reply,
4270 (dump_func)dump_open_file_object_reply,
4271 (dump_func)dump_alloc_file_handle_reply,
4272 (dump_func)dump_get_handle_unix_name_reply,
4273 (dump_func)dump_get_handle_fd_reply,
4274 (dump_func)dump_flush_file_reply,
4275 (dump_func)dump_lock_file_reply,
4276 NULL,
4277 (dump_func)dump_create_socket_reply,
4278 (dump_func)dump_accept_socket_reply,
4279 NULL,
4280 NULL,
4281 (dump_func)dump_get_socket_event_reply,
4282 NULL,
4283 NULL,
4284 (dump_func)dump_alloc_console_reply,
4285 NULL,
4286 (dump_func)dump_get_console_renderer_events_reply,
4287 (dump_func)dump_open_console_reply,
4288 (dump_func)dump_get_console_wait_event_reply,
4289 (dump_func)dump_get_console_mode_reply,
4290 NULL,
4291 NULL,
4292 (dump_func)dump_get_console_input_info_reply,
4293 NULL,
4294 (dump_func)dump_get_console_input_history_reply,
4295 (dump_func)dump_create_console_output_reply,
4296 NULL,
4297 (dump_func)dump_get_console_output_info_reply,
4298 (dump_func)dump_write_console_input_reply,
4299 (dump_func)dump_read_console_input_reply,
4300 (dump_func)dump_write_console_output_reply,
4301 (dump_func)dump_fill_console_output_reply,
4302 (dump_func)dump_read_console_output_reply,
4303 NULL,
4304 NULL,
4305 NULL,
4306 (dump_func)dump_read_change_reply,
4307 (dump_func)dump_create_mapping_reply,
4308 (dump_func)dump_open_mapping_reply,
4309 (dump_func)dump_get_mapping_info_reply,
4310 (dump_func)dump_get_mapping_committed_range_reply,
4311 NULL,
4312 (dump_func)dump_create_snapshot_reply,
4313 (dump_func)dump_next_process_reply,
4314 (dump_func)dump_next_thread_reply,
4315 (dump_func)dump_wait_debug_event_reply,
4316 (dump_func)dump_queue_exception_event_reply,
4317 (dump_func)dump_get_exception_status_reply,
4318 NULL,
4319 NULL,
4320 NULL,
4321 (dump_func)dump_debug_break_reply,
4322 NULL,
4323 (dump_func)dump_read_process_memory_reply,
4324 NULL,
4325 (dump_func)dump_create_key_reply,
4326 (dump_func)dump_open_key_reply,
4327 NULL,
4328 NULL,
4329 (dump_func)dump_enum_key_reply,
4330 NULL,
4331 (dump_func)dump_get_key_value_reply,
4332 (dump_func)dump_enum_key_value_reply,
4333 NULL,
4334 NULL,
4335 NULL,
4336 NULL,
4337 NULL,
4338 (dump_func)dump_create_timer_reply,
4339 (dump_func)dump_open_timer_reply,
4340 (dump_func)dump_set_timer_reply,
4341 (dump_func)dump_cancel_timer_reply,
4342 (dump_func)dump_get_timer_info_reply,
4343 (dump_func)dump_get_thread_context_reply,
4344 (dump_func)dump_set_thread_context_reply,
4345 (dump_func)dump_get_selector_entry_reply,
4346 (dump_func)dump_add_atom_reply,
4347 NULL,
4348 (dump_func)dump_find_atom_reply,
4349 (dump_func)dump_get_atom_information_reply,
4350 NULL,
4351 NULL,
4352 (dump_func)dump_init_atom_table_reply,
4353 (dump_func)dump_get_msg_queue_reply,
4354 NULL,
4355 (dump_func)dump_set_queue_mask_reply,
4356 (dump_func)dump_get_queue_status_reply,
4357 (dump_func)dump_get_process_idle_event_reply,
4358 NULL,
4359 NULL,
4360 (dump_func)dump_send_hardware_message_reply,
4361 (dump_func)dump_get_message_reply,
4362 NULL,
4363 NULL,
4364 (dump_func)dump_get_message_reply_reply,
4365 (dump_func)dump_set_win_timer_reply,
4366 NULL,
4367 (dump_func)dump_is_window_hung_reply,
4368 (dump_func)dump_get_serial_info_reply,
4369 NULL,
4370 NULL,
4371 NULL,
4372 (dump_func)dump_ioctl_reply,
4373 (dump_func)dump_get_ioctl_result_reply,
4374 (dump_func)dump_create_named_pipe_reply,
4375 (dump_func)dump_get_named_pipe_info_reply,
4376 (dump_func)dump_create_window_reply,
4377 NULL,
4378 (dump_func)dump_get_desktop_window_reply,
4379 (dump_func)dump_set_window_owner_reply,
4380 (dump_func)dump_get_window_info_reply,
4381 (dump_func)dump_set_window_info_reply,
4382 (dump_func)dump_set_parent_reply,
4383 (dump_func)dump_get_window_parents_reply,
4384 (dump_func)dump_get_window_children_reply,
4385 (dump_func)dump_get_window_children_from_point_reply,
4386 (dump_func)dump_get_window_tree_reply,
4387 (dump_func)dump_set_window_pos_reply,
4388 (dump_func)dump_get_window_rectangles_reply,
4389 (dump_func)dump_get_window_text_reply,
4390 NULL,
4391 (dump_func)dump_get_windows_offset_reply,
4392 (dump_func)dump_get_visible_region_reply,
4393 (dump_func)dump_get_surface_region_reply,
4394 (dump_func)dump_get_window_region_reply,
4395 NULL,
4396 (dump_func)dump_get_update_region_reply,
4397 NULL,
4398 NULL,
4399 NULL,
4400 (dump_func)dump_remove_window_property_reply,
4401 (dump_func)dump_get_window_property_reply,
4402 (dump_func)dump_get_window_properties_reply,
4403 (dump_func)dump_create_winstation_reply,
4404 (dump_func)dump_open_winstation_reply,
4405 NULL,
4406 (dump_func)dump_get_process_winstation_reply,
4407 NULL,
4408 (dump_func)dump_enum_winstation_reply,
4409 (dump_func)dump_create_desktop_reply,
4410 (dump_func)dump_open_desktop_reply,
4411 NULL,
4412 (dump_func)dump_get_thread_desktop_reply,
4413 NULL,
4414 (dump_func)dump_enum_desktop_reply,
4415 (dump_func)dump_set_user_object_info_reply,
4416 (dump_func)dump_register_hotkey_reply,
4417 (dump_func)dump_unregister_hotkey_reply,
4418 NULL,
4419 (dump_func)dump_get_thread_input_reply,
4420 (dump_func)dump_get_last_input_time_reply,
4421 (dump_func)dump_get_key_state_reply,
4422 NULL,
4423 (dump_func)dump_set_foreground_window_reply,
4424 (dump_func)dump_set_focus_window_reply,
4425 (dump_func)dump_set_active_window_reply,
4426 (dump_func)dump_set_capture_window_reply,
4427 (dump_func)dump_set_caret_window_reply,
4428 (dump_func)dump_set_caret_info_reply,
4429 (dump_func)dump_set_hook_reply,
4430 (dump_func)dump_remove_hook_reply,
4431 (dump_func)dump_start_hook_chain_reply,
4432 NULL,
4433 (dump_func)dump_get_hook_info_reply,
4434 (dump_func)dump_create_class_reply,
4435 (dump_func)dump_destroy_class_reply,
4436 (dump_func)dump_set_class_info_reply,
4437 (dump_func)dump_set_clipboard_info_reply,
4438 (dump_func)dump_open_token_reply,
4439 (dump_func)dump_set_global_windows_reply,
4440 (dump_func)dump_adjust_token_privileges_reply,
4441 (dump_func)dump_get_token_privileges_reply,
4442 (dump_func)dump_check_token_privileges_reply,
4443 (dump_func)dump_duplicate_token_reply,
4444 (dump_func)dump_access_check_reply,
4445 (dump_func)dump_get_token_sid_reply,
4446 (dump_func)dump_get_token_groups_reply,
4447 (dump_func)dump_get_token_default_dacl_reply,
4448 NULL,
4449 NULL,
4450 (dump_func)dump_get_security_object_reply,
4451 (dump_func)dump_create_mailslot_reply,
4452 (dump_func)dump_set_mailslot_info_reply,
4453 (dump_func)dump_create_directory_reply,
4454 (dump_func)dump_open_directory_reply,
4455 (dump_func)dump_get_directory_entry_reply,
4456 (dump_func)dump_create_symlink_reply,
4457 (dump_func)dump_open_symlink_reply,
4458 (dump_func)dump_query_symlink_reply,
4459 (dump_func)dump_get_object_info_reply,
4460 NULL,
4461 (dump_func)dump_get_token_impersonation_level_reply,
4462 (dump_func)dump_allocate_locally_unique_id_reply,
4463 (dump_func)dump_create_device_manager_reply,
4464 (dump_func)dump_create_device_reply,
4465 NULL,
4466 (dump_func)dump_get_next_device_request_reply,
4467 (dump_func)dump_make_process_system_reply,
4468 (dump_func)dump_get_token_statistics_reply,
4469 (dump_func)dump_create_completion_reply,
4470 (dump_func)dump_open_completion_reply,
4471 NULL,
4472 (dump_func)dump_remove_completion_reply,
4473 (dump_func)dump_query_completion_reply,
4474 NULL,
4475 NULL,
4476 (dump_func)dump_get_window_layered_info_reply,
4477 NULL,
4478 (dump_func)dump_alloc_user_handle_reply,
4479 NULL,
4480 (dump_func)dump_set_cursor_reply,
4481 NULL,
4482 (dump_func)dump_get_suspend_context_reply,
4483 NULL,
4486 static const char * const req_names[REQ_NB_REQUESTS] = {
4487 "new_process",
4488 "get_new_process_info",
4489 "new_thread",
4490 "get_startup_info",
4491 "init_process_done",
4492 "init_thread",
4493 "terminate_process",
4494 "terminate_thread",
4495 "get_process_info",
4496 "set_process_info",
4497 "get_thread_info",
4498 "set_thread_info",
4499 "get_dll_info",
4500 "suspend_thread",
4501 "resume_thread",
4502 "load_dll",
4503 "unload_dll",
4504 "queue_apc",
4505 "get_apc_result",
4506 "close_handle",
4507 "set_handle_info",
4508 "dup_handle",
4509 "open_process",
4510 "open_thread",
4511 "select",
4512 "create_event",
4513 "event_op",
4514 "open_event",
4515 "create_mutex",
4516 "release_mutex",
4517 "open_mutex",
4518 "create_semaphore",
4519 "release_semaphore",
4520 "open_semaphore",
4521 "create_file",
4522 "open_file_object",
4523 "alloc_file_handle",
4524 "get_handle_unix_name",
4525 "get_handle_fd",
4526 "flush_file",
4527 "lock_file",
4528 "unlock_file",
4529 "create_socket",
4530 "accept_socket",
4531 "accept_into_socket",
4532 "set_socket_event",
4533 "get_socket_event",
4534 "enable_socket_event",
4535 "set_socket_deferred",
4536 "alloc_console",
4537 "free_console",
4538 "get_console_renderer_events",
4539 "open_console",
4540 "get_console_wait_event",
4541 "get_console_mode",
4542 "set_console_mode",
4543 "set_console_input_info",
4544 "get_console_input_info",
4545 "append_console_input_history",
4546 "get_console_input_history",
4547 "create_console_output",
4548 "set_console_output_info",
4549 "get_console_output_info",
4550 "write_console_input",
4551 "read_console_input",
4552 "write_console_output",
4553 "fill_console_output",
4554 "read_console_output",
4555 "move_console_output",
4556 "send_console_signal",
4557 "read_directory_changes",
4558 "read_change",
4559 "create_mapping",
4560 "open_mapping",
4561 "get_mapping_info",
4562 "get_mapping_committed_range",
4563 "add_mapping_committed_range",
4564 "create_snapshot",
4565 "next_process",
4566 "next_thread",
4567 "wait_debug_event",
4568 "queue_exception_event",
4569 "get_exception_status",
4570 "output_debug_string",
4571 "continue_debug_event",
4572 "debug_process",
4573 "debug_break",
4574 "set_debugger_kill_on_exit",
4575 "read_process_memory",
4576 "write_process_memory",
4577 "create_key",
4578 "open_key",
4579 "delete_key",
4580 "flush_key",
4581 "enum_key",
4582 "set_key_value",
4583 "get_key_value",
4584 "enum_key_value",
4585 "delete_key_value",
4586 "load_registry",
4587 "unload_registry",
4588 "save_registry",
4589 "set_registry_notification",
4590 "create_timer",
4591 "open_timer",
4592 "set_timer",
4593 "cancel_timer",
4594 "get_timer_info",
4595 "get_thread_context",
4596 "set_thread_context",
4597 "get_selector_entry",
4598 "add_atom",
4599 "delete_atom",
4600 "find_atom",
4601 "get_atom_information",
4602 "set_atom_information",
4603 "empty_atom_table",
4604 "init_atom_table",
4605 "get_msg_queue",
4606 "set_queue_fd",
4607 "set_queue_mask",
4608 "get_queue_status",
4609 "get_process_idle_event",
4610 "send_message",
4611 "post_quit_message",
4612 "send_hardware_message",
4613 "get_message",
4614 "reply_message",
4615 "accept_hardware_message",
4616 "get_message_reply",
4617 "set_win_timer",
4618 "kill_win_timer",
4619 "is_window_hung",
4620 "get_serial_info",
4621 "set_serial_info",
4622 "register_async",
4623 "cancel_async",
4624 "ioctl",
4625 "get_ioctl_result",
4626 "create_named_pipe",
4627 "get_named_pipe_info",
4628 "create_window",
4629 "destroy_window",
4630 "get_desktop_window",
4631 "set_window_owner",
4632 "get_window_info",
4633 "set_window_info",
4634 "set_parent",
4635 "get_window_parents",
4636 "get_window_children",
4637 "get_window_children_from_point",
4638 "get_window_tree",
4639 "set_window_pos",
4640 "get_window_rectangles",
4641 "get_window_text",
4642 "set_window_text",
4643 "get_windows_offset",
4644 "get_visible_region",
4645 "get_surface_region",
4646 "get_window_region",
4647 "set_window_region",
4648 "get_update_region",
4649 "update_window_zorder",
4650 "redraw_window",
4651 "set_window_property",
4652 "remove_window_property",
4653 "get_window_property",
4654 "get_window_properties",
4655 "create_winstation",
4656 "open_winstation",
4657 "close_winstation",
4658 "get_process_winstation",
4659 "set_process_winstation",
4660 "enum_winstation",
4661 "create_desktop",
4662 "open_desktop",
4663 "close_desktop",
4664 "get_thread_desktop",
4665 "set_thread_desktop",
4666 "enum_desktop",
4667 "set_user_object_info",
4668 "register_hotkey",
4669 "unregister_hotkey",
4670 "attach_thread_input",
4671 "get_thread_input",
4672 "get_last_input_time",
4673 "get_key_state",
4674 "set_key_state",
4675 "set_foreground_window",
4676 "set_focus_window",
4677 "set_active_window",
4678 "set_capture_window",
4679 "set_caret_window",
4680 "set_caret_info",
4681 "set_hook",
4682 "remove_hook",
4683 "start_hook_chain",
4684 "finish_hook_chain",
4685 "get_hook_info",
4686 "create_class",
4687 "destroy_class",
4688 "set_class_info",
4689 "set_clipboard_info",
4690 "open_token",
4691 "set_global_windows",
4692 "adjust_token_privileges",
4693 "get_token_privileges",
4694 "check_token_privileges",
4695 "duplicate_token",
4696 "access_check",
4697 "get_token_sid",
4698 "get_token_groups",
4699 "get_token_default_dacl",
4700 "set_token_default_dacl",
4701 "set_security_object",
4702 "get_security_object",
4703 "create_mailslot",
4704 "set_mailslot_info",
4705 "create_directory",
4706 "open_directory",
4707 "get_directory_entry",
4708 "create_symlink",
4709 "open_symlink",
4710 "query_symlink",
4711 "get_object_info",
4712 "unlink_object",
4713 "get_token_impersonation_level",
4714 "allocate_locally_unique_id",
4715 "create_device_manager",
4716 "create_device",
4717 "delete_device",
4718 "get_next_device_request",
4719 "make_process_system",
4720 "get_token_statistics",
4721 "create_completion",
4722 "open_completion",
4723 "add_completion",
4724 "remove_completion",
4725 "query_completion",
4726 "set_completion_info",
4727 "add_fd_completion",
4728 "get_window_layered_info",
4729 "set_window_layered_info",
4730 "alloc_user_handle",
4731 "free_user_handle",
4732 "set_cursor",
4733 "update_rawinput_devices",
4734 "get_suspend_context",
4735 "set_suspend_context",
4738 static const struct
4740 const char *name;
4741 unsigned int value;
4742 } status_names[] =
4744 { "ABANDONED_WAIT_0", STATUS_ABANDONED_WAIT_0 },
4745 { "ACCESS_DENIED", STATUS_ACCESS_DENIED },
4746 { "ACCESS_VIOLATION", STATUS_ACCESS_VIOLATION },
4747 { "ADDRESS_ALREADY_ASSOCIATED", STATUS_ADDRESS_ALREADY_ASSOCIATED },
4748 { "ALERTED", STATUS_ALERTED },
4749 { "ALIAS_EXISTS", STATUS_ALIAS_EXISTS },
4750 { "BAD_DEVICE_TYPE", STATUS_BAD_DEVICE_TYPE },
4751 { "BAD_IMPERSONATION_LEVEL", STATUS_BAD_IMPERSONATION_LEVEL },
4752 { "BREAKPOINT", STATUS_BREAKPOINT },
4753 { "BUFFER_OVERFLOW", STATUS_BUFFER_OVERFLOW },
4754 { "BUFFER_TOO_SMALL", STATUS_BUFFER_TOO_SMALL },
4755 { "CANCELLED", STATUS_CANCELLED },
4756 { "CANNOT_DELETE", STATUS_CANNOT_DELETE },
4757 { "CANT_OPEN_ANONYMOUS", STATUS_CANT_OPEN_ANONYMOUS },
4758 { "CANT_WAIT", STATUS_CANT_WAIT },
4759 { "CHILD_MUST_BE_VOLATILE", STATUS_CHILD_MUST_BE_VOLATILE },
4760 { "CONNECTION_ABORTED", STATUS_CONNECTION_ABORTED },
4761 { "CONNECTION_DISCONNECTED", STATUS_CONNECTION_DISCONNECTED },
4762 { "CONNECTION_REFUSED", STATUS_CONNECTION_REFUSED },
4763 { "CONNECTION_RESET", STATUS_CONNECTION_RESET },
4764 { "DEBUGGER_INACTIVE", STATUS_DEBUGGER_INACTIVE },
4765 { "DEVICE_BUSY", STATUS_DEVICE_BUSY },
4766 { "DIRECTORY_NOT_EMPTY", STATUS_DIRECTORY_NOT_EMPTY },
4767 { "DISK_FULL", STATUS_DISK_FULL },
4768 { "DLL_NOT_FOUND", STATUS_DLL_NOT_FOUND },
4769 { "ERROR_CLASS_ALREADY_EXISTS", 0xc0010000 | ERROR_CLASS_ALREADY_EXISTS },
4770 { "ERROR_CLASS_DOES_NOT_EXIST", 0xc0010000 | ERROR_CLASS_DOES_NOT_EXIST },
4771 { "ERROR_CLASS_HAS_WINDOWS", 0xc0010000 | ERROR_CLASS_HAS_WINDOWS },
4772 { "ERROR_CLIPBOARD_NOT_OPEN", 0xc0010000 | ERROR_CLIPBOARD_NOT_OPEN },
4773 { "ERROR_HOTKEY_ALREADY_REGISTERED", 0xc0010000 | ERROR_HOTKEY_ALREADY_REGISTERED },
4774 { "ERROR_HOTKEY_NOT_REGISTERED", 0xc0010000 | ERROR_HOTKEY_NOT_REGISTERED },
4775 { "ERROR_INVALID_CURSOR_HANDLE", 0xc0010000 | ERROR_INVALID_CURSOR_HANDLE },
4776 { "ERROR_INVALID_INDEX", 0xc0010000 | ERROR_INVALID_INDEX },
4777 { "ERROR_INVALID_WINDOW_HANDLE", 0xc0010000 | ERROR_INVALID_WINDOW_HANDLE },
4778 { "ERROR_WINDOW_OF_OTHER_THREAD", 0xc0010000 | ERROR_WINDOW_OF_OTHER_THREAD },
4779 { "FILE_DELETED", STATUS_FILE_DELETED },
4780 { "FILE_IS_A_DIRECTORY", STATUS_FILE_IS_A_DIRECTORY },
4781 { "FILE_LOCK_CONFLICT", STATUS_FILE_LOCK_CONFLICT },
4782 { "GENERIC_NOT_MAPPED", STATUS_GENERIC_NOT_MAPPED },
4783 { "HANDLES_CLOSED", STATUS_HANDLES_CLOSED },
4784 { "HANDLE_NOT_CLOSABLE", STATUS_HANDLE_NOT_CLOSABLE },
4785 { "HOST_UNREACHABLE", STATUS_HOST_UNREACHABLE },
4786 { "ILLEGAL_FUNCTION", STATUS_ILLEGAL_FUNCTION },
4787 { "INSTANCE_NOT_AVAILABLE", STATUS_INSTANCE_NOT_AVAILABLE },
4788 { "INSUFFICIENT_RESOURCES", STATUS_INSUFFICIENT_RESOURCES },
4789 { "INVALID_CID", STATUS_INVALID_CID },
4790 { "INVALID_DEVICE_REQUEST", STATUS_INVALID_DEVICE_REQUEST },
4791 { "INVALID_FILE_FOR_SECTION", STATUS_INVALID_FILE_FOR_SECTION },
4792 { "INVALID_HANDLE", STATUS_INVALID_HANDLE },
4793 { "INVALID_PARAMETER", STATUS_INVALID_PARAMETER },
4794 { "INVALID_SECURITY_DESCR", STATUS_INVALID_SECURITY_DESCR },
4795 { "IO_TIMEOUT", STATUS_IO_TIMEOUT },
4796 { "KEY_DELETED", STATUS_KEY_DELETED },
4797 { "MAPPED_FILE_SIZE_ZERO", STATUS_MAPPED_FILE_SIZE_ZERO },
4798 { "MORE_PROCESSING_REQUIRED", STATUS_MORE_PROCESSING_REQUIRED },
4799 { "MUTANT_NOT_OWNED", STATUS_MUTANT_NOT_OWNED },
4800 { "NAME_TOO_LONG", STATUS_NAME_TOO_LONG },
4801 { "NETWORK_BUSY", STATUS_NETWORK_BUSY },
4802 { "NETWORK_UNREACHABLE", STATUS_NETWORK_UNREACHABLE },
4803 { "NOTIFY_ENUM_DIR", STATUS_NOTIFY_ENUM_DIR },
4804 { "NOT_ALL_ASSIGNED", STATUS_NOT_ALL_ASSIGNED },
4805 { "NOT_A_DIRECTORY", STATUS_NOT_A_DIRECTORY },
4806 { "NOT_FOUND", STATUS_NOT_FOUND },
4807 { "NOT_IMPLEMENTED", STATUS_NOT_IMPLEMENTED },
4808 { "NOT_REGISTRY_FILE", STATUS_NOT_REGISTRY_FILE },
4809 { "NOT_SUPPORTED", STATUS_NOT_SUPPORTED },
4810 { "NO_DATA_DETECTED", STATUS_NO_DATA_DETECTED },
4811 { "NO_IMPERSONATION_TOKEN", STATUS_NO_IMPERSONATION_TOKEN },
4812 { "NO_MEMORY", STATUS_NO_MEMORY },
4813 { "NO_MORE_ENTRIES", STATUS_NO_MORE_ENTRIES },
4814 { "NO_MORE_FILES", STATUS_NO_MORE_FILES },
4815 { "NO_SUCH_DEVICE", STATUS_NO_SUCH_DEVICE },
4816 { "NO_SUCH_FILE", STATUS_NO_SUCH_FILE },
4817 { "NO_TOKEN", STATUS_NO_TOKEN },
4818 { "OBJECT_NAME_COLLISION", STATUS_OBJECT_NAME_COLLISION },
4819 { "OBJECT_NAME_EXISTS", STATUS_OBJECT_NAME_EXISTS },
4820 { "OBJECT_NAME_INVALID", STATUS_OBJECT_NAME_INVALID },
4821 { "OBJECT_NAME_NOT_FOUND", STATUS_OBJECT_NAME_NOT_FOUND },
4822 { "OBJECT_PATH_INVALID", STATUS_OBJECT_PATH_INVALID },
4823 { "OBJECT_PATH_NOT_FOUND", STATUS_OBJECT_PATH_NOT_FOUND },
4824 { "OBJECT_PATH_SYNTAX_BAD", STATUS_OBJECT_PATH_SYNTAX_BAD },
4825 { "OBJECT_TYPE_MISMATCH", STATUS_OBJECT_TYPE_MISMATCH },
4826 { "PENDING", STATUS_PENDING },
4827 { "PIPE_BUSY", STATUS_PIPE_BUSY },
4828 { "PIPE_CONNECTED", STATUS_PIPE_CONNECTED },
4829 { "PIPE_DISCONNECTED", STATUS_PIPE_DISCONNECTED },
4830 { "PIPE_LISTENING", STATUS_PIPE_LISTENING },
4831 { "PIPE_NOT_AVAILABLE", STATUS_PIPE_NOT_AVAILABLE },
4832 { "PRIVILEGE_NOT_HELD", STATUS_PRIVILEGE_NOT_HELD },
4833 { "PROCESS_IS_TERMINATING", STATUS_PROCESS_IS_TERMINATING },
4834 { "SECTION_TOO_BIG", STATUS_SECTION_TOO_BIG },
4835 { "SEMAPHORE_LIMIT_EXCEEDED", STATUS_SEMAPHORE_LIMIT_EXCEEDED },
4836 { "SHARING_VIOLATION", STATUS_SHARING_VIOLATION },
4837 { "SHUTDOWN_IN_PROGRESS", STATUS_SHUTDOWN_IN_PROGRESS },
4838 { "SUSPEND_COUNT_EXCEEDED", STATUS_SUSPEND_COUNT_EXCEEDED },
4839 { "THREAD_IS_TERMINATING", STATUS_THREAD_IS_TERMINATING },
4840 { "TIMEOUT", STATUS_TIMEOUT },
4841 { "TOO_MANY_OPENED_FILES", STATUS_TOO_MANY_OPENED_FILES },
4842 { "UNSUCCESSFUL", STATUS_UNSUCCESSFUL },
4843 { "USER_APC", STATUS_USER_APC },
4844 { "USER_MAPPED_FILE", STATUS_USER_MAPPED_FILE },
4845 { "VOLUME_DISMOUNTED", STATUS_VOLUME_DISMOUNTED },
4846 { "WAS_LOCKED", STATUS_WAS_LOCKED },
4847 { NULL, 0 }
4850 /* ### make_requests end ### */
4851 /* Everything above this line is generated automatically by tools/make_requests */
4853 static const char *get_status_name( unsigned int status )
4855 int i;
4856 static char buffer[10];
4858 if (status)
4860 for (i = 0; status_names[i].name; i++)
4861 if (status_names[i].value == status) return status_names[i].name;
4863 sprintf( buffer, "%x", status );
4864 return buffer;
4867 void trace_request(void)
4869 enum request req = current->req.request_header.req;
4870 if (req < REQ_NB_REQUESTS)
4872 fprintf( stderr, "%04x: %s(", current->id, req_names[req] );
4873 if (req_dumpers[req])
4875 cur_data = get_req_data();
4876 cur_size = get_req_data_size();
4877 req_dumpers[req]( &current->req );
4879 fprintf( stderr, " )\n" );
4881 else fprintf( stderr, "%04x: %d(?)\n", current->id, req );
4884 void trace_reply( enum request req, const union generic_reply *reply )
4886 if (req < REQ_NB_REQUESTS)
4888 fprintf( stderr, "%04x: %s() = %s",
4889 current->id, req_names[req], get_status_name(current->error) );
4890 if (reply_dumpers[req])
4892 fprintf( stderr, " {" );
4893 cur_data = current->reply_data;
4894 cur_size = reply->reply_header.reply_size;
4895 reply_dumpers[req]( reply );
4896 fprintf( stderr, " }" );
4898 fputc( '\n', stderr );
4900 else fprintf( stderr, "%04x: %d() = %s\n",
4901 current->id, req, get_status_name(current->error) );