conhost: Improve notification when resizing window.
[wine.git] / server / trace.c
blobbc09a5fc959799281efca8562f84b55d3b586aa2
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 "wine/condrv.h"
42 #include "ddk/wdm.h"
43 #include "ddk/ntddser.h"
44 #define USE_WS_PREFIX
45 #include "winsock2.h"
46 #include "file.h"
47 #include "request.h"
48 #include "unicode.h"
50 static const void *cur_data;
51 static data_size_t cur_size;
53 static const char *get_status_name( unsigned int status );
55 /* utility functions */
57 static inline void remove_data( data_size_t size )
59 cur_data = (const char *)cur_data + size;
60 cur_size -= size;
63 static void dump_uints( const char *prefix, const unsigned int *ptr, int len )
65 fprintf( stderr, "%s{", prefix );
66 while (len > 0)
68 fprintf( stderr, "%08x", *ptr++ );
69 if (--len) fputc( ',', stderr );
71 fputc( '}', stderr );
74 static void dump_handles( const char *prefix, const obj_handle_t *data, data_size_t size )
76 data_size_t len = size / sizeof(*data);
78 fprintf( stderr,"%s{", prefix );
79 while (len > 0)
81 fprintf( stderr, "%04x", *data++ );
82 if (--len) fputc( ',', stderr );
84 fputc( '}', stderr );
87 static void dump_timeout( const char *prefix, const timeout_t *time )
89 fprintf( stderr, "%s%s", prefix, get_timeout_str(*time) );
92 static void dump_abstime( const char *prefix, const abstime_t *when )
94 timeout_t timeout = abstime_to_timeout( *when );
95 dump_timeout( prefix, &timeout );
98 static void dump_uint64( const char *prefix, const unsigned __int64 *val )
100 if ((unsigned int)*val != *val)
101 fprintf( stderr, "%s%x%08x", prefix, (unsigned int)(*val >> 32), (unsigned int)*val );
102 else
103 fprintf( stderr, "%s%08x", prefix, (unsigned int)*val );
106 static void dump_rectangle( const char *prefix, const rectangle_t *rect )
108 fprintf( stderr, "%s{%d,%d;%d,%d}", prefix,
109 rect->left, rect->top, rect->right, rect->bottom );
112 static void dump_ioctl_code( const char *prefix, const ioctl_code_t *code )
114 switch(*code)
116 #define CASE(c) case c: fprintf( stderr, "%s%s", prefix, #c ); break
117 CASE(IOCTL_CONDRV_ACTIVATE);
118 CASE(IOCTL_CONDRV_BIND_PID);
119 CASE(IOCTL_CONDRV_CTRL_EVENT);
120 CASE(IOCTL_CONDRV_FILL_OUTPUT);
121 CASE(IOCTL_CONDRV_GET_INPUT_INFO);
122 CASE(IOCTL_CONDRV_GET_MODE);
123 CASE(IOCTL_CONDRV_GET_OUTPUT_INFO);
124 CASE(IOCTL_CONDRV_GET_TITLE);
125 CASE(IOCTL_CONDRV_PEEK);
126 CASE(IOCTL_CONDRV_READ_CONSOLE);
127 CASE(IOCTL_CONDRV_READ_INPUT);
128 CASE(IOCTL_CONDRV_READ_OUTPUT);
129 CASE(IOCTL_CONDRV_SET_MODE);
130 CASE(IOCTL_CONDRV_SET_OUTPUT_INFO);
131 CASE(IOCTL_CONDRV_SETUP_INPUT);
132 CASE(IOCTL_CONDRV_WRITE_CONSOLE);
133 CASE(IOCTL_CONDRV_WRITE_INPUT);
134 CASE(IOCTL_CONDRV_WRITE_OUTPUT);
135 CASE(FSCTL_DISMOUNT_VOLUME);
136 CASE(FSCTL_PIPE_DISCONNECT);
137 CASE(FSCTL_PIPE_LISTEN);
138 CASE(FSCTL_PIPE_PEEK);
139 CASE(FSCTL_PIPE_WAIT);
140 CASE(IOCTL_SERIAL_GET_TIMEOUTS);
141 CASE(IOCTL_SERIAL_GET_WAIT_MASK);
142 CASE(IOCTL_SERIAL_SET_TIMEOUTS);
143 CASE(IOCTL_SERIAL_SET_WAIT_MASK);
144 CASE(WS_SIO_ADDRESS_LIST_CHANGE);
145 default: fprintf( stderr, "%s%08x", prefix, *code ); break;
146 #undef CASE
150 static void dump_client_cpu( const char *prefix, const client_cpu_t *code )
152 switch (*code)
154 #define CASE(c) case CPU_##c: fprintf( stderr, "%s%s", prefix, #c ); break
155 CASE(x86);
156 CASE(x86_64);
157 CASE(POWERPC);
158 CASE(ARM);
159 CASE(ARM64);
160 default: fprintf( stderr, "%s%u", prefix, *code ); break;
161 #undef CASE
165 static void dump_apc_call( const char *prefix, const apc_call_t *call )
167 fprintf( stderr, "%s{", prefix );
168 switch(call->type)
170 case APC_NONE:
171 fprintf( stderr, "APC_NONE" );
172 break;
173 case APC_USER:
174 dump_uint64( "APC_USER,func=", &call->user.user.func );
175 dump_uint64( ",args={", &call->user.user.args[0] );
176 dump_uint64( ",", &call->user.user.args[1] );
177 dump_uint64( ",", &call->user.user.args[2] );
178 fputc( '}', stderr );
179 break;
180 case APC_TIMER:
181 dump_timeout( "APC_TIMER,time=", &call->user.timer.time );
182 dump_uint64( ",arg=", &call->user.timer.arg );
183 break;
184 case APC_ASYNC_IO:
185 dump_uint64( "APC_ASYNC_IO,user=", &call->async_io.user );
186 dump_uint64( ",sb=", &call->async_io.sb );
187 fprintf( stderr, ",status=%s", get_status_name(call->async_io.status) );
188 break;
189 case APC_VIRTUAL_ALLOC:
190 dump_uint64( "APC_VIRTUAL_ALLOC,addr==", &call->virtual_alloc.addr );
191 dump_uint64( ",size=", &call->virtual_alloc.size );
192 dump_uint64( ",zero_bits=", &call->virtual_alloc.zero_bits );
193 fprintf( stderr, ",op_type=%x,prot=%x", call->virtual_alloc.op_type, call->virtual_alloc.prot );
194 break;
195 case APC_VIRTUAL_FREE:
196 dump_uint64( "APC_VIRTUAL_FREE,addr=", &call->virtual_free.addr );
197 dump_uint64( ",size=", &call->virtual_free.size );
198 fprintf( stderr, ",op_type=%x", call->virtual_free.op_type );
199 break;
200 case APC_VIRTUAL_QUERY:
201 dump_uint64( "APC_VIRTUAL_QUERY,addr=", &call->virtual_query.addr );
202 break;
203 case APC_VIRTUAL_PROTECT:
204 dump_uint64( "APC_VIRTUAL_PROTECT,addr=", &call->virtual_protect.addr );
205 dump_uint64( ",size=", &call->virtual_protect.size );
206 fprintf( stderr, ",prot=%x", call->virtual_protect.prot );
207 break;
208 case APC_VIRTUAL_FLUSH:
209 dump_uint64( "APC_VIRTUAL_FLUSH,addr=", &call->virtual_flush.addr );
210 dump_uint64( ",size=", &call->virtual_flush.size );
211 break;
212 case APC_VIRTUAL_LOCK:
213 dump_uint64( "APC_VIRTUAL_LOCK,addr=", &call->virtual_lock.addr );
214 dump_uint64( ",size=", &call->virtual_lock.size );
215 break;
216 case APC_VIRTUAL_UNLOCK:
217 dump_uint64( "APC_VIRTUAL_UNLOCK,addr=", &call->virtual_unlock.addr );
218 dump_uint64( ",size=", &call->virtual_unlock.size );
219 break;
220 case APC_MAP_VIEW:
221 fprintf( stderr, "APC_MAP_VIEW,handle=%04x", call->map_view.handle );
222 dump_uint64( ",addr=", &call->map_view.addr );
223 dump_uint64( ",size=", &call->map_view.size );
224 dump_uint64( ",offset=", &call->map_view.offset );
225 dump_uint64( ",zero_bits=", &call->map_view.zero_bits );
226 fprintf( stderr, ",alloc_type=%x,prot=%x", call->map_view.alloc_type, call->map_view.prot );
227 break;
228 case APC_UNMAP_VIEW:
229 dump_uint64( "APC_UNMAP_VIEW,addr=", &call->unmap_view.addr );
230 break;
231 case APC_CREATE_THREAD:
232 dump_uint64( "APC_CREATE_THREAD,func=", &call->create_thread.func );
233 dump_uint64( ",arg=", &call->create_thread.arg );
234 dump_uint64( ",reserve=", &call->create_thread.reserve );
235 dump_uint64( ",commit=", &call->create_thread.commit );
236 fprintf( stderr, ",flags=%x", call->create_thread.flags );
237 break;
238 case APC_BREAK_PROCESS:
239 fprintf( stderr, "APC_BREAK_PROCESS" );
240 break;
241 default:
242 fprintf( stderr, "type=%u", call->type );
243 break;
245 fputc( '}', stderr );
248 static void dump_apc_result( const char *prefix, const apc_result_t *result )
250 fprintf( stderr, "%s{", prefix );
251 switch(result->type)
253 case APC_NONE:
254 break;
255 case APC_ASYNC_IO:
256 fprintf( stderr, "APC_ASYNC_IO,status=%s,total=%u",
257 get_status_name( result->async_io.status ), result->async_io.total );
258 break;
259 case APC_VIRTUAL_ALLOC:
260 fprintf( stderr, "APC_VIRTUAL_ALLOC,status=%s",
261 get_status_name( result->virtual_alloc.status ));
262 dump_uint64( ",addr=", &result->virtual_alloc.addr );
263 dump_uint64( ",size=", &result->virtual_alloc.size );
264 break;
265 case APC_VIRTUAL_FREE:
266 fprintf( stderr, "APC_VIRTUAL_FREE,status=%s",
267 get_status_name( result->virtual_free.status ));
268 dump_uint64( ",addr=", &result->virtual_free.addr );
269 dump_uint64( ",size=", &result->virtual_free.size );
270 break;
271 case APC_VIRTUAL_QUERY:
272 fprintf( stderr, "APC_VIRTUAL_QUERY,status=%s",
273 get_status_name( result->virtual_query.status ));
274 dump_uint64( ",base=", &result->virtual_query.base );
275 dump_uint64( ",alloc_base=", &result->virtual_query.alloc_base );
276 dump_uint64( ",size=", &result->virtual_query.size );
277 fprintf( stderr, ",state=%x,prot=%x,alloc_prot=%x,alloc_type=%x",
278 result->virtual_query.state, result->virtual_query.prot,
279 result->virtual_query.alloc_prot, result->virtual_query.alloc_type );
280 break;
281 case APC_VIRTUAL_PROTECT:
282 fprintf( stderr, "APC_VIRTUAL_PROTECT,status=%s",
283 get_status_name( result->virtual_protect.status ));
284 dump_uint64( ",addr=", &result->virtual_protect.addr );
285 dump_uint64( ",size=", &result->virtual_protect.size );
286 fprintf( stderr, ",prot=%x", result->virtual_protect.prot );
287 break;
288 case APC_VIRTUAL_FLUSH:
289 fprintf( stderr, "APC_VIRTUAL_FLUSH,status=%s",
290 get_status_name( result->virtual_flush.status ));
291 dump_uint64( ",addr=", &result->virtual_flush.addr );
292 dump_uint64( ",size=", &result->virtual_flush.size );
293 break;
294 case APC_VIRTUAL_LOCK:
295 fprintf( stderr, "APC_VIRTUAL_LOCK,status=%s",
296 get_status_name( result->virtual_lock.status ));
297 dump_uint64( ",addr=", &result->virtual_lock.addr );
298 dump_uint64( ",size=", &result->virtual_lock.size );
299 break;
300 case APC_VIRTUAL_UNLOCK:
301 fprintf( stderr, "APC_VIRTUAL_UNLOCK,status=%s",
302 get_status_name( result->virtual_unlock.status ));
303 dump_uint64( ",addr=", &result->virtual_unlock.addr );
304 dump_uint64( ",size=", &result->virtual_unlock.size );
305 break;
306 case APC_MAP_VIEW:
307 fprintf( stderr, "APC_MAP_VIEW,status=%s",
308 get_status_name( result->map_view.status ));
309 dump_uint64( ",addr=", &result->map_view.addr );
310 dump_uint64( ",size=", &result->map_view.size );
311 break;
312 case APC_UNMAP_VIEW:
313 fprintf( stderr, "APC_UNMAP_VIEW,status=%s",
314 get_status_name( result->unmap_view.status ) );
315 break;
316 case APC_CREATE_THREAD:
317 fprintf( stderr, "APC_CREATE_THREAD,status=%s,pid=%04x,tid=%04x,handle=%04x",
318 get_status_name( result->create_thread.status ),
319 result->create_thread.pid, result->create_thread.tid, result->create_thread.handle );
320 break;
321 case APC_BREAK_PROCESS:
322 fprintf( stderr, "APC_BREAK_PROCESS,status=%s", get_status_name( result->break_process.status ) );
323 break;
324 default:
325 fprintf( stderr, "type=%u", result->type );
326 break;
328 fputc( '}', stderr );
331 static void dump_async_data( const char *prefix, const async_data_t *data )
333 fprintf( stderr, "%s{handle=%04x,event=%04x", prefix, data->handle, data->event );
334 dump_uint64( ",iosb=", &data->iosb );
335 dump_uint64( ",user=", &data->user );
336 dump_uint64( ",apc=", &data->apc );
337 dump_uint64( ",apc_context=", &data->apc_context );
338 fputc( '}', stderr );
341 static void dump_irp_params( const char *prefix, const irp_params_t *data )
343 switch (data->type)
345 case IRP_CALL_NONE:
346 fprintf( stderr, "%s{NONE}", prefix );
347 break;
348 case IRP_CALL_CREATE:
349 fprintf( stderr, "%s{CREATE,access=%08x,sharing=%08x,options=%08x",
350 prefix, data->create.access, data->create.sharing, data->create.options );
351 dump_uint64( ",device=", &data->create.device );
352 fprintf( stderr, ",file=%08x}", data->create.file );
353 break;
354 case IRP_CALL_CLOSE:
355 fprintf( stderr, "%s{CLOSE", prefix );
356 dump_uint64( ",file=", &data->close.file );
357 fputc( '}', stderr );
358 break;
359 case IRP_CALL_READ:
360 fprintf( stderr, "%s{READ,key=%08x,out_size=%u", prefix, data->read.key,
361 data->read.out_size );
362 dump_uint64( ",pos=", &data->read.pos );
363 dump_uint64( ",file=", &data->read.file );
364 fputc( '}', stderr );
365 break;
366 case IRP_CALL_WRITE:
367 fprintf( stderr, "%s{WRITE,key=%08x", prefix, data->write.key );
368 dump_uint64( ",pos=", &data->write.pos );
369 dump_uint64( ",file=", &data->write.file );
370 fputc( '}', stderr );
371 break;
372 case IRP_CALL_FLUSH:
373 fprintf( stderr, "%s{FLUSH", prefix );
374 dump_uint64( ",file=", &data->flush.file );
375 fputc( '}', stderr );
376 break;
377 case IRP_CALL_IOCTL:
378 fprintf( stderr, "%s{IOCTL", prefix );
379 dump_ioctl_code( ",code=", &data->ioctl.code );
380 fprintf( stderr, ",out_size=%u", data->ioctl.out_size );
381 dump_uint64( ",file=", &data->ioctl.file );
382 fputc( '}', stderr );
383 break;
384 case IRP_CALL_FREE:
385 fprintf( stderr, "%s{FREE", prefix );
386 dump_uint64( ",obj=", &data->free.obj );
387 fputc( '}', stderr );
388 break;
389 case IRP_CALL_CANCEL:
390 fprintf( stderr, "%s{CANCEL", prefix );
391 dump_uint64( ",irp=", &data->cancel.irp );
392 fputc( '}', stderr );
393 break;
397 static void dump_hw_input( const char *prefix, const hw_input_t *input )
399 switch (input->type)
401 case INPUT_MOUSE:
402 fprintf( stderr, "%s{type=MOUSE,x=%d,y=%d,data=%08x,flags=%08x,time=%u",
403 prefix, input->mouse.x, input->mouse.y, input->mouse.data, input->mouse.flags,
404 input->mouse.time );
405 dump_uint64( ",info=", &input->mouse.info );
406 fputc( '}', stderr );
407 break;
408 case INPUT_KEYBOARD:
409 fprintf( stderr, "%s{type=KEYBOARD,vkey=%04hx,scan=%04hx,flags=%08x,time=%u",
410 prefix, input->kbd.vkey, input->kbd.scan, input->kbd.flags, input->kbd.time );
411 dump_uint64( ",info=", &input->kbd.info );
412 fputc( '}', stderr );
413 break;
414 case INPUT_HARDWARE:
415 fprintf( stderr, "%s{type=HARDWARE,msg=%04x", prefix, input->hw.msg );
416 dump_uint64( ",lparam=", &input->hw.lparam );
417 fputc( '}', stderr );
418 break;
419 default:
420 fprintf( stderr, "%s{type=%04x}", prefix, input->type );
421 break;
425 static void dump_luid( const char *prefix, const luid_t *luid )
427 fprintf( stderr, "%s%d.%u", prefix, luid->high_part, luid->low_part );
430 static void dump_varargs_ints( const char *prefix, data_size_t size )
432 const int *data = cur_data;
433 data_size_t len = size / sizeof(*data);
435 fprintf( stderr,"%s{", prefix );
436 while (len > 0)
438 fprintf( stderr, "%d", *data++ );
439 if (--len) fputc( ',', stderr );
441 fputc( '}', stderr );
442 remove_data( size );
445 static void dump_varargs_uints( const char *prefix, data_size_t size )
447 const unsigned int *data = cur_data;
449 dump_uints( prefix, data, size / sizeof(*data) );
450 remove_data( size );
453 static void dump_varargs_uints64( const char *prefix, data_size_t size )
455 const unsigned __int64 *data = cur_data;
456 data_size_t len = size / sizeof(*data);
458 fprintf( stderr,"%s{", prefix );
459 while (len > 0)
461 dump_uint64( "", data++ );
462 if (--len) fputc( ',', stderr );
464 fputc( '}', stderr );
465 remove_data( size );
468 static void dump_varargs_apc_result( const char *prefix, data_size_t size )
470 const apc_result_t *result = cur_data;
472 if (size >= sizeof(*result))
474 dump_apc_result( prefix, result );
475 size = sizeof(*result);
477 remove_data( size );
480 static void dump_varargs_select_op( const char *prefix, data_size_t size )
482 select_op_t data;
484 if (!size)
486 fprintf( stderr, "%s{}", prefix );
487 return;
489 memset( &data, 0, sizeof(data) );
490 memcpy( &data, cur_data, min( size, sizeof(data) ));
492 fprintf( stderr, "%s{", prefix );
493 switch (data.op)
495 case SELECT_NONE:
496 fprintf( stderr, "NONE" );
497 break;
498 case SELECT_WAIT:
499 case SELECT_WAIT_ALL:
500 fprintf( stderr, "%s", data.op == SELECT_WAIT ? "WAIT" : "WAIT_ALL" );
501 if (size > offsetof( select_op_t, wait.handles ))
502 dump_handles( ",handles=", data.wait.handles,
503 min( size, sizeof(data.wait) ) - offsetof( select_op_t, wait.handles ));
504 break;
505 case SELECT_SIGNAL_AND_WAIT:
506 fprintf( stderr, "SIGNAL_AND_WAIT,signal=%04x,wait=%04x",
507 data.signal_and_wait.signal, data.signal_and_wait.wait );
508 break;
509 case SELECT_KEYED_EVENT_WAIT:
510 case SELECT_KEYED_EVENT_RELEASE:
511 fprintf( stderr, "KEYED_EVENT_%s,handle=%04x",
512 data.op == SELECT_KEYED_EVENT_WAIT ? "WAIT" : "RELEASE",
513 data.keyed_event.handle );
514 dump_uint64( ",key=", &data.keyed_event.key );
515 break;
516 default:
517 fprintf( stderr, "op=%u", data.op );
518 break;
520 fputc( '}', stderr );
521 remove_data( size );
524 static void dump_varargs_user_handles( const char *prefix, data_size_t size )
526 const user_handle_t *data = cur_data;
527 data_size_t len = size / sizeof(*data);
529 fprintf( stderr,"%s{", prefix );
530 while (len > 0)
532 fprintf( stderr, "%08x", *data++ );
533 if (--len) fputc( ',', stderr );
535 fputc( '}', stderr );
536 remove_data( size );
539 static void dump_varargs_bytes( const char *prefix, data_size_t size )
541 const unsigned char *data = cur_data;
542 data_size_t len = min( 1024, size );
544 fprintf( stderr,"%s{", prefix );
545 while (len > 0)
547 fprintf( stderr, "%02x", *data++ );
548 if (--len) fputc( ',', stderr );
550 if (size > 1024) fprintf( stderr, "...(total %u)", size );
551 fputc( '}', stderr );
552 remove_data( size );
555 static void dump_varargs_string( const char *prefix, data_size_t size )
557 fprintf( stderr, "%s\"%.*s\"", prefix, (int)size, (const char *)cur_data );
558 remove_data( size );
561 static void dump_varargs_unicode_str( const char *prefix, data_size_t size )
563 fprintf( stderr, "%sL\"", prefix );
564 dump_strW( cur_data, size, stderr, "\"\"" );
565 fputc( '\"', stderr );
566 remove_data( size );
569 static void dump_varargs_context( const char *prefix, data_size_t size )
571 const context_t *context = cur_data;
572 context_t ctx;
573 unsigned int i;
575 if (!size)
577 fprintf( stderr, "%s{}", prefix );
578 return;
580 size = min( size, sizeof(ctx) );
581 memset( &ctx, 0, sizeof(ctx) );
582 memcpy( &ctx, context, size );
584 fprintf( stderr,"%s{", prefix );
585 dump_client_cpu( "cpu=", &ctx.cpu );
586 switch (ctx.cpu)
588 case CPU_x86:
589 if (ctx.flags & SERVER_CTX_CONTROL)
590 fprintf( stderr, ",eip=%08x,esp=%08x,ebp=%08x,eflags=%08x,cs=%04x,ss=%04x",
591 ctx.ctl.i386_regs.eip, ctx.ctl.i386_regs.esp, ctx.ctl.i386_regs.ebp,
592 ctx.ctl.i386_regs.eflags, ctx.ctl.i386_regs.cs, ctx.ctl.i386_regs.ss );
593 if (ctx.flags & SERVER_CTX_SEGMENTS)
594 fprintf( stderr, ",ds=%04x,es=%04x,fs=%04x,gs=%04x",
595 ctx.seg.i386_regs.ds, ctx.seg.i386_regs.es,
596 ctx.seg.i386_regs.fs, ctx.seg.i386_regs.gs );
597 if (ctx.flags & SERVER_CTX_INTEGER)
598 fprintf( stderr, ",eax=%08x,ebx=%08x,ecx=%08x,edx=%08x,esi=%08x,edi=%08x",
599 ctx.integer.i386_regs.eax, ctx.integer.i386_regs.ebx, ctx.integer.i386_regs.ecx,
600 ctx.integer.i386_regs.edx, ctx.integer.i386_regs.esi, ctx.integer.i386_regs.edi );
601 if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
602 fprintf( stderr, ",dr0=%08x,dr1=%08x,dr2=%08x,dr3=%08x,dr6=%08x,dr7=%08x",
603 ctx.debug.i386_regs.dr0, ctx.debug.i386_regs.dr1, ctx.debug.i386_regs.dr2,
604 ctx.debug.i386_regs.dr3, ctx.debug.i386_regs.dr6, ctx.debug.i386_regs.dr7 );
605 if (ctx.flags & SERVER_CTX_FLOATING_POINT)
607 fprintf( stderr, ",fp.ctrl=%08x,fp.status=%08x,fp.tag=%08x,fp.err_off=%08x,fp.err_sel=%08x",
608 ctx.fp.i386_regs.ctrl, ctx.fp.i386_regs.status, ctx.fp.i386_regs.tag,
609 ctx.fp.i386_regs.err_off, ctx.fp.i386_regs.err_sel );
610 fprintf( stderr, ",fp.data_off=%08x,fp.data_sel=%08x,fp.cr0npx=%08x",
611 ctx.fp.i386_regs.data_off, ctx.fp.i386_regs.data_sel, ctx.fp.i386_regs.cr0npx );
612 for (i = 0; i < 8; i++)
614 long double reg = 0;
615 memcpy( &reg, &ctx.fp.i386_regs.regs[10 * i], 10 );
616 fprintf( stderr, ",fp.reg%u=%Lg", i, reg );
619 if (ctx.flags & SERVER_CTX_EXTENDED_REGISTERS)
620 dump_uints( ",extended=", (const unsigned int *)ctx.ext.i386_regs,
621 sizeof(ctx.ext.i386_regs) / sizeof(int) );
622 if (ctx.flags & SERVER_CTX_YMM_REGISTERS)
623 dump_uints( ",ymm_high=", (const unsigned int *)ctx.ymm.ymm_high_regs.ymm_high,
624 sizeof(ctx.ymm.ymm_high_regs) / sizeof(int) );
625 break;
626 case CPU_x86_64:
627 if (ctx.flags & SERVER_CTX_CONTROL)
629 dump_uint64( ",rip=", &ctx.ctl.x86_64_regs.rip );
630 dump_uint64( ",rbp=", &ctx.ctl.x86_64_regs.rbp );
631 dump_uint64( ",rsp=", &ctx.ctl.x86_64_regs.rsp );
632 fprintf( stderr, ",cs=%04x,ss=%04x,flags=%08x",
633 ctx.ctl.x86_64_regs.cs, ctx.ctl.x86_64_regs.ss, ctx.ctl.x86_64_regs.flags );
635 if (ctx.flags & SERVER_CTX_INTEGER)
637 dump_uint64( ",rax=", &ctx.integer.x86_64_regs.rax );
638 dump_uint64( ",rbx=", &ctx.integer.x86_64_regs.rbx );
639 dump_uint64( ",rcx=", &ctx.integer.x86_64_regs.rcx );
640 dump_uint64( ",rdx=", &ctx.integer.x86_64_regs.rdx );
641 dump_uint64( ",rsi=", &ctx.integer.x86_64_regs.rsi );
642 dump_uint64( ",rdi=", &ctx.integer.x86_64_regs.rdi );
643 dump_uint64( ",r8=", &ctx.integer.x86_64_regs.r8 );
644 dump_uint64( ",r9=", &ctx.integer.x86_64_regs.r9 );
645 dump_uint64( ",r10=", &ctx.integer.x86_64_regs.r10 );
646 dump_uint64( ",r11=", &ctx.integer.x86_64_regs.r11 );
647 dump_uint64( ",r12=", &ctx.integer.x86_64_regs.r12 );
648 dump_uint64( ",r13=", &ctx.integer.x86_64_regs.r13 );
649 dump_uint64( ",r14=", &ctx.integer.x86_64_regs.r14 );
650 dump_uint64( ",r15=", &ctx.integer.x86_64_regs.r15 );
652 if (ctx.flags & SERVER_CTX_SEGMENTS)
653 fprintf( stderr, ",ds=%04x,es=%04x,fs=%04x,gs=%04x",
654 ctx.seg.x86_64_regs.ds, ctx.seg.x86_64_regs.es,
655 ctx.seg.x86_64_regs.fs, ctx.seg.x86_64_regs.gs );
656 if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
658 dump_uint64( ",dr0=", &ctx.debug.x86_64_regs.dr0 );
659 dump_uint64( ",dr1=", &ctx.debug.x86_64_regs.dr1 );
660 dump_uint64( ",dr2=", &ctx.debug.x86_64_regs.dr2 );
661 dump_uint64( ",dr3=", &ctx.debug.x86_64_regs.dr3 );
662 dump_uint64( ",dr6=", &ctx.debug.x86_64_regs.dr6 );
663 dump_uint64( ",dr7=", &ctx.debug.x86_64_regs.dr7 );
665 if (ctx.flags & SERVER_CTX_FLOATING_POINT)
667 for (i = 0; i < 32; i++)
668 fprintf( stderr, ",fp%u=%08x%08x%08x%08x", i,
669 (unsigned int)(ctx.fp.x86_64_regs.fpregs[i].high >> 32),
670 (unsigned int)ctx.fp.x86_64_regs.fpregs[i].high,
671 (unsigned int)(ctx.fp.x86_64_regs.fpregs[i].low >> 32),
672 (unsigned int)ctx.fp.x86_64_regs.fpregs[i].low );
674 if (ctx.flags & SERVER_CTX_YMM_REGISTERS)
675 dump_uints( ",ymm_high=", (const unsigned int *)ctx.ymm.ymm_high_regs.ymm_high,
676 sizeof(ctx.ymm.ymm_high_regs) / sizeof(int) );
677 break;
678 case CPU_POWERPC:
679 if (ctx.flags & SERVER_CTX_CONTROL)
680 fprintf( stderr, ",iar=%08x,msr=%08x,ctr=%08x,lr=%08x,dar=%08x,dsisr=%08x,trap=%08x",
681 ctx.ctl.powerpc_regs.iar, ctx.ctl.powerpc_regs.msr, ctx.ctl.powerpc_regs.ctr,
682 ctx.ctl.powerpc_regs.lr, ctx.ctl.powerpc_regs.dar, ctx.ctl.powerpc_regs.dsisr,
683 ctx.ctl.powerpc_regs.trap );
684 if (ctx.flags & SERVER_CTX_INTEGER)
686 for (i = 0; i < 32; i++) fprintf( stderr, ",gpr%u=%08x", i, ctx.integer.powerpc_regs.gpr[i] );
687 fprintf( stderr, ",cr=%08x,xer=%08x",
688 ctx.integer.powerpc_regs.cr, ctx.integer.powerpc_regs.xer );
690 if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
691 for (i = 0; i < 8; i++) fprintf( stderr, ",dr%u=%08x", i, ctx.debug.powerpc_regs.dr[i] );
692 if (ctx.flags & SERVER_CTX_FLOATING_POINT)
694 for (i = 0; i < 32; i++) fprintf( stderr, ",fpr%u=%g", i, ctx.fp.powerpc_regs.fpr[i] );
695 fprintf( stderr, ",fpscr=%g", ctx.fp.powerpc_regs.fpscr );
697 break;
698 case CPU_ARM:
699 if (ctx.flags & SERVER_CTX_CONTROL)
700 fprintf( stderr, ",sp=%08x,lr=%08x,pc=%08x,cpsr=%08x",
701 ctx.ctl.arm_regs.sp, ctx.ctl.arm_regs.lr,
702 ctx.ctl.arm_regs.pc, ctx.ctl.arm_regs.cpsr );
703 if (ctx.flags & SERVER_CTX_INTEGER)
704 for (i = 0; i < 13; i++) fprintf( stderr, ",r%u=%08x", i, ctx.integer.arm_regs.r[i] );
705 if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
707 for (i = 0; i < 8; i++)
708 fprintf( stderr, ",bcr%u=%08x,bvr%u=%08x",
709 i, ctx.debug.arm_regs.bcr[i], i, ctx.debug.arm_regs.bvr[i] );
710 fprintf( stderr, ",wcr0=%08x,wvr0=%08x",
711 ctx.debug.arm_regs.wcr[0], ctx.debug.arm_regs.wvr[0] );
713 if (ctx.flags & SERVER_CTX_FLOATING_POINT)
715 for (i = 0; i < 32; i++)
717 fprintf( stderr, ",d%u=", i );
718 dump_uint64( "", &ctx.fp.arm_regs.d[i] );
720 fprintf( stderr, ",fpscr=%08x", ctx.fp.arm_regs.fpscr );
722 break;
723 case CPU_ARM64:
724 if (ctx.flags & SERVER_CTX_CONTROL)
726 dump_uint64( ",sp=", &ctx.ctl.arm64_regs.sp );
727 dump_uint64( ",pc=", &ctx.ctl.arm64_regs.pc );
728 dump_uint64( ",pstate=", &ctx.ctl.arm64_regs.pstate );
730 if (ctx.flags & SERVER_CTX_INTEGER)
732 for (i = 0; i < 31; i++)
734 fprintf( stderr, ",x%u=", i );
735 dump_uint64( "", &ctx.integer.arm64_regs.x[i] );
738 if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
740 for (i = 0; i < 8; i++)
742 fprintf( stderr, ",bcr%u=%08x,bvr%u=", i, ctx.debug.arm64_regs.bcr[i], i );
743 dump_uint64( "", &ctx.debug.arm64_regs.bvr[i] );
745 for (i = 0; i < 2; i++)
747 fprintf( stderr, ",wcr%u=%08x,wvr%u=", i, ctx.debug.arm64_regs.wcr[i], i );
748 dump_uint64( "", &ctx.debug.arm64_regs.wvr[i] );
751 if (ctx.flags & SERVER_CTX_FLOATING_POINT)
753 for (i = 0; i < 32; i++)
755 fprintf( stderr, ",q%u=", i );
756 dump_uint64( "", &ctx.fp.arm64_regs.q[i].high );
757 dump_uint64( "", &ctx.fp.arm64_regs.q[i].low );
759 fprintf( stderr, ",fpcr=%08x,fpsr=%08x", ctx.fp.arm64_regs.fpcr, ctx.fp.arm64_regs.fpsr );
761 break;
763 fputc( '}', stderr );
764 remove_data( size );
767 static void dump_varargs_debug_event( const char *prefix, data_size_t size )
769 debug_event_t event;
770 unsigned int i;
772 if (!size)
774 fprintf( stderr, "%s{}", prefix );
775 return;
777 size = min( size, sizeof(event) );
778 memset( &event, 0, sizeof(event) );
779 memcpy( &event, cur_data, size );
781 switch(event.code)
783 case DbgIdle:
784 fprintf( stderr, "%s{idle}", prefix );
785 break;
786 case DbgReplyPending:
787 fprintf( stderr, "%s{pending}", prefix );
788 break;
789 case DbgCreateThreadStateChange:
790 fprintf( stderr, "%s{create_thread,thread=%04x", prefix, event.create_thread.handle );
791 dump_uint64( ",start=", &event.create_thread.start );
792 fputc( '}', stderr );
793 break;
794 case DbgCreateProcessStateChange:
795 fprintf( stderr, "%s{create_process,file=%04x,process=%04x,thread=%04x", prefix,
796 event.create_process.file, event.create_process.process,
797 event.create_process.thread );
798 dump_uint64( ",base=", &event.create_process.base );
799 fprintf( stderr, ",offset=%d,size=%d",
800 event.create_process.dbg_offset, event.create_process.dbg_size );
801 dump_uint64( ",start=", &event.create_process.start );
802 fputc( '}', stderr );
803 break;
804 case DbgExitThreadStateChange:
805 fprintf( stderr, "%s{exit_thread,code=%d}", prefix, event.exit.exit_code );
806 break;
807 case DbgExitProcessStateChange:
808 fprintf( stderr, "%s{exit_process,code=%d}", prefix, event.exit.exit_code );
809 break;
810 case DbgExceptionStateChange:
811 case DbgBreakpointStateChange:
812 case DbgSingleStepStateChange:
813 fprintf( stderr, "%s{%s,first=%d,exc_code=%08x,flags=%08x", prefix,
814 event.code == DbgBreakpointStateChange ? "breakpoint" :
815 event.code == DbgSingleStepStateChange ? "singlestep" : "exception",
816 event.exception.first, event.exception.exc_code, event.exception.flags );
817 dump_uint64( ",record=", &event.exception.record );
818 dump_uint64( ",address=", &event.exception.address );
819 fprintf( stderr, ",params={" );
820 event.exception.nb_params = min( event.exception.nb_params, EXCEPTION_MAXIMUM_PARAMETERS );
821 for (i = 0; i < event.exception.nb_params; i++)
823 dump_uint64( "", &event.exception.params[i] );
824 if (i < event.exception.nb_params) fputc( ',', stderr );
826 fprintf( stderr, "}}" );
827 break;
828 case DbgLoadDllStateChange:
829 fprintf( stderr, "%s{load_dll,file=%04x", prefix, event.load_dll.handle );
830 dump_uint64( ",base=", &event.load_dll.base );
831 fprintf( stderr, ",offset=%d,size=%d",
832 event.load_dll.dbg_offset, event.load_dll.dbg_size );
833 dump_uint64( ",name=", &event.load_dll.name );
834 fputc( '}', stderr );
835 break;
836 case DbgUnloadDllStateChange:
837 fprintf( stderr, "%s{unload_dll", prefix );
838 dump_uint64( ",base=", &event.unload_dll.base );
839 fputc( '}', stderr );
840 break;
841 default:
842 fprintf( stderr, "%s{code=??? (%d)}", prefix, event.code );
843 break;
845 remove_data( size );
848 /* dump a unicode string contained in a buffer; helper for dump_varargs_startup_info */
849 static data_size_t dump_inline_unicode_string( const char *prefix, data_size_t pos, data_size_t len, data_size_t total_size )
851 fputs( prefix, stderr );
852 if (pos >= total_size) return pos;
853 if (len > total_size - pos) len = total_size - pos;
854 dump_strW( (const WCHAR *)cur_data + pos/sizeof(WCHAR), len, stderr, "\"\"" );
855 return pos + (len / sizeof(WCHAR)) * sizeof(WCHAR);
858 static void dump_varargs_startup_info( const char *prefix, data_size_t size )
860 startup_info_t info;
861 data_size_t pos = sizeof(info);
863 memset( &info, 0, sizeof(info) );
864 memcpy( &info, cur_data, min( size, sizeof(info) ));
866 fprintf( stderr,
867 "%s{debug_flags=%x,console_flags=%x,console=%04x,hstdin=%04x,hstdout=%04x,hstderr=%04x,"
868 "x=%u,y=%u,xsize=%u,ysize=%u,xchars=%u,ychars=%u,attribute=%02x,flags=%x,show=%u",
869 prefix, info.debug_flags, info.console_flags, info.console,
870 info.hstdin, info.hstdout, info.hstderr, info.x, info.y, info.xsize, info.ysize,
871 info.xchars, info.ychars, info.attribute, info.flags, info.show );
872 pos = dump_inline_unicode_string( ",curdir=L\"", pos, info.curdir_len, size );
873 pos = dump_inline_unicode_string( "\",dllpath=L\"", pos, info.dllpath_len, size );
874 pos = dump_inline_unicode_string( "\",imagepath=L\"", pos, info.imagepath_len, size );
875 pos = dump_inline_unicode_string( "\",cmdline=L\"", pos, info.cmdline_len, size );
876 pos = dump_inline_unicode_string( "\",title=L\"", pos, info.title_len, size );
877 pos = dump_inline_unicode_string( "\",desktop=L\"", pos, info.desktop_len, size );
878 pos = dump_inline_unicode_string( "\",shellinfo=L\"", pos, info.shellinfo_len, size );
879 pos = dump_inline_unicode_string( "\",runtime=L\"", pos, info.runtime_len, size );
880 fprintf( stderr, "\"}" );
881 remove_data( size );
884 static void dump_varargs_rectangles( const char *prefix, data_size_t size )
886 const rectangle_t *rect = cur_data;
887 data_size_t len = size / sizeof(*rect);
889 fprintf( stderr,"%s{", prefix );
890 while (len > 0)
892 dump_rectangle( "", rect++ );
893 if (--len) fputc( ',', stderr );
895 fputc( '}', stderr );
896 remove_data( size );
899 static void dump_varargs_cursor_positions( const char *prefix, data_size_t size )
901 const cursor_pos_t *pos = cur_data;
902 data_size_t len = size / sizeof(*pos);
904 fprintf( stderr, "%s{", prefix );
905 while (len > 0)
907 fprintf( stderr, "{x=%d,y=%d,time=%u", pos->x, pos->y, pos->time );
908 dump_uint64( ",info=", &pos->info );
909 fputc( '}', stderr );
910 pos++;
911 if (--len) fputc( ',', stderr );
913 fputc( '}', stderr );
914 remove_data( size );
917 static void dump_varargs_message_data( const char *prefix, data_size_t size )
919 /* FIXME: dump the structured data */
920 dump_varargs_bytes( prefix, size );
923 static void dump_varargs_properties( const char *prefix, data_size_t size )
925 const property_data_t *prop = cur_data;
926 data_size_t len = size / sizeof(*prop);
928 fprintf( stderr,"%s{", prefix );
929 while (len > 0)
931 fprintf( stderr, "{atom=%04x,str=%d", prop->atom, prop->string );
932 dump_uint64( ",data=", &prop->data );
933 fputc( '}', stderr );
934 prop++;
935 if (--len) fputc( ',', stderr );
937 fputc( '}', stderr );
938 remove_data( size );
941 static void dump_varargs_LUID_AND_ATTRIBUTES( const char *prefix, data_size_t size )
943 const LUID_AND_ATTRIBUTES *lat = cur_data;
944 data_size_t len = size / sizeof(*lat);
946 fprintf( stderr,"%s{", prefix );
947 while (len > 0)
949 fprintf( stderr, "{luid=%08x%08x,attr=%x}",
950 lat->Luid.HighPart, lat->Luid.LowPart, lat->Attributes );
951 lat++;
952 if (--len) fputc( ',', stderr );
954 fputc( '}', stderr );
955 remove_data( size );
958 static void dump_inline_sid( const char *prefix, const SID *sid, data_size_t size )
960 DWORD i;
962 /* security check */
963 if ((FIELD_OFFSET(SID, SubAuthority[0]) > size) ||
964 (FIELD_OFFSET(SID, SubAuthority[sid->SubAuthorityCount]) > size))
966 fprintf( stderr, "<invalid sid>" );
967 return;
970 fprintf( stderr,"%s{", prefix );
971 fprintf( stderr, "S-%u-%u", sid->Revision, MAKELONG(
972 MAKEWORD( sid->IdentifierAuthority.Value[5],
973 sid->IdentifierAuthority.Value[4] ),
974 MAKEWORD( sid->IdentifierAuthority.Value[3],
975 sid->IdentifierAuthority.Value[2] ) ) );
976 for (i = 0; i < sid->SubAuthorityCount; i++)
977 fprintf( stderr, "-%u", sid->SubAuthority[i] );
978 fputc( '}', stderr );
981 static void dump_varargs_SID( const char *prefix, data_size_t size )
983 const SID *sid = cur_data;
984 dump_inline_sid( prefix, sid, size );
985 remove_data( size );
988 static void dump_inline_acl( const char *prefix, const ACL *acl, data_size_t size )
990 const ACE_HEADER *ace;
991 ULONG i;
993 fprintf( stderr,"%s{", prefix );
994 if (size)
996 if (size < sizeof(ACL))
998 fprintf( stderr, "<invalid acl>}" );
999 return;
1001 size -= sizeof(ACL);
1002 ace = (const ACE_HEADER *)(acl + 1);
1003 for (i = 0; i < acl->AceCount; i++)
1005 const SID *sid = NULL;
1006 data_size_t sid_size = 0;
1008 if (size < sizeof(ACE_HEADER) || size < ace->AceSize) break;
1009 size -= ace->AceSize;
1010 if (i != 0) fputc( ',', stderr );
1011 fprintf( stderr, "{AceType=" );
1012 switch (ace->AceType)
1014 case ACCESS_DENIED_ACE_TYPE:
1015 sid = (const SID *)&((const ACCESS_DENIED_ACE *)ace)->SidStart;
1016 sid_size = ace->AceSize - FIELD_OFFSET(ACCESS_DENIED_ACE, SidStart);
1017 fprintf( stderr, "ACCESS_DENIED_ACE_TYPE,Mask=%x",
1018 ((const ACCESS_DENIED_ACE *)ace)->Mask );
1019 break;
1020 case ACCESS_ALLOWED_ACE_TYPE:
1021 sid = (const SID *)&((const ACCESS_ALLOWED_ACE *)ace)->SidStart;
1022 sid_size = ace->AceSize - FIELD_OFFSET(ACCESS_ALLOWED_ACE, SidStart);
1023 fprintf( stderr, "ACCESS_ALLOWED_ACE_TYPE,Mask=%x",
1024 ((const ACCESS_ALLOWED_ACE *)ace)->Mask );
1025 break;
1026 case SYSTEM_AUDIT_ACE_TYPE:
1027 sid = (const SID *)&((const SYSTEM_AUDIT_ACE *)ace)->SidStart;
1028 sid_size = ace->AceSize - FIELD_OFFSET(SYSTEM_AUDIT_ACE, SidStart);
1029 fprintf( stderr, "SYSTEM_AUDIT_ACE_TYPE,Mask=%x",
1030 ((const SYSTEM_AUDIT_ACE *)ace)->Mask );
1031 break;
1032 case SYSTEM_ALARM_ACE_TYPE:
1033 sid = (const SID *)&((const SYSTEM_ALARM_ACE *)ace)->SidStart;
1034 sid_size = ace->AceSize - FIELD_OFFSET(SYSTEM_ALARM_ACE, SidStart);
1035 fprintf( stderr, "SYSTEM_ALARM_ACE_TYPE,Mask=%x",
1036 ((const SYSTEM_ALARM_ACE *)ace)->Mask );
1037 break;
1038 case SYSTEM_MANDATORY_LABEL_ACE_TYPE:
1039 sid = (const SID *)&((const SYSTEM_MANDATORY_LABEL_ACE *)ace)->SidStart;
1040 sid_size = ace->AceSize - FIELD_OFFSET(SYSTEM_MANDATORY_LABEL_ACE, SidStart);
1041 fprintf( stderr, "SYSTEM_MANDATORY_LABEL_ACE_TYPE,Mask=%x",
1042 ((const SYSTEM_MANDATORY_LABEL_ACE *)ace)->Mask );
1043 break;
1044 default:
1045 fprintf( stderr, "unknown<%d>", ace->AceType );
1046 break;
1048 fprintf( stderr, ",AceFlags=%x", ace->AceFlags );
1049 if (sid)
1050 dump_inline_sid( ",Sid=", sid, sid_size );
1051 ace = (const ACE_HEADER *)((const char *)ace + ace->AceSize);
1052 fputc( '}', stderr );
1055 fputc( '}', stderr );
1058 static void dump_varargs_ACL( const char *prefix, data_size_t size )
1060 const ACL *acl = cur_data;
1061 dump_inline_acl( prefix, acl, size );
1062 remove_data( size );
1065 static void dump_inline_security_descriptor( const char *prefix, const struct security_descriptor *sd, data_size_t size )
1067 fprintf( stderr,"%s{", prefix );
1068 if (size >= sizeof(struct security_descriptor))
1070 size_t offset = sizeof(struct security_descriptor);
1071 fprintf( stderr, "control=%08x", sd->control );
1072 if ((sd->owner_len > FIELD_OFFSET(SID, SubAuthority[255])) || (offset + sd->owner_len > size))
1073 return;
1074 if (sd->owner_len)
1075 dump_inline_sid( ",owner=", (const SID *)((const char *)sd + offset), sd->owner_len );
1076 else
1077 fprintf( stderr, ",owner=<not present>" );
1078 offset += sd->owner_len;
1079 if ((sd->group_len > FIELD_OFFSET(SID, SubAuthority[255])) || (offset + sd->group_len > size))
1080 return;
1081 if (sd->group_len)
1082 dump_inline_sid( ",group=", (const SID *)((const char *)sd + offset), sd->group_len );
1083 else
1084 fprintf( stderr, ",group=<not present>" );
1085 offset += sd->group_len;
1086 if ((sd->sacl_len >= MAX_ACL_LEN) || (offset + sd->sacl_len > size))
1087 return;
1088 dump_inline_acl( ",sacl=", (const ACL *)((const char *)sd + offset), sd->sacl_len );
1089 offset += sd->sacl_len;
1090 if ((sd->dacl_len >= MAX_ACL_LEN) || (offset + sd->dacl_len > size))
1091 return;
1092 dump_inline_acl( ",dacl=", (const ACL *)((const char *)sd + offset), sd->dacl_len );
1093 offset += sd->dacl_len;
1095 fputc( '}', stderr );
1098 static void dump_varargs_security_descriptor( const char *prefix, data_size_t size )
1100 const struct security_descriptor *sd = cur_data;
1101 dump_inline_security_descriptor( prefix, sd, size );
1102 remove_data( size );
1105 static void dump_varargs_token_groups( const char *prefix, data_size_t size )
1107 const struct token_groups *tg = cur_data;
1109 fprintf( stderr,"%s{", prefix );
1110 if (size >= sizeof(struct token_groups))
1112 size_t offset = sizeof(*tg);
1113 fprintf( stderr, "count=%08x,", tg->count );
1114 if (tg->count * sizeof(unsigned int) <= size)
1116 unsigned int i;
1117 const unsigned int *attr = (const unsigned int *)(tg + 1);
1119 offset += tg->count * sizeof(unsigned int);
1121 fputc( '[', stderr );
1122 for (i = 0; i < tg->count; i++)
1124 const SID *sid = (const SID *)((const char *)cur_data + offset);
1125 if (i != 0)
1126 fputc( ',', stderr );
1127 fputc( '{', stderr );
1128 fprintf( stderr, "attributes=%08x", attr[i] );
1129 dump_inline_sid( ",sid=", sid, size - offset );
1130 if ((offset + FIELD_OFFSET(SID, SubAuthority[0]) > size) ||
1131 (offset + FIELD_OFFSET(SID, SubAuthority[sid->SubAuthorityCount]) > size))
1132 break;
1133 offset += FIELD_OFFSET(SID, SubAuthority[sid->SubAuthorityCount]);
1134 fputc( '}', stderr );
1136 fputc( ']', stderr );
1139 fputc( '}', stderr );
1142 static void dump_varargs_process_info( const char *prefix, data_size_t size )
1144 data_size_t pos = 0;
1145 unsigned int i;
1147 fprintf( stderr,"%s{", prefix );
1149 while (size - pos >= sizeof(struct process_info))
1151 const struct process_info *process;
1152 pos = (pos + 7) & ~7;
1153 process = (const struct process_info *)((const char *)cur_data + pos);
1154 if (size - pos < sizeof(*process)) break;
1155 if (pos) fputc( ',', stderr );
1156 dump_timeout( "{start_time=", &process->start_time );
1157 fprintf( stderr, ",thread_count=%u,priority=%d,pid=%04x,parent_pid=%04x,handle_count=%u,unix_pid=%d,",
1158 process->thread_count, process->priority, process->pid,
1159 process->parent_pid, process->handle_count, process->unix_pid );
1160 pos += sizeof(*process);
1162 pos = dump_inline_unicode_string( "name=L\"", pos, process->name_len, size );
1164 pos = (pos + 7) & ~7;
1165 fprintf( stderr, "\",threads={" );
1166 for (i = 0; i < process->thread_count; i++)
1168 const struct thread_info *thread = (const struct thread_info *)((const char *)cur_data + pos);
1169 if (size - pos < sizeof(*thread)) break;
1170 if (i) fputc( ',', stderr );
1171 dump_timeout( "{start_time=", &thread->start_time );
1172 fprintf( stderr, ",tid=%04x,base_priority=%d,current_priority=%d,unix_tid=%d}",
1173 thread->tid, thread->base_priority, thread->current_priority, thread->unix_tid );
1174 pos += sizeof(*thread);
1176 fprintf( stderr, "}}" );
1178 fputc( '}', stderr );
1179 remove_data( size );
1182 static void dump_varargs_object_attributes( const char *prefix, data_size_t size )
1184 const struct object_attributes *objattr = cur_data;
1186 fprintf( stderr,"%s{", prefix );
1187 if (size)
1189 const WCHAR *str;
1191 if (size < sizeof(*objattr) ||
1192 (size - sizeof(*objattr) < objattr->sd_len) ||
1193 (size - sizeof(*objattr) - objattr->sd_len < objattr->name_len))
1195 fprintf( stderr, "***invalid***}" );
1196 remove_data( size );
1197 return;
1200 fprintf( stderr, "rootdir=%04x,attributes=%08x", objattr->rootdir, objattr->attributes );
1201 dump_inline_security_descriptor( ",sd=", (const struct security_descriptor *)(objattr + 1), objattr->sd_len );
1202 str = (const WCHAR *)objattr + (sizeof(*objattr) + objattr->sd_len) / sizeof(WCHAR);
1203 fprintf( stderr, ",name=L\"" );
1204 dump_strW( str, objattr->name_len, stderr, "\"\"" );
1205 fputc( '\"', stderr );
1206 remove_data( (sizeof(*objattr) + (objattr->sd_len & ~1) + (objattr->name_len & ~1) + 3) & ~3 );
1208 fputc( '}', stderr );
1211 static void dump_varargs_filesystem_event( const char *prefix, data_size_t size )
1213 static const char * const actions[] = {
1214 NULL,
1215 "ADDED",
1216 "REMOVED",
1217 "MODIFIED",
1218 "RENAMED_OLD_NAME",
1219 "RENAMED_NEW_NAME",
1220 "ADDED_STREAM",
1221 "REMOVED_STREAM",
1222 "MODIFIED_STREAM"
1225 fprintf( stderr,"%s{", prefix );
1226 while (size)
1228 const struct filesystem_event *event = cur_data;
1229 data_size_t len = (offsetof( struct filesystem_event, name[event->len] ) + sizeof(int)-1)
1230 / sizeof(int) * sizeof(int);
1231 if (size < len) break;
1232 if (event->action < ARRAY_SIZE( actions ) && actions[event->action])
1233 fprintf( stderr, "{action=%s", actions[event->action] );
1234 else
1235 fprintf( stderr, "{action=%u", event->action );
1236 fprintf( stderr, ",name=\"%.*s\"}", event->len, event->name );
1237 size -= len;
1238 remove_data( len );
1239 if (size)fputc( ',', stderr );
1241 fputc( '}', stderr );
1244 static void dump_varargs_pe_image_info( const char *prefix, data_size_t size )
1246 pe_image_info_t info;
1248 if (!size)
1250 fprintf( stderr, "%s{}", prefix );
1251 return;
1253 memset( &info, 0, sizeof(info) );
1254 memcpy( &info, cur_data, min( size, sizeof(info) ));
1256 fprintf( stderr, "%s{", prefix );
1257 dump_uint64( "base=", &info.base );
1258 dump_uint64( ",entry_point=", &info.entry_point );
1259 dump_uint64( ",map_size=", &info.map_size );
1260 dump_uint64( ",stack_size=", &info.stack_size );
1261 dump_uint64( ",stack_commit=", &info.stack_commit );
1262 fprintf( stderr, ",zerobits=%08x,subsystem=%08x,subsystem_minor=%04x,subsystem_major=%04x"
1263 ",osversion_major=%04x,osversion_minor=%04x,image_charact=%04x,dll_charact=%04x,machine=%04x"
1264 ",contains_code=%u,image_flags=%02x"
1265 ",loader_flags=%08x,header_size=%08x,file_size=%08x,checksum=%08x",
1266 info.zerobits, info.subsystem, info.subsystem_minor, info.subsystem_major,
1267 info.osversion_major, info.osversion_minor, info.image_charact, info.dll_charact,
1268 info.machine, info.contains_code, info.image_flags, info.loader_flags,
1269 info.header_size, info.file_size, info.checksum );
1270 dump_client_cpu( ",cpu=", &info.cpu );
1271 fputc( '}', stderr );
1272 remove_data( size );
1275 static void dump_varargs_rawinput_devices(const char *prefix, data_size_t size )
1277 const struct rawinput_device *device;
1279 fprintf( stderr, "%s{", prefix );
1280 while (size >= sizeof(*device))
1282 device = cur_data;
1283 fprintf( stderr, "{usage_page=%04x,usage=%04x,flags=%08x,target=%08x}",
1284 device->usage_page, device->usage, device->flags, device->target );
1285 size -= sizeof(*device);
1286 remove_data( sizeof(*device) );
1287 if (size) fputc( ',', stderr );
1289 fputc( '}', stderr );
1292 static void dump_varargs_handle_infos( const char *prefix, data_size_t size )
1294 const struct handle_info *handle;
1296 fprintf( stderr, "%s{", prefix );
1297 while (size >= sizeof(*handle))
1299 handle = cur_data;
1300 fprintf( stderr, "{owner=%04x,handle=%04x,access=%08x}",
1301 handle->owner, handle->handle, handle->access );
1302 size -= sizeof(*handle);
1303 remove_data( sizeof(*handle) );
1304 if (size) fputc( ',', stderr );
1306 fputc( '}', stderr );
1309 typedef void (*dump_func)( const void *req );
1311 /* Everything below this line is generated automatically by tools/make_requests */
1312 /* ### make_requests begin ### */
1314 static void dump_new_process_request( const struct new_process_request *req )
1316 fprintf( stderr, " token=%04x", req->token );
1317 fprintf( stderr, ", debug=%04x", req->debug );
1318 fprintf( stderr, ", parent_process=%04x", req->parent_process );
1319 fprintf( stderr, ", inherit_all=%d", req->inherit_all );
1320 fprintf( stderr, ", create_flags=%08x", req->create_flags );
1321 fprintf( stderr, ", socket_fd=%d", req->socket_fd );
1322 fprintf( stderr, ", access=%08x", req->access );
1323 dump_client_cpu( ", cpu=", &req->cpu );
1324 fprintf( stderr, ", info_size=%u", req->info_size );
1325 fprintf( stderr, ", handles_size=%u", req->handles_size );
1326 dump_varargs_object_attributes( ", objattr=", cur_size );
1327 dump_varargs_uints( ", handles=", min(cur_size,req->handles_size) );
1328 dump_varargs_startup_info( ", info=", min(cur_size,req->info_size) );
1329 dump_varargs_unicode_str( ", env=", cur_size );
1332 static void dump_new_process_reply( const struct new_process_reply *req )
1334 fprintf( stderr, " info=%04x", req->info );
1335 fprintf( stderr, ", pid=%04x", req->pid );
1336 fprintf( stderr, ", handle=%04x", req->handle );
1339 static void dump_exec_process_request( const struct exec_process_request *req )
1341 fprintf( stderr, " socket_fd=%d", req->socket_fd );
1342 dump_client_cpu( ", cpu=", &req->cpu );
1345 static void dump_get_new_process_info_request( const struct get_new_process_info_request *req )
1347 fprintf( stderr, " info=%04x", req->info );
1350 static void dump_get_new_process_info_reply( const struct get_new_process_info_reply *req )
1352 fprintf( stderr, " success=%d", req->success );
1353 fprintf( stderr, ", exit_code=%d", req->exit_code );
1356 static void dump_new_thread_request( const struct new_thread_request *req )
1358 fprintf( stderr, " process=%04x", req->process );
1359 fprintf( stderr, ", access=%08x", req->access );
1360 fprintf( stderr, ", suspend=%d", req->suspend );
1361 fprintf( stderr, ", request_fd=%d", req->request_fd );
1362 dump_varargs_object_attributes( ", objattr=", cur_size );
1365 static void dump_new_thread_reply( const struct new_thread_reply *req )
1367 fprintf( stderr, " tid=%04x", req->tid );
1368 fprintf( stderr, ", handle=%04x", req->handle );
1371 static void dump_get_startup_info_request( const struct get_startup_info_request *req )
1375 static void dump_get_startup_info_reply( const struct get_startup_info_reply *req )
1377 fprintf( stderr, " info_size=%u", req->info_size );
1378 dump_varargs_startup_info( ", info=", min(cur_size,req->info_size) );
1379 dump_varargs_unicode_str( ", env=", cur_size );
1382 static void dump_init_process_done_request( const struct init_process_done_request *req )
1384 fprintf( stderr, " gui=%d", req->gui );
1385 dump_uint64( ", module=", &req->module );
1386 dump_uint64( ", entry=", &req->entry );
1389 static void dump_init_process_done_reply( const struct init_process_done_reply *req )
1391 fprintf( stderr, " suspend=%d", req->suspend );
1394 static void dump_init_first_thread_request( const struct init_first_thread_request *req )
1396 fprintf( stderr, " unix_pid=%d", req->unix_pid );
1397 fprintf( stderr, ", unix_tid=%d", req->unix_tid );
1398 fprintf( stderr, ", debug_level=%d", req->debug_level );
1399 dump_uint64( ", teb=", &req->teb );
1400 dump_uint64( ", peb=", &req->peb );
1401 dump_uint64( ", ldt_copy=", &req->ldt_copy );
1402 fprintf( stderr, ", reply_fd=%d", req->reply_fd );
1403 fprintf( stderr, ", wait_fd=%d", req->wait_fd );
1404 dump_client_cpu( ", cpu=", &req->cpu );
1407 static void dump_init_first_thread_reply( const struct init_first_thread_reply *req )
1409 fprintf( stderr, " pid=%04x", req->pid );
1410 fprintf( stderr, ", tid=%04x", req->tid );
1411 dump_timeout( ", server_start=", &req->server_start );
1412 fprintf( stderr, ", info_size=%u", req->info_size );
1413 fprintf( stderr, ", all_cpus=%08x", req->all_cpus );
1416 static void dump_init_thread_request( const struct init_thread_request *req )
1418 fprintf( stderr, " unix_tid=%d", req->unix_tid );
1419 fprintf( stderr, ", reply_fd=%d", req->reply_fd );
1420 fprintf( stderr, ", wait_fd=%d", req->wait_fd );
1421 dump_uint64( ", teb=", &req->teb );
1422 dump_uint64( ", entry=", &req->entry );
1425 static void dump_init_thread_reply( const struct init_thread_reply *req )
1427 fprintf( stderr, " pid=%04x", req->pid );
1428 fprintf( stderr, ", tid=%04x", req->tid );
1429 fprintf( stderr, ", suspend=%d", req->suspend );
1432 static void dump_terminate_process_request( const struct terminate_process_request *req )
1434 fprintf( stderr, " handle=%04x", req->handle );
1435 fprintf( stderr, ", exit_code=%d", req->exit_code );
1438 static void dump_terminate_process_reply( const struct terminate_process_reply *req )
1440 fprintf( stderr, " self=%d", req->self );
1443 static void dump_terminate_thread_request( const struct terminate_thread_request *req )
1445 fprintf( stderr, " handle=%04x", req->handle );
1446 fprintf( stderr, ", exit_code=%d", req->exit_code );
1449 static void dump_terminate_thread_reply( const struct terminate_thread_reply *req )
1451 fprintf( stderr, " self=%d", req->self );
1454 static void dump_get_process_info_request( const struct get_process_info_request *req )
1456 fprintf( stderr, " handle=%04x", req->handle );
1459 static void dump_get_process_info_reply( const struct get_process_info_reply *req )
1461 fprintf( stderr, " pid=%04x", req->pid );
1462 fprintf( stderr, ", ppid=%04x", req->ppid );
1463 dump_uint64( ", affinity=", &req->affinity );
1464 dump_uint64( ", peb=", &req->peb );
1465 dump_timeout( ", start_time=", &req->start_time );
1466 dump_timeout( ", end_time=", &req->end_time );
1467 fprintf( stderr, ", exit_code=%d", req->exit_code );
1468 fprintf( stderr, ", priority=%d", req->priority );
1469 dump_client_cpu( ", cpu=", &req->cpu );
1470 fprintf( stderr, ", debugger_present=%d", req->debugger_present );
1471 fprintf( stderr, ", debug_children=%d", req->debug_children );
1472 dump_varargs_pe_image_info( ", image=", cur_size );
1475 static void dump_get_process_vm_counters_request( const struct get_process_vm_counters_request *req )
1477 fprintf( stderr, " handle=%04x", req->handle );
1480 static void dump_get_process_vm_counters_reply( const struct get_process_vm_counters_reply *req )
1482 dump_uint64( " peak_virtual_size=", &req->peak_virtual_size );
1483 dump_uint64( ", virtual_size=", &req->virtual_size );
1484 dump_uint64( ", peak_working_set_size=", &req->peak_working_set_size );
1485 dump_uint64( ", working_set_size=", &req->working_set_size );
1486 dump_uint64( ", pagefile_usage=", &req->pagefile_usage );
1487 dump_uint64( ", peak_pagefile_usage=", &req->peak_pagefile_usage );
1490 static void dump_set_process_info_request( const struct set_process_info_request *req )
1492 fprintf( stderr, " handle=%04x", req->handle );
1493 fprintf( stderr, ", mask=%d", req->mask );
1494 fprintf( stderr, ", priority=%d", req->priority );
1495 dump_uint64( ", affinity=", &req->affinity );
1498 static void dump_get_thread_info_request( const struct get_thread_info_request *req )
1500 fprintf( stderr, " handle=%04x", req->handle );
1501 fprintf( stderr, ", access=%08x", req->access );
1504 static void dump_get_thread_info_reply( const struct get_thread_info_reply *req )
1506 fprintf( stderr, " pid=%04x", req->pid );
1507 fprintf( stderr, ", tid=%04x", req->tid );
1508 dump_uint64( ", teb=", &req->teb );
1509 dump_uint64( ", entry_point=", &req->entry_point );
1510 dump_uint64( ", affinity=", &req->affinity );
1511 fprintf( stderr, ", exit_code=%d", req->exit_code );
1512 fprintf( stderr, ", priority=%d", req->priority );
1513 fprintf( stderr, ", last=%d", req->last );
1514 fprintf( stderr, ", suspend_count=%d", req->suspend_count );
1515 fprintf( stderr, ", dbg_hidden=%d", req->dbg_hidden );
1516 fprintf( stderr, ", desc_len=%u", req->desc_len );
1517 dump_varargs_unicode_str( ", desc=", cur_size );
1520 static void dump_get_thread_times_request( const struct get_thread_times_request *req )
1522 fprintf( stderr, " handle=%04x", req->handle );
1525 static void dump_get_thread_times_reply( const struct get_thread_times_reply *req )
1527 dump_timeout( " creation_time=", &req->creation_time );
1528 dump_timeout( ", exit_time=", &req->exit_time );
1529 fprintf( stderr, ", unix_pid=%d", req->unix_pid );
1530 fprintf( stderr, ", unix_tid=%d", req->unix_tid );
1533 static void dump_set_thread_info_request( const struct set_thread_info_request *req )
1535 fprintf( stderr, " handle=%04x", req->handle );
1536 fprintf( stderr, ", mask=%d", req->mask );
1537 fprintf( stderr, ", priority=%d", req->priority );
1538 dump_uint64( ", affinity=", &req->affinity );
1539 dump_uint64( ", entry_point=", &req->entry_point );
1540 fprintf( stderr, ", token=%04x", req->token );
1541 dump_varargs_unicode_str( ", desc=", cur_size );
1544 static void dump_get_dll_info_request( const struct get_dll_info_request *req )
1546 fprintf( stderr, " handle=%04x", req->handle );
1547 dump_uint64( ", base_address=", &req->base_address );
1550 static void dump_get_dll_info_reply( const struct get_dll_info_reply *req )
1552 dump_uint64( " entry_point=", &req->entry_point );
1553 fprintf( stderr, ", filename_len=%u", req->filename_len );
1554 dump_varargs_unicode_str( ", filename=", cur_size );
1557 static void dump_suspend_thread_request( const struct suspend_thread_request *req )
1559 fprintf( stderr, " handle=%04x", req->handle );
1562 static void dump_suspend_thread_reply( const struct suspend_thread_reply *req )
1564 fprintf( stderr, " count=%d", req->count );
1567 static void dump_resume_thread_request( const struct resume_thread_request *req )
1569 fprintf( stderr, " handle=%04x", req->handle );
1572 static void dump_resume_thread_reply( const struct resume_thread_reply *req )
1574 fprintf( stderr, " count=%d", req->count );
1577 static void dump_load_dll_request( const struct load_dll_request *req )
1579 dump_uint64( " base=", &req->base );
1580 dump_uint64( ", name=", &req->name );
1581 dump_varargs_unicode_str( ", filename=", cur_size );
1584 static void dump_unload_dll_request( const struct unload_dll_request *req )
1586 dump_uint64( " base=", &req->base );
1589 static void dump_queue_apc_request( const struct queue_apc_request *req )
1591 fprintf( stderr, " handle=%04x", req->handle );
1592 dump_apc_call( ", call=", &req->call );
1595 static void dump_queue_apc_reply( const struct queue_apc_reply *req )
1597 fprintf( stderr, " handle=%04x", req->handle );
1598 fprintf( stderr, ", self=%d", req->self );
1601 static void dump_get_apc_result_request( const struct get_apc_result_request *req )
1603 fprintf( stderr, " handle=%04x", req->handle );
1606 static void dump_get_apc_result_reply( const struct get_apc_result_reply *req )
1608 dump_apc_result( " result=", &req->result );
1611 static void dump_close_handle_request( const struct close_handle_request *req )
1613 fprintf( stderr, " handle=%04x", req->handle );
1616 static void dump_set_handle_info_request( const struct set_handle_info_request *req )
1618 fprintf( stderr, " handle=%04x", req->handle );
1619 fprintf( stderr, ", flags=%d", req->flags );
1620 fprintf( stderr, ", mask=%d", req->mask );
1623 static void dump_set_handle_info_reply( const struct set_handle_info_reply *req )
1625 fprintf( stderr, " old_flags=%d", req->old_flags );
1628 static void dump_dup_handle_request( const struct dup_handle_request *req )
1630 fprintf( stderr, " src_process=%04x", req->src_process );
1631 fprintf( stderr, ", src_handle=%04x", req->src_handle );
1632 fprintf( stderr, ", dst_process=%04x", req->dst_process );
1633 fprintf( stderr, ", access=%08x", req->access );
1634 fprintf( stderr, ", attributes=%08x", req->attributes );
1635 fprintf( stderr, ", options=%08x", req->options );
1638 static void dump_dup_handle_reply( const struct dup_handle_reply *req )
1640 fprintf( stderr, " handle=%04x", req->handle );
1641 fprintf( stderr, ", self=%d", req->self );
1642 fprintf( stderr, ", closed=%d", req->closed );
1645 static void dump_make_temporary_request( const struct make_temporary_request *req )
1647 fprintf( stderr, " handle=%04x", req->handle );
1650 static void dump_open_process_request( const struct open_process_request *req )
1652 fprintf( stderr, " pid=%04x", req->pid );
1653 fprintf( stderr, ", access=%08x", req->access );
1654 fprintf( stderr, ", attributes=%08x", req->attributes );
1657 static void dump_open_process_reply( const struct open_process_reply *req )
1659 fprintf( stderr, " handle=%04x", req->handle );
1662 static void dump_open_thread_request( const struct open_thread_request *req )
1664 fprintf( stderr, " tid=%04x", req->tid );
1665 fprintf( stderr, ", access=%08x", req->access );
1666 fprintf( stderr, ", attributes=%08x", req->attributes );
1669 static void dump_open_thread_reply( const struct open_thread_reply *req )
1671 fprintf( stderr, " handle=%04x", req->handle );
1674 static void dump_select_request( const struct select_request *req )
1676 fprintf( stderr, " flags=%d", req->flags );
1677 dump_uint64( ", cookie=", &req->cookie );
1678 dump_abstime( ", timeout=", &req->timeout );
1679 fprintf( stderr, ", size=%u", req->size );
1680 fprintf( stderr, ", prev_apc=%04x", req->prev_apc );
1681 dump_varargs_apc_result( ", result=", cur_size );
1682 dump_varargs_select_op( ", data=", min(cur_size,req->size) );
1683 dump_varargs_context( ", context=", cur_size );
1686 static void dump_select_reply( const struct select_reply *req )
1688 dump_apc_call( " call=", &req->call );
1689 fprintf( stderr, ", apc_handle=%04x", req->apc_handle );
1690 dump_varargs_context( ", context=", cur_size );
1693 static void dump_create_event_request( const struct create_event_request *req )
1695 fprintf( stderr, " access=%08x", req->access );
1696 fprintf( stderr, ", manual_reset=%d", req->manual_reset );
1697 fprintf( stderr, ", initial_state=%d", req->initial_state );
1698 dump_varargs_object_attributes( ", objattr=", cur_size );
1701 static void dump_create_event_reply( const struct create_event_reply *req )
1703 fprintf( stderr, " handle=%04x", req->handle );
1706 static void dump_event_op_request( const struct event_op_request *req )
1708 fprintf( stderr, " handle=%04x", req->handle );
1709 fprintf( stderr, ", op=%d", req->op );
1712 static void dump_event_op_reply( const struct event_op_reply *req )
1714 fprintf( stderr, " state=%d", req->state );
1717 static void dump_query_event_request( const struct query_event_request *req )
1719 fprintf( stderr, " handle=%04x", req->handle );
1722 static void dump_query_event_reply( const struct query_event_reply *req )
1724 fprintf( stderr, " manual_reset=%d", req->manual_reset );
1725 fprintf( stderr, ", state=%d", req->state );
1728 static void dump_open_event_request( const struct open_event_request *req )
1730 fprintf( stderr, " access=%08x", req->access );
1731 fprintf( stderr, ", attributes=%08x", req->attributes );
1732 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1733 dump_varargs_unicode_str( ", name=", cur_size );
1736 static void dump_open_event_reply( const struct open_event_reply *req )
1738 fprintf( stderr, " handle=%04x", req->handle );
1741 static void dump_create_keyed_event_request( const struct create_keyed_event_request *req )
1743 fprintf( stderr, " access=%08x", req->access );
1744 dump_varargs_object_attributes( ", objattr=", cur_size );
1747 static void dump_create_keyed_event_reply( const struct create_keyed_event_reply *req )
1749 fprintf( stderr, " handle=%04x", req->handle );
1752 static void dump_open_keyed_event_request( const struct open_keyed_event_request *req )
1754 fprintf( stderr, " access=%08x", req->access );
1755 fprintf( stderr, ", attributes=%08x", req->attributes );
1756 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1757 dump_varargs_unicode_str( ", name=", cur_size );
1760 static void dump_open_keyed_event_reply( const struct open_keyed_event_reply *req )
1762 fprintf( stderr, " handle=%04x", req->handle );
1765 static void dump_create_mutex_request( const struct create_mutex_request *req )
1767 fprintf( stderr, " access=%08x", req->access );
1768 fprintf( stderr, ", owned=%d", req->owned );
1769 dump_varargs_object_attributes( ", objattr=", cur_size );
1772 static void dump_create_mutex_reply( const struct create_mutex_reply *req )
1774 fprintf( stderr, " handle=%04x", req->handle );
1777 static void dump_release_mutex_request( const struct release_mutex_request *req )
1779 fprintf( stderr, " handle=%04x", req->handle );
1782 static void dump_release_mutex_reply( const struct release_mutex_reply *req )
1784 fprintf( stderr, " prev_count=%08x", req->prev_count );
1787 static void dump_open_mutex_request( const struct open_mutex_request *req )
1789 fprintf( stderr, " access=%08x", req->access );
1790 fprintf( stderr, ", attributes=%08x", req->attributes );
1791 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1792 dump_varargs_unicode_str( ", name=", cur_size );
1795 static void dump_open_mutex_reply( const struct open_mutex_reply *req )
1797 fprintf( stderr, " handle=%04x", req->handle );
1800 static void dump_query_mutex_request( const struct query_mutex_request *req )
1802 fprintf( stderr, " handle=%04x", req->handle );
1805 static void dump_query_mutex_reply( const struct query_mutex_reply *req )
1807 fprintf( stderr, " count=%08x", req->count );
1808 fprintf( stderr, ", owned=%d", req->owned );
1809 fprintf( stderr, ", abandoned=%d", req->abandoned );
1812 static void dump_create_semaphore_request( const struct create_semaphore_request *req )
1814 fprintf( stderr, " access=%08x", req->access );
1815 fprintf( stderr, ", initial=%08x", req->initial );
1816 fprintf( stderr, ", max=%08x", req->max );
1817 dump_varargs_object_attributes( ", objattr=", cur_size );
1820 static void dump_create_semaphore_reply( const struct create_semaphore_reply *req )
1822 fprintf( stderr, " handle=%04x", req->handle );
1825 static void dump_release_semaphore_request( const struct release_semaphore_request *req )
1827 fprintf( stderr, " handle=%04x", req->handle );
1828 fprintf( stderr, ", count=%08x", req->count );
1831 static void dump_release_semaphore_reply( const struct release_semaphore_reply *req )
1833 fprintf( stderr, " prev_count=%08x", req->prev_count );
1836 static void dump_query_semaphore_request( const struct query_semaphore_request *req )
1838 fprintf( stderr, " handle=%04x", req->handle );
1841 static void dump_query_semaphore_reply( const struct query_semaphore_reply *req )
1843 fprintf( stderr, " current=%08x", req->current );
1844 fprintf( stderr, ", max=%08x", req->max );
1847 static void dump_open_semaphore_request( const struct open_semaphore_request *req )
1849 fprintf( stderr, " access=%08x", req->access );
1850 fprintf( stderr, ", attributes=%08x", req->attributes );
1851 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1852 dump_varargs_unicode_str( ", name=", cur_size );
1855 static void dump_open_semaphore_reply( const struct open_semaphore_reply *req )
1857 fprintf( stderr, " handle=%04x", req->handle );
1860 static void dump_create_file_request( const struct create_file_request *req )
1862 fprintf( stderr, " access=%08x", req->access );
1863 fprintf( stderr, ", sharing=%08x", req->sharing );
1864 fprintf( stderr, ", create=%d", req->create );
1865 fprintf( stderr, ", options=%08x", req->options );
1866 fprintf( stderr, ", attrs=%08x", req->attrs );
1867 dump_varargs_object_attributes( ", objattr=", cur_size );
1868 dump_varargs_string( ", filename=", cur_size );
1871 static void dump_create_file_reply( const struct create_file_reply *req )
1873 fprintf( stderr, " handle=%04x", req->handle );
1876 static void dump_open_file_object_request( const struct open_file_object_request *req )
1878 fprintf( stderr, " access=%08x", req->access );
1879 fprintf( stderr, ", attributes=%08x", req->attributes );
1880 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1881 fprintf( stderr, ", sharing=%08x", req->sharing );
1882 fprintf( stderr, ", options=%08x", req->options );
1883 dump_varargs_unicode_str( ", filename=", cur_size );
1886 static void dump_open_file_object_reply( const struct open_file_object_reply *req )
1888 fprintf( stderr, " handle=%04x", req->handle );
1891 static void dump_alloc_file_handle_request( const struct alloc_file_handle_request *req )
1893 fprintf( stderr, " access=%08x", req->access );
1894 fprintf( stderr, ", attributes=%08x", req->attributes );
1895 fprintf( stderr, ", fd=%d", req->fd );
1898 static void dump_alloc_file_handle_reply( const struct alloc_file_handle_reply *req )
1900 fprintf( stderr, " handle=%04x", req->handle );
1903 static void dump_get_handle_unix_name_request( const struct get_handle_unix_name_request *req )
1905 fprintf( stderr, " handle=%04x", req->handle );
1908 static void dump_get_handle_unix_name_reply( const struct get_handle_unix_name_reply *req )
1910 fprintf( stderr, " name_len=%u", req->name_len );
1911 dump_varargs_string( ", name=", cur_size );
1914 static void dump_get_handle_fd_request( const struct get_handle_fd_request *req )
1916 fprintf( stderr, " handle=%04x", req->handle );
1919 static void dump_get_handle_fd_reply( const struct get_handle_fd_reply *req )
1921 fprintf( stderr, " type=%d", req->type );
1922 fprintf( stderr, ", cacheable=%d", req->cacheable );
1923 fprintf( stderr, ", access=%08x", req->access );
1924 fprintf( stderr, ", options=%08x", req->options );
1927 static void dump_get_directory_cache_entry_request( const struct get_directory_cache_entry_request *req )
1929 fprintf( stderr, " handle=%04x", req->handle );
1932 static void dump_get_directory_cache_entry_reply( const struct get_directory_cache_entry_reply *req )
1934 fprintf( stderr, " entry=%d", req->entry );
1935 dump_varargs_ints( ", free=", cur_size );
1938 static void dump_flush_request( const struct flush_request *req )
1940 dump_async_data( " async=", &req->async );
1943 static void dump_flush_reply( const struct flush_reply *req )
1945 fprintf( stderr, " event=%04x", req->event );
1948 static void dump_get_file_info_request( const struct get_file_info_request *req )
1950 fprintf( stderr, " handle=%04x", req->handle );
1951 fprintf( stderr, ", info_class=%08x", req->info_class );
1954 static void dump_get_file_info_reply( const struct get_file_info_reply *req )
1956 dump_varargs_bytes( " data=", cur_size );
1959 static void dump_get_volume_info_request( const struct get_volume_info_request *req )
1961 fprintf( stderr, " handle=%04x", req->handle );
1962 fprintf( stderr, ", info_class=%08x", req->info_class );
1965 static void dump_get_volume_info_reply( const struct get_volume_info_reply *req )
1967 dump_varargs_bytes( " data=", cur_size );
1970 static void dump_lock_file_request( const struct lock_file_request *req )
1972 fprintf( stderr, " handle=%04x", req->handle );
1973 dump_uint64( ", offset=", &req->offset );
1974 dump_uint64( ", count=", &req->count );
1975 fprintf( stderr, ", shared=%d", req->shared );
1976 fprintf( stderr, ", wait=%d", req->wait );
1979 static void dump_lock_file_reply( const struct lock_file_reply *req )
1981 fprintf( stderr, " handle=%04x", req->handle );
1982 fprintf( stderr, ", overlapped=%d", req->overlapped );
1985 static void dump_unlock_file_request( const struct unlock_file_request *req )
1987 fprintf( stderr, " handle=%04x", req->handle );
1988 dump_uint64( ", offset=", &req->offset );
1989 dump_uint64( ", count=", &req->count );
1992 static void dump_set_socket_event_request( const struct set_socket_event_request *req )
1994 fprintf( stderr, " handle=%04x", req->handle );
1995 fprintf( stderr, ", mask=%08x", req->mask );
1996 fprintf( stderr, ", event=%04x", req->event );
1997 fprintf( stderr, ", window=%08x", req->window );
1998 fprintf( stderr, ", msg=%08x", req->msg );
2001 static void dump_get_socket_event_request( const struct get_socket_event_request *req )
2003 fprintf( stderr, " handle=%04x", req->handle );
2004 fprintf( stderr, ", service=%d", req->service );
2005 fprintf( stderr, ", c_event=%04x", req->c_event );
2008 static void dump_get_socket_event_reply( const struct get_socket_event_reply *req )
2010 fprintf( stderr, " mask=%08x", req->mask );
2011 fprintf( stderr, ", pmask=%08x", req->pmask );
2012 fprintf( stderr, ", state=%08x", req->state );
2013 dump_varargs_ints( ", errors=", cur_size );
2016 static void dump_get_socket_info_request( const struct get_socket_info_request *req )
2018 fprintf( stderr, " handle=%04x", req->handle );
2021 static void dump_get_socket_info_reply( const struct get_socket_info_reply *req )
2023 fprintf( stderr, " family=%d", req->family );
2024 fprintf( stderr, ", type=%d", req->type );
2025 fprintf( stderr, ", protocol=%d", req->protocol );
2028 static void dump_enable_socket_event_request( const struct enable_socket_event_request *req )
2030 fprintf( stderr, " handle=%04x", req->handle );
2031 fprintf( stderr, ", mask=%08x", req->mask );
2032 fprintf( stderr, ", sstate=%08x", req->sstate );
2033 fprintf( stderr, ", cstate=%08x", req->cstate );
2036 static void dump_set_socket_deferred_request( const struct set_socket_deferred_request *req )
2038 fprintf( stderr, " handle=%04x", req->handle );
2039 fprintf( stderr, ", deferred=%04x", req->deferred );
2042 static void dump_get_next_console_request_request( const struct get_next_console_request_request *req )
2044 fprintf( stderr, " handle=%04x", req->handle );
2045 fprintf( stderr, ", signal=%d", req->signal );
2046 fprintf( stderr, ", read=%d", req->read );
2047 fprintf( stderr, ", status=%08x", req->status );
2048 dump_varargs_bytes( ", out_data=", cur_size );
2051 static void dump_get_next_console_request_reply( const struct get_next_console_request_reply *req )
2053 fprintf( stderr, " code=%08x", req->code );
2054 fprintf( stderr, ", output=%08x", req->output );
2055 fprintf( stderr, ", out_size=%u", req->out_size );
2056 dump_varargs_bytes( ", in_data=", cur_size );
2059 static void dump_read_directory_changes_request( const struct read_directory_changes_request *req )
2061 fprintf( stderr, " filter=%08x", req->filter );
2062 fprintf( stderr, ", subtree=%d", req->subtree );
2063 fprintf( stderr, ", want_data=%d", req->want_data );
2064 dump_async_data( ", async=", &req->async );
2067 static void dump_read_change_request( const struct read_change_request *req )
2069 fprintf( stderr, " handle=%04x", req->handle );
2072 static void dump_read_change_reply( const struct read_change_reply *req )
2074 dump_varargs_filesystem_event( " events=", cur_size );
2077 static void dump_create_mapping_request( const struct create_mapping_request *req )
2079 fprintf( stderr, " access=%08x", req->access );
2080 fprintf( stderr, ", flags=%08x", req->flags );
2081 fprintf( stderr, ", file_access=%08x", req->file_access );
2082 dump_uint64( ", size=", &req->size );
2083 fprintf( stderr, ", file_handle=%04x", req->file_handle );
2084 dump_varargs_object_attributes( ", objattr=", cur_size );
2087 static void dump_create_mapping_reply( const struct create_mapping_reply *req )
2089 fprintf( stderr, " handle=%04x", req->handle );
2092 static void dump_open_mapping_request( const struct open_mapping_request *req )
2094 fprintf( stderr, " access=%08x", req->access );
2095 fprintf( stderr, ", attributes=%08x", req->attributes );
2096 fprintf( stderr, ", rootdir=%04x", req->rootdir );
2097 dump_varargs_unicode_str( ", name=", cur_size );
2100 static void dump_open_mapping_reply( const struct open_mapping_reply *req )
2102 fprintf( stderr, " handle=%04x", req->handle );
2105 static void dump_get_mapping_info_request( const struct get_mapping_info_request *req )
2107 fprintf( stderr, " handle=%04x", req->handle );
2108 fprintf( stderr, ", access=%08x", req->access );
2111 static void dump_get_mapping_info_reply( const struct get_mapping_info_reply *req )
2113 dump_uint64( " size=", &req->size );
2114 fprintf( stderr, ", flags=%08x", req->flags );
2115 fprintf( stderr, ", shared_file=%04x", req->shared_file );
2116 dump_varargs_pe_image_info( ", image=", cur_size );
2119 static void dump_map_view_request( const struct map_view_request *req )
2121 fprintf( stderr, " mapping=%04x", req->mapping );
2122 fprintf( stderr, ", access=%08x", req->access );
2123 dump_uint64( ", base=", &req->base );
2124 dump_uint64( ", size=", &req->size );
2125 dump_uint64( ", start=", &req->start );
2126 dump_varargs_pe_image_info( ", image=", cur_size );
2129 static void dump_unmap_view_request( const struct unmap_view_request *req )
2131 dump_uint64( " base=", &req->base );
2134 static void dump_get_mapping_committed_range_request( const struct get_mapping_committed_range_request *req )
2136 dump_uint64( " base=", &req->base );
2137 dump_uint64( ", offset=", &req->offset );
2140 static void dump_get_mapping_committed_range_reply( const struct get_mapping_committed_range_reply *req )
2142 dump_uint64( " size=", &req->size );
2143 fprintf( stderr, ", committed=%d", req->committed );
2146 static void dump_add_mapping_committed_range_request( const struct add_mapping_committed_range_request *req )
2148 dump_uint64( " base=", &req->base );
2149 dump_uint64( ", offset=", &req->offset );
2150 dump_uint64( ", size=", &req->size );
2153 static void dump_is_same_mapping_request( const struct is_same_mapping_request *req )
2155 dump_uint64( " base1=", &req->base1 );
2156 dump_uint64( ", base2=", &req->base2 );
2159 static void dump_list_processes_request( const struct list_processes_request *req )
2163 static void dump_list_processes_reply( const struct list_processes_reply *req )
2165 fprintf( stderr, " info_size=%u", req->info_size );
2166 fprintf( stderr, ", process_count=%d", req->process_count );
2167 dump_varargs_process_info( ", data=", min(cur_size,req->info_size) );
2170 static void dump_create_debug_obj_request( const struct create_debug_obj_request *req )
2172 fprintf( stderr, " access=%08x", req->access );
2173 fprintf( stderr, ", flags=%08x", req->flags );
2174 dump_varargs_object_attributes( ", objattr=", cur_size );
2177 static void dump_create_debug_obj_reply( const struct create_debug_obj_reply *req )
2179 fprintf( stderr, " handle=%04x", req->handle );
2182 static void dump_wait_debug_event_request( const struct wait_debug_event_request *req )
2184 fprintf( stderr, " debug=%04x", req->debug );
2187 static void dump_wait_debug_event_reply( const struct wait_debug_event_reply *req )
2189 fprintf( stderr, " pid=%04x", req->pid );
2190 fprintf( stderr, ", tid=%04x", req->tid );
2191 dump_varargs_debug_event( ", event=", cur_size );
2194 static void dump_queue_exception_event_request( const struct queue_exception_event_request *req )
2196 fprintf( stderr, " first=%d", req->first );
2197 fprintf( stderr, ", code=%08x", req->code );
2198 fprintf( stderr, ", flags=%08x", req->flags );
2199 dump_uint64( ", record=", &req->record );
2200 dump_uint64( ", address=", &req->address );
2201 fprintf( stderr, ", len=%u", req->len );
2202 dump_varargs_uints64( ", params=", min(cur_size,req->len) );
2205 static void dump_queue_exception_event_reply( const struct queue_exception_event_reply *req )
2207 fprintf( stderr, " handle=%04x", req->handle );
2210 static void dump_get_exception_status_request( const struct get_exception_status_request *req )
2212 fprintf( stderr, " handle=%04x", req->handle );
2215 static void dump_continue_debug_event_request( const struct continue_debug_event_request *req )
2217 fprintf( stderr, " debug=%04x", req->debug );
2218 fprintf( stderr, ", pid=%04x", req->pid );
2219 fprintf( stderr, ", tid=%04x", req->tid );
2220 fprintf( stderr, ", status=%08x", req->status );
2223 static void dump_debug_process_request( const struct debug_process_request *req )
2225 fprintf( stderr, " handle=%04x", req->handle );
2226 fprintf( stderr, ", debug=%04x", req->debug );
2227 fprintf( stderr, ", attach=%d", req->attach );
2230 static void dump_set_debug_obj_info_request( const struct set_debug_obj_info_request *req )
2232 fprintf( stderr, " debug=%04x", req->debug );
2233 fprintf( stderr, ", flags=%08x", req->flags );
2236 static void dump_read_process_memory_request( const struct read_process_memory_request *req )
2238 fprintf( stderr, " handle=%04x", req->handle );
2239 dump_uint64( ", addr=", &req->addr );
2242 static void dump_read_process_memory_reply( const struct read_process_memory_reply *req )
2244 dump_varargs_bytes( " data=", cur_size );
2247 static void dump_write_process_memory_request( const struct write_process_memory_request *req )
2249 fprintf( stderr, " handle=%04x", req->handle );
2250 dump_uint64( ", addr=", &req->addr );
2251 dump_varargs_bytes( ", data=", cur_size );
2254 static void dump_create_key_request( const struct create_key_request *req )
2256 fprintf( stderr, " access=%08x", req->access );
2257 fprintf( stderr, ", options=%08x", req->options );
2258 dump_varargs_object_attributes( ", objattr=", cur_size );
2259 dump_varargs_unicode_str( ", class=", cur_size );
2262 static void dump_create_key_reply( const struct create_key_reply *req )
2264 fprintf( stderr, " hkey=%04x", req->hkey );
2265 fprintf( stderr, ", created=%d", req->created );
2268 static void dump_open_key_request( const struct open_key_request *req )
2270 fprintf( stderr, " parent=%04x", req->parent );
2271 fprintf( stderr, ", access=%08x", req->access );
2272 fprintf( stderr, ", attributes=%08x", req->attributes );
2273 dump_varargs_unicode_str( ", name=", cur_size );
2276 static void dump_open_key_reply( const struct open_key_reply *req )
2278 fprintf( stderr, " hkey=%04x", req->hkey );
2281 static void dump_delete_key_request( const struct delete_key_request *req )
2283 fprintf( stderr, " hkey=%04x", req->hkey );
2286 static void dump_flush_key_request( const struct flush_key_request *req )
2288 fprintf( stderr, " hkey=%04x", req->hkey );
2291 static void dump_enum_key_request( const struct enum_key_request *req )
2293 fprintf( stderr, " hkey=%04x", req->hkey );
2294 fprintf( stderr, ", index=%d", req->index );
2295 fprintf( stderr, ", info_class=%d", req->info_class );
2298 static void dump_enum_key_reply( const struct enum_key_reply *req )
2300 fprintf( stderr, " subkeys=%d", req->subkeys );
2301 fprintf( stderr, ", max_subkey=%d", req->max_subkey );
2302 fprintf( stderr, ", max_class=%d", req->max_class );
2303 fprintf( stderr, ", values=%d", req->values );
2304 fprintf( stderr, ", max_value=%d", req->max_value );
2305 fprintf( stderr, ", max_data=%d", req->max_data );
2306 dump_timeout( ", modif=", &req->modif );
2307 fprintf( stderr, ", total=%u", req->total );
2308 fprintf( stderr, ", namelen=%u", req->namelen );
2309 dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
2310 dump_varargs_unicode_str( ", class=", cur_size );
2313 static void dump_set_key_value_request( const struct set_key_value_request *req )
2315 fprintf( stderr, " hkey=%04x", req->hkey );
2316 fprintf( stderr, ", type=%d", req->type );
2317 fprintf( stderr, ", namelen=%u", req->namelen );
2318 dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
2319 dump_varargs_bytes( ", data=", cur_size );
2322 static void dump_get_key_value_request( const struct get_key_value_request *req )
2324 fprintf( stderr, " hkey=%04x", req->hkey );
2325 dump_varargs_unicode_str( ", name=", cur_size );
2328 static void dump_get_key_value_reply( const struct get_key_value_reply *req )
2330 fprintf( stderr, " type=%d", req->type );
2331 fprintf( stderr, ", total=%u", req->total );
2332 dump_varargs_bytes( ", data=", cur_size );
2335 static void dump_enum_key_value_request( const struct enum_key_value_request *req )
2337 fprintf( stderr, " hkey=%04x", req->hkey );
2338 fprintf( stderr, ", index=%d", req->index );
2339 fprintf( stderr, ", info_class=%d", req->info_class );
2342 static void dump_enum_key_value_reply( const struct enum_key_value_reply *req )
2344 fprintf( stderr, " type=%d", req->type );
2345 fprintf( stderr, ", total=%u", req->total );
2346 fprintf( stderr, ", namelen=%u", req->namelen );
2347 dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
2348 dump_varargs_bytes( ", data=", cur_size );
2351 static void dump_delete_key_value_request( const struct delete_key_value_request *req )
2353 fprintf( stderr, " hkey=%04x", req->hkey );
2354 dump_varargs_unicode_str( ", name=", cur_size );
2357 static void dump_load_registry_request( const struct load_registry_request *req )
2359 fprintf( stderr, " file=%04x", req->file );
2360 dump_varargs_object_attributes( ", objattr=", cur_size );
2363 static void dump_unload_registry_request( const struct unload_registry_request *req )
2365 fprintf( stderr, " hkey=%04x", req->hkey );
2368 static void dump_save_registry_request( const struct save_registry_request *req )
2370 fprintf( stderr, " hkey=%04x", req->hkey );
2371 fprintf( stderr, ", file=%04x", req->file );
2374 static void dump_set_registry_notification_request( const struct set_registry_notification_request *req )
2376 fprintf( stderr, " hkey=%04x", req->hkey );
2377 fprintf( stderr, ", event=%04x", req->event );
2378 fprintf( stderr, ", subtree=%d", req->subtree );
2379 fprintf( stderr, ", filter=%08x", req->filter );
2382 static void dump_create_timer_request( const struct create_timer_request *req )
2384 fprintf( stderr, " access=%08x", req->access );
2385 fprintf( stderr, ", manual=%d", req->manual );
2386 dump_varargs_object_attributes( ", objattr=", cur_size );
2389 static void dump_create_timer_reply( const struct create_timer_reply *req )
2391 fprintf( stderr, " handle=%04x", req->handle );
2394 static void dump_open_timer_request( const struct open_timer_request *req )
2396 fprintf( stderr, " access=%08x", req->access );
2397 fprintf( stderr, ", attributes=%08x", req->attributes );
2398 fprintf( stderr, ", rootdir=%04x", req->rootdir );
2399 dump_varargs_unicode_str( ", name=", cur_size );
2402 static void dump_open_timer_reply( const struct open_timer_reply *req )
2404 fprintf( stderr, " handle=%04x", req->handle );
2407 static void dump_set_timer_request( const struct set_timer_request *req )
2409 fprintf( stderr, " handle=%04x", req->handle );
2410 dump_timeout( ", expire=", &req->expire );
2411 dump_uint64( ", callback=", &req->callback );
2412 dump_uint64( ", arg=", &req->arg );
2413 fprintf( stderr, ", period=%d", req->period );
2416 static void dump_set_timer_reply( const struct set_timer_reply *req )
2418 fprintf( stderr, " signaled=%d", req->signaled );
2421 static void dump_cancel_timer_request( const struct cancel_timer_request *req )
2423 fprintf( stderr, " handle=%04x", req->handle );
2426 static void dump_cancel_timer_reply( const struct cancel_timer_reply *req )
2428 fprintf( stderr, " signaled=%d", req->signaled );
2431 static void dump_get_timer_info_request( const struct get_timer_info_request *req )
2433 fprintf( stderr, " handle=%04x", req->handle );
2436 static void dump_get_timer_info_reply( const struct get_timer_info_reply *req )
2438 dump_timeout( " when=", &req->when );
2439 fprintf( stderr, ", signaled=%d", req->signaled );
2442 static void dump_get_thread_context_request( const struct get_thread_context_request *req )
2444 fprintf( stderr, " handle=%04x", req->handle );
2445 fprintf( stderr, ", flags=%08x", req->flags );
2448 static void dump_get_thread_context_reply( const struct get_thread_context_reply *req )
2450 fprintf( stderr, " self=%d", req->self );
2451 fprintf( stderr, ", handle=%04x", req->handle );
2452 dump_varargs_context( ", context=", cur_size );
2455 static void dump_set_thread_context_request( const struct set_thread_context_request *req )
2457 fprintf( stderr, " handle=%04x", req->handle );
2458 dump_varargs_context( ", context=", cur_size );
2461 static void dump_set_thread_context_reply( const struct set_thread_context_reply *req )
2463 fprintf( stderr, " self=%d", req->self );
2466 static void dump_get_selector_entry_request( const struct get_selector_entry_request *req )
2468 fprintf( stderr, " handle=%04x", req->handle );
2469 fprintf( stderr, ", entry=%d", req->entry );
2472 static void dump_get_selector_entry_reply( const struct get_selector_entry_reply *req )
2474 fprintf( stderr, " base=%08x", req->base );
2475 fprintf( stderr, ", limit=%08x", req->limit );
2476 fprintf( stderr, ", flags=%02x", req->flags );
2479 static void dump_add_atom_request( const struct add_atom_request *req )
2481 fprintf( stderr, " table=%04x", req->table );
2482 dump_varargs_unicode_str( ", name=", cur_size );
2485 static void dump_add_atom_reply( const struct add_atom_reply *req )
2487 fprintf( stderr, " atom=%04x", req->atom );
2490 static void dump_delete_atom_request( const struct delete_atom_request *req )
2492 fprintf( stderr, " table=%04x", req->table );
2493 fprintf( stderr, ", atom=%04x", req->atom );
2496 static void dump_find_atom_request( const struct find_atom_request *req )
2498 fprintf( stderr, " table=%04x", req->table );
2499 dump_varargs_unicode_str( ", name=", cur_size );
2502 static void dump_find_atom_reply( const struct find_atom_reply *req )
2504 fprintf( stderr, " atom=%04x", req->atom );
2507 static void dump_get_atom_information_request( const struct get_atom_information_request *req )
2509 fprintf( stderr, " table=%04x", req->table );
2510 fprintf( stderr, ", atom=%04x", req->atom );
2513 static void dump_get_atom_information_reply( const struct get_atom_information_reply *req )
2515 fprintf( stderr, " count=%d", req->count );
2516 fprintf( stderr, ", pinned=%d", req->pinned );
2517 fprintf( stderr, ", total=%u", req->total );
2518 dump_varargs_unicode_str( ", name=", cur_size );
2521 static void dump_set_atom_information_request( const struct set_atom_information_request *req )
2523 fprintf( stderr, " table=%04x", req->table );
2524 fprintf( stderr, ", atom=%04x", req->atom );
2525 fprintf( stderr, ", pinned=%d", req->pinned );
2528 static void dump_empty_atom_table_request( const struct empty_atom_table_request *req )
2530 fprintf( stderr, " table=%04x", req->table );
2531 fprintf( stderr, ", if_pinned=%d", req->if_pinned );
2534 static void dump_init_atom_table_request( const struct init_atom_table_request *req )
2536 fprintf( stderr, " entries=%d", req->entries );
2539 static void dump_init_atom_table_reply( const struct init_atom_table_reply *req )
2541 fprintf( stderr, " table=%04x", req->table );
2544 static void dump_get_msg_queue_request( const struct get_msg_queue_request *req )
2548 static void dump_get_msg_queue_reply( const struct get_msg_queue_reply *req )
2550 fprintf( stderr, " handle=%04x", req->handle );
2553 static void dump_set_queue_fd_request( const struct set_queue_fd_request *req )
2555 fprintf( stderr, " handle=%04x", req->handle );
2558 static void dump_set_queue_mask_request( const struct set_queue_mask_request *req )
2560 fprintf( stderr, " wake_mask=%08x", req->wake_mask );
2561 fprintf( stderr, ", changed_mask=%08x", req->changed_mask );
2562 fprintf( stderr, ", skip_wait=%d", req->skip_wait );
2565 static void dump_set_queue_mask_reply( const struct set_queue_mask_reply *req )
2567 fprintf( stderr, " wake_bits=%08x", req->wake_bits );
2568 fprintf( stderr, ", changed_bits=%08x", req->changed_bits );
2571 static void dump_get_queue_status_request( const struct get_queue_status_request *req )
2573 fprintf( stderr, " clear_bits=%08x", req->clear_bits );
2576 static void dump_get_queue_status_reply( const struct get_queue_status_reply *req )
2578 fprintf( stderr, " wake_bits=%08x", req->wake_bits );
2579 fprintf( stderr, ", changed_bits=%08x", req->changed_bits );
2582 static void dump_get_process_idle_event_request( const struct get_process_idle_event_request *req )
2584 fprintf( stderr, " handle=%04x", req->handle );
2587 static void dump_get_process_idle_event_reply( const struct get_process_idle_event_reply *req )
2589 fprintf( stderr, " event=%04x", req->event );
2592 static void dump_send_message_request( const struct send_message_request *req )
2594 fprintf( stderr, " id=%04x", req->id );
2595 fprintf( stderr, ", type=%d", req->type );
2596 fprintf( stderr, ", flags=%d", req->flags );
2597 fprintf( stderr, ", win=%08x", req->win );
2598 fprintf( stderr, ", msg=%08x", req->msg );
2599 dump_uint64( ", wparam=", &req->wparam );
2600 dump_uint64( ", lparam=", &req->lparam );
2601 dump_timeout( ", timeout=", &req->timeout );
2602 dump_varargs_message_data( ", data=", cur_size );
2605 static void dump_post_quit_message_request( const struct post_quit_message_request *req )
2607 fprintf( stderr, " exit_code=%d", req->exit_code );
2610 static void dump_send_hardware_message_request( const struct send_hardware_message_request *req )
2612 fprintf( stderr, " win=%08x", req->win );
2613 dump_hw_input( ", input=", &req->input );
2614 fprintf( stderr, ", flags=%08x", req->flags );
2617 static void dump_send_hardware_message_reply( const struct send_hardware_message_reply *req )
2619 fprintf( stderr, " wait=%d", req->wait );
2620 fprintf( stderr, ", prev_x=%d", req->prev_x );
2621 fprintf( stderr, ", prev_y=%d", req->prev_y );
2622 fprintf( stderr, ", new_x=%d", req->new_x );
2623 fprintf( stderr, ", new_y=%d", req->new_y );
2624 dump_varargs_bytes( ", keystate=", cur_size );
2627 static void dump_get_message_request( const struct get_message_request *req )
2629 fprintf( stderr, " flags=%08x", req->flags );
2630 fprintf( stderr, ", get_win=%08x", req->get_win );
2631 fprintf( stderr, ", get_first=%08x", req->get_first );
2632 fprintf( stderr, ", get_last=%08x", req->get_last );
2633 fprintf( stderr, ", hw_id=%08x", req->hw_id );
2634 fprintf( stderr, ", wake_mask=%08x", req->wake_mask );
2635 fprintf( stderr, ", changed_mask=%08x", req->changed_mask );
2638 static void dump_get_message_reply( const struct get_message_reply *req )
2640 fprintf( stderr, " win=%08x", req->win );
2641 fprintf( stderr, ", msg=%08x", req->msg );
2642 dump_uint64( ", wparam=", &req->wparam );
2643 dump_uint64( ", lparam=", &req->lparam );
2644 fprintf( stderr, ", type=%d", req->type );
2645 fprintf( stderr, ", x=%d", req->x );
2646 fprintf( stderr, ", y=%d", req->y );
2647 fprintf( stderr, ", time=%08x", req->time );
2648 fprintf( stderr, ", active_hooks=%08x", req->active_hooks );
2649 fprintf( stderr, ", total=%u", req->total );
2650 dump_varargs_message_data( ", data=", cur_size );
2653 static void dump_reply_message_request( const struct reply_message_request *req )
2655 fprintf( stderr, " remove=%d", req->remove );
2656 dump_uint64( ", result=", &req->result );
2657 dump_varargs_bytes( ", data=", cur_size );
2660 static void dump_accept_hardware_message_request( const struct accept_hardware_message_request *req )
2662 fprintf( stderr, " hw_id=%08x", req->hw_id );
2665 static void dump_get_message_reply_request( const struct get_message_reply_request *req )
2667 fprintf( stderr, " cancel=%d", req->cancel );
2670 static void dump_get_message_reply_reply( const struct get_message_reply_reply *req )
2672 dump_uint64( " result=", &req->result );
2673 dump_varargs_bytes( ", data=", cur_size );
2676 static void dump_set_win_timer_request( const struct set_win_timer_request *req )
2678 fprintf( stderr, " win=%08x", req->win );
2679 fprintf( stderr, ", msg=%08x", req->msg );
2680 fprintf( stderr, ", rate=%08x", req->rate );
2681 dump_uint64( ", id=", &req->id );
2682 dump_uint64( ", lparam=", &req->lparam );
2685 static void dump_set_win_timer_reply( const struct set_win_timer_reply *req )
2687 dump_uint64( " id=", &req->id );
2690 static void dump_kill_win_timer_request( const struct kill_win_timer_request *req )
2692 fprintf( stderr, " win=%08x", req->win );
2693 dump_uint64( ", id=", &req->id );
2694 fprintf( stderr, ", msg=%08x", req->msg );
2697 static void dump_is_window_hung_request( const struct is_window_hung_request *req )
2699 fprintf( stderr, " win=%08x", req->win );
2702 static void dump_is_window_hung_reply( const struct is_window_hung_reply *req )
2704 fprintf( stderr, " is_hung=%d", req->is_hung );
2707 static void dump_get_serial_info_request( const struct get_serial_info_request *req )
2709 fprintf( stderr, " handle=%04x", req->handle );
2710 fprintf( stderr, ", flags=%d", req->flags );
2713 static void dump_get_serial_info_reply( const struct get_serial_info_reply *req )
2715 fprintf( stderr, " eventmask=%08x", req->eventmask );
2716 fprintf( stderr, ", cookie=%08x", req->cookie );
2717 fprintf( stderr, ", pending_write=%08x", req->pending_write );
2720 static void dump_set_serial_info_request( const struct set_serial_info_request *req )
2722 fprintf( stderr, " handle=%04x", req->handle );
2723 fprintf( stderr, ", flags=%d", req->flags );
2726 static void dump_register_async_request( const struct register_async_request *req )
2728 fprintf( stderr, " type=%d", req->type );
2729 dump_async_data( ", async=", &req->async );
2730 fprintf( stderr, ", count=%d", req->count );
2733 static void dump_cancel_async_request( const struct cancel_async_request *req )
2735 fprintf( stderr, " handle=%04x", req->handle );
2736 dump_uint64( ", iosb=", &req->iosb );
2737 fprintf( stderr, ", only_thread=%d", req->only_thread );
2740 static void dump_get_async_result_request( const struct get_async_result_request *req )
2742 dump_uint64( " user_arg=", &req->user_arg );
2745 static void dump_get_async_result_reply( const struct get_async_result_reply *req )
2747 fprintf( stderr, " size=%u", req->size );
2748 dump_varargs_bytes( ", out_data=", cur_size );
2751 static void dump_read_request( const struct read_request *req )
2753 dump_async_data( " async=", &req->async );
2754 dump_uint64( ", pos=", &req->pos );
2757 static void dump_read_reply( const struct read_reply *req )
2759 fprintf( stderr, " wait=%04x", req->wait );
2760 fprintf( stderr, ", options=%08x", req->options );
2761 dump_varargs_bytes( ", data=", cur_size );
2764 static void dump_write_request( const struct write_request *req )
2766 dump_async_data( " async=", &req->async );
2767 dump_uint64( ", pos=", &req->pos );
2768 dump_varargs_bytes( ", data=", cur_size );
2771 static void dump_write_reply( const struct write_reply *req )
2773 fprintf( stderr, " wait=%04x", req->wait );
2774 fprintf( stderr, ", options=%08x", req->options );
2775 fprintf( stderr, ", size=%u", req->size );
2778 static void dump_ioctl_request( const struct ioctl_request *req )
2780 dump_ioctl_code( " code=", &req->code );
2781 dump_async_data( ", async=", &req->async );
2782 dump_varargs_bytes( ", in_data=", cur_size );
2785 static void dump_ioctl_reply( const struct ioctl_reply *req )
2787 fprintf( stderr, " wait=%04x", req->wait );
2788 fprintf( stderr, ", options=%08x", req->options );
2789 dump_varargs_bytes( ", out_data=", cur_size );
2792 static void dump_set_irp_result_request( const struct set_irp_result_request *req )
2794 fprintf( stderr, " handle=%04x", req->handle );
2795 fprintf( stderr, ", status=%08x", req->status );
2796 fprintf( stderr, ", size=%u", req->size );
2797 dump_varargs_bytes( ", data=", cur_size );
2800 static void dump_create_named_pipe_request( const struct create_named_pipe_request *req )
2802 fprintf( stderr, " access=%08x", req->access );
2803 fprintf( stderr, ", options=%08x", req->options );
2804 fprintf( stderr, ", sharing=%08x", req->sharing );
2805 fprintf( stderr, ", maxinstances=%08x", req->maxinstances );
2806 fprintf( stderr, ", outsize=%08x", req->outsize );
2807 fprintf( stderr, ", insize=%08x", req->insize );
2808 dump_timeout( ", timeout=", &req->timeout );
2809 fprintf( stderr, ", flags=%08x", req->flags );
2810 dump_varargs_object_attributes( ", objattr=", cur_size );
2813 static void dump_create_named_pipe_reply( const struct create_named_pipe_reply *req )
2815 fprintf( stderr, " handle=%04x", req->handle );
2818 static void dump_set_named_pipe_info_request( const struct set_named_pipe_info_request *req )
2820 fprintf( stderr, " handle=%04x", req->handle );
2821 fprintf( stderr, ", flags=%08x", req->flags );
2824 static void dump_create_window_request( const struct create_window_request *req )
2826 fprintf( stderr, " parent=%08x", req->parent );
2827 fprintf( stderr, ", owner=%08x", req->owner );
2828 fprintf( stderr, ", atom=%04x", req->atom );
2829 dump_uint64( ", instance=", &req->instance );
2830 fprintf( stderr, ", dpi=%d", req->dpi );
2831 fprintf( stderr, ", awareness=%d", req->awareness );
2832 dump_varargs_unicode_str( ", class=", cur_size );
2835 static void dump_create_window_reply( const struct create_window_reply *req )
2837 fprintf( stderr, " handle=%08x", req->handle );
2838 fprintf( stderr, ", parent=%08x", req->parent );
2839 fprintf( stderr, ", owner=%08x", req->owner );
2840 fprintf( stderr, ", extra=%d", req->extra );
2841 dump_uint64( ", class_ptr=", &req->class_ptr );
2842 fprintf( stderr, ", dpi=%d", req->dpi );
2843 fprintf( stderr, ", awareness=%d", req->awareness );
2846 static void dump_destroy_window_request( const struct destroy_window_request *req )
2848 fprintf( stderr, " handle=%08x", req->handle );
2851 static void dump_get_desktop_window_request( const struct get_desktop_window_request *req )
2853 fprintf( stderr, " force=%d", req->force );
2856 static void dump_get_desktop_window_reply( const struct get_desktop_window_reply *req )
2858 fprintf( stderr, " top_window=%08x", req->top_window );
2859 fprintf( stderr, ", msg_window=%08x", req->msg_window );
2862 static void dump_set_window_owner_request( const struct set_window_owner_request *req )
2864 fprintf( stderr, " handle=%08x", req->handle );
2865 fprintf( stderr, ", owner=%08x", req->owner );
2868 static void dump_set_window_owner_reply( const struct set_window_owner_reply *req )
2870 fprintf( stderr, " full_owner=%08x", req->full_owner );
2871 fprintf( stderr, ", prev_owner=%08x", req->prev_owner );
2874 static void dump_get_window_info_request( const struct get_window_info_request *req )
2876 fprintf( stderr, " handle=%08x", req->handle );
2879 static void dump_get_window_info_reply( const struct get_window_info_reply *req )
2881 fprintf( stderr, " full_handle=%08x", req->full_handle );
2882 fprintf( stderr, ", last_active=%08x", req->last_active );
2883 fprintf( stderr, ", pid=%04x", req->pid );
2884 fprintf( stderr, ", tid=%04x", req->tid );
2885 fprintf( stderr, ", atom=%04x", req->atom );
2886 fprintf( stderr, ", is_unicode=%d", req->is_unicode );
2887 fprintf( stderr, ", dpi=%d", req->dpi );
2888 fprintf( stderr, ", awareness=%d", req->awareness );
2891 static void dump_set_window_info_request( const struct set_window_info_request *req )
2893 fprintf( stderr, " flags=%04x", req->flags );
2894 fprintf( stderr, ", is_unicode=%d", req->is_unicode );
2895 fprintf( stderr, ", handle=%08x", req->handle );
2896 fprintf( stderr, ", style=%08x", req->style );
2897 fprintf( stderr, ", ex_style=%08x", req->ex_style );
2898 fprintf( stderr, ", id=%08x", req->id );
2899 dump_uint64( ", instance=", &req->instance );
2900 dump_uint64( ", user_data=", &req->user_data );
2901 fprintf( stderr, ", extra_offset=%d", req->extra_offset );
2902 fprintf( stderr, ", extra_size=%u", req->extra_size );
2903 dump_uint64( ", extra_value=", &req->extra_value );
2906 static void dump_set_window_info_reply( const struct set_window_info_reply *req )
2908 fprintf( stderr, " old_style=%08x", req->old_style );
2909 fprintf( stderr, ", old_ex_style=%08x", req->old_ex_style );
2910 dump_uint64( ", old_instance=", &req->old_instance );
2911 dump_uint64( ", old_user_data=", &req->old_user_data );
2912 dump_uint64( ", old_extra_value=", &req->old_extra_value );
2913 fprintf( stderr, ", old_id=%08x", req->old_id );
2916 static void dump_set_parent_request( const struct set_parent_request *req )
2918 fprintf( stderr, " handle=%08x", req->handle );
2919 fprintf( stderr, ", parent=%08x", req->parent );
2922 static void dump_set_parent_reply( const struct set_parent_reply *req )
2924 fprintf( stderr, " old_parent=%08x", req->old_parent );
2925 fprintf( stderr, ", full_parent=%08x", req->full_parent );
2926 fprintf( stderr, ", dpi=%d", req->dpi );
2927 fprintf( stderr, ", awareness=%d", req->awareness );
2930 static void dump_get_window_parents_request( const struct get_window_parents_request *req )
2932 fprintf( stderr, " handle=%08x", req->handle );
2935 static void dump_get_window_parents_reply( const struct get_window_parents_reply *req )
2937 fprintf( stderr, " count=%d", req->count );
2938 dump_varargs_user_handles( ", parents=", cur_size );
2941 static void dump_get_window_children_request( const struct get_window_children_request *req )
2943 fprintf( stderr, " desktop=%04x", req->desktop );
2944 fprintf( stderr, ", parent=%08x", req->parent );
2945 fprintf( stderr, ", atom=%04x", req->atom );
2946 fprintf( stderr, ", tid=%04x", req->tid );
2947 dump_varargs_unicode_str( ", class=", cur_size );
2950 static void dump_get_window_children_reply( const struct get_window_children_reply *req )
2952 fprintf( stderr, " count=%d", req->count );
2953 dump_varargs_user_handles( ", children=", cur_size );
2956 static void dump_get_window_children_from_point_request( const struct get_window_children_from_point_request *req )
2958 fprintf( stderr, " parent=%08x", req->parent );
2959 fprintf( stderr, ", x=%d", req->x );
2960 fprintf( stderr, ", y=%d", req->y );
2961 fprintf( stderr, ", dpi=%d", req->dpi );
2964 static void dump_get_window_children_from_point_reply( const struct get_window_children_from_point_reply *req )
2966 fprintf( stderr, " count=%d", req->count );
2967 dump_varargs_user_handles( ", children=", cur_size );
2970 static void dump_get_window_tree_request( const struct get_window_tree_request *req )
2972 fprintf( stderr, " handle=%08x", req->handle );
2975 static void dump_get_window_tree_reply( const struct get_window_tree_reply *req )
2977 fprintf( stderr, " parent=%08x", req->parent );
2978 fprintf( stderr, ", owner=%08x", req->owner );
2979 fprintf( stderr, ", next_sibling=%08x", req->next_sibling );
2980 fprintf( stderr, ", prev_sibling=%08x", req->prev_sibling );
2981 fprintf( stderr, ", first_sibling=%08x", req->first_sibling );
2982 fprintf( stderr, ", last_sibling=%08x", req->last_sibling );
2983 fprintf( stderr, ", first_child=%08x", req->first_child );
2984 fprintf( stderr, ", last_child=%08x", req->last_child );
2987 static void dump_set_window_pos_request( const struct set_window_pos_request *req )
2989 fprintf( stderr, " swp_flags=%04x", req->swp_flags );
2990 fprintf( stderr, ", paint_flags=%04x", req->paint_flags );
2991 fprintf( stderr, ", handle=%08x", req->handle );
2992 fprintf( stderr, ", previous=%08x", req->previous );
2993 dump_rectangle( ", window=", &req->window );
2994 dump_rectangle( ", client=", &req->client );
2995 dump_varargs_rectangles( ", valid=", cur_size );
2998 static void dump_set_window_pos_reply( const struct set_window_pos_reply *req )
3000 fprintf( stderr, " new_style=%08x", req->new_style );
3001 fprintf( stderr, ", new_ex_style=%08x", req->new_ex_style );
3002 fprintf( stderr, ", surface_win=%08x", req->surface_win );
3003 fprintf( stderr, ", needs_update=%d", req->needs_update );
3006 static void dump_get_window_rectangles_request( const struct get_window_rectangles_request *req )
3008 fprintf( stderr, " handle=%08x", req->handle );
3009 fprintf( stderr, ", relative=%d", req->relative );
3010 fprintf( stderr, ", dpi=%d", req->dpi );
3013 static void dump_get_window_rectangles_reply( const struct get_window_rectangles_reply *req )
3015 dump_rectangle( " window=", &req->window );
3016 dump_rectangle( ", client=", &req->client );
3019 static void dump_get_window_text_request( const struct get_window_text_request *req )
3021 fprintf( stderr, " handle=%08x", req->handle );
3024 static void dump_get_window_text_reply( const struct get_window_text_reply *req )
3026 fprintf( stderr, " length=%u", req->length );
3027 dump_varargs_unicode_str( ", text=", cur_size );
3030 static void dump_set_window_text_request( const struct set_window_text_request *req )
3032 fprintf( stderr, " handle=%08x", req->handle );
3033 dump_varargs_unicode_str( ", text=", cur_size );
3036 static void dump_get_windows_offset_request( const struct get_windows_offset_request *req )
3038 fprintf( stderr, " from=%08x", req->from );
3039 fprintf( stderr, ", to=%08x", req->to );
3040 fprintf( stderr, ", dpi=%d", req->dpi );
3043 static void dump_get_windows_offset_reply( const struct get_windows_offset_reply *req )
3045 fprintf( stderr, " x=%d", req->x );
3046 fprintf( stderr, ", y=%d", req->y );
3047 fprintf( stderr, ", mirror=%d", req->mirror );
3050 static void dump_get_visible_region_request( const struct get_visible_region_request *req )
3052 fprintf( stderr, " window=%08x", req->window );
3053 fprintf( stderr, ", flags=%08x", req->flags );
3056 static void dump_get_visible_region_reply( const struct get_visible_region_reply *req )
3058 fprintf( stderr, " top_win=%08x", req->top_win );
3059 dump_rectangle( ", top_rect=", &req->top_rect );
3060 dump_rectangle( ", win_rect=", &req->win_rect );
3061 fprintf( stderr, ", paint_flags=%08x", req->paint_flags );
3062 fprintf( stderr, ", total_size=%u", req->total_size );
3063 dump_varargs_rectangles( ", region=", cur_size );
3066 static void dump_get_surface_region_request( const struct get_surface_region_request *req )
3068 fprintf( stderr, " window=%08x", req->window );
3071 static void dump_get_surface_region_reply( const struct get_surface_region_reply *req )
3073 dump_rectangle( " visible_rect=", &req->visible_rect );
3074 fprintf( stderr, ", total_size=%u", req->total_size );
3075 dump_varargs_rectangles( ", region=", cur_size );
3078 static void dump_get_window_region_request( const struct get_window_region_request *req )
3080 fprintf( stderr, " window=%08x", req->window );
3083 static void dump_get_window_region_reply( const struct get_window_region_reply *req )
3085 fprintf( stderr, " total_size=%u", req->total_size );
3086 dump_varargs_rectangles( ", region=", cur_size );
3089 static void dump_set_window_region_request( const struct set_window_region_request *req )
3091 fprintf( stderr, " window=%08x", req->window );
3092 fprintf( stderr, ", redraw=%d", req->redraw );
3093 dump_varargs_rectangles( ", region=", cur_size );
3096 static void dump_get_update_region_request( const struct get_update_region_request *req )
3098 fprintf( stderr, " window=%08x", req->window );
3099 fprintf( stderr, ", from_child=%08x", req->from_child );
3100 fprintf( stderr, ", flags=%08x", req->flags );
3103 static void dump_get_update_region_reply( const struct get_update_region_reply *req )
3105 fprintf( stderr, " child=%08x", req->child );
3106 fprintf( stderr, ", flags=%08x", req->flags );
3107 fprintf( stderr, ", total_size=%u", req->total_size );
3108 dump_varargs_rectangles( ", region=", cur_size );
3111 static void dump_update_window_zorder_request( const struct update_window_zorder_request *req )
3113 fprintf( stderr, " window=%08x", req->window );
3114 dump_rectangle( ", rect=", &req->rect );
3117 static void dump_redraw_window_request( const struct redraw_window_request *req )
3119 fprintf( stderr, " window=%08x", req->window );
3120 fprintf( stderr, ", flags=%08x", req->flags );
3121 dump_varargs_rectangles( ", region=", cur_size );
3124 static void dump_set_window_property_request( const struct set_window_property_request *req )
3126 fprintf( stderr, " window=%08x", req->window );
3127 dump_uint64( ", data=", &req->data );
3128 fprintf( stderr, ", atom=%04x", req->atom );
3129 dump_varargs_unicode_str( ", name=", cur_size );
3132 static void dump_remove_window_property_request( const struct remove_window_property_request *req )
3134 fprintf( stderr, " window=%08x", req->window );
3135 fprintf( stderr, ", atom=%04x", req->atom );
3136 dump_varargs_unicode_str( ", name=", cur_size );
3139 static void dump_remove_window_property_reply( const struct remove_window_property_reply *req )
3141 dump_uint64( " data=", &req->data );
3144 static void dump_get_window_property_request( const struct get_window_property_request *req )
3146 fprintf( stderr, " window=%08x", req->window );
3147 fprintf( stderr, ", atom=%04x", req->atom );
3148 dump_varargs_unicode_str( ", name=", cur_size );
3151 static void dump_get_window_property_reply( const struct get_window_property_reply *req )
3153 dump_uint64( " data=", &req->data );
3156 static void dump_get_window_properties_request( const struct get_window_properties_request *req )
3158 fprintf( stderr, " window=%08x", req->window );
3161 static void dump_get_window_properties_reply( const struct get_window_properties_reply *req )
3163 fprintf( stderr, " total=%d", req->total );
3164 dump_varargs_properties( ", props=", cur_size );
3167 static void dump_create_winstation_request( const struct create_winstation_request *req )
3169 fprintf( stderr, " flags=%08x", req->flags );
3170 fprintf( stderr, ", access=%08x", req->access );
3171 fprintf( stderr, ", attributes=%08x", req->attributes );
3172 fprintf( stderr, ", rootdir=%04x", req->rootdir );
3173 dump_varargs_unicode_str( ", name=", cur_size );
3176 static void dump_create_winstation_reply( const struct create_winstation_reply *req )
3178 fprintf( stderr, " handle=%04x", req->handle );
3181 static void dump_open_winstation_request( const struct open_winstation_request *req )
3183 fprintf( stderr, " access=%08x", req->access );
3184 fprintf( stderr, ", attributes=%08x", req->attributes );
3185 fprintf( stderr, ", rootdir=%04x", req->rootdir );
3186 dump_varargs_unicode_str( ", name=", cur_size );
3189 static void dump_open_winstation_reply( const struct open_winstation_reply *req )
3191 fprintf( stderr, " handle=%04x", req->handle );
3194 static void dump_close_winstation_request( const struct close_winstation_request *req )
3196 fprintf( stderr, " handle=%04x", req->handle );
3199 static void dump_get_process_winstation_request( const struct get_process_winstation_request *req )
3203 static void dump_get_process_winstation_reply( const struct get_process_winstation_reply *req )
3205 fprintf( stderr, " handle=%04x", req->handle );
3208 static void dump_set_process_winstation_request( const struct set_process_winstation_request *req )
3210 fprintf( stderr, " handle=%04x", req->handle );
3213 static void dump_enum_winstation_request( const struct enum_winstation_request *req )
3215 fprintf( stderr, " index=%08x", req->index );
3218 static void dump_enum_winstation_reply( const struct enum_winstation_reply *req )
3220 fprintf( stderr, " next=%08x", req->next );
3221 dump_varargs_unicode_str( ", name=", cur_size );
3224 static void dump_create_desktop_request( const struct create_desktop_request *req )
3226 fprintf( stderr, " flags=%08x", req->flags );
3227 fprintf( stderr, ", access=%08x", req->access );
3228 fprintf( stderr, ", attributes=%08x", req->attributes );
3229 dump_varargs_unicode_str( ", name=", cur_size );
3232 static void dump_create_desktop_reply( const struct create_desktop_reply *req )
3234 fprintf( stderr, " handle=%04x", req->handle );
3237 static void dump_open_desktop_request( const struct open_desktop_request *req )
3239 fprintf( stderr, " winsta=%04x", req->winsta );
3240 fprintf( stderr, ", flags=%08x", req->flags );
3241 fprintf( stderr, ", access=%08x", req->access );
3242 fprintf( stderr, ", attributes=%08x", req->attributes );
3243 dump_varargs_unicode_str( ", name=", cur_size );
3246 static void dump_open_desktop_reply( const struct open_desktop_reply *req )
3248 fprintf( stderr, " handle=%04x", req->handle );
3251 static void dump_open_input_desktop_request( const struct open_input_desktop_request *req )
3253 fprintf( stderr, " flags=%08x", req->flags );
3254 fprintf( stderr, ", access=%08x", req->access );
3255 fprintf( stderr, ", attributes=%08x", req->attributes );
3258 static void dump_open_input_desktop_reply( const struct open_input_desktop_reply *req )
3260 fprintf( stderr, " handle=%04x", req->handle );
3263 static void dump_close_desktop_request( const struct close_desktop_request *req )
3265 fprintf( stderr, " handle=%04x", req->handle );
3268 static void dump_get_thread_desktop_request( const struct get_thread_desktop_request *req )
3270 fprintf( stderr, " tid=%04x", req->tid );
3273 static void dump_get_thread_desktop_reply( const struct get_thread_desktop_reply *req )
3275 fprintf( stderr, " handle=%04x", req->handle );
3278 static void dump_set_thread_desktop_request( const struct set_thread_desktop_request *req )
3280 fprintf( stderr, " handle=%04x", req->handle );
3283 static void dump_enum_desktop_request( const struct enum_desktop_request *req )
3285 fprintf( stderr, " winstation=%04x", req->winstation );
3286 fprintf( stderr, ", index=%08x", req->index );
3289 static void dump_enum_desktop_reply( const struct enum_desktop_reply *req )
3291 fprintf( stderr, " next=%08x", req->next );
3292 dump_varargs_unicode_str( ", name=", cur_size );
3295 static void dump_set_user_object_info_request( const struct set_user_object_info_request *req )
3297 fprintf( stderr, " handle=%04x", req->handle );
3298 fprintf( stderr, ", flags=%08x", req->flags );
3299 fprintf( stderr, ", obj_flags=%08x", req->obj_flags );
3302 static void dump_set_user_object_info_reply( const struct set_user_object_info_reply *req )
3304 fprintf( stderr, " is_desktop=%d", req->is_desktop );
3305 fprintf( stderr, ", old_obj_flags=%08x", req->old_obj_flags );
3306 dump_varargs_unicode_str( ", name=", cur_size );
3309 static void dump_register_hotkey_request( const struct register_hotkey_request *req )
3311 fprintf( stderr, " window=%08x", req->window );
3312 fprintf( stderr, ", id=%d", req->id );
3313 fprintf( stderr, ", flags=%08x", req->flags );
3314 fprintf( stderr, ", vkey=%08x", req->vkey );
3317 static void dump_register_hotkey_reply( const struct register_hotkey_reply *req )
3319 fprintf( stderr, " replaced=%d", req->replaced );
3320 fprintf( stderr, ", flags=%08x", req->flags );
3321 fprintf( stderr, ", vkey=%08x", req->vkey );
3324 static void dump_unregister_hotkey_request( const struct unregister_hotkey_request *req )
3326 fprintf( stderr, " window=%08x", req->window );
3327 fprintf( stderr, ", id=%d", req->id );
3330 static void dump_unregister_hotkey_reply( const struct unregister_hotkey_reply *req )
3332 fprintf( stderr, " flags=%08x", req->flags );
3333 fprintf( stderr, ", vkey=%08x", req->vkey );
3336 static void dump_attach_thread_input_request( const struct attach_thread_input_request *req )
3338 fprintf( stderr, " tid_from=%04x", req->tid_from );
3339 fprintf( stderr, ", tid_to=%04x", req->tid_to );
3340 fprintf( stderr, ", attach=%d", req->attach );
3343 static void dump_get_thread_input_request( const struct get_thread_input_request *req )
3345 fprintf( stderr, " tid=%04x", req->tid );
3348 static void dump_get_thread_input_reply( const struct get_thread_input_reply *req )
3350 fprintf( stderr, " focus=%08x", req->focus );
3351 fprintf( stderr, ", capture=%08x", req->capture );
3352 fprintf( stderr, ", active=%08x", req->active );
3353 fprintf( stderr, ", foreground=%08x", req->foreground );
3354 fprintf( stderr, ", menu_owner=%08x", req->menu_owner );
3355 fprintf( stderr, ", move_size=%08x", req->move_size );
3356 fprintf( stderr, ", caret=%08x", req->caret );
3357 fprintf( stderr, ", cursor=%08x", req->cursor );
3358 fprintf( stderr, ", show_count=%d", req->show_count );
3359 dump_rectangle( ", rect=", &req->rect );
3362 static void dump_get_last_input_time_request( const struct get_last_input_time_request *req )
3366 static void dump_get_last_input_time_reply( const struct get_last_input_time_reply *req )
3368 fprintf( stderr, " time=%08x", req->time );
3371 static void dump_get_key_state_request( const struct get_key_state_request *req )
3373 fprintf( stderr, " tid=%04x", req->tid );
3374 fprintf( stderr, ", key=%d", req->key );
3377 static void dump_get_key_state_reply( const struct get_key_state_reply *req )
3379 fprintf( stderr, " state=%02x", req->state );
3380 dump_varargs_bytes( ", keystate=", cur_size );
3383 static void dump_set_key_state_request( const struct set_key_state_request *req )
3385 fprintf( stderr, " tid=%04x", req->tid );
3386 fprintf( stderr, ", async=%d", req->async );
3387 dump_varargs_bytes( ", keystate=", cur_size );
3390 static void dump_set_foreground_window_request( const struct set_foreground_window_request *req )
3392 fprintf( stderr, " handle=%08x", req->handle );
3395 static void dump_set_foreground_window_reply( const struct set_foreground_window_reply *req )
3397 fprintf( stderr, " previous=%08x", req->previous );
3398 fprintf( stderr, ", send_msg_old=%d", req->send_msg_old );
3399 fprintf( stderr, ", send_msg_new=%d", req->send_msg_new );
3402 static void dump_set_focus_window_request( const struct set_focus_window_request *req )
3404 fprintf( stderr, " handle=%08x", req->handle );
3407 static void dump_set_focus_window_reply( const struct set_focus_window_reply *req )
3409 fprintf( stderr, " previous=%08x", req->previous );
3412 static void dump_set_active_window_request( const struct set_active_window_request *req )
3414 fprintf( stderr, " handle=%08x", req->handle );
3417 static void dump_set_active_window_reply( const struct set_active_window_reply *req )
3419 fprintf( stderr, " previous=%08x", req->previous );
3422 static void dump_set_capture_window_request( const struct set_capture_window_request *req )
3424 fprintf( stderr, " handle=%08x", req->handle );
3425 fprintf( stderr, ", flags=%08x", req->flags );
3428 static void dump_set_capture_window_reply( const struct set_capture_window_reply *req )
3430 fprintf( stderr, " previous=%08x", req->previous );
3431 fprintf( stderr, ", full_handle=%08x", req->full_handle );
3434 static void dump_set_caret_window_request( const struct set_caret_window_request *req )
3436 fprintf( stderr, " handle=%08x", req->handle );
3437 fprintf( stderr, ", width=%d", req->width );
3438 fprintf( stderr, ", height=%d", req->height );
3441 static void dump_set_caret_window_reply( const struct set_caret_window_reply *req )
3443 fprintf( stderr, " previous=%08x", req->previous );
3444 dump_rectangle( ", old_rect=", &req->old_rect );
3445 fprintf( stderr, ", old_hide=%d", req->old_hide );
3446 fprintf( stderr, ", old_state=%d", req->old_state );
3449 static void dump_set_caret_info_request( const struct set_caret_info_request *req )
3451 fprintf( stderr, " flags=%08x", req->flags );
3452 fprintf( stderr, ", handle=%08x", req->handle );
3453 fprintf( stderr, ", x=%d", req->x );
3454 fprintf( stderr, ", y=%d", req->y );
3455 fprintf( stderr, ", hide=%d", req->hide );
3456 fprintf( stderr, ", state=%d", req->state );
3459 static void dump_set_caret_info_reply( const struct set_caret_info_reply *req )
3461 fprintf( stderr, " full_handle=%08x", req->full_handle );
3462 dump_rectangle( ", old_rect=", &req->old_rect );
3463 fprintf( stderr, ", old_hide=%d", req->old_hide );
3464 fprintf( stderr, ", old_state=%d", req->old_state );
3467 static void dump_set_hook_request( const struct set_hook_request *req )
3469 fprintf( stderr, " id=%d", req->id );
3470 fprintf( stderr, ", pid=%04x", req->pid );
3471 fprintf( stderr, ", tid=%04x", req->tid );
3472 fprintf( stderr, ", event_min=%d", req->event_min );
3473 fprintf( stderr, ", event_max=%d", req->event_max );
3474 dump_uint64( ", proc=", &req->proc );
3475 fprintf( stderr, ", flags=%d", req->flags );
3476 fprintf( stderr, ", unicode=%d", req->unicode );
3477 dump_varargs_unicode_str( ", module=", cur_size );
3480 static void dump_set_hook_reply( const struct set_hook_reply *req )
3482 fprintf( stderr, " handle=%08x", req->handle );
3483 fprintf( stderr, ", active_hooks=%08x", req->active_hooks );
3486 static void dump_remove_hook_request( const struct remove_hook_request *req )
3488 fprintf( stderr, " handle=%08x", req->handle );
3489 dump_uint64( ", proc=", &req->proc );
3490 fprintf( stderr, ", id=%d", req->id );
3493 static void dump_remove_hook_reply( const struct remove_hook_reply *req )
3495 fprintf( stderr, " active_hooks=%08x", req->active_hooks );
3498 static void dump_start_hook_chain_request( const struct start_hook_chain_request *req )
3500 fprintf( stderr, " id=%d", req->id );
3501 fprintf( stderr, ", event=%d", req->event );
3502 fprintf( stderr, ", window=%08x", req->window );
3503 fprintf( stderr, ", object_id=%d", req->object_id );
3504 fprintf( stderr, ", child_id=%d", req->child_id );
3507 static void dump_start_hook_chain_reply( const struct start_hook_chain_reply *req )
3509 fprintf( stderr, " handle=%08x", req->handle );
3510 fprintf( stderr, ", pid=%04x", req->pid );
3511 fprintf( stderr, ", tid=%04x", req->tid );
3512 fprintf( stderr, ", unicode=%d", req->unicode );
3513 dump_uint64( ", proc=", &req->proc );
3514 fprintf( stderr, ", active_hooks=%08x", req->active_hooks );
3515 dump_varargs_unicode_str( ", module=", cur_size );
3518 static void dump_finish_hook_chain_request( const struct finish_hook_chain_request *req )
3520 fprintf( stderr, " id=%d", req->id );
3523 static void dump_get_hook_info_request( const struct get_hook_info_request *req )
3525 fprintf( stderr, " handle=%08x", req->handle );
3526 fprintf( stderr, ", get_next=%d", req->get_next );
3527 fprintf( stderr, ", event=%d", req->event );
3528 fprintf( stderr, ", window=%08x", req->window );
3529 fprintf( stderr, ", object_id=%d", req->object_id );
3530 fprintf( stderr, ", child_id=%d", req->child_id );
3533 static void dump_get_hook_info_reply( const struct get_hook_info_reply *req )
3535 fprintf( stderr, " handle=%08x", req->handle );
3536 fprintf( stderr, ", id=%d", req->id );
3537 fprintf( stderr, ", pid=%04x", req->pid );
3538 fprintf( stderr, ", tid=%04x", req->tid );
3539 dump_uint64( ", proc=", &req->proc );
3540 fprintf( stderr, ", unicode=%d", req->unicode );
3541 dump_varargs_unicode_str( ", module=", cur_size );
3544 static void dump_create_class_request( const struct create_class_request *req )
3546 fprintf( stderr, " local=%d", req->local );
3547 fprintf( stderr, ", atom=%04x", req->atom );
3548 fprintf( stderr, ", style=%08x", req->style );
3549 dump_uint64( ", instance=", &req->instance );
3550 fprintf( stderr, ", extra=%d", req->extra );
3551 fprintf( stderr, ", win_extra=%d", req->win_extra );
3552 dump_uint64( ", client_ptr=", &req->client_ptr );
3553 fprintf( stderr, ", name_offset=%u", req->name_offset );
3554 dump_varargs_unicode_str( ", name=", cur_size );
3557 static void dump_create_class_reply( const struct create_class_reply *req )
3559 fprintf( stderr, " atom=%04x", req->atom );
3562 static void dump_destroy_class_request( const struct destroy_class_request *req )
3564 fprintf( stderr, " atom=%04x", req->atom );
3565 dump_uint64( ", instance=", &req->instance );
3566 dump_varargs_unicode_str( ", name=", cur_size );
3569 static void dump_destroy_class_reply( const struct destroy_class_reply *req )
3571 dump_uint64( " client_ptr=", &req->client_ptr );
3574 static void dump_set_class_info_request( const struct set_class_info_request *req )
3576 fprintf( stderr, " window=%08x", req->window );
3577 fprintf( stderr, ", flags=%08x", req->flags );
3578 fprintf( stderr, ", atom=%04x", req->atom );
3579 fprintf( stderr, ", style=%08x", req->style );
3580 fprintf( stderr, ", win_extra=%d", req->win_extra );
3581 dump_uint64( ", instance=", &req->instance );
3582 fprintf( stderr, ", extra_offset=%d", req->extra_offset );
3583 fprintf( stderr, ", extra_size=%u", req->extra_size );
3584 dump_uint64( ", extra_value=", &req->extra_value );
3587 static void dump_set_class_info_reply( const struct set_class_info_reply *req )
3589 fprintf( stderr, " old_atom=%04x", req->old_atom );
3590 fprintf( stderr, ", base_atom=%04x", req->base_atom );
3591 dump_uint64( ", old_instance=", &req->old_instance );
3592 dump_uint64( ", old_extra_value=", &req->old_extra_value );
3593 fprintf( stderr, ", old_style=%08x", req->old_style );
3594 fprintf( stderr, ", old_extra=%d", req->old_extra );
3595 fprintf( stderr, ", old_win_extra=%d", req->old_win_extra );
3598 static void dump_open_clipboard_request( const struct open_clipboard_request *req )
3600 fprintf( stderr, " window=%08x", req->window );
3603 static void dump_open_clipboard_reply( const struct open_clipboard_reply *req )
3605 fprintf( stderr, " owner=%08x", req->owner );
3608 static void dump_close_clipboard_request( const struct close_clipboard_request *req )
3612 static void dump_close_clipboard_reply( const struct close_clipboard_reply *req )
3614 fprintf( stderr, " viewer=%08x", req->viewer );
3615 fprintf( stderr, ", owner=%08x", req->owner );
3618 static void dump_empty_clipboard_request( const struct empty_clipboard_request *req )
3622 static void dump_set_clipboard_data_request( const struct set_clipboard_data_request *req )
3624 fprintf( stderr, " format=%08x", req->format );
3625 fprintf( stderr, ", lcid=%08x", req->lcid );
3626 dump_varargs_bytes( ", data=", cur_size );
3629 static void dump_set_clipboard_data_reply( const struct set_clipboard_data_reply *req )
3631 fprintf( stderr, " seqno=%08x", req->seqno );
3634 static void dump_get_clipboard_data_request( const struct get_clipboard_data_request *req )
3636 fprintf( stderr, " format=%08x", req->format );
3637 fprintf( stderr, ", render=%d", req->render );
3638 fprintf( stderr, ", cached=%d", req->cached );
3639 fprintf( stderr, ", seqno=%08x", req->seqno );
3642 static void dump_get_clipboard_data_reply( const struct get_clipboard_data_reply *req )
3644 fprintf( stderr, " from=%08x", req->from );
3645 fprintf( stderr, ", owner=%08x", req->owner );
3646 fprintf( stderr, ", seqno=%08x", req->seqno );
3647 fprintf( stderr, ", total=%u", req->total );
3648 dump_varargs_bytes( ", data=", cur_size );
3651 static void dump_get_clipboard_formats_request( const struct get_clipboard_formats_request *req )
3653 fprintf( stderr, " format=%08x", req->format );
3656 static void dump_get_clipboard_formats_reply( const struct get_clipboard_formats_reply *req )
3658 fprintf( stderr, " count=%08x", req->count );
3659 dump_varargs_uints( ", formats=", cur_size );
3662 static void dump_enum_clipboard_formats_request( const struct enum_clipboard_formats_request *req )
3664 fprintf( stderr, " previous=%08x", req->previous );
3667 static void dump_enum_clipboard_formats_reply( const struct enum_clipboard_formats_reply *req )
3669 fprintf( stderr, " format=%08x", req->format );
3672 static void dump_release_clipboard_request( const struct release_clipboard_request *req )
3674 fprintf( stderr, " owner=%08x", req->owner );
3677 static void dump_release_clipboard_reply( const struct release_clipboard_reply *req )
3679 fprintf( stderr, " viewer=%08x", req->viewer );
3680 fprintf( stderr, ", owner=%08x", req->owner );
3683 static void dump_get_clipboard_info_request( const struct get_clipboard_info_request *req )
3687 static void dump_get_clipboard_info_reply( const struct get_clipboard_info_reply *req )
3689 fprintf( stderr, " window=%08x", req->window );
3690 fprintf( stderr, ", owner=%08x", req->owner );
3691 fprintf( stderr, ", viewer=%08x", req->viewer );
3692 fprintf( stderr, ", seqno=%08x", req->seqno );
3695 static void dump_set_clipboard_viewer_request( const struct set_clipboard_viewer_request *req )
3697 fprintf( stderr, " viewer=%08x", req->viewer );
3698 fprintf( stderr, ", previous=%08x", req->previous );
3701 static void dump_set_clipboard_viewer_reply( const struct set_clipboard_viewer_reply *req )
3703 fprintf( stderr, " old_viewer=%08x", req->old_viewer );
3704 fprintf( stderr, ", owner=%08x", req->owner );
3707 static void dump_add_clipboard_listener_request( const struct add_clipboard_listener_request *req )
3709 fprintf( stderr, " window=%08x", req->window );
3712 static void dump_remove_clipboard_listener_request( const struct remove_clipboard_listener_request *req )
3714 fprintf( stderr, " window=%08x", req->window );
3717 static void dump_open_token_request( const struct open_token_request *req )
3719 fprintf( stderr, " handle=%04x", req->handle );
3720 fprintf( stderr, ", access=%08x", req->access );
3721 fprintf( stderr, ", attributes=%08x", req->attributes );
3722 fprintf( stderr, ", flags=%08x", req->flags );
3725 static void dump_open_token_reply( const struct open_token_reply *req )
3727 fprintf( stderr, " token=%04x", req->token );
3730 static void dump_set_global_windows_request( const struct set_global_windows_request *req )
3732 fprintf( stderr, " flags=%08x", req->flags );
3733 fprintf( stderr, ", shell_window=%08x", req->shell_window );
3734 fprintf( stderr, ", shell_listview=%08x", req->shell_listview );
3735 fprintf( stderr, ", progman_window=%08x", req->progman_window );
3736 fprintf( stderr, ", taskman_window=%08x", req->taskman_window );
3739 static void dump_set_global_windows_reply( const struct set_global_windows_reply *req )
3741 fprintf( stderr, " old_shell_window=%08x", req->old_shell_window );
3742 fprintf( stderr, ", old_shell_listview=%08x", req->old_shell_listview );
3743 fprintf( stderr, ", old_progman_window=%08x", req->old_progman_window );
3744 fprintf( stderr, ", old_taskman_window=%08x", req->old_taskman_window );
3747 static void dump_adjust_token_privileges_request( const struct adjust_token_privileges_request *req )
3749 fprintf( stderr, " handle=%04x", req->handle );
3750 fprintf( stderr, ", disable_all=%d", req->disable_all );
3751 fprintf( stderr, ", get_modified_state=%d", req->get_modified_state );
3752 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3755 static void dump_adjust_token_privileges_reply( const struct adjust_token_privileges_reply *req )
3757 fprintf( stderr, " len=%08x", req->len );
3758 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3761 static void dump_get_token_privileges_request( const struct get_token_privileges_request *req )
3763 fprintf( stderr, " handle=%04x", req->handle );
3766 static void dump_get_token_privileges_reply( const struct get_token_privileges_reply *req )
3768 fprintf( stderr, " len=%08x", req->len );
3769 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3772 static void dump_check_token_privileges_request( const struct check_token_privileges_request *req )
3774 fprintf( stderr, " handle=%04x", req->handle );
3775 fprintf( stderr, ", all_required=%d", req->all_required );
3776 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3779 static void dump_check_token_privileges_reply( const struct check_token_privileges_reply *req )
3781 fprintf( stderr, " has_privileges=%d", req->has_privileges );
3782 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3785 static void dump_duplicate_token_request( const struct duplicate_token_request *req )
3787 fprintf( stderr, " handle=%04x", req->handle );
3788 fprintf( stderr, ", access=%08x", req->access );
3789 fprintf( stderr, ", primary=%d", req->primary );
3790 fprintf( stderr, ", impersonation_level=%d", req->impersonation_level );
3791 dump_varargs_object_attributes( ", objattr=", cur_size );
3794 static void dump_duplicate_token_reply( const struct duplicate_token_reply *req )
3796 fprintf( stderr, " new_handle=%04x", req->new_handle );
3799 static void dump_filter_token_request( const struct filter_token_request *req )
3801 fprintf( stderr, " handle=%04x", req->handle );
3802 fprintf( stderr, ", flags=%08x", req->flags );
3803 fprintf( stderr, ", privileges_size=%u", req->privileges_size );
3804 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", min(cur_size,req->privileges_size) );
3805 dump_varargs_SID( ", disable_sids=", cur_size );
3808 static void dump_filter_token_reply( const struct filter_token_reply *req )
3810 fprintf( stderr, " new_handle=%04x", req->new_handle );
3813 static void dump_access_check_request( const struct access_check_request *req )
3815 fprintf( stderr, " handle=%04x", req->handle );
3816 fprintf( stderr, ", desired_access=%08x", req->desired_access );
3817 fprintf( stderr, ", mapping_read=%08x", req->mapping_read );
3818 fprintf( stderr, ", mapping_write=%08x", req->mapping_write );
3819 fprintf( stderr, ", mapping_execute=%08x", req->mapping_execute );
3820 fprintf( stderr, ", mapping_all=%08x", req->mapping_all );
3821 dump_varargs_security_descriptor( ", sd=", cur_size );
3824 static void dump_access_check_reply( const struct access_check_reply *req )
3826 fprintf( stderr, " access_granted=%08x", req->access_granted );
3827 fprintf( stderr, ", access_status=%08x", req->access_status );
3828 fprintf( stderr, ", privileges_len=%08x", req->privileges_len );
3829 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3832 static void dump_get_token_sid_request( const struct get_token_sid_request *req )
3834 fprintf( stderr, " handle=%04x", req->handle );
3835 fprintf( stderr, ", which_sid=%08x", req->which_sid );
3838 static void dump_get_token_sid_reply( const struct get_token_sid_reply *req )
3840 fprintf( stderr, " sid_len=%u", req->sid_len );
3841 dump_varargs_SID( ", sid=", cur_size );
3844 static void dump_get_token_groups_request( const struct get_token_groups_request *req )
3846 fprintf( stderr, " handle=%04x", req->handle );
3849 static void dump_get_token_groups_reply( const struct get_token_groups_reply *req )
3851 fprintf( stderr, " user_len=%u", req->user_len );
3852 dump_varargs_token_groups( ", user=", cur_size );
3855 static void dump_get_token_default_dacl_request( const struct get_token_default_dacl_request *req )
3857 fprintf( stderr, " handle=%04x", req->handle );
3860 static void dump_get_token_default_dacl_reply( const struct get_token_default_dacl_reply *req )
3862 fprintf( stderr, " acl_len=%u", req->acl_len );
3863 dump_varargs_ACL( ", acl=", cur_size );
3866 static void dump_set_token_default_dacl_request( const struct set_token_default_dacl_request *req )
3868 fprintf( stderr, " handle=%04x", req->handle );
3869 dump_varargs_ACL( ", acl=", cur_size );
3872 static void dump_set_security_object_request( const struct set_security_object_request *req )
3874 fprintf( stderr, " handle=%04x", req->handle );
3875 fprintf( stderr, ", security_info=%08x", req->security_info );
3876 dump_varargs_security_descriptor( ", sd=", cur_size );
3879 static void dump_get_security_object_request( const struct get_security_object_request *req )
3881 fprintf( stderr, " handle=%04x", req->handle );
3882 fprintf( stderr, ", security_info=%08x", req->security_info );
3885 static void dump_get_security_object_reply( const struct get_security_object_reply *req )
3887 fprintf( stderr, " sd_len=%08x", req->sd_len );
3888 dump_varargs_security_descriptor( ", sd=", cur_size );
3891 static void dump_get_system_handles_request( const struct get_system_handles_request *req )
3895 static void dump_get_system_handles_reply( const struct get_system_handles_reply *req )
3897 fprintf( stderr, " count=%08x", req->count );
3898 dump_varargs_handle_infos( ", data=", cur_size );
3901 static void dump_create_mailslot_request( const struct create_mailslot_request *req )
3903 fprintf( stderr, " access=%08x", req->access );
3904 dump_timeout( ", read_timeout=", &req->read_timeout );
3905 fprintf( stderr, ", max_msgsize=%08x", req->max_msgsize );
3906 dump_varargs_object_attributes( ", objattr=", cur_size );
3909 static void dump_create_mailslot_reply( const struct create_mailslot_reply *req )
3911 fprintf( stderr, " handle=%04x", req->handle );
3914 static void dump_set_mailslot_info_request( const struct set_mailslot_info_request *req )
3916 fprintf( stderr, " handle=%04x", req->handle );
3917 dump_timeout( ", read_timeout=", &req->read_timeout );
3918 fprintf( stderr, ", flags=%08x", req->flags );
3921 static void dump_set_mailslot_info_reply( const struct set_mailslot_info_reply *req )
3923 dump_timeout( " read_timeout=", &req->read_timeout );
3924 fprintf( stderr, ", max_msgsize=%08x", req->max_msgsize );
3927 static void dump_create_directory_request( const struct create_directory_request *req )
3929 fprintf( stderr, " access=%08x", req->access );
3930 dump_varargs_object_attributes( ", objattr=", cur_size );
3933 static void dump_create_directory_reply( const struct create_directory_reply *req )
3935 fprintf( stderr, " handle=%04x", req->handle );
3938 static void dump_open_directory_request( const struct open_directory_request *req )
3940 fprintf( stderr, " access=%08x", req->access );
3941 fprintf( stderr, ", attributes=%08x", req->attributes );
3942 fprintf( stderr, ", rootdir=%04x", req->rootdir );
3943 dump_varargs_unicode_str( ", directory_name=", cur_size );
3946 static void dump_open_directory_reply( const struct open_directory_reply *req )
3948 fprintf( stderr, " handle=%04x", req->handle );
3951 static void dump_get_directory_entry_request( const struct get_directory_entry_request *req )
3953 fprintf( stderr, " handle=%04x", req->handle );
3954 fprintf( stderr, ", index=%08x", req->index );
3957 static void dump_get_directory_entry_reply( const struct get_directory_entry_reply *req )
3959 fprintf( stderr, " name_len=%u", req->name_len );
3960 dump_varargs_unicode_str( ", name=", min(cur_size,req->name_len) );
3961 dump_varargs_unicode_str( ", type=", cur_size );
3964 static void dump_create_symlink_request( const struct create_symlink_request *req )
3966 fprintf( stderr, " access=%08x", req->access );
3967 dump_varargs_object_attributes( ", objattr=", cur_size );
3968 dump_varargs_unicode_str( ", target_name=", cur_size );
3971 static void dump_create_symlink_reply( const struct create_symlink_reply *req )
3973 fprintf( stderr, " handle=%04x", req->handle );
3976 static void dump_open_symlink_request( const struct open_symlink_request *req )
3978 fprintf( stderr, " access=%08x", req->access );
3979 fprintf( stderr, ", attributes=%08x", req->attributes );
3980 fprintf( stderr, ", rootdir=%04x", req->rootdir );
3981 dump_varargs_unicode_str( ", name=", cur_size );
3984 static void dump_open_symlink_reply( const struct open_symlink_reply *req )
3986 fprintf( stderr, " handle=%04x", req->handle );
3989 static void dump_query_symlink_request( const struct query_symlink_request *req )
3991 fprintf( stderr, " handle=%04x", req->handle );
3994 static void dump_query_symlink_reply( const struct query_symlink_reply *req )
3996 fprintf( stderr, " total=%u", req->total );
3997 dump_varargs_unicode_str( ", target_name=", cur_size );
4000 static void dump_get_object_info_request( const struct get_object_info_request *req )
4002 fprintf( stderr, " handle=%04x", req->handle );
4005 static void dump_get_object_info_reply( const struct get_object_info_reply *req )
4007 fprintf( stderr, " access=%08x", req->access );
4008 fprintf( stderr, ", ref_count=%08x", req->ref_count );
4009 fprintf( stderr, ", handle_count=%08x", req->handle_count );
4010 fprintf( stderr, ", total=%u", req->total );
4011 dump_varargs_unicode_str( ", name=", cur_size );
4014 static void dump_get_object_type_request( const struct get_object_type_request *req )
4016 fprintf( stderr, " handle=%04x", req->handle );
4019 static void dump_get_object_type_reply( const struct get_object_type_reply *req )
4021 fprintf( stderr, " total=%u", req->total );
4022 dump_varargs_unicode_str( ", type=", cur_size );
4025 static void dump_get_token_impersonation_level_request( const struct get_token_impersonation_level_request *req )
4027 fprintf( stderr, " handle=%04x", req->handle );
4030 static void dump_get_token_impersonation_level_reply( const struct get_token_impersonation_level_reply *req )
4032 fprintf( stderr, " impersonation_level=%d", req->impersonation_level );
4035 static void dump_allocate_locally_unique_id_request( const struct allocate_locally_unique_id_request *req )
4039 static void dump_allocate_locally_unique_id_reply( const struct allocate_locally_unique_id_reply *req )
4041 dump_luid( " luid=", &req->luid );
4044 static void dump_create_device_manager_request( const struct create_device_manager_request *req )
4046 fprintf( stderr, " access=%08x", req->access );
4047 fprintf( stderr, ", attributes=%08x", req->attributes );
4050 static void dump_create_device_manager_reply( const struct create_device_manager_reply *req )
4052 fprintf( stderr, " handle=%04x", req->handle );
4055 static void dump_create_device_request( const struct create_device_request *req )
4057 fprintf( stderr, " rootdir=%04x", req->rootdir );
4058 dump_uint64( ", user_ptr=", &req->user_ptr );
4059 fprintf( stderr, ", manager=%04x", req->manager );
4060 dump_varargs_unicode_str( ", name=", cur_size );
4063 static void dump_delete_device_request( const struct delete_device_request *req )
4065 fprintf( stderr, " manager=%04x", req->manager );
4066 dump_uint64( ", device=", &req->device );
4069 static void dump_get_next_device_request_request( const struct get_next_device_request_request *req )
4071 fprintf( stderr, " manager=%04x", req->manager );
4072 fprintf( stderr, ", prev=%04x", req->prev );
4073 fprintf( stderr, ", status=%08x", req->status );
4074 dump_uint64( ", user_ptr=", &req->user_ptr );
4077 static void dump_get_next_device_request_reply( const struct get_next_device_request_reply *req )
4079 dump_irp_params( " params=", &req->params );
4080 fprintf( stderr, ", next=%04x", req->next );
4081 fprintf( stderr, ", client_tid=%04x", req->client_tid );
4082 dump_uint64( ", client_thread=", &req->client_thread );
4083 fprintf( stderr, ", in_size=%u", req->in_size );
4084 dump_varargs_bytes( ", next_data=", cur_size );
4087 static void dump_get_kernel_object_ptr_request( const struct get_kernel_object_ptr_request *req )
4089 fprintf( stderr, " manager=%04x", req->manager );
4090 fprintf( stderr, ", handle=%04x", req->handle );
4093 static void dump_get_kernel_object_ptr_reply( const struct get_kernel_object_ptr_reply *req )
4095 dump_uint64( " user_ptr=", &req->user_ptr );
4098 static void dump_set_kernel_object_ptr_request( const struct set_kernel_object_ptr_request *req )
4100 fprintf( stderr, " manager=%04x", req->manager );
4101 fprintf( stderr, ", handle=%04x", req->handle );
4102 dump_uint64( ", user_ptr=", &req->user_ptr );
4105 static void dump_grab_kernel_object_request( const struct grab_kernel_object_request *req )
4107 fprintf( stderr, " manager=%04x", req->manager );
4108 dump_uint64( ", user_ptr=", &req->user_ptr );
4111 static void dump_release_kernel_object_request( const struct release_kernel_object_request *req )
4113 fprintf( stderr, " manager=%04x", req->manager );
4114 dump_uint64( ", user_ptr=", &req->user_ptr );
4117 static void dump_get_kernel_object_handle_request( const struct get_kernel_object_handle_request *req )
4119 fprintf( stderr, " manager=%04x", req->manager );
4120 dump_uint64( ", user_ptr=", &req->user_ptr );
4121 fprintf( stderr, ", access=%08x", req->access );
4124 static void dump_get_kernel_object_handle_reply( const struct get_kernel_object_handle_reply *req )
4126 fprintf( stderr, " handle=%04x", req->handle );
4129 static void dump_make_process_system_request( const struct make_process_system_request *req )
4133 static void dump_make_process_system_reply( const struct make_process_system_reply *req )
4135 fprintf( stderr, " event=%04x", req->event );
4138 static void dump_get_token_statistics_request( const struct get_token_statistics_request *req )
4140 fprintf( stderr, " handle=%04x", req->handle );
4143 static void dump_get_token_statistics_reply( const struct get_token_statistics_reply *req )
4145 dump_luid( " token_id=", &req->token_id );
4146 dump_luid( ", modified_id=", &req->modified_id );
4147 fprintf( stderr, ", primary=%d", req->primary );
4148 fprintf( stderr, ", impersonation_level=%d", req->impersonation_level );
4149 fprintf( stderr, ", group_count=%d", req->group_count );
4150 fprintf( stderr, ", privilege_count=%d", req->privilege_count );
4153 static void dump_create_completion_request( const struct create_completion_request *req )
4155 fprintf( stderr, " access=%08x", req->access );
4156 fprintf( stderr, ", concurrent=%08x", req->concurrent );
4157 dump_varargs_object_attributes( ", objattr=", cur_size );
4160 static void dump_create_completion_reply( const struct create_completion_reply *req )
4162 fprintf( stderr, " handle=%04x", req->handle );
4165 static void dump_open_completion_request( const struct open_completion_request *req )
4167 fprintf( stderr, " access=%08x", req->access );
4168 fprintf( stderr, ", attributes=%08x", req->attributes );
4169 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4170 dump_varargs_unicode_str( ", filename=", cur_size );
4173 static void dump_open_completion_reply( const struct open_completion_reply *req )
4175 fprintf( stderr, " handle=%04x", req->handle );
4178 static void dump_add_completion_request( const struct add_completion_request *req )
4180 fprintf( stderr, " handle=%04x", req->handle );
4181 dump_uint64( ", ckey=", &req->ckey );
4182 dump_uint64( ", cvalue=", &req->cvalue );
4183 dump_uint64( ", information=", &req->information );
4184 fprintf( stderr, ", status=%08x", req->status );
4187 static void dump_remove_completion_request( const struct remove_completion_request *req )
4189 fprintf( stderr, " handle=%04x", req->handle );
4192 static void dump_remove_completion_reply( const struct remove_completion_reply *req )
4194 dump_uint64( " ckey=", &req->ckey );
4195 dump_uint64( ", cvalue=", &req->cvalue );
4196 dump_uint64( ", information=", &req->information );
4197 fprintf( stderr, ", status=%08x", req->status );
4200 static void dump_query_completion_request( const struct query_completion_request *req )
4202 fprintf( stderr, " handle=%04x", req->handle );
4205 static void dump_query_completion_reply( const struct query_completion_reply *req )
4207 fprintf( stderr, " depth=%08x", req->depth );
4210 static void dump_set_completion_info_request( const struct set_completion_info_request *req )
4212 fprintf( stderr, " handle=%04x", req->handle );
4213 dump_uint64( ", ckey=", &req->ckey );
4214 fprintf( stderr, ", chandle=%04x", req->chandle );
4217 static void dump_add_fd_completion_request( const struct add_fd_completion_request *req )
4219 fprintf( stderr, " handle=%04x", req->handle );
4220 dump_uint64( ", cvalue=", &req->cvalue );
4221 dump_uint64( ", information=", &req->information );
4222 fprintf( stderr, ", status=%08x", req->status );
4223 fprintf( stderr, ", async=%d", req->async );
4226 static void dump_set_fd_completion_mode_request( const struct set_fd_completion_mode_request *req )
4228 fprintf( stderr, " handle=%04x", req->handle );
4229 fprintf( stderr, ", flags=%08x", req->flags );
4232 static void dump_set_fd_disp_info_request( const struct set_fd_disp_info_request *req )
4234 fprintf( stderr, " handle=%04x", req->handle );
4235 fprintf( stderr, ", unlink=%d", req->unlink );
4238 static void dump_set_fd_name_info_request( const struct set_fd_name_info_request *req )
4240 fprintf( stderr, " handle=%04x", req->handle );
4241 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4242 fprintf( stderr, ", link=%d", req->link );
4243 fprintf( stderr, ", replace=%d", req->replace );
4244 dump_varargs_string( ", filename=", cur_size );
4247 static void dump_get_window_layered_info_request( const struct get_window_layered_info_request *req )
4249 fprintf( stderr, " handle=%08x", req->handle );
4252 static void dump_get_window_layered_info_reply( const struct get_window_layered_info_reply *req )
4254 fprintf( stderr, " color_key=%08x", req->color_key );
4255 fprintf( stderr, ", alpha=%08x", req->alpha );
4256 fprintf( stderr, ", flags=%08x", req->flags );
4259 static void dump_set_window_layered_info_request( const struct set_window_layered_info_request *req )
4261 fprintf( stderr, " handle=%08x", req->handle );
4262 fprintf( stderr, ", color_key=%08x", req->color_key );
4263 fprintf( stderr, ", alpha=%08x", req->alpha );
4264 fprintf( stderr, ", flags=%08x", req->flags );
4267 static void dump_alloc_user_handle_request( const struct alloc_user_handle_request *req )
4271 static void dump_alloc_user_handle_reply( const struct alloc_user_handle_reply *req )
4273 fprintf( stderr, " handle=%08x", req->handle );
4276 static void dump_free_user_handle_request( const struct free_user_handle_request *req )
4278 fprintf( stderr, " handle=%08x", req->handle );
4281 static void dump_set_cursor_request( const struct set_cursor_request *req )
4283 fprintf( stderr, " flags=%08x", req->flags );
4284 fprintf( stderr, ", handle=%08x", req->handle );
4285 fprintf( stderr, ", show_count=%d", req->show_count );
4286 fprintf( stderr, ", x=%d", req->x );
4287 fprintf( stderr, ", y=%d", req->y );
4288 dump_rectangle( ", clip=", &req->clip );
4289 fprintf( stderr, ", clip_msg=%08x", req->clip_msg );
4292 static void dump_set_cursor_reply( const struct set_cursor_reply *req )
4294 fprintf( stderr, " prev_handle=%08x", req->prev_handle );
4295 fprintf( stderr, ", prev_count=%d", req->prev_count );
4296 fprintf( stderr, ", prev_x=%d", req->prev_x );
4297 fprintf( stderr, ", prev_y=%d", req->prev_y );
4298 fprintf( stderr, ", new_x=%d", req->new_x );
4299 fprintf( stderr, ", new_y=%d", req->new_y );
4300 dump_rectangle( ", new_clip=", &req->new_clip );
4301 fprintf( stderr, ", last_change=%08x", req->last_change );
4304 static void dump_get_cursor_history_request( const struct get_cursor_history_request *req )
4308 static void dump_get_cursor_history_reply( const struct get_cursor_history_reply *req )
4310 dump_varargs_cursor_positions( " history=", cur_size );
4313 static void dump_get_rawinput_buffer_request( const struct get_rawinput_buffer_request *req )
4315 fprintf( stderr, " rawinput_size=%u", req->rawinput_size );
4316 fprintf( stderr, ", buffer_size=%u", req->buffer_size );
4319 static void dump_get_rawinput_buffer_reply( const struct get_rawinput_buffer_reply *req )
4321 fprintf( stderr, " next_size=%u", req->next_size );
4322 fprintf( stderr, ", count=%08x", req->count );
4323 dump_varargs_bytes( ", data=", cur_size );
4326 static void dump_update_rawinput_devices_request( const struct update_rawinput_devices_request *req )
4328 dump_varargs_rawinput_devices( " devices=", cur_size );
4331 static void dump_get_rawinput_devices_request( const struct get_rawinput_devices_request *req )
4335 static void dump_get_rawinput_devices_reply( const struct get_rawinput_devices_reply *req )
4337 fprintf( stderr, " device_count=%08x", req->device_count );
4338 dump_varargs_rawinput_devices( ", devices=", cur_size );
4341 static void dump_create_job_request( const struct create_job_request *req )
4343 fprintf( stderr, " access=%08x", req->access );
4344 dump_varargs_object_attributes( ", objattr=", cur_size );
4347 static void dump_create_job_reply( const struct create_job_reply *req )
4349 fprintf( stderr, " handle=%04x", req->handle );
4352 static void dump_open_job_request( const struct open_job_request *req )
4354 fprintf( stderr, " access=%08x", req->access );
4355 fprintf( stderr, ", attributes=%08x", req->attributes );
4356 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4357 dump_varargs_unicode_str( ", name=", cur_size );
4360 static void dump_open_job_reply( const struct open_job_reply *req )
4362 fprintf( stderr, " handle=%04x", req->handle );
4365 static void dump_assign_job_request( const struct assign_job_request *req )
4367 fprintf( stderr, " job=%04x", req->job );
4368 fprintf( stderr, ", process=%04x", req->process );
4371 static void dump_process_in_job_request( const struct process_in_job_request *req )
4373 fprintf( stderr, " job=%04x", req->job );
4374 fprintf( stderr, ", process=%04x", req->process );
4377 static void dump_set_job_limits_request( const struct set_job_limits_request *req )
4379 fprintf( stderr, " handle=%04x", req->handle );
4380 fprintf( stderr, ", limit_flags=%08x", req->limit_flags );
4383 static void dump_set_job_completion_port_request( const struct set_job_completion_port_request *req )
4385 fprintf( stderr, " job=%04x", req->job );
4386 fprintf( stderr, ", port=%04x", req->port );
4387 dump_uint64( ", key=", &req->key );
4390 static void dump_get_job_info_request( const struct get_job_info_request *req )
4392 fprintf( stderr, " handle=%04x", req->handle );
4395 static void dump_get_job_info_reply( const struct get_job_info_reply *req )
4397 fprintf( stderr, " total_processes=%d", req->total_processes );
4398 fprintf( stderr, ", active_processes=%d", req->active_processes );
4401 static void dump_terminate_job_request( const struct terminate_job_request *req )
4403 fprintf( stderr, " handle=%04x", req->handle );
4404 fprintf( stderr, ", status=%d", req->status );
4407 static void dump_suspend_process_request( const struct suspend_process_request *req )
4409 fprintf( stderr, " handle=%04x", req->handle );
4412 static void dump_resume_process_request( const struct resume_process_request *req )
4414 fprintf( stderr, " handle=%04x", req->handle );
4417 static const dump_func req_dumpers[REQ_NB_REQUESTS] = {
4418 (dump_func)dump_new_process_request,
4419 (dump_func)dump_exec_process_request,
4420 (dump_func)dump_get_new_process_info_request,
4421 (dump_func)dump_new_thread_request,
4422 (dump_func)dump_get_startup_info_request,
4423 (dump_func)dump_init_process_done_request,
4424 (dump_func)dump_init_first_thread_request,
4425 (dump_func)dump_init_thread_request,
4426 (dump_func)dump_terminate_process_request,
4427 (dump_func)dump_terminate_thread_request,
4428 (dump_func)dump_get_process_info_request,
4429 (dump_func)dump_get_process_vm_counters_request,
4430 (dump_func)dump_set_process_info_request,
4431 (dump_func)dump_get_thread_info_request,
4432 (dump_func)dump_get_thread_times_request,
4433 (dump_func)dump_set_thread_info_request,
4434 (dump_func)dump_get_dll_info_request,
4435 (dump_func)dump_suspend_thread_request,
4436 (dump_func)dump_resume_thread_request,
4437 (dump_func)dump_load_dll_request,
4438 (dump_func)dump_unload_dll_request,
4439 (dump_func)dump_queue_apc_request,
4440 (dump_func)dump_get_apc_result_request,
4441 (dump_func)dump_close_handle_request,
4442 (dump_func)dump_set_handle_info_request,
4443 (dump_func)dump_dup_handle_request,
4444 (dump_func)dump_make_temporary_request,
4445 (dump_func)dump_open_process_request,
4446 (dump_func)dump_open_thread_request,
4447 (dump_func)dump_select_request,
4448 (dump_func)dump_create_event_request,
4449 (dump_func)dump_event_op_request,
4450 (dump_func)dump_query_event_request,
4451 (dump_func)dump_open_event_request,
4452 (dump_func)dump_create_keyed_event_request,
4453 (dump_func)dump_open_keyed_event_request,
4454 (dump_func)dump_create_mutex_request,
4455 (dump_func)dump_release_mutex_request,
4456 (dump_func)dump_open_mutex_request,
4457 (dump_func)dump_query_mutex_request,
4458 (dump_func)dump_create_semaphore_request,
4459 (dump_func)dump_release_semaphore_request,
4460 (dump_func)dump_query_semaphore_request,
4461 (dump_func)dump_open_semaphore_request,
4462 (dump_func)dump_create_file_request,
4463 (dump_func)dump_open_file_object_request,
4464 (dump_func)dump_alloc_file_handle_request,
4465 (dump_func)dump_get_handle_unix_name_request,
4466 (dump_func)dump_get_handle_fd_request,
4467 (dump_func)dump_get_directory_cache_entry_request,
4468 (dump_func)dump_flush_request,
4469 (dump_func)dump_get_file_info_request,
4470 (dump_func)dump_get_volume_info_request,
4471 (dump_func)dump_lock_file_request,
4472 (dump_func)dump_unlock_file_request,
4473 (dump_func)dump_set_socket_event_request,
4474 (dump_func)dump_get_socket_event_request,
4475 (dump_func)dump_get_socket_info_request,
4476 (dump_func)dump_enable_socket_event_request,
4477 (dump_func)dump_set_socket_deferred_request,
4478 (dump_func)dump_get_next_console_request_request,
4479 (dump_func)dump_read_directory_changes_request,
4480 (dump_func)dump_read_change_request,
4481 (dump_func)dump_create_mapping_request,
4482 (dump_func)dump_open_mapping_request,
4483 (dump_func)dump_get_mapping_info_request,
4484 (dump_func)dump_map_view_request,
4485 (dump_func)dump_unmap_view_request,
4486 (dump_func)dump_get_mapping_committed_range_request,
4487 (dump_func)dump_add_mapping_committed_range_request,
4488 (dump_func)dump_is_same_mapping_request,
4489 (dump_func)dump_list_processes_request,
4490 (dump_func)dump_create_debug_obj_request,
4491 (dump_func)dump_wait_debug_event_request,
4492 (dump_func)dump_queue_exception_event_request,
4493 (dump_func)dump_get_exception_status_request,
4494 (dump_func)dump_continue_debug_event_request,
4495 (dump_func)dump_debug_process_request,
4496 (dump_func)dump_set_debug_obj_info_request,
4497 (dump_func)dump_read_process_memory_request,
4498 (dump_func)dump_write_process_memory_request,
4499 (dump_func)dump_create_key_request,
4500 (dump_func)dump_open_key_request,
4501 (dump_func)dump_delete_key_request,
4502 (dump_func)dump_flush_key_request,
4503 (dump_func)dump_enum_key_request,
4504 (dump_func)dump_set_key_value_request,
4505 (dump_func)dump_get_key_value_request,
4506 (dump_func)dump_enum_key_value_request,
4507 (dump_func)dump_delete_key_value_request,
4508 (dump_func)dump_load_registry_request,
4509 (dump_func)dump_unload_registry_request,
4510 (dump_func)dump_save_registry_request,
4511 (dump_func)dump_set_registry_notification_request,
4512 (dump_func)dump_create_timer_request,
4513 (dump_func)dump_open_timer_request,
4514 (dump_func)dump_set_timer_request,
4515 (dump_func)dump_cancel_timer_request,
4516 (dump_func)dump_get_timer_info_request,
4517 (dump_func)dump_get_thread_context_request,
4518 (dump_func)dump_set_thread_context_request,
4519 (dump_func)dump_get_selector_entry_request,
4520 (dump_func)dump_add_atom_request,
4521 (dump_func)dump_delete_atom_request,
4522 (dump_func)dump_find_atom_request,
4523 (dump_func)dump_get_atom_information_request,
4524 (dump_func)dump_set_atom_information_request,
4525 (dump_func)dump_empty_atom_table_request,
4526 (dump_func)dump_init_atom_table_request,
4527 (dump_func)dump_get_msg_queue_request,
4528 (dump_func)dump_set_queue_fd_request,
4529 (dump_func)dump_set_queue_mask_request,
4530 (dump_func)dump_get_queue_status_request,
4531 (dump_func)dump_get_process_idle_event_request,
4532 (dump_func)dump_send_message_request,
4533 (dump_func)dump_post_quit_message_request,
4534 (dump_func)dump_send_hardware_message_request,
4535 (dump_func)dump_get_message_request,
4536 (dump_func)dump_reply_message_request,
4537 (dump_func)dump_accept_hardware_message_request,
4538 (dump_func)dump_get_message_reply_request,
4539 (dump_func)dump_set_win_timer_request,
4540 (dump_func)dump_kill_win_timer_request,
4541 (dump_func)dump_is_window_hung_request,
4542 (dump_func)dump_get_serial_info_request,
4543 (dump_func)dump_set_serial_info_request,
4544 (dump_func)dump_register_async_request,
4545 (dump_func)dump_cancel_async_request,
4546 (dump_func)dump_get_async_result_request,
4547 (dump_func)dump_read_request,
4548 (dump_func)dump_write_request,
4549 (dump_func)dump_ioctl_request,
4550 (dump_func)dump_set_irp_result_request,
4551 (dump_func)dump_create_named_pipe_request,
4552 (dump_func)dump_set_named_pipe_info_request,
4553 (dump_func)dump_create_window_request,
4554 (dump_func)dump_destroy_window_request,
4555 (dump_func)dump_get_desktop_window_request,
4556 (dump_func)dump_set_window_owner_request,
4557 (dump_func)dump_get_window_info_request,
4558 (dump_func)dump_set_window_info_request,
4559 (dump_func)dump_set_parent_request,
4560 (dump_func)dump_get_window_parents_request,
4561 (dump_func)dump_get_window_children_request,
4562 (dump_func)dump_get_window_children_from_point_request,
4563 (dump_func)dump_get_window_tree_request,
4564 (dump_func)dump_set_window_pos_request,
4565 (dump_func)dump_get_window_rectangles_request,
4566 (dump_func)dump_get_window_text_request,
4567 (dump_func)dump_set_window_text_request,
4568 (dump_func)dump_get_windows_offset_request,
4569 (dump_func)dump_get_visible_region_request,
4570 (dump_func)dump_get_surface_region_request,
4571 (dump_func)dump_get_window_region_request,
4572 (dump_func)dump_set_window_region_request,
4573 (dump_func)dump_get_update_region_request,
4574 (dump_func)dump_update_window_zorder_request,
4575 (dump_func)dump_redraw_window_request,
4576 (dump_func)dump_set_window_property_request,
4577 (dump_func)dump_remove_window_property_request,
4578 (dump_func)dump_get_window_property_request,
4579 (dump_func)dump_get_window_properties_request,
4580 (dump_func)dump_create_winstation_request,
4581 (dump_func)dump_open_winstation_request,
4582 (dump_func)dump_close_winstation_request,
4583 (dump_func)dump_get_process_winstation_request,
4584 (dump_func)dump_set_process_winstation_request,
4585 (dump_func)dump_enum_winstation_request,
4586 (dump_func)dump_create_desktop_request,
4587 (dump_func)dump_open_desktop_request,
4588 (dump_func)dump_open_input_desktop_request,
4589 (dump_func)dump_close_desktop_request,
4590 (dump_func)dump_get_thread_desktop_request,
4591 (dump_func)dump_set_thread_desktop_request,
4592 (dump_func)dump_enum_desktop_request,
4593 (dump_func)dump_set_user_object_info_request,
4594 (dump_func)dump_register_hotkey_request,
4595 (dump_func)dump_unregister_hotkey_request,
4596 (dump_func)dump_attach_thread_input_request,
4597 (dump_func)dump_get_thread_input_request,
4598 (dump_func)dump_get_last_input_time_request,
4599 (dump_func)dump_get_key_state_request,
4600 (dump_func)dump_set_key_state_request,
4601 (dump_func)dump_set_foreground_window_request,
4602 (dump_func)dump_set_focus_window_request,
4603 (dump_func)dump_set_active_window_request,
4604 (dump_func)dump_set_capture_window_request,
4605 (dump_func)dump_set_caret_window_request,
4606 (dump_func)dump_set_caret_info_request,
4607 (dump_func)dump_set_hook_request,
4608 (dump_func)dump_remove_hook_request,
4609 (dump_func)dump_start_hook_chain_request,
4610 (dump_func)dump_finish_hook_chain_request,
4611 (dump_func)dump_get_hook_info_request,
4612 (dump_func)dump_create_class_request,
4613 (dump_func)dump_destroy_class_request,
4614 (dump_func)dump_set_class_info_request,
4615 (dump_func)dump_open_clipboard_request,
4616 (dump_func)dump_close_clipboard_request,
4617 (dump_func)dump_empty_clipboard_request,
4618 (dump_func)dump_set_clipboard_data_request,
4619 (dump_func)dump_get_clipboard_data_request,
4620 (dump_func)dump_get_clipboard_formats_request,
4621 (dump_func)dump_enum_clipboard_formats_request,
4622 (dump_func)dump_release_clipboard_request,
4623 (dump_func)dump_get_clipboard_info_request,
4624 (dump_func)dump_set_clipboard_viewer_request,
4625 (dump_func)dump_add_clipboard_listener_request,
4626 (dump_func)dump_remove_clipboard_listener_request,
4627 (dump_func)dump_open_token_request,
4628 (dump_func)dump_set_global_windows_request,
4629 (dump_func)dump_adjust_token_privileges_request,
4630 (dump_func)dump_get_token_privileges_request,
4631 (dump_func)dump_check_token_privileges_request,
4632 (dump_func)dump_duplicate_token_request,
4633 (dump_func)dump_filter_token_request,
4634 (dump_func)dump_access_check_request,
4635 (dump_func)dump_get_token_sid_request,
4636 (dump_func)dump_get_token_groups_request,
4637 (dump_func)dump_get_token_default_dacl_request,
4638 (dump_func)dump_set_token_default_dacl_request,
4639 (dump_func)dump_set_security_object_request,
4640 (dump_func)dump_get_security_object_request,
4641 (dump_func)dump_get_system_handles_request,
4642 (dump_func)dump_create_mailslot_request,
4643 (dump_func)dump_set_mailslot_info_request,
4644 (dump_func)dump_create_directory_request,
4645 (dump_func)dump_open_directory_request,
4646 (dump_func)dump_get_directory_entry_request,
4647 (dump_func)dump_create_symlink_request,
4648 (dump_func)dump_open_symlink_request,
4649 (dump_func)dump_query_symlink_request,
4650 (dump_func)dump_get_object_info_request,
4651 (dump_func)dump_get_object_type_request,
4652 (dump_func)dump_get_token_impersonation_level_request,
4653 (dump_func)dump_allocate_locally_unique_id_request,
4654 (dump_func)dump_create_device_manager_request,
4655 (dump_func)dump_create_device_request,
4656 (dump_func)dump_delete_device_request,
4657 (dump_func)dump_get_next_device_request_request,
4658 (dump_func)dump_get_kernel_object_ptr_request,
4659 (dump_func)dump_set_kernel_object_ptr_request,
4660 (dump_func)dump_grab_kernel_object_request,
4661 (dump_func)dump_release_kernel_object_request,
4662 (dump_func)dump_get_kernel_object_handle_request,
4663 (dump_func)dump_make_process_system_request,
4664 (dump_func)dump_get_token_statistics_request,
4665 (dump_func)dump_create_completion_request,
4666 (dump_func)dump_open_completion_request,
4667 (dump_func)dump_add_completion_request,
4668 (dump_func)dump_remove_completion_request,
4669 (dump_func)dump_query_completion_request,
4670 (dump_func)dump_set_completion_info_request,
4671 (dump_func)dump_add_fd_completion_request,
4672 (dump_func)dump_set_fd_completion_mode_request,
4673 (dump_func)dump_set_fd_disp_info_request,
4674 (dump_func)dump_set_fd_name_info_request,
4675 (dump_func)dump_get_window_layered_info_request,
4676 (dump_func)dump_set_window_layered_info_request,
4677 (dump_func)dump_alloc_user_handle_request,
4678 (dump_func)dump_free_user_handle_request,
4679 (dump_func)dump_set_cursor_request,
4680 (dump_func)dump_get_cursor_history_request,
4681 (dump_func)dump_get_rawinput_buffer_request,
4682 (dump_func)dump_update_rawinput_devices_request,
4683 (dump_func)dump_get_rawinput_devices_request,
4684 (dump_func)dump_create_job_request,
4685 (dump_func)dump_open_job_request,
4686 (dump_func)dump_assign_job_request,
4687 (dump_func)dump_process_in_job_request,
4688 (dump_func)dump_set_job_limits_request,
4689 (dump_func)dump_set_job_completion_port_request,
4690 (dump_func)dump_get_job_info_request,
4691 (dump_func)dump_terminate_job_request,
4692 (dump_func)dump_suspend_process_request,
4693 (dump_func)dump_resume_process_request,
4696 static const dump_func reply_dumpers[REQ_NB_REQUESTS] = {
4697 (dump_func)dump_new_process_reply,
4698 NULL,
4699 (dump_func)dump_get_new_process_info_reply,
4700 (dump_func)dump_new_thread_reply,
4701 (dump_func)dump_get_startup_info_reply,
4702 (dump_func)dump_init_process_done_reply,
4703 (dump_func)dump_init_first_thread_reply,
4704 (dump_func)dump_init_thread_reply,
4705 (dump_func)dump_terminate_process_reply,
4706 (dump_func)dump_terminate_thread_reply,
4707 (dump_func)dump_get_process_info_reply,
4708 (dump_func)dump_get_process_vm_counters_reply,
4709 NULL,
4710 (dump_func)dump_get_thread_info_reply,
4711 (dump_func)dump_get_thread_times_reply,
4712 NULL,
4713 (dump_func)dump_get_dll_info_reply,
4714 (dump_func)dump_suspend_thread_reply,
4715 (dump_func)dump_resume_thread_reply,
4716 NULL,
4717 NULL,
4718 (dump_func)dump_queue_apc_reply,
4719 (dump_func)dump_get_apc_result_reply,
4720 NULL,
4721 (dump_func)dump_set_handle_info_reply,
4722 (dump_func)dump_dup_handle_reply,
4723 NULL,
4724 (dump_func)dump_open_process_reply,
4725 (dump_func)dump_open_thread_reply,
4726 (dump_func)dump_select_reply,
4727 (dump_func)dump_create_event_reply,
4728 (dump_func)dump_event_op_reply,
4729 (dump_func)dump_query_event_reply,
4730 (dump_func)dump_open_event_reply,
4731 (dump_func)dump_create_keyed_event_reply,
4732 (dump_func)dump_open_keyed_event_reply,
4733 (dump_func)dump_create_mutex_reply,
4734 (dump_func)dump_release_mutex_reply,
4735 (dump_func)dump_open_mutex_reply,
4736 (dump_func)dump_query_mutex_reply,
4737 (dump_func)dump_create_semaphore_reply,
4738 (dump_func)dump_release_semaphore_reply,
4739 (dump_func)dump_query_semaphore_reply,
4740 (dump_func)dump_open_semaphore_reply,
4741 (dump_func)dump_create_file_reply,
4742 (dump_func)dump_open_file_object_reply,
4743 (dump_func)dump_alloc_file_handle_reply,
4744 (dump_func)dump_get_handle_unix_name_reply,
4745 (dump_func)dump_get_handle_fd_reply,
4746 (dump_func)dump_get_directory_cache_entry_reply,
4747 (dump_func)dump_flush_reply,
4748 (dump_func)dump_get_file_info_reply,
4749 (dump_func)dump_get_volume_info_reply,
4750 (dump_func)dump_lock_file_reply,
4751 NULL,
4752 NULL,
4753 (dump_func)dump_get_socket_event_reply,
4754 (dump_func)dump_get_socket_info_reply,
4755 NULL,
4756 NULL,
4757 (dump_func)dump_get_next_console_request_reply,
4758 NULL,
4759 (dump_func)dump_read_change_reply,
4760 (dump_func)dump_create_mapping_reply,
4761 (dump_func)dump_open_mapping_reply,
4762 (dump_func)dump_get_mapping_info_reply,
4763 NULL,
4764 NULL,
4765 (dump_func)dump_get_mapping_committed_range_reply,
4766 NULL,
4767 NULL,
4768 (dump_func)dump_list_processes_reply,
4769 (dump_func)dump_create_debug_obj_reply,
4770 (dump_func)dump_wait_debug_event_reply,
4771 (dump_func)dump_queue_exception_event_reply,
4772 NULL,
4773 NULL,
4774 NULL,
4775 NULL,
4776 (dump_func)dump_read_process_memory_reply,
4777 NULL,
4778 (dump_func)dump_create_key_reply,
4779 (dump_func)dump_open_key_reply,
4780 NULL,
4781 NULL,
4782 (dump_func)dump_enum_key_reply,
4783 NULL,
4784 (dump_func)dump_get_key_value_reply,
4785 (dump_func)dump_enum_key_value_reply,
4786 NULL,
4787 NULL,
4788 NULL,
4789 NULL,
4790 NULL,
4791 (dump_func)dump_create_timer_reply,
4792 (dump_func)dump_open_timer_reply,
4793 (dump_func)dump_set_timer_reply,
4794 (dump_func)dump_cancel_timer_reply,
4795 (dump_func)dump_get_timer_info_reply,
4796 (dump_func)dump_get_thread_context_reply,
4797 (dump_func)dump_set_thread_context_reply,
4798 (dump_func)dump_get_selector_entry_reply,
4799 (dump_func)dump_add_atom_reply,
4800 NULL,
4801 (dump_func)dump_find_atom_reply,
4802 (dump_func)dump_get_atom_information_reply,
4803 NULL,
4804 NULL,
4805 (dump_func)dump_init_atom_table_reply,
4806 (dump_func)dump_get_msg_queue_reply,
4807 NULL,
4808 (dump_func)dump_set_queue_mask_reply,
4809 (dump_func)dump_get_queue_status_reply,
4810 (dump_func)dump_get_process_idle_event_reply,
4811 NULL,
4812 NULL,
4813 (dump_func)dump_send_hardware_message_reply,
4814 (dump_func)dump_get_message_reply,
4815 NULL,
4816 NULL,
4817 (dump_func)dump_get_message_reply_reply,
4818 (dump_func)dump_set_win_timer_reply,
4819 NULL,
4820 (dump_func)dump_is_window_hung_reply,
4821 (dump_func)dump_get_serial_info_reply,
4822 NULL,
4823 NULL,
4824 NULL,
4825 (dump_func)dump_get_async_result_reply,
4826 (dump_func)dump_read_reply,
4827 (dump_func)dump_write_reply,
4828 (dump_func)dump_ioctl_reply,
4829 NULL,
4830 (dump_func)dump_create_named_pipe_reply,
4831 NULL,
4832 (dump_func)dump_create_window_reply,
4833 NULL,
4834 (dump_func)dump_get_desktop_window_reply,
4835 (dump_func)dump_set_window_owner_reply,
4836 (dump_func)dump_get_window_info_reply,
4837 (dump_func)dump_set_window_info_reply,
4838 (dump_func)dump_set_parent_reply,
4839 (dump_func)dump_get_window_parents_reply,
4840 (dump_func)dump_get_window_children_reply,
4841 (dump_func)dump_get_window_children_from_point_reply,
4842 (dump_func)dump_get_window_tree_reply,
4843 (dump_func)dump_set_window_pos_reply,
4844 (dump_func)dump_get_window_rectangles_reply,
4845 (dump_func)dump_get_window_text_reply,
4846 NULL,
4847 (dump_func)dump_get_windows_offset_reply,
4848 (dump_func)dump_get_visible_region_reply,
4849 (dump_func)dump_get_surface_region_reply,
4850 (dump_func)dump_get_window_region_reply,
4851 NULL,
4852 (dump_func)dump_get_update_region_reply,
4853 NULL,
4854 NULL,
4855 NULL,
4856 (dump_func)dump_remove_window_property_reply,
4857 (dump_func)dump_get_window_property_reply,
4858 (dump_func)dump_get_window_properties_reply,
4859 (dump_func)dump_create_winstation_reply,
4860 (dump_func)dump_open_winstation_reply,
4861 NULL,
4862 (dump_func)dump_get_process_winstation_reply,
4863 NULL,
4864 (dump_func)dump_enum_winstation_reply,
4865 (dump_func)dump_create_desktop_reply,
4866 (dump_func)dump_open_desktop_reply,
4867 (dump_func)dump_open_input_desktop_reply,
4868 NULL,
4869 (dump_func)dump_get_thread_desktop_reply,
4870 NULL,
4871 (dump_func)dump_enum_desktop_reply,
4872 (dump_func)dump_set_user_object_info_reply,
4873 (dump_func)dump_register_hotkey_reply,
4874 (dump_func)dump_unregister_hotkey_reply,
4875 NULL,
4876 (dump_func)dump_get_thread_input_reply,
4877 (dump_func)dump_get_last_input_time_reply,
4878 (dump_func)dump_get_key_state_reply,
4879 NULL,
4880 (dump_func)dump_set_foreground_window_reply,
4881 (dump_func)dump_set_focus_window_reply,
4882 (dump_func)dump_set_active_window_reply,
4883 (dump_func)dump_set_capture_window_reply,
4884 (dump_func)dump_set_caret_window_reply,
4885 (dump_func)dump_set_caret_info_reply,
4886 (dump_func)dump_set_hook_reply,
4887 (dump_func)dump_remove_hook_reply,
4888 (dump_func)dump_start_hook_chain_reply,
4889 NULL,
4890 (dump_func)dump_get_hook_info_reply,
4891 (dump_func)dump_create_class_reply,
4892 (dump_func)dump_destroy_class_reply,
4893 (dump_func)dump_set_class_info_reply,
4894 (dump_func)dump_open_clipboard_reply,
4895 (dump_func)dump_close_clipboard_reply,
4896 NULL,
4897 (dump_func)dump_set_clipboard_data_reply,
4898 (dump_func)dump_get_clipboard_data_reply,
4899 (dump_func)dump_get_clipboard_formats_reply,
4900 (dump_func)dump_enum_clipboard_formats_reply,
4901 (dump_func)dump_release_clipboard_reply,
4902 (dump_func)dump_get_clipboard_info_reply,
4903 (dump_func)dump_set_clipboard_viewer_reply,
4904 NULL,
4905 NULL,
4906 (dump_func)dump_open_token_reply,
4907 (dump_func)dump_set_global_windows_reply,
4908 (dump_func)dump_adjust_token_privileges_reply,
4909 (dump_func)dump_get_token_privileges_reply,
4910 (dump_func)dump_check_token_privileges_reply,
4911 (dump_func)dump_duplicate_token_reply,
4912 (dump_func)dump_filter_token_reply,
4913 (dump_func)dump_access_check_reply,
4914 (dump_func)dump_get_token_sid_reply,
4915 (dump_func)dump_get_token_groups_reply,
4916 (dump_func)dump_get_token_default_dacl_reply,
4917 NULL,
4918 NULL,
4919 (dump_func)dump_get_security_object_reply,
4920 (dump_func)dump_get_system_handles_reply,
4921 (dump_func)dump_create_mailslot_reply,
4922 (dump_func)dump_set_mailslot_info_reply,
4923 (dump_func)dump_create_directory_reply,
4924 (dump_func)dump_open_directory_reply,
4925 (dump_func)dump_get_directory_entry_reply,
4926 (dump_func)dump_create_symlink_reply,
4927 (dump_func)dump_open_symlink_reply,
4928 (dump_func)dump_query_symlink_reply,
4929 (dump_func)dump_get_object_info_reply,
4930 (dump_func)dump_get_object_type_reply,
4931 (dump_func)dump_get_token_impersonation_level_reply,
4932 (dump_func)dump_allocate_locally_unique_id_reply,
4933 (dump_func)dump_create_device_manager_reply,
4934 NULL,
4935 NULL,
4936 (dump_func)dump_get_next_device_request_reply,
4937 (dump_func)dump_get_kernel_object_ptr_reply,
4938 NULL,
4939 NULL,
4940 NULL,
4941 (dump_func)dump_get_kernel_object_handle_reply,
4942 (dump_func)dump_make_process_system_reply,
4943 (dump_func)dump_get_token_statistics_reply,
4944 (dump_func)dump_create_completion_reply,
4945 (dump_func)dump_open_completion_reply,
4946 NULL,
4947 (dump_func)dump_remove_completion_reply,
4948 (dump_func)dump_query_completion_reply,
4949 NULL,
4950 NULL,
4951 NULL,
4952 NULL,
4953 NULL,
4954 (dump_func)dump_get_window_layered_info_reply,
4955 NULL,
4956 (dump_func)dump_alloc_user_handle_reply,
4957 NULL,
4958 (dump_func)dump_set_cursor_reply,
4959 (dump_func)dump_get_cursor_history_reply,
4960 (dump_func)dump_get_rawinput_buffer_reply,
4961 NULL,
4962 (dump_func)dump_get_rawinput_devices_reply,
4963 (dump_func)dump_create_job_reply,
4964 (dump_func)dump_open_job_reply,
4965 NULL,
4966 NULL,
4967 NULL,
4968 NULL,
4969 (dump_func)dump_get_job_info_reply,
4970 NULL,
4971 NULL,
4972 NULL,
4975 static const char * const req_names[REQ_NB_REQUESTS] = {
4976 "new_process",
4977 "exec_process",
4978 "get_new_process_info",
4979 "new_thread",
4980 "get_startup_info",
4981 "init_process_done",
4982 "init_first_thread",
4983 "init_thread",
4984 "terminate_process",
4985 "terminate_thread",
4986 "get_process_info",
4987 "get_process_vm_counters",
4988 "set_process_info",
4989 "get_thread_info",
4990 "get_thread_times",
4991 "set_thread_info",
4992 "get_dll_info",
4993 "suspend_thread",
4994 "resume_thread",
4995 "load_dll",
4996 "unload_dll",
4997 "queue_apc",
4998 "get_apc_result",
4999 "close_handle",
5000 "set_handle_info",
5001 "dup_handle",
5002 "make_temporary",
5003 "open_process",
5004 "open_thread",
5005 "select",
5006 "create_event",
5007 "event_op",
5008 "query_event",
5009 "open_event",
5010 "create_keyed_event",
5011 "open_keyed_event",
5012 "create_mutex",
5013 "release_mutex",
5014 "open_mutex",
5015 "query_mutex",
5016 "create_semaphore",
5017 "release_semaphore",
5018 "query_semaphore",
5019 "open_semaphore",
5020 "create_file",
5021 "open_file_object",
5022 "alloc_file_handle",
5023 "get_handle_unix_name",
5024 "get_handle_fd",
5025 "get_directory_cache_entry",
5026 "flush",
5027 "get_file_info",
5028 "get_volume_info",
5029 "lock_file",
5030 "unlock_file",
5031 "set_socket_event",
5032 "get_socket_event",
5033 "get_socket_info",
5034 "enable_socket_event",
5035 "set_socket_deferred",
5036 "get_next_console_request",
5037 "read_directory_changes",
5038 "read_change",
5039 "create_mapping",
5040 "open_mapping",
5041 "get_mapping_info",
5042 "map_view",
5043 "unmap_view",
5044 "get_mapping_committed_range",
5045 "add_mapping_committed_range",
5046 "is_same_mapping",
5047 "list_processes",
5048 "create_debug_obj",
5049 "wait_debug_event",
5050 "queue_exception_event",
5051 "get_exception_status",
5052 "continue_debug_event",
5053 "debug_process",
5054 "set_debug_obj_info",
5055 "read_process_memory",
5056 "write_process_memory",
5057 "create_key",
5058 "open_key",
5059 "delete_key",
5060 "flush_key",
5061 "enum_key",
5062 "set_key_value",
5063 "get_key_value",
5064 "enum_key_value",
5065 "delete_key_value",
5066 "load_registry",
5067 "unload_registry",
5068 "save_registry",
5069 "set_registry_notification",
5070 "create_timer",
5071 "open_timer",
5072 "set_timer",
5073 "cancel_timer",
5074 "get_timer_info",
5075 "get_thread_context",
5076 "set_thread_context",
5077 "get_selector_entry",
5078 "add_atom",
5079 "delete_atom",
5080 "find_atom",
5081 "get_atom_information",
5082 "set_atom_information",
5083 "empty_atom_table",
5084 "init_atom_table",
5085 "get_msg_queue",
5086 "set_queue_fd",
5087 "set_queue_mask",
5088 "get_queue_status",
5089 "get_process_idle_event",
5090 "send_message",
5091 "post_quit_message",
5092 "send_hardware_message",
5093 "get_message",
5094 "reply_message",
5095 "accept_hardware_message",
5096 "get_message_reply",
5097 "set_win_timer",
5098 "kill_win_timer",
5099 "is_window_hung",
5100 "get_serial_info",
5101 "set_serial_info",
5102 "register_async",
5103 "cancel_async",
5104 "get_async_result",
5105 "read",
5106 "write",
5107 "ioctl",
5108 "set_irp_result",
5109 "create_named_pipe",
5110 "set_named_pipe_info",
5111 "create_window",
5112 "destroy_window",
5113 "get_desktop_window",
5114 "set_window_owner",
5115 "get_window_info",
5116 "set_window_info",
5117 "set_parent",
5118 "get_window_parents",
5119 "get_window_children",
5120 "get_window_children_from_point",
5121 "get_window_tree",
5122 "set_window_pos",
5123 "get_window_rectangles",
5124 "get_window_text",
5125 "set_window_text",
5126 "get_windows_offset",
5127 "get_visible_region",
5128 "get_surface_region",
5129 "get_window_region",
5130 "set_window_region",
5131 "get_update_region",
5132 "update_window_zorder",
5133 "redraw_window",
5134 "set_window_property",
5135 "remove_window_property",
5136 "get_window_property",
5137 "get_window_properties",
5138 "create_winstation",
5139 "open_winstation",
5140 "close_winstation",
5141 "get_process_winstation",
5142 "set_process_winstation",
5143 "enum_winstation",
5144 "create_desktop",
5145 "open_desktop",
5146 "open_input_desktop",
5147 "close_desktop",
5148 "get_thread_desktop",
5149 "set_thread_desktop",
5150 "enum_desktop",
5151 "set_user_object_info",
5152 "register_hotkey",
5153 "unregister_hotkey",
5154 "attach_thread_input",
5155 "get_thread_input",
5156 "get_last_input_time",
5157 "get_key_state",
5158 "set_key_state",
5159 "set_foreground_window",
5160 "set_focus_window",
5161 "set_active_window",
5162 "set_capture_window",
5163 "set_caret_window",
5164 "set_caret_info",
5165 "set_hook",
5166 "remove_hook",
5167 "start_hook_chain",
5168 "finish_hook_chain",
5169 "get_hook_info",
5170 "create_class",
5171 "destroy_class",
5172 "set_class_info",
5173 "open_clipboard",
5174 "close_clipboard",
5175 "empty_clipboard",
5176 "set_clipboard_data",
5177 "get_clipboard_data",
5178 "get_clipboard_formats",
5179 "enum_clipboard_formats",
5180 "release_clipboard",
5181 "get_clipboard_info",
5182 "set_clipboard_viewer",
5183 "add_clipboard_listener",
5184 "remove_clipboard_listener",
5185 "open_token",
5186 "set_global_windows",
5187 "adjust_token_privileges",
5188 "get_token_privileges",
5189 "check_token_privileges",
5190 "duplicate_token",
5191 "filter_token",
5192 "access_check",
5193 "get_token_sid",
5194 "get_token_groups",
5195 "get_token_default_dacl",
5196 "set_token_default_dacl",
5197 "set_security_object",
5198 "get_security_object",
5199 "get_system_handles",
5200 "create_mailslot",
5201 "set_mailslot_info",
5202 "create_directory",
5203 "open_directory",
5204 "get_directory_entry",
5205 "create_symlink",
5206 "open_symlink",
5207 "query_symlink",
5208 "get_object_info",
5209 "get_object_type",
5210 "get_token_impersonation_level",
5211 "allocate_locally_unique_id",
5212 "create_device_manager",
5213 "create_device",
5214 "delete_device",
5215 "get_next_device_request",
5216 "get_kernel_object_ptr",
5217 "set_kernel_object_ptr",
5218 "grab_kernel_object",
5219 "release_kernel_object",
5220 "get_kernel_object_handle",
5221 "make_process_system",
5222 "get_token_statistics",
5223 "create_completion",
5224 "open_completion",
5225 "add_completion",
5226 "remove_completion",
5227 "query_completion",
5228 "set_completion_info",
5229 "add_fd_completion",
5230 "set_fd_completion_mode",
5231 "set_fd_disp_info",
5232 "set_fd_name_info",
5233 "get_window_layered_info",
5234 "set_window_layered_info",
5235 "alloc_user_handle",
5236 "free_user_handle",
5237 "set_cursor",
5238 "get_cursor_history",
5239 "get_rawinput_buffer",
5240 "update_rawinput_devices",
5241 "get_rawinput_devices",
5242 "create_job",
5243 "open_job",
5244 "assign_job",
5245 "process_in_job",
5246 "set_job_limits",
5247 "set_job_completion_port",
5248 "get_job_info",
5249 "terminate_job",
5250 "suspend_process",
5251 "resume_process",
5254 static const struct
5256 const char *name;
5257 unsigned int value;
5258 } status_names[] =
5260 { "ABANDONED_WAIT_0", STATUS_ABANDONED_WAIT_0 },
5261 { "ACCESS_DENIED", STATUS_ACCESS_DENIED },
5262 { "ACCESS_VIOLATION", STATUS_ACCESS_VIOLATION },
5263 { "ADDRESS_ALREADY_ASSOCIATED", STATUS_ADDRESS_ALREADY_ASSOCIATED },
5264 { "ALERTED", STATUS_ALERTED },
5265 { "BAD_DEVICE_TYPE", STATUS_BAD_DEVICE_TYPE },
5266 { "BAD_IMPERSONATION_LEVEL", STATUS_BAD_IMPERSONATION_LEVEL },
5267 { "BUFFER_OVERFLOW", STATUS_BUFFER_OVERFLOW },
5268 { "BUFFER_TOO_SMALL", STATUS_BUFFER_TOO_SMALL },
5269 { "CANCELLED", STATUS_CANCELLED },
5270 { "CANNOT_DELETE", STATUS_CANNOT_DELETE },
5271 { "CANT_OPEN_ANONYMOUS", STATUS_CANT_OPEN_ANONYMOUS },
5272 { "CANT_WAIT", STATUS_CANT_WAIT },
5273 { "CHILD_MUST_BE_VOLATILE", STATUS_CHILD_MUST_BE_VOLATILE },
5274 { "CONNECTION_ABORTED", STATUS_CONNECTION_ABORTED },
5275 { "CONNECTION_DISCONNECTED", STATUS_CONNECTION_DISCONNECTED },
5276 { "CONNECTION_REFUSED", STATUS_CONNECTION_REFUSED },
5277 { "CONNECTION_RESET", STATUS_CONNECTION_RESET },
5278 { "DEBUGGER_INACTIVE", STATUS_DEBUGGER_INACTIVE },
5279 { "DEVICE_BUSY", STATUS_DEVICE_BUSY },
5280 { "DIRECTORY_NOT_EMPTY", STATUS_DIRECTORY_NOT_EMPTY },
5281 { "DISK_FULL", STATUS_DISK_FULL },
5282 { "DLL_NOT_FOUND", STATUS_DLL_NOT_FOUND },
5283 { "ERROR_CLASS_ALREADY_EXISTS", 0xc0010000 | ERROR_CLASS_ALREADY_EXISTS },
5284 { "ERROR_CLASS_DOES_NOT_EXIST", 0xc0010000 | ERROR_CLASS_DOES_NOT_EXIST },
5285 { "ERROR_CLASS_HAS_WINDOWS", 0xc0010000 | ERROR_CLASS_HAS_WINDOWS },
5286 { "ERROR_CLIPBOARD_NOT_OPEN", 0xc0010000 | ERROR_CLIPBOARD_NOT_OPEN },
5287 { "ERROR_HOTKEY_ALREADY_REGISTERED", 0xc0010000 | ERROR_HOTKEY_ALREADY_REGISTERED },
5288 { "ERROR_HOTKEY_NOT_REGISTERED", 0xc0010000 | ERROR_HOTKEY_NOT_REGISTERED },
5289 { "ERROR_INVALID_CURSOR_HANDLE", 0xc0010000 | ERROR_INVALID_CURSOR_HANDLE },
5290 { "ERROR_INVALID_INDEX", 0xc0010000 | ERROR_INVALID_INDEX },
5291 { "ERROR_INVALID_WINDOW_HANDLE", 0xc0010000 | ERROR_INVALID_WINDOW_HANDLE },
5292 { "ERROR_NO_MORE_USER_HANDLES", 0xc0010000 | ERROR_NO_MORE_USER_HANDLES },
5293 { "ERROR_WINDOW_OF_OTHER_THREAD", 0xc0010000 | ERROR_WINDOW_OF_OTHER_THREAD },
5294 { "FILE_DELETED", STATUS_FILE_DELETED },
5295 { "FILE_IS_A_DIRECTORY", STATUS_FILE_IS_A_DIRECTORY },
5296 { "FILE_LOCK_CONFLICT", STATUS_FILE_LOCK_CONFLICT },
5297 { "GENERIC_NOT_MAPPED", STATUS_GENERIC_NOT_MAPPED },
5298 { "HANDLES_CLOSED", STATUS_HANDLES_CLOSED },
5299 { "HANDLE_NOT_CLOSABLE", STATUS_HANDLE_NOT_CLOSABLE },
5300 { "HOST_UNREACHABLE", STATUS_HOST_UNREACHABLE },
5301 { "ILLEGAL_FUNCTION", STATUS_ILLEGAL_FUNCTION },
5302 { "IMAGE_NOT_AT_BASE", STATUS_IMAGE_NOT_AT_BASE },
5303 { "INFO_LENGTH_MISMATCH", STATUS_INFO_LENGTH_MISMATCH },
5304 { "INSTANCE_NOT_AVAILABLE", STATUS_INSTANCE_NOT_AVAILABLE },
5305 { "INSUFFICIENT_RESOURCES", STATUS_INSUFFICIENT_RESOURCES },
5306 { "INVALID_CID", STATUS_INVALID_CID },
5307 { "INVALID_DEVICE_REQUEST", STATUS_INVALID_DEVICE_REQUEST },
5308 { "INVALID_FILE_FOR_SECTION", STATUS_INVALID_FILE_FOR_SECTION },
5309 { "INVALID_HANDLE", STATUS_INVALID_HANDLE },
5310 { "INVALID_IMAGE_FORMAT", STATUS_INVALID_IMAGE_FORMAT },
5311 { "INVALID_IMAGE_NE_FORMAT", STATUS_INVALID_IMAGE_NE_FORMAT },
5312 { "INVALID_IMAGE_NOT_MZ", STATUS_INVALID_IMAGE_NOT_MZ },
5313 { "INVALID_IMAGE_PROTECT", STATUS_INVALID_IMAGE_PROTECT },
5314 { "INVALID_IMAGE_WIN_16", STATUS_INVALID_IMAGE_WIN_16 },
5315 { "INVALID_IMAGE_WIN_64", STATUS_INVALID_IMAGE_WIN_64 },
5316 { "INVALID_LOCK_SEQUENCE", STATUS_INVALID_LOCK_SEQUENCE },
5317 { "INVALID_OWNER", STATUS_INVALID_OWNER },
5318 { "INVALID_PARAMETER", STATUS_INVALID_PARAMETER },
5319 { "INVALID_PIPE_STATE", STATUS_INVALID_PIPE_STATE },
5320 { "INVALID_READ_MODE", STATUS_INVALID_READ_MODE },
5321 { "INVALID_SECURITY_DESCR", STATUS_INVALID_SECURITY_DESCR },
5322 { "IO_TIMEOUT", STATUS_IO_TIMEOUT },
5323 { "KERNEL_APC", STATUS_KERNEL_APC },
5324 { "KEY_DELETED", STATUS_KEY_DELETED },
5325 { "MAPPED_FILE_SIZE_ZERO", STATUS_MAPPED_FILE_SIZE_ZERO },
5326 { "MORE_PROCESSING_REQUIRED", STATUS_MORE_PROCESSING_REQUIRED },
5327 { "MUTANT_NOT_OWNED", STATUS_MUTANT_NOT_OWNED },
5328 { "NAME_TOO_LONG", STATUS_NAME_TOO_LONG },
5329 { "NETWORK_BUSY", STATUS_NETWORK_BUSY },
5330 { "NETWORK_UNREACHABLE", STATUS_NETWORK_UNREACHABLE },
5331 { "NOT_ALL_ASSIGNED", STATUS_NOT_ALL_ASSIGNED },
5332 { "NOT_A_DIRECTORY", STATUS_NOT_A_DIRECTORY },
5333 { "NOT_FOUND", STATUS_NOT_FOUND },
5334 { "NOT_IMPLEMENTED", STATUS_NOT_IMPLEMENTED },
5335 { "NOT_MAPPED_VIEW", STATUS_NOT_MAPPED_VIEW },
5336 { "NOT_REGISTRY_FILE", STATUS_NOT_REGISTRY_FILE },
5337 { "NOT_SAME_DEVICE", STATUS_NOT_SAME_DEVICE },
5338 { "NOT_SUPPORTED", STATUS_NOT_SUPPORTED },
5339 { "NO_DATA_DETECTED", STATUS_NO_DATA_DETECTED },
5340 { "NO_IMPERSONATION_TOKEN", STATUS_NO_IMPERSONATION_TOKEN },
5341 { "NO_MEMORY", STATUS_NO_MEMORY },
5342 { "NO_MORE_ENTRIES", STATUS_NO_MORE_ENTRIES },
5343 { "NO_SUCH_DEVICE", STATUS_NO_SUCH_DEVICE },
5344 { "NO_SUCH_FILE", STATUS_NO_SUCH_FILE },
5345 { "NO_TOKEN", STATUS_NO_TOKEN },
5346 { "OBJECT_NAME_COLLISION", STATUS_OBJECT_NAME_COLLISION },
5347 { "OBJECT_NAME_EXISTS", STATUS_OBJECT_NAME_EXISTS },
5348 { "OBJECT_NAME_INVALID", STATUS_OBJECT_NAME_INVALID },
5349 { "OBJECT_NAME_NOT_FOUND", STATUS_OBJECT_NAME_NOT_FOUND },
5350 { "OBJECT_PATH_INVALID", STATUS_OBJECT_PATH_INVALID },
5351 { "OBJECT_PATH_NOT_FOUND", STATUS_OBJECT_PATH_NOT_FOUND },
5352 { "OBJECT_PATH_SYNTAX_BAD", STATUS_OBJECT_PATH_SYNTAX_BAD },
5353 { "OBJECT_TYPE_MISMATCH", STATUS_OBJECT_TYPE_MISMATCH },
5354 { "PENDING", STATUS_PENDING },
5355 { "PIPE_BROKEN", STATUS_PIPE_BROKEN },
5356 { "PIPE_BUSY", STATUS_PIPE_BUSY },
5357 { "PIPE_CLOSING", STATUS_PIPE_CLOSING },
5358 { "PIPE_CONNECTED", STATUS_PIPE_CONNECTED },
5359 { "PIPE_DISCONNECTED", STATUS_PIPE_DISCONNECTED },
5360 { "PIPE_EMPTY", STATUS_PIPE_EMPTY },
5361 { "PIPE_LISTENING", STATUS_PIPE_LISTENING },
5362 { "PIPE_NOT_AVAILABLE", STATUS_PIPE_NOT_AVAILABLE },
5363 { "PRIVILEGE_NOT_HELD", STATUS_PRIVILEGE_NOT_HELD },
5364 { "PROCESS_IN_JOB", STATUS_PROCESS_IN_JOB },
5365 { "PROCESS_IS_TERMINATING", STATUS_PROCESS_IS_TERMINATING },
5366 { "PROCESS_NOT_IN_JOB", STATUS_PROCESS_NOT_IN_JOB },
5367 { "REPARSE_POINT_NOT_RESOLVED", STATUS_REPARSE_POINT_NOT_RESOLVED },
5368 { "SECTION_TOO_BIG", STATUS_SECTION_TOO_BIG },
5369 { "SEMAPHORE_LIMIT_EXCEEDED", STATUS_SEMAPHORE_LIMIT_EXCEEDED },
5370 { "SHARING_VIOLATION", STATUS_SHARING_VIOLATION },
5371 { "SHUTDOWN_IN_PROGRESS", STATUS_SHUTDOWN_IN_PROGRESS },
5372 { "SUSPEND_COUNT_EXCEEDED", STATUS_SUSPEND_COUNT_EXCEEDED },
5373 { "THREAD_IS_TERMINATING", STATUS_THREAD_IS_TERMINATING },
5374 { "TIMEOUT", STATUS_TIMEOUT },
5375 { "TOO_MANY_OPENED_FILES", STATUS_TOO_MANY_OPENED_FILES },
5376 { "UNSUCCESSFUL", STATUS_UNSUCCESSFUL },
5377 { "USER_APC", STATUS_USER_APC },
5378 { "USER_MAPPED_FILE", STATUS_USER_MAPPED_FILE },
5379 { "VOLUME_DISMOUNTED", STATUS_VOLUME_DISMOUNTED },
5380 { "WAS_LOCKED", STATUS_WAS_LOCKED },
5381 { "WSAEACCES", 0xc0010000 | WSAEACCES },
5382 { "WSAEADDRINUSE", 0xc0010000 | WSAEADDRINUSE },
5383 { "WSAEADDRNOTAVAIL", 0xc0010000 | WSAEADDRNOTAVAIL },
5384 { "WSAEAFNOSUPPORT", 0xc0010000 | WSAEAFNOSUPPORT },
5385 { "WSAEALREADY", 0xc0010000 | WSAEALREADY },
5386 { "WSAEBADF", 0xc0010000 | WSAEBADF },
5387 { "WSAECONNABORTED", 0xc0010000 | WSAECONNABORTED },
5388 { "WSAECONNREFUSED", 0xc0010000 | WSAECONNREFUSED },
5389 { "WSAECONNRESET", 0xc0010000 | WSAECONNRESET },
5390 { "WSAEDESTADDRREQ", 0xc0010000 | WSAEDESTADDRREQ },
5391 { "WSAEDQUOT", 0xc0010000 | WSAEDQUOT },
5392 { "WSAEFAULT", 0xc0010000 | WSAEFAULT },
5393 { "WSAEHOSTDOWN", 0xc0010000 | WSAEHOSTDOWN },
5394 { "WSAEHOSTUNREACH", 0xc0010000 | WSAEHOSTUNREACH },
5395 { "WSAEINPROGRESS", 0xc0010000 | WSAEINPROGRESS },
5396 { "WSAEINTR", 0xc0010000 | WSAEINTR },
5397 { "WSAEINVAL", 0xc0010000 | WSAEINVAL },
5398 { "WSAEISCONN", 0xc0010000 | WSAEISCONN },
5399 { "WSAELOOP", 0xc0010000 | WSAELOOP },
5400 { "WSAEMFILE", 0xc0010000 | WSAEMFILE },
5401 { "WSAEMSGSIZE", 0xc0010000 | WSAEMSGSIZE },
5402 { "WSAENAMETOOLONG", 0xc0010000 | WSAENAMETOOLONG },
5403 { "WSAENETDOWN", 0xc0010000 | WSAENETDOWN },
5404 { "WSAENETRESET", 0xc0010000 | WSAENETRESET },
5405 { "WSAENETUNREACH", 0xc0010000 | WSAENETUNREACH },
5406 { "WSAENOBUFS", 0xc0010000 | WSAENOBUFS },
5407 { "WSAENOPROTOOPT", 0xc0010000 | WSAENOPROTOOPT },
5408 { "WSAENOTCONN", 0xc0010000 | WSAENOTCONN },
5409 { "WSAENOTEMPTY", 0xc0010000 | WSAENOTEMPTY },
5410 { "WSAENOTSOCK", 0xc0010000 | WSAENOTSOCK },
5411 { "WSAEOPNOTSUPP", 0xc0010000 | WSAEOPNOTSUPP },
5412 { "WSAEPFNOSUPPORT", 0xc0010000 | WSAEPFNOSUPPORT },
5413 { "WSAEPROCLIM", 0xc0010000 | WSAEPROCLIM },
5414 { "WSAEPROTONOSUPPORT", 0xc0010000 | WSAEPROTONOSUPPORT },
5415 { "WSAEPROTOTYPE", 0xc0010000 | WSAEPROTOTYPE },
5416 { "WSAEREMOTE", 0xc0010000 | WSAEREMOTE },
5417 { "WSAESHUTDOWN", 0xc0010000 | WSAESHUTDOWN },
5418 { "WSAESOCKTNOSUPPORT", 0xc0010000 | WSAESOCKTNOSUPPORT },
5419 { "WSAESTALE", 0xc0010000 | WSAESTALE },
5420 { "WSAETIMEDOUT", 0xc0010000 | WSAETIMEDOUT },
5421 { "WSAETOOMANYREFS", 0xc0010000 | WSAETOOMANYREFS },
5422 { "WSAEUSERS", 0xc0010000 | WSAEUSERS },
5423 { "WSAEWOULDBLOCK", 0xc0010000 | WSAEWOULDBLOCK },
5424 { NULL, 0 }
5427 /* ### make_requests end ### */
5428 /* Everything above this line is generated automatically by tools/make_requests */
5430 static const char *get_status_name( unsigned int status )
5432 int i;
5433 static char buffer[10];
5435 if (status)
5437 for (i = 0; status_names[i].name; i++)
5438 if (status_names[i].value == status) return status_names[i].name;
5440 sprintf( buffer, "%x", status );
5441 return buffer;
5444 void trace_request(void)
5446 enum request req = current->req.request_header.req;
5447 if (req < REQ_NB_REQUESTS)
5449 fprintf( stderr, "%04x: %s(", current->id, req_names[req] );
5450 if (req_dumpers[req])
5452 cur_data = get_req_data();
5453 cur_size = get_req_data_size();
5454 req_dumpers[req]( &current->req );
5456 fprintf( stderr, " )\n" );
5458 else fprintf( stderr, "%04x: %d(?)\n", current->id, req );
5461 void trace_reply( enum request req, const union generic_reply *reply )
5463 if (req < REQ_NB_REQUESTS)
5465 fprintf( stderr, "%04x: %s() = %s",
5466 current->id, req_names[req], get_status_name(current->error) );
5467 if (reply_dumpers[req])
5469 fprintf( stderr, " {" );
5470 cur_data = current->reply_data;
5471 cur_size = reply->reply_header.reply_size;
5472 reply_dumpers[req]( reply );
5473 fprintf( stderr, " }" );
5475 fputc( '\n', stderr );
5477 else fprintf( stderr, "%04x: %d() = %s\n",
5478 current->id, req, get_status_name(current->error) );