wined3d: Get rid of the "AlwaysOffscreen" setting.
[wine.git] / server / trace.c
blobe0ce45af6d4570eaffae9a02c651c41e0f864901
1 /*
2 * Server request tracing
4 * Copyright (C) 1999 Alexandre Julliard
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #include "config.h"
22 #include "wine/port.h"
24 #include <ctype.h>
25 #include <stdarg.h>
26 #include <stdio.h>
27 #include <sys/types.h>
29 #ifdef HAVE_SYS_UIO_H
30 #include <sys/uio.h>
31 #endif
33 #include "ntstatus.h"
34 #define WIN32_NO_STATUS
35 #include "windef.h"
36 #include "winbase.h"
37 #include "wincon.h"
38 #include "winternl.h"
39 #include "winuser.h"
40 #include "winioctl.h"
41 #include "ddk/wdm.h"
42 #define USE_WS_PREFIX
43 #include "winsock2.h"
44 #include "file.h"
45 #include "request.h"
46 #include "unicode.h"
48 static const void *cur_data;
49 static data_size_t cur_size;
51 static const char *get_status_name( unsigned int status );
53 /* utility functions */
55 static inline void remove_data( data_size_t size )
57 cur_data = (const char *)cur_data + size;
58 cur_size -= size;
61 static void dump_uints( const char *prefix, const unsigned int *ptr, int len )
63 fprintf( stderr, "%s{", prefix );
64 while (len > 0)
66 fprintf( stderr, "%08x", *ptr++ );
67 if (--len) fputc( ',', stderr );
69 fputc( '}', stderr );
72 static void dump_handles( const char *prefix, const obj_handle_t *data, data_size_t size )
74 data_size_t len = size / sizeof(*data);
76 fprintf( stderr,"%s{", prefix );
77 while (len > 0)
79 fprintf( stderr, "%04x", *data++ );
80 if (--len) fputc( ',', stderr );
82 fputc( '}', stderr );
85 static void dump_timeout( const char *prefix, const timeout_t *time )
87 fprintf( stderr, "%s%s", prefix, get_timeout_str(*time) );
90 static void dump_uint64( const char *prefix, const unsigned __int64 *val )
92 if ((unsigned int)*val != *val)
93 fprintf( stderr, "%s%x%08x", prefix, (unsigned int)(*val >> 32), (unsigned int)*val );
94 else
95 fprintf( stderr, "%s%08x", prefix, (unsigned int)*val );
98 static void dump_rectangle( const char *prefix, const rectangle_t *rect )
100 fprintf( stderr, "%s{%d,%d;%d,%d}", prefix,
101 rect->left, rect->top, rect->right, rect->bottom );
104 static void dump_char_info( const char *prefix, const char_info_t *info )
106 fprintf( stderr, "%s{'", prefix );
107 dump_strW( &info->ch, 1, stderr, "\'\'" );
108 fprintf( stderr, "',%04x}", info->attr );
111 static void dump_ioctl_code( const char *prefix, const ioctl_code_t *code )
113 switch(*code)
115 #define CASE(c) case c: fprintf( stderr, "%s%s", prefix, #c ); break
116 CASE(FSCTL_DISMOUNT_VOLUME);
117 CASE(FSCTL_PIPE_DISCONNECT);
118 CASE(FSCTL_PIPE_LISTEN);
119 CASE(FSCTL_PIPE_WAIT);
120 CASE(WS_SIO_ADDRESS_LIST_CHANGE);
121 default: fprintf( stderr, "%s%08x", prefix, *code ); break;
122 #undef CASE
126 static void dump_cpu_type( const char *prefix, const cpu_type_t *code )
128 switch (*code)
130 #define CASE(c) case CPU_##c: fprintf( stderr, "%s%s", prefix, #c ); break
131 CASE(x86);
132 CASE(x86_64);
133 CASE(POWERPC);
134 CASE(ARM);
135 CASE(ARM64);
136 default: fprintf( stderr, "%s%u", prefix, *code ); break;
137 #undef CASE
141 static void dump_apc_call( const char *prefix, const apc_call_t *call )
143 fprintf( stderr, "%s{", prefix );
144 switch(call->type)
146 case APC_NONE:
147 fprintf( stderr, "APC_NONE" );
148 break;
149 case APC_USER:
150 dump_uint64( "APC_USER,func=", &call->user.func );
151 dump_uint64( ",args={", &call->user.args[0] );
152 dump_uint64( ",", &call->user.args[1] );
153 dump_uint64( ",", &call->user.args[2] );
154 fputc( '}', stderr );
155 break;
156 case APC_TIMER:
157 dump_timeout( "APC_TIMER,time=", &call->timer.time );
158 dump_uint64( ",arg=", &call->timer.arg );
159 break;
160 case APC_ASYNC_IO:
161 dump_uint64( "APC_ASYNC_IO,func=", &call->async_io.func );
162 dump_uint64( ",user=", &call->async_io.user );
163 dump_uint64( ",sb=", &call->async_io.sb );
164 fprintf( stderr, ",status=%s", get_status_name(call->async_io.status) );
165 break;
166 case APC_VIRTUAL_ALLOC:
167 dump_uint64( "APC_VIRTUAL_ALLOC,addr==", &call->virtual_alloc.addr );
168 dump_uint64( ",size=", &call->virtual_alloc.size );
169 fprintf( stderr, ",zero_bits=%u,op_type=%x,prot=%x",
170 call->virtual_alloc.zero_bits, call->virtual_alloc.op_type,
171 call->virtual_alloc.prot );
172 break;
173 case APC_VIRTUAL_FREE:
174 dump_uint64( "APC_VIRTUAL_FREE,addr=", &call->virtual_free.addr );
175 dump_uint64( ",size=", &call->virtual_free.size );
176 fprintf( stderr, ",op_type=%x", call->virtual_free.op_type );
177 break;
178 case APC_VIRTUAL_QUERY:
179 dump_uint64( "APC_VIRTUAL_QUERY,addr=", &call->virtual_query.addr );
180 break;
181 case APC_VIRTUAL_PROTECT:
182 dump_uint64( "APC_VIRTUAL_PROTECT,addr=", &call->virtual_protect.addr );
183 dump_uint64( ",size=", &call->virtual_protect.size );
184 fprintf( stderr, ",prot=%x", call->virtual_protect.prot );
185 break;
186 case APC_VIRTUAL_FLUSH:
187 dump_uint64( "APC_VIRTUAL_FLUSH,addr=", &call->virtual_flush.addr );
188 dump_uint64( ",size=", &call->virtual_flush.size );
189 break;
190 case APC_VIRTUAL_LOCK:
191 dump_uint64( "APC_VIRTUAL_LOCK,addr=", &call->virtual_lock.addr );
192 dump_uint64( ",size=", &call->virtual_lock.size );
193 break;
194 case APC_VIRTUAL_UNLOCK:
195 dump_uint64( "APC_VIRTUAL_UNLOCK,addr=", &call->virtual_unlock.addr );
196 dump_uint64( ",size=", &call->virtual_unlock.size );
197 break;
198 case APC_MAP_VIEW:
199 fprintf( stderr, "APC_MAP_VIEW,handle=%04x", call->map_view.handle );
200 dump_uint64( ",addr=", &call->map_view.addr );
201 dump_uint64( ",size=", &call->map_view.size );
202 dump_uint64( ",offset=", &call->map_view.offset );
203 fprintf( stderr, ",zero_bits=%u,alloc_type=%x,prot=%x",
204 call->map_view.zero_bits, call->map_view.alloc_type, call->map_view.prot );
205 break;
206 case APC_UNMAP_VIEW:
207 dump_uint64( "APC_UNMAP_VIEW,addr=", &call->unmap_view.addr );
208 break;
209 case APC_CREATE_THREAD:
210 dump_uint64( "APC_CREATE_THREAD,func=", &call->create_thread.func );
211 dump_uint64( ",arg=", &call->create_thread.arg );
212 dump_uint64( ",reserve=", &call->create_thread.reserve );
213 dump_uint64( ",commit=", &call->create_thread.commit );
214 fprintf( stderr, ",suspend=%u", call->create_thread.suspend );
215 break;
216 default:
217 fprintf( stderr, "type=%u", call->type );
218 break;
220 fputc( '}', stderr );
223 static void dump_apc_result( const char *prefix, const apc_result_t *result )
225 fprintf( stderr, "%s{", prefix );
226 switch(result->type)
228 case APC_NONE:
229 break;
230 case APC_ASYNC_IO:
231 fprintf( stderr, "APC_ASYNC_IO,status=%s,total=%u",
232 get_status_name( result->async_io.status ), result->async_io.total );
233 dump_uint64( ",apc=", &result->async_io.apc );
234 dump_uint64( ",arg=", &result->async_io.arg );
235 break;
236 case APC_VIRTUAL_ALLOC:
237 fprintf( stderr, "APC_VIRTUAL_ALLOC,status=%s",
238 get_status_name( result->virtual_alloc.status ));
239 dump_uint64( ",addr=", &result->virtual_alloc.addr );
240 dump_uint64( ",size=", &result->virtual_alloc.size );
241 break;
242 case APC_VIRTUAL_FREE:
243 fprintf( stderr, "APC_VIRTUAL_FREE,status=%s",
244 get_status_name( result->virtual_free.status ));
245 dump_uint64( ",addr=", &result->virtual_free.addr );
246 dump_uint64( ",size=", &result->virtual_free.size );
247 break;
248 case APC_VIRTUAL_QUERY:
249 fprintf( stderr, "APC_VIRTUAL_QUERY,status=%s",
250 get_status_name( result->virtual_query.status ));
251 dump_uint64( ",base=", &result->virtual_query.base );
252 dump_uint64( ",alloc_base=", &result->virtual_query.alloc_base );
253 dump_uint64( ",size=", &result->virtual_query.size );
254 fprintf( stderr, ",state=%x,prot=%x,alloc_prot=%x,alloc_type=%x",
255 result->virtual_query.state, result->virtual_query.prot,
256 result->virtual_query.alloc_prot, result->virtual_query.alloc_type );
257 break;
258 case APC_VIRTUAL_PROTECT:
259 fprintf( stderr, "APC_VIRTUAL_PROTECT,status=%s",
260 get_status_name( result->virtual_protect.status ));
261 dump_uint64( ",addr=", &result->virtual_protect.addr );
262 dump_uint64( ",size=", &result->virtual_protect.size );
263 fprintf( stderr, ",prot=%x", result->virtual_protect.prot );
264 break;
265 case APC_VIRTUAL_FLUSH:
266 fprintf( stderr, "APC_VIRTUAL_FLUSH,status=%s",
267 get_status_name( result->virtual_flush.status ));
268 dump_uint64( ",addr=", &result->virtual_flush.addr );
269 dump_uint64( ",size=", &result->virtual_flush.size );
270 break;
271 case APC_VIRTUAL_LOCK:
272 fprintf( stderr, "APC_VIRTUAL_LOCK,status=%s",
273 get_status_name( result->virtual_lock.status ));
274 dump_uint64( ",addr=", &result->virtual_lock.addr );
275 dump_uint64( ",size=", &result->virtual_lock.size );
276 break;
277 case APC_VIRTUAL_UNLOCK:
278 fprintf( stderr, "APC_VIRTUAL_UNLOCK,status=%s",
279 get_status_name( result->virtual_unlock.status ));
280 dump_uint64( ",addr=", &result->virtual_unlock.addr );
281 dump_uint64( ",size=", &result->virtual_unlock.size );
282 break;
283 case APC_MAP_VIEW:
284 fprintf( stderr, "APC_MAP_VIEW,status=%s",
285 get_status_name( result->map_view.status ));
286 dump_uint64( ",addr=", &result->map_view.addr );
287 dump_uint64( ",size=", &result->map_view.size );
288 break;
289 case APC_UNMAP_VIEW:
290 fprintf( stderr, "APC_UNMAP_VIEW,status=%s",
291 get_status_name( result->unmap_view.status ) );
292 break;
293 case APC_CREATE_THREAD:
294 fprintf( stderr, "APC_CREATE_THREAD,status=%s,tid=%04x,handle=%04x",
295 get_status_name( result->create_thread.status ),
296 result->create_thread.tid, result->create_thread.handle );
297 break;
298 default:
299 fprintf( stderr, "type=%u", result->type );
300 break;
302 fputc( '}', stderr );
305 static void dump_async_data( const char *prefix, const async_data_t *data )
307 fprintf( stderr, "%s{handle=%04x,event=%04x", prefix, data->handle, data->event );
308 dump_uint64( ",callback=", &data->callback );
309 dump_uint64( ",iosb=", &data->iosb );
310 dump_uint64( ",arg=", &data->arg );
311 dump_uint64( ",cvalue=", &data->cvalue );
312 fputc( '}', stderr );
315 static void dump_irp_params( const char *prefix, const irp_params_t *data )
317 switch (data->major)
319 case IRP_MJ_CREATE:
320 fprintf( stderr, "%s{major=CREATE,access=%08x,sharing=%08x,options=%08x",
321 prefix, data->create.access, data->create.sharing, data->create.options );
322 dump_uint64( ",device=", &data->create.device );
323 fputc( '}', stderr );
324 break;
325 case IRP_MJ_CLOSE:
326 fprintf( stderr, "%s{major=CLOSE", prefix );
327 dump_uint64( ",file=", &data->close.file );
328 fputc( '}', stderr );
329 break;
330 case IRP_MJ_READ:
331 fprintf( stderr, "%s{major=READ,key=%08x", prefix, data->read.key );
332 dump_uint64( ",pos=", &data->read.pos );
333 dump_uint64( ",file=", &data->read.file );
334 fputc( '}', stderr );
335 break;
336 case IRP_MJ_WRITE:
337 fprintf( stderr, "%s{major=WRITE,key=%08x", prefix, data->write.key );
338 dump_uint64( ",pos=", &data->write.pos );
339 dump_uint64( ",file=", &data->write.file );
340 fputc( '}', stderr );
341 break;
342 case IRP_MJ_FLUSH_BUFFERS:
343 fprintf( stderr, "%s{major=FLUSH_BUFFERS", prefix );
344 dump_uint64( ",file=", &data->flush.file );
345 fputc( '}', stderr );
346 break;
347 case IRP_MJ_DEVICE_CONTROL:
348 fprintf( stderr, "%s{major=DEVICE_CONTROL", prefix );
349 dump_ioctl_code( ",code=", &data->ioctl.code );
350 dump_uint64( ",file=", &data->ioctl.file );
351 fputc( '}', stderr );
352 break;
353 case IRP_MJ_MAXIMUM_FUNCTION + 1: /* invalid */
354 fprintf( stderr, "%s{}", prefix );
355 break;
356 default:
357 fprintf( stderr, "%s{major=%u}", prefix, data->major );
358 break;
362 static void dump_hw_input( const char *prefix, const hw_input_t *input )
364 switch (input->type)
366 case INPUT_MOUSE:
367 fprintf( stderr, "%s{type=MOUSE,x=%d,y=%d,data=%08x,flags=%08x,time=%u",
368 prefix, input->mouse.x, input->mouse.y, input->mouse.data, input->mouse.flags,
369 input->mouse.time );
370 dump_uint64( ",info=", &input->mouse.info );
371 fputc( '}', stderr );
372 break;
373 case INPUT_KEYBOARD:
374 fprintf( stderr, "%s{type=KEYBOARD,vkey=%04hx,scan=%04hx,flags=%08x,time=%u",
375 prefix, input->kbd.vkey, input->kbd.scan, input->kbd.flags, input->kbd.time );
376 dump_uint64( ",info=", &input->kbd.info );
377 fputc( '}', stderr );
378 break;
379 case INPUT_HARDWARE:
380 fprintf( stderr, "%s{type=HARDWARE,msg=%04x", prefix, input->hw.msg );
381 dump_uint64( ",lparam=", &input->hw.lparam );
382 fputc( '}', stderr );
383 break;
384 default:
385 fprintf( stderr, "%s{type=%04x}", prefix, input->type );
386 break;
390 static void dump_luid( const char *prefix, const luid_t *luid )
392 fprintf( stderr, "%s%d.%u", prefix, luid->high_part, luid->low_part );
395 static void dump_varargs_ints( const char *prefix, data_size_t size )
397 const int *data = cur_data;
398 data_size_t len = size / sizeof(*data);
400 fprintf( stderr,"%s{", prefix );
401 while (len > 0)
403 fprintf( stderr, "%d", *data++ );
404 if (--len) fputc( ',', stderr );
406 fputc( '}', stderr );
407 remove_data( size );
410 static void dump_varargs_uints( const char *prefix, data_size_t size )
412 const unsigned int *data = cur_data;
414 dump_uints( prefix, data, size / sizeof(*data) );
415 remove_data( size );
418 static void dump_varargs_uints64( const char *prefix, data_size_t size )
420 const unsigned __int64 *data = cur_data;
421 data_size_t len = size / sizeof(*data);
423 fprintf( stderr,"%s{", prefix );
424 while (len > 0)
426 dump_uint64( "", data++ );
427 if (--len) fputc( ',', stderr );
429 fputc( '}', stderr );
430 remove_data( size );
433 static void dump_varargs_apc_result( const char *prefix, data_size_t size )
435 const apc_result_t *result = cur_data;
437 if (size >= sizeof(*result))
439 dump_apc_result( prefix, result );
440 size = sizeof(*result);
442 remove_data( size );
445 static void dump_varargs_select_op( const char *prefix, data_size_t size )
447 select_op_t data;
449 if (!size)
451 fprintf( stderr, "%s{}", prefix );
452 return;
454 memset( &data, 0, sizeof(data) );
455 memcpy( &data, cur_data, min( size, sizeof(data) ));
457 fprintf( stderr, "%s{", prefix );
458 switch (data.op)
460 case SELECT_NONE:
461 fprintf( stderr, "NONE" );
462 break;
463 case SELECT_WAIT:
464 case SELECT_WAIT_ALL:
465 fprintf( stderr, "%s", data.op == SELECT_WAIT ? "WAIT" : "WAIT_ALL" );
466 if (size > offsetof( select_op_t, wait.handles ))
467 dump_handles( ",handles=", data.wait.handles,
468 min( size, sizeof(data.wait) ) - offsetof( select_op_t, wait.handles ));
469 break;
470 case SELECT_SIGNAL_AND_WAIT:
471 fprintf( stderr, "SIGNAL_AND_WAIT,signal=%04x,wait=%04x",
472 data.signal_and_wait.signal, data.signal_and_wait.wait );
473 break;
474 case SELECT_KEYED_EVENT_WAIT:
475 case SELECT_KEYED_EVENT_RELEASE:
476 fprintf( stderr, "KEYED_EVENT_%s,handle=%04x",
477 data.op == SELECT_KEYED_EVENT_WAIT ? "WAIT" : "RELEASE",
478 data.keyed_event.handle );
479 dump_uint64( ",key=", &data.keyed_event.key );
480 break;
481 default:
482 fprintf( stderr, "op=%u", data.op );
483 break;
485 fputc( '}', stderr );
486 remove_data( size );
489 static void dump_varargs_user_handles( const char *prefix, data_size_t size )
491 const user_handle_t *data = cur_data;
492 data_size_t len = size / sizeof(*data);
494 fprintf( stderr,"%s{", prefix );
495 while (len > 0)
497 fprintf( stderr, "%08x", *data++ );
498 if (--len) fputc( ',', stderr );
500 fputc( '}', stderr );
501 remove_data( size );
504 static void dump_varargs_bytes( const char *prefix, data_size_t size )
506 const unsigned char *data = cur_data;
507 data_size_t len = min( 1024, size );
509 fprintf( stderr,"%s{", prefix );
510 while (len > 0)
512 fprintf( stderr, "%02x", *data++ );
513 if (--len) fputc( ',', stderr );
515 if (size > 1024) fprintf( stderr, "...(total %u)", size );
516 fputc( '}', stderr );
517 remove_data( size );
520 static void dump_varargs_string( const char *prefix, data_size_t size )
522 fprintf( stderr, "%s\"%.*s\"", prefix, (int)size, (const char *)cur_data );
523 remove_data( size );
526 static void dump_varargs_unicode_str( const char *prefix, data_size_t size )
528 fprintf( stderr, "%sL\"", prefix );
529 dump_strW( cur_data, size / sizeof(WCHAR), stderr, "\"\"" );
530 fputc( '\"', stderr );
531 remove_data( size );
534 static void dump_varargs_context( const char *prefix, data_size_t size )
536 const context_t *context = cur_data;
537 context_t ctx;
538 unsigned int i;
540 if (!size)
542 fprintf( stderr, "%s{}", prefix );
543 return;
545 size = min( size, sizeof(ctx) );
546 memset( &ctx, 0, sizeof(ctx) );
547 memcpy( &ctx, context, size );
549 fprintf( stderr,"%s{", prefix );
550 dump_cpu_type( "cpu=", &ctx.cpu );
551 switch (ctx.cpu)
553 case CPU_x86:
554 if (ctx.flags & SERVER_CTX_CONTROL)
555 fprintf( stderr, ",eip=%08x,esp=%08x,ebp=%08x,eflags=%08x,cs=%04x,ss=%04x",
556 ctx.ctl.i386_regs.eip, ctx.ctl.i386_regs.esp, ctx.ctl.i386_regs.ebp,
557 ctx.ctl.i386_regs.eflags, ctx.ctl.i386_regs.cs, ctx.ctl.i386_regs.ss );
558 if (ctx.flags & SERVER_CTX_SEGMENTS)
559 fprintf( stderr, ",ds=%04x,es=%04x,fs=%04x,gs=%04x",
560 ctx.seg.i386_regs.ds, ctx.seg.i386_regs.es,
561 ctx.seg.i386_regs.fs, ctx.seg.i386_regs.gs );
562 if (ctx.flags & SERVER_CTX_INTEGER)
563 fprintf( stderr, ",eax=%08x,ebx=%08x,ecx=%08x,edx=%08x,esi=%08x,edi=%08x",
564 ctx.integer.i386_regs.eax, ctx.integer.i386_regs.ebx, ctx.integer.i386_regs.ecx,
565 ctx.integer.i386_regs.edx, ctx.integer.i386_regs.esi, ctx.integer.i386_regs.edi );
566 if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
567 fprintf( stderr, ",dr0=%08x,dr1=%08x,dr2=%08x,dr3=%08x,dr6=%08x,dr7=%08x",
568 ctx.debug.i386_regs.dr0, ctx.debug.i386_regs.dr1, ctx.debug.i386_regs.dr2,
569 ctx.debug.i386_regs.dr3, ctx.debug.i386_regs.dr6, ctx.debug.i386_regs.dr7 );
570 if (ctx.flags & SERVER_CTX_FLOATING_POINT)
572 fprintf( stderr, ",fp.ctrl=%08x,fp.status=%08x,fp.tag=%08x,fp.err_off=%08x,fp.err_sel=%08x",
573 ctx.fp.i386_regs.ctrl, ctx.fp.i386_regs.status, ctx.fp.i386_regs.tag,
574 ctx.fp.i386_regs.err_off, ctx.fp.i386_regs.err_sel );
575 fprintf( stderr, ",fp.data_off=%08x,fp.data_sel=%08x,fp.cr0npx=%08x",
576 ctx.fp.i386_regs.data_off, ctx.fp.i386_regs.data_sel, ctx.fp.i386_regs.cr0npx );
577 for (i = 0; i < 8; i++)
579 long double reg = 0;
580 memcpy( &reg, &ctx.fp.i386_regs.regs[10 * i], 10 );
581 fprintf( stderr, ",fp.reg%u=%Lg", i, reg );
584 if (ctx.flags & SERVER_CTX_EXTENDED_REGISTERS)
585 dump_uints( ",extended=", (const unsigned int *)ctx.ext.i386_regs,
586 sizeof(ctx.ext.i386_regs) / sizeof(int) );
587 break;
588 case CPU_x86_64:
589 if (ctx.flags & SERVER_CTX_CONTROL)
591 dump_uint64( ",rip=", &ctx.ctl.x86_64_regs.rip );
592 dump_uint64( ",rbp=", &ctx.ctl.x86_64_regs.rbp );
593 dump_uint64( ",rsp=", &ctx.ctl.x86_64_regs.rsp );
594 fprintf( stderr, ",cs=%04x,ss=%04x,flags=%08x",
595 ctx.ctl.x86_64_regs.cs, ctx.ctl.x86_64_regs.ss, ctx.ctl.x86_64_regs.flags );
597 if (ctx.flags & SERVER_CTX_INTEGER)
599 dump_uint64( ",rax=", &ctx.integer.x86_64_regs.rax );
600 dump_uint64( ",rbx=", &ctx.integer.x86_64_regs.rbx );
601 dump_uint64( ",rcx=", &ctx.integer.x86_64_regs.rcx );
602 dump_uint64( ",rdx=", &ctx.integer.x86_64_regs.rdx );
603 dump_uint64( ",rsi=", &ctx.integer.x86_64_regs.rsi );
604 dump_uint64( ",rdi=", &ctx.integer.x86_64_regs.rdi );
605 dump_uint64( ",r8=", &ctx.integer.x86_64_regs.r8 );
606 dump_uint64( ",r9=", &ctx.integer.x86_64_regs.r9 );
607 dump_uint64( ",r10=", &ctx.integer.x86_64_regs.r10 );
608 dump_uint64( ",r11=", &ctx.integer.x86_64_regs.r11 );
609 dump_uint64( ",r12=", &ctx.integer.x86_64_regs.r12 );
610 dump_uint64( ",r13=", &ctx.integer.x86_64_regs.r13 );
611 dump_uint64( ",r14=", &ctx.integer.x86_64_regs.r14 );
612 dump_uint64( ",r15=", &ctx.integer.x86_64_regs.r15 );
614 if (ctx.flags & SERVER_CTX_SEGMENTS)
615 fprintf( stderr, ",ds=%04x,es=%04x,fs=%04x,gs=%04x",
616 ctx.seg.x86_64_regs.ds, ctx.seg.x86_64_regs.es,
617 ctx.seg.x86_64_regs.fs, ctx.seg.x86_64_regs.gs );
618 if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
620 dump_uint64( ",dr0=", &ctx.debug.x86_64_regs.dr0 );
621 dump_uint64( ",dr1=", &ctx.debug.x86_64_regs.dr1 );
622 dump_uint64( ",dr2=", &ctx.debug.x86_64_regs.dr2 );
623 dump_uint64( ",dr3=", &ctx.debug.x86_64_regs.dr3 );
624 dump_uint64( ",dr6=", &ctx.debug.x86_64_regs.dr6 );
625 dump_uint64( ",dr7=", &ctx.debug.x86_64_regs.dr7 );
627 if (ctx.flags & SERVER_CTX_FLOATING_POINT)
629 for (i = 0; i < 32; i++)
630 fprintf( stderr, ",fp%u=%08x%08x%08x%08x", i,
631 (unsigned int)(ctx.fp.x86_64_regs.fpregs[i].high >> 32),
632 (unsigned int)ctx.fp.x86_64_regs.fpregs[i].high,
633 (unsigned int)(ctx.fp.x86_64_regs.fpregs[i].low >> 32),
634 (unsigned int)ctx.fp.x86_64_regs.fpregs[i].low );
636 break;
637 case CPU_POWERPC:
638 if (ctx.flags & SERVER_CTX_CONTROL)
639 fprintf( stderr, ",iar=%08x,msr=%08x,ctr=%08x,lr=%08x,dar=%08x,dsisr=%08x,trap=%08x",
640 ctx.ctl.powerpc_regs.iar, ctx.ctl.powerpc_regs.msr, ctx.ctl.powerpc_regs.ctr,
641 ctx.ctl.powerpc_regs.lr, ctx.ctl.powerpc_regs.dar, ctx.ctl.powerpc_regs.dsisr,
642 ctx.ctl.powerpc_regs.trap );
643 if (ctx.flags & SERVER_CTX_INTEGER)
645 for (i = 0; i < 32; i++) fprintf( stderr, ",gpr%u=%08x", i, ctx.integer.powerpc_regs.gpr[i] );
646 fprintf( stderr, ",cr=%08x,xer=%08x",
647 ctx.integer.powerpc_regs.cr, ctx.integer.powerpc_regs.xer );
649 if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
650 for (i = 0; i < 8; i++) fprintf( stderr, ",dr%u=%08x", i, ctx.debug.powerpc_regs.dr[i] );
651 if (ctx.flags & SERVER_CTX_FLOATING_POINT)
653 for (i = 0; i < 32; i++) fprintf( stderr, ",fpr%u=%g", i, ctx.fp.powerpc_regs.fpr[i] );
654 fprintf( stderr, ",fpscr=%g", ctx.fp.powerpc_regs.fpscr );
656 break;
657 case CPU_ARM:
658 if (ctx.flags & SERVER_CTX_CONTROL)
659 fprintf( stderr, ",sp=%08x,lr=%08x,pc=%08x,cpsr=%08x",
660 ctx.ctl.arm_regs.sp, ctx.ctl.arm_regs.lr,
661 ctx.ctl.arm_regs.pc, ctx.ctl.arm_regs.cpsr );
662 if (ctx.flags & SERVER_CTX_INTEGER)
663 for (i = 0; i < 13; i++) fprintf( stderr, ",r%u=%08x", i, ctx.integer.arm_regs.r[i] );
664 break;
665 case CPU_ARM64:
666 if (ctx.flags & SERVER_CTX_CONTROL)
668 dump_uint64( ",sp=", &ctx.ctl.arm64_regs.sp );
669 dump_uint64( ",pc=", &ctx.ctl.arm64_regs.pc );
670 dump_uint64( ",pstate=", &ctx.ctl.arm64_regs.pstate );
672 if (ctx.flags & SERVER_CTX_INTEGER)
674 dump_uint64( ",x0=", &ctx.integer.arm64_regs.x[0] );
675 dump_uint64( ",x1=", &ctx.integer.arm64_regs.x[1] );
676 dump_uint64( ",x2=", &ctx.integer.arm64_regs.x[2] );
677 dump_uint64( ",x3=", &ctx.integer.arm64_regs.x[3] );
678 dump_uint64( ",x4=", &ctx.integer.arm64_regs.x[4] );
679 dump_uint64( ",x5=", &ctx.integer.arm64_regs.x[5] );
680 dump_uint64( ",x6=", &ctx.integer.arm64_regs.x[6] );
681 dump_uint64( ",x7=", &ctx.integer.arm64_regs.x[7] );
682 dump_uint64( ",x8=", &ctx.integer.arm64_regs.x[8] );
683 dump_uint64( ",x9=", &ctx.integer.arm64_regs.x[9] );
684 dump_uint64( ",x10=", &ctx.integer.arm64_regs.x[10] );
685 dump_uint64( ",x11=", &ctx.integer.arm64_regs.x[11] );
686 dump_uint64( ",x12=", &ctx.integer.arm64_regs.x[12] );
687 dump_uint64( ",x13=", &ctx.integer.arm64_regs.x[13] );
688 dump_uint64( ",x14=", &ctx.integer.arm64_regs.x[14] );
689 dump_uint64( ",x15=", &ctx.integer.arm64_regs.x[15] );
690 dump_uint64( ",x16=", &ctx.integer.arm64_regs.x[16] );
691 dump_uint64( ",x17=", &ctx.integer.arm64_regs.x[17] );
692 dump_uint64( ",x18=", &ctx.integer.arm64_regs.x[18] );
693 dump_uint64( ",x19=", &ctx.integer.arm64_regs.x[19] );
694 dump_uint64( ",x20=", &ctx.integer.arm64_regs.x[20] );
695 dump_uint64( ",x21=", &ctx.integer.arm64_regs.x[21] );
696 dump_uint64( ",x22=", &ctx.integer.arm64_regs.x[22] );
697 dump_uint64( ",x23=", &ctx.integer.arm64_regs.x[23] );
698 dump_uint64( ",x24=", &ctx.integer.arm64_regs.x[24] );
699 dump_uint64( ",x25=", &ctx.integer.arm64_regs.x[25] );
700 dump_uint64( ",x26=", &ctx.integer.arm64_regs.x[26] );
701 dump_uint64( ",x27=", &ctx.integer.arm64_regs.x[27] );
702 dump_uint64( ",x28=", &ctx.integer.arm64_regs.x[28] );
703 dump_uint64( ",x29=", &ctx.integer.arm64_regs.x[29] );
704 dump_uint64( ",x30=", &ctx.integer.arm64_regs.x[30] );
706 break;
708 fputc( '}', stderr );
709 remove_data( size );
712 static void dump_varargs_debug_event( const char *prefix, data_size_t size )
714 debug_event_t event;
715 unsigned int i;
717 if (!size)
719 fprintf( stderr, "%s{}", prefix );
720 return;
722 size = min( size, sizeof(event) );
723 memset( &event, 0, sizeof(event) );
724 memcpy( &event, cur_data, size );
726 switch(event.code)
728 case EXCEPTION_DEBUG_EVENT:
729 fprintf( stderr, "%s{exception,first=%d,exc_code=%08x,flags=%08x", prefix,
730 event.exception.first, event.exception.exc_code, event.exception.flags );
731 dump_uint64( ",record=", &event.exception.record );
732 dump_uint64( ",address=", &event.exception.address );
733 fprintf( stderr, ",params={" );
734 event.exception.nb_params = min( event.exception.nb_params, EXCEPTION_MAXIMUM_PARAMETERS );
735 for (i = 0; i < event.exception.nb_params; i++)
737 dump_uint64( "", &event.exception.params[i] );
738 if (i < event.exception.nb_params) fputc( ',', stderr );
740 fprintf( stderr, "}}" );
741 break;
742 case CREATE_THREAD_DEBUG_EVENT:
743 fprintf( stderr, "%s{create_thread,thread=%04x", prefix, event.create_thread.handle );
744 dump_uint64( ",teb=", &event.create_thread.teb );
745 dump_uint64( ",start=", &event.create_thread.start );
746 fputc( '}', stderr );
747 break;
748 case CREATE_PROCESS_DEBUG_EVENT:
749 fprintf( stderr, "%s{create_process,file=%04x,process=%04x,thread=%04x", prefix,
750 event.create_process.file, event.create_process.process,
751 event.create_process.thread );
752 dump_uint64( ",base=", &event.create_process.base );
753 fprintf( stderr, ",offset=%d,size=%d",
754 event.create_process.dbg_offset, event.create_process.dbg_size );
755 dump_uint64( ",teb=", &event.create_process.teb );
756 dump_uint64( ",start=", &event.create_process.start );
757 dump_uint64( ",name=", &event.create_process.name );
758 fprintf( stderr, ",unicode=%d}", event.create_process.unicode );
759 break;
760 case EXIT_THREAD_DEBUG_EVENT:
761 fprintf( stderr, "%s{exit_thread,code=%d}", prefix, event.exit.exit_code );
762 break;
763 case EXIT_PROCESS_DEBUG_EVENT:
764 fprintf( stderr, "%s{exit_process,code=%d}", prefix, event.exit.exit_code );
765 break;
766 case LOAD_DLL_DEBUG_EVENT:
767 fprintf( stderr, "%s{load_dll,file=%04x", prefix, event.load_dll.handle );
768 dump_uint64( ",base=", &event.load_dll.base );
769 fprintf( stderr, ",offset=%d,size=%d",
770 event.load_dll.dbg_offset, event.load_dll.dbg_size );
771 dump_uint64( ",name=", &event.load_dll.name );
772 fprintf( stderr, ",unicode=%d}", event.load_dll.unicode );
773 break;
774 case UNLOAD_DLL_DEBUG_EVENT:
775 fprintf( stderr, "%s{unload_dll", prefix );
776 dump_uint64( ",base=", &event.unload_dll.base );
777 fputc( '}', stderr );
778 break;
779 case 0: /* zero is the code returned on timeouts */
780 fprintf( stderr, "%s{}", prefix );
781 break;
782 default:
783 fprintf( stderr, "%s{code=??? (%d)}", prefix, event.code );
784 break;
786 remove_data( size );
789 /* dump a unicode string contained in a buffer; helper for dump_varargs_startup_info */
790 static data_size_t dump_inline_unicode_string( const char *prefix, data_size_t pos, data_size_t len, data_size_t total_size )
792 fputs( prefix, stderr );
793 if (pos >= total_size) return pos;
794 if (len > total_size - pos) len = total_size - pos;
795 len /= sizeof(WCHAR);
796 dump_strW( (const WCHAR *)cur_data + pos/sizeof(WCHAR), len, stderr, "\"\"" );
797 return pos + len * sizeof(WCHAR);
800 static void dump_varargs_startup_info( const char *prefix, data_size_t size )
802 startup_info_t info;
803 data_size_t pos = sizeof(info);
805 memset( &info, 0, sizeof(info) );
806 memcpy( &info, cur_data, min( size, sizeof(info) ));
808 fprintf( stderr,
809 "%s{debug_flags=%x,console_flags=%x,console=%04x,hstdin=%04x,hstdout=%04x,hstderr=%04x,"
810 "x=%u,y=%u,xsize=%u,ysize=%u,xchars=%u,ychars=%u,attribute=%02x,flags=%x,show=%u",
811 prefix, info.debug_flags, info.console_flags, info.console,
812 info.hstdin, info.hstdout, info.hstderr, info.x, info.y, info.xsize, info.ysize,
813 info.xchars, info.ychars, info.attribute, info.flags, info.show );
814 pos = dump_inline_unicode_string( ",curdir=L\"", pos, info.curdir_len, size );
815 pos = dump_inline_unicode_string( "\",dllpath=L\"", pos, info.dllpath_len, size );
816 pos = dump_inline_unicode_string( "\",imagepath=L\"", pos, info.imagepath_len, size );
817 pos = dump_inline_unicode_string( "\",cmdline=L\"", pos, info.cmdline_len, size );
818 pos = dump_inline_unicode_string( "\",title=L\"", pos, info.title_len, size );
819 pos = dump_inline_unicode_string( "\",desktop=L\"", pos, info.desktop_len, size );
820 pos = dump_inline_unicode_string( "\",shellinfo=L\"", pos, info.shellinfo_len, size );
821 pos = dump_inline_unicode_string( "\",runtime=L\"", pos, info.runtime_len, size );
822 fprintf( stderr, "\"}" );
823 remove_data( size );
826 static void dump_varargs_input_records( const char *prefix, data_size_t size )
828 const INPUT_RECORD *rec = cur_data;
829 data_size_t len = size / sizeof(*rec);
831 fprintf( stderr,"%s{", prefix );
832 while (len > 0)
834 fprintf( stderr, "{%04x,...}", rec->EventType );
835 rec++;
836 if (--len) fputc( ',', stderr );
838 fputc( '}', stderr );
839 remove_data( size );
842 static void dump_varargs_rectangles( const char *prefix, data_size_t size )
844 const rectangle_t *rect = cur_data;
845 data_size_t len = size / sizeof(*rect);
847 fprintf( stderr,"%s{", prefix );
848 while (len > 0)
850 dump_rectangle( "", rect++ );
851 if (--len) fputc( ',', stderr );
853 fputc( '}', stderr );
854 remove_data( size );
857 static void dump_varargs_message_data( const char *prefix, data_size_t size )
859 /* FIXME: dump the structured data */
860 dump_varargs_bytes( prefix, size );
863 static void dump_varargs_properties( const char *prefix, data_size_t size )
865 const property_data_t *prop = cur_data;
866 data_size_t len = size / sizeof(*prop);
868 fprintf( stderr,"%s{", prefix );
869 while (len > 0)
871 fprintf( stderr, "{atom=%04x,str=%d", prop->atom, prop->string );
872 dump_uint64( ",data=", &prop->data );
873 fputc( '}', stderr );
874 prop++;
875 if (--len) fputc( ',', stderr );
877 fputc( '}', stderr );
878 remove_data( size );
881 static void dump_varargs_LUID_AND_ATTRIBUTES( const char *prefix, data_size_t size )
883 const LUID_AND_ATTRIBUTES *lat = cur_data;
884 data_size_t len = size / sizeof(*lat);
886 fprintf( stderr,"%s{", prefix );
887 while (len > 0)
889 fprintf( stderr, "{luid=%08x%08x,attr=%x}",
890 lat->Luid.HighPart, lat->Luid.LowPart, lat->Attributes );
891 lat++;
892 if (--len) fputc( ',', stderr );
894 fputc( '}', stderr );
895 remove_data( size );
898 static void dump_inline_sid( const char *prefix, const SID *sid, data_size_t size )
900 DWORD i;
902 /* security check */
903 if ((FIELD_OFFSET(SID, SubAuthority[0]) > size) ||
904 (FIELD_OFFSET(SID, SubAuthority[sid->SubAuthorityCount]) > size))
906 fprintf( stderr, "<invalid sid>" );
907 return;
910 fprintf( stderr,"%s{", prefix );
911 fprintf( stderr, "S-%u-%u", sid->Revision, MAKELONG(
912 MAKEWORD( sid->IdentifierAuthority.Value[5],
913 sid->IdentifierAuthority.Value[4] ),
914 MAKEWORD( sid->IdentifierAuthority.Value[3],
915 sid->IdentifierAuthority.Value[2] ) ) );
916 for (i = 0; i < sid->SubAuthorityCount; i++)
917 fprintf( stderr, "-%u", sid->SubAuthority[i] );
918 fputc( '}', stderr );
921 static void dump_varargs_SID( const char *prefix, data_size_t size )
923 const SID *sid = cur_data;
924 dump_inline_sid( prefix, sid, size );
925 remove_data( size );
928 static void dump_inline_acl( const char *prefix, const ACL *acl, data_size_t size )
930 const ACE_HEADER *ace;
931 ULONG i;
933 fprintf( stderr,"%s{", prefix );
934 if (size)
936 if (size < sizeof(ACL))
938 fprintf( stderr, "<invalid acl>}" );
939 return;
941 size -= sizeof(ACL);
942 ace = (const ACE_HEADER *)(acl + 1);
943 for (i = 0; i < acl->AceCount; i++)
945 const SID *sid = NULL;
946 data_size_t sid_size = 0;
948 if (size < sizeof(ACE_HEADER) || size < ace->AceSize) break;
949 size -= ace->AceSize;
950 if (i != 0) fputc( ',', stderr );
951 fprintf( stderr, "{AceType=" );
952 switch (ace->AceType)
954 case ACCESS_DENIED_ACE_TYPE:
955 sid = (const SID *)&((const ACCESS_DENIED_ACE *)ace)->SidStart;
956 sid_size = ace->AceSize - FIELD_OFFSET(ACCESS_DENIED_ACE, SidStart);
957 fprintf( stderr, "ACCESS_DENIED_ACE_TYPE,Mask=%x",
958 ((const ACCESS_DENIED_ACE *)ace)->Mask );
959 break;
960 case ACCESS_ALLOWED_ACE_TYPE:
961 sid = (const SID *)&((const ACCESS_ALLOWED_ACE *)ace)->SidStart;
962 sid_size = ace->AceSize - FIELD_OFFSET(ACCESS_ALLOWED_ACE, SidStart);
963 fprintf( stderr, "ACCESS_ALLOWED_ACE_TYPE,Mask=%x",
964 ((const ACCESS_ALLOWED_ACE *)ace)->Mask );
965 break;
966 case SYSTEM_AUDIT_ACE_TYPE:
967 sid = (const SID *)&((const SYSTEM_AUDIT_ACE *)ace)->SidStart;
968 sid_size = ace->AceSize - FIELD_OFFSET(SYSTEM_AUDIT_ACE, SidStart);
969 fprintf( stderr, "SYSTEM_AUDIT_ACE_TYPE,Mask=%x",
970 ((const SYSTEM_AUDIT_ACE *)ace)->Mask );
971 break;
972 case SYSTEM_ALARM_ACE_TYPE:
973 sid = (const SID *)&((const SYSTEM_ALARM_ACE *)ace)->SidStart;
974 sid_size = ace->AceSize - FIELD_OFFSET(SYSTEM_ALARM_ACE, SidStart);
975 fprintf( stderr, "SYSTEM_ALARM_ACE_TYPE,Mask=%x",
976 ((const SYSTEM_ALARM_ACE *)ace)->Mask );
977 break;
978 case SYSTEM_MANDATORY_LABEL_ACE_TYPE:
979 sid = (const SID *)&((const SYSTEM_MANDATORY_LABEL_ACE *)ace)->SidStart;
980 sid_size = ace->AceSize - FIELD_OFFSET(SYSTEM_MANDATORY_LABEL_ACE, SidStart);
981 fprintf( stderr, "SYSTEM_MANDATORY_LABEL_ACE_TYPE,Mask=%x",
982 ((const SYSTEM_MANDATORY_LABEL_ACE *)ace)->Mask );
983 break;
984 default:
985 fprintf( stderr, "unknown<%d>", ace->AceType );
986 break;
988 fprintf( stderr, ",AceFlags=%x", ace->AceFlags );
989 if (sid)
990 dump_inline_sid( ",Sid=", sid, sid_size );
991 ace = (const ACE_HEADER *)((const char *)ace + ace->AceSize);
992 fputc( '}', stderr );
995 fputc( '}', stderr );
998 static void dump_varargs_ACL( const char *prefix, data_size_t size )
1000 const ACL *acl = cur_data;
1001 dump_inline_acl( prefix, acl, size );
1002 remove_data( size );
1005 static void dump_inline_security_descriptor( const char *prefix, const struct security_descriptor *sd, data_size_t size )
1007 fprintf( stderr,"%s{", prefix );
1008 if (size >= sizeof(struct security_descriptor))
1010 size_t offset = sizeof(struct security_descriptor);
1011 fprintf( stderr, "control=%08x", sd->control );
1012 if ((sd->owner_len > FIELD_OFFSET(SID, SubAuthority[255])) || (offset + sd->owner_len > size))
1013 return;
1014 if (sd->owner_len)
1015 dump_inline_sid( ",owner=", (const SID *)((const char *)sd + offset), sd->owner_len );
1016 else
1017 fprintf( stderr, ",owner=<not present>" );
1018 offset += sd->owner_len;
1019 if ((sd->group_len > FIELD_OFFSET(SID, SubAuthority[255])) || (offset + sd->group_len > size))
1020 return;
1021 if (sd->group_len)
1022 dump_inline_sid( ",group=", (const SID *)((const char *)sd + offset), sd->group_len );
1023 else
1024 fprintf( stderr, ",group=<not present>" );
1025 offset += sd->group_len;
1026 if ((sd->sacl_len >= MAX_ACL_LEN) || (offset + sd->sacl_len > size))
1027 return;
1028 dump_inline_acl( ",sacl=", (const ACL *)((const char *)sd + offset), sd->sacl_len );
1029 offset += sd->sacl_len;
1030 if ((sd->dacl_len >= MAX_ACL_LEN) || (offset + sd->dacl_len > size))
1031 return;
1032 dump_inline_acl( ",dacl=", (const ACL *)((const char *)sd + offset), sd->dacl_len );
1033 offset += sd->dacl_len;
1035 fputc( '}', stderr );
1038 static void dump_varargs_security_descriptor( const char *prefix, data_size_t size )
1040 const struct security_descriptor *sd = cur_data;
1041 dump_inline_security_descriptor( prefix, sd, size );
1042 remove_data( size );
1045 static void dump_varargs_token_groups( const char *prefix, data_size_t size )
1047 const struct token_groups *tg = cur_data;
1049 fprintf( stderr,"%s{", prefix );
1050 if (size >= sizeof(struct token_groups))
1052 size_t offset = sizeof(*tg);
1053 fprintf( stderr, "count=%08x,", tg->count );
1054 if (tg->count * sizeof(unsigned int) <= size)
1056 unsigned int i;
1057 const unsigned int *attr = (const unsigned int *)(tg + 1);
1059 offset += tg->count * sizeof(unsigned int);
1061 fputc( '[', stderr );
1062 for (i = 0; i < tg->count; i++)
1064 const SID *sid = (const SID *)((const char *)cur_data + offset);
1065 if (i != 0)
1066 fputc( ',', stderr );
1067 fputc( '{', stderr );
1068 fprintf( stderr, "attributes=%08x", attr[i] );
1069 dump_inline_sid( ",sid=", sid, size - offset );
1070 if ((offset + FIELD_OFFSET(SID, SubAuthority[0]) > size) ||
1071 (offset + FIELD_OFFSET(SID, SubAuthority[sid->SubAuthorityCount]) > size))
1072 break;
1073 offset += FIELD_OFFSET(SID, SubAuthority[sid->SubAuthorityCount]);
1074 fputc( '}', stderr );
1076 fputc( ']', stderr );
1079 fputc( '}', stderr );
1082 static void dump_varargs_object_attributes( const char *prefix, data_size_t size )
1084 const struct object_attributes *objattr = cur_data;
1086 fprintf( stderr,"%s{", prefix );
1087 if (size)
1089 const WCHAR *str;
1091 if (size < sizeof(*objattr) ||
1092 (size - sizeof(*objattr) < objattr->sd_len) ||
1093 (size - sizeof(*objattr) - objattr->sd_len < objattr->name_len))
1095 fprintf( stderr, "***invalid***}" );
1096 remove_data( size );
1097 return;
1100 fprintf( stderr, "rootdir=%04x,attributes=%08x", objattr->rootdir, objattr->attributes );
1101 dump_inline_security_descriptor( ",sd=", (const struct security_descriptor *)(objattr + 1), objattr->sd_len );
1102 str = (const WCHAR *)objattr + (sizeof(*objattr) + objattr->sd_len) / sizeof(WCHAR);
1103 fprintf( stderr, ",name=L\"" );
1104 dump_strW( str, objattr->name_len / sizeof(WCHAR), stderr, "\"\"" );
1105 fputc( '\"', stderr );
1106 remove_data( ((sizeof(*objattr) + objattr->sd_len) / sizeof(WCHAR)) * sizeof(WCHAR) +
1107 (objattr->name_len / sizeof(WCHAR)) * sizeof(WCHAR) );
1109 fputc( '}', stderr );
1112 static void dump_varargs_filesystem_event( const char *prefix, data_size_t size )
1114 static const char * const actions[] = {
1115 NULL,
1116 "ADDED",
1117 "REMOVED",
1118 "MODIFIED",
1119 "RENAMED_OLD_NAME",
1120 "RENAMED_NEW_NAME",
1121 "ADDED_STREAM",
1122 "REMOVED_STREAM",
1123 "MODIFIED_STREAM"
1126 fprintf( stderr,"%s{", prefix );
1127 while (size)
1129 const struct filesystem_event *event = cur_data;
1130 data_size_t len = (offsetof( struct filesystem_event, name[event->len] ) + sizeof(int)-1)
1131 / sizeof(int) * sizeof(int);
1132 if (size < len) break;
1133 if (event->action < sizeof(actions)/sizeof(actions[0]) && actions[event->action])
1134 fprintf( stderr, "{action=%s", actions[event->action] );
1135 else
1136 fprintf( stderr, "{action=%u", event->action );
1137 fprintf( stderr, ",name=\"%.*s\"}", event->len, event->name );
1138 size -= len;
1139 remove_data( len );
1140 if (size)fputc( ',', stderr );
1142 fputc( '}', stderr );
1145 static void dump_varargs_pe_image_info( const char *prefix, data_size_t size )
1147 pe_image_info_t info;
1149 if (!size)
1151 fprintf( stderr, "%s{}", prefix );
1152 return;
1154 memset( &info, 0, sizeof(info) );
1155 memcpy( &info, cur_data, min( size, sizeof(info) ));
1157 fprintf( stderr, "%s{", prefix );
1158 dump_uint64( "base=", &info.base );
1159 dump_uint64( ",entry_point=", &info.entry_point );
1160 dump_uint64( ",map_size=", &info.map_size );
1161 dump_uint64( ",stack_size=", &info.stack_size );
1162 dump_uint64( ",stack_commit=", &info.stack_commit );
1163 fprintf( stderr, ",zerobits=%08x,subsystem=%08x,subsystem_low=%04x,subsystem_high=%04x,gp=%08x"
1164 ",image_charact=%04x,dll_charact=%04x,machine=%04x,contains_code=%u,image_flags=%02x"
1165 ",loader_flags=%08x,header_size=%08x,file_size=%08x,checksum=%08x}",
1166 info.zerobits, info.subsystem, info.subsystem_low, info.subsystem_high, info.gp,
1167 info.image_charact, info.dll_charact, info.machine, info.contains_code, info.image_flags,
1168 info.loader_flags, info.header_size, info.file_size, info.checksum );
1169 remove_data( size );
1172 static void dump_varargs_rawinput_devices(const char *prefix, data_size_t size )
1174 const struct rawinput_device *device;
1176 fprintf( stderr, "%s{", prefix );
1177 while (size >= sizeof(*device))
1179 device = cur_data;
1180 fprintf( stderr, "{usage_page=%04x,usage=%04x,flags=%08x,target=%08x}",
1181 device->usage_page, device->usage, device->flags, device->target );
1182 size -= sizeof(*device);
1183 remove_data( sizeof(*device) );
1184 if (size) fputc( ',', stderr );
1186 fputc( '}', stderr );
1189 static void dump_varargs_handle_infos( const char *prefix, data_size_t size )
1191 const struct handle_info *handle;
1193 fprintf( stderr, "%s{", prefix );
1194 while (size >= sizeof(*handle))
1196 handle = cur_data;
1197 fprintf( stderr, "{owner=%04x,handle=%04x,access=%08x}",
1198 handle->owner, handle->handle, handle->access );
1199 size -= sizeof(*handle);
1200 remove_data( sizeof(*handle) );
1201 if (size) fputc( ',', stderr );
1203 fputc( '}', stderr );
1206 typedef void (*dump_func)( const void *req );
1208 /* Everything below this line is generated automatically by tools/make_requests */
1209 /* ### make_requests begin ### */
1211 static void dump_new_process_request( const struct new_process_request *req )
1213 fprintf( stderr, " inherit_all=%d", req->inherit_all );
1214 fprintf( stderr, ", create_flags=%08x", req->create_flags );
1215 fprintf( stderr, ", socket_fd=%d", req->socket_fd );
1216 fprintf( stderr, ", exe_file=%04x", req->exe_file );
1217 fprintf( stderr, ", process_access=%08x", req->process_access );
1218 fprintf( stderr, ", process_attr=%08x", req->process_attr );
1219 fprintf( stderr, ", thread_access=%08x", req->thread_access );
1220 fprintf( stderr, ", thread_attr=%08x", req->thread_attr );
1221 dump_cpu_type( ", cpu=", &req->cpu );
1222 fprintf( stderr, ", info_size=%u", req->info_size );
1223 dump_varargs_startup_info( ", info=", min(cur_size,req->info_size) );
1224 dump_varargs_unicode_str( ", env=", cur_size );
1227 static void dump_new_process_reply( const struct new_process_reply *req )
1229 fprintf( stderr, " info=%04x", req->info );
1230 fprintf( stderr, ", pid=%04x", req->pid );
1231 fprintf( stderr, ", phandle=%04x", req->phandle );
1232 fprintf( stderr, ", tid=%04x", req->tid );
1233 fprintf( stderr, ", thandle=%04x", req->thandle );
1236 static void dump_get_new_process_info_request( const struct get_new_process_info_request *req )
1238 fprintf( stderr, " info=%04x", req->info );
1241 static void dump_get_new_process_info_reply( const struct get_new_process_info_reply *req )
1243 fprintf( stderr, " success=%d", req->success );
1244 fprintf( stderr, ", exit_code=%d", req->exit_code );
1247 static void dump_new_thread_request( const struct new_thread_request *req )
1249 fprintf( stderr, " access=%08x", req->access );
1250 fprintf( stderr, ", attributes=%08x", req->attributes );
1251 fprintf( stderr, ", suspend=%d", req->suspend );
1252 fprintf( stderr, ", request_fd=%d", req->request_fd );
1255 static void dump_new_thread_reply( const struct new_thread_reply *req )
1257 fprintf( stderr, " tid=%04x", req->tid );
1258 fprintf( stderr, ", handle=%04x", req->handle );
1261 static void dump_get_startup_info_request( const struct get_startup_info_request *req )
1265 static void dump_get_startup_info_reply( const struct get_startup_info_reply *req )
1267 fprintf( stderr, " exe_file=%04x", req->exe_file );
1268 fprintf( stderr, ", info_size=%u", req->info_size );
1269 dump_varargs_startup_info( ", info=", min(cur_size,req->info_size) );
1270 dump_varargs_unicode_str( ", env=", cur_size );
1273 static void dump_init_process_done_request( const struct init_process_done_request *req )
1275 fprintf( stderr, " gui=%d", req->gui );
1276 dump_uint64( ", module=", &req->module );
1277 dump_uint64( ", ldt_copy=", &req->ldt_copy );
1278 dump_uint64( ", entry=", &req->entry );
1281 static void dump_init_thread_request( const struct init_thread_request *req )
1283 fprintf( stderr, " unix_pid=%d", req->unix_pid );
1284 fprintf( stderr, ", unix_tid=%d", req->unix_tid );
1285 fprintf( stderr, ", debug_level=%d", req->debug_level );
1286 dump_uint64( ", teb=", &req->teb );
1287 dump_uint64( ", entry=", &req->entry );
1288 fprintf( stderr, ", reply_fd=%d", req->reply_fd );
1289 fprintf( stderr, ", wait_fd=%d", req->wait_fd );
1290 dump_cpu_type( ", cpu=", &req->cpu );
1293 static void dump_init_thread_reply( const struct init_thread_reply *req )
1295 fprintf( stderr, " pid=%04x", req->pid );
1296 fprintf( stderr, ", tid=%04x", req->tid );
1297 dump_timeout( ", server_start=", &req->server_start );
1298 fprintf( stderr, ", info_size=%u", req->info_size );
1299 fprintf( stderr, ", version=%d", req->version );
1300 fprintf( stderr, ", all_cpus=%08x", req->all_cpus );
1303 static void dump_terminate_process_request( const struct terminate_process_request *req )
1305 fprintf( stderr, " handle=%04x", req->handle );
1306 fprintf( stderr, ", exit_code=%d", req->exit_code );
1309 static void dump_terminate_process_reply( const struct terminate_process_reply *req )
1311 fprintf( stderr, " self=%d", req->self );
1314 static void dump_terminate_thread_request( const struct terminate_thread_request *req )
1316 fprintf( stderr, " handle=%04x", req->handle );
1317 fprintf( stderr, ", exit_code=%d", req->exit_code );
1320 static void dump_terminate_thread_reply( const struct terminate_thread_reply *req )
1322 fprintf( stderr, " self=%d", req->self );
1323 fprintf( stderr, ", last=%d", req->last );
1326 static void dump_get_process_info_request( const struct get_process_info_request *req )
1328 fprintf( stderr, " handle=%04x", req->handle );
1331 static void dump_get_process_info_reply( const struct get_process_info_reply *req )
1333 fprintf( stderr, " pid=%04x", req->pid );
1334 fprintf( stderr, ", ppid=%04x", req->ppid );
1335 dump_uint64( ", affinity=", &req->affinity );
1336 dump_uint64( ", peb=", &req->peb );
1337 dump_timeout( ", start_time=", &req->start_time );
1338 dump_timeout( ", end_time=", &req->end_time );
1339 fprintf( stderr, ", exit_code=%d", req->exit_code );
1340 fprintf( stderr, ", priority=%d", req->priority );
1341 dump_cpu_type( ", cpu=", &req->cpu );
1342 fprintf( stderr, ", debugger_present=%d", req->debugger_present );
1343 fprintf( stderr, ", debug_children=%d", req->debug_children );
1346 static void dump_set_process_info_request( const struct set_process_info_request *req )
1348 fprintf( stderr, " handle=%04x", req->handle );
1349 fprintf( stderr, ", mask=%d", req->mask );
1350 fprintf( stderr, ", priority=%d", req->priority );
1351 dump_uint64( ", affinity=", &req->affinity );
1354 static void dump_get_thread_info_request( const struct get_thread_info_request *req )
1356 fprintf( stderr, " handle=%04x", req->handle );
1357 fprintf( stderr, ", tid_in=%04x", req->tid_in );
1360 static void dump_get_thread_info_reply( const struct get_thread_info_reply *req )
1362 fprintf( stderr, " pid=%04x", req->pid );
1363 fprintf( stderr, ", tid=%04x", req->tid );
1364 dump_uint64( ", teb=", &req->teb );
1365 dump_uint64( ", entry_point=", &req->entry_point );
1366 dump_uint64( ", affinity=", &req->affinity );
1367 fprintf( stderr, ", exit_code=%d", req->exit_code );
1368 fprintf( stderr, ", priority=%d", req->priority );
1369 fprintf( stderr, ", last=%d", req->last );
1372 static void dump_get_thread_times_request( const struct get_thread_times_request *req )
1374 fprintf( stderr, " handle=%04x", req->handle );
1377 static void dump_get_thread_times_reply( const struct get_thread_times_reply *req )
1379 dump_timeout( " creation_time=", &req->creation_time );
1380 dump_timeout( ", exit_time=", &req->exit_time );
1383 static void dump_set_thread_info_request( const struct set_thread_info_request *req )
1385 fprintf( stderr, " handle=%04x", req->handle );
1386 fprintf( stderr, ", mask=%d", req->mask );
1387 fprintf( stderr, ", priority=%d", req->priority );
1388 dump_uint64( ", affinity=", &req->affinity );
1389 dump_uint64( ", entry_point=", &req->entry_point );
1390 fprintf( stderr, ", token=%04x", req->token );
1393 static void dump_get_dll_info_request( const struct get_dll_info_request *req )
1395 fprintf( stderr, " handle=%04x", req->handle );
1396 dump_uint64( ", base_address=", &req->base_address );
1399 static void dump_get_dll_info_reply( const struct get_dll_info_reply *req )
1401 dump_uint64( " entry_point=", &req->entry_point );
1402 fprintf( stderr, ", size=%u", req->size );
1403 fprintf( stderr, ", filename_len=%u", req->filename_len );
1404 dump_varargs_unicode_str( ", filename=", cur_size );
1407 static void dump_suspend_thread_request( const struct suspend_thread_request *req )
1409 fprintf( stderr, " handle=%04x", req->handle );
1412 static void dump_suspend_thread_reply( const struct suspend_thread_reply *req )
1414 fprintf( stderr, " count=%d", req->count );
1417 static void dump_resume_thread_request( const struct resume_thread_request *req )
1419 fprintf( stderr, " handle=%04x", req->handle );
1422 static void dump_resume_thread_reply( const struct resume_thread_reply *req )
1424 fprintf( stderr, " count=%d", req->count );
1427 static void dump_load_dll_request( const struct load_dll_request *req )
1429 fprintf( stderr, " mapping=%04x", req->mapping );
1430 dump_uint64( ", base=", &req->base );
1431 dump_uint64( ", name=", &req->name );
1432 fprintf( stderr, ", size=%u", req->size );
1433 fprintf( stderr, ", dbg_offset=%d", req->dbg_offset );
1434 fprintf( stderr, ", dbg_size=%d", req->dbg_size );
1435 dump_varargs_unicode_str( ", filename=", cur_size );
1438 static void dump_unload_dll_request( const struct unload_dll_request *req )
1440 dump_uint64( " base=", &req->base );
1443 static void dump_queue_apc_request( const struct queue_apc_request *req )
1445 fprintf( stderr, " handle=%04x", req->handle );
1446 dump_apc_call( ", call=", &req->call );
1449 static void dump_queue_apc_reply( const struct queue_apc_reply *req )
1451 fprintf( stderr, " handle=%04x", req->handle );
1452 fprintf( stderr, ", self=%d", req->self );
1455 static void dump_get_apc_result_request( const struct get_apc_result_request *req )
1457 fprintf( stderr, " handle=%04x", req->handle );
1460 static void dump_get_apc_result_reply( const struct get_apc_result_reply *req )
1462 dump_apc_result( " result=", &req->result );
1465 static void dump_close_handle_request( const struct close_handle_request *req )
1467 fprintf( stderr, " handle=%04x", req->handle );
1470 static void dump_set_handle_info_request( const struct set_handle_info_request *req )
1472 fprintf( stderr, " handle=%04x", req->handle );
1473 fprintf( stderr, ", flags=%d", req->flags );
1474 fprintf( stderr, ", mask=%d", req->mask );
1477 static void dump_set_handle_info_reply( const struct set_handle_info_reply *req )
1479 fprintf( stderr, " old_flags=%d", req->old_flags );
1482 static void dump_dup_handle_request( const struct dup_handle_request *req )
1484 fprintf( stderr, " src_process=%04x", req->src_process );
1485 fprintf( stderr, ", src_handle=%04x", req->src_handle );
1486 fprintf( stderr, ", dst_process=%04x", req->dst_process );
1487 fprintf( stderr, ", access=%08x", req->access );
1488 fprintf( stderr, ", attributes=%08x", req->attributes );
1489 fprintf( stderr, ", options=%08x", req->options );
1492 static void dump_dup_handle_reply( const struct dup_handle_reply *req )
1494 fprintf( stderr, " handle=%04x", req->handle );
1495 fprintf( stderr, ", self=%d", req->self );
1496 fprintf( stderr, ", closed=%d", req->closed );
1499 static void dump_open_process_request( const struct open_process_request *req )
1501 fprintf( stderr, " pid=%04x", req->pid );
1502 fprintf( stderr, ", access=%08x", req->access );
1503 fprintf( stderr, ", attributes=%08x", req->attributes );
1506 static void dump_open_process_reply( const struct open_process_reply *req )
1508 fprintf( stderr, " handle=%04x", req->handle );
1511 static void dump_open_thread_request( const struct open_thread_request *req )
1513 fprintf( stderr, " tid=%04x", req->tid );
1514 fprintf( stderr, ", access=%08x", req->access );
1515 fprintf( stderr, ", attributes=%08x", req->attributes );
1518 static void dump_open_thread_reply( const struct open_thread_reply *req )
1520 fprintf( stderr, " handle=%04x", req->handle );
1523 static void dump_select_request( const struct select_request *req )
1525 fprintf( stderr, " flags=%d", req->flags );
1526 dump_uint64( ", cookie=", &req->cookie );
1527 dump_timeout( ", timeout=", &req->timeout );
1528 fprintf( stderr, ", prev_apc=%04x", req->prev_apc );
1529 dump_varargs_apc_result( ", result=", cur_size );
1530 dump_varargs_select_op( ", data=", cur_size );
1533 static void dump_select_reply( const struct select_reply *req )
1535 dump_timeout( " timeout=", &req->timeout );
1536 dump_apc_call( ", call=", &req->call );
1537 fprintf( stderr, ", apc_handle=%04x", req->apc_handle );
1540 static void dump_create_event_request( const struct create_event_request *req )
1542 fprintf( stderr, " access=%08x", req->access );
1543 fprintf( stderr, ", manual_reset=%d", req->manual_reset );
1544 fprintf( stderr, ", initial_state=%d", req->initial_state );
1545 dump_varargs_object_attributes( ", objattr=", cur_size );
1548 static void dump_create_event_reply( const struct create_event_reply *req )
1550 fprintf( stderr, " handle=%04x", req->handle );
1553 static void dump_event_op_request( const struct event_op_request *req )
1555 fprintf( stderr, " handle=%04x", req->handle );
1556 fprintf( stderr, ", op=%d", req->op );
1559 static void dump_query_event_request( const struct query_event_request *req )
1561 fprintf( stderr, " handle=%04x", req->handle );
1564 static void dump_query_event_reply( const struct query_event_reply *req )
1566 fprintf( stderr, " manual_reset=%d", req->manual_reset );
1567 fprintf( stderr, ", state=%d", req->state );
1570 static void dump_open_event_request( const struct open_event_request *req )
1572 fprintf( stderr, " access=%08x", req->access );
1573 fprintf( stderr, ", attributes=%08x", req->attributes );
1574 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1575 dump_varargs_unicode_str( ", name=", cur_size );
1578 static void dump_open_event_reply( const struct open_event_reply *req )
1580 fprintf( stderr, " handle=%04x", req->handle );
1583 static void dump_create_keyed_event_request( const struct create_keyed_event_request *req )
1585 fprintf( stderr, " access=%08x", req->access );
1586 dump_varargs_object_attributes( ", objattr=", cur_size );
1589 static void dump_create_keyed_event_reply( const struct create_keyed_event_reply *req )
1591 fprintf( stderr, " handle=%04x", req->handle );
1594 static void dump_open_keyed_event_request( const struct open_keyed_event_request *req )
1596 fprintf( stderr, " access=%08x", req->access );
1597 fprintf( stderr, ", attributes=%08x", req->attributes );
1598 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1599 dump_varargs_unicode_str( ", name=", cur_size );
1602 static void dump_open_keyed_event_reply( const struct open_keyed_event_reply *req )
1604 fprintf( stderr, " handle=%04x", req->handle );
1607 static void dump_create_mutex_request( const struct create_mutex_request *req )
1609 fprintf( stderr, " access=%08x", req->access );
1610 fprintf( stderr, ", owned=%d", req->owned );
1611 dump_varargs_object_attributes( ", objattr=", cur_size );
1614 static void dump_create_mutex_reply( const struct create_mutex_reply *req )
1616 fprintf( stderr, " handle=%04x", req->handle );
1619 static void dump_release_mutex_request( const struct release_mutex_request *req )
1621 fprintf( stderr, " handle=%04x", req->handle );
1624 static void dump_release_mutex_reply( const struct release_mutex_reply *req )
1626 fprintf( stderr, " prev_count=%08x", req->prev_count );
1629 static void dump_open_mutex_request( const struct open_mutex_request *req )
1631 fprintf( stderr, " access=%08x", req->access );
1632 fprintf( stderr, ", attributes=%08x", req->attributes );
1633 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1634 dump_varargs_unicode_str( ", name=", cur_size );
1637 static void dump_open_mutex_reply( const struct open_mutex_reply *req )
1639 fprintf( stderr, " handle=%04x", req->handle );
1642 static void dump_query_mutex_request( const struct query_mutex_request *req )
1644 fprintf( stderr, " handle=%04x", req->handle );
1647 static void dump_query_mutex_reply( const struct query_mutex_reply *req )
1649 fprintf( stderr, " count=%08x", req->count );
1650 fprintf( stderr, ", owned=%d", req->owned );
1651 fprintf( stderr, ", abandoned=%d", req->abandoned );
1654 static void dump_create_semaphore_request( const struct create_semaphore_request *req )
1656 fprintf( stderr, " access=%08x", req->access );
1657 fprintf( stderr, ", initial=%08x", req->initial );
1658 fprintf( stderr, ", max=%08x", req->max );
1659 dump_varargs_object_attributes( ", objattr=", cur_size );
1662 static void dump_create_semaphore_reply( const struct create_semaphore_reply *req )
1664 fprintf( stderr, " handle=%04x", req->handle );
1667 static void dump_release_semaphore_request( const struct release_semaphore_request *req )
1669 fprintf( stderr, " handle=%04x", req->handle );
1670 fprintf( stderr, ", count=%08x", req->count );
1673 static void dump_release_semaphore_reply( const struct release_semaphore_reply *req )
1675 fprintf( stderr, " prev_count=%08x", req->prev_count );
1678 static void dump_query_semaphore_request( const struct query_semaphore_request *req )
1680 fprintf( stderr, " handle=%04x", req->handle );
1683 static void dump_query_semaphore_reply( const struct query_semaphore_reply *req )
1685 fprintf( stderr, " current=%08x", req->current );
1686 fprintf( stderr, ", max=%08x", req->max );
1689 static void dump_open_semaphore_request( const struct open_semaphore_request *req )
1691 fprintf( stderr, " access=%08x", req->access );
1692 fprintf( stderr, ", attributes=%08x", req->attributes );
1693 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1694 dump_varargs_unicode_str( ", name=", cur_size );
1697 static void dump_open_semaphore_reply( const struct open_semaphore_reply *req )
1699 fprintf( stderr, " handle=%04x", req->handle );
1702 static void dump_create_file_request( const struct create_file_request *req )
1704 fprintf( stderr, " access=%08x", req->access );
1705 fprintf( stderr, ", sharing=%08x", req->sharing );
1706 fprintf( stderr, ", create=%d", req->create );
1707 fprintf( stderr, ", options=%08x", req->options );
1708 fprintf( stderr, ", attrs=%08x", req->attrs );
1709 dump_varargs_object_attributes( ", objattr=", cur_size );
1710 dump_varargs_string( ", filename=", cur_size );
1713 static void dump_create_file_reply( const struct create_file_reply *req )
1715 fprintf( stderr, " handle=%04x", req->handle );
1718 static void dump_open_file_object_request( const struct open_file_object_request *req )
1720 fprintf( stderr, " access=%08x", req->access );
1721 fprintf( stderr, ", attributes=%08x", req->attributes );
1722 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1723 fprintf( stderr, ", sharing=%08x", req->sharing );
1724 fprintf( stderr, ", options=%08x", req->options );
1725 dump_varargs_unicode_str( ", filename=", cur_size );
1728 static void dump_open_file_object_reply( const struct open_file_object_reply *req )
1730 fprintf( stderr, " handle=%04x", req->handle );
1733 static void dump_alloc_file_handle_request( const struct alloc_file_handle_request *req )
1735 fprintf( stderr, " access=%08x", req->access );
1736 fprintf( stderr, ", attributes=%08x", req->attributes );
1737 fprintf( stderr, ", fd=%d", req->fd );
1740 static void dump_alloc_file_handle_reply( const struct alloc_file_handle_reply *req )
1742 fprintf( stderr, " handle=%04x", req->handle );
1745 static void dump_get_handle_unix_name_request( const struct get_handle_unix_name_request *req )
1747 fprintf( stderr, " handle=%04x", req->handle );
1750 static void dump_get_handle_unix_name_reply( const struct get_handle_unix_name_reply *req )
1752 fprintf( stderr, " name_len=%u", req->name_len );
1753 dump_varargs_string( ", name=", cur_size );
1756 static void dump_get_handle_fd_request( const struct get_handle_fd_request *req )
1758 fprintf( stderr, " handle=%04x", req->handle );
1761 static void dump_get_handle_fd_reply( const struct get_handle_fd_reply *req )
1763 fprintf( stderr, " type=%d", req->type );
1764 fprintf( stderr, ", cacheable=%d", req->cacheable );
1765 fprintf( stderr, ", access=%08x", req->access );
1766 fprintf( stderr, ", options=%08x", req->options );
1769 static void dump_get_directory_cache_entry_request( const struct get_directory_cache_entry_request *req )
1771 fprintf( stderr, " handle=%04x", req->handle );
1774 static void dump_get_directory_cache_entry_reply( const struct get_directory_cache_entry_reply *req )
1776 fprintf( stderr, " entry=%d", req->entry );
1777 dump_varargs_ints( ", free=", cur_size );
1780 static void dump_flush_request( const struct flush_request *req )
1782 fprintf( stderr, " blocking=%d", req->blocking );
1783 dump_async_data( ", async=", &req->async );
1786 static void dump_flush_reply( const struct flush_reply *req )
1788 fprintf( stderr, " event=%04x", req->event );
1791 static void dump_lock_file_request( const struct lock_file_request *req )
1793 fprintf( stderr, " handle=%04x", req->handle );
1794 dump_uint64( ", offset=", &req->offset );
1795 dump_uint64( ", count=", &req->count );
1796 fprintf( stderr, ", shared=%d", req->shared );
1797 fprintf( stderr, ", wait=%d", req->wait );
1800 static void dump_lock_file_reply( const struct lock_file_reply *req )
1802 fprintf( stderr, " handle=%04x", req->handle );
1803 fprintf( stderr, ", overlapped=%d", req->overlapped );
1806 static void dump_unlock_file_request( const struct unlock_file_request *req )
1808 fprintf( stderr, " handle=%04x", req->handle );
1809 dump_uint64( ", offset=", &req->offset );
1810 dump_uint64( ", count=", &req->count );
1813 static void dump_create_socket_request( const struct create_socket_request *req )
1815 fprintf( stderr, " access=%08x", req->access );
1816 fprintf( stderr, ", attributes=%08x", req->attributes );
1817 fprintf( stderr, ", family=%d", req->family );
1818 fprintf( stderr, ", type=%d", req->type );
1819 fprintf( stderr, ", protocol=%d", req->protocol );
1820 fprintf( stderr, ", flags=%08x", req->flags );
1823 static void dump_create_socket_reply( const struct create_socket_reply *req )
1825 fprintf( stderr, " handle=%04x", req->handle );
1828 static void dump_accept_socket_request( const struct accept_socket_request *req )
1830 fprintf( stderr, " lhandle=%04x", req->lhandle );
1831 fprintf( stderr, ", access=%08x", req->access );
1832 fprintf( stderr, ", attributes=%08x", req->attributes );
1835 static void dump_accept_socket_reply( const struct accept_socket_reply *req )
1837 fprintf( stderr, " handle=%04x", req->handle );
1840 static void dump_accept_into_socket_request( const struct accept_into_socket_request *req )
1842 fprintf( stderr, " lhandle=%04x", req->lhandle );
1843 fprintf( stderr, ", ahandle=%04x", req->ahandle );
1846 static void dump_set_socket_event_request( const struct set_socket_event_request *req )
1848 fprintf( stderr, " handle=%04x", req->handle );
1849 fprintf( stderr, ", mask=%08x", req->mask );
1850 fprintf( stderr, ", event=%04x", req->event );
1851 fprintf( stderr, ", window=%08x", req->window );
1852 fprintf( stderr, ", msg=%08x", req->msg );
1855 static void dump_get_socket_event_request( const struct get_socket_event_request *req )
1857 fprintf( stderr, " handle=%04x", req->handle );
1858 fprintf( stderr, ", service=%d", req->service );
1859 fprintf( stderr, ", c_event=%04x", req->c_event );
1862 static void dump_get_socket_event_reply( const struct get_socket_event_reply *req )
1864 fprintf( stderr, " mask=%08x", req->mask );
1865 fprintf( stderr, ", pmask=%08x", req->pmask );
1866 fprintf( stderr, ", state=%08x", req->state );
1867 dump_varargs_ints( ", errors=", cur_size );
1870 static void dump_get_socket_info_request( const struct get_socket_info_request *req )
1872 fprintf( stderr, " handle=%04x", req->handle );
1875 static void dump_get_socket_info_reply( const struct get_socket_info_reply *req )
1877 fprintf( stderr, " family=%d", req->family );
1878 fprintf( stderr, ", type=%d", req->type );
1879 fprintf( stderr, ", protocol=%d", req->protocol );
1882 static void dump_enable_socket_event_request( const struct enable_socket_event_request *req )
1884 fprintf( stderr, " handle=%04x", req->handle );
1885 fprintf( stderr, ", mask=%08x", req->mask );
1886 fprintf( stderr, ", sstate=%08x", req->sstate );
1887 fprintf( stderr, ", cstate=%08x", req->cstate );
1890 static void dump_set_socket_deferred_request( const struct set_socket_deferred_request *req )
1892 fprintf( stderr, " handle=%04x", req->handle );
1893 fprintf( stderr, ", deferred=%04x", req->deferred );
1896 static void dump_alloc_console_request( const struct alloc_console_request *req )
1898 fprintf( stderr, " access=%08x", req->access );
1899 fprintf( stderr, ", attributes=%08x", req->attributes );
1900 fprintf( stderr, ", pid=%04x", req->pid );
1901 fprintf( stderr, ", input_fd=%d", req->input_fd );
1904 static void dump_alloc_console_reply( const struct alloc_console_reply *req )
1906 fprintf( stderr, " handle_in=%04x", req->handle_in );
1907 fprintf( stderr, ", event=%04x", req->event );
1910 static void dump_free_console_request( const struct free_console_request *req )
1914 static void dump_get_console_renderer_events_request( const struct get_console_renderer_events_request *req )
1916 fprintf( stderr, " handle=%04x", req->handle );
1919 static void dump_get_console_renderer_events_reply( const struct get_console_renderer_events_reply *req )
1921 dump_varargs_bytes( " data=", cur_size );
1924 static void dump_open_console_request( const struct open_console_request *req )
1926 fprintf( stderr, " from=%04x", req->from );
1927 fprintf( stderr, ", access=%08x", req->access );
1928 fprintf( stderr, ", attributes=%08x", req->attributes );
1929 fprintf( stderr, ", share=%d", req->share );
1932 static void dump_open_console_reply( const struct open_console_reply *req )
1934 fprintf( stderr, " handle=%04x", req->handle );
1937 static void dump_get_console_wait_event_request( const struct get_console_wait_event_request *req )
1941 static void dump_get_console_wait_event_reply( const struct get_console_wait_event_reply *req )
1943 fprintf( stderr, " handle=%04x", req->handle );
1946 static void dump_get_console_mode_request( const struct get_console_mode_request *req )
1948 fprintf( stderr, " handle=%04x", req->handle );
1951 static void dump_get_console_mode_reply( const struct get_console_mode_reply *req )
1953 fprintf( stderr, " mode=%d", req->mode );
1956 static void dump_set_console_mode_request( const struct set_console_mode_request *req )
1958 fprintf( stderr, " handle=%04x", req->handle );
1959 fprintf( stderr, ", mode=%d", req->mode );
1962 static void dump_set_console_input_info_request( const struct set_console_input_info_request *req )
1964 fprintf( stderr, " handle=%04x", req->handle );
1965 fprintf( stderr, ", mask=%d", req->mask );
1966 fprintf( stderr, ", active_sb=%04x", req->active_sb );
1967 fprintf( stderr, ", history_mode=%d", req->history_mode );
1968 fprintf( stderr, ", history_size=%d", req->history_size );
1969 fprintf( stderr, ", edition_mode=%d", req->edition_mode );
1970 fprintf( stderr, ", input_cp=%d", req->input_cp );
1971 fprintf( stderr, ", output_cp=%d", req->output_cp );
1972 fprintf( stderr, ", win=%08x", req->win );
1973 dump_varargs_unicode_str( ", title=", cur_size );
1976 static void dump_get_console_input_info_request( const struct get_console_input_info_request *req )
1978 fprintf( stderr, " handle=%04x", req->handle );
1981 static void dump_get_console_input_info_reply( const struct get_console_input_info_reply *req )
1983 fprintf( stderr, " history_mode=%d", req->history_mode );
1984 fprintf( stderr, ", history_size=%d", req->history_size );
1985 fprintf( stderr, ", history_index=%d", req->history_index );
1986 fprintf( stderr, ", edition_mode=%d", req->edition_mode );
1987 fprintf( stderr, ", input_cp=%d", req->input_cp );
1988 fprintf( stderr, ", output_cp=%d", req->output_cp );
1989 fprintf( stderr, ", win=%08x", req->win );
1990 dump_varargs_unicode_str( ", title=", cur_size );
1993 static void dump_append_console_input_history_request( const struct append_console_input_history_request *req )
1995 fprintf( stderr, " handle=%04x", req->handle );
1996 dump_varargs_unicode_str( ", line=", cur_size );
1999 static void dump_get_console_input_history_request( const struct get_console_input_history_request *req )
2001 fprintf( stderr, " handle=%04x", req->handle );
2002 fprintf( stderr, ", index=%d", req->index );
2005 static void dump_get_console_input_history_reply( const struct get_console_input_history_reply *req )
2007 fprintf( stderr, " total=%d", req->total );
2008 dump_varargs_unicode_str( ", line=", cur_size );
2011 static void dump_create_console_output_request( const struct create_console_output_request *req )
2013 fprintf( stderr, " handle_in=%04x", req->handle_in );
2014 fprintf( stderr, ", access=%08x", req->access );
2015 fprintf( stderr, ", attributes=%08x", req->attributes );
2016 fprintf( stderr, ", share=%08x", req->share );
2017 fprintf( stderr, ", fd=%d", req->fd );
2020 static void dump_create_console_output_reply( const struct create_console_output_reply *req )
2022 fprintf( stderr, " handle_out=%04x", req->handle_out );
2025 static void dump_set_console_output_info_request( const struct set_console_output_info_request *req )
2027 fprintf( stderr, " handle=%04x", req->handle );
2028 fprintf( stderr, ", mask=%d", req->mask );
2029 fprintf( stderr, ", cursor_size=%d", req->cursor_size );
2030 fprintf( stderr, ", cursor_visible=%d", req->cursor_visible );
2031 fprintf( stderr, ", cursor_x=%d", req->cursor_x );
2032 fprintf( stderr, ", cursor_y=%d", req->cursor_y );
2033 fprintf( stderr, ", width=%d", req->width );
2034 fprintf( stderr, ", height=%d", req->height );
2035 fprintf( stderr, ", attr=%d", req->attr );
2036 fprintf( stderr, ", popup_attr=%d", req->popup_attr );
2037 fprintf( stderr, ", win_left=%d", req->win_left );
2038 fprintf( stderr, ", win_top=%d", req->win_top );
2039 fprintf( stderr, ", win_right=%d", req->win_right );
2040 fprintf( stderr, ", win_bottom=%d", req->win_bottom );
2041 fprintf( stderr, ", max_width=%d", req->max_width );
2042 fprintf( stderr, ", max_height=%d", req->max_height );
2043 fprintf( stderr, ", font_width=%d", req->font_width );
2044 fprintf( stderr, ", font_height=%d", req->font_height );
2045 dump_varargs_uints( ", colors=", cur_size );
2048 static void dump_get_console_output_info_request( const struct get_console_output_info_request *req )
2050 fprintf( stderr, " handle=%04x", req->handle );
2053 static void dump_get_console_output_info_reply( const struct get_console_output_info_reply *req )
2055 fprintf( stderr, " cursor_size=%d", req->cursor_size );
2056 fprintf( stderr, ", cursor_visible=%d", req->cursor_visible );
2057 fprintf( stderr, ", cursor_x=%d", req->cursor_x );
2058 fprintf( stderr, ", cursor_y=%d", req->cursor_y );
2059 fprintf( stderr, ", width=%d", req->width );
2060 fprintf( stderr, ", height=%d", req->height );
2061 fprintf( stderr, ", attr=%d", req->attr );
2062 fprintf( stderr, ", popup_attr=%d", req->popup_attr );
2063 fprintf( stderr, ", win_left=%d", req->win_left );
2064 fprintf( stderr, ", win_top=%d", req->win_top );
2065 fprintf( stderr, ", win_right=%d", req->win_right );
2066 fprintf( stderr, ", win_bottom=%d", req->win_bottom );
2067 fprintf( stderr, ", max_width=%d", req->max_width );
2068 fprintf( stderr, ", max_height=%d", req->max_height );
2069 fprintf( stderr, ", font_width=%d", req->font_width );
2070 fprintf( stderr, ", font_height=%d", req->font_height );
2071 dump_varargs_uints( ", colors=", cur_size );
2074 static void dump_write_console_input_request( const struct write_console_input_request *req )
2076 fprintf( stderr, " handle=%04x", req->handle );
2077 dump_varargs_input_records( ", rec=", cur_size );
2080 static void dump_write_console_input_reply( const struct write_console_input_reply *req )
2082 fprintf( stderr, " written=%d", req->written );
2085 static void dump_read_console_input_request( const struct read_console_input_request *req )
2087 fprintf( stderr, " handle=%04x", req->handle );
2088 fprintf( stderr, ", flush=%d", req->flush );
2091 static void dump_read_console_input_reply( const struct read_console_input_reply *req )
2093 fprintf( stderr, " read=%d", req->read );
2094 dump_varargs_input_records( ", rec=", cur_size );
2097 static void dump_write_console_output_request( const struct write_console_output_request *req )
2099 fprintf( stderr, " handle=%04x", req->handle );
2100 fprintf( stderr, ", x=%d", req->x );
2101 fprintf( stderr, ", y=%d", req->y );
2102 fprintf( stderr, ", mode=%d", req->mode );
2103 fprintf( stderr, ", wrap=%d", req->wrap );
2104 dump_varargs_bytes( ", data=", cur_size );
2107 static void dump_write_console_output_reply( const struct write_console_output_reply *req )
2109 fprintf( stderr, " written=%d", req->written );
2110 fprintf( stderr, ", width=%d", req->width );
2111 fprintf( stderr, ", height=%d", req->height );
2114 static void dump_fill_console_output_request( const struct fill_console_output_request *req )
2116 fprintf( stderr, " handle=%04x", req->handle );
2117 fprintf( stderr, ", x=%d", req->x );
2118 fprintf( stderr, ", y=%d", req->y );
2119 fprintf( stderr, ", mode=%d", req->mode );
2120 fprintf( stderr, ", count=%d", req->count );
2121 fprintf( stderr, ", wrap=%d", req->wrap );
2122 dump_char_info( ", data=", &req->data );
2125 static void dump_fill_console_output_reply( const struct fill_console_output_reply *req )
2127 fprintf( stderr, " written=%d", req->written );
2130 static void dump_read_console_output_request( const struct read_console_output_request *req )
2132 fprintf( stderr, " handle=%04x", req->handle );
2133 fprintf( stderr, ", x=%d", req->x );
2134 fprintf( stderr, ", y=%d", req->y );
2135 fprintf( stderr, ", mode=%d", req->mode );
2136 fprintf( stderr, ", wrap=%d", req->wrap );
2139 static void dump_read_console_output_reply( const struct read_console_output_reply *req )
2141 fprintf( stderr, " width=%d", req->width );
2142 fprintf( stderr, ", height=%d", req->height );
2143 dump_varargs_bytes( ", data=", cur_size );
2146 static void dump_move_console_output_request( const struct move_console_output_request *req )
2148 fprintf( stderr, " handle=%04x", req->handle );
2149 fprintf( stderr, ", x_src=%d", req->x_src );
2150 fprintf( stderr, ", y_src=%d", req->y_src );
2151 fprintf( stderr, ", x_dst=%d", req->x_dst );
2152 fprintf( stderr, ", y_dst=%d", req->y_dst );
2153 fprintf( stderr, ", w=%d", req->w );
2154 fprintf( stderr, ", h=%d", req->h );
2157 static void dump_send_console_signal_request( const struct send_console_signal_request *req )
2159 fprintf( stderr, " signal=%d", req->signal );
2160 fprintf( stderr, ", group_id=%04x", req->group_id );
2163 static void dump_read_directory_changes_request( const struct read_directory_changes_request *req )
2165 fprintf( stderr, " filter=%08x", req->filter );
2166 fprintf( stderr, ", subtree=%d", req->subtree );
2167 fprintf( stderr, ", want_data=%d", req->want_data );
2168 dump_async_data( ", async=", &req->async );
2171 static void dump_read_change_request( const struct read_change_request *req )
2173 fprintf( stderr, " handle=%04x", req->handle );
2176 static void dump_read_change_reply( const struct read_change_reply *req )
2178 dump_varargs_filesystem_event( " events=", cur_size );
2181 static void dump_create_mapping_request( const struct create_mapping_request *req )
2183 fprintf( stderr, " access=%08x", req->access );
2184 fprintf( stderr, ", flags=%08x", req->flags );
2185 fprintf( stderr, ", protect=%08x", req->protect );
2186 dump_uint64( ", size=", &req->size );
2187 fprintf( stderr, ", file_handle=%04x", req->file_handle );
2188 dump_varargs_object_attributes( ", objattr=", cur_size );
2191 static void dump_create_mapping_reply( const struct create_mapping_reply *req )
2193 fprintf( stderr, " handle=%04x", req->handle );
2196 static void dump_open_mapping_request( const struct open_mapping_request *req )
2198 fprintf( stderr, " access=%08x", req->access );
2199 fprintf( stderr, ", attributes=%08x", req->attributes );
2200 fprintf( stderr, ", rootdir=%04x", req->rootdir );
2201 dump_varargs_unicode_str( ", name=", cur_size );
2204 static void dump_open_mapping_reply( const struct open_mapping_reply *req )
2206 fprintf( stderr, " handle=%04x", req->handle );
2209 static void dump_get_mapping_info_request( const struct get_mapping_info_request *req )
2211 fprintf( stderr, " handle=%04x", req->handle );
2212 fprintf( stderr, ", access=%08x", req->access );
2215 static void dump_get_mapping_info_reply( const struct get_mapping_info_reply *req )
2217 dump_uint64( " size=", &req->size );
2218 fprintf( stderr, ", flags=%08x", req->flags );
2219 fprintf( stderr, ", protect=%d", req->protect );
2220 fprintf( stderr, ", mapping=%04x", req->mapping );
2221 fprintf( stderr, ", shared_file=%04x", req->shared_file );
2222 dump_varargs_pe_image_info( ", image=", cur_size );
2225 static void dump_get_mapping_committed_range_request( const struct get_mapping_committed_range_request *req )
2227 fprintf( stderr, " handle=%04x", req->handle );
2228 dump_uint64( ", offset=", &req->offset );
2231 static void dump_get_mapping_committed_range_reply( const struct get_mapping_committed_range_reply *req )
2233 dump_uint64( " size=", &req->size );
2234 fprintf( stderr, ", committed=%d", req->committed );
2237 static void dump_add_mapping_committed_range_request( const struct add_mapping_committed_range_request *req )
2239 fprintf( stderr, " handle=%04x", req->handle );
2240 dump_uint64( ", offset=", &req->offset );
2241 dump_uint64( ", size=", &req->size );
2244 static void dump_create_snapshot_request( const struct create_snapshot_request *req )
2246 fprintf( stderr, " attributes=%08x", req->attributes );
2247 fprintf( stderr, ", flags=%08x", req->flags );
2250 static void dump_create_snapshot_reply( const struct create_snapshot_reply *req )
2252 fprintf( stderr, " handle=%04x", req->handle );
2255 static void dump_next_process_request( const struct next_process_request *req )
2257 fprintf( stderr, " handle=%04x", req->handle );
2258 fprintf( stderr, ", reset=%d", req->reset );
2261 static void dump_next_process_reply( const struct next_process_reply *req )
2263 fprintf( stderr, " count=%d", req->count );
2264 fprintf( stderr, ", pid=%04x", req->pid );
2265 fprintf( stderr, ", ppid=%04x", req->ppid );
2266 fprintf( stderr, ", threads=%d", req->threads );
2267 fprintf( stderr, ", priority=%d", req->priority );
2268 fprintf( stderr, ", handles=%d", req->handles );
2269 fprintf( stderr, ", unix_pid=%d", req->unix_pid );
2270 dump_varargs_unicode_str( ", filename=", cur_size );
2273 static void dump_next_thread_request( const struct next_thread_request *req )
2275 fprintf( stderr, " handle=%04x", req->handle );
2276 fprintf( stderr, ", reset=%d", req->reset );
2279 static void dump_next_thread_reply( const struct next_thread_reply *req )
2281 fprintf( stderr, " count=%d", req->count );
2282 fprintf( stderr, ", pid=%04x", req->pid );
2283 fprintf( stderr, ", tid=%04x", req->tid );
2284 fprintf( stderr, ", base_pri=%d", req->base_pri );
2285 fprintf( stderr, ", delta_pri=%d", req->delta_pri );
2288 static void dump_wait_debug_event_request( const struct wait_debug_event_request *req )
2290 fprintf( stderr, " get_handle=%d", req->get_handle );
2293 static void dump_wait_debug_event_reply( const struct wait_debug_event_reply *req )
2295 fprintf( stderr, " pid=%04x", req->pid );
2296 fprintf( stderr, ", tid=%04x", req->tid );
2297 fprintf( stderr, ", wait=%04x", req->wait );
2298 dump_varargs_debug_event( ", event=", cur_size );
2301 static void dump_queue_exception_event_request( const struct queue_exception_event_request *req )
2303 fprintf( stderr, " first=%d", req->first );
2304 fprintf( stderr, ", code=%08x", req->code );
2305 fprintf( stderr, ", flags=%08x", req->flags );
2306 dump_uint64( ", record=", &req->record );
2307 dump_uint64( ", address=", &req->address );
2308 fprintf( stderr, ", len=%u", req->len );
2309 dump_varargs_uints64( ", params=", min(cur_size,req->len) );
2310 dump_varargs_context( ", context=", cur_size );
2313 static void dump_queue_exception_event_reply( const struct queue_exception_event_reply *req )
2315 fprintf( stderr, " handle=%04x", req->handle );
2318 static void dump_get_exception_status_request( const struct get_exception_status_request *req )
2320 fprintf( stderr, " handle=%04x", req->handle );
2323 static void dump_get_exception_status_reply( const struct get_exception_status_reply *req )
2325 dump_varargs_context( " context=", cur_size );
2328 static void dump_continue_debug_event_request( const struct continue_debug_event_request *req )
2330 fprintf( stderr, " pid=%04x", req->pid );
2331 fprintf( stderr, ", tid=%04x", req->tid );
2332 fprintf( stderr, ", status=%d", req->status );
2335 static void dump_debug_process_request( const struct debug_process_request *req )
2337 fprintf( stderr, " pid=%04x", req->pid );
2338 fprintf( stderr, ", attach=%d", req->attach );
2341 static void dump_debug_break_request( const struct debug_break_request *req )
2343 fprintf( stderr, " handle=%04x", req->handle );
2346 static void dump_debug_break_reply( const struct debug_break_reply *req )
2348 fprintf( stderr, " self=%d", req->self );
2351 static void dump_set_debugger_kill_on_exit_request( const struct set_debugger_kill_on_exit_request *req )
2353 fprintf( stderr, " kill_on_exit=%d", req->kill_on_exit );
2356 static void dump_read_process_memory_request( const struct read_process_memory_request *req )
2358 fprintf( stderr, " handle=%04x", req->handle );
2359 dump_uint64( ", addr=", &req->addr );
2362 static void dump_read_process_memory_reply( const struct read_process_memory_reply *req )
2364 dump_varargs_bytes( " data=", cur_size );
2367 static void dump_write_process_memory_request( const struct write_process_memory_request *req )
2369 fprintf( stderr, " handle=%04x", req->handle );
2370 dump_uint64( ", addr=", &req->addr );
2371 dump_varargs_bytes( ", data=", cur_size );
2374 static void dump_create_key_request( const struct create_key_request *req )
2376 fprintf( stderr, " access=%08x", req->access );
2377 fprintf( stderr, ", options=%08x", req->options );
2378 dump_varargs_object_attributes( ", objattr=", cur_size );
2379 dump_varargs_unicode_str( ", class=", cur_size );
2382 static void dump_create_key_reply( const struct create_key_reply *req )
2384 fprintf( stderr, " hkey=%04x", req->hkey );
2385 fprintf( stderr, ", created=%d", req->created );
2388 static void dump_open_key_request( const struct open_key_request *req )
2390 fprintf( stderr, " parent=%04x", req->parent );
2391 fprintf( stderr, ", access=%08x", req->access );
2392 fprintf( stderr, ", attributes=%08x", req->attributes );
2393 dump_varargs_unicode_str( ", name=", cur_size );
2396 static void dump_open_key_reply( const struct open_key_reply *req )
2398 fprintf( stderr, " hkey=%04x", req->hkey );
2401 static void dump_delete_key_request( const struct delete_key_request *req )
2403 fprintf( stderr, " hkey=%04x", req->hkey );
2406 static void dump_flush_key_request( const struct flush_key_request *req )
2408 fprintf( stderr, " hkey=%04x", req->hkey );
2411 static void dump_enum_key_request( const struct enum_key_request *req )
2413 fprintf( stderr, " hkey=%04x", req->hkey );
2414 fprintf( stderr, ", index=%d", req->index );
2415 fprintf( stderr, ", info_class=%d", req->info_class );
2418 static void dump_enum_key_reply( const struct enum_key_reply *req )
2420 fprintf( stderr, " subkeys=%d", req->subkeys );
2421 fprintf( stderr, ", max_subkey=%d", req->max_subkey );
2422 fprintf( stderr, ", max_class=%d", req->max_class );
2423 fprintf( stderr, ", values=%d", req->values );
2424 fprintf( stderr, ", max_value=%d", req->max_value );
2425 fprintf( stderr, ", max_data=%d", req->max_data );
2426 dump_timeout( ", modif=", &req->modif );
2427 fprintf( stderr, ", total=%u", req->total );
2428 fprintf( stderr, ", namelen=%u", req->namelen );
2429 dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
2430 dump_varargs_unicode_str( ", class=", cur_size );
2433 static void dump_set_key_value_request( const struct set_key_value_request *req )
2435 fprintf( stderr, " hkey=%04x", req->hkey );
2436 fprintf( stderr, ", type=%d", req->type );
2437 fprintf( stderr, ", namelen=%u", req->namelen );
2438 dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
2439 dump_varargs_bytes( ", data=", cur_size );
2442 static void dump_get_key_value_request( const struct get_key_value_request *req )
2444 fprintf( stderr, " hkey=%04x", req->hkey );
2445 dump_varargs_unicode_str( ", name=", cur_size );
2448 static void dump_get_key_value_reply( const struct get_key_value_reply *req )
2450 fprintf( stderr, " type=%d", req->type );
2451 fprintf( stderr, ", total=%u", req->total );
2452 dump_varargs_bytes( ", data=", cur_size );
2455 static void dump_enum_key_value_request( const struct enum_key_value_request *req )
2457 fprintf( stderr, " hkey=%04x", req->hkey );
2458 fprintf( stderr, ", index=%d", req->index );
2459 fprintf( stderr, ", info_class=%d", req->info_class );
2462 static void dump_enum_key_value_reply( const struct enum_key_value_reply *req )
2464 fprintf( stderr, " type=%d", req->type );
2465 fprintf( stderr, ", total=%u", req->total );
2466 fprintf( stderr, ", namelen=%u", req->namelen );
2467 dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
2468 dump_varargs_bytes( ", data=", cur_size );
2471 static void dump_delete_key_value_request( const struct delete_key_value_request *req )
2473 fprintf( stderr, " hkey=%04x", req->hkey );
2474 dump_varargs_unicode_str( ", name=", cur_size );
2477 static void dump_load_registry_request( const struct load_registry_request *req )
2479 fprintf( stderr, " file=%04x", req->file );
2480 dump_varargs_object_attributes( ", objattr=", cur_size );
2483 static void dump_unload_registry_request( const struct unload_registry_request *req )
2485 fprintf( stderr, " hkey=%04x", req->hkey );
2488 static void dump_save_registry_request( const struct save_registry_request *req )
2490 fprintf( stderr, " hkey=%04x", req->hkey );
2491 fprintf( stderr, ", file=%04x", req->file );
2494 static void dump_set_registry_notification_request( const struct set_registry_notification_request *req )
2496 fprintf( stderr, " hkey=%04x", req->hkey );
2497 fprintf( stderr, ", event=%04x", req->event );
2498 fprintf( stderr, ", subtree=%d", req->subtree );
2499 fprintf( stderr, ", filter=%08x", req->filter );
2502 static void dump_create_timer_request( const struct create_timer_request *req )
2504 fprintf( stderr, " access=%08x", req->access );
2505 fprintf( stderr, ", manual=%d", req->manual );
2506 dump_varargs_object_attributes( ", objattr=", cur_size );
2509 static void dump_create_timer_reply( const struct create_timer_reply *req )
2511 fprintf( stderr, " handle=%04x", req->handle );
2514 static void dump_open_timer_request( const struct open_timer_request *req )
2516 fprintf( stderr, " access=%08x", req->access );
2517 fprintf( stderr, ", attributes=%08x", req->attributes );
2518 fprintf( stderr, ", rootdir=%04x", req->rootdir );
2519 dump_varargs_unicode_str( ", name=", cur_size );
2522 static void dump_open_timer_reply( const struct open_timer_reply *req )
2524 fprintf( stderr, " handle=%04x", req->handle );
2527 static void dump_set_timer_request( const struct set_timer_request *req )
2529 fprintf( stderr, " handle=%04x", req->handle );
2530 dump_timeout( ", expire=", &req->expire );
2531 dump_uint64( ", callback=", &req->callback );
2532 dump_uint64( ", arg=", &req->arg );
2533 fprintf( stderr, ", period=%d", req->period );
2536 static void dump_set_timer_reply( const struct set_timer_reply *req )
2538 fprintf( stderr, " signaled=%d", req->signaled );
2541 static void dump_cancel_timer_request( const struct cancel_timer_request *req )
2543 fprintf( stderr, " handle=%04x", req->handle );
2546 static void dump_cancel_timer_reply( const struct cancel_timer_reply *req )
2548 fprintf( stderr, " signaled=%d", req->signaled );
2551 static void dump_get_timer_info_request( const struct get_timer_info_request *req )
2553 fprintf( stderr, " handle=%04x", req->handle );
2556 static void dump_get_timer_info_reply( const struct get_timer_info_reply *req )
2558 dump_timeout( " when=", &req->when );
2559 fprintf( stderr, ", signaled=%d", req->signaled );
2562 static void dump_get_thread_context_request( const struct get_thread_context_request *req )
2564 fprintf( stderr, " handle=%04x", req->handle );
2565 fprintf( stderr, ", flags=%08x", req->flags );
2566 fprintf( stderr, ", suspend=%d", req->suspend );
2569 static void dump_get_thread_context_reply( const struct get_thread_context_reply *req )
2571 fprintf( stderr, " self=%d", req->self );
2572 dump_varargs_context( ", context=", cur_size );
2575 static void dump_set_thread_context_request( const struct set_thread_context_request *req )
2577 fprintf( stderr, " handle=%04x", req->handle );
2578 fprintf( stderr, ", suspend=%d", req->suspend );
2579 dump_varargs_context( ", context=", cur_size );
2582 static void dump_set_thread_context_reply( const struct set_thread_context_reply *req )
2584 fprintf( stderr, " self=%d", req->self );
2587 static void dump_get_selector_entry_request( const struct get_selector_entry_request *req )
2589 fprintf( stderr, " handle=%04x", req->handle );
2590 fprintf( stderr, ", entry=%d", req->entry );
2593 static void dump_get_selector_entry_reply( const struct get_selector_entry_reply *req )
2595 fprintf( stderr, " base=%08x", req->base );
2596 fprintf( stderr, ", limit=%08x", req->limit );
2597 fprintf( stderr, ", flags=%02x", req->flags );
2600 static void dump_add_atom_request( const struct add_atom_request *req )
2602 fprintf( stderr, " table=%04x", req->table );
2603 dump_varargs_unicode_str( ", name=", cur_size );
2606 static void dump_add_atom_reply( const struct add_atom_reply *req )
2608 fprintf( stderr, " atom=%04x", req->atom );
2611 static void dump_delete_atom_request( const struct delete_atom_request *req )
2613 fprintf( stderr, " table=%04x", req->table );
2614 fprintf( stderr, ", atom=%04x", req->atom );
2617 static void dump_find_atom_request( const struct find_atom_request *req )
2619 fprintf( stderr, " table=%04x", req->table );
2620 dump_varargs_unicode_str( ", name=", cur_size );
2623 static void dump_find_atom_reply( const struct find_atom_reply *req )
2625 fprintf( stderr, " atom=%04x", req->atom );
2628 static void dump_get_atom_information_request( const struct get_atom_information_request *req )
2630 fprintf( stderr, " table=%04x", req->table );
2631 fprintf( stderr, ", atom=%04x", req->atom );
2634 static void dump_get_atom_information_reply( const struct get_atom_information_reply *req )
2636 fprintf( stderr, " count=%d", req->count );
2637 fprintf( stderr, ", pinned=%d", req->pinned );
2638 fprintf( stderr, ", total=%u", req->total );
2639 dump_varargs_unicode_str( ", name=", cur_size );
2642 static void dump_set_atom_information_request( const struct set_atom_information_request *req )
2644 fprintf( stderr, " table=%04x", req->table );
2645 fprintf( stderr, ", atom=%04x", req->atom );
2646 fprintf( stderr, ", pinned=%d", req->pinned );
2649 static void dump_empty_atom_table_request( const struct empty_atom_table_request *req )
2651 fprintf( stderr, " table=%04x", req->table );
2652 fprintf( stderr, ", if_pinned=%d", req->if_pinned );
2655 static void dump_init_atom_table_request( const struct init_atom_table_request *req )
2657 fprintf( stderr, " entries=%d", req->entries );
2660 static void dump_init_atom_table_reply( const struct init_atom_table_reply *req )
2662 fprintf( stderr, " table=%04x", req->table );
2665 static void dump_get_msg_queue_request( const struct get_msg_queue_request *req )
2669 static void dump_get_msg_queue_reply( const struct get_msg_queue_reply *req )
2671 fprintf( stderr, " handle=%04x", req->handle );
2674 static void dump_set_queue_fd_request( const struct set_queue_fd_request *req )
2676 fprintf( stderr, " handle=%04x", req->handle );
2679 static void dump_set_queue_mask_request( const struct set_queue_mask_request *req )
2681 fprintf( stderr, " wake_mask=%08x", req->wake_mask );
2682 fprintf( stderr, ", changed_mask=%08x", req->changed_mask );
2683 fprintf( stderr, ", skip_wait=%d", req->skip_wait );
2686 static void dump_set_queue_mask_reply( const struct set_queue_mask_reply *req )
2688 fprintf( stderr, " wake_bits=%08x", req->wake_bits );
2689 fprintf( stderr, ", changed_bits=%08x", req->changed_bits );
2692 static void dump_get_queue_status_request( const struct get_queue_status_request *req )
2694 fprintf( stderr, " clear_bits=%08x", req->clear_bits );
2697 static void dump_get_queue_status_reply( const struct get_queue_status_reply *req )
2699 fprintf( stderr, " wake_bits=%08x", req->wake_bits );
2700 fprintf( stderr, ", changed_bits=%08x", req->changed_bits );
2703 static void dump_get_process_idle_event_request( const struct get_process_idle_event_request *req )
2705 fprintf( stderr, " handle=%04x", req->handle );
2708 static void dump_get_process_idle_event_reply( const struct get_process_idle_event_reply *req )
2710 fprintf( stderr, " event=%04x", req->event );
2713 static void dump_send_message_request( const struct send_message_request *req )
2715 fprintf( stderr, " id=%04x", req->id );
2716 fprintf( stderr, ", type=%d", req->type );
2717 fprintf( stderr, ", flags=%d", req->flags );
2718 fprintf( stderr, ", win=%08x", req->win );
2719 fprintf( stderr, ", msg=%08x", req->msg );
2720 dump_uint64( ", wparam=", &req->wparam );
2721 dump_uint64( ", lparam=", &req->lparam );
2722 dump_timeout( ", timeout=", &req->timeout );
2723 dump_varargs_message_data( ", data=", cur_size );
2726 static void dump_post_quit_message_request( const struct post_quit_message_request *req )
2728 fprintf( stderr, " exit_code=%d", req->exit_code );
2731 static void dump_send_hardware_message_request( const struct send_hardware_message_request *req )
2733 fprintf( stderr, " win=%08x", req->win );
2734 dump_hw_input( ", input=", &req->input );
2735 fprintf( stderr, ", flags=%08x", req->flags );
2738 static void dump_send_hardware_message_reply( const struct send_hardware_message_reply *req )
2740 fprintf( stderr, " wait=%d", req->wait );
2741 fprintf( stderr, ", prev_x=%d", req->prev_x );
2742 fprintf( stderr, ", prev_y=%d", req->prev_y );
2743 fprintf( stderr, ", new_x=%d", req->new_x );
2744 fprintf( stderr, ", new_y=%d", req->new_y );
2745 dump_varargs_bytes( ", keystate=", cur_size );
2748 static void dump_get_message_request( const struct get_message_request *req )
2750 fprintf( stderr, " flags=%08x", req->flags );
2751 fprintf( stderr, ", get_win=%08x", req->get_win );
2752 fprintf( stderr, ", get_first=%08x", req->get_first );
2753 fprintf( stderr, ", get_last=%08x", req->get_last );
2754 fprintf( stderr, ", hw_id=%08x", req->hw_id );
2755 fprintf( stderr, ", wake_mask=%08x", req->wake_mask );
2756 fprintf( stderr, ", changed_mask=%08x", req->changed_mask );
2759 static void dump_get_message_reply( const struct get_message_reply *req )
2761 fprintf( stderr, " win=%08x", req->win );
2762 fprintf( stderr, ", msg=%08x", req->msg );
2763 dump_uint64( ", wparam=", &req->wparam );
2764 dump_uint64( ", lparam=", &req->lparam );
2765 fprintf( stderr, ", type=%d", req->type );
2766 fprintf( stderr, ", x=%d", req->x );
2767 fprintf( stderr, ", y=%d", req->y );
2768 fprintf( stderr, ", time=%08x", req->time );
2769 fprintf( stderr, ", active_hooks=%08x", req->active_hooks );
2770 fprintf( stderr, ", total=%u", req->total );
2771 dump_varargs_message_data( ", data=", cur_size );
2774 static void dump_reply_message_request( const struct reply_message_request *req )
2776 fprintf( stderr, " remove=%d", req->remove );
2777 dump_uint64( ", result=", &req->result );
2778 dump_varargs_bytes( ", data=", cur_size );
2781 static void dump_accept_hardware_message_request( const struct accept_hardware_message_request *req )
2783 fprintf( stderr, " hw_id=%08x", req->hw_id );
2784 fprintf( stderr, ", remove=%d", req->remove );
2787 static void dump_get_message_reply_request( const struct get_message_reply_request *req )
2789 fprintf( stderr, " cancel=%d", req->cancel );
2792 static void dump_get_message_reply_reply( const struct get_message_reply_reply *req )
2794 dump_uint64( " result=", &req->result );
2795 dump_varargs_bytes( ", data=", cur_size );
2798 static void dump_set_win_timer_request( const struct set_win_timer_request *req )
2800 fprintf( stderr, " win=%08x", req->win );
2801 fprintf( stderr, ", msg=%08x", req->msg );
2802 fprintf( stderr, ", rate=%08x", req->rate );
2803 dump_uint64( ", id=", &req->id );
2804 dump_uint64( ", lparam=", &req->lparam );
2807 static void dump_set_win_timer_reply( const struct set_win_timer_reply *req )
2809 dump_uint64( " id=", &req->id );
2812 static void dump_kill_win_timer_request( const struct kill_win_timer_request *req )
2814 fprintf( stderr, " win=%08x", req->win );
2815 dump_uint64( ", id=", &req->id );
2816 fprintf( stderr, ", msg=%08x", req->msg );
2819 static void dump_is_window_hung_request( const struct is_window_hung_request *req )
2821 fprintf( stderr, " win=%08x", req->win );
2824 static void dump_is_window_hung_reply( const struct is_window_hung_reply *req )
2826 fprintf( stderr, " is_hung=%d", req->is_hung );
2829 static void dump_get_serial_info_request( const struct get_serial_info_request *req )
2831 fprintf( stderr, " handle=%04x", req->handle );
2832 fprintf( stderr, ", flags=%d", req->flags );
2835 static void dump_get_serial_info_reply( const struct get_serial_info_reply *req )
2837 fprintf( stderr, " readinterval=%08x", req->readinterval );
2838 fprintf( stderr, ", readconst=%08x", req->readconst );
2839 fprintf( stderr, ", readmult=%08x", req->readmult );
2840 fprintf( stderr, ", writeconst=%08x", req->writeconst );
2841 fprintf( stderr, ", writemult=%08x", req->writemult );
2842 fprintf( stderr, ", eventmask=%08x", req->eventmask );
2843 fprintf( stderr, ", cookie=%08x", req->cookie );
2844 fprintf( stderr, ", pending_write=%08x", req->pending_write );
2847 static void dump_set_serial_info_request( const struct set_serial_info_request *req )
2849 fprintf( stderr, " handle=%04x", req->handle );
2850 fprintf( stderr, ", flags=%d", req->flags );
2851 fprintf( stderr, ", readinterval=%08x", req->readinterval );
2852 fprintf( stderr, ", readconst=%08x", req->readconst );
2853 fprintf( stderr, ", readmult=%08x", req->readmult );
2854 fprintf( stderr, ", writeconst=%08x", req->writeconst );
2855 fprintf( stderr, ", writemult=%08x", req->writemult );
2856 fprintf( stderr, ", eventmask=%08x", req->eventmask );
2859 static void dump_register_async_request( const struct register_async_request *req )
2861 fprintf( stderr, " type=%d", req->type );
2862 dump_async_data( ", async=", &req->async );
2863 fprintf( stderr, ", count=%d", req->count );
2866 static void dump_cancel_async_request( const struct cancel_async_request *req )
2868 fprintf( stderr, " handle=%04x", req->handle );
2869 dump_uint64( ", iosb=", &req->iosb );
2870 fprintf( stderr, ", only_thread=%d", req->only_thread );
2873 static void dump_get_async_result_request( const struct get_async_result_request *req )
2875 dump_uint64( " user_arg=", &req->user_arg );
2878 static void dump_get_async_result_reply( const struct get_async_result_reply *req )
2880 fprintf( stderr, " size=%u", req->size );
2881 dump_varargs_bytes( ", out_data=", cur_size );
2884 static void dump_read_request( const struct read_request *req )
2886 fprintf( stderr, " blocking=%d", req->blocking );
2887 dump_async_data( ", async=", &req->async );
2888 dump_uint64( ", pos=", &req->pos );
2891 static void dump_read_reply( const struct read_reply *req )
2893 fprintf( stderr, " wait=%04x", req->wait );
2894 fprintf( stderr, ", options=%08x", req->options );
2895 dump_varargs_bytes( ", data=", cur_size );
2898 static void dump_write_request( const struct write_request *req )
2900 fprintf( stderr, " blocking=%d", req->blocking );
2901 dump_async_data( ", async=", &req->async );
2902 dump_uint64( ", pos=", &req->pos );
2903 dump_varargs_bytes( ", data=", cur_size );
2906 static void dump_write_reply( const struct write_reply *req )
2908 fprintf( stderr, " wait=%04x", req->wait );
2909 fprintf( stderr, ", options=%08x", req->options );
2910 fprintf( stderr, ", size=%u", req->size );
2913 static void dump_ioctl_request( const struct ioctl_request *req )
2915 dump_ioctl_code( " code=", &req->code );
2916 dump_async_data( ", async=", &req->async );
2917 fprintf( stderr, ", blocking=%d", req->blocking );
2918 dump_varargs_bytes( ", in_data=", cur_size );
2921 static void dump_ioctl_reply( const struct ioctl_reply *req )
2923 fprintf( stderr, " wait=%04x", req->wait );
2924 fprintf( stderr, ", options=%08x", req->options );
2925 dump_varargs_bytes( ", out_data=", cur_size );
2928 static void dump_set_irp_result_request( const struct set_irp_result_request *req )
2930 fprintf( stderr, " handle=%04x", req->handle );
2931 fprintf( stderr, ", status=%08x", req->status );
2932 fprintf( stderr, ", size=%u", req->size );
2933 dump_uint64( ", file_ptr=", &req->file_ptr );
2934 dump_varargs_bytes( ", data=", cur_size );
2937 static void dump_create_named_pipe_request( const struct create_named_pipe_request *req )
2939 fprintf( stderr, " access=%08x", req->access );
2940 fprintf( stderr, ", options=%08x", req->options );
2941 fprintf( stderr, ", sharing=%08x", req->sharing );
2942 fprintf( stderr, ", maxinstances=%08x", req->maxinstances );
2943 fprintf( stderr, ", outsize=%08x", req->outsize );
2944 fprintf( stderr, ", insize=%08x", req->insize );
2945 dump_timeout( ", timeout=", &req->timeout );
2946 fprintf( stderr, ", flags=%08x", req->flags );
2947 dump_varargs_object_attributes( ", objattr=", cur_size );
2950 static void dump_create_named_pipe_reply( const struct create_named_pipe_reply *req )
2952 fprintf( stderr, " handle=%04x", req->handle );
2955 static void dump_get_named_pipe_info_request( const struct get_named_pipe_info_request *req )
2957 fprintf( stderr, " handle=%04x", req->handle );
2960 static void dump_get_named_pipe_info_reply( const struct get_named_pipe_info_reply *req )
2962 fprintf( stderr, " flags=%08x", req->flags );
2963 fprintf( stderr, ", sharing=%08x", req->sharing );
2964 fprintf( stderr, ", maxinstances=%08x", req->maxinstances );
2965 fprintf( stderr, ", instances=%08x", req->instances );
2966 fprintf( stderr, ", outsize=%08x", req->outsize );
2967 fprintf( stderr, ", insize=%08x", req->insize );
2970 static void dump_set_named_pipe_info_request( const struct set_named_pipe_info_request *req )
2972 fprintf( stderr, " handle=%04x", req->handle );
2973 fprintf( stderr, ", flags=%08x", req->flags );
2976 static void dump_create_window_request( const struct create_window_request *req )
2978 fprintf( stderr, " parent=%08x", req->parent );
2979 fprintf( stderr, ", owner=%08x", req->owner );
2980 fprintf( stderr, ", atom=%04x", req->atom );
2981 dump_uint64( ", instance=", &req->instance );
2982 dump_varargs_unicode_str( ", class=", cur_size );
2985 static void dump_create_window_reply( const struct create_window_reply *req )
2987 fprintf( stderr, " handle=%08x", req->handle );
2988 fprintf( stderr, ", parent=%08x", req->parent );
2989 fprintf( stderr, ", owner=%08x", req->owner );
2990 fprintf( stderr, ", extra=%d", req->extra );
2991 dump_uint64( ", class_ptr=", &req->class_ptr );
2994 static void dump_destroy_window_request( const struct destroy_window_request *req )
2996 fprintf( stderr, " handle=%08x", req->handle );
2999 static void dump_get_desktop_window_request( const struct get_desktop_window_request *req )
3001 fprintf( stderr, " force=%d", req->force );
3004 static void dump_get_desktop_window_reply( const struct get_desktop_window_reply *req )
3006 fprintf( stderr, " top_window=%08x", req->top_window );
3007 fprintf( stderr, ", msg_window=%08x", req->msg_window );
3010 static void dump_set_window_owner_request( const struct set_window_owner_request *req )
3012 fprintf( stderr, " handle=%08x", req->handle );
3013 fprintf( stderr, ", owner=%08x", req->owner );
3016 static void dump_set_window_owner_reply( const struct set_window_owner_reply *req )
3018 fprintf( stderr, " full_owner=%08x", req->full_owner );
3019 fprintf( stderr, ", prev_owner=%08x", req->prev_owner );
3022 static void dump_get_window_info_request( const struct get_window_info_request *req )
3024 fprintf( stderr, " handle=%08x", req->handle );
3027 static void dump_get_window_info_reply( const struct get_window_info_reply *req )
3029 fprintf( stderr, " full_handle=%08x", req->full_handle );
3030 fprintf( stderr, ", last_active=%08x", req->last_active );
3031 fprintf( stderr, ", pid=%04x", req->pid );
3032 fprintf( stderr, ", tid=%04x", req->tid );
3033 fprintf( stderr, ", atom=%04x", req->atom );
3034 fprintf( stderr, ", is_unicode=%d", req->is_unicode );
3037 static void dump_set_window_info_request( const struct set_window_info_request *req )
3039 fprintf( stderr, " flags=%04x", req->flags );
3040 fprintf( stderr, ", is_unicode=%d", req->is_unicode );
3041 fprintf( stderr, ", handle=%08x", req->handle );
3042 fprintf( stderr, ", style=%08x", req->style );
3043 fprintf( stderr, ", ex_style=%08x", req->ex_style );
3044 fprintf( stderr, ", id=%08x", req->id );
3045 dump_uint64( ", instance=", &req->instance );
3046 dump_uint64( ", user_data=", &req->user_data );
3047 fprintf( stderr, ", extra_offset=%d", req->extra_offset );
3048 fprintf( stderr, ", extra_size=%u", req->extra_size );
3049 dump_uint64( ", extra_value=", &req->extra_value );
3052 static void dump_set_window_info_reply( const struct set_window_info_reply *req )
3054 fprintf( stderr, " old_style=%08x", req->old_style );
3055 fprintf( stderr, ", old_ex_style=%08x", req->old_ex_style );
3056 dump_uint64( ", old_instance=", &req->old_instance );
3057 dump_uint64( ", old_user_data=", &req->old_user_data );
3058 dump_uint64( ", old_extra_value=", &req->old_extra_value );
3059 fprintf( stderr, ", old_id=%08x", req->old_id );
3062 static void dump_set_parent_request( const struct set_parent_request *req )
3064 fprintf( stderr, " handle=%08x", req->handle );
3065 fprintf( stderr, ", parent=%08x", req->parent );
3068 static void dump_set_parent_reply( const struct set_parent_reply *req )
3070 fprintf( stderr, " old_parent=%08x", req->old_parent );
3071 fprintf( stderr, ", full_parent=%08x", req->full_parent );
3074 static void dump_get_window_parents_request( const struct get_window_parents_request *req )
3076 fprintf( stderr, " handle=%08x", req->handle );
3079 static void dump_get_window_parents_reply( const struct get_window_parents_reply *req )
3081 fprintf( stderr, " count=%d", req->count );
3082 dump_varargs_user_handles( ", parents=", cur_size );
3085 static void dump_get_window_children_request( const struct get_window_children_request *req )
3087 fprintf( stderr, " desktop=%04x", req->desktop );
3088 fprintf( stderr, ", parent=%08x", req->parent );
3089 fprintf( stderr, ", atom=%04x", req->atom );
3090 fprintf( stderr, ", tid=%04x", req->tid );
3091 dump_varargs_unicode_str( ", class=", cur_size );
3094 static void dump_get_window_children_reply( const struct get_window_children_reply *req )
3096 fprintf( stderr, " count=%d", req->count );
3097 dump_varargs_user_handles( ", children=", cur_size );
3100 static void dump_get_window_children_from_point_request( const struct get_window_children_from_point_request *req )
3102 fprintf( stderr, " parent=%08x", req->parent );
3103 fprintf( stderr, ", x=%d", req->x );
3104 fprintf( stderr, ", y=%d", req->y );
3107 static void dump_get_window_children_from_point_reply( const struct get_window_children_from_point_reply *req )
3109 fprintf( stderr, " count=%d", req->count );
3110 dump_varargs_user_handles( ", children=", cur_size );
3113 static void dump_get_window_tree_request( const struct get_window_tree_request *req )
3115 fprintf( stderr, " handle=%08x", req->handle );
3118 static void dump_get_window_tree_reply( const struct get_window_tree_reply *req )
3120 fprintf( stderr, " parent=%08x", req->parent );
3121 fprintf( stderr, ", owner=%08x", req->owner );
3122 fprintf( stderr, ", next_sibling=%08x", req->next_sibling );
3123 fprintf( stderr, ", prev_sibling=%08x", req->prev_sibling );
3124 fprintf( stderr, ", first_sibling=%08x", req->first_sibling );
3125 fprintf( stderr, ", last_sibling=%08x", req->last_sibling );
3126 fprintf( stderr, ", first_child=%08x", req->first_child );
3127 fprintf( stderr, ", last_child=%08x", req->last_child );
3130 static void dump_set_window_pos_request( const struct set_window_pos_request *req )
3132 fprintf( stderr, " swp_flags=%04x", req->swp_flags );
3133 fprintf( stderr, ", paint_flags=%04x", req->paint_flags );
3134 fprintf( stderr, ", handle=%08x", req->handle );
3135 fprintf( stderr, ", previous=%08x", req->previous );
3136 dump_rectangle( ", window=", &req->window );
3137 dump_rectangle( ", client=", &req->client );
3138 dump_varargs_rectangles( ", valid=", cur_size );
3141 static void dump_set_window_pos_reply( const struct set_window_pos_reply *req )
3143 fprintf( stderr, " new_style=%08x", req->new_style );
3144 fprintf( stderr, ", new_ex_style=%08x", req->new_ex_style );
3145 fprintf( stderr, ", surface_win=%08x", req->surface_win );
3148 static void dump_get_window_rectangles_request( const struct get_window_rectangles_request *req )
3150 fprintf( stderr, " handle=%08x", req->handle );
3151 fprintf( stderr, ", relative=%d", req->relative );
3154 static void dump_get_window_rectangles_reply( const struct get_window_rectangles_reply *req )
3156 dump_rectangle( " window=", &req->window );
3157 dump_rectangle( ", visible=", &req->visible );
3158 dump_rectangle( ", client=", &req->client );
3161 static void dump_get_window_text_request( const struct get_window_text_request *req )
3163 fprintf( stderr, " handle=%08x", req->handle );
3166 static void dump_get_window_text_reply( const struct get_window_text_reply *req )
3168 dump_varargs_unicode_str( " text=", cur_size );
3171 static void dump_set_window_text_request( const struct set_window_text_request *req )
3173 fprintf( stderr, " handle=%08x", req->handle );
3174 dump_varargs_unicode_str( ", text=", cur_size );
3177 static void dump_get_windows_offset_request( const struct get_windows_offset_request *req )
3179 fprintf( stderr, " from=%08x", req->from );
3180 fprintf( stderr, ", to=%08x", req->to );
3183 static void dump_get_windows_offset_reply( const struct get_windows_offset_reply *req )
3185 fprintf( stderr, " x=%d", req->x );
3186 fprintf( stderr, ", y=%d", req->y );
3187 fprintf( stderr, ", mirror=%d", req->mirror );
3190 static void dump_get_visible_region_request( const struct get_visible_region_request *req )
3192 fprintf( stderr, " window=%08x", req->window );
3193 fprintf( stderr, ", flags=%08x", req->flags );
3196 static void dump_get_visible_region_reply( const struct get_visible_region_reply *req )
3198 fprintf( stderr, " top_win=%08x", req->top_win );
3199 dump_rectangle( ", top_rect=", &req->top_rect );
3200 dump_rectangle( ", win_rect=", &req->win_rect );
3201 fprintf( stderr, ", paint_flags=%08x", req->paint_flags );
3202 fprintf( stderr, ", total_size=%u", req->total_size );
3203 dump_varargs_rectangles( ", region=", cur_size );
3206 static void dump_get_surface_region_request( const struct get_surface_region_request *req )
3208 fprintf( stderr, " window=%08x", req->window );
3211 static void dump_get_surface_region_reply( const struct get_surface_region_reply *req )
3213 dump_rectangle( " visible_rect=", &req->visible_rect );
3214 fprintf( stderr, ", total_size=%u", req->total_size );
3215 dump_varargs_rectangles( ", region=", cur_size );
3218 static void dump_get_window_region_request( const struct get_window_region_request *req )
3220 fprintf( stderr, " window=%08x", req->window );
3223 static void dump_get_window_region_reply( const struct get_window_region_reply *req )
3225 fprintf( stderr, " total_size=%u", req->total_size );
3226 dump_varargs_rectangles( ", region=", cur_size );
3229 static void dump_set_window_region_request( const struct set_window_region_request *req )
3231 fprintf( stderr, " window=%08x", req->window );
3232 fprintf( stderr, ", redraw=%d", req->redraw );
3233 dump_varargs_rectangles( ", region=", cur_size );
3236 static void dump_get_update_region_request( const struct get_update_region_request *req )
3238 fprintf( stderr, " window=%08x", req->window );
3239 fprintf( stderr, ", from_child=%08x", req->from_child );
3240 fprintf( stderr, ", flags=%08x", req->flags );
3243 static void dump_get_update_region_reply( const struct get_update_region_reply *req )
3245 fprintf( stderr, " child=%08x", req->child );
3246 fprintf( stderr, ", flags=%08x", req->flags );
3247 fprintf( stderr, ", total_size=%u", req->total_size );
3248 dump_varargs_rectangles( ", region=", cur_size );
3251 static void dump_update_window_zorder_request( const struct update_window_zorder_request *req )
3253 fprintf( stderr, " window=%08x", req->window );
3254 dump_rectangle( ", rect=", &req->rect );
3257 static void dump_redraw_window_request( const struct redraw_window_request *req )
3259 fprintf( stderr, " window=%08x", req->window );
3260 fprintf( stderr, ", flags=%08x", req->flags );
3261 dump_varargs_rectangles( ", region=", cur_size );
3264 static void dump_set_window_property_request( const struct set_window_property_request *req )
3266 fprintf( stderr, " window=%08x", req->window );
3267 dump_uint64( ", data=", &req->data );
3268 fprintf( stderr, ", atom=%04x", req->atom );
3269 dump_varargs_unicode_str( ", name=", cur_size );
3272 static void dump_remove_window_property_request( const struct remove_window_property_request *req )
3274 fprintf( stderr, " window=%08x", req->window );
3275 fprintf( stderr, ", atom=%04x", req->atom );
3276 dump_varargs_unicode_str( ", name=", cur_size );
3279 static void dump_remove_window_property_reply( const struct remove_window_property_reply *req )
3281 dump_uint64( " data=", &req->data );
3284 static void dump_get_window_property_request( const struct get_window_property_request *req )
3286 fprintf( stderr, " window=%08x", req->window );
3287 fprintf( stderr, ", atom=%04x", req->atom );
3288 dump_varargs_unicode_str( ", name=", cur_size );
3291 static void dump_get_window_property_reply( const struct get_window_property_reply *req )
3293 dump_uint64( " data=", &req->data );
3296 static void dump_get_window_properties_request( const struct get_window_properties_request *req )
3298 fprintf( stderr, " window=%08x", req->window );
3301 static void dump_get_window_properties_reply( const struct get_window_properties_reply *req )
3303 fprintf( stderr, " total=%d", req->total );
3304 dump_varargs_properties( ", props=", cur_size );
3307 static void dump_create_winstation_request( const struct create_winstation_request *req )
3309 fprintf( stderr, " flags=%08x", req->flags );
3310 fprintf( stderr, ", access=%08x", req->access );
3311 fprintf( stderr, ", attributes=%08x", req->attributes );
3312 fprintf( stderr, ", rootdir=%04x", req->rootdir );
3313 dump_varargs_unicode_str( ", name=", cur_size );
3316 static void dump_create_winstation_reply( const struct create_winstation_reply *req )
3318 fprintf( stderr, " handle=%04x", req->handle );
3321 static void dump_open_winstation_request( const struct open_winstation_request *req )
3323 fprintf( stderr, " access=%08x", req->access );
3324 fprintf( stderr, ", attributes=%08x", req->attributes );
3325 fprintf( stderr, ", rootdir=%04x", req->rootdir );
3326 dump_varargs_unicode_str( ", name=", cur_size );
3329 static void dump_open_winstation_reply( const struct open_winstation_reply *req )
3331 fprintf( stderr, " handle=%04x", req->handle );
3334 static void dump_close_winstation_request( const struct close_winstation_request *req )
3336 fprintf( stderr, " handle=%04x", req->handle );
3339 static void dump_get_process_winstation_request( const struct get_process_winstation_request *req )
3343 static void dump_get_process_winstation_reply( const struct get_process_winstation_reply *req )
3345 fprintf( stderr, " handle=%04x", req->handle );
3348 static void dump_set_process_winstation_request( const struct set_process_winstation_request *req )
3350 fprintf( stderr, " handle=%04x", req->handle );
3353 static void dump_enum_winstation_request( const struct enum_winstation_request *req )
3355 fprintf( stderr, " index=%08x", req->index );
3358 static void dump_enum_winstation_reply( const struct enum_winstation_reply *req )
3360 fprintf( stderr, " next=%08x", req->next );
3361 dump_varargs_unicode_str( ", name=", cur_size );
3364 static void dump_create_desktop_request( const struct create_desktop_request *req )
3366 fprintf( stderr, " flags=%08x", req->flags );
3367 fprintf( stderr, ", access=%08x", req->access );
3368 fprintf( stderr, ", attributes=%08x", req->attributes );
3369 dump_varargs_unicode_str( ", name=", cur_size );
3372 static void dump_create_desktop_reply( const struct create_desktop_reply *req )
3374 fprintf( stderr, " handle=%04x", req->handle );
3377 static void dump_open_desktop_request( const struct open_desktop_request *req )
3379 fprintf( stderr, " winsta=%04x", req->winsta );
3380 fprintf( stderr, ", flags=%08x", req->flags );
3381 fprintf( stderr, ", access=%08x", req->access );
3382 fprintf( stderr, ", attributes=%08x", req->attributes );
3383 dump_varargs_unicode_str( ", name=", cur_size );
3386 static void dump_open_desktop_reply( const struct open_desktop_reply *req )
3388 fprintf( stderr, " handle=%04x", req->handle );
3391 static void dump_open_input_desktop_request( const struct open_input_desktop_request *req )
3393 fprintf( stderr, " flags=%08x", req->flags );
3394 fprintf( stderr, ", access=%08x", req->access );
3395 fprintf( stderr, ", attributes=%08x", req->attributes );
3398 static void dump_open_input_desktop_reply( const struct open_input_desktop_reply *req )
3400 fprintf( stderr, " handle=%04x", req->handle );
3403 static void dump_close_desktop_request( const struct close_desktop_request *req )
3405 fprintf( stderr, " handle=%04x", req->handle );
3408 static void dump_get_thread_desktop_request( const struct get_thread_desktop_request *req )
3410 fprintf( stderr, " tid=%04x", req->tid );
3413 static void dump_get_thread_desktop_reply( const struct get_thread_desktop_reply *req )
3415 fprintf( stderr, " handle=%04x", req->handle );
3418 static void dump_set_thread_desktop_request( const struct set_thread_desktop_request *req )
3420 fprintf( stderr, " handle=%04x", req->handle );
3423 static void dump_enum_desktop_request( const struct enum_desktop_request *req )
3425 fprintf( stderr, " winstation=%04x", req->winstation );
3426 fprintf( stderr, ", index=%08x", req->index );
3429 static void dump_enum_desktop_reply( const struct enum_desktop_reply *req )
3431 fprintf( stderr, " next=%08x", req->next );
3432 dump_varargs_unicode_str( ", name=", cur_size );
3435 static void dump_set_user_object_info_request( const struct set_user_object_info_request *req )
3437 fprintf( stderr, " handle=%04x", req->handle );
3438 fprintf( stderr, ", flags=%08x", req->flags );
3439 fprintf( stderr, ", obj_flags=%08x", req->obj_flags );
3442 static void dump_set_user_object_info_reply( const struct set_user_object_info_reply *req )
3444 fprintf( stderr, " is_desktop=%d", req->is_desktop );
3445 fprintf( stderr, ", old_obj_flags=%08x", req->old_obj_flags );
3446 dump_varargs_unicode_str( ", name=", cur_size );
3449 static void dump_register_hotkey_request( const struct register_hotkey_request *req )
3451 fprintf( stderr, " window=%08x", req->window );
3452 fprintf( stderr, ", id=%d", req->id );
3453 fprintf( stderr, ", flags=%08x", req->flags );
3454 fprintf( stderr, ", vkey=%08x", req->vkey );
3457 static void dump_register_hotkey_reply( const struct register_hotkey_reply *req )
3459 fprintf( stderr, " replaced=%d", req->replaced );
3460 fprintf( stderr, ", flags=%08x", req->flags );
3461 fprintf( stderr, ", vkey=%08x", req->vkey );
3464 static void dump_unregister_hotkey_request( const struct unregister_hotkey_request *req )
3466 fprintf( stderr, " window=%08x", req->window );
3467 fprintf( stderr, ", id=%d", req->id );
3470 static void dump_unregister_hotkey_reply( const struct unregister_hotkey_reply *req )
3472 fprintf( stderr, " flags=%08x", req->flags );
3473 fprintf( stderr, ", vkey=%08x", req->vkey );
3476 static void dump_attach_thread_input_request( const struct attach_thread_input_request *req )
3478 fprintf( stderr, " tid_from=%04x", req->tid_from );
3479 fprintf( stderr, ", tid_to=%04x", req->tid_to );
3480 fprintf( stderr, ", attach=%d", req->attach );
3483 static void dump_get_thread_input_request( const struct get_thread_input_request *req )
3485 fprintf( stderr, " tid=%04x", req->tid );
3488 static void dump_get_thread_input_reply( const struct get_thread_input_reply *req )
3490 fprintf( stderr, " focus=%08x", req->focus );
3491 fprintf( stderr, ", capture=%08x", req->capture );
3492 fprintf( stderr, ", active=%08x", req->active );
3493 fprintf( stderr, ", foreground=%08x", req->foreground );
3494 fprintf( stderr, ", menu_owner=%08x", req->menu_owner );
3495 fprintf( stderr, ", move_size=%08x", req->move_size );
3496 fprintf( stderr, ", caret=%08x", req->caret );
3497 fprintf( stderr, ", cursor=%08x", req->cursor );
3498 fprintf( stderr, ", show_count=%d", req->show_count );
3499 dump_rectangle( ", rect=", &req->rect );
3502 static void dump_get_last_input_time_request( const struct get_last_input_time_request *req )
3506 static void dump_get_last_input_time_reply( const struct get_last_input_time_reply *req )
3508 fprintf( stderr, " time=%08x", req->time );
3511 static void dump_get_key_state_request( const struct get_key_state_request *req )
3513 fprintf( stderr, " tid=%04x", req->tid );
3514 fprintf( stderr, ", key=%d", req->key );
3517 static void dump_get_key_state_reply( const struct get_key_state_reply *req )
3519 fprintf( stderr, " state=%02x", req->state );
3520 dump_varargs_bytes( ", keystate=", cur_size );
3523 static void dump_set_key_state_request( const struct set_key_state_request *req )
3525 fprintf( stderr, " tid=%04x", req->tid );
3526 fprintf( stderr, ", async=%d", req->async );
3527 dump_varargs_bytes( ", keystate=", cur_size );
3530 static void dump_set_foreground_window_request( const struct set_foreground_window_request *req )
3532 fprintf( stderr, " handle=%08x", req->handle );
3535 static void dump_set_foreground_window_reply( const struct set_foreground_window_reply *req )
3537 fprintf( stderr, " previous=%08x", req->previous );
3538 fprintf( stderr, ", send_msg_old=%d", req->send_msg_old );
3539 fprintf( stderr, ", send_msg_new=%d", req->send_msg_new );
3542 static void dump_set_focus_window_request( const struct set_focus_window_request *req )
3544 fprintf( stderr, " handle=%08x", req->handle );
3547 static void dump_set_focus_window_reply( const struct set_focus_window_reply *req )
3549 fprintf( stderr, " previous=%08x", req->previous );
3552 static void dump_set_active_window_request( const struct set_active_window_request *req )
3554 fprintf( stderr, " handle=%08x", req->handle );
3557 static void dump_set_active_window_reply( const struct set_active_window_reply *req )
3559 fprintf( stderr, " previous=%08x", req->previous );
3562 static void dump_set_capture_window_request( const struct set_capture_window_request *req )
3564 fprintf( stderr, " handle=%08x", req->handle );
3565 fprintf( stderr, ", flags=%08x", req->flags );
3568 static void dump_set_capture_window_reply( const struct set_capture_window_reply *req )
3570 fprintf( stderr, " previous=%08x", req->previous );
3571 fprintf( stderr, ", full_handle=%08x", req->full_handle );
3574 static void dump_set_caret_window_request( const struct set_caret_window_request *req )
3576 fprintf( stderr, " handle=%08x", req->handle );
3577 fprintf( stderr, ", width=%d", req->width );
3578 fprintf( stderr, ", height=%d", req->height );
3581 static void dump_set_caret_window_reply( const struct set_caret_window_reply *req )
3583 fprintf( stderr, " previous=%08x", req->previous );
3584 dump_rectangle( ", old_rect=", &req->old_rect );
3585 fprintf( stderr, ", old_hide=%d", req->old_hide );
3586 fprintf( stderr, ", old_state=%d", req->old_state );
3589 static void dump_set_caret_info_request( const struct set_caret_info_request *req )
3591 fprintf( stderr, " flags=%08x", req->flags );
3592 fprintf( stderr, ", handle=%08x", req->handle );
3593 fprintf( stderr, ", x=%d", req->x );
3594 fprintf( stderr, ", y=%d", req->y );
3595 fprintf( stderr, ", hide=%d", req->hide );
3596 fprintf( stderr, ", state=%d", req->state );
3599 static void dump_set_caret_info_reply( const struct set_caret_info_reply *req )
3601 fprintf( stderr, " full_handle=%08x", req->full_handle );
3602 dump_rectangle( ", old_rect=", &req->old_rect );
3603 fprintf( stderr, ", old_hide=%d", req->old_hide );
3604 fprintf( stderr, ", old_state=%d", req->old_state );
3607 static void dump_set_hook_request( const struct set_hook_request *req )
3609 fprintf( stderr, " id=%d", req->id );
3610 fprintf( stderr, ", pid=%04x", req->pid );
3611 fprintf( stderr, ", tid=%04x", req->tid );
3612 fprintf( stderr, ", event_min=%d", req->event_min );
3613 fprintf( stderr, ", event_max=%d", req->event_max );
3614 dump_uint64( ", proc=", &req->proc );
3615 fprintf( stderr, ", flags=%d", req->flags );
3616 fprintf( stderr, ", unicode=%d", req->unicode );
3617 dump_varargs_unicode_str( ", module=", cur_size );
3620 static void dump_set_hook_reply( const struct set_hook_reply *req )
3622 fprintf( stderr, " handle=%08x", req->handle );
3623 fprintf( stderr, ", active_hooks=%08x", req->active_hooks );
3626 static void dump_remove_hook_request( const struct remove_hook_request *req )
3628 fprintf( stderr, " handle=%08x", req->handle );
3629 dump_uint64( ", proc=", &req->proc );
3630 fprintf( stderr, ", id=%d", req->id );
3633 static void dump_remove_hook_reply( const struct remove_hook_reply *req )
3635 fprintf( stderr, " active_hooks=%08x", req->active_hooks );
3638 static void dump_start_hook_chain_request( const struct start_hook_chain_request *req )
3640 fprintf( stderr, " id=%d", req->id );
3641 fprintf( stderr, ", event=%d", req->event );
3642 fprintf( stderr, ", window=%08x", req->window );
3643 fprintf( stderr, ", object_id=%d", req->object_id );
3644 fprintf( stderr, ", child_id=%d", req->child_id );
3647 static void dump_start_hook_chain_reply( const struct start_hook_chain_reply *req )
3649 fprintf( stderr, " handle=%08x", req->handle );
3650 fprintf( stderr, ", pid=%04x", req->pid );
3651 fprintf( stderr, ", tid=%04x", req->tid );
3652 fprintf( stderr, ", unicode=%d", req->unicode );
3653 dump_uint64( ", proc=", &req->proc );
3654 fprintf( stderr, ", active_hooks=%08x", req->active_hooks );
3655 dump_varargs_unicode_str( ", module=", cur_size );
3658 static void dump_finish_hook_chain_request( const struct finish_hook_chain_request *req )
3660 fprintf( stderr, " id=%d", req->id );
3663 static void dump_get_hook_info_request( const struct get_hook_info_request *req )
3665 fprintf( stderr, " handle=%08x", req->handle );
3666 fprintf( stderr, ", get_next=%d", req->get_next );
3667 fprintf( stderr, ", event=%d", req->event );
3668 fprintf( stderr, ", window=%08x", req->window );
3669 fprintf( stderr, ", object_id=%d", req->object_id );
3670 fprintf( stderr, ", child_id=%d", req->child_id );
3673 static void dump_get_hook_info_reply( const struct get_hook_info_reply *req )
3675 fprintf( stderr, " handle=%08x", req->handle );
3676 fprintf( stderr, ", id=%d", req->id );
3677 fprintf( stderr, ", pid=%04x", req->pid );
3678 fprintf( stderr, ", tid=%04x", req->tid );
3679 dump_uint64( ", proc=", &req->proc );
3680 fprintf( stderr, ", unicode=%d", req->unicode );
3681 dump_varargs_unicode_str( ", module=", cur_size );
3684 static void dump_create_class_request( const struct create_class_request *req )
3686 fprintf( stderr, " local=%d", req->local );
3687 fprintf( stderr, ", atom=%04x", req->atom );
3688 fprintf( stderr, ", style=%08x", req->style );
3689 dump_uint64( ", instance=", &req->instance );
3690 fprintf( stderr, ", extra=%d", req->extra );
3691 fprintf( stderr, ", win_extra=%d", req->win_extra );
3692 dump_uint64( ", client_ptr=", &req->client_ptr );
3693 dump_varargs_unicode_str( ", name=", cur_size );
3696 static void dump_create_class_reply( const struct create_class_reply *req )
3698 fprintf( stderr, " atom=%04x", req->atom );
3701 static void dump_destroy_class_request( const struct destroy_class_request *req )
3703 fprintf( stderr, " atom=%04x", req->atom );
3704 dump_uint64( ", instance=", &req->instance );
3705 dump_varargs_unicode_str( ", name=", cur_size );
3708 static void dump_destroy_class_reply( const struct destroy_class_reply *req )
3710 dump_uint64( " client_ptr=", &req->client_ptr );
3713 static void dump_set_class_info_request( const struct set_class_info_request *req )
3715 fprintf( stderr, " window=%08x", req->window );
3716 fprintf( stderr, ", flags=%08x", req->flags );
3717 fprintf( stderr, ", atom=%04x", req->atom );
3718 fprintf( stderr, ", style=%08x", req->style );
3719 fprintf( stderr, ", win_extra=%d", req->win_extra );
3720 dump_uint64( ", instance=", &req->instance );
3721 fprintf( stderr, ", extra_offset=%d", req->extra_offset );
3722 fprintf( stderr, ", extra_size=%u", req->extra_size );
3723 dump_uint64( ", extra_value=", &req->extra_value );
3726 static void dump_set_class_info_reply( const struct set_class_info_reply *req )
3728 fprintf( stderr, " old_atom=%04x", req->old_atom );
3729 fprintf( stderr, ", old_style=%08x", req->old_style );
3730 fprintf( stderr, ", old_extra=%d", req->old_extra );
3731 fprintf( stderr, ", old_win_extra=%d", req->old_win_extra );
3732 dump_uint64( ", old_instance=", &req->old_instance );
3733 dump_uint64( ", old_extra_value=", &req->old_extra_value );
3736 static void dump_open_clipboard_request( const struct open_clipboard_request *req )
3738 fprintf( stderr, " window=%08x", req->window );
3741 static void dump_open_clipboard_reply( const struct open_clipboard_reply *req )
3743 fprintf( stderr, " owner=%08x", req->owner );
3746 static void dump_close_clipboard_request( const struct close_clipboard_request *req )
3750 static void dump_close_clipboard_reply( const struct close_clipboard_reply *req )
3752 fprintf( stderr, " viewer=%08x", req->viewer );
3753 fprintf( stderr, ", owner=%08x", req->owner );
3756 static void dump_empty_clipboard_request( const struct empty_clipboard_request *req )
3760 static void dump_set_clipboard_data_request( const struct set_clipboard_data_request *req )
3762 fprintf( stderr, " format=%08x", req->format );
3763 fprintf( stderr, ", lcid=%08x", req->lcid );
3764 dump_varargs_bytes( ", data=", cur_size );
3767 static void dump_set_clipboard_data_reply( const struct set_clipboard_data_reply *req )
3769 fprintf( stderr, " seqno=%08x", req->seqno );
3772 static void dump_get_clipboard_data_request( const struct get_clipboard_data_request *req )
3774 fprintf( stderr, " format=%08x", req->format );
3775 fprintf( stderr, ", cached=%d", req->cached );
3776 fprintf( stderr, ", seqno=%08x", req->seqno );
3779 static void dump_get_clipboard_data_reply( const struct get_clipboard_data_reply *req )
3781 fprintf( stderr, " from=%08x", req->from );
3782 fprintf( stderr, ", owner=%08x", req->owner );
3783 fprintf( stderr, ", seqno=%08x", req->seqno );
3784 fprintf( stderr, ", total=%u", req->total );
3785 dump_varargs_bytes( ", data=", cur_size );
3788 static void dump_get_clipboard_formats_request( const struct get_clipboard_formats_request *req )
3790 fprintf( stderr, " format=%08x", req->format );
3793 static void dump_get_clipboard_formats_reply( const struct get_clipboard_formats_reply *req )
3795 fprintf( stderr, " count=%08x", req->count );
3796 dump_varargs_uints( ", formats=", cur_size );
3799 static void dump_enum_clipboard_formats_request( const struct enum_clipboard_formats_request *req )
3801 fprintf( stderr, " previous=%08x", req->previous );
3804 static void dump_enum_clipboard_formats_reply( const struct enum_clipboard_formats_reply *req )
3806 fprintf( stderr, " format=%08x", req->format );
3809 static void dump_release_clipboard_request( const struct release_clipboard_request *req )
3811 fprintf( stderr, " owner=%08x", req->owner );
3814 static void dump_release_clipboard_reply( const struct release_clipboard_reply *req )
3816 fprintf( stderr, " viewer=%08x", req->viewer );
3817 fprintf( stderr, ", owner=%08x", req->owner );
3820 static void dump_get_clipboard_info_request( const struct get_clipboard_info_request *req )
3824 static void dump_get_clipboard_info_reply( const struct get_clipboard_info_reply *req )
3826 fprintf( stderr, " window=%08x", req->window );
3827 fprintf( stderr, ", owner=%08x", req->owner );
3828 fprintf( stderr, ", viewer=%08x", req->viewer );
3829 fprintf( stderr, ", seqno=%08x", req->seqno );
3832 static void dump_set_clipboard_viewer_request( const struct set_clipboard_viewer_request *req )
3834 fprintf( stderr, " viewer=%08x", req->viewer );
3835 fprintf( stderr, ", previous=%08x", req->previous );
3838 static void dump_set_clipboard_viewer_reply( const struct set_clipboard_viewer_reply *req )
3840 fprintf( stderr, " old_viewer=%08x", req->old_viewer );
3841 fprintf( stderr, ", owner=%08x", req->owner );
3844 static void dump_add_clipboard_listener_request( const struct add_clipboard_listener_request *req )
3846 fprintf( stderr, " window=%08x", req->window );
3849 static void dump_remove_clipboard_listener_request( const struct remove_clipboard_listener_request *req )
3851 fprintf( stderr, " window=%08x", req->window );
3854 static void dump_open_token_request( const struct open_token_request *req )
3856 fprintf( stderr, " handle=%04x", req->handle );
3857 fprintf( stderr, ", access=%08x", req->access );
3858 fprintf( stderr, ", attributes=%08x", req->attributes );
3859 fprintf( stderr, ", flags=%08x", req->flags );
3862 static void dump_open_token_reply( const struct open_token_reply *req )
3864 fprintf( stderr, " token=%04x", req->token );
3867 static void dump_set_global_windows_request( const struct set_global_windows_request *req )
3869 fprintf( stderr, " flags=%08x", req->flags );
3870 fprintf( stderr, ", shell_window=%08x", req->shell_window );
3871 fprintf( stderr, ", shell_listview=%08x", req->shell_listview );
3872 fprintf( stderr, ", progman_window=%08x", req->progman_window );
3873 fprintf( stderr, ", taskman_window=%08x", req->taskman_window );
3876 static void dump_set_global_windows_reply( const struct set_global_windows_reply *req )
3878 fprintf( stderr, " old_shell_window=%08x", req->old_shell_window );
3879 fprintf( stderr, ", old_shell_listview=%08x", req->old_shell_listview );
3880 fprintf( stderr, ", old_progman_window=%08x", req->old_progman_window );
3881 fprintf( stderr, ", old_taskman_window=%08x", req->old_taskman_window );
3884 static void dump_adjust_token_privileges_request( const struct adjust_token_privileges_request *req )
3886 fprintf( stderr, " handle=%04x", req->handle );
3887 fprintf( stderr, ", disable_all=%d", req->disable_all );
3888 fprintf( stderr, ", get_modified_state=%d", req->get_modified_state );
3889 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3892 static void dump_adjust_token_privileges_reply( const struct adjust_token_privileges_reply *req )
3894 fprintf( stderr, " len=%08x", req->len );
3895 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3898 static void dump_get_token_privileges_request( const struct get_token_privileges_request *req )
3900 fprintf( stderr, " handle=%04x", req->handle );
3903 static void dump_get_token_privileges_reply( const struct get_token_privileges_reply *req )
3905 fprintf( stderr, " len=%08x", req->len );
3906 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3909 static void dump_check_token_privileges_request( const struct check_token_privileges_request *req )
3911 fprintf( stderr, " handle=%04x", req->handle );
3912 fprintf( stderr, ", all_required=%d", req->all_required );
3913 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3916 static void dump_check_token_privileges_reply( const struct check_token_privileges_reply *req )
3918 fprintf( stderr, " has_privileges=%d", req->has_privileges );
3919 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3922 static void dump_duplicate_token_request( const struct duplicate_token_request *req )
3924 fprintf( stderr, " handle=%04x", req->handle );
3925 fprintf( stderr, ", access=%08x", req->access );
3926 fprintf( stderr, ", attributes=%08x", req->attributes );
3927 fprintf( stderr, ", primary=%d", req->primary );
3928 fprintf( stderr, ", impersonation_level=%d", req->impersonation_level );
3931 static void dump_duplicate_token_reply( const struct duplicate_token_reply *req )
3933 fprintf( stderr, " new_handle=%04x", req->new_handle );
3936 static void dump_access_check_request( const struct access_check_request *req )
3938 fprintf( stderr, " handle=%04x", req->handle );
3939 fprintf( stderr, ", desired_access=%08x", req->desired_access );
3940 fprintf( stderr, ", mapping_read=%08x", req->mapping_read );
3941 fprintf( stderr, ", mapping_write=%08x", req->mapping_write );
3942 fprintf( stderr, ", mapping_execute=%08x", req->mapping_execute );
3943 fprintf( stderr, ", mapping_all=%08x", req->mapping_all );
3944 dump_varargs_security_descriptor( ", sd=", cur_size );
3947 static void dump_access_check_reply( const struct access_check_reply *req )
3949 fprintf( stderr, " access_granted=%08x", req->access_granted );
3950 fprintf( stderr, ", access_status=%08x", req->access_status );
3951 fprintf( stderr, ", privileges_len=%08x", req->privileges_len );
3952 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3955 static void dump_get_token_sid_request( const struct get_token_sid_request *req )
3957 fprintf( stderr, " handle=%04x", req->handle );
3958 fprintf( stderr, ", which_sid=%08x", req->which_sid );
3961 static void dump_get_token_sid_reply( const struct get_token_sid_reply *req )
3963 fprintf( stderr, " sid_len=%u", req->sid_len );
3964 dump_varargs_SID( ", sid=", cur_size );
3967 static void dump_get_token_groups_request( const struct get_token_groups_request *req )
3969 fprintf( stderr, " handle=%04x", req->handle );
3972 static void dump_get_token_groups_reply( const struct get_token_groups_reply *req )
3974 fprintf( stderr, " user_len=%u", req->user_len );
3975 dump_varargs_token_groups( ", user=", cur_size );
3978 static void dump_get_token_default_dacl_request( const struct get_token_default_dacl_request *req )
3980 fprintf( stderr, " handle=%04x", req->handle );
3983 static void dump_get_token_default_dacl_reply( const struct get_token_default_dacl_reply *req )
3985 fprintf( stderr, " acl_len=%u", req->acl_len );
3986 dump_varargs_ACL( ", acl=", cur_size );
3989 static void dump_set_token_default_dacl_request( const struct set_token_default_dacl_request *req )
3991 fprintf( stderr, " handle=%04x", req->handle );
3992 dump_varargs_ACL( ", acl=", cur_size );
3995 static void dump_set_security_object_request( const struct set_security_object_request *req )
3997 fprintf( stderr, " handle=%04x", req->handle );
3998 fprintf( stderr, ", security_info=%08x", req->security_info );
3999 dump_varargs_security_descriptor( ", sd=", cur_size );
4002 static void dump_get_security_object_request( const struct get_security_object_request *req )
4004 fprintf( stderr, " handle=%04x", req->handle );
4005 fprintf( stderr, ", security_info=%08x", req->security_info );
4008 static void dump_get_security_object_reply( const struct get_security_object_reply *req )
4010 fprintf( stderr, " sd_len=%08x", req->sd_len );
4011 dump_varargs_security_descriptor( ", sd=", cur_size );
4014 static void dump_get_system_handles_request( const struct get_system_handles_request *req )
4018 static void dump_get_system_handles_reply( const struct get_system_handles_reply *req )
4020 fprintf( stderr, " count=%08x", req->count );
4021 dump_varargs_handle_infos( ", data=", cur_size );
4024 static void dump_create_mailslot_request( const struct create_mailslot_request *req )
4026 fprintf( stderr, " access=%08x", req->access );
4027 dump_timeout( ", read_timeout=", &req->read_timeout );
4028 fprintf( stderr, ", max_msgsize=%08x", req->max_msgsize );
4029 dump_varargs_object_attributes( ", objattr=", cur_size );
4032 static void dump_create_mailslot_reply( const struct create_mailslot_reply *req )
4034 fprintf( stderr, " handle=%04x", req->handle );
4037 static void dump_set_mailslot_info_request( const struct set_mailslot_info_request *req )
4039 fprintf( stderr, " handle=%04x", req->handle );
4040 dump_timeout( ", read_timeout=", &req->read_timeout );
4041 fprintf( stderr, ", flags=%08x", req->flags );
4044 static void dump_set_mailslot_info_reply( const struct set_mailslot_info_reply *req )
4046 dump_timeout( " read_timeout=", &req->read_timeout );
4047 fprintf( stderr, ", max_msgsize=%08x", req->max_msgsize );
4050 static void dump_create_directory_request( const struct create_directory_request *req )
4052 fprintf( stderr, " access=%08x", req->access );
4053 dump_varargs_object_attributes( ", objattr=", cur_size );
4056 static void dump_create_directory_reply( const struct create_directory_reply *req )
4058 fprintf( stderr, " handle=%04x", req->handle );
4061 static void dump_open_directory_request( const struct open_directory_request *req )
4063 fprintf( stderr, " access=%08x", req->access );
4064 fprintf( stderr, ", attributes=%08x", req->attributes );
4065 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4066 dump_varargs_unicode_str( ", directory_name=", cur_size );
4069 static void dump_open_directory_reply( const struct open_directory_reply *req )
4071 fprintf( stderr, " handle=%04x", req->handle );
4074 static void dump_get_directory_entry_request( const struct get_directory_entry_request *req )
4076 fprintf( stderr, " handle=%04x", req->handle );
4077 fprintf( stderr, ", index=%08x", req->index );
4080 static void dump_get_directory_entry_reply( const struct get_directory_entry_reply *req )
4082 fprintf( stderr, " name_len=%u", req->name_len );
4083 dump_varargs_unicode_str( ", name=", min(cur_size,req->name_len) );
4084 dump_varargs_unicode_str( ", type=", cur_size );
4087 static void dump_create_symlink_request( const struct create_symlink_request *req )
4089 fprintf( stderr, " access=%08x", req->access );
4090 dump_varargs_object_attributes( ", objattr=", cur_size );
4091 dump_varargs_unicode_str( ", target_name=", cur_size );
4094 static void dump_create_symlink_reply( const struct create_symlink_reply *req )
4096 fprintf( stderr, " handle=%04x", req->handle );
4099 static void dump_open_symlink_request( const struct open_symlink_request *req )
4101 fprintf( stderr, " access=%08x", req->access );
4102 fprintf( stderr, ", attributes=%08x", req->attributes );
4103 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4104 dump_varargs_unicode_str( ", name=", cur_size );
4107 static void dump_open_symlink_reply( const struct open_symlink_reply *req )
4109 fprintf( stderr, " handle=%04x", req->handle );
4112 static void dump_query_symlink_request( const struct query_symlink_request *req )
4114 fprintf( stderr, " handle=%04x", req->handle );
4117 static void dump_query_symlink_reply( const struct query_symlink_reply *req )
4119 fprintf( stderr, " total=%u", req->total );
4120 dump_varargs_unicode_str( ", target_name=", cur_size );
4123 static void dump_get_object_info_request( const struct get_object_info_request *req )
4125 fprintf( stderr, " handle=%04x", req->handle );
4128 static void dump_get_object_info_reply( const struct get_object_info_reply *req )
4130 fprintf( stderr, " access=%08x", req->access );
4131 fprintf( stderr, ", ref_count=%08x", req->ref_count );
4132 fprintf( stderr, ", handle_count=%08x", req->handle_count );
4133 fprintf( stderr, ", total=%u", req->total );
4134 dump_varargs_unicode_str( ", name=", cur_size );
4137 static void dump_get_object_type_request( const struct get_object_type_request *req )
4139 fprintf( stderr, " handle=%04x", req->handle );
4142 static void dump_get_object_type_reply( const struct get_object_type_reply *req )
4144 fprintf( stderr, " total=%u", req->total );
4145 dump_varargs_unicode_str( ", type=", cur_size );
4148 static void dump_unlink_object_request( const struct unlink_object_request *req )
4150 fprintf( stderr, " handle=%04x", req->handle );
4153 static void dump_get_token_impersonation_level_request( const struct get_token_impersonation_level_request *req )
4155 fprintf( stderr, " handle=%04x", req->handle );
4158 static void dump_get_token_impersonation_level_reply( const struct get_token_impersonation_level_reply *req )
4160 fprintf( stderr, " impersonation_level=%d", req->impersonation_level );
4163 static void dump_allocate_locally_unique_id_request( const struct allocate_locally_unique_id_request *req )
4167 static void dump_allocate_locally_unique_id_reply( const struct allocate_locally_unique_id_reply *req )
4169 dump_luid( " luid=", &req->luid );
4172 static void dump_create_device_manager_request( const struct create_device_manager_request *req )
4174 fprintf( stderr, " access=%08x", req->access );
4175 fprintf( stderr, ", attributes=%08x", req->attributes );
4178 static void dump_create_device_manager_reply( const struct create_device_manager_reply *req )
4180 fprintf( stderr, " handle=%04x", req->handle );
4183 static void dump_create_device_request( const struct create_device_request *req )
4185 fprintf( stderr, " access=%08x", req->access );
4186 fprintf( stderr, ", attributes=%08x", req->attributes );
4187 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4188 dump_uint64( ", user_ptr=", &req->user_ptr );
4189 fprintf( stderr, ", manager=%04x", req->manager );
4190 dump_varargs_unicode_str( ", name=", cur_size );
4193 static void dump_create_device_reply( const struct create_device_reply *req )
4195 fprintf( stderr, " handle=%04x", req->handle );
4198 static void dump_delete_device_request( const struct delete_device_request *req )
4200 fprintf( stderr, " handle=%04x", req->handle );
4203 static void dump_get_next_device_request_request( const struct get_next_device_request_request *req )
4205 fprintf( stderr, " manager=%04x", req->manager );
4206 fprintf( stderr, ", prev=%04x", req->prev );
4207 fprintf( stderr, ", status=%08x", req->status );
4210 static void dump_get_next_device_request_reply( const struct get_next_device_request_reply *req )
4212 dump_irp_params( " params=", &req->params );
4213 fprintf( stderr, ", next=%04x", req->next );
4214 fprintf( stderr, ", client_pid=%04x", req->client_pid );
4215 fprintf( stderr, ", client_tid=%04x", req->client_tid );
4216 fprintf( stderr, ", in_size=%u", req->in_size );
4217 fprintf( stderr, ", out_size=%u", req->out_size );
4218 dump_varargs_bytes( ", next_data=", cur_size );
4221 static void dump_make_process_system_request( const struct make_process_system_request *req )
4225 static void dump_make_process_system_reply( const struct make_process_system_reply *req )
4227 fprintf( stderr, " event=%04x", req->event );
4230 static void dump_get_token_statistics_request( const struct get_token_statistics_request *req )
4232 fprintf( stderr, " handle=%04x", req->handle );
4235 static void dump_get_token_statistics_reply( const struct get_token_statistics_reply *req )
4237 dump_luid( " token_id=", &req->token_id );
4238 dump_luid( ", modified_id=", &req->modified_id );
4239 fprintf( stderr, ", primary=%d", req->primary );
4240 fprintf( stderr, ", impersonation_level=%d", req->impersonation_level );
4241 fprintf( stderr, ", group_count=%d", req->group_count );
4242 fprintf( stderr, ", privilege_count=%d", req->privilege_count );
4245 static void dump_create_completion_request( const struct create_completion_request *req )
4247 fprintf( stderr, " access=%08x", req->access );
4248 fprintf( stderr, ", concurrent=%08x", req->concurrent );
4249 dump_varargs_object_attributes( ", objattr=", cur_size );
4252 static void dump_create_completion_reply( const struct create_completion_reply *req )
4254 fprintf( stderr, " handle=%04x", req->handle );
4257 static void dump_open_completion_request( const struct open_completion_request *req )
4259 fprintf( stderr, " access=%08x", req->access );
4260 fprintf( stderr, ", attributes=%08x", req->attributes );
4261 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4262 dump_varargs_unicode_str( ", filename=", cur_size );
4265 static void dump_open_completion_reply( const struct open_completion_reply *req )
4267 fprintf( stderr, " handle=%04x", req->handle );
4270 static void dump_add_completion_request( const struct add_completion_request *req )
4272 fprintf( stderr, " handle=%04x", req->handle );
4273 dump_uint64( ", ckey=", &req->ckey );
4274 dump_uint64( ", cvalue=", &req->cvalue );
4275 dump_uint64( ", information=", &req->information );
4276 fprintf( stderr, ", status=%08x", req->status );
4279 static void dump_remove_completion_request( const struct remove_completion_request *req )
4281 fprintf( stderr, " handle=%04x", req->handle );
4284 static void dump_remove_completion_reply( const struct remove_completion_reply *req )
4286 dump_uint64( " ckey=", &req->ckey );
4287 dump_uint64( ", cvalue=", &req->cvalue );
4288 dump_uint64( ", information=", &req->information );
4289 fprintf( stderr, ", status=%08x", req->status );
4292 static void dump_query_completion_request( const struct query_completion_request *req )
4294 fprintf( stderr, " handle=%04x", req->handle );
4297 static void dump_query_completion_reply( const struct query_completion_reply *req )
4299 fprintf( stderr, " depth=%08x", req->depth );
4302 static void dump_set_completion_info_request( const struct set_completion_info_request *req )
4304 fprintf( stderr, " handle=%04x", req->handle );
4305 dump_uint64( ", ckey=", &req->ckey );
4306 fprintf( stderr, ", chandle=%04x", req->chandle );
4309 static void dump_add_fd_completion_request( const struct add_fd_completion_request *req )
4311 fprintf( stderr, " handle=%04x", req->handle );
4312 dump_uint64( ", cvalue=", &req->cvalue );
4313 dump_uint64( ", information=", &req->information );
4314 fprintf( stderr, ", status=%08x", req->status );
4317 static void dump_set_fd_disp_info_request( const struct set_fd_disp_info_request *req )
4319 fprintf( stderr, " handle=%04x", req->handle );
4320 fprintf( stderr, ", unlink=%d", req->unlink );
4323 static void dump_set_fd_name_info_request( const struct set_fd_name_info_request *req )
4325 fprintf( stderr, " handle=%04x", req->handle );
4326 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4327 fprintf( stderr, ", link=%d", req->link );
4328 dump_varargs_string( ", filename=", cur_size );
4331 static void dump_get_window_layered_info_request( const struct get_window_layered_info_request *req )
4333 fprintf( stderr, " handle=%08x", req->handle );
4336 static void dump_get_window_layered_info_reply( const struct get_window_layered_info_reply *req )
4338 fprintf( stderr, " color_key=%08x", req->color_key );
4339 fprintf( stderr, ", alpha=%08x", req->alpha );
4340 fprintf( stderr, ", flags=%08x", req->flags );
4343 static void dump_set_window_layered_info_request( const struct set_window_layered_info_request *req )
4345 fprintf( stderr, " handle=%08x", req->handle );
4346 fprintf( stderr, ", color_key=%08x", req->color_key );
4347 fprintf( stderr, ", alpha=%08x", req->alpha );
4348 fprintf( stderr, ", flags=%08x", req->flags );
4351 static void dump_alloc_user_handle_request( const struct alloc_user_handle_request *req )
4355 static void dump_alloc_user_handle_reply( const struct alloc_user_handle_reply *req )
4357 fprintf( stderr, " handle=%08x", req->handle );
4360 static void dump_free_user_handle_request( const struct free_user_handle_request *req )
4362 fprintf( stderr, " handle=%08x", req->handle );
4365 static void dump_set_cursor_request( const struct set_cursor_request *req )
4367 fprintf( stderr, " flags=%08x", req->flags );
4368 fprintf( stderr, ", handle=%08x", req->handle );
4369 fprintf( stderr, ", show_count=%d", req->show_count );
4370 fprintf( stderr, ", x=%d", req->x );
4371 fprintf( stderr, ", y=%d", req->y );
4372 dump_rectangle( ", clip=", &req->clip );
4373 fprintf( stderr, ", clip_msg=%08x", req->clip_msg );
4376 static void dump_set_cursor_reply( const struct set_cursor_reply *req )
4378 fprintf( stderr, " prev_handle=%08x", req->prev_handle );
4379 fprintf( stderr, ", prev_count=%d", req->prev_count );
4380 fprintf( stderr, ", prev_x=%d", req->prev_x );
4381 fprintf( stderr, ", prev_y=%d", req->prev_y );
4382 fprintf( stderr, ", new_x=%d", req->new_x );
4383 fprintf( stderr, ", new_y=%d", req->new_y );
4384 dump_rectangle( ", new_clip=", &req->new_clip );
4385 fprintf( stderr, ", last_change=%08x", req->last_change );
4388 static void dump_update_rawinput_devices_request( const struct update_rawinput_devices_request *req )
4390 dump_varargs_rawinput_devices( " devices=", cur_size );
4393 static void dump_get_suspend_context_request( const struct get_suspend_context_request *req )
4397 static void dump_get_suspend_context_reply( const struct get_suspend_context_reply *req )
4399 dump_varargs_context( " context=", cur_size );
4402 static void dump_set_suspend_context_request( const struct set_suspend_context_request *req )
4404 dump_varargs_context( " context=", cur_size );
4407 static void dump_create_job_request( const struct create_job_request *req )
4409 fprintf( stderr, " access=%08x", req->access );
4410 dump_varargs_object_attributes( ", objattr=", cur_size );
4413 static void dump_create_job_reply( const struct create_job_reply *req )
4415 fprintf( stderr, " handle=%04x", req->handle );
4418 static void dump_open_job_request( const struct open_job_request *req )
4420 fprintf( stderr, " access=%08x", req->access );
4421 fprintf( stderr, ", attributes=%08x", req->attributes );
4422 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4423 dump_varargs_unicode_str( ", name=", cur_size );
4426 static void dump_open_job_reply( const struct open_job_reply *req )
4428 fprintf( stderr, " handle=%04x", req->handle );
4431 static void dump_assign_job_request( const struct assign_job_request *req )
4433 fprintf( stderr, " job=%04x", req->job );
4434 fprintf( stderr, ", process=%04x", req->process );
4437 static void dump_process_in_job_request( const struct process_in_job_request *req )
4439 fprintf( stderr, " job=%04x", req->job );
4440 fprintf( stderr, ", process=%04x", req->process );
4443 static void dump_set_job_limits_request( const struct set_job_limits_request *req )
4445 fprintf( stderr, " handle=%04x", req->handle );
4446 fprintf( stderr, ", limit_flags=%08x", req->limit_flags );
4449 static void dump_set_job_completion_port_request( const struct set_job_completion_port_request *req )
4451 fprintf( stderr, " job=%04x", req->job );
4452 fprintf( stderr, ", port=%04x", req->port );
4453 dump_uint64( ", key=", &req->key );
4456 static void dump_terminate_job_request( const struct terminate_job_request *req )
4458 fprintf( stderr, " handle=%04x", req->handle );
4459 fprintf( stderr, ", status=%d", req->status );
4462 static const dump_func req_dumpers[REQ_NB_REQUESTS] = {
4463 (dump_func)dump_new_process_request,
4464 (dump_func)dump_get_new_process_info_request,
4465 (dump_func)dump_new_thread_request,
4466 (dump_func)dump_get_startup_info_request,
4467 (dump_func)dump_init_process_done_request,
4468 (dump_func)dump_init_thread_request,
4469 (dump_func)dump_terminate_process_request,
4470 (dump_func)dump_terminate_thread_request,
4471 (dump_func)dump_get_process_info_request,
4472 (dump_func)dump_set_process_info_request,
4473 (dump_func)dump_get_thread_info_request,
4474 (dump_func)dump_get_thread_times_request,
4475 (dump_func)dump_set_thread_info_request,
4476 (dump_func)dump_get_dll_info_request,
4477 (dump_func)dump_suspend_thread_request,
4478 (dump_func)dump_resume_thread_request,
4479 (dump_func)dump_load_dll_request,
4480 (dump_func)dump_unload_dll_request,
4481 (dump_func)dump_queue_apc_request,
4482 (dump_func)dump_get_apc_result_request,
4483 (dump_func)dump_close_handle_request,
4484 (dump_func)dump_set_handle_info_request,
4485 (dump_func)dump_dup_handle_request,
4486 (dump_func)dump_open_process_request,
4487 (dump_func)dump_open_thread_request,
4488 (dump_func)dump_select_request,
4489 (dump_func)dump_create_event_request,
4490 (dump_func)dump_event_op_request,
4491 (dump_func)dump_query_event_request,
4492 (dump_func)dump_open_event_request,
4493 (dump_func)dump_create_keyed_event_request,
4494 (dump_func)dump_open_keyed_event_request,
4495 (dump_func)dump_create_mutex_request,
4496 (dump_func)dump_release_mutex_request,
4497 (dump_func)dump_open_mutex_request,
4498 (dump_func)dump_query_mutex_request,
4499 (dump_func)dump_create_semaphore_request,
4500 (dump_func)dump_release_semaphore_request,
4501 (dump_func)dump_query_semaphore_request,
4502 (dump_func)dump_open_semaphore_request,
4503 (dump_func)dump_create_file_request,
4504 (dump_func)dump_open_file_object_request,
4505 (dump_func)dump_alloc_file_handle_request,
4506 (dump_func)dump_get_handle_unix_name_request,
4507 (dump_func)dump_get_handle_fd_request,
4508 (dump_func)dump_get_directory_cache_entry_request,
4509 (dump_func)dump_flush_request,
4510 (dump_func)dump_lock_file_request,
4511 (dump_func)dump_unlock_file_request,
4512 (dump_func)dump_create_socket_request,
4513 (dump_func)dump_accept_socket_request,
4514 (dump_func)dump_accept_into_socket_request,
4515 (dump_func)dump_set_socket_event_request,
4516 (dump_func)dump_get_socket_event_request,
4517 (dump_func)dump_get_socket_info_request,
4518 (dump_func)dump_enable_socket_event_request,
4519 (dump_func)dump_set_socket_deferred_request,
4520 (dump_func)dump_alloc_console_request,
4521 (dump_func)dump_free_console_request,
4522 (dump_func)dump_get_console_renderer_events_request,
4523 (dump_func)dump_open_console_request,
4524 (dump_func)dump_get_console_wait_event_request,
4525 (dump_func)dump_get_console_mode_request,
4526 (dump_func)dump_set_console_mode_request,
4527 (dump_func)dump_set_console_input_info_request,
4528 (dump_func)dump_get_console_input_info_request,
4529 (dump_func)dump_append_console_input_history_request,
4530 (dump_func)dump_get_console_input_history_request,
4531 (dump_func)dump_create_console_output_request,
4532 (dump_func)dump_set_console_output_info_request,
4533 (dump_func)dump_get_console_output_info_request,
4534 (dump_func)dump_write_console_input_request,
4535 (dump_func)dump_read_console_input_request,
4536 (dump_func)dump_write_console_output_request,
4537 (dump_func)dump_fill_console_output_request,
4538 (dump_func)dump_read_console_output_request,
4539 (dump_func)dump_move_console_output_request,
4540 (dump_func)dump_send_console_signal_request,
4541 (dump_func)dump_read_directory_changes_request,
4542 (dump_func)dump_read_change_request,
4543 (dump_func)dump_create_mapping_request,
4544 (dump_func)dump_open_mapping_request,
4545 (dump_func)dump_get_mapping_info_request,
4546 (dump_func)dump_get_mapping_committed_range_request,
4547 (dump_func)dump_add_mapping_committed_range_request,
4548 (dump_func)dump_create_snapshot_request,
4549 (dump_func)dump_next_process_request,
4550 (dump_func)dump_next_thread_request,
4551 (dump_func)dump_wait_debug_event_request,
4552 (dump_func)dump_queue_exception_event_request,
4553 (dump_func)dump_get_exception_status_request,
4554 (dump_func)dump_continue_debug_event_request,
4555 (dump_func)dump_debug_process_request,
4556 (dump_func)dump_debug_break_request,
4557 (dump_func)dump_set_debugger_kill_on_exit_request,
4558 (dump_func)dump_read_process_memory_request,
4559 (dump_func)dump_write_process_memory_request,
4560 (dump_func)dump_create_key_request,
4561 (dump_func)dump_open_key_request,
4562 (dump_func)dump_delete_key_request,
4563 (dump_func)dump_flush_key_request,
4564 (dump_func)dump_enum_key_request,
4565 (dump_func)dump_set_key_value_request,
4566 (dump_func)dump_get_key_value_request,
4567 (dump_func)dump_enum_key_value_request,
4568 (dump_func)dump_delete_key_value_request,
4569 (dump_func)dump_load_registry_request,
4570 (dump_func)dump_unload_registry_request,
4571 (dump_func)dump_save_registry_request,
4572 (dump_func)dump_set_registry_notification_request,
4573 (dump_func)dump_create_timer_request,
4574 (dump_func)dump_open_timer_request,
4575 (dump_func)dump_set_timer_request,
4576 (dump_func)dump_cancel_timer_request,
4577 (dump_func)dump_get_timer_info_request,
4578 (dump_func)dump_get_thread_context_request,
4579 (dump_func)dump_set_thread_context_request,
4580 (dump_func)dump_get_selector_entry_request,
4581 (dump_func)dump_add_atom_request,
4582 (dump_func)dump_delete_atom_request,
4583 (dump_func)dump_find_atom_request,
4584 (dump_func)dump_get_atom_information_request,
4585 (dump_func)dump_set_atom_information_request,
4586 (dump_func)dump_empty_atom_table_request,
4587 (dump_func)dump_init_atom_table_request,
4588 (dump_func)dump_get_msg_queue_request,
4589 (dump_func)dump_set_queue_fd_request,
4590 (dump_func)dump_set_queue_mask_request,
4591 (dump_func)dump_get_queue_status_request,
4592 (dump_func)dump_get_process_idle_event_request,
4593 (dump_func)dump_send_message_request,
4594 (dump_func)dump_post_quit_message_request,
4595 (dump_func)dump_send_hardware_message_request,
4596 (dump_func)dump_get_message_request,
4597 (dump_func)dump_reply_message_request,
4598 (dump_func)dump_accept_hardware_message_request,
4599 (dump_func)dump_get_message_reply_request,
4600 (dump_func)dump_set_win_timer_request,
4601 (dump_func)dump_kill_win_timer_request,
4602 (dump_func)dump_is_window_hung_request,
4603 (dump_func)dump_get_serial_info_request,
4604 (dump_func)dump_set_serial_info_request,
4605 (dump_func)dump_register_async_request,
4606 (dump_func)dump_cancel_async_request,
4607 (dump_func)dump_get_async_result_request,
4608 (dump_func)dump_read_request,
4609 (dump_func)dump_write_request,
4610 (dump_func)dump_ioctl_request,
4611 (dump_func)dump_set_irp_result_request,
4612 (dump_func)dump_create_named_pipe_request,
4613 (dump_func)dump_get_named_pipe_info_request,
4614 (dump_func)dump_set_named_pipe_info_request,
4615 (dump_func)dump_create_window_request,
4616 (dump_func)dump_destroy_window_request,
4617 (dump_func)dump_get_desktop_window_request,
4618 (dump_func)dump_set_window_owner_request,
4619 (dump_func)dump_get_window_info_request,
4620 (dump_func)dump_set_window_info_request,
4621 (dump_func)dump_set_parent_request,
4622 (dump_func)dump_get_window_parents_request,
4623 (dump_func)dump_get_window_children_request,
4624 (dump_func)dump_get_window_children_from_point_request,
4625 (dump_func)dump_get_window_tree_request,
4626 (dump_func)dump_set_window_pos_request,
4627 (dump_func)dump_get_window_rectangles_request,
4628 (dump_func)dump_get_window_text_request,
4629 (dump_func)dump_set_window_text_request,
4630 (dump_func)dump_get_windows_offset_request,
4631 (dump_func)dump_get_visible_region_request,
4632 (dump_func)dump_get_surface_region_request,
4633 (dump_func)dump_get_window_region_request,
4634 (dump_func)dump_set_window_region_request,
4635 (dump_func)dump_get_update_region_request,
4636 (dump_func)dump_update_window_zorder_request,
4637 (dump_func)dump_redraw_window_request,
4638 (dump_func)dump_set_window_property_request,
4639 (dump_func)dump_remove_window_property_request,
4640 (dump_func)dump_get_window_property_request,
4641 (dump_func)dump_get_window_properties_request,
4642 (dump_func)dump_create_winstation_request,
4643 (dump_func)dump_open_winstation_request,
4644 (dump_func)dump_close_winstation_request,
4645 (dump_func)dump_get_process_winstation_request,
4646 (dump_func)dump_set_process_winstation_request,
4647 (dump_func)dump_enum_winstation_request,
4648 (dump_func)dump_create_desktop_request,
4649 (dump_func)dump_open_desktop_request,
4650 (dump_func)dump_open_input_desktop_request,
4651 (dump_func)dump_close_desktop_request,
4652 (dump_func)dump_get_thread_desktop_request,
4653 (dump_func)dump_set_thread_desktop_request,
4654 (dump_func)dump_enum_desktop_request,
4655 (dump_func)dump_set_user_object_info_request,
4656 (dump_func)dump_register_hotkey_request,
4657 (dump_func)dump_unregister_hotkey_request,
4658 (dump_func)dump_attach_thread_input_request,
4659 (dump_func)dump_get_thread_input_request,
4660 (dump_func)dump_get_last_input_time_request,
4661 (dump_func)dump_get_key_state_request,
4662 (dump_func)dump_set_key_state_request,
4663 (dump_func)dump_set_foreground_window_request,
4664 (dump_func)dump_set_focus_window_request,
4665 (dump_func)dump_set_active_window_request,
4666 (dump_func)dump_set_capture_window_request,
4667 (dump_func)dump_set_caret_window_request,
4668 (dump_func)dump_set_caret_info_request,
4669 (dump_func)dump_set_hook_request,
4670 (dump_func)dump_remove_hook_request,
4671 (dump_func)dump_start_hook_chain_request,
4672 (dump_func)dump_finish_hook_chain_request,
4673 (dump_func)dump_get_hook_info_request,
4674 (dump_func)dump_create_class_request,
4675 (dump_func)dump_destroy_class_request,
4676 (dump_func)dump_set_class_info_request,
4677 (dump_func)dump_open_clipboard_request,
4678 (dump_func)dump_close_clipboard_request,
4679 (dump_func)dump_empty_clipboard_request,
4680 (dump_func)dump_set_clipboard_data_request,
4681 (dump_func)dump_get_clipboard_data_request,
4682 (dump_func)dump_get_clipboard_formats_request,
4683 (dump_func)dump_enum_clipboard_formats_request,
4684 (dump_func)dump_release_clipboard_request,
4685 (dump_func)dump_get_clipboard_info_request,
4686 (dump_func)dump_set_clipboard_viewer_request,
4687 (dump_func)dump_add_clipboard_listener_request,
4688 (dump_func)dump_remove_clipboard_listener_request,
4689 (dump_func)dump_open_token_request,
4690 (dump_func)dump_set_global_windows_request,
4691 (dump_func)dump_adjust_token_privileges_request,
4692 (dump_func)dump_get_token_privileges_request,
4693 (dump_func)dump_check_token_privileges_request,
4694 (dump_func)dump_duplicate_token_request,
4695 (dump_func)dump_access_check_request,
4696 (dump_func)dump_get_token_sid_request,
4697 (dump_func)dump_get_token_groups_request,
4698 (dump_func)dump_get_token_default_dacl_request,
4699 (dump_func)dump_set_token_default_dacl_request,
4700 (dump_func)dump_set_security_object_request,
4701 (dump_func)dump_get_security_object_request,
4702 (dump_func)dump_get_system_handles_request,
4703 (dump_func)dump_create_mailslot_request,
4704 (dump_func)dump_set_mailslot_info_request,
4705 (dump_func)dump_create_directory_request,
4706 (dump_func)dump_open_directory_request,
4707 (dump_func)dump_get_directory_entry_request,
4708 (dump_func)dump_create_symlink_request,
4709 (dump_func)dump_open_symlink_request,
4710 (dump_func)dump_query_symlink_request,
4711 (dump_func)dump_get_object_info_request,
4712 (dump_func)dump_get_object_type_request,
4713 (dump_func)dump_unlink_object_request,
4714 (dump_func)dump_get_token_impersonation_level_request,
4715 (dump_func)dump_allocate_locally_unique_id_request,
4716 (dump_func)dump_create_device_manager_request,
4717 (dump_func)dump_create_device_request,
4718 (dump_func)dump_delete_device_request,
4719 (dump_func)dump_get_next_device_request_request,
4720 (dump_func)dump_make_process_system_request,
4721 (dump_func)dump_get_token_statistics_request,
4722 (dump_func)dump_create_completion_request,
4723 (dump_func)dump_open_completion_request,
4724 (dump_func)dump_add_completion_request,
4725 (dump_func)dump_remove_completion_request,
4726 (dump_func)dump_query_completion_request,
4727 (dump_func)dump_set_completion_info_request,
4728 (dump_func)dump_add_fd_completion_request,
4729 (dump_func)dump_set_fd_disp_info_request,
4730 (dump_func)dump_set_fd_name_info_request,
4731 (dump_func)dump_get_window_layered_info_request,
4732 (dump_func)dump_set_window_layered_info_request,
4733 (dump_func)dump_alloc_user_handle_request,
4734 (dump_func)dump_free_user_handle_request,
4735 (dump_func)dump_set_cursor_request,
4736 (dump_func)dump_update_rawinput_devices_request,
4737 (dump_func)dump_get_suspend_context_request,
4738 (dump_func)dump_set_suspend_context_request,
4739 (dump_func)dump_create_job_request,
4740 (dump_func)dump_open_job_request,
4741 (dump_func)dump_assign_job_request,
4742 (dump_func)dump_process_in_job_request,
4743 (dump_func)dump_set_job_limits_request,
4744 (dump_func)dump_set_job_completion_port_request,
4745 (dump_func)dump_terminate_job_request,
4748 static const dump_func reply_dumpers[REQ_NB_REQUESTS] = {
4749 (dump_func)dump_new_process_reply,
4750 (dump_func)dump_get_new_process_info_reply,
4751 (dump_func)dump_new_thread_reply,
4752 (dump_func)dump_get_startup_info_reply,
4753 NULL,
4754 (dump_func)dump_init_thread_reply,
4755 (dump_func)dump_terminate_process_reply,
4756 (dump_func)dump_terminate_thread_reply,
4757 (dump_func)dump_get_process_info_reply,
4758 NULL,
4759 (dump_func)dump_get_thread_info_reply,
4760 (dump_func)dump_get_thread_times_reply,
4761 NULL,
4762 (dump_func)dump_get_dll_info_reply,
4763 (dump_func)dump_suspend_thread_reply,
4764 (dump_func)dump_resume_thread_reply,
4765 NULL,
4766 NULL,
4767 (dump_func)dump_queue_apc_reply,
4768 (dump_func)dump_get_apc_result_reply,
4769 NULL,
4770 (dump_func)dump_set_handle_info_reply,
4771 (dump_func)dump_dup_handle_reply,
4772 (dump_func)dump_open_process_reply,
4773 (dump_func)dump_open_thread_reply,
4774 (dump_func)dump_select_reply,
4775 (dump_func)dump_create_event_reply,
4776 NULL,
4777 (dump_func)dump_query_event_reply,
4778 (dump_func)dump_open_event_reply,
4779 (dump_func)dump_create_keyed_event_reply,
4780 (dump_func)dump_open_keyed_event_reply,
4781 (dump_func)dump_create_mutex_reply,
4782 (dump_func)dump_release_mutex_reply,
4783 (dump_func)dump_open_mutex_reply,
4784 (dump_func)dump_query_mutex_reply,
4785 (dump_func)dump_create_semaphore_reply,
4786 (dump_func)dump_release_semaphore_reply,
4787 (dump_func)dump_query_semaphore_reply,
4788 (dump_func)dump_open_semaphore_reply,
4789 (dump_func)dump_create_file_reply,
4790 (dump_func)dump_open_file_object_reply,
4791 (dump_func)dump_alloc_file_handle_reply,
4792 (dump_func)dump_get_handle_unix_name_reply,
4793 (dump_func)dump_get_handle_fd_reply,
4794 (dump_func)dump_get_directory_cache_entry_reply,
4795 (dump_func)dump_flush_reply,
4796 (dump_func)dump_lock_file_reply,
4797 NULL,
4798 (dump_func)dump_create_socket_reply,
4799 (dump_func)dump_accept_socket_reply,
4800 NULL,
4801 NULL,
4802 (dump_func)dump_get_socket_event_reply,
4803 (dump_func)dump_get_socket_info_reply,
4804 NULL,
4805 NULL,
4806 (dump_func)dump_alloc_console_reply,
4807 NULL,
4808 (dump_func)dump_get_console_renderer_events_reply,
4809 (dump_func)dump_open_console_reply,
4810 (dump_func)dump_get_console_wait_event_reply,
4811 (dump_func)dump_get_console_mode_reply,
4812 NULL,
4813 NULL,
4814 (dump_func)dump_get_console_input_info_reply,
4815 NULL,
4816 (dump_func)dump_get_console_input_history_reply,
4817 (dump_func)dump_create_console_output_reply,
4818 NULL,
4819 (dump_func)dump_get_console_output_info_reply,
4820 (dump_func)dump_write_console_input_reply,
4821 (dump_func)dump_read_console_input_reply,
4822 (dump_func)dump_write_console_output_reply,
4823 (dump_func)dump_fill_console_output_reply,
4824 (dump_func)dump_read_console_output_reply,
4825 NULL,
4826 NULL,
4827 NULL,
4828 (dump_func)dump_read_change_reply,
4829 (dump_func)dump_create_mapping_reply,
4830 (dump_func)dump_open_mapping_reply,
4831 (dump_func)dump_get_mapping_info_reply,
4832 (dump_func)dump_get_mapping_committed_range_reply,
4833 NULL,
4834 (dump_func)dump_create_snapshot_reply,
4835 (dump_func)dump_next_process_reply,
4836 (dump_func)dump_next_thread_reply,
4837 (dump_func)dump_wait_debug_event_reply,
4838 (dump_func)dump_queue_exception_event_reply,
4839 (dump_func)dump_get_exception_status_reply,
4840 NULL,
4841 NULL,
4842 (dump_func)dump_debug_break_reply,
4843 NULL,
4844 (dump_func)dump_read_process_memory_reply,
4845 NULL,
4846 (dump_func)dump_create_key_reply,
4847 (dump_func)dump_open_key_reply,
4848 NULL,
4849 NULL,
4850 (dump_func)dump_enum_key_reply,
4851 NULL,
4852 (dump_func)dump_get_key_value_reply,
4853 (dump_func)dump_enum_key_value_reply,
4854 NULL,
4855 NULL,
4856 NULL,
4857 NULL,
4858 NULL,
4859 (dump_func)dump_create_timer_reply,
4860 (dump_func)dump_open_timer_reply,
4861 (dump_func)dump_set_timer_reply,
4862 (dump_func)dump_cancel_timer_reply,
4863 (dump_func)dump_get_timer_info_reply,
4864 (dump_func)dump_get_thread_context_reply,
4865 (dump_func)dump_set_thread_context_reply,
4866 (dump_func)dump_get_selector_entry_reply,
4867 (dump_func)dump_add_atom_reply,
4868 NULL,
4869 (dump_func)dump_find_atom_reply,
4870 (dump_func)dump_get_atom_information_reply,
4871 NULL,
4872 NULL,
4873 (dump_func)dump_init_atom_table_reply,
4874 (dump_func)dump_get_msg_queue_reply,
4875 NULL,
4876 (dump_func)dump_set_queue_mask_reply,
4877 (dump_func)dump_get_queue_status_reply,
4878 (dump_func)dump_get_process_idle_event_reply,
4879 NULL,
4880 NULL,
4881 (dump_func)dump_send_hardware_message_reply,
4882 (dump_func)dump_get_message_reply,
4883 NULL,
4884 NULL,
4885 (dump_func)dump_get_message_reply_reply,
4886 (dump_func)dump_set_win_timer_reply,
4887 NULL,
4888 (dump_func)dump_is_window_hung_reply,
4889 (dump_func)dump_get_serial_info_reply,
4890 NULL,
4891 NULL,
4892 NULL,
4893 (dump_func)dump_get_async_result_reply,
4894 (dump_func)dump_read_reply,
4895 (dump_func)dump_write_reply,
4896 (dump_func)dump_ioctl_reply,
4897 NULL,
4898 (dump_func)dump_create_named_pipe_reply,
4899 (dump_func)dump_get_named_pipe_info_reply,
4900 NULL,
4901 (dump_func)dump_create_window_reply,
4902 NULL,
4903 (dump_func)dump_get_desktop_window_reply,
4904 (dump_func)dump_set_window_owner_reply,
4905 (dump_func)dump_get_window_info_reply,
4906 (dump_func)dump_set_window_info_reply,
4907 (dump_func)dump_set_parent_reply,
4908 (dump_func)dump_get_window_parents_reply,
4909 (dump_func)dump_get_window_children_reply,
4910 (dump_func)dump_get_window_children_from_point_reply,
4911 (dump_func)dump_get_window_tree_reply,
4912 (dump_func)dump_set_window_pos_reply,
4913 (dump_func)dump_get_window_rectangles_reply,
4914 (dump_func)dump_get_window_text_reply,
4915 NULL,
4916 (dump_func)dump_get_windows_offset_reply,
4917 (dump_func)dump_get_visible_region_reply,
4918 (dump_func)dump_get_surface_region_reply,
4919 (dump_func)dump_get_window_region_reply,
4920 NULL,
4921 (dump_func)dump_get_update_region_reply,
4922 NULL,
4923 NULL,
4924 NULL,
4925 (dump_func)dump_remove_window_property_reply,
4926 (dump_func)dump_get_window_property_reply,
4927 (dump_func)dump_get_window_properties_reply,
4928 (dump_func)dump_create_winstation_reply,
4929 (dump_func)dump_open_winstation_reply,
4930 NULL,
4931 (dump_func)dump_get_process_winstation_reply,
4932 NULL,
4933 (dump_func)dump_enum_winstation_reply,
4934 (dump_func)dump_create_desktop_reply,
4935 (dump_func)dump_open_desktop_reply,
4936 (dump_func)dump_open_input_desktop_reply,
4937 NULL,
4938 (dump_func)dump_get_thread_desktop_reply,
4939 NULL,
4940 (dump_func)dump_enum_desktop_reply,
4941 (dump_func)dump_set_user_object_info_reply,
4942 (dump_func)dump_register_hotkey_reply,
4943 (dump_func)dump_unregister_hotkey_reply,
4944 NULL,
4945 (dump_func)dump_get_thread_input_reply,
4946 (dump_func)dump_get_last_input_time_reply,
4947 (dump_func)dump_get_key_state_reply,
4948 NULL,
4949 (dump_func)dump_set_foreground_window_reply,
4950 (dump_func)dump_set_focus_window_reply,
4951 (dump_func)dump_set_active_window_reply,
4952 (dump_func)dump_set_capture_window_reply,
4953 (dump_func)dump_set_caret_window_reply,
4954 (dump_func)dump_set_caret_info_reply,
4955 (dump_func)dump_set_hook_reply,
4956 (dump_func)dump_remove_hook_reply,
4957 (dump_func)dump_start_hook_chain_reply,
4958 NULL,
4959 (dump_func)dump_get_hook_info_reply,
4960 (dump_func)dump_create_class_reply,
4961 (dump_func)dump_destroy_class_reply,
4962 (dump_func)dump_set_class_info_reply,
4963 (dump_func)dump_open_clipboard_reply,
4964 (dump_func)dump_close_clipboard_reply,
4965 NULL,
4966 (dump_func)dump_set_clipboard_data_reply,
4967 (dump_func)dump_get_clipboard_data_reply,
4968 (dump_func)dump_get_clipboard_formats_reply,
4969 (dump_func)dump_enum_clipboard_formats_reply,
4970 (dump_func)dump_release_clipboard_reply,
4971 (dump_func)dump_get_clipboard_info_reply,
4972 (dump_func)dump_set_clipboard_viewer_reply,
4973 NULL,
4974 NULL,
4975 (dump_func)dump_open_token_reply,
4976 (dump_func)dump_set_global_windows_reply,
4977 (dump_func)dump_adjust_token_privileges_reply,
4978 (dump_func)dump_get_token_privileges_reply,
4979 (dump_func)dump_check_token_privileges_reply,
4980 (dump_func)dump_duplicate_token_reply,
4981 (dump_func)dump_access_check_reply,
4982 (dump_func)dump_get_token_sid_reply,
4983 (dump_func)dump_get_token_groups_reply,
4984 (dump_func)dump_get_token_default_dacl_reply,
4985 NULL,
4986 NULL,
4987 (dump_func)dump_get_security_object_reply,
4988 (dump_func)dump_get_system_handles_reply,
4989 (dump_func)dump_create_mailslot_reply,
4990 (dump_func)dump_set_mailslot_info_reply,
4991 (dump_func)dump_create_directory_reply,
4992 (dump_func)dump_open_directory_reply,
4993 (dump_func)dump_get_directory_entry_reply,
4994 (dump_func)dump_create_symlink_reply,
4995 (dump_func)dump_open_symlink_reply,
4996 (dump_func)dump_query_symlink_reply,
4997 (dump_func)dump_get_object_info_reply,
4998 (dump_func)dump_get_object_type_reply,
4999 NULL,
5000 (dump_func)dump_get_token_impersonation_level_reply,
5001 (dump_func)dump_allocate_locally_unique_id_reply,
5002 (dump_func)dump_create_device_manager_reply,
5003 (dump_func)dump_create_device_reply,
5004 NULL,
5005 (dump_func)dump_get_next_device_request_reply,
5006 (dump_func)dump_make_process_system_reply,
5007 (dump_func)dump_get_token_statistics_reply,
5008 (dump_func)dump_create_completion_reply,
5009 (dump_func)dump_open_completion_reply,
5010 NULL,
5011 (dump_func)dump_remove_completion_reply,
5012 (dump_func)dump_query_completion_reply,
5013 NULL,
5014 NULL,
5015 NULL,
5016 NULL,
5017 (dump_func)dump_get_window_layered_info_reply,
5018 NULL,
5019 (dump_func)dump_alloc_user_handle_reply,
5020 NULL,
5021 (dump_func)dump_set_cursor_reply,
5022 NULL,
5023 (dump_func)dump_get_suspend_context_reply,
5024 NULL,
5025 (dump_func)dump_create_job_reply,
5026 (dump_func)dump_open_job_reply,
5027 NULL,
5028 NULL,
5029 NULL,
5030 NULL,
5031 NULL,
5034 static const char * const req_names[REQ_NB_REQUESTS] = {
5035 "new_process",
5036 "get_new_process_info",
5037 "new_thread",
5038 "get_startup_info",
5039 "init_process_done",
5040 "init_thread",
5041 "terminate_process",
5042 "terminate_thread",
5043 "get_process_info",
5044 "set_process_info",
5045 "get_thread_info",
5046 "get_thread_times",
5047 "set_thread_info",
5048 "get_dll_info",
5049 "suspend_thread",
5050 "resume_thread",
5051 "load_dll",
5052 "unload_dll",
5053 "queue_apc",
5054 "get_apc_result",
5055 "close_handle",
5056 "set_handle_info",
5057 "dup_handle",
5058 "open_process",
5059 "open_thread",
5060 "select",
5061 "create_event",
5062 "event_op",
5063 "query_event",
5064 "open_event",
5065 "create_keyed_event",
5066 "open_keyed_event",
5067 "create_mutex",
5068 "release_mutex",
5069 "open_mutex",
5070 "query_mutex",
5071 "create_semaphore",
5072 "release_semaphore",
5073 "query_semaphore",
5074 "open_semaphore",
5075 "create_file",
5076 "open_file_object",
5077 "alloc_file_handle",
5078 "get_handle_unix_name",
5079 "get_handle_fd",
5080 "get_directory_cache_entry",
5081 "flush",
5082 "lock_file",
5083 "unlock_file",
5084 "create_socket",
5085 "accept_socket",
5086 "accept_into_socket",
5087 "set_socket_event",
5088 "get_socket_event",
5089 "get_socket_info",
5090 "enable_socket_event",
5091 "set_socket_deferred",
5092 "alloc_console",
5093 "free_console",
5094 "get_console_renderer_events",
5095 "open_console",
5096 "get_console_wait_event",
5097 "get_console_mode",
5098 "set_console_mode",
5099 "set_console_input_info",
5100 "get_console_input_info",
5101 "append_console_input_history",
5102 "get_console_input_history",
5103 "create_console_output",
5104 "set_console_output_info",
5105 "get_console_output_info",
5106 "write_console_input",
5107 "read_console_input",
5108 "write_console_output",
5109 "fill_console_output",
5110 "read_console_output",
5111 "move_console_output",
5112 "send_console_signal",
5113 "read_directory_changes",
5114 "read_change",
5115 "create_mapping",
5116 "open_mapping",
5117 "get_mapping_info",
5118 "get_mapping_committed_range",
5119 "add_mapping_committed_range",
5120 "create_snapshot",
5121 "next_process",
5122 "next_thread",
5123 "wait_debug_event",
5124 "queue_exception_event",
5125 "get_exception_status",
5126 "continue_debug_event",
5127 "debug_process",
5128 "debug_break",
5129 "set_debugger_kill_on_exit",
5130 "read_process_memory",
5131 "write_process_memory",
5132 "create_key",
5133 "open_key",
5134 "delete_key",
5135 "flush_key",
5136 "enum_key",
5137 "set_key_value",
5138 "get_key_value",
5139 "enum_key_value",
5140 "delete_key_value",
5141 "load_registry",
5142 "unload_registry",
5143 "save_registry",
5144 "set_registry_notification",
5145 "create_timer",
5146 "open_timer",
5147 "set_timer",
5148 "cancel_timer",
5149 "get_timer_info",
5150 "get_thread_context",
5151 "set_thread_context",
5152 "get_selector_entry",
5153 "add_atom",
5154 "delete_atom",
5155 "find_atom",
5156 "get_atom_information",
5157 "set_atom_information",
5158 "empty_atom_table",
5159 "init_atom_table",
5160 "get_msg_queue",
5161 "set_queue_fd",
5162 "set_queue_mask",
5163 "get_queue_status",
5164 "get_process_idle_event",
5165 "send_message",
5166 "post_quit_message",
5167 "send_hardware_message",
5168 "get_message",
5169 "reply_message",
5170 "accept_hardware_message",
5171 "get_message_reply",
5172 "set_win_timer",
5173 "kill_win_timer",
5174 "is_window_hung",
5175 "get_serial_info",
5176 "set_serial_info",
5177 "register_async",
5178 "cancel_async",
5179 "get_async_result",
5180 "read",
5181 "write",
5182 "ioctl",
5183 "set_irp_result",
5184 "create_named_pipe",
5185 "get_named_pipe_info",
5186 "set_named_pipe_info",
5187 "create_window",
5188 "destroy_window",
5189 "get_desktop_window",
5190 "set_window_owner",
5191 "get_window_info",
5192 "set_window_info",
5193 "set_parent",
5194 "get_window_parents",
5195 "get_window_children",
5196 "get_window_children_from_point",
5197 "get_window_tree",
5198 "set_window_pos",
5199 "get_window_rectangles",
5200 "get_window_text",
5201 "set_window_text",
5202 "get_windows_offset",
5203 "get_visible_region",
5204 "get_surface_region",
5205 "get_window_region",
5206 "set_window_region",
5207 "get_update_region",
5208 "update_window_zorder",
5209 "redraw_window",
5210 "set_window_property",
5211 "remove_window_property",
5212 "get_window_property",
5213 "get_window_properties",
5214 "create_winstation",
5215 "open_winstation",
5216 "close_winstation",
5217 "get_process_winstation",
5218 "set_process_winstation",
5219 "enum_winstation",
5220 "create_desktop",
5221 "open_desktop",
5222 "open_input_desktop",
5223 "close_desktop",
5224 "get_thread_desktop",
5225 "set_thread_desktop",
5226 "enum_desktop",
5227 "set_user_object_info",
5228 "register_hotkey",
5229 "unregister_hotkey",
5230 "attach_thread_input",
5231 "get_thread_input",
5232 "get_last_input_time",
5233 "get_key_state",
5234 "set_key_state",
5235 "set_foreground_window",
5236 "set_focus_window",
5237 "set_active_window",
5238 "set_capture_window",
5239 "set_caret_window",
5240 "set_caret_info",
5241 "set_hook",
5242 "remove_hook",
5243 "start_hook_chain",
5244 "finish_hook_chain",
5245 "get_hook_info",
5246 "create_class",
5247 "destroy_class",
5248 "set_class_info",
5249 "open_clipboard",
5250 "close_clipboard",
5251 "empty_clipboard",
5252 "set_clipboard_data",
5253 "get_clipboard_data",
5254 "get_clipboard_formats",
5255 "enum_clipboard_formats",
5256 "release_clipboard",
5257 "get_clipboard_info",
5258 "set_clipboard_viewer",
5259 "add_clipboard_listener",
5260 "remove_clipboard_listener",
5261 "open_token",
5262 "set_global_windows",
5263 "adjust_token_privileges",
5264 "get_token_privileges",
5265 "check_token_privileges",
5266 "duplicate_token",
5267 "access_check",
5268 "get_token_sid",
5269 "get_token_groups",
5270 "get_token_default_dacl",
5271 "set_token_default_dacl",
5272 "set_security_object",
5273 "get_security_object",
5274 "get_system_handles",
5275 "create_mailslot",
5276 "set_mailslot_info",
5277 "create_directory",
5278 "open_directory",
5279 "get_directory_entry",
5280 "create_symlink",
5281 "open_symlink",
5282 "query_symlink",
5283 "get_object_info",
5284 "get_object_type",
5285 "unlink_object",
5286 "get_token_impersonation_level",
5287 "allocate_locally_unique_id",
5288 "create_device_manager",
5289 "create_device",
5290 "delete_device",
5291 "get_next_device_request",
5292 "make_process_system",
5293 "get_token_statistics",
5294 "create_completion",
5295 "open_completion",
5296 "add_completion",
5297 "remove_completion",
5298 "query_completion",
5299 "set_completion_info",
5300 "add_fd_completion",
5301 "set_fd_disp_info",
5302 "set_fd_name_info",
5303 "get_window_layered_info",
5304 "set_window_layered_info",
5305 "alloc_user_handle",
5306 "free_user_handle",
5307 "set_cursor",
5308 "update_rawinput_devices",
5309 "get_suspend_context",
5310 "set_suspend_context",
5311 "create_job",
5312 "open_job",
5313 "assign_job",
5314 "process_in_job",
5315 "set_job_limits",
5316 "set_job_completion_port",
5317 "terminate_job",
5320 static const struct
5322 const char *name;
5323 unsigned int value;
5324 } status_names[] =
5326 { "ABANDONED_WAIT_0", STATUS_ABANDONED_WAIT_0 },
5327 { "ACCESS_DENIED", STATUS_ACCESS_DENIED },
5328 { "ACCESS_VIOLATION", STATUS_ACCESS_VIOLATION },
5329 { "ADDRESS_ALREADY_ASSOCIATED", STATUS_ADDRESS_ALREADY_ASSOCIATED },
5330 { "ALERTED", STATUS_ALERTED },
5331 { "ALIAS_EXISTS", STATUS_ALIAS_EXISTS },
5332 { "BAD_DEVICE_TYPE", STATUS_BAD_DEVICE_TYPE },
5333 { "BAD_IMPERSONATION_LEVEL", STATUS_BAD_IMPERSONATION_LEVEL },
5334 { "BREAKPOINT", STATUS_BREAKPOINT },
5335 { "BUFFER_OVERFLOW", STATUS_BUFFER_OVERFLOW },
5336 { "BUFFER_TOO_SMALL", STATUS_BUFFER_TOO_SMALL },
5337 { "CANCELLED", STATUS_CANCELLED },
5338 { "CANNOT_DELETE", STATUS_CANNOT_DELETE },
5339 { "CANT_OPEN_ANONYMOUS", STATUS_CANT_OPEN_ANONYMOUS },
5340 { "CANT_WAIT", STATUS_CANT_WAIT },
5341 { "CHILD_MUST_BE_VOLATILE", STATUS_CHILD_MUST_BE_VOLATILE },
5342 { "CONNECTION_ABORTED", STATUS_CONNECTION_ABORTED },
5343 { "CONNECTION_DISCONNECTED", STATUS_CONNECTION_DISCONNECTED },
5344 { "CONNECTION_REFUSED", STATUS_CONNECTION_REFUSED },
5345 { "CONNECTION_RESET", STATUS_CONNECTION_RESET },
5346 { "DEBUGGER_INACTIVE", STATUS_DEBUGGER_INACTIVE },
5347 { "DEVICE_BUSY", STATUS_DEVICE_BUSY },
5348 { "DIRECTORY_NOT_EMPTY", STATUS_DIRECTORY_NOT_EMPTY },
5349 { "DISK_FULL", STATUS_DISK_FULL },
5350 { "DLL_NOT_FOUND", STATUS_DLL_NOT_FOUND },
5351 { "ERROR_CLASS_ALREADY_EXISTS", 0xc0010000 | ERROR_CLASS_ALREADY_EXISTS },
5352 { "ERROR_CLASS_DOES_NOT_EXIST", 0xc0010000 | ERROR_CLASS_DOES_NOT_EXIST },
5353 { "ERROR_CLASS_HAS_WINDOWS", 0xc0010000 | ERROR_CLASS_HAS_WINDOWS },
5354 { "ERROR_CLIPBOARD_NOT_OPEN", 0xc0010000 | ERROR_CLIPBOARD_NOT_OPEN },
5355 { "ERROR_HOTKEY_ALREADY_REGISTERED", 0xc0010000 | ERROR_HOTKEY_ALREADY_REGISTERED },
5356 { "ERROR_HOTKEY_NOT_REGISTERED", 0xc0010000 | ERROR_HOTKEY_NOT_REGISTERED },
5357 { "ERROR_INVALID_CURSOR_HANDLE", 0xc0010000 | ERROR_INVALID_CURSOR_HANDLE },
5358 { "ERROR_INVALID_INDEX", 0xc0010000 | ERROR_INVALID_INDEX },
5359 { "ERROR_INVALID_WINDOW_HANDLE", 0xc0010000 | ERROR_INVALID_WINDOW_HANDLE },
5360 { "ERROR_NO_MORE_USER_HANDLES", 0xc0010000 | ERROR_NO_MORE_USER_HANDLES },
5361 { "ERROR_WINDOW_OF_OTHER_THREAD", 0xc0010000 | ERROR_WINDOW_OF_OTHER_THREAD },
5362 { "FILE_DELETED", STATUS_FILE_DELETED },
5363 { "FILE_IS_A_DIRECTORY", STATUS_FILE_IS_A_DIRECTORY },
5364 { "FILE_LOCK_CONFLICT", STATUS_FILE_LOCK_CONFLICT },
5365 { "GENERIC_NOT_MAPPED", STATUS_GENERIC_NOT_MAPPED },
5366 { "HANDLES_CLOSED", STATUS_HANDLES_CLOSED },
5367 { "HANDLE_NOT_CLOSABLE", STATUS_HANDLE_NOT_CLOSABLE },
5368 { "HOST_UNREACHABLE", STATUS_HOST_UNREACHABLE },
5369 { "ILLEGAL_FUNCTION", STATUS_ILLEGAL_FUNCTION },
5370 { "INSTANCE_NOT_AVAILABLE", STATUS_INSTANCE_NOT_AVAILABLE },
5371 { "INSUFFICIENT_RESOURCES", STATUS_INSUFFICIENT_RESOURCES },
5372 { "INVALID_CID", STATUS_INVALID_CID },
5373 { "INVALID_DEVICE_REQUEST", STATUS_INVALID_DEVICE_REQUEST },
5374 { "INVALID_FILE_FOR_SECTION", STATUS_INVALID_FILE_FOR_SECTION },
5375 { "INVALID_HANDLE", STATUS_INVALID_HANDLE },
5376 { "INVALID_IMAGE_FORMAT", STATUS_INVALID_IMAGE_FORMAT },
5377 { "INVALID_IMAGE_NE_FORMAT", STATUS_INVALID_IMAGE_NE_FORMAT },
5378 { "INVALID_IMAGE_NOT_MZ", STATUS_INVALID_IMAGE_NOT_MZ },
5379 { "INVALID_IMAGE_PROTECT", STATUS_INVALID_IMAGE_PROTECT },
5380 { "INVALID_IMAGE_WIN_64", STATUS_INVALID_IMAGE_WIN_64 },
5381 { "INVALID_LOCK_SEQUENCE", STATUS_INVALID_LOCK_SEQUENCE },
5382 { "INVALID_OWNER", STATUS_INVALID_OWNER },
5383 { "INVALID_PARAMETER", STATUS_INVALID_PARAMETER },
5384 { "INVALID_SECURITY_DESCR", STATUS_INVALID_SECURITY_DESCR },
5385 { "IO_TIMEOUT", STATUS_IO_TIMEOUT },
5386 { "KEY_DELETED", STATUS_KEY_DELETED },
5387 { "MAPPED_FILE_SIZE_ZERO", STATUS_MAPPED_FILE_SIZE_ZERO },
5388 { "MORE_PROCESSING_REQUIRED", STATUS_MORE_PROCESSING_REQUIRED },
5389 { "MUTANT_NOT_OWNED", STATUS_MUTANT_NOT_OWNED },
5390 { "NAME_TOO_LONG", STATUS_NAME_TOO_LONG },
5391 { "NETWORK_BUSY", STATUS_NETWORK_BUSY },
5392 { "NETWORK_UNREACHABLE", STATUS_NETWORK_UNREACHABLE },
5393 { "NOT_ALL_ASSIGNED", STATUS_NOT_ALL_ASSIGNED },
5394 { "NOT_A_DIRECTORY", STATUS_NOT_A_DIRECTORY },
5395 { "NOT_FOUND", STATUS_NOT_FOUND },
5396 { "NOT_IMPLEMENTED", STATUS_NOT_IMPLEMENTED },
5397 { "NOT_REGISTRY_FILE", STATUS_NOT_REGISTRY_FILE },
5398 { "NOT_SUPPORTED", STATUS_NOT_SUPPORTED },
5399 { "NO_DATA_DETECTED", STATUS_NO_DATA_DETECTED },
5400 { "NO_IMPERSONATION_TOKEN", STATUS_NO_IMPERSONATION_TOKEN },
5401 { "NO_MEMORY", STATUS_NO_MEMORY },
5402 { "NO_MORE_ENTRIES", STATUS_NO_MORE_ENTRIES },
5403 { "NO_MORE_FILES", STATUS_NO_MORE_FILES },
5404 { "NO_SUCH_DEVICE", STATUS_NO_SUCH_DEVICE },
5405 { "NO_SUCH_FILE", STATUS_NO_SUCH_FILE },
5406 { "NO_TOKEN", STATUS_NO_TOKEN },
5407 { "OBJECT_NAME_COLLISION", STATUS_OBJECT_NAME_COLLISION },
5408 { "OBJECT_NAME_EXISTS", STATUS_OBJECT_NAME_EXISTS },
5409 { "OBJECT_NAME_INVALID", STATUS_OBJECT_NAME_INVALID },
5410 { "OBJECT_NAME_NOT_FOUND", STATUS_OBJECT_NAME_NOT_FOUND },
5411 { "OBJECT_PATH_INVALID", STATUS_OBJECT_PATH_INVALID },
5412 { "OBJECT_PATH_NOT_FOUND", STATUS_OBJECT_PATH_NOT_FOUND },
5413 { "OBJECT_PATH_SYNTAX_BAD", STATUS_OBJECT_PATH_SYNTAX_BAD },
5414 { "OBJECT_TYPE_MISMATCH", STATUS_OBJECT_TYPE_MISMATCH },
5415 { "PENDING", STATUS_PENDING },
5416 { "PIPE_CONNECTED", STATUS_PIPE_CONNECTED },
5417 { "PIPE_DISCONNECTED", STATUS_PIPE_DISCONNECTED },
5418 { "PIPE_LISTENING", STATUS_PIPE_LISTENING },
5419 { "PIPE_NOT_AVAILABLE", STATUS_PIPE_NOT_AVAILABLE },
5420 { "PRIVILEGE_NOT_HELD", STATUS_PRIVILEGE_NOT_HELD },
5421 { "PROCESS_IN_JOB", STATUS_PROCESS_IN_JOB },
5422 { "PROCESS_IS_TERMINATING", STATUS_PROCESS_IS_TERMINATING },
5423 { "SECTION_TOO_BIG", STATUS_SECTION_TOO_BIG },
5424 { "SEMAPHORE_LIMIT_EXCEEDED", STATUS_SEMAPHORE_LIMIT_EXCEEDED },
5425 { "SHARING_VIOLATION", STATUS_SHARING_VIOLATION },
5426 { "SHUTDOWN_IN_PROGRESS", STATUS_SHUTDOWN_IN_PROGRESS },
5427 { "SUSPEND_COUNT_EXCEEDED", STATUS_SUSPEND_COUNT_EXCEEDED },
5428 { "THREAD_IS_TERMINATING", STATUS_THREAD_IS_TERMINATING },
5429 { "TIMEOUT", STATUS_TIMEOUT },
5430 { "TOO_MANY_OPENED_FILES", STATUS_TOO_MANY_OPENED_FILES },
5431 { "UNSUCCESSFUL", STATUS_UNSUCCESSFUL },
5432 { "USER_APC", STATUS_USER_APC },
5433 { "USER_MAPPED_FILE", STATUS_USER_MAPPED_FILE },
5434 { "VOLUME_DISMOUNTED", STATUS_VOLUME_DISMOUNTED },
5435 { "WAS_LOCKED", STATUS_WAS_LOCKED },
5436 { NULL, 0 }
5439 /* ### make_requests end ### */
5440 /* Everything above this line is generated automatically by tools/make_requests */
5442 static const char *get_status_name( unsigned int status )
5444 int i;
5445 static char buffer[10];
5447 if (status)
5449 for (i = 0; status_names[i].name; i++)
5450 if (status_names[i].value == status) return status_names[i].name;
5452 sprintf( buffer, "%x", status );
5453 return buffer;
5456 void trace_request(void)
5458 enum request req = current->req.request_header.req;
5459 if (req < REQ_NB_REQUESTS)
5461 fprintf( stderr, "%04x: %s(", current->id, req_names[req] );
5462 if (req_dumpers[req])
5464 cur_data = get_req_data();
5465 cur_size = get_req_data_size();
5466 req_dumpers[req]( &current->req );
5468 fprintf( stderr, " )\n" );
5470 else fprintf( stderr, "%04x: %d(?)\n", current->id, req );
5473 void trace_reply( enum request req, const union generic_reply *reply )
5475 if (req < REQ_NB_REQUESTS)
5477 fprintf( stderr, "%04x: %s() = %s",
5478 current->id, req_names[req], get_status_name(current->error) );
5479 if (reply_dumpers[req])
5481 fprintf( stderr, " {" );
5482 cur_data = current->reply_data;
5483 cur_size = reply->reply_header.reply_size;
5484 reply_dumpers[req]( reply );
5485 fprintf( stderr, " }" );
5487 fputc( '\n', stderr );
5489 else fprintf( stderr, "%04x: %d() = %s\n",
5490 current->id, req, get_status_name(current->error) );