mfplat: Read queue subscriber within the critical section.
[wine/zf.git] / server / trace.c
blob44bc8d8ee6f384d88c8441b53fa4065997e189c2
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_DUP_HANDLE:
239 fprintf( stderr, "APC_DUP_HANDLE,src_handle=%04x,dst_process=%04x,access=%x,attributes=%x,options=%x",
240 call->dup_handle.src_handle, call->dup_handle.dst_process, call->dup_handle.access,
241 call->dup_handle.attributes, call->dup_handle.options );
242 break;
243 case APC_BREAK_PROCESS:
244 fprintf( stderr, "APC_BREAK_PROCESS" );
245 break;
246 default:
247 fprintf( stderr, "type=%u", call->type );
248 break;
250 fputc( '}', stderr );
253 static void dump_apc_result( const char *prefix, const apc_result_t *result )
255 fprintf( stderr, "%s{", prefix );
256 switch(result->type)
258 case APC_NONE:
259 break;
260 case APC_ASYNC_IO:
261 fprintf( stderr, "APC_ASYNC_IO,status=%s,total=%u",
262 get_status_name( result->async_io.status ), result->async_io.total );
263 break;
264 case APC_VIRTUAL_ALLOC:
265 fprintf( stderr, "APC_VIRTUAL_ALLOC,status=%s",
266 get_status_name( result->virtual_alloc.status ));
267 dump_uint64( ",addr=", &result->virtual_alloc.addr );
268 dump_uint64( ",size=", &result->virtual_alloc.size );
269 break;
270 case APC_VIRTUAL_FREE:
271 fprintf( stderr, "APC_VIRTUAL_FREE,status=%s",
272 get_status_name( result->virtual_free.status ));
273 dump_uint64( ",addr=", &result->virtual_free.addr );
274 dump_uint64( ",size=", &result->virtual_free.size );
275 break;
276 case APC_VIRTUAL_QUERY:
277 fprintf( stderr, "APC_VIRTUAL_QUERY,status=%s",
278 get_status_name( result->virtual_query.status ));
279 dump_uint64( ",base=", &result->virtual_query.base );
280 dump_uint64( ",alloc_base=", &result->virtual_query.alloc_base );
281 dump_uint64( ",size=", &result->virtual_query.size );
282 fprintf( stderr, ",state=%x,prot=%x,alloc_prot=%x,alloc_type=%x",
283 result->virtual_query.state, result->virtual_query.prot,
284 result->virtual_query.alloc_prot, result->virtual_query.alloc_type );
285 break;
286 case APC_VIRTUAL_PROTECT:
287 fprintf( stderr, "APC_VIRTUAL_PROTECT,status=%s",
288 get_status_name( result->virtual_protect.status ));
289 dump_uint64( ",addr=", &result->virtual_protect.addr );
290 dump_uint64( ",size=", &result->virtual_protect.size );
291 fprintf( stderr, ",prot=%x", result->virtual_protect.prot );
292 break;
293 case APC_VIRTUAL_FLUSH:
294 fprintf( stderr, "APC_VIRTUAL_FLUSH,status=%s",
295 get_status_name( result->virtual_flush.status ));
296 dump_uint64( ",addr=", &result->virtual_flush.addr );
297 dump_uint64( ",size=", &result->virtual_flush.size );
298 break;
299 case APC_VIRTUAL_LOCK:
300 fprintf( stderr, "APC_VIRTUAL_LOCK,status=%s",
301 get_status_name( result->virtual_lock.status ));
302 dump_uint64( ",addr=", &result->virtual_lock.addr );
303 dump_uint64( ",size=", &result->virtual_lock.size );
304 break;
305 case APC_VIRTUAL_UNLOCK:
306 fprintf( stderr, "APC_VIRTUAL_UNLOCK,status=%s",
307 get_status_name( result->virtual_unlock.status ));
308 dump_uint64( ",addr=", &result->virtual_unlock.addr );
309 dump_uint64( ",size=", &result->virtual_unlock.size );
310 break;
311 case APC_MAP_VIEW:
312 fprintf( stderr, "APC_MAP_VIEW,status=%s",
313 get_status_name( result->map_view.status ));
314 dump_uint64( ",addr=", &result->map_view.addr );
315 dump_uint64( ",size=", &result->map_view.size );
316 break;
317 case APC_UNMAP_VIEW:
318 fprintf( stderr, "APC_UNMAP_VIEW,status=%s",
319 get_status_name( result->unmap_view.status ) );
320 break;
321 case APC_CREATE_THREAD:
322 fprintf( stderr, "APC_CREATE_THREAD,status=%s,pid=%04x,tid=%04x,handle=%04x",
323 get_status_name( result->create_thread.status ),
324 result->create_thread.pid, result->create_thread.tid, result->create_thread.handle );
325 break;
326 case APC_DUP_HANDLE:
327 fprintf( stderr, "APC_DUP_HANDLE,status=%s,handle=%04x",
328 get_status_name( result->dup_handle.status ), result->dup_handle.handle );
329 break;
330 case APC_BREAK_PROCESS:
331 fprintf( stderr, "APC_BREAK_PROCESS,status=%s", get_status_name( result->break_process.status ) );
332 break;
333 default:
334 fprintf( stderr, "type=%u", result->type );
335 break;
337 fputc( '}', stderr );
340 static void dump_async_data( const char *prefix, const async_data_t *data )
342 fprintf( stderr, "%s{handle=%04x,event=%04x", prefix, data->handle, data->event );
343 dump_uint64( ",iosb=", &data->iosb );
344 dump_uint64( ",user=", &data->user );
345 dump_uint64( ",apc=", &data->apc );
346 dump_uint64( ",apc_context=", &data->apc_context );
347 fputc( '}', stderr );
350 static void dump_irp_params( const char *prefix, const irp_params_t *data )
352 switch (data->type)
354 case IRP_CALL_NONE:
355 fprintf( stderr, "%s{NONE}", prefix );
356 break;
357 case IRP_CALL_CREATE:
358 fprintf( stderr, "%s{CREATE,access=%08x,sharing=%08x,options=%08x",
359 prefix, data->create.access, data->create.sharing, data->create.options );
360 dump_uint64( ",device=", &data->create.device );
361 fprintf( stderr, ",file=%08x}", data->create.file );
362 break;
363 case IRP_CALL_CLOSE:
364 fprintf( stderr, "%s{CLOSE", prefix );
365 dump_uint64( ",file=", &data->close.file );
366 fputc( '}', stderr );
367 break;
368 case IRP_CALL_READ:
369 fprintf( stderr, "%s{READ,key=%08x,out_size=%u", prefix, data->read.key,
370 data->read.out_size );
371 dump_uint64( ",pos=", &data->read.pos );
372 dump_uint64( ",file=", &data->read.file );
373 fputc( '}', stderr );
374 break;
375 case IRP_CALL_WRITE:
376 fprintf( stderr, "%s{WRITE,key=%08x", prefix, data->write.key );
377 dump_uint64( ",pos=", &data->write.pos );
378 dump_uint64( ",file=", &data->write.file );
379 fputc( '}', stderr );
380 break;
381 case IRP_CALL_FLUSH:
382 fprintf( stderr, "%s{FLUSH", prefix );
383 dump_uint64( ",file=", &data->flush.file );
384 fputc( '}', stderr );
385 break;
386 case IRP_CALL_IOCTL:
387 fprintf( stderr, "%s{IOCTL", prefix );
388 dump_ioctl_code( ",code=", &data->ioctl.code );
389 fprintf( stderr, ",out_size=%u", data->ioctl.out_size );
390 dump_uint64( ",file=", &data->ioctl.file );
391 fputc( '}', stderr );
392 break;
393 case IRP_CALL_VOLUME:
394 fprintf( stderr, "%s{VOLUME,class=%u,out_size=%u", prefix,
395 data->volume.info_class, data->volume.out_size );
396 dump_uint64( ",file=", &data->volume.file );
397 fputc( '}', stderr );
398 break;
399 case IRP_CALL_FREE:
400 fprintf( stderr, "%s{FREE", prefix );
401 dump_uint64( ",obj=", &data->free.obj );
402 fputc( '}', stderr );
403 break;
404 case IRP_CALL_CANCEL:
405 fprintf( stderr, "%s{CANCEL", prefix );
406 dump_uint64( ",irp=", &data->cancel.irp );
407 fputc( '}', stderr );
408 break;
412 static void dump_hw_input( const char *prefix, const hw_input_t *input )
414 switch (input->type)
416 case INPUT_MOUSE:
417 fprintf( stderr, "%s{type=MOUSE,x=%d,y=%d,data=%08x,flags=%08x,time=%u",
418 prefix, input->mouse.x, input->mouse.y, input->mouse.data, input->mouse.flags,
419 input->mouse.time );
420 dump_uint64( ",info=", &input->mouse.info );
421 fputc( '}', stderr );
422 break;
423 case INPUT_KEYBOARD:
424 fprintf( stderr, "%s{type=KEYBOARD,vkey=%04hx,scan=%04hx,flags=%08x,time=%u",
425 prefix, input->kbd.vkey, input->kbd.scan, input->kbd.flags, input->kbd.time );
426 dump_uint64( ",info=", &input->kbd.info );
427 fputc( '}', stderr );
428 break;
429 case INPUT_HARDWARE:
430 fprintf( stderr, "%s{type=HARDWARE,msg=%04x", prefix, input->hw.msg );
431 dump_uint64( ",lparam=", &input->hw.lparam );
432 fputc( '}', stderr );
433 break;
434 default:
435 fprintf( stderr, "%s{type=%04x}", prefix, input->type );
436 break;
440 static void dump_luid( const char *prefix, const luid_t *luid )
442 fprintf( stderr, "%s%d.%u", prefix, luid->high_part, luid->low_part );
445 static void dump_generic_map( const char *prefix, const generic_map_t *map )
447 fprintf( stderr, "%s{r=%08x,w=%08x,x=%08x,a=%08x}",
448 prefix, map->read, map->write, map->exec, map->all );
451 static void dump_varargs_ints( const char *prefix, data_size_t size )
453 const int *data = cur_data;
454 data_size_t len = size / sizeof(*data);
456 fprintf( stderr,"%s{", prefix );
457 while (len > 0)
459 fprintf( stderr, "%d", *data++ );
460 if (--len) fputc( ',', stderr );
462 fputc( '}', stderr );
463 remove_data( size );
466 static void dump_varargs_uints( const char *prefix, data_size_t size )
468 const unsigned int *data = cur_data;
470 dump_uints( prefix, data, size / sizeof(*data) );
471 remove_data( size );
474 static void dump_varargs_uints64( const char *prefix, data_size_t size )
476 const unsigned __int64 *data = cur_data;
477 data_size_t len = size / sizeof(*data);
479 fprintf( stderr,"%s{", prefix );
480 while (len > 0)
482 dump_uint64( "", data++ );
483 if (--len) fputc( ',', stderr );
485 fputc( '}', stderr );
486 remove_data( size );
489 static void dump_varargs_apc_result( const char *prefix, data_size_t size )
491 const apc_result_t *result = cur_data;
493 if (size >= sizeof(*result))
495 dump_apc_result( prefix, result );
496 size = sizeof(*result);
498 remove_data( size );
501 static void dump_varargs_select_op( const char *prefix, data_size_t size )
503 select_op_t data;
505 if (!size)
507 fprintf( stderr, "%s{}", prefix );
508 return;
510 memset( &data, 0, sizeof(data) );
511 memcpy( &data, cur_data, min( size, sizeof(data) ));
513 fprintf( stderr, "%s{", prefix );
514 switch (data.op)
516 case SELECT_NONE:
517 fprintf( stderr, "NONE" );
518 break;
519 case SELECT_WAIT:
520 case SELECT_WAIT_ALL:
521 fprintf( stderr, "%s", data.op == SELECT_WAIT ? "WAIT" : "WAIT_ALL" );
522 if (size > offsetof( select_op_t, wait.handles ))
523 dump_handles( ",handles=", data.wait.handles,
524 min( size, sizeof(data.wait) ) - offsetof( select_op_t, wait.handles ));
525 break;
526 case SELECT_SIGNAL_AND_WAIT:
527 fprintf( stderr, "SIGNAL_AND_WAIT,signal=%04x,wait=%04x",
528 data.signal_and_wait.signal, data.signal_and_wait.wait );
529 break;
530 case SELECT_KEYED_EVENT_WAIT:
531 case SELECT_KEYED_EVENT_RELEASE:
532 fprintf( stderr, "KEYED_EVENT_%s,handle=%04x",
533 data.op == SELECT_KEYED_EVENT_WAIT ? "WAIT" : "RELEASE",
534 data.keyed_event.handle );
535 dump_uint64( ",key=", &data.keyed_event.key );
536 break;
537 default:
538 fprintf( stderr, "op=%u", data.op );
539 break;
541 fputc( '}', stderr );
542 remove_data( size );
545 static void dump_varargs_user_handles( const char *prefix, data_size_t size )
547 const user_handle_t *data = cur_data;
548 data_size_t len = size / sizeof(*data);
550 fprintf( stderr,"%s{", prefix );
551 while (len > 0)
553 fprintf( stderr, "%08x", *data++ );
554 if (--len) fputc( ',', stderr );
556 fputc( '}', stderr );
557 remove_data( size );
560 static void dump_varargs_bytes( const char *prefix, data_size_t size )
562 const unsigned char *data = cur_data;
563 data_size_t len = min( 1024, size );
565 fprintf( stderr,"%s{", prefix );
566 while (len > 0)
568 fprintf( stderr, "%02x", *data++ );
569 if (--len) fputc( ',', stderr );
571 if (size > 1024) fprintf( stderr, "...(total %u)", size );
572 fputc( '}', stderr );
573 remove_data( size );
576 static void dump_varargs_string( const char *prefix, data_size_t size )
578 fprintf( stderr, "%s\"%.*s\"", prefix, (int)size, (const char *)cur_data );
579 remove_data( size );
582 static void dump_varargs_unicode_str( const char *prefix, data_size_t size )
584 fprintf( stderr, "%sL\"", prefix );
585 dump_strW( cur_data, size, stderr, "\"\"" );
586 fputc( '\"', stderr );
587 remove_data( size );
590 static void dump_varargs_context( const char *prefix, data_size_t size )
592 const context_t *context = cur_data;
593 context_t ctx;
594 unsigned int i;
596 if (!size)
598 fprintf( stderr, "%s{}", prefix );
599 return;
601 size = min( size, sizeof(ctx) );
602 memset( &ctx, 0, sizeof(ctx) );
603 memcpy( &ctx, context, size );
605 fprintf( stderr,"%s{", prefix );
606 dump_client_cpu( "cpu=", &ctx.cpu );
607 switch (ctx.cpu)
609 case CPU_x86:
610 if (ctx.flags & SERVER_CTX_CONTROL)
611 fprintf( stderr, ",eip=%08x,esp=%08x,ebp=%08x,eflags=%08x,cs=%04x,ss=%04x",
612 ctx.ctl.i386_regs.eip, ctx.ctl.i386_regs.esp, ctx.ctl.i386_regs.ebp,
613 ctx.ctl.i386_regs.eflags, ctx.ctl.i386_regs.cs, ctx.ctl.i386_regs.ss );
614 if (ctx.flags & SERVER_CTX_SEGMENTS)
615 fprintf( stderr, ",ds=%04x,es=%04x,fs=%04x,gs=%04x",
616 ctx.seg.i386_regs.ds, ctx.seg.i386_regs.es,
617 ctx.seg.i386_regs.fs, ctx.seg.i386_regs.gs );
618 if (ctx.flags & SERVER_CTX_INTEGER)
619 fprintf( stderr, ",eax=%08x,ebx=%08x,ecx=%08x,edx=%08x,esi=%08x,edi=%08x",
620 ctx.integer.i386_regs.eax, ctx.integer.i386_regs.ebx, ctx.integer.i386_regs.ecx,
621 ctx.integer.i386_regs.edx, ctx.integer.i386_regs.esi, ctx.integer.i386_regs.edi );
622 if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
623 fprintf( stderr, ",dr0=%08x,dr1=%08x,dr2=%08x,dr3=%08x,dr6=%08x,dr7=%08x",
624 ctx.debug.i386_regs.dr0, ctx.debug.i386_regs.dr1, ctx.debug.i386_regs.dr2,
625 ctx.debug.i386_regs.dr3, ctx.debug.i386_regs.dr6, ctx.debug.i386_regs.dr7 );
626 if (ctx.flags & SERVER_CTX_FLOATING_POINT)
628 fprintf( stderr, ",fp.ctrl=%08x,fp.status=%08x,fp.tag=%08x,fp.err_off=%08x,fp.err_sel=%08x",
629 ctx.fp.i386_regs.ctrl, ctx.fp.i386_regs.status, ctx.fp.i386_regs.tag,
630 ctx.fp.i386_regs.err_off, ctx.fp.i386_regs.err_sel );
631 fprintf( stderr, ",fp.data_off=%08x,fp.data_sel=%08x,fp.cr0npx=%08x",
632 ctx.fp.i386_regs.data_off, ctx.fp.i386_regs.data_sel, ctx.fp.i386_regs.cr0npx );
633 for (i = 0; i < 8; i++)
635 long double reg = 0;
636 memcpy( &reg, &ctx.fp.i386_regs.regs[10 * i], 10 );
637 fprintf( stderr, ",fp.reg%u=%Lg", i, reg );
640 if (ctx.flags & SERVER_CTX_EXTENDED_REGISTERS)
641 dump_uints( ",extended=", (const unsigned int *)ctx.ext.i386_regs,
642 sizeof(ctx.ext.i386_regs) / sizeof(int) );
643 if (ctx.flags & SERVER_CTX_YMM_REGISTERS)
644 dump_uints( ",ymm_high=", (const unsigned int *)ctx.ymm.ymm_high_regs.ymm_high,
645 sizeof(ctx.ymm.ymm_high_regs) / sizeof(int) );
646 break;
647 case CPU_x86_64:
648 if (ctx.flags & SERVER_CTX_CONTROL)
650 dump_uint64( ",rip=", &ctx.ctl.x86_64_regs.rip );
651 dump_uint64( ",rbp=", &ctx.ctl.x86_64_regs.rbp );
652 dump_uint64( ",rsp=", &ctx.ctl.x86_64_regs.rsp );
653 fprintf( stderr, ",cs=%04x,ss=%04x,flags=%08x",
654 ctx.ctl.x86_64_regs.cs, ctx.ctl.x86_64_regs.ss, ctx.ctl.x86_64_regs.flags );
656 if (ctx.flags & SERVER_CTX_INTEGER)
658 dump_uint64( ",rax=", &ctx.integer.x86_64_regs.rax );
659 dump_uint64( ",rbx=", &ctx.integer.x86_64_regs.rbx );
660 dump_uint64( ",rcx=", &ctx.integer.x86_64_regs.rcx );
661 dump_uint64( ",rdx=", &ctx.integer.x86_64_regs.rdx );
662 dump_uint64( ",rsi=", &ctx.integer.x86_64_regs.rsi );
663 dump_uint64( ",rdi=", &ctx.integer.x86_64_regs.rdi );
664 dump_uint64( ",r8=", &ctx.integer.x86_64_regs.r8 );
665 dump_uint64( ",r9=", &ctx.integer.x86_64_regs.r9 );
666 dump_uint64( ",r10=", &ctx.integer.x86_64_regs.r10 );
667 dump_uint64( ",r11=", &ctx.integer.x86_64_regs.r11 );
668 dump_uint64( ",r12=", &ctx.integer.x86_64_regs.r12 );
669 dump_uint64( ",r13=", &ctx.integer.x86_64_regs.r13 );
670 dump_uint64( ",r14=", &ctx.integer.x86_64_regs.r14 );
671 dump_uint64( ",r15=", &ctx.integer.x86_64_regs.r15 );
673 if (ctx.flags & SERVER_CTX_SEGMENTS)
674 fprintf( stderr, ",ds=%04x,es=%04x,fs=%04x,gs=%04x",
675 ctx.seg.x86_64_regs.ds, ctx.seg.x86_64_regs.es,
676 ctx.seg.x86_64_regs.fs, ctx.seg.x86_64_regs.gs );
677 if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
679 dump_uint64( ",dr0=", &ctx.debug.x86_64_regs.dr0 );
680 dump_uint64( ",dr1=", &ctx.debug.x86_64_regs.dr1 );
681 dump_uint64( ",dr2=", &ctx.debug.x86_64_regs.dr2 );
682 dump_uint64( ",dr3=", &ctx.debug.x86_64_regs.dr3 );
683 dump_uint64( ",dr6=", &ctx.debug.x86_64_regs.dr6 );
684 dump_uint64( ",dr7=", &ctx.debug.x86_64_regs.dr7 );
686 if (ctx.flags & SERVER_CTX_FLOATING_POINT)
688 for (i = 0; i < 32; i++)
689 fprintf( stderr, ",fp%u=%08x%08x%08x%08x", i,
690 (unsigned int)(ctx.fp.x86_64_regs.fpregs[i].high >> 32),
691 (unsigned int)ctx.fp.x86_64_regs.fpregs[i].high,
692 (unsigned int)(ctx.fp.x86_64_regs.fpregs[i].low >> 32),
693 (unsigned int)ctx.fp.x86_64_regs.fpregs[i].low );
695 if (ctx.flags & SERVER_CTX_YMM_REGISTERS)
696 dump_uints( ",ymm_high=", (const unsigned int *)ctx.ymm.ymm_high_regs.ymm_high,
697 sizeof(ctx.ymm.ymm_high_regs) / sizeof(int) );
698 break;
699 case CPU_POWERPC:
700 if (ctx.flags & SERVER_CTX_CONTROL)
701 fprintf( stderr, ",iar=%08x,msr=%08x,ctr=%08x,lr=%08x,dar=%08x,dsisr=%08x,trap=%08x",
702 ctx.ctl.powerpc_regs.iar, ctx.ctl.powerpc_regs.msr, ctx.ctl.powerpc_regs.ctr,
703 ctx.ctl.powerpc_regs.lr, ctx.ctl.powerpc_regs.dar, ctx.ctl.powerpc_regs.dsisr,
704 ctx.ctl.powerpc_regs.trap );
705 if (ctx.flags & SERVER_CTX_INTEGER)
707 for (i = 0; i < 32; i++) fprintf( stderr, ",gpr%u=%08x", i, ctx.integer.powerpc_regs.gpr[i] );
708 fprintf( stderr, ",cr=%08x,xer=%08x",
709 ctx.integer.powerpc_regs.cr, ctx.integer.powerpc_regs.xer );
711 if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
712 for (i = 0; i < 8; i++) fprintf( stderr, ",dr%u=%08x", i, ctx.debug.powerpc_regs.dr[i] );
713 if (ctx.flags & SERVER_CTX_FLOATING_POINT)
715 for (i = 0; i < 32; i++) fprintf( stderr, ",fpr%u=%g", i, ctx.fp.powerpc_regs.fpr[i] );
716 fprintf( stderr, ",fpscr=%g", ctx.fp.powerpc_regs.fpscr );
718 break;
719 case CPU_ARM:
720 if (ctx.flags & SERVER_CTX_CONTROL)
721 fprintf( stderr, ",sp=%08x,lr=%08x,pc=%08x,cpsr=%08x",
722 ctx.ctl.arm_regs.sp, ctx.ctl.arm_regs.lr,
723 ctx.ctl.arm_regs.pc, ctx.ctl.arm_regs.cpsr );
724 if (ctx.flags & SERVER_CTX_INTEGER)
725 for (i = 0; i < 13; i++) fprintf( stderr, ",r%u=%08x", i, ctx.integer.arm_regs.r[i] );
726 if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
728 for (i = 0; i < 8; i++)
729 fprintf( stderr, ",bcr%u=%08x,bvr%u=%08x",
730 i, ctx.debug.arm_regs.bcr[i], i, ctx.debug.arm_regs.bvr[i] );
731 fprintf( stderr, ",wcr0=%08x,wvr0=%08x",
732 ctx.debug.arm_regs.wcr[0], ctx.debug.arm_regs.wvr[0] );
734 if (ctx.flags & SERVER_CTX_FLOATING_POINT)
736 for (i = 0; i < 32; i++)
738 fprintf( stderr, ",d%u=", i );
739 dump_uint64( "", &ctx.fp.arm_regs.d[i] );
741 fprintf( stderr, ",fpscr=%08x", ctx.fp.arm_regs.fpscr );
743 break;
744 case CPU_ARM64:
745 if (ctx.flags & SERVER_CTX_CONTROL)
747 dump_uint64( ",sp=", &ctx.ctl.arm64_regs.sp );
748 dump_uint64( ",pc=", &ctx.ctl.arm64_regs.pc );
749 dump_uint64( ",pstate=", &ctx.ctl.arm64_regs.pstate );
751 if (ctx.flags & SERVER_CTX_INTEGER)
753 for (i = 0; i < 31; i++)
755 fprintf( stderr, ",x%u=", i );
756 dump_uint64( "", &ctx.integer.arm64_regs.x[i] );
759 if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
761 for (i = 0; i < 8; i++)
763 fprintf( stderr, ",bcr%u=%08x,bvr%u=", i, ctx.debug.arm64_regs.bcr[i], i );
764 dump_uint64( "", &ctx.debug.arm64_regs.bvr[i] );
766 for (i = 0; i < 2; i++)
768 fprintf( stderr, ",wcr%u=%08x,wvr%u=", i, ctx.debug.arm64_regs.wcr[i], i );
769 dump_uint64( "", &ctx.debug.arm64_regs.wvr[i] );
772 if (ctx.flags & SERVER_CTX_FLOATING_POINT)
774 for (i = 0; i < 32; i++)
776 fprintf( stderr, ",q%u=", i );
777 dump_uint64( "", &ctx.fp.arm64_regs.q[i].high );
778 dump_uint64( "", &ctx.fp.arm64_regs.q[i].low );
780 fprintf( stderr, ",fpcr=%08x,fpsr=%08x", ctx.fp.arm64_regs.fpcr, ctx.fp.arm64_regs.fpsr );
782 break;
784 fputc( '}', stderr );
785 remove_data( size );
788 static void dump_varargs_debug_event( const char *prefix, data_size_t size )
790 debug_event_t event;
791 unsigned int i;
793 if (!size)
795 fprintf( stderr, "%s{}", prefix );
796 return;
798 size = min( size, sizeof(event) );
799 memset( &event, 0, sizeof(event) );
800 memcpy( &event, cur_data, size );
802 switch(event.code)
804 case DbgIdle:
805 fprintf( stderr, "%s{idle}", prefix );
806 break;
807 case DbgReplyPending:
808 fprintf( stderr, "%s{pending}", prefix );
809 break;
810 case DbgCreateThreadStateChange:
811 fprintf( stderr, "%s{create_thread,thread=%04x", prefix, event.create_thread.handle );
812 dump_uint64( ",start=", &event.create_thread.start );
813 fputc( '}', stderr );
814 break;
815 case DbgCreateProcessStateChange:
816 fprintf( stderr, "%s{create_process,file=%04x,process=%04x,thread=%04x", prefix,
817 event.create_process.file, event.create_process.process,
818 event.create_process.thread );
819 dump_uint64( ",base=", &event.create_process.base );
820 fprintf( stderr, ",offset=%d,size=%d",
821 event.create_process.dbg_offset, event.create_process.dbg_size );
822 dump_uint64( ",start=", &event.create_process.start );
823 fputc( '}', stderr );
824 break;
825 case DbgExitThreadStateChange:
826 fprintf( stderr, "%s{exit_thread,code=%d}", prefix, event.exit.exit_code );
827 break;
828 case DbgExitProcessStateChange:
829 fprintf( stderr, "%s{exit_process,code=%d}", prefix, event.exit.exit_code );
830 break;
831 case DbgExceptionStateChange:
832 case DbgBreakpointStateChange:
833 case DbgSingleStepStateChange:
834 fprintf( stderr, "%s{%s,first=%d,exc_code=%08x,flags=%08x", prefix,
835 event.code == DbgBreakpointStateChange ? "breakpoint" :
836 event.code == DbgSingleStepStateChange ? "singlestep" : "exception",
837 event.exception.first, event.exception.exc_code, event.exception.flags );
838 dump_uint64( ",record=", &event.exception.record );
839 dump_uint64( ",address=", &event.exception.address );
840 fprintf( stderr, ",params={" );
841 event.exception.nb_params = min( event.exception.nb_params, EXCEPTION_MAXIMUM_PARAMETERS );
842 for (i = 0; i < event.exception.nb_params; i++)
844 dump_uint64( "", &event.exception.params[i] );
845 if (i < event.exception.nb_params) fputc( ',', stderr );
847 fprintf( stderr, "}}" );
848 break;
849 case DbgLoadDllStateChange:
850 fprintf( stderr, "%s{load_dll,file=%04x", prefix, event.load_dll.handle );
851 dump_uint64( ",base=", &event.load_dll.base );
852 fprintf( stderr, ",offset=%d,size=%d",
853 event.load_dll.dbg_offset, event.load_dll.dbg_size );
854 dump_uint64( ",name=", &event.load_dll.name );
855 fputc( '}', stderr );
856 break;
857 case DbgUnloadDllStateChange:
858 fprintf( stderr, "%s{unload_dll", prefix );
859 dump_uint64( ",base=", &event.unload_dll.base );
860 fputc( '}', stderr );
861 break;
862 default:
863 fprintf( stderr, "%s{code=??? (%d)}", prefix, event.code );
864 break;
866 remove_data( size );
869 /* dump a unicode string contained in a buffer; helper for dump_varargs_startup_info */
870 static data_size_t dump_inline_unicode_string( const char *prefix, data_size_t pos, data_size_t len, data_size_t total_size )
872 fputs( prefix, stderr );
873 if (pos >= total_size) return pos;
874 if (len > total_size - pos) len = total_size - pos;
875 dump_strW( (const WCHAR *)cur_data + pos/sizeof(WCHAR), len, stderr, "\"\"" );
876 return pos + (len / sizeof(WCHAR)) * sizeof(WCHAR);
879 static void dump_varargs_startup_info( const char *prefix, data_size_t size )
881 startup_info_t info;
882 data_size_t pos = sizeof(info);
884 memset( &info, 0, sizeof(info) );
885 memcpy( &info, cur_data, min( size, sizeof(info) ));
887 fprintf( stderr,
888 "%s{debug_flags=%x,console_flags=%x,console=%04x,hstdin=%04x,hstdout=%04x,hstderr=%04x,"
889 "x=%u,y=%u,xsize=%u,ysize=%u,xchars=%u,ychars=%u,attribute=%02x,flags=%x,show=%u",
890 prefix, info.debug_flags, info.console_flags, info.console,
891 info.hstdin, info.hstdout, info.hstderr, info.x, info.y, info.xsize, info.ysize,
892 info.xchars, info.ychars, info.attribute, info.flags, info.show );
893 pos = dump_inline_unicode_string( ",curdir=L\"", pos, info.curdir_len, size );
894 pos = dump_inline_unicode_string( "\",dllpath=L\"", pos, info.dllpath_len, size );
895 pos = dump_inline_unicode_string( "\",imagepath=L\"", pos, info.imagepath_len, size );
896 pos = dump_inline_unicode_string( "\",cmdline=L\"", pos, info.cmdline_len, size );
897 pos = dump_inline_unicode_string( "\",title=L\"", pos, info.title_len, size );
898 pos = dump_inline_unicode_string( "\",desktop=L\"", pos, info.desktop_len, size );
899 pos = dump_inline_unicode_string( "\",shellinfo=L\"", pos, info.shellinfo_len, size );
900 pos = dump_inline_unicode_string( "\",runtime=L\"", pos, info.runtime_len, size );
901 fprintf( stderr, "\"}" );
902 remove_data( size );
905 static void dump_varargs_rectangles( const char *prefix, data_size_t size )
907 const rectangle_t *rect = cur_data;
908 data_size_t len = size / sizeof(*rect);
910 fprintf( stderr,"%s{", prefix );
911 while (len > 0)
913 dump_rectangle( "", rect++ );
914 if (--len) fputc( ',', stderr );
916 fputc( '}', stderr );
917 remove_data( size );
920 static void dump_varargs_cursor_positions( const char *prefix, data_size_t size )
922 const cursor_pos_t *pos = cur_data;
923 data_size_t len = size / sizeof(*pos);
925 fprintf( stderr, "%s{", prefix );
926 while (len > 0)
928 fprintf( stderr, "{x=%d,y=%d,time=%u", pos->x, pos->y, pos->time );
929 dump_uint64( ",info=", &pos->info );
930 fputc( '}', stderr );
931 pos++;
932 if (--len) fputc( ',', stderr );
934 fputc( '}', stderr );
935 remove_data( size );
938 static void dump_varargs_message_data( const char *prefix, data_size_t size )
940 /* FIXME: dump the structured data */
941 dump_varargs_bytes( prefix, size );
944 static void dump_varargs_properties( const char *prefix, data_size_t size )
946 const property_data_t *prop = cur_data;
947 data_size_t len = size / sizeof(*prop);
949 fprintf( stderr,"%s{", prefix );
950 while (len > 0)
952 fprintf( stderr, "{atom=%04x,str=%d", prop->atom, prop->string );
953 dump_uint64( ",data=", &prop->data );
954 fputc( '}', stderr );
955 prop++;
956 if (--len) fputc( ',', stderr );
958 fputc( '}', stderr );
959 remove_data( size );
962 static void dump_varargs_LUID_AND_ATTRIBUTES( const char *prefix, data_size_t size )
964 const LUID_AND_ATTRIBUTES *lat = cur_data;
965 data_size_t len = size / sizeof(*lat);
967 fprintf( stderr,"%s{", prefix );
968 while (len > 0)
970 fprintf( stderr, "{luid=%08x%08x,attr=%x}",
971 lat->Luid.HighPart, lat->Luid.LowPart, lat->Attributes );
972 lat++;
973 if (--len) fputc( ',', stderr );
975 fputc( '}', stderr );
976 remove_data( size );
979 static void dump_inline_sid( const char *prefix, const SID *sid, data_size_t size )
981 DWORD i;
983 /* security check */
984 if ((FIELD_OFFSET(SID, SubAuthority[0]) > size) ||
985 (FIELD_OFFSET(SID, SubAuthority[sid->SubAuthorityCount]) > size))
987 fprintf( stderr, "<invalid sid>" );
988 return;
991 fprintf( stderr,"%s{", prefix );
992 fprintf( stderr, "S-%u-%u", sid->Revision, MAKELONG(
993 MAKEWORD( sid->IdentifierAuthority.Value[5],
994 sid->IdentifierAuthority.Value[4] ),
995 MAKEWORD( sid->IdentifierAuthority.Value[3],
996 sid->IdentifierAuthority.Value[2] ) ) );
997 for (i = 0; i < sid->SubAuthorityCount; i++)
998 fprintf( stderr, "-%u", sid->SubAuthority[i] );
999 fputc( '}', stderr );
1002 static void dump_varargs_SID( const char *prefix, data_size_t size )
1004 const SID *sid = cur_data;
1005 dump_inline_sid( prefix, sid, size );
1006 remove_data( size );
1009 static void dump_inline_acl( const char *prefix, const ACL *acl, data_size_t size )
1011 const ACE_HEADER *ace;
1012 ULONG i;
1014 fprintf( stderr,"%s{", prefix );
1015 if (size)
1017 if (size < sizeof(ACL))
1019 fprintf( stderr, "<invalid acl>}" );
1020 return;
1022 size -= sizeof(ACL);
1023 ace = (const ACE_HEADER *)(acl + 1);
1024 for (i = 0; i < acl->AceCount; i++)
1026 const SID *sid = NULL;
1027 data_size_t sid_size = 0;
1029 if (size < sizeof(ACE_HEADER) || size < ace->AceSize) break;
1030 size -= ace->AceSize;
1031 if (i != 0) fputc( ',', stderr );
1032 fprintf( stderr, "{AceType=" );
1033 switch (ace->AceType)
1035 case ACCESS_DENIED_ACE_TYPE:
1036 sid = (const SID *)&((const ACCESS_DENIED_ACE *)ace)->SidStart;
1037 sid_size = ace->AceSize - FIELD_OFFSET(ACCESS_DENIED_ACE, SidStart);
1038 fprintf( stderr, "ACCESS_DENIED_ACE_TYPE,Mask=%x",
1039 ((const ACCESS_DENIED_ACE *)ace)->Mask );
1040 break;
1041 case ACCESS_ALLOWED_ACE_TYPE:
1042 sid = (const SID *)&((const ACCESS_ALLOWED_ACE *)ace)->SidStart;
1043 sid_size = ace->AceSize - FIELD_OFFSET(ACCESS_ALLOWED_ACE, SidStart);
1044 fprintf( stderr, "ACCESS_ALLOWED_ACE_TYPE,Mask=%x",
1045 ((const ACCESS_ALLOWED_ACE *)ace)->Mask );
1046 break;
1047 case SYSTEM_AUDIT_ACE_TYPE:
1048 sid = (const SID *)&((const SYSTEM_AUDIT_ACE *)ace)->SidStart;
1049 sid_size = ace->AceSize - FIELD_OFFSET(SYSTEM_AUDIT_ACE, SidStart);
1050 fprintf( stderr, "SYSTEM_AUDIT_ACE_TYPE,Mask=%x",
1051 ((const SYSTEM_AUDIT_ACE *)ace)->Mask );
1052 break;
1053 case SYSTEM_ALARM_ACE_TYPE:
1054 sid = (const SID *)&((const SYSTEM_ALARM_ACE *)ace)->SidStart;
1055 sid_size = ace->AceSize - FIELD_OFFSET(SYSTEM_ALARM_ACE, SidStart);
1056 fprintf( stderr, "SYSTEM_ALARM_ACE_TYPE,Mask=%x",
1057 ((const SYSTEM_ALARM_ACE *)ace)->Mask );
1058 break;
1059 case SYSTEM_MANDATORY_LABEL_ACE_TYPE:
1060 sid = (const SID *)&((const SYSTEM_MANDATORY_LABEL_ACE *)ace)->SidStart;
1061 sid_size = ace->AceSize - FIELD_OFFSET(SYSTEM_MANDATORY_LABEL_ACE, SidStart);
1062 fprintf( stderr, "SYSTEM_MANDATORY_LABEL_ACE_TYPE,Mask=%x",
1063 ((const SYSTEM_MANDATORY_LABEL_ACE *)ace)->Mask );
1064 break;
1065 default:
1066 fprintf( stderr, "unknown<%d>", ace->AceType );
1067 break;
1069 fprintf( stderr, ",AceFlags=%x", ace->AceFlags );
1070 if (sid)
1071 dump_inline_sid( ",Sid=", sid, sid_size );
1072 ace = (const ACE_HEADER *)((const char *)ace + ace->AceSize);
1073 fputc( '}', stderr );
1076 fputc( '}', stderr );
1079 static void dump_varargs_ACL( const char *prefix, data_size_t size )
1081 const ACL *acl = cur_data;
1082 dump_inline_acl( prefix, acl, size );
1083 remove_data( size );
1086 static void dump_inline_security_descriptor( const char *prefix, const struct security_descriptor *sd, data_size_t size )
1088 fprintf( stderr,"%s{", prefix );
1089 if (size >= sizeof(struct security_descriptor))
1091 size_t offset = sizeof(struct security_descriptor);
1092 fprintf( stderr, "control=%08x", sd->control );
1093 if ((sd->owner_len > FIELD_OFFSET(SID, SubAuthority[255])) || (offset + sd->owner_len > size))
1094 return;
1095 if (sd->owner_len)
1096 dump_inline_sid( ",owner=", (const SID *)((const char *)sd + offset), sd->owner_len );
1097 else
1098 fprintf( stderr, ",owner=<not present>" );
1099 offset += sd->owner_len;
1100 if ((sd->group_len > FIELD_OFFSET(SID, SubAuthority[255])) || (offset + sd->group_len > size))
1101 return;
1102 if (sd->group_len)
1103 dump_inline_sid( ",group=", (const SID *)((const char *)sd + offset), sd->group_len );
1104 else
1105 fprintf( stderr, ",group=<not present>" );
1106 offset += sd->group_len;
1107 if ((sd->sacl_len >= MAX_ACL_LEN) || (offset + sd->sacl_len > size))
1108 return;
1109 dump_inline_acl( ",sacl=", (const ACL *)((const char *)sd + offset), sd->sacl_len );
1110 offset += sd->sacl_len;
1111 if ((sd->dacl_len >= MAX_ACL_LEN) || (offset + sd->dacl_len > size))
1112 return;
1113 dump_inline_acl( ",dacl=", (const ACL *)((const char *)sd + offset), sd->dacl_len );
1114 offset += sd->dacl_len;
1116 fputc( '}', stderr );
1119 static void dump_varargs_security_descriptor( const char *prefix, data_size_t size )
1121 const struct security_descriptor *sd = cur_data;
1122 dump_inline_security_descriptor( prefix, sd, size );
1123 remove_data( size );
1126 static void dump_varargs_token_groups( const char *prefix, data_size_t size )
1128 const struct token_groups *tg = cur_data;
1130 fprintf( stderr,"%s{", prefix );
1131 if (size >= sizeof(struct token_groups))
1133 size_t offset = sizeof(*tg);
1134 fprintf( stderr, "count=%08x,", tg->count );
1135 if (tg->count * sizeof(unsigned int) <= size)
1137 unsigned int i;
1138 const unsigned int *attr = (const unsigned int *)(tg + 1);
1140 offset += tg->count * sizeof(unsigned int);
1142 fputc( '[', stderr );
1143 for (i = 0; i < tg->count; i++)
1145 const SID *sid = (const SID *)((const char *)cur_data + offset);
1146 if (i != 0)
1147 fputc( ',', stderr );
1148 fputc( '{', stderr );
1149 fprintf( stderr, "attributes=%08x", attr[i] );
1150 dump_inline_sid( ",sid=", sid, size - offset );
1151 if ((offset + FIELD_OFFSET(SID, SubAuthority[0]) > size) ||
1152 (offset + FIELD_OFFSET(SID, SubAuthority[sid->SubAuthorityCount]) > size))
1153 break;
1154 offset += FIELD_OFFSET(SID, SubAuthority[sid->SubAuthorityCount]);
1155 fputc( '}', stderr );
1157 fputc( ']', stderr );
1160 fputc( '}', stderr );
1163 static void dump_varargs_process_info( const char *prefix, data_size_t size )
1165 data_size_t pos = 0;
1166 unsigned int i;
1168 fprintf( stderr,"%s{", prefix );
1170 while (size - pos >= sizeof(struct process_info))
1172 const struct process_info *process;
1173 pos = (pos + 7) & ~7;
1174 process = (const struct process_info *)((const char *)cur_data + pos);
1175 if (size - pos < sizeof(*process)) break;
1176 if (pos) fputc( ',', stderr );
1177 dump_timeout( "{start_time=", &process->start_time );
1178 fprintf( stderr, ",thread_count=%u,priority=%d,pid=%04x,parent_pid=%04x,handle_count=%u,unix_pid=%d,",
1179 process->thread_count, process->priority, process->pid,
1180 process->parent_pid, process->handle_count, process->unix_pid );
1181 pos += sizeof(*process);
1183 pos = dump_inline_unicode_string( "name=L\"", pos, process->name_len, size );
1185 pos = (pos + 7) & ~7;
1186 fprintf( stderr, "\",threads={" );
1187 for (i = 0; i < process->thread_count; i++)
1189 const struct thread_info *thread = (const struct thread_info *)((const char *)cur_data + pos);
1190 if (size - pos < sizeof(*thread)) break;
1191 if (i) fputc( ',', stderr );
1192 dump_timeout( "{start_time=", &thread->start_time );
1193 fprintf( stderr, ",tid=%04x,base_priority=%d,current_priority=%d,unix_tid=%d}",
1194 thread->tid, thread->base_priority, thread->current_priority, thread->unix_tid );
1195 pos += sizeof(*thread);
1197 fprintf( stderr, "}}" );
1199 fputc( '}', stderr );
1200 remove_data( size );
1203 static void dump_varargs_object_attributes( const char *prefix, data_size_t size )
1205 const struct object_attributes *objattr = cur_data;
1207 fprintf( stderr,"%s{", prefix );
1208 if (size)
1210 const WCHAR *str;
1212 if (size < sizeof(*objattr) ||
1213 (size - sizeof(*objattr) < objattr->sd_len) ||
1214 (size - sizeof(*objattr) - objattr->sd_len < objattr->name_len))
1216 fprintf( stderr, "***invalid***}" );
1217 remove_data( size );
1218 return;
1221 fprintf( stderr, "rootdir=%04x,attributes=%08x", objattr->rootdir, objattr->attributes );
1222 dump_inline_security_descriptor( ",sd=", (const struct security_descriptor *)(objattr + 1), objattr->sd_len );
1223 str = (const WCHAR *)objattr + (sizeof(*objattr) + objattr->sd_len) / sizeof(WCHAR);
1224 fprintf( stderr, ",name=L\"" );
1225 dump_strW( str, objattr->name_len, stderr, "\"\"" );
1226 fputc( '\"', stderr );
1227 remove_data( (sizeof(*objattr) + (objattr->sd_len & ~1) + (objattr->name_len & ~1) + 3) & ~3 );
1229 fputc( '}', stderr );
1232 static void dump_varargs_object_type_info( const char *prefix, data_size_t size )
1234 const struct object_type_info *info = cur_data;
1236 fprintf( stderr,"%s{", prefix );
1237 if (size)
1239 if (size < sizeof(*info) || (size - sizeof(*info) < info->name_len))
1241 fprintf( stderr, "***invalid***}" );
1242 remove_data( size );
1243 return;
1246 fprintf( stderr, "index=%u,obj_count=%u,handle_count=%u,obj_max=%u,handle_max=%u,valid=%08x",
1247 info->index,info->obj_count, info->handle_count, info->obj_max, info->handle_max,
1248 info->valid_access );
1249 dump_generic_map( ",access=", &info->mapping );
1250 fprintf( stderr, ",name=L\"" );
1251 dump_strW( (const WCHAR *)(info + 1), info->name_len, stderr, "\"\"" );
1252 fputc( '\"', stderr );
1253 remove_data( min( size, sizeof(*info) + ((info->name_len + 2) & ~3 )));
1255 fputc( '}', stderr );
1258 static void dump_varargs_object_types_info( const char *prefix, data_size_t size )
1260 fprintf( stderr,"%s{", prefix );
1261 while (cur_size) dump_varargs_object_type_info( ",", cur_size );
1262 fputc( '}', stderr );
1265 static void dump_varargs_filesystem_event( const char *prefix, data_size_t size )
1267 static const char * const actions[] = {
1268 NULL,
1269 "ADDED",
1270 "REMOVED",
1271 "MODIFIED",
1272 "RENAMED_OLD_NAME",
1273 "RENAMED_NEW_NAME",
1274 "ADDED_STREAM",
1275 "REMOVED_STREAM",
1276 "MODIFIED_STREAM"
1279 fprintf( stderr,"%s{", prefix );
1280 while (size)
1282 const struct filesystem_event *event = cur_data;
1283 data_size_t len = (offsetof( struct filesystem_event, name[event->len] ) + sizeof(int)-1)
1284 / sizeof(int) * sizeof(int);
1285 if (size < len) break;
1286 if (event->action < ARRAY_SIZE( actions ) && actions[event->action])
1287 fprintf( stderr, "{action=%s", actions[event->action] );
1288 else
1289 fprintf( stderr, "{action=%u", event->action );
1290 fprintf( stderr, ",name=\"%.*s\"}", event->len, event->name );
1291 size -= len;
1292 remove_data( len );
1293 if (size)fputc( ',', stderr );
1295 fputc( '}', stderr );
1298 static void dump_varargs_pe_image_info( const char *prefix, data_size_t size )
1300 pe_image_info_t info;
1302 if (!size)
1304 fprintf( stderr, "%s{}", prefix );
1305 return;
1307 memset( &info, 0, sizeof(info) );
1308 memcpy( &info, cur_data, min( size, sizeof(info) ));
1310 fprintf( stderr, "%s{", prefix );
1311 dump_uint64( "base=", &info.base );
1312 dump_uint64( ",entry_point=", &info.entry_point );
1313 dump_uint64( ",map_size=", &info.map_size );
1314 dump_uint64( ",stack_size=", &info.stack_size );
1315 dump_uint64( ",stack_commit=", &info.stack_commit );
1316 fprintf( stderr, ",zerobits=%08x,subsystem=%08x,subsystem_minor=%04x,subsystem_major=%04x"
1317 ",osversion_major=%04x,osversion_minor=%04x,image_charact=%04x,dll_charact=%04x,machine=%04x"
1318 ",contains_code=%u,image_flags=%02x"
1319 ",loader_flags=%08x,header_size=%08x,file_size=%08x,checksum=%08x}",
1320 info.zerobits, info.subsystem, info.subsystem_minor, info.subsystem_major,
1321 info.osversion_major, info.osversion_minor, info.image_charact, info.dll_charact,
1322 info.machine, info.contains_code, info.image_flags, info.loader_flags,
1323 info.header_size, info.file_size, info.checksum );
1324 remove_data( min( size, sizeof(info) ));
1327 static void dump_varargs_rawinput_devices(const char *prefix, data_size_t size )
1329 const struct rawinput_device *device;
1331 fprintf( stderr, "%s{", prefix );
1332 while (size >= sizeof(*device))
1334 device = cur_data;
1335 fprintf( stderr, "{usage_page=%04x,usage=%04x,flags=%08x,target=%08x}",
1336 device->usage_page, device->usage, device->flags, device->target );
1337 size -= sizeof(*device);
1338 remove_data( sizeof(*device) );
1339 if (size) fputc( ',', stderr );
1341 fputc( '}', stderr );
1344 static void dump_varargs_handle_infos( const char *prefix, data_size_t size )
1346 const struct handle_info *handle;
1348 fprintf( stderr, "%s{", prefix );
1349 while (size >= sizeof(*handle))
1351 handle = cur_data;
1352 fprintf( stderr, "{owner=%04x,handle=%04x,access=%08x,attributes=%08x,type=%u}",
1353 handle->owner, handle->handle, handle->access, handle->attributes, handle->type );
1354 size -= sizeof(*handle);
1355 remove_data( sizeof(*handle) );
1356 if (size) fputc( ',', stderr );
1358 fputc( '}', stderr );
1361 typedef void (*dump_func)( const void *req );
1363 /* Everything below this line is generated automatically by tools/make_requests */
1364 /* ### make_requests begin ### */
1366 static void dump_new_process_request( const struct new_process_request *req )
1368 fprintf( stderr, " token=%04x", req->token );
1369 fprintf( stderr, ", debug=%04x", req->debug );
1370 fprintf( stderr, ", parent_process=%04x", req->parent_process );
1371 fprintf( stderr, ", inherit_all=%d", req->inherit_all );
1372 fprintf( stderr, ", create_flags=%08x", req->create_flags );
1373 fprintf( stderr, ", socket_fd=%d", req->socket_fd );
1374 fprintf( stderr, ", access=%08x", req->access );
1375 dump_client_cpu( ", cpu=", &req->cpu );
1376 fprintf( stderr, ", info_size=%u", req->info_size );
1377 fprintf( stderr, ", handles_size=%u", req->handles_size );
1378 dump_varargs_object_attributes( ", objattr=", cur_size );
1379 dump_varargs_uints( ", handles=", min(cur_size,req->handles_size) );
1380 dump_varargs_startup_info( ", info=", min(cur_size,req->info_size) );
1381 dump_varargs_unicode_str( ", env=", cur_size );
1384 static void dump_new_process_reply( const struct new_process_reply *req )
1386 fprintf( stderr, " info=%04x", req->info );
1387 fprintf( stderr, ", pid=%04x", req->pid );
1388 fprintf( stderr, ", handle=%04x", req->handle );
1391 static void dump_get_new_process_info_request( const struct get_new_process_info_request *req )
1393 fprintf( stderr, " info=%04x", req->info );
1396 static void dump_get_new_process_info_reply( const struct get_new_process_info_reply *req )
1398 fprintf( stderr, " success=%d", req->success );
1399 fprintf( stderr, ", exit_code=%d", req->exit_code );
1402 static void dump_new_thread_request( const struct new_thread_request *req )
1404 fprintf( stderr, " process=%04x", req->process );
1405 fprintf( stderr, ", access=%08x", req->access );
1406 fprintf( stderr, ", suspend=%d", req->suspend );
1407 fprintf( stderr, ", request_fd=%d", req->request_fd );
1408 dump_varargs_object_attributes( ", objattr=", cur_size );
1411 static void dump_new_thread_reply( const struct new_thread_reply *req )
1413 fprintf( stderr, " tid=%04x", req->tid );
1414 fprintf( stderr, ", handle=%04x", req->handle );
1417 static void dump_get_startup_info_request( const struct get_startup_info_request *req )
1421 static void dump_get_startup_info_reply( const struct get_startup_info_reply *req )
1423 fprintf( stderr, " info_size=%u", req->info_size );
1424 dump_varargs_startup_info( ", info=", min(cur_size,req->info_size) );
1425 dump_varargs_unicode_str( ", env=", cur_size );
1428 static void dump_init_process_done_request( const struct init_process_done_request *req )
1432 static void dump_init_process_done_reply( const struct init_process_done_reply *req )
1434 dump_uint64( " entry=", &req->entry );
1435 fprintf( stderr, ", suspend=%d", req->suspend );
1438 static void dump_init_first_thread_request( const struct init_first_thread_request *req )
1440 fprintf( stderr, " unix_pid=%d", req->unix_pid );
1441 fprintf( stderr, ", unix_tid=%d", req->unix_tid );
1442 fprintf( stderr, ", debug_level=%d", req->debug_level );
1443 dump_uint64( ", teb=", &req->teb );
1444 dump_uint64( ", peb=", &req->peb );
1445 dump_uint64( ", ldt_copy=", &req->ldt_copy );
1446 fprintf( stderr, ", reply_fd=%d", req->reply_fd );
1447 fprintf( stderr, ", wait_fd=%d", req->wait_fd );
1448 dump_client_cpu( ", cpu=", &req->cpu );
1451 static void dump_init_first_thread_reply( const struct init_first_thread_reply *req )
1453 fprintf( stderr, " pid=%04x", req->pid );
1454 fprintf( stderr, ", tid=%04x", req->tid );
1455 dump_timeout( ", server_start=", &req->server_start );
1456 fprintf( stderr, ", info_size=%u", req->info_size );
1457 fprintf( stderr, ", all_cpus=%08x", req->all_cpus );
1460 static void dump_init_thread_request( const struct init_thread_request *req )
1462 fprintf( stderr, " unix_tid=%d", req->unix_tid );
1463 fprintf( stderr, ", reply_fd=%d", req->reply_fd );
1464 fprintf( stderr, ", wait_fd=%d", req->wait_fd );
1465 dump_uint64( ", teb=", &req->teb );
1466 dump_uint64( ", entry=", &req->entry );
1469 static void dump_init_thread_reply( const struct init_thread_reply *req )
1471 fprintf( stderr, " pid=%04x", req->pid );
1472 fprintf( stderr, ", tid=%04x", req->tid );
1473 fprintf( stderr, ", suspend=%d", req->suspend );
1476 static void dump_terminate_process_request( const struct terminate_process_request *req )
1478 fprintf( stderr, " handle=%04x", req->handle );
1479 fprintf( stderr, ", exit_code=%d", req->exit_code );
1482 static void dump_terminate_process_reply( const struct terminate_process_reply *req )
1484 fprintf( stderr, " self=%d", req->self );
1487 static void dump_terminate_thread_request( const struct terminate_thread_request *req )
1489 fprintf( stderr, " handle=%04x", req->handle );
1490 fprintf( stderr, ", exit_code=%d", req->exit_code );
1493 static void dump_terminate_thread_reply( const struct terminate_thread_reply *req )
1495 fprintf( stderr, " self=%d", req->self );
1498 static void dump_get_process_info_request( const struct get_process_info_request *req )
1500 fprintf( stderr, " handle=%04x", req->handle );
1503 static void dump_get_process_info_reply( const struct get_process_info_reply *req )
1505 fprintf( stderr, " pid=%04x", req->pid );
1506 fprintf( stderr, ", ppid=%04x", req->ppid );
1507 dump_uint64( ", affinity=", &req->affinity );
1508 dump_uint64( ", peb=", &req->peb );
1509 dump_timeout( ", start_time=", &req->start_time );
1510 dump_timeout( ", end_time=", &req->end_time );
1511 fprintf( stderr, ", exit_code=%d", req->exit_code );
1512 fprintf( stderr, ", priority=%d", req->priority );
1513 dump_client_cpu( ", cpu=", &req->cpu );
1514 dump_varargs_pe_image_info( ", image=", cur_size );
1517 static void dump_get_process_debug_info_request( const struct get_process_debug_info_request *req )
1519 fprintf( stderr, " handle=%04x", req->handle );
1522 static void dump_get_process_debug_info_reply( const struct get_process_debug_info_reply *req )
1524 fprintf( stderr, " debug=%04x", req->debug );
1525 fprintf( stderr, ", debug_children=%d", req->debug_children );
1526 dump_varargs_pe_image_info( ", image=", cur_size );
1529 static void dump_get_process_image_name_request( const struct get_process_image_name_request *req )
1531 fprintf( stderr, " handle=%04x", req->handle );
1532 fprintf( stderr, ", win32=%d", req->win32 );
1535 static void dump_get_process_image_name_reply( const struct get_process_image_name_reply *req )
1537 fprintf( stderr, " len=%u", req->len );
1538 dump_varargs_unicode_str( ", name=", cur_size );
1541 static void dump_get_process_vm_counters_request( const struct get_process_vm_counters_request *req )
1543 fprintf( stderr, " handle=%04x", req->handle );
1546 static void dump_get_process_vm_counters_reply( const struct get_process_vm_counters_reply *req )
1548 dump_uint64( " peak_virtual_size=", &req->peak_virtual_size );
1549 dump_uint64( ", virtual_size=", &req->virtual_size );
1550 dump_uint64( ", peak_working_set_size=", &req->peak_working_set_size );
1551 dump_uint64( ", working_set_size=", &req->working_set_size );
1552 dump_uint64( ", pagefile_usage=", &req->pagefile_usage );
1553 dump_uint64( ", peak_pagefile_usage=", &req->peak_pagefile_usage );
1556 static void dump_set_process_info_request( const struct set_process_info_request *req )
1558 fprintf( stderr, " handle=%04x", req->handle );
1559 fprintf( stderr, ", mask=%d", req->mask );
1560 fprintf( stderr, ", priority=%d", req->priority );
1561 dump_uint64( ", affinity=", &req->affinity );
1564 static void dump_get_thread_info_request( const struct get_thread_info_request *req )
1566 fprintf( stderr, " handle=%04x", req->handle );
1567 fprintf( stderr, ", access=%08x", req->access );
1570 static void dump_get_thread_info_reply( const struct get_thread_info_reply *req )
1572 fprintf( stderr, " pid=%04x", req->pid );
1573 fprintf( stderr, ", tid=%04x", req->tid );
1574 dump_uint64( ", teb=", &req->teb );
1575 dump_uint64( ", entry_point=", &req->entry_point );
1576 dump_uint64( ", affinity=", &req->affinity );
1577 fprintf( stderr, ", exit_code=%d", req->exit_code );
1578 fprintf( stderr, ", priority=%d", req->priority );
1579 fprintf( stderr, ", last=%d", req->last );
1580 fprintf( stderr, ", suspend_count=%d", req->suspend_count );
1581 fprintf( stderr, ", dbg_hidden=%d", req->dbg_hidden );
1582 fprintf( stderr, ", desc_len=%u", req->desc_len );
1583 dump_varargs_unicode_str( ", desc=", cur_size );
1586 static void dump_get_thread_times_request( const struct get_thread_times_request *req )
1588 fprintf( stderr, " handle=%04x", req->handle );
1591 static void dump_get_thread_times_reply( const struct get_thread_times_reply *req )
1593 dump_timeout( " creation_time=", &req->creation_time );
1594 dump_timeout( ", exit_time=", &req->exit_time );
1595 fprintf( stderr, ", unix_pid=%d", req->unix_pid );
1596 fprintf( stderr, ", unix_tid=%d", req->unix_tid );
1599 static void dump_set_thread_info_request( const struct set_thread_info_request *req )
1601 fprintf( stderr, " handle=%04x", req->handle );
1602 fprintf( stderr, ", mask=%d", req->mask );
1603 fprintf( stderr, ", priority=%d", req->priority );
1604 dump_uint64( ", affinity=", &req->affinity );
1605 dump_uint64( ", entry_point=", &req->entry_point );
1606 fprintf( stderr, ", token=%04x", req->token );
1607 dump_varargs_unicode_str( ", desc=", cur_size );
1610 static void dump_suspend_thread_request( const struct suspend_thread_request *req )
1612 fprintf( stderr, " handle=%04x", req->handle );
1615 static void dump_suspend_thread_reply( const struct suspend_thread_reply *req )
1617 fprintf( stderr, " count=%d", req->count );
1620 static void dump_resume_thread_request( const struct resume_thread_request *req )
1622 fprintf( stderr, " handle=%04x", req->handle );
1625 static void dump_resume_thread_reply( const struct resume_thread_reply *req )
1627 fprintf( stderr, " count=%d", req->count );
1630 static void dump_queue_apc_request( const struct queue_apc_request *req )
1632 fprintf( stderr, " handle=%04x", req->handle );
1633 dump_apc_call( ", call=", &req->call );
1636 static void dump_queue_apc_reply( const struct queue_apc_reply *req )
1638 fprintf( stderr, " handle=%04x", req->handle );
1639 fprintf( stderr, ", self=%d", req->self );
1642 static void dump_get_apc_result_request( const struct get_apc_result_request *req )
1644 fprintf( stderr, " handle=%04x", req->handle );
1647 static void dump_get_apc_result_reply( const struct get_apc_result_reply *req )
1649 dump_apc_result( " result=", &req->result );
1652 static void dump_close_handle_request( const struct close_handle_request *req )
1654 fprintf( stderr, " handle=%04x", req->handle );
1657 static void dump_set_handle_info_request( const struct set_handle_info_request *req )
1659 fprintf( stderr, " handle=%04x", req->handle );
1660 fprintf( stderr, ", flags=%d", req->flags );
1661 fprintf( stderr, ", mask=%d", req->mask );
1664 static void dump_set_handle_info_reply( const struct set_handle_info_reply *req )
1666 fprintf( stderr, " old_flags=%d", req->old_flags );
1669 static void dump_dup_handle_request( const struct dup_handle_request *req )
1671 fprintf( stderr, " src_process=%04x", req->src_process );
1672 fprintf( stderr, ", src_handle=%04x", req->src_handle );
1673 fprintf( stderr, ", dst_process=%04x", req->dst_process );
1674 fprintf( stderr, ", access=%08x", req->access );
1675 fprintf( stderr, ", attributes=%08x", req->attributes );
1676 fprintf( stderr, ", options=%08x", req->options );
1679 static void dump_dup_handle_reply( const struct dup_handle_reply *req )
1681 fprintf( stderr, " handle=%04x", req->handle );
1684 static void dump_make_temporary_request( const struct make_temporary_request *req )
1686 fprintf( stderr, " handle=%04x", req->handle );
1689 static void dump_open_process_request( const struct open_process_request *req )
1691 fprintf( stderr, " pid=%04x", req->pid );
1692 fprintf( stderr, ", access=%08x", req->access );
1693 fprintf( stderr, ", attributes=%08x", req->attributes );
1696 static void dump_open_process_reply( const struct open_process_reply *req )
1698 fprintf( stderr, " handle=%04x", req->handle );
1701 static void dump_open_thread_request( const struct open_thread_request *req )
1703 fprintf( stderr, " tid=%04x", req->tid );
1704 fprintf( stderr, ", access=%08x", req->access );
1705 fprintf( stderr, ", attributes=%08x", req->attributes );
1708 static void dump_open_thread_reply( const struct open_thread_reply *req )
1710 fprintf( stderr, " handle=%04x", req->handle );
1713 static void dump_select_request( const struct select_request *req )
1715 fprintf( stderr, " flags=%d", req->flags );
1716 dump_uint64( ", cookie=", &req->cookie );
1717 dump_abstime( ", timeout=", &req->timeout );
1718 fprintf( stderr, ", size=%u", req->size );
1719 fprintf( stderr, ", prev_apc=%04x", req->prev_apc );
1720 dump_varargs_apc_result( ", result=", cur_size );
1721 dump_varargs_select_op( ", data=", min(cur_size,req->size) );
1722 dump_varargs_context( ", context=", cur_size );
1725 static void dump_select_reply( const struct select_reply *req )
1727 dump_apc_call( " call=", &req->call );
1728 fprintf( stderr, ", apc_handle=%04x", req->apc_handle );
1729 dump_varargs_context( ", context=", cur_size );
1732 static void dump_create_event_request( const struct create_event_request *req )
1734 fprintf( stderr, " access=%08x", req->access );
1735 fprintf( stderr, ", manual_reset=%d", req->manual_reset );
1736 fprintf( stderr, ", initial_state=%d", req->initial_state );
1737 dump_varargs_object_attributes( ", objattr=", cur_size );
1740 static void dump_create_event_reply( const struct create_event_reply *req )
1742 fprintf( stderr, " handle=%04x", req->handle );
1745 static void dump_event_op_request( const struct event_op_request *req )
1747 fprintf( stderr, " handle=%04x", req->handle );
1748 fprintf( stderr, ", op=%d", req->op );
1751 static void dump_event_op_reply( const struct event_op_reply *req )
1753 fprintf( stderr, " state=%d", req->state );
1756 static void dump_query_event_request( const struct query_event_request *req )
1758 fprintf( stderr, " handle=%04x", req->handle );
1761 static void dump_query_event_reply( const struct query_event_reply *req )
1763 fprintf( stderr, " manual_reset=%d", req->manual_reset );
1764 fprintf( stderr, ", state=%d", req->state );
1767 static void dump_open_event_request( const struct open_event_request *req )
1769 fprintf( stderr, " access=%08x", req->access );
1770 fprintf( stderr, ", attributes=%08x", req->attributes );
1771 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1772 dump_varargs_unicode_str( ", name=", cur_size );
1775 static void dump_open_event_reply( const struct open_event_reply *req )
1777 fprintf( stderr, " handle=%04x", req->handle );
1780 static void dump_create_keyed_event_request( const struct create_keyed_event_request *req )
1782 fprintf( stderr, " access=%08x", req->access );
1783 dump_varargs_object_attributes( ", objattr=", cur_size );
1786 static void dump_create_keyed_event_reply( const struct create_keyed_event_reply *req )
1788 fprintf( stderr, " handle=%04x", req->handle );
1791 static void dump_open_keyed_event_request( const struct open_keyed_event_request *req )
1793 fprintf( stderr, " access=%08x", req->access );
1794 fprintf( stderr, ", attributes=%08x", req->attributes );
1795 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1796 dump_varargs_unicode_str( ", name=", cur_size );
1799 static void dump_open_keyed_event_reply( const struct open_keyed_event_reply *req )
1801 fprintf( stderr, " handle=%04x", req->handle );
1804 static void dump_create_mutex_request( const struct create_mutex_request *req )
1806 fprintf( stderr, " access=%08x", req->access );
1807 fprintf( stderr, ", owned=%d", req->owned );
1808 dump_varargs_object_attributes( ", objattr=", cur_size );
1811 static void dump_create_mutex_reply( const struct create_mutex_reply *req )
1813 fprintf( stderr, " handle=%04x", req->handle );
1816 static void dump_release_mutex_request( const struct release_mutex_request *req )
1818 fprintf( stderr, " handle=%04x", req->handle );
1821 static void dump_release_mutex_reply( const struct release_mutex_reply *req )
1823 fprintf( stderr, " prev_count=%08x", req->prev_count );
1826 static void dump_open_mutex_request( const struct open_mutex_request *req )
1828 fprintf( stderr, " access=%08x", req->access );
1829 fprintf( stderr, ", attributes=%08x", req->attributes );
1830 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1831 dump_varargs_unicode_str( ", name=", cur_size );
1834 static void dump_open_mutex_reply( const struct open_mutex_reply *req )
1836 fprintf( stderr, " handle=%04x", req->handle );
1839 static void dump_query_mutex_request( const struct query_mutex_request *req )
1841 fprintf( stderr, " handle=%04x", req->handle );
1844 static void dump_query_mutex_reply( const struct query_mutex_reply *req )
1846 fprintf( stderr, " count=%08x", req->count );
1847 fprintf( stderr, ", owned=%d", req->owned );
1848 fprintf( stderr, ", abandoned=%d", req->abandoned );
1851 static void dump_create_semaphore_request( const struct create_semaphore_request *req )
1853 fprintf( stderr, " access=%08x", req->access );
1854 fprintf( stderr, ", initial=%08x", req->initial );
1855 fprintf( stderr, ", max=%08x", req->max );
1856 dump_varargs_object_attributes( ", objattr=", cur_size );
1859 static void dump_create_semaphore_reply( const struct create_semaphore_reply *req )
1861 fprintf( stderr, " handle=%04x", req->handle );
1864 static void dump_release_semaphore_request( const struct release_semaphore_request *req )
1866 fprintf( stderr, " handle=%04x", req->handle );
1867 fprintf( stderr, ", count=%08x", req->count );
1870 static void dump_release_semaphore_reply( const struct release_semaphore_reply *req )
1872 fprintf( stderr, " prev_count=%08x", req->prev_count );
1875 static void dump_query_semaphore_request( const struct query_semaphore_request *req )
1877 fprintf( stderr, " handle=%04x", req->handle );
1880 static void dump_query_semaphore_reply( const struct query_semaphore_reply *req )
1882 fprintf( stderr, " current=%08x", req->current );
1883 fprintf( stderr, ", max=%08x", req->max );
1886 static void dump_open_semaphore_request( const struct open_semaphore_request *req )
1888 fprintf( stderr, " access=%08x", req->access );
1889 fprintf( stderr, ", attributes=%08x", req->attributes );
1890 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1891 dump_varargs_unicode_str( ", name=", cur_size );
1894 static void dump_open_semaphore_reply( const struct open_semaphore_reply *req )
1896 fprintf( stderr, " handle=%04x", req->handle );
1899 static void dump_create_file_request( const struct create_file_request *req )
1901 fprintf( stderr, " access=%08x", req->access );
1902 fprintf( stderr, ", sharing=%08x", req->sharing );
1903 fprintf( stderr, ", create=%d", req->create );
1904 fprintf( stderr, ", options=%08x", req->options );
1905 fprintf( stderr, ", attrs=%08x", req->attrs );
1906 dump_varargs_object_attributes( ", objattr=", cur_size );
1907 dump_varargs_string( ", filename=", cur_size );
1910 static void dump_create_file_reply( const struct create_file_reply *req )
1912 fprintf( stderr, " handle=%04x", req->handle );
1915 static void dump_open_file_object_request( const struct open_file_object_request *req )
1917 fprintf( stderr, " access=%08x", req->access );
1918 fprintf( stderr, ", attributes=%08x", req->attributes );
1919 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1920 fprintf( stderr, ", sharing=%08x", req->sharing );
1921 fprintf( stderr, ", options=%08x", req->options );
1922 dump_varargs_unicode_str( ", filename=", cur_size );
1925 static void dump_open_file_object_reply( const struct open_file_object_reply *req )
1927 fprintf( stderr, " handle=%04x", req->handle );
1930 static void dump_alloc_file_handle_request( const struct alloc_file_handle_request *req )
1932 fprintf( stderr, " access=%08x", req->access );
1933 fprintf( stderr, ", attributes=%08x", req->attributes );
1934 fprintf( stderr, ", fd=%d", req->fd );
1937 static void dump_alloc_file_handle_reply( const struct alloc_file_handle_reply *req )
1939 fprintf( stderr, " handle=%04x", req->handle );
1942 static void dump_get_handle_unix_name_request( const struct get_handle_unix_name_request *req )
1944 fprintf( stderr, " handle=%04x", req->handle );
1947 static void dump_get_handle_unix_name_reply( const struct get_handle_unix_name_reply *req )
1949 fprintf( stderr, " name_len=%u", req->name_len );
1950 dump_varargs_string( ", name=", cur_size );
1953 static void dump_get_handle_fd_request( const struct get_handle_fd_request *req )
1955 fprintf( stderr, " handle=%04x", req->handle );
1958 static void dump_get_handle_fd_reply( const struct get_handle_fd_reply *req )
1960 fprintf( stderr, " type=%d", req->type );
1961 fprintf( stderr, ", cacheable=%d", req->cacheable );
1962 fprintf( stderr, ", access=%08x", req->access );
1963 fprintf( stderr, ", options=%08x", req->options );
1966 static void dump_get_directory_cache_entry_request( const struct get_directory_cache_entry_request *req )
1968 fprintf( stderr, " handle=%04x", req->handle );
1971 static void dump_get_directory_cache_entry_reply( const struct get_directory_cache_entry_reply *req )
1973 fprintf( stderr, " entry=%d", req->entry );
1974 dump_varargs_ints( ", free=", cur_size );
1977 static void dump_flush_request( const struct flush_request *req )
1979 dump_async_data( " async=", &req->async );
1982 static void dump_flush_reply( const struct flush_reply *req )
1984 fprintf( stderr, " event=%04x", req->event );
1987 static void dump_get_file_info_request( const struct get_file_info_request *req )
1989 fprintf( stderr, " handle=%04x", req->handle );
1990 fprintf( stderr, ", info_class=%08x", req->info_class );
1993 static void dump_get_file_info_reply( const struct get_file_info_reply *req )
1995 dump_varargs_bytes( " data=", cur_size );
1998 static void dump_get_volume_info_request( const struct get_volume_info_request *req )
2000 fprintf( stderr, " handle=%04x", req->handle );
2001 dump_async_data( ", async=", &req->async );
2002 fprintf( stderr, ", info_class=%08x", req->info_class );
2005 static void dump_get_volume_info_reply( const struct get_volume_info_reply *req )
2007 fprintf( stderr, " wait=%04x", req->wait );
2008 dump_varargs_bytes( ", data=", cur_size );
2011 static void dump_lock_file_request( const struct lock_file_request *req )
2013 fprintf( stderr, " handle=%04x", req->handle );
2014 dump_uint64( ", offset=", &req->offset );
2015 dump_uint64( ", count=", &req->count );
2016 fprintf( stderr, ", shared=%d", req->shared );
2017 fprintf( stderr, ", wait=%d", req->wait );
2020 static void dump_lock_file_reply( const struct lock_file_reply *req )
2022 fprintf( stderr, " handle=%04x", req->handle );
2023 fprintf( stderr, ", overlapped=%d", req->overlapped );
2026 static void dump_unlock_file_request( const struct unlock_file_request *req )
2028 fprintf( stderr, " handle=%04x", req->handle );
2029 dump_uint64( ", offset=", &req->offset );
2030 dump_uint64( ", count=", &req->count );
2033 static void dump_set_socket_event_request( const struct set_socket_event_request *req )
2035 fprintf( stderr, " handle=%04x", req->handle );
2036 fprintf( stderr, ", mask=%08x", req->mask );
2037 fprintf( stderr, ", event=%04x", req->event );
2038 fprintf( stderr, ", window=%08x", req->window );
2039 fprintf( stderr, ", msg=%08x", req->msg );
2042 static void dump_get_socket_event_request( const struct get_socket_event_request *req )
2044 fprintf( stderr, " handle=%04x", req->handle );
2045 fprintf( stderr, ", service=%d", req->service );
2046 fprintf( stderr, ", c_event=%04x", req->c_event );
2049 static void dump_get_socket_event_reply( const struct get_socket_event_reply *req )
2051 fprintf( stderr, " mask=%08x", req->mask );
2052 fprintf( stderr, ", pmask=%08x", req->pmask );
2053 fprintf( stderr, ", state=%08x", req->state );
2054 dump_varargs_ints( ", errors=", cur_size );
2057 static void dump_get_socket_info_request( const struct get_socket_info_request *req )
2059 fprintf( stderr, " handle=%04x", req->handle );
2062 static void dump_get_socket_info_reply( const struct get_socket_info_reply *req )
2064 fprintf( stderr, " family=%d", req->family );
2065 fprintf( stderr, ", type=%d", req->type );
2066 fprintf( stderr, ", protocol=%d", req->protocol );
2069 static void dump_enable_socket_event_request( const struct enable_socket_event_request *req )
2071 fprintf( stderr, " handle=%04x", req->handle );
2072 fprintf( stderr, ", mask=%08x", req->mask );
2073 fprintf( stderr, ", sstate=%08x", req->sstate );
2074 fprintf( stderr, ", cstate=%08x", req->cstate );
2077 static void dump_set_socket_deferred_request( const struct set_socket_deferred_request *req )
2079 fprintf( stderr, " handle=%04x", req->handle );
2080 fprintf( stderr, ", deferred=%04x", req->deferred );
2083 static void dump_get_next_console_request_request( const struct get_next_console_request_request *req )
2085 fprintf( stderr, " handle=%04x", req->handle );
2086 fprintf( stderr, ", signal=%d", req->signal );
2087 fprintf( stderr, ", read=%d", req->read );
2088 fprintf( stderr, ", status=%08x", req->status );
2089 dump_varargs_bytes( ", out_data=", cur_size );
2092 static void dump_get_next_console_request_reply( const struct get_next_console_request_reply *req )
2094 fprintf( stderr, " code=%08x", req->code );
2095 fprintf( stderr, ", output=%08x", req->output );
2096 fprintf( stderr, ", out_size=%u", req->out_size );
2097 dump_varargs_bytes( ", in_data=", cur_size );
2100 static void dump_read_directory_changes_request( const struct read_directory_changes_request *req )
2102 fprintf( stderr, " filter=%08x", req->filter );
2103 fprintf( stderr, ", subtree=%d", req->subtree );
2104 fprintf( stderr, ", want_data=%d", req->want_data );
2105 dump_async_data( ", async=", &req->async );
2108 static void dump_read_change_request( const struct read_change_request *req )
2110 fprintf( stderr, " handle=%04x", req->handle );
2113 static void dump_read_change_reply( const struct read_change_reply *req )
2115 dump_varargs_filesystem_event( " events=", cur_size );
2118 static void dump_create_mapping_request( const struct create_mapping_request *req )
2120 fprintf( stderr, " access=%08x", req->access );
2121 fprintf( stderr, ", flags=%08x", req->flags );
2122 fprintf( stderr, ", file_access=%08x", req->file_access );
2123 dump_uint64( ", size=", &req->size );
2124 fprintf( stderr, ", file_handle=%04x", req->file_handle );
2125 dump_varargs_object_attributes( ", objattr=", cur_size );
2128 static void dump_create_mapping_reply( const struct create_mapping_reply *req )
2130 fprintf( stderr, " handle=%04x", req->handle );
2133 static void dump_open_mapping_request( const struct open_mapping_request *req )
2135 fprintf( stderr, " access=%08x", req->access );
2136 fprintf( stderr, ", attributes=%08x", req->attributes );
2137 fprintf( stderr, ", rootdir=%04x", req->rootdir );
2138 dump_varargs_unicode_str( ", name=", cur_size );
2141 static void dump_open_mapping_reply( const struct open_mapping_reply *req )
2143 fprintf( stderr, " handle=%04x", req->handle );
2146 static void dump_get_mapping_info_request( const struct get_mapping_info_request *req )
2148 fprintf( stderr, " handle=%04x", req->handle );
2149 fprintf( stderr, ", access=%08x", req->access );
2152 static void dump_get_mapping_info_reply( const struct get_mapping_info_reply *req )
2154 dump_uint64( " size=", &req->size );
2155 fprintf( stderr, ", flags=%08x", req->flags );
2156 fprintf( stderr, ", shared_file=%04x", req->shared_file );
2157 fprintf( stderr, ", total=%u", req->total );
2158 dump_varargs_pe_image_info( ", image=", cur_size );
2159 dump_varargs_unicode_str( ", name=", cur_size );
2162 static void dump_map_view_request( const struct map_view_request *req )
2164 fprintf( stderr, " mapping=%04x", req->mapping );
2165 fprintf( stderr, ", access=%08x", req->access );
2166 dump_uint64( ", base=", &req->base );
2167 dump_uint64( ", size=", &req->size );
2168 dump_uint64( ", start=", &req->start );
2169 dump_varargs_pe_image_info( ", image=", cur_size );
2170 dump_varargs_unicode_str( ", name=", cur_size );
2173 static void dump_unmap_view_request( const struct unmap_view_request *req )
2175 dump_uint64( " base=", &req->base );
2178 static void dump_get_mapping_committed_range_request( const struct get_mapping_committed_range_request *req )
2180 dump_uint64( " base=", &req->base );
2181 dump_uint64( ", offset=", &req->offset );
2184 static void dump_get_mapping_committed_range_reply( const struct get_mapping_committed_range_reply *req )
2186 dump_uint64( " size=", &req->size );
2187 fprintf( stderr, ", committed=%d", req->committed );
2190 static void dump_add_mapping_committed_range_request( const struct add_mapping_committed_range_request *req )
2192 dump_uint64( " base=", &req->base );
2193 dump_uint64( ", offset=", &req->offset );
2194 dump_uint64( ", size=", &req->size );
2197 static void dump_is_same_mapping_request( const struct is_same_mapping_request *req )
2199 dump_uint64( " base1=", &req->base1 );
2200 dump_uint64( ", base2=", &req->base2 );
2203 static void dump_get_mapping_filename_request( const struct get_mapping_filename_request *req )
2205 fprintf( stderr, " process=%04x", req->process );
2206 dump_uint64( ", addr=", &req->addr );
2209 static void dump_get_mapping_filename_reply( const struct get_mapping_filename_reply *req )
2211 fprintf( stderr, " len=%u", req->len );
2212 dump_varargs_unicode_str( ", filename=", cur_size );
2215 static void dump_list_processes_request( const struct list_processes_request *req )
2219 static void dump_list_processes_reply( const struct list_processes_reply *req )
2221 fprintf( stderr, " info_size=%u", req->info_size );
2222 fprintf( stderr, ", process_count=%d", req->process_count );
2223 dump_varargs_process_info( ", data=", min(cur_size,req->info_size) );
2226 static void dump_create_debug_obj_request( const struct create_debug_obj_request *req )
2228 fprintf( stderr, " access=%08x", req->access );
2229 fprintf( stderr, ", flags=%08x", req->flags );
2230 dump_varargs_object_attributes( ", objattr=", cur_size );
2233 static void dump_create_debug_obj_reply( const struct create_debug_obj_reply *req )
2235 fprintf( stderr, " handle=%04x", req->handle );
2238 static void dump_wait_debug_event_request( const struct wait_debug_event_request *req )
2240 fprintf( stderr, " debug=%04x", req->debug );
2243 static void dump_wait_debug_event_reply( const struct wait_debug_event_reply *req )
2245 fprintf( stderr, " pid=%04x", req->pid );
2246 fprintf( stderr, ", tid=%04x", req->tid );
2247 dump_varargs_debug_event( ", event=", cur_size );
2250 static void dump_queue_exception_event_request( const struct queue_exception_event_request *req )
2252 fprintf( stderr, " first=%d", req->first );
2253 fprintf( stderr, ", code=%08x", req->code );
2254 fprintf( stderr, ", flags=%08x", req->flags );
2255 dump_uint64( ", record=", &req->record );
2256 dump_uint64( ", address=", &req->address );
2257 fprintf( stderr, ", len=%u", req->len );
2258 dump_varargs_uints64( ", params=", min(cur_size,req->len) );
2261 static void dump_queue_exception_event_reply( const struct queue_exception_event_reply *req )
2263 fprintf( stderr, " handle=%04x", req->handle );
2266 static void dump_get_exception_status_request( const struct get_exception_status_request *req )
2268 fprintf( stderr, " handle=%04x", req->handle );
2271 static void dump_continue_debug_event_request( const struct continue_debug_event_request *req )
2273 fprintf( stderr, " debug=%04x", req->debug );
2274 fprintf( stderr, ", pid=%04x", req->pid );
2275 fprintf( stderr, ", tid=%04x", req->tid );
2276 fprintf( stderr, ", status=%08x", req->status );
2279 static void dump_debug_process_request( const struct debug_process_request *req )
2281 fprintf( stderr, " handle=%04x", req->handle );
2282 fprintf( stderr, ", debug=%04x", req->debug );
2283 fprintf( stderr, ", attach=%d", req->attach );
2286 static void dump_set_debug_obj_info_request( const struct set_debug_obj_info_request *req )
2288 fprintf( stderr, " debug=%04x", req->debug );
2289 fprintf( stderr, ", flags=%08x", req->flags );
2292 static void dump_read_process_memory_request( const struct read_process_memory_request *req )
2294 fprintf( stderr, " handle=%04x", req->handle );
2295 dump_uint64( ", addr=", &req->addr );
2298 static void dump_read_process_memory_reply( const struct read_process_memory_reply *req )
2300 dump_varargs_bytes( " data=", cur_size );
2303 static void dump_write_process_memory_request( const struct write_process_memory_request *req )
2305 fprintf( stderr, " handle=%04x", req->handle );
2306 dump_uint64( ", addr=", &req->addr );
2307 dump_varargs_bytes( ", data=", cur_size );
2310 static void dump_create_key_request( const struct create_key_request *req )
2312 fprintf( stderr, " access=%08x", req->access );
2313 fprintf( stderr, ", options=%08x", req->options );
2314 dump_varargs_object_attributes( ", objattr=", cur_size );
2315 dump_varargs_unicode_str( ", class=", cur_size );
2318 static void dump_create_key_reply( const struct create_key_reply *req )
2320 fprintf( stderr, " hkey=%04x", req->hkey );
2321 fprintf( stderr, ", created=%d", req->created );
2324 static void dump_open_key_request( const struct open_key_request *req )
2326 fprintf( stderr, " parent=%04x", req->parent );
2327 fprintf( stderr, ", access=%08x", req->access );
2328 fprintf( stderr, ", attributes=%08x", req->attributes );
2329 dump_varargs_unicode_str( ", name=", cur_size );
2332 static void dump_open_key_reply( const struct open_key_reply *req )
2334 fprintf( stderr, " hkey=%04x", req->hkey );
2337 static void dump_delete_key_request( const struct delete_key_request *req )
2339 fprintf( stderr, " hkey=%04x", req->hkey );
2342 static void dump_flush_key_request( const struct flush_key_request *req )
2344 fprintf( stderr, " hkey=%04x", req->hkey );
2347 static void dump_enum_key_request( const struct enum_key_request *req )
2349 fprintf( stderr, " hkey=%04x", req->hkey );
2350 fprintf( stderr, ", index=%d", req->index );
2351 fprintf( stderr, ", info_class=%d", req->info_class );
2354 static void dump_enum_key_reply( const struct enum_key_reply *req )
2356 fprintf( stderr, " subkeys=%d", req->subkeys );
2357 fprintf( stderr, ", max_subkey=%d", req->max_subkey );
2358 fprintf( stderr, ", max_class=%d", req->max_class );
2359 fprintf( stderr, ", values=%d", req->values );
2360 fprintf( stderr, ", max_value=%d", req->max_value );
2361 fprintf( stderr, ", max_data=%d", req->max_data );
2362 dump_timeout( ", modif=", &req->modif );
2363 fprintf( stderr, ", total=%u", req->total );
2364 fprintf( stderr, ", namelen=%u", req->namelen );
2365 dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
2366 dump_varargs_unicode_str( ", class=", cur_size );
2369 static void dump_set_key_value_request( const struct set_key_value_request *req )
2371 fprintf( stderr, " hkey=%04x", req->hkey );
2372 fprintf( stderr, ", type=%d", req->type );
2373 fprintf( stderr, ", namelen=%u", req->namelen );
2374 dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
2375 dump_varargs_bytes( ", data=", cur_size );
2378 static void dump_get_key_value_request( const struct get_key_value_request *req )
2380 fprintf( stderr, " hkey=%04x", req->hkey );
2381 dump_varargs_unicode_str( ", name=", cur_size );
2384 static void dump_get_key_value_reply( const struct get_key_value_reply *req )
2386 fprintf( stderr, " type=%d", req->type );
2387 fprintf( stderr, ", total=%u", req->total );
2388 dump_varargs_bytes( ", data=", cur_size );
2391 static void dump_enum_key_value_request( const struct enum_key_value_request *req )
2393 fprintf( stderr, " hkey=%04x", req->hkey );
2394 fprintf( stderr, ", index=%d", req->index );
2395 fprintf( stderr, ", info_class=%d", req->info_class );
2398 static void dump_enum_key_value_reply( const struct enum_key_value_reply *req )
2400 fprintf( stderr, " type=%d", req->type );
2401 fprintf( stderr, ", total=%u", req->total );
2402 fprintf( stderr, ", namelen=%u", req->namelen );
2403 dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
2404 dump_varargs_bytes( ", data=", cur_size );
2407 static void dump_delete_key_value_request( const struct delete_key_value_request *req )
2409 fprintf( stderr, " hkey=%04x", req->hkey );
2410 dump_varargs_unicode_str( ", name=", cur_size );
2413 static void dump_load_registry_request( const struct load_registry_request *req )
2415 fprintf( stderr, " file=%04x", req->file );
2416 dump_varargs_object_attributes( ", objattr=", cur_size );
2419 static void dump_unload_registry_request( const struct unload_registry_request *req )
2421 fprintf( stderr, " parent=%04x", req->parent );
2422 fprintf( stderr, ", attributes=%08x", req->attributes );
2423 dump_varargs_unicode_str( ", name=", cur_size );
2426 static void dump_save_registry_request( const struct save_registry_request *req )
2428 fprintf( stderr, " hkey=%04x", req->hkey );
2429 fprintf( stderr, ", file=%04x", req->file );
2432 static void dump_set_registry_notification_request( const struct set_registry_notification_request *req )
2434 fprintf( stderr, " hkey=%04x", req->hkey );
2435 fprintf( stderr, ", event=%04x", req->event );
2436 fprintf( stderr, ", subtree=%d", req->subtree );
2437 fprintf( stderr, ", filter=%08x", req->filter );
2440 static void dump_create_timer_request( const struct create_timer_request *req )
2442 fprintf( stderr, " access=%08x", req->access );
2443 fprintf( stderr, ", manual=%d", req->manual );
2444 dump_varargs_object_attributes( ", objattr=", cur_size );
2447 static void dump_create_timer_reply( const struct create_timer_reply *req )
2449 fprintf( stderr, " handle=%04x", req->handle );
2452 static void dump_open_timer_request( const struct open_timer_request *req )
2454 fprintf( stderr, " access=%08x", req->access );
2455 fprintf( stderr, ", attributes=%08x", req->attributes );
2456 fprintf( stderr, ", rootdir=%04x", req->rootdir );
2457 dump_varargs_unicode_str( ", name=", cur_size );
2460 static void dump_open_timer_reply( const struct open_timer_reply *req )
2462 fprintf( stderr, " handle=%04x", req->handle );
2465 static void dump_set_timer_request( const struct set_timer_request *req )
2467 fprintf( stderr, " handle=%04x", req->handle );
2468 dump_timeout( ", expire=", &req->expire );
2469 dump_uint64( ", callback=", &req->callback );
2470 dump_uint64( ", arg=", &req->arg );
2471 fprintf( stderr, ", period=%d", req->period );
2474 static void dump_set_timer_reply( const struct set_timer_reply *req )
2476 fprintf( stderr, " signaled=%d", req->signaled );
2479 static void dump_cancel_timer_request( const struct cancel_timer_request *req )
2481 fprintf( stderr, " handle=%04x", req->handle );
2484 static void dump_cancel_timer_reply( const struct cancel_timer_reply *req )
2486 fprintf( stderr, " signaled=%d", req->signaled );
2489 static void dump_get_timer_info_request( const struct get_timer_info_request *req )
2491 fprintf( stderr, " handle=%04x", req->handle );
2494 static void dump_get_timer_info_reply( const struct get_timer_info_reply *req )
2496 dump_timeout( " when=", &req->when );
2497 fprintf( stderr, ", signaled=%d", req->signaled );
2500 static void dump_get_thread_context_request( const struct get_thread_context_request *req )
2502 fprintf( stderr, " handle=%04x", req->handle );
2503 fprintf( stderr, ", flags=%08x", req->flags );
2506 static void dump_get_thread_context_reply( const struct get_thread_context_reply *req )
2508 fprintf( stderr, " self=%d", req->self );
2509 fprintf( stderr, ", handle=%04x", req->handle );
2510 dump_varargs_context( ", context=", cur_size );
2513 static void dump_set_thread_context_request( const struct set_thread_context_request *req )
2515 fprintf( stderr, " handle=%04x", req->handle );
2516 dump_varargs_context( ", context=", cur_size );
2519 static void dump_set_thread_context_reply( const struct set_thread_context_reply *req )
2521 fprintf( stderr, " self=%d", req->self );
2524 static void dump_get_selector_entry_request( const struct get_selector_entry_request *req )
2526 fprintf( stderr, " handle=%04x", req->handle );
2527 fprintf( stderr, ", entry=%d", req->entry );
2530 static void dump_get_selector_entry_reply( const struct get_selector_entry_reply *req )
2532 fprintf( stderr, " base=%08x", req->base );
2533 fprintf( stderr, ", limit=%08x", req->limit );
2534 fprintf( stderr, ", flags=%02x", req->flags );
2537 static void dump_add_atom_request( const struct add_atom_request *req )
2539 dump_varargs_unicode_str( " name=", cur_size );
2542 static void dump_add_atom_reply( const struct add_atom_reply *req )
2544 fprintf( stderr, " atom=%04x", req->atom );
2547 static void dump_delete_atom_request( const struct delete_atom_request *req )
2549 fprintf( stderr, " atom=%04x", req->atom );
2552 static void dump_find_atom_request( const struct find_atom_request *req )
2554 dump_varargs_unicode_str( " name=", cur_size );
2557 static void dump_find_atom_reply( const struct find_atom_reply *req )
2559 fprintf( stderr, " atom=%04x", req->atom );
2562 static void dump_get_atom_information_request( const struct get_atom_information_request *req )
2564 fprintf( stderr, " atom=%04x", req->atom );
2567 static void dump_get_atom_information_reply( const struct get_atom_information_reply *req )
2569 fprintf( stderr, " count=%d", req->count );
2570 fprintf( stderr, ", pinned=%d", req->pinned );
2571 fprintf( stderr, ", total=%u", req->total );
2572 dump_varargs_unicode_str( ", name=", cur_size );
2575 static void dump_get_msg_queue_request( const struct get_msg_queue_request *req )
2579 static void dump_get_msg_queue_reply( const struct get_msg_queue_reply *req )
2581 fprintf( stderr, " handle=%04x", req->handle );
2584 static void dump_set_queue_fd_request( const struct set_queue_fd_request *req )
2586 fprintf( stderr, " handle=%04x", req->handle );
2589 static void dump_set_queue_mask_request( const struct set_queue_mask_request *req )
2591 fprintf( stderr, " wake_mask=%08x", req->wake_mask );
2592 fprintf( stderr, ", changed_mask=%08x", req->changed_mask );
2593 fprintf( stderr, ", skip_wait=%d", req->skip_wait );
2596 static void dump_set_queue_mask_reply( const struct set_queue_mask_reply *req )
2598 fprintf( stderr, " wake_bits=%08x", req->wake_bits );
2599 fprintf( stderr, ", changed_bits=%08x", req->changed_bits );
2602 static void dump_get_queue_status_request( const struct get_queue_status_request *req )
2604 fprintf( stderr, " clear_bits=%08x", req->clear_bits );
2607 static void dump_get_queue_status_reply( const struct get_queue_status_reply *req )
2609 fprintf( stderr, " wake_bits=%08x", req->wake_bits );
2610 fprintf( stderr, ", changed_bits=%08x", req->changed_bits );
2613 static void dump_get_process_idle_event_request( const struct get_process_idle_event_request *req )
2615 fprintf( stderr, " handle=%04x", req->handle );
2618 static void dump_get_process_idle_event_reply( const struct get_process_idle_event_reply *req )
2620 fprintf( stderr, " event=%04x", req->event );
2623 static void dump_send_message_request( const struct send_message_request *req )
2625 fprintf( stderr, " id=%04x", req->id );
2626 fprintf( stderr, ", type=%d", req->type );
2627 fprintf( stderr, ", flags=%d", req->flags );
2628 fprintf( stderr, ", win=%08x", req->win );
2629 fprintf( stderr, ", msg=%08x", req->msg );
2630 dump_uint64( ", wparam=", &req->wparam );
2631 dump_uint64( ", lparam=", &req->lparam );
2632 dump_timeout( ", timeout=", &req->timeout );
2633 dump_varargs_message_data( ", data=", cur_size );
2636 static void dump_post_quit_message_request( const struct post_quit_message_request *req )
2638 fprintf( stderr, " exit_code=%d", req->exit_code );
2641 static void dump_send_hardware_message_request( const struct send_hardware_message_request *req )
2643 fprintf( stderr, " win=%08x", req->win );
2644 dump_hw_input( ", input=", &req->input );
2645 fprintf( stderr, ", flags=%08x", req->flags );
2648 static void dump_send_hardware_message_reply( const struct send_hardware_message_reply *req )
2650 fprintf( stderr, " wait=%d", req->wait );
2651 fprintf( stderr, ", prev_x=%d", req->prev_x );
2652 fprintf( stderr, ", prev_y=%d", req->prev_y );
2653 fprintf( stderr, ", new_x=%d", req->new_x );
2654 fprintf( stderr, ", new_y=%d", req->new_y );
2655 dump_varargs_bytes( ", keystate=", cur_size );
2658 static void dump_get_message_request( const struct get_message_request *req )
2660 fprintf( stderr, " flags=%08x", req->flags );
2661 fprintf( stderr, ", get_win=%08x", req->get_win );
2662 fprintf( stderr, ", get_first=%08x", req->get_first );
2663 fprintf( stderr, ", get_last=%08x", req->get_last );
2664 fprintf( stderr, ", hw_id=%08x", req->hw_id );
2665 fprintf( stderr, ", wake_mask=%08x", req->wake_mask );
2666 fprintf( stderr, ", changed_mask=%08x", req->changed_mask );
2669 static void dump_get_message_reply( const struct get_message_reply *req )
2671 fprintf( stderr, " win=%08x", req->win );
2672 fprintf( stderr, ", msg=%08x", req->msg );
2673 dump_uint64( ", wparam=", &req->wparam );
2674 dump_uint64( ", lparam=", &req->lparam );
2675 fprintf( stderr, ", type=%d", req->type );
2676 fprintf( stderr, ", x=%d", req->x );
2677 fprintf( stderr, ", y=%d", req->y );
2678 fprintf( stderr, ", time=%08x", req->time );
2679 fprintf( stderr, ", active_hooks=%08x", req->active_hooks );
2680 fprintf( stderr, ", total=%u", req->total );
2681 dump_varargs_message_data( ", data=", cur_size );
2684 static void dump_reply_message_request( const struct reply_message_request *req )
2686 fprintf( stderr, " remove=%d", req->remove );
2687 dump_uint64( ", result=", &req->result );
2688 dump_varargs_bytes( ", data=", cur_size );
2691 static void dump_accept_hardware_message_request( const struct accept_hardware_message_request *req )
2693 fprintf( stderr, " hw_id=%08x", req->hw_id );
2696 static void dump_get_message_reply_request( const struct get_message_reply_request *req )
2698 fprintf( stderr, " cancel=%d", req->cancel );
2701 static void dump_get_message_reply_reply( const struct get_message_reply_reply *req )
2703 dump_uint64( " result=", &req->result );
2704 dump_varargs_bytes( ", data=", cur_size );
2707 static void dump_set_win_timer_request( const struct set_win_timer_request *req )
2709 fprintf( stderr, " win=%08x", req->win );
2710 fprintf( stderr, ", msg=%08x", req->msg );
2711 fprintf( stderr, ", rate=%08x", req->rate );
2712 dump_uint64( ", id=", &req->id );
2713 dump_uint64( ", lparam=", &req->lparam );
2716 static void dump_set_win_timer_reply( const struct set_win_timer_reply *req )
2718 dump_uint64( " id=", &req->id );
2721 static void dump_kill_win_timer_request( const struct kill_win_timer_request *req )
2723 fprintf( stderr, " win=%08x", req->win );
2724 dump_uint64( ", id=", &req->id );
2725 fprintf( stderr, ", msg=%08x", req->msg );
2728 static void dump_is_window_hung_request( const struct is_window_hung_request *req )
2730 fprintf( stderr, " win=%08x", req->win );
2733 static void dump_is_window_hung_reply( const struct is_window_hung_reply *req )
2735 fprintf( stderr, " is_hung=%d", req->is_hung );
2738 static void dump_get_serial_info_request( const struct get_serial_info_request *req )
2740 fprintf( stderr, " handle=%04x", req->handle );
2741 fprintf( stderr, ", flags=%d", req->flags );
2744 static void dump_get_serial_info_reply( const struct get_serial_info_reply *req )
2746 fprintf( stderr, " eventmask=%08x", req->eventmask );
2747 fprintf( stderr, ", cookie=%08x", req->cookie );
2748 fprintf( stderr, ", pending_write=%08x", req->pending_write );
2751 static void dump_set_serial_info_request( const struct set_serial_info_request *req )
2753 fprintf( stderr, " handle=%04x", req->handle );
2754 fprintf( stderr, ", flags=%d", req->flags );
2757 static void dump_register_async_request( const struct register_async_request *req )
2759 fprintf( stderr, " type=%d", req->type );
2760 dump_async_data( ", async=", &req->async );
2761 fprintf( stderr, ", count=%d", req->count );
2764 static void dump_cancel_async_request( const struct cancel_async_request *req )
2766 fprintf( stderr, " handle=%04x", req->handle );
2767 dump_uint64( ", iosb=", &req->iosb );
2768 fprintf( stderr, ", only_thread=%d", req->only_thread );
2771 static void dump_get_async_result_request( const struct get_async_result_request *req )
2773 dump_uint64( " user_arg=", &req->user_arg );
2776 static void dump_get_async_result_reply( const struct get_async_result_reply *req )
2778 fprintf( stderr, " size=%u", req->size );
2779 dump_varargs_bytes( ", out_data=", cur_size );
2782 static void dump_read_request( const struct read_request *req )
2784 dump_async_data( " async=", &req->async );
2785 dump_uint64( ", pos=", &req->pos );
2788 static void dump_read_reply( const struct read_reply *req )
2790 fprintf( stderr, " wait=%04x", req->wait );
2791 fprintf( stderr, ", options=%08x", req->options );
2792 dump_varargs_bytes( ", data=", cur_size );
2795 static void dump_write_request( const struct write_request *req )
2797 dump_async_data( " async=", &req->async );
2798 dump_uint64( ", pos=", &req->pos );
2799 dump_varargs_bytes( ", data=", cur_size );
2802 static void dump_write_reply( const struct write_reply *req )
2804 fprintf( stderr, " wait=%04x", req->wait );
2805 fprintf( stderr, ", options=%08x", req->options );
2806 fprintf( stderr, ", size=%u", req->size );
2809 static void dump_ioctl_request( const struct ioctl_request *req )
2811 dump_ioctl_code( " code=", &req->code );
2812 dump_async_data( ", async=", &req->async );
2813 dump_varargs_bytes( ", in_data=", cur_size );
2816 static void dump_ioctl_reply( const struct ioctl_reply *req )
2818 fprintf( stderr, " wait=%04x", req->wait );
2819 fprintf( stderr, ", options=%08x", req->options );
2820 dump_varargs_bytes( ", out_data=", cur_size );
2823 static void dump_set_irp_result_request( const struct set_irp_result_request *req )
2825 fprintf( stderr, " handle=%04x", req->handle );
2826 fprintf( stderr, ", status=%08x", req->status );
2827 fprintf( stderr, ", size=%u", req->size );
2828 dump_varargs_bytes( ", data=", cur_size );
2831 static void dump_create_named_pipe_request( const struct create_named_pipe_request *req )
2833 fprintf( stderr, " access=%08x", req->access );
2834 fprintf( stderr, ", options=%08x", req->options );
2835 fprintf( stderr, ", sharing=%08x", req->sharing );
2836 fprintf( stderr, ", maxinstances=%08x", req->maxinstances );
2837 fprintf( stderr, ", outsize=%08x", req->outsize );
2838 fprintf( stderr, ", insize=%08x", req->insize );
2839 dump_timeout( ", timeout=", &req->timeout );
2840 fprintf( stderr, ", flags=%08x", req->flags );
2841 dump_varargs_object_attributes( ", objattr=", cur_size );
2844 static void dump_create_named_pipe_reply( const struct create_named_pipe_reply *req )
2846 fprintf( stderr, " handle=%04x", req->handle );
2849 static void dump_set_named_pipe_info_request( const struct set_named_pipe_info_request *req )
2851 fprintf( stderr, " handle=%04x", req->handle );
2852 fprintf( stderr, ", flags=%08x", req->flags );
2855 static void dump_create_window_request( const struct create_window_request *req )
2857 fprintf( stderr, " parent=%08x", req->parent );
2858 fprintf( stderr, ", owner=%08x", req->owner );
2859 fprintf( stderr, ", atom=%04x", req->atom );
2860 dump_uint64( ", instance=", &req->instance );
2861 fprintf( stderr, ", dpi=%d", req->dpi );
2862 fprintf( stderr, ", awareness=%d", req->awareness );
2863 dump_varargs_unicode_str( ", class=", cur_size );
2866 static void dump_create_window_reply( const struct create_window_reply *req )
2868 fprintf( stderr, " handle=%08x", req->handle );
2869 fprintf( stderr, ", parent=%08x", req->parent );
2870 fprintf( stderr, ", owner=%08x", req->owner );
2871 fprintf( stderr, ", extra=%d", req->extra );
2872 dump_uint64( ", class_ptr=", &req->class_ptr );
2873 fprintf( stderr, ", dpi=%d", req->dpi );
2874 fprintf( stderr, ", awareness=%d", req->awareness );
2877 static void dump_destroy_window_request( const struct destroy_window_request *req )
2879 fprintf( stderr, " handle=%08x", req->handle );
2882 static void dump_get_desktop_window_request( const struct get_desktop_window_request *req )
2884 fprintf( stderr, " force=%d", req->force );
2887 static void dump_get_desktop_window_reply( const struct get_desktop_window_reply *req )
2889 fprintf( stderr, " top_window=%08x", req->top_window );
2890 fprintf( stderr, ", msg_window=%08x", req->msg_window );
2893 static void dump_set_window_owner_request( const struct set_window_owner_request *req )
2895 fprintf( stderr, " handle=%08x", req->handle );
2896 fprintf( stderr, ", owner=%08x", req->owner );
2899 static void dump_set_window_owner_reply( const struct set_window_owner_reply *req )
2901 fprintf( stderr, " full_owner=%08x", req->full_owner );
2902 fprintf( stderr, ", prev_owner=%08x", req->prev_owner );
2905 static void dump_get_window_info_request( const struct get_window_info_request *req )
2907 fprintf( stderr, " handle=%08x", req->handle );
2910 static void dump_get_window_info_reply( const struct get_window_info_reply *req )
2912 fprintf( stderr, " full_handle=%08x", req->full_handle );
2913 fprintf( stderr, ", last_active=%08x", req->last_active );
2914 fprintf( stderr, ", pid=%04x", req->pid );
2915 fprintf( stderr, ", tid=%04x", req->tid );
2916 fprintf( stderr, ", atom=%04x", req->atom );
2917 fprintf( stderr, ", is_unicode=%d", req->is_unicode );
2918 fprintf( stderr, ", dpi=%d", req->dpi );
2919 fprintf( stderr, ", awareness=%d", req->awareness );
2922 static void dump_set_window_info_request( const struct set_window_info_request *req )
2924 fprintf( stderr, " flags=%04x", req->flags );
2925 fprintf( stderr, ", is_unicode=%d", req->is_unicode );
2926 fprintf( stderr, ", handle=%08x", req->handle );
2927 fprintf( stderr, ", style=%08x", req->style );
2928 fprintf( stderr, ", ex_style=%08x", req->ex_style );
2929 fprintf( stderr, ", id=%08x", req->id );
2930 dump_uint64( ", instance=", &req->instance );
2931 dump_uint64( ", user_data=", &req->user_data );
2932 fprintf( stderr, ", extra_offset=%d", req->extra_offset );
2933 fprintf( stderr, ", extra_size=%u", req->extra_size );
2934 dump_uint64( ", extra_value=", &req->extra_value );
2937 static void dump_set_window_info_reply( const struct set_window_info_reply *req )
2939 fprintf( stderr, " old_style=%08x", req->old_style );
2940 fprintf( stderr, ", old_ex_style=%08x", req->old_ex_style );
2941 dump_uint64( ", old_instance=", &req->old_instance );
2942 dump_uint64( ", old_user_data=", &req->old_user_data );
2943 dump_uint64( ", old_extra_value=", &req->old_extra_value );
2944 fprintf( stderr, ", old_id=%08x", req->old_id );
2947 static void dump_set_parent_request( const struct set_parent_request *req )
2949 fprintf( stderr, " handle=%08x", req->handle );
2950 fprintf( stderr, ", parent=%08x", req->parent );
2953 static void dump_set_parent_reply( const struct set_parent_reply *req )
2955 fprintf( stderr, " old_parent=%08x", req->old_parent );
2956 fprintf( stderr, ", full_parent=%08x", req->full_parent );
2957 fprintf( stderr, ", dpi=%d", req->dpi );
2958 fprintf( stderr, ", awareness=%d", req->awareness );
2961 static void dump_get_window_parents_request( const struct get_window_parents_request *req )
2963 fprintf( stderr, " handle=%08x", req->handle );
2966 static void dump_get_window_parents_reply( const struct get_window_parents_reply *req )
2968 fprintf( stderr, " count=%d", req->count );
2969 dump_varargs_user_handles( ", parents=", cur_size );
2972 static void dump_get_window_children_request( const struct get_window_children_request *req )
2974 fprintf( stderr, " desktop=%04x", req->desktop );
2975 fprintf( stderr, ", parent=%08x", req->parent );
2976 fprintf( stderr, ", atom=%04x", req->atom );
2977 fprintf( stderr, ", tid=%04x", req->tid );
2978 dump_varargs_unicode_str( ", class=", cur_size );
2981 static void dump_get_window_children_reply( const struct get_window_children_reply *req )
2983 fprintf( stderr, " count=%d", req->count );
2984 dump_varargs_user_handles( ", children=", cur_size );
2987 static void dump_get_window_children_from_point_request( const struct get_window_children_from_point_request *req )
2989 fprintf( stderr, " parent=%08x", req->parent );
2990 fprintf( stderr, ", x=%d", req->x );
2991 fprintf( stderr, ", y=%d", req->y );
2992 fprintf( stderr, ", dpi=%d", req->dpi );
2995 static void dump_get_window_children_from_point_reply( const struct get_window_children_from_point_reply *req )
2997 fprintf( stderr, " count=%d", req->count );
2998 dump_varargs_user_handles( ", children=", cur_size );
3001 static void dump_get_window_tree_request( const struct get_window_tree_request *req )
3003 fprintf( stderr, " handle=%08x", req->handle );
3006 static void dump_get_window_tree_reply( const struct get_window_tree_reply *req )
3008 fprintf( stderr, " parent=%08x", req->parent );
3009 fprintf( stderr, ", owner=%08x", req->owner );
3010 fprintf( stderr, ", next_sibling=%08x", req->next_sibling );
3011 fprintf( stderr, ", prev_sibling=%08x", req->prev_sibling );
3012 fprintf( stderr, ", first_sibling=%08x", req->first_sibling );
3013 fprintf( stderr, ", last_sibling=%08x", req->last_sibling );
3014 fprintf( stderr, ", first_child=%08x", req->first_child );
3015 fprintf( stderr, ", last_child=%08x", req->last_child );
3018 static void dump_set_window_pos_request( const struct set_window_pos_request *req )
3020 fprintf( stderr, " swp_flags=%04x", req->swp_flags );
3021 fprintf( stderr, ", paint_flags=%04x", req->paint_flags );
3022 fprintf( stderr, ", handle=%08x", req->handle );
3023 fprintf( stderr, ", previous=%08x", req->previous );
3024 dump_rectangle( ", window=", &req->window );
3025 dump_rectangle( ", client=", &req->client );
3026 dump_varargs_rectangles( ", valid=", cur_size );
3029 static void dump_set_window_pos_reply( const struct set_window_pos_reply *req )
3031 fprintf( stderr, " new_style=%08x", req->new_style );
3032 fprintf( stderr, ", new_ex_style=%08x", req->new_ex_style );
3033 fprintf( stderr, ", surface_win=%08x", req->surface_win );
3034 fprintf( stderr, ", needs_update=%d", req->needs_update );
3037 static void dump_get_window_rectangles_request( const struct get_window_rectangles_request *req )
3039 fprintf( stderr, " handle=%08x", req->handle );
3040 fprintf( stderr, ", relative=%d", req->relative );
3041 fprintf( stderr, ", dpi=%d", req->dpi );
3044 static void dump_get_window_rectangles_reply( const struct get_window_rectangles_reply *req )
3046 dump_rectangle( " window=", &req->window );
3047 dump_rectangle( ", client=", &req->client );
3050 static void dump_get_window_text_request( const struct get_window_text_request *req )
3052 fprintf( stderr, " handle=%08x", req->handle );
3055 static void dump_get_window_text_reply( const struct get_window_text_reply *req )
3057 fprintf( stderr, " length=%u", req->length );
3058 dump_varargs_unicode_str( ", text=", cur_size );
3061 static void dump_set_window_text_request( const struct set_window_text_request *req )
3063 fprintf( stderr, " handle=%08x", req->handle );
3064 dump_varargs_unicode_str( ", text=", cur_size );
3067 static void dump_get_windows_offset_request( const struct get_windows_offset_request *req )
3069 fprintf( stderr, " from=%08x", req->from );
3070 fprintf( stderr, ", to=%08x", req->to );
3071 fprintf( stderr, ", dpi=%d", req->dpi );
3074 static void dump_get_windows_offset_reply( const struct get_windows_offset_reply *req )
3076 fprintf( stderr, " x=%d", req->x );
3077 fprintf( stderr, ", y=%d", req->y );
3078 fprintf( stderr, ", mirror=%d", req->mirror );
3081 static void dump_get_visible_region_request( const struct get_visible_region_request *req )
3083 fprintf( stderr, " window=%08x", req->window );
3084 fprintf( stderr, ", flags=%08x", req->flags );
3087 static void dump_get_visible_region_reply( const struct get_visible_region_reply *req )
3089 fprintf( stderr, " top_win=%08x", req->top_win );
3090 dump_rectangle( ", top_rect=", &req->top_rect );
3091 dump_rectangle( ", win_rect=", &req->win_rect );
3092 fprintf( stderr, ", paint_flags=%08x", req->paint_flags );
3093 fprintf( stderr, ", total_size=%u", req->total_size );
3094 dump_varargs_rectangles( ", region=", cur_size );
3097 static void dump_get_surface_region_request( const struct get_surface_region_request *req )
3099 fprintf( stderr, " window=%08x", req->window );
3102 static void dump_get_surface_region_reply( const struct get_surface_region_reply *req )
3104 dump_rectangle( " visible_rect=", &req->visible_rect );
3105 fprintf( stderr, ", total_size=%u", req->total_size );
3106 dump_varargs_rectangles( ", region=", cur_size );
3109 static void dump_get_window_region_request( const struct get_window_region_request *req )
3111 fprintf( stderr, " window=%08x", req->window );
3114 static void dump_get_window_region_reply( const struct get_window_region_reply *req )
3116 fprintf( stderr, " total_size=%u", req->total_size );
3117 dump_varargs_rectangles( ", region=", cur_size );
3120 static void dump_set_window_region_request( const struct set_window_region_request *req )
3122 fprintf( stderr, " window=%08x", req->window );
3123 fprintf( stderr, ", redraw=%d", req->redraw );
3124 dump_varargs_rectangles( ", region=", cur_size );
3127 static void dump_get_update_region_request( const struct get_update_region_request *req )
3129 fprintf( stderr, " window=%08x", req->window );
3130 fprintf( stderr, ", from_child=%08x", req->from_child );
3131 fprintf( stderr, ", flags=%08x", req->flags );
3134 static void dump_get_update_region_reply( const struct get_update_region_reply *req )
3136 fprintf( stderr, " child=%08x", req->child );
3137 fprintf( stderr, ", flags=%08x", req->flags );
3138 fprintf( stderr, ", total_size=%u", req->total_size );
3139 dump_varargs_rectangles( ", region=", cur_size );
3142 static void dump_update_window_zorder_request( const struct update_window_zorder_request *req )
3144 fprintf( stderr, " window=%08x", req->window );
3145 dump_rectangle( ", rect=", &req->rect );
3148 static void dump_redraw_window_request( const struct redraw_window_request *req )
3150 fprintf( stderr, " window=%08x", req->window );
3151 fprintf( stderr, ", flags=%08x", req->flags );
3152 dump_varargs_rectangles( ", region=", cur_size );
3155 static void dump_set_window_property_request( const struct set_window_property_request *req )
3157 fprintf( stderr, " window=%08x", req->window );
3158 dump_uint64( ", data=", &req->data );
3159 fprintf( stderr, ", atom=%04x", req->atom );
3160 dump_varargs_unicode_str( ", name=", cur_size );
3163 static void dump_remove_window_property_request( const struct remove_window_property_request *req )
3165 fprintf( stderr, " window=%08x", req->window );
3166 fprintf( stderr, ", atom=%04x", req->atom );
3167 dump_varargs_unicode_str( ", name=", cur_size );
3170 static void dump_remove_window_property_reply( const struct remove_window_property_reply *req )
3172 dump_uint64( " data=", &req->data );
3175 static void dump_get_window_property_request( const struct get_window_property_request *req )
3177 fprintf( stderr, " window=%08x", req->window );
3178 fprintf( stderr, ", atom=%04x", req->atom );
3179 dump_varargs_unicode_str( ", name=", cur_size );
3182 static void dump_get_window_property_reply( const struct get_window_property_reply *req )
3184 dump_uint64( " data=", &req->data );
3187 static void dump_get_window_properties_request( const struct get_window_properties_request *req )
3189 fprintf( stderr, " window=%08x", req->window );
3192 static void dump_get_window_properties_reply( const struct get_window_properties_reply *req )
3194 fprintf( stderr, " total=%d", req->total );
3195 dump_varargs_properties( ", props=", cur_size );
3198 static void dump_create_winstation_request( const struct create_winstation_request *req )
3200 fprintf( stderr, " flags=%08x", req->flags );
3201 fprintf( stderr, ", access=%08x", req->access );
3202 fprintf( stderr, ", attributes=%08x", req->attributes );
3203 fprintf( stderr, ", rootdir=%04x", req->rootdir );
3204 dump_varargs_unicode_str( ", name=", cur_size );
3207 static void dump_create_winstation_reply( const struct create_winstation_reply *req )
3209 fprintf( stderr, " handle=%04x", req->handle );
3212 static void dump_open_winstation_request( const struct open_winstation_request *req )
3214 fprintf( stderr, " access=%08x", req->access );
3215 fprintf( stderr, ", attributes=%08x", req->attributes );
3216 fprintf( stderr, ", rootdir=%04x", req->rootdir );
3217 dump_varargs_unicode_str( ", name=", cur_size );
3220 static void dump_open_winstation_reply( const struct open_winstation_reply *req )
3222 fprintf( stderr, " handle=%04x", req->handle );
3225 static void dump_close_winstation_request( const struct close_winstation_request *req )
3227 fprintf( stderr, " handle=%04x", req->handle );
3230 static void dump_get_process_winstation_request( const struct get_process_winstation_request *req )
3234 static void dump_get_process_winstation_reply( const struct get_process_winstation_reply *req )
3236 fprintf( stderr, " handle=%04x", req->handle );
3239 static void dump_set_process_winstation_request( const struct set_process_winstation_request *req )
3241 fprintf( stderr, " handle=%04x", req->handle );
3244 static void dump_enum_winstation_request( const struct enum_winstation_request *req )
3246 fprintf( stderr, " index=%08x", req->index );
3249 static void dump_enum_winstation_reply( const struct enum_winstation_reply *req )
3251 fprintf( stderr, " next=%08x", req->next );
3252 dump_varargs_unicode_str( ", name=", cur_size );
3255 static void dump_create_desktop_request( const struct create_desktop_request *req )
3257 fprintf( stderr, " flags=%08x", req->flags );
3258 fprintf( stderr, ", access=%08x", req->access );
3259 fprintf( stderr, ", attributes=%08x", req->attributes );
3260 dump_varargs_unicode_str( ", name=", cur_size );
3263 static void dump_create_desktop_reply( const struct create_desktop_reply *req )
3265 fprintf( stderr, " handle=%04x", req->handle );
3268 static void dump_open_desktop_request( const struct open_desktop_request *req )
3270 fprintf( stderr, " winsta=%04x", req->winsta );
3271 fprintf( stderr, ", flags=%08x", req->flags );
3272 fprintf( stderr, ", access=%08x", req->access );
3273 fprintf( stderr, ", attributes=%08x", req->attributes );
3274 dump_varargs_unicode_str( ", name=", cur_size );
3277 static void dump_open_desktop_reply( const struct open_desktop_reply *req )
3279 fprintf( stderr, " handle=%04x", req->handle );
3282 static void dump_open_input_desktop_request( const struct open_input_desktop_request *req )
3284 fprintf( stderr, " flags=%08x", req->flags );
3285 fprintf( stderr, ", access=%08x", req->access );
3286 fprintf( stderr, ", attributes=%08x", req->attributes );
3289 static void dump_open_input_desktop_reply( const struct open_input_desktop_reply *req )
3291 fprintf( stderr, " handle=%04x", req->handle );
3294 static void dump_close_desktop_request( const struct close_desktop_request *req )
3296 fprintf( stderr, " handle=%04x", req->handle );
3299 static void dump_get_thread_desktop_request( const struct get_thread_desktop_request *req )
3301 fprintf( stderr, " tid=%04x", req->tid );
3304 static void dump_get_thread_desktop_reply( const struct get_thread_desktop_reply *req )
3306 fprintf( stderr, " handle=%04x", req->handle );
3309 static void dump_set_thread_desktop_request( const struct set_thread_desktop_request *req )
3311 fprintf( stderr, " handle=%04x", req->handle );
3314 static void dump_enum_desktop_request( const struct enum_desktop_request *req )
3316 fprintf( stderr, " winstation=%04x", req->winstation );
3317 fprintf( stderr, ", index=%08x", req->index );
3320 static void dump_enum_desktop_reply( const struct enum_desktop_reply *req )
3322 fprintf( stderr, " next=%08x", req->next );
3323 dump_varargs_unicode_str( ", name=", cur_size );
3326 static void dump_set_user_object_info_request( const struct set_user_object_info_request *req )
3328 fprintf( stderr, " handle=%04x", req->handle );
3329 fprintf( stderr, ", flags=%08x", req->flags );
3330 fprintf( stderr, ", obj_flags=%08x", req->obj_flags );
3333 static void dump_set_user_object_info_reply( const struct set_user_object_info_reply *req )
3335 fprintf( stderr, " is_desktop=%d", req->is_desktop );
3336 fprintf( stderr, ", old_obj_flags=%08x", req->old_obj_flags );
3337 dump_varargs_unicode_str( ", name=", cur_size );
3340 static void dump_register_hotkey_request( const struct register_hotkey_request *req )
3342 fprintf( stderr, " window=%08x", req->window );
3343 fprintf( stderr, ", id=%d", req->id );
3344 fprintf( stderr, ", flags=%08x", req->flags );
3345 fprintf( stderr, ", vkey=%08x", req->vkey );
3348 static void dump_register_hotkey_reply( const struct register_hotkey_reply *req )
3350 fprintf( stderr, " replaced=%d", req->replaced );
3351 fprintf( stderr, ", flags=%08x", req->flags );
3352 fprintf( stderr, ", vkey=%08x", req->vkey );
3355 static void dump_unregister_hotkey_request( const struct unregister_hotkey_request *req )
3357 fprintf( stderr, " window=%08x", req->window );
3358 fprintf( stderr, ", id=%d", req->id );
3361 static void dump_unregister_hotkey_reply( const struct unregister_hotkey_reply *req )
3363 fprintf( stderr, " flags=%08x", req->flags );
3364 fprintf( stderr, ", vkey=%08x", req->vkey );
3367 static void dump_attach_thread_input_request( const struct attach_thread_input_request *req )
3369 fprintf( stderr, " tid_from=%04x", req->tid_from );
3370 fprintf( stderr, ", tid_to=%04x", req->tid_to );
3371 fprintf( stderr, ", attach=%d", req->attach );
3374 static void dump_get_thread_input_request( const struct get_thread_input_request *req )
3376 fprintf( stderr, " tid=%04x", req->tid );
3379 static void dump_get_thread_input_reply( const struct get_thread_input_reply *req )
3381 fprintf( stderr, " focus=%08x", req->focus );
3382 fprintf( stderr, ", capture=%08x", req->capture );
3383 fprintf( stderr, ", active=%08x", req->active );
3384 fprintf( stderr, ", foreground=%08x", req->foreground );
3385 fprintf( stderr, ", menu_owner=%08x", req->menu_owner );
3386 fprintf( stderr, ", move_size=%08x", req->move_size );
3387 fprintf( stderr, ", caret=%08x", req->caret );
3388 fprintf( stderr, ", cursor=%08x", req->cursor );
3389 fprintf( stderr, ", show_count=%d", req->show_count );
3390 dump_rectangle( ", rect=", &req->rect );
3393 static void dump_get_last_input_time_request( const struct get_last_input_time_request *req )
3397 static void dump_get_last_input_time_reply( const struct get_last_input_time_reply *req )
3399 fprintf( stderr, " time=%08x", req->time );
3402 static void dump_get_key_state_request( const struct get_key_state_request *req )
3404 fprintf( stderr, " async=%d", req->async );
3405 fprintf( stderr, ", key=%d", req->key );
3408 static void dump_get_key_state_reply( const struct get_key_state_reply *req )
3410 fprintf( stderr, " state=%02x", req->state );
3411 dump_varargs_bytes( ", keystate=", cur_size );
3414 static void dump_set_key_state_request( const struct set_key_state_request *req )
3416 fprintf( stderr, " async=%d", req->async );
3417 dump_varargs_bytes( ", keystate=", cur_size );
3420 static void dump_set_foreground_window_request( const struct set_foreground_window_request *req )
3422 fprintf( stderr, " handle=%08x", req->handle );
3425 static void dump_set_foreground_window_reply( const struct set_foreground_window_reply *req )
3427 fprintf( stderr, " previous=%08x", req->previous );
3428 fprintf( stderr, ", send_msg_old=%d", req->send_msg_old );
3429 fprintf( stderr, ", send_msg_new=%d", req->send_msg_new );
3432 static void dump_set_focus_window_request( const struct set_focus_window_request *req )
3434 fprintf( stderr, " handle=%08x", req->handle );
3437 static void dump_set_focus_window_reply( const struct set_focus_window_reply *req )
3439 fprintf( stderr, " previous=%08x", req->previous );
3442 static void dump_set_active_window_request( const struct set_active_window_request *req )
3444 fprintf( stderr, " handle=%08x", req->handle );
3447 static void dump_set_active_window_reply( const struct set_active_window_reply *req )
3449 fprintf( stderr, " previous=%08x", req->previous );
3452 static void dump_set_capture_window_request( const struct set_capture_window_request *req )
3454 fprintf( stderr, " handle=%08x", req->handle );
3455 fprintf( stderr, ", flags=%08x", req->flags );
3458 static void dump_set_capture_window_reply( const struct set_capture_window_reply *req )
3460 fprintf( stderr, " previous=%08x", req->previous );
3461 fprintf( stderr, ", full_handle=%08x", req->full_handle );
3464 static void dump_set_caret_window_request( const struct set_caret_window_request *req )
3466 fprintf( stderr, " handle=%08x", req->handle );
3467 fprintf( stderr, ", width=%d", req->width );
3468 fprintf( stderr, ", height=%d", req->height );
3471 static void dump_set_caret_window_reply( const struct set_caret_window_reply *req )
3473 fprintf( stderr, " previous=%08x", req->previous );
3474 dump_rectangle( ", old_rect=", &req->old_rect );
3475 fprintf( stderr, ", old_hide=%d", req->old_hide );
3476 fprintf( stderr, ", old_state=%d", req->old_state );
3479 static void dump_set_caret_info_request( const struct set_caret_info_request *req )
3481 fprintf( stderr, " flags=%08x", req->flags );
3482 fprintf( stderr, ", handle=%08x", req->handle );
3483 fprintf( stderr, ", x=%d", req->x );
3484 fprintf( stderr, ", y=%d", req->y );
3485 fprintf( stderr, ", hide=%d", req->hide );
3486 fprintf( stderr, ", state=%d", req->state );
3489 static void dump_set_caret_info_reply( const struct set_caret_info_reply *req )
3491 fprintf( stderr, " full_handle=%08x", req->full_handle );
3492 dump_rectangle( ", old_rect=", &req->old_rect );
3493 fprintf( stderr, ", old_hide=%d", req->old_hide );
3494 fprintf( stderr, ", old_state=%d", req->old_state );
3497 static void dump_set_hook_request( const struct set_hook_request *req )
3499 fprintf( stderr, " id=%d", req->id );
3500 fprintf( stderr, ", pid=%04x", req->pid );
3501 fprintf( stderr, ", tid=%04x", req->tid );
3502 fprintf( stderr, ", event_min=%d", req->event_min );
3503 fprintf( stderr, ", event_max=%d", req->event_max );
3504 dump_uint64( ", proc=", &req->proc );
3505 fprintf( stderr, ", flags=%d", req->flags );
3506 fprintf( stderr, ", unicode=%d", req->unicode );
3507 dump_varargs_unicode_str( ", module=", cur_size );
3510 static void dump_set_hook_reply( const struct set_hook_reply *req )
3512 fprintf( stderr, " handle=%08x", req->handle );
3513 fprintf( stderr, ", active_hooks=%08x", req->active_hooks );
3516 static void dump_remove_hook_request( const struct remove_hook_request *req )
3518 fprintf( stderr, " handle=%08x", req->handle );
3519 dump_uint64( ", proc=", &req->proc );
3520 fprintf( stderr, ", id=%d", req->id );
3523 static void dump_remove_hook_reply( const struct remove_hook_reply *req )
3525 fprintf( stderr, " active_hooks=%08x", req->active_hooks );
3528 static void dump_start_hook_chain_request( const struct start_hook_chain_request *req )
3530 fprintf( stderr, " id=%d", req->id );
3531 fprintf( stderr, ", event=%d", req->event );
3532 fprintf( stderr, ", window=%08x", req->window );
3533 fprintf( stderr, ", object_id=%d", req->object_id );
3534 fprintf( stderr, ", child_id=%d", req->child_id );
3537 static void dump_start_hook_chain_reply( const struct start_hook_chain_reply *req )
3539 fprintf( stderr, " handle=%08x", req->handle );
3540 fprintf( stderr, ", pid=%04x", req->pid );
3541 fprintf( stderr, ", tid=%04x", req->tid );
3542 fprintf( stderr, ", unicode=%d", req->unicode );
3543 dump_uint64( ", proc=", &req->proc );
3544 fprintf( stderr, ", active_hooks=%08x", req->active_hooks );
3545 dump_varargs_unicode_str( ", module=", cur_size );
3548 static void dump_finish_hook_chain_request( const struct finish_hook_chain_request *req )
3550 fprintf( stderr, " id=%d", req->id );
3553 static void dump_get_hook_info_request( const struct get_hook_info_request *req )
3555 fprintf( stderr, " handle=%08x", req->handle );
3556 fprintf( stderr, ", get_next=%d", req->get_next );
3557 fprintf( stderr, ", event=%d", req->event );
3558 fprintf( stderr, ", window=%08x", req->window );
3559 fprintf( stderr, ", object_id=%d", req->object_id );
3560 fprintf( stderr, ", child_id=%d", req->child_id );
3563 static void dump_get_hook_info_reply( const struct get_hook_info_reply *req )
3565 fprintf( stderr, " handle=%08x", req->handle );
3566 fprintf( stderr, ", id=%d", req->id );
3567 fprintf( stderr, ", pid=%04x", req->pid );
3568 fprintf( stderr, ", tid=%04x", req->tid );
3569 dump_uint64( ", proc=", &req->proc );
3570 fprintf( stderr, ", unicode=%d", req->unicode );
3571 dump_varargs_unicode_str( ", module=", cur_size );
3574 static void dump_create_class_request( const struct create_class_request *req )
3576 fprintf( stderr, " local=%d", req->local );
3577 fprintf( stderr, ", atom=%04x", req->atom );
3578 fprintf( stderr, ", style=%08x", req->style );
3579 dump_uint64( ", instance=", &req->instance );
3580 fprintf( stderr, ", extra=%d", req->extra );
3581 fprintf( stderr, ", win_extra=%d", req->win_extra );
3582 dump_uint64( ", client_ptr=", &req->client_ptr );
3583 fprintf( stderr, ", name_offset=%u", req->name_offset );
3584 dump_varargs_unicode_str( ", name=", cur_size );
3587 static void dump_create_class_reply( const struct create_class_reply *req )
3589 fprintf( stderr, " atom=%04x", req->atom );
3592 static void dump_destroy_class_request( const struct destroy_class_request *req )
3594 fprintf( stderr, " atom=%04x", req->atom );
3595 dump_uint64( ", instance=", &req->instance );
3596 dump_varargs_unicode_str( ", name=", cur_size );
3599 static void dump_destroy_class_reply( const struct destroy_class_reply *req )
3601 dump_uint64( " client_ptr=", &req->client_ptr );
3604 static void dump_set_class_info_request( const struct set_class_info_request *req )
3606 fprintf( stderr, " window=%08x", req->window );
3607 fprintf( stderr, ", flags=%08x", req->flags );
3608 fprintf( stderr, ", atom=%04x", req->atom );
3609 fprintf( stderr, ", style=%08x", req->style );
3610 fprintf( stderr, ", win_extra=%d", req->win_extra );
3611 dump_uint64( ", instance=", &req->instance );
3612 fprintf( stderr, ", extra_offset=%d", req->extra_offset );
3613 fprintf( stderr, ", extra_size=%u", req->extra_size );
3614 dump_uint64( ", extra_value=", &req->extra_value );
3617 static void dump_set_class_info_reply( const struct set_class_info_reply *req )
3619 fprintf( stderr, " old_atom=%04x", req->old_atom );
3620 fprintf( stderr, ", base_atom=%04x", req->base_atom );
3621 dump_uint64( ", old_instance=", &req->old_instance );
3622 dump_uint64( ", old_extra_value=", &req->old_extra_value );
3623 fprintf( stderr, ", old_style=%08x", req->old_style );
3624 fprintf( stderr, ", old_extra=%d", req->old_extra );
3625 fprintf( stderr, ", old_win_extra=%d", req->old_win_extra );
3628 static void dump_open_clipboard_request( const struct open_clipboard_request *req )
3630 fprintf( stderr, " window=%08x", req->window );
3633 static void dump_open_clipboard_reply( const struct open_clipboard_reply *req )
3635 fprintf( stderr, " owner=%08x", req->owner );
3638 static void dump_close_clipboard_request( const struct close_clipboard_request *req )
3642 static void dump_close_clipboard_reply( const struct close_clipboard_reply *req )
3644 fprintf( stderr, " viewer=%08x", req->viewer );
3645 fprintf( stderr, ", owner=%08x", req->owner );
3648 static void dump_empty_clipboard_request( const struct empty_clipboard_request *req )
3652 static void dump_set_clipboard_data_request( const struct set_clipboard_data_request *req )
3654 fprintf( stderr, " format=%08x", req->format );
3655 fprintf( stderr, ", lcid=%08x", req->lcid );
3656 dump_varargs_bytes( ", data=", cur_size );
3659 static void dump_set_clipboard_data_reply( const struct set_clipboard_data_reply *req )
3661 fprintf( stderr, " seqno=%08x", req->seqno );
3664 static void dump_get_clipboard_data_request( const struct get_clipboard_data_request *req )
3666 fprintf( stderr, " format=%08x", req->format );
3667 fprintf( stderr, ", render=%d", req->render );
3668 fprintf( stderr, ", cached=%d", req->cached );
3669 fprintf( stderr, ", seqno=%08x", req->seqno );
3672 static void dump_get_clipboard_data_reply( const struct get_clipboard_data_reply *req )
3674 fprintf( stderr, " from=%08x", req->from );
3675 fprintf( stderr, ", owner=%08x", req->owner );
3676 fprintf( stderr, ", seqno=%08x", req->seqno );
3677 fprintf( stderr, ", total=%u", req->total );
3678 dump_varargs_bytes( ", data=", cur_size );
3681 static void dump_get_clipboard_formats_request( const struct get_clipboard_formats_request *req )
3683 fprintf( stderr, " format=%08x", req->format );
3686 static void dump_get_clipboard_formats_reply( const struct get_clipboard_formats_reply *req )
3688 fprintf( stderr, " count=%08x", req->count );
3689 dump_varargs_uints( ", formats=", cur_size );
3692 static void dump_enum_clipboard_formats_request( const struct enum_clipboard_formats_request *req )
3694 fprintf( stderr, " previous=%08x", req->previous );
3697 static void dump_enum_clipboard_formats_reply( const struct enum_clipboard_formats_reply *req )
3699 fprintf( stderr, " format=%08x", req->format );
3702 static void dump_release_clipboard_request( const struct release_clipboard_request *req )
3704 fprintf( stderr, " owner=%08x", req->owner );
3707 static void dump_release_clipboard_reply( const struct release_clipboard_reply *req )
3709 fprintf( stderr, " viewer=%08x", req->viewer );
3710 fprintf( stderr, ", owner=%08x", req->owner );
3713 static void dump_get_clipboard_info_request( const struct get_clipboard_info_request *req )
3717 static void dump_get_clipboard_info_reply( const struct get_clipboard_info_reply *req )
3719 fprintf( stderr, " window=%08x", req->window );
3720 fprintf( stderr, ", owner=%08x", req->owner );
3721 fprintf( stderr, ", viewer=%08x", req->viewer );
3722 fprintf( stderr, ", seqno=%08x", req->seqno );
3725 static void dump_set_clipboard_viewer_request( const struct set_clipboard_viewer_request *req )
3727 fprintf( stderr, " viewer=%08x", req->viewer );
3728 fprintf( stderr, ", previous=%08x", req->previous );
3731 static void dump_set_clipboard_viewer_reply( const struct set_clipboard_viewer_reply *req )
3733 fprintf( stderr, " old_viewer=%08x", req->old_viewer );
3734 fprintf( stderr, ", owner=%08x", req->owner );
3737 static void dump_add_clipboard_listener_request( const struct add_clipboard_listener_request *req )
3739 fprintf( stderr, " window=%08x", req->window );
3742 static void dump_remove_clipboard_listener_request( const struct remove_clipboard_listener_request *req )
3744 fprintf( stderr, " window=%08x", req->window );
3747 static void dump_open_token_request( const struct open_token_request *req )
3749 fprintf( stderr, " handle=%04x", req->handle );
3750 fprintf( stderr, ", access=%08x", req->access );
3751 fprintf( stderr, ", attributes=%08x", req->attributes );
3752 fprintf( stderr, ", flags=%08x", req->flags );
3755 static void dump_open_token_reply( const struct open_token_reply *req )
3757 fprintf( stderr, " token=%04x", req->token );
3760 static void dump_set_global_windows_request( const struct set_global_windows_request *req )
3762 fprintf( stderr, " flags=%08x", req->flags );
3763 fprintf( stderr, ", shell_window=%08x", req->shell_window );
3764 fprintf( stderr, ", shell_listview=%08x", req->shell_listview );
3765 fprintf( stderr, ", progman_window=%08x", req->progman_window );
3766 fprintf( stderr, ", taskman_window=%08x", req->taskman_window );
3769 static void dump_set_global_windows_reply( const struct set_global_windows_reply *req )
3771 fprintf( stderr, " old_shell_window=%08x", req->old_shell_window );
3772 fprintf( stderr, ", old_shell_listview=%08x", req->old_shell_listview );
3773 fprintf( stderr, ", old_progman_window=%08x", req->old_progman_window );
3774 fprintf( stderr, ", old_taskman_window=%08x", req->old_taskman_window );
3777 static void dump_adjust_token_privileges_request( const struct adjust_token_privileges_request *req )
3779 fprintf( stderr, " handle=%04x", req->handle );
3780 fprintf( stderr, ", disable_all=%d", req->disable_all );
3781 fprintf( stderr, ", get_modified_state=%d", req->get_modified_state );
3782 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3785 static void dump_adjust_token_privileges_reply( const struct adjust_token_privileges_reply *req )
3787 fprintf( stderr, " len=%08x", req->len );
3788 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3791 static void dump_get_token_privileges_request( const struct get_token_privileges_request *req )
3793 fprintf( stderr, " handle=%04x", req->handle );
3796 static void dump_get_token_privileges_reply( const struct get_token_privileges_reply *req )
3798 fprintf( stderr, " len=%08x", req->len );
3799 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3802 static void dump_check_token_privileges_request( const struct check_token_privileges_request *req )
3804 fprintf( stderr, " handle=%04x", req->handle );
3805 fprintf( stderr, ", all_required=%d", req->all_required );
3806 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3809 static void dump_check_token_privileges_reply( const struct check_token_privileges_reply *req )
3811 fprintf( stderr, " has_privileges=%d", req->has_privileges );
3812 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3815 static void dump_duplicate_token_request( const struct duplicate_token_request *req )
3817 fprintf( stderr, " handle=%04x", req->handle );
3818 fprintf( stderr, ", access=%08x", req->access );
3819 fprintf( stderr, ", primary=%d", req->primary );
3820 fprintf( stderr, ", impersonation_level=%d", req->impersonation_level );
3821 dump_varargs_object_attributes( ", objattr=", cur_size );
3824 static void dump_duplicate_token_reply( const struct duplicate_token_reply *req )
3826 fprintf( stderr, " new_handle=%04x", req->new_handle );
3829 static void dump_filter_token_request( const struct filter_token_request *req )
3831 fprintf( stderr, " handle=%04x", req->handle );
3832 fprintf( stderr, ", flags=%08x", req->flags );
3833 fprintf( stderr, ", privileges_size=%u", req->privileges_size );
3834 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", min(cur_size,req->privileges_size) );
3835 dump_varargs_SID( ", disable_sids=", cur_size );
3838 static void dump_filter_token_reply( const struct filter_token_reply *req )
3840 fprintf( stderr, " new_handle=%04x", req->new_handle );
3843 static void dump_access_check_request( const struct access_check_request *req )
3845 fprintf( stderr, " handle=%04x", req->handle );
3846 fprintf( stderr, ", desired_access=%08x", req->desired_access );
3847 dump_generic_map( ", mapping=", &req->mapping );
3848 dump_varargs_security_descriptor( ", sd=", cur_size );
3851 static void dump_access_check_reply( const struct access_check_reply *req )
3853 fprintf( stderr, " access_granted=%08x", req->access_granted );
3854 fprintf( stderr, ", access_status=%08x", req->access_status );
3855 fprintf( stderr, ", privileges_len=%08x", req->privileges_len );
3856 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3859 static void dump_get_token_sid_request( const struct get_token_sid_request *req )
3861 fprintf( stderr, " handle=%04x", req->handle );
3862 fprintf( stderr, ", which_sid=%08x", req->which_sid );
3865 static void dump_get_token_sid_reply( const struct get_token_sid_reply *req )
3867 fprintf( stderr, " sid_len=%u", req->sid_len );
3868 dump_varargs_SID( ", sid=", cur_size );
3871 static void dump_get_token_groups_request( const struct get_token_groups_request *req )
3873 fprintf( stderr, " handle=%04x", req->handle );
3876 static void dump_get_token_groups_reply( const struct get_token_groups_reply *req )
3878 fprintf( stderr, " user_len=%u", req->user_len );
3879 dump_varargs_token_groups( ", user=", cur_size );
3882 static void dump_get_token_default_dacl_request( const struct get_token_default_dacl_request *req )
3884 fprintf( stderr, " handle=%04x", req->handle );
3887 static void dump_get_token_default_dacl_reply( const struct get_token_default_dacl_reply *req )
3889 fprintf( stderr, " acl_len=%u", req->acl_len );
3890 dump_varargs_ACL( ", acl=", cur_size );
3893 static void dump_set_token_default_dacl_request( const struct set_token_default_dacl_request *req )
3895 fprintf( stderr, " handle=%04x", req->handle );
3896 dump_varargs_ACL( ", acl=", cur_size );
3899 static void dump_set_security_object_request( const struct set_security_object_request *req )
3901 fprintf( stderr, " handle=%04x", req->handle );
3902 fprintf( stderr, ", security_info=%08x", req->security_info );
3903 dump_varargs_security_descriptor( ", sd=", cur_size );
3906 static void dump_get_security_object_request( const struct get_security_object_request *req )
3908 fprintf( stderr, " handle=%04x", req->handle );
3909 fprintf( stderr, ", security_info=%08x", req->security_info );
3912 static void dump_get_security_object_reply( const struct get_security_object_reply *req )
3914 fprintf( stderr, " sd_len=%08x", req->sd_len );
3915 dump_varargs_security_descriptor( ", sd=", cur_size );
3918 static void dump_get_system_handles_request( const struct get_system_handles_request *req )
3922 static void dump_get_system_handles_reply( const struct get_system_handles_reply *req )
3924 fprintf( stderr, " count=%08x", req->count );
3925 dump_varargs_handle_infos( ", data=", cur_size );
3928 static void dump_create_mailslot_request( const struct create_mailslot_request *req )
3930 fprintf( stderr, " access=%08x", req->access );
3931 dump_timeout( ", read_timeout=", &req->read_timeout );
3932 fprintf( stderr, ", max_msgsize=%08x", req->max_msgsize );
3933 dump_varargs_object_attributes( ", objattr=", cur_size );
3936 static void dump_create_mailslot_reply( const struct create_mailslot_reply *req )
3938 fprintf( stderr, " handle=%04x", req->handle );
3941 static void dump_set_mailslot_info_request( const struct set_mailslot_info_request *req )
3943 fprintf( stderr, " handle=%04x", req->handle );
3944 dump_timeout( ", read_timeout=", &req->read_timeout );
3945 fprintf( stderr, ", flags=%08x", req->flags );
3948 static void dump_set_mailslot_info_reply( const struct set_mailslot_info_reply *req )
3950 dump_timeout( " read_timeout=", &req->read_timeout );
3951 fprintf( stderr, ", max_msgsize=%08x", req->max_msgsize );
3954 static void dump_create_directory_request( const struct create_directory_request *req )
3956 fprintf( stderr, " access=%08x", req->access );
3957 dump_varargs_object_attributes( ", objattr=", cur_size );
3960 static void dump_create_directory_reply( const struct create_directory_reply *req )
3962 fprintf( stderr, " handle=%04x", req->handle );
3965 static void dump_open_directory_request( const struct open_directory_request *req )
3967 fprintf( stderr, " access=%08x", req->access );
3968 fprintf( stderr, ", attributes=%08x", req->attributes );
3969 fprintf( stderr, ", rootdir=%04x", req->rootdir );
3970 dump_varargs_unicode_str( ", directory_name=", cur_size );
3973 static void dump_open_directory_reply( const struct open_directory_reply *req )
3975 fprintf( stderr, " handle=%04x", req->handle );
3978 static void dump_get_directory_entry_request( const struct get_directory_entry_request *req )
3980 fprintf( stderr, " handle=%04x", req->handle );
3981 fprintf( stderr, ", index=%08x", req->index );
3984 static void dump_get_directory_entry_reply( const struct get_directory_entry_reply *req )
3986 fprintf( stderr, " name_len=%u", req->name_len );
3987 dump_varargs_unicode_str( ", name=", min(cur_size,req->name_len) );
3988 dump_varargs_unicode_str( ", type=", cur_size );
3991 static void dump_create_symlink_request( const struct create_symlink_request *req )
3993 fprintf( stderr, " access=%08x", req->access );
3994 dump_varargs_object_attributes( ", objattr=", cur_size );
3995 dump_varargs_unicode_str( ", target_name=", cur_size );
3998 static void dump_create_symlink_reply( const struct create_symlink_reply *req )
4000 fprintf( stderr, " handle=%04x", req->handle );
4003 static void dump_open_symlink_request( const struct open_symlink_request *req )
4005 fprintf( stderr, " access=%08x", req->access );
4006 fprintf( stderr, ", attributes=%08x", req->attributes );
4007 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4008 dump_varargs_unicode_str( ", name=", cur_size );
4011 static void dump_open_symlink_reply( const struct open_symlink_reply *req )
4013 fprintf( stderr, " handle=%04x", req->handle );
4016 static void dump_query_symlink_request( const struct query_symlink_request *req )
4018 fprintf( stderr, " handle=%04x", req->handle );
4021 static void dump_query_symlink_reply( const struct query_symlink_reply *req )
4023 fprintf( stderr, " total=%u", req->total );
4024 dump_varargs_unicode_str( ", target_name=", cur_size );
4027 static void dump_get_object_info_request( const struct get_object_info_request *req )
4029 fprintf( stderr, " handle=%04x", req->handle );
4032 static void dump_get_object_info_reply( const struct get_object_info_reply *req )
4034 fprintf( stderr, " access=%08x", req->access );
4035 fprintf( stderr, ", ref_count=%08x", req->ref_count );
4036 fprintf( stderr, ", handle_count=%08x", req->handle_count );
4037 fprintf( stderr, ", total=%u", req->total );
4038 dump_varargs_unicode_str( ", name=", cur_size );
4041 static void dump_get_object_type_request( const struct get_object_type_request *req )
4043 fprintf( stderr, " handle=%04x", req->handle );
4046 static void dump_get_object_type_reply( const struct get_object_type_reply *req )
4048 dump_varargs_object_type_info( " info=", cur_size );
4051 static void dump_get_object_types_request( const struct get_object_types_request *req )
4055 static void dump_get_object_types_reply( const struct get_object_types_reply *req )
4057 fprintf( stderr, " count=%d", req->count );
4058 dump_varargs_object_types_info( ", info=", cur_size );
4061 static void dump_allocate_locally_unique_id_request( const struct allocate_locally_unique_id_request *req )
4065 static void dump_allocate_locally_unique_id_reply( const struct allocate_locally_unique_id_reply *req )
4067 dump_luid( " luid=", &req->luid );
4070 static void dump_create_device_manager_request( const struct create_device_manager_request *req )
4072 fprintf( stderr, " access=%08x", req->access );
4073 fprintf( stderr, ", attributes=%08x", req->attributes );
4076 static void dump_create_device_manager_reply( const struct create_device_manager_reply *req )
4078 fprintf( stderr, " handle=%04x", req->handle );
4081 static void dump_create_device_request( const struct create_device_request *req )
4083 fprintf( stderr, " rootdir=%04x", req->rootdir );
4084 dump_uint64( ", user_ptr=", &req->user_ptr );
4085 fprintf( stderr, ", manager=%04x", req->manager );
4086 dump_varargs_unicode_str( ", name=", cur_size );
4089 static void dump_delete_device_request( const struct delete_device_request *req )
4091 fprintf( stderr, " manager=%04x", req->manager );
4092 dump_uint64( ", device=", &req->device );
4095 static void dump_get_next_device_request_request( const struct get_next_device_request_request *req )
4097 fprintf( stderr, " manager=%04x", req->manager );
4098 fprintf( stderr, ", prev=%04x", req->prev );
4099 fprintf( stderr, ", status=%08x", req->status );
4100 dump_uint64( ", user_ptr=", &req->user_ptr );
4103 static void dump_get_next_device_request_reply( const struct get_next_device_request_reply *req )
4105 dump_irp_params( " params=", &req->params );
4106 fprintf( stderr, ", next=%04x", req->next );
4107 fprintf( stderr, ", client_tid=%04x", req->client_tid );
4108 dump_uint64( ", client_thread=", &req->client_thread );
4109 fprintf( stderr, ", in_size=%u", req->in_size );
4110 dump_varargs_bytes( ", next_data=", cur_size );
4113 static void dump_get_kernel_object_ptr_request( const struct get_kernel_object_ptr_request *req )
4115 fprintf( stderr, " manager=%04x", req->manager );
4116 fprintf( stderr, ", handle=%04x", req->handle );
4119 static void dump_get_kernel_object_ptr_reply( const struct get_kernel_object_ptr_reply *req )
4121 dump_uint64( " user_ptr=", &req->user_ptr );
4124 static void dump_set_kernel_object_ptr_request( const struct set_kernel_object_ptr_request *req )
4126 fprintf( stderr, " manager=%04x", req->manager );
4127 fprintf( stderr, ", handle=%04x", req->handle );
4128 dump_uint64( ", user_ptr=", &req->user_ptr );
4131 static void dump_grab_kernel_object_request( const struct grab_kernel_object_request *req )
4133 fprintf( stderr, " manager=%04x", req->manager );
4134 dump_uint64( ", user_ptr=", &req->user_ptr );
4137 static void dump_release_kernel_object_request( const struct release_kernel_object_request *req )
4139 fprintf( stderr, " manager=%04x", req->manager );
4140 dump_uint64( ", user_ptr=", &req->user_ptr );
4143 static void dump_get_kernel_object_handle_request( const struct get_kernel_object_handle_request *req )
4145 fprintf( stderr, " manager=%04x", req->manager );
4146 dump_uint64( ", user_ptr=", &req->user_ptr );
4147 fprintf( stderr, ", access=%08x", req->access );
4150 static void dump_get_kernel_object_handle_reply( const struct get_kernel_object_handle_reply *req )
4152 fprintf( stderr, " handle=%04x", req->handle );
4155 static void dump_make_process_system_request( const struct make_process_system_request *req )
4159 static void dump_make_process_system_reply( const struct make_process_system_reply *req )
4161 fprintf( stderr, " event=%04x", req->event );
4164 static void dump_get_token_info_request( const struct get_token_info_request *req )
4166 fprintf( stderr, " handle=%04x", req->handle );
4169 static void dump_get_token_info_reply( const struct get_token_info_reply *req )
4171 dump_luid( " token_id=", &req->token_id );
4172 dump_luid( ", modified_id=", &req->modified_id );
4173 fprintf( stderr, ", primary=%d", req->primary );
4174 fprintf( stderr, ", impersonation_level=%d", req->impersonation_level );
4175 fprintf( stderr, ", elevation=%d", req->elevation );
4176 fprintf( stderr, ", group_count=%d", req->group_count );
4177 fprintf( stderr, ", privilege_count=%d", req->privilege_count );
4180 static void dump_create_linked_token_request( const struct create_linked_token_request *req )
4182 fprintf( stderr, " handle=%04x", req->handle );
4185 static void dump_create_linked_token_reply( const struct create_linked_token_reply *req )
4187 fprintf( stderr, " linked=%04x", req->linked );
4190 static void dump_create_completion_request( const struct create_completion_request *req )
4192 fprintf( stderr, " access=%08x", req->access );
4193 fprintf( stderr, ", concurrent=%08x", req->concurrent );
4194 dump_varargs_object_attributes( ", objattr=", cur_size );
4197 static void dump_create_completion_reply( const struct create_completion_reply *req )
4199 fprintf( stderr, " handle=%04x", req->handle );
4202 static void dump_open_completion_request( const struct open_completion_request *req )
4204 fprintf( stderr, " access=%08x", req->access );
4205 fprintf( stderr, ", attributes=%08x", req->attributes );
4206 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4207 dump_varargs_unicode_str( ", filename=", cur_size );
4210 static void dump_open_completion_reply( const struct open_completion_reply *req )
4212 fprintf( stderr, " handle=%04x", req->handle );
4215 static void dump_add_completion_request( const struct add_completion_request *req )
4217 fprintf( stderr, " handle=%04x", req->handle );
4218 dump_uint64( ", ckey=", &req->ckey );
4219 dump_uint64( ", cvalue=", &req->cvalue );
4220 dump_uint64( ", information=", &req->information );
4221 fprintf( stderr, ", status=%08x", req->status );
4224 static void dump_remove_completion_request( const struct remove_completion_request *req )
4226 fprintf( stderr, " handle=%04x", req->handle );
4229 static void dump_remove_completion_reply( const struct remove_completion_reply *req )
4231 dump_uint64( " ckey=", &req->ckey );
4232 dump_uint64( ", cvalue=", &req->cvalue );
4233 dump_uint64( ", information=", &req->information );
4234 fprintf( stderr, ", status=%08x", req->status );
4237 static void dump_query_completion_request( const struct query_completion_request *req )
4239 fprintf( stderr, " handle=%04x", req->handle );
4242 static void dump_query_completion_reply( const struct query_completion_reply *req )
4244 fprintf( stderr, " depth=%08x", req->depth );
4247 static void dump_set_completion_info_request( const struct set_completion_info_request *req )
4249 fprintf( stderr, " handle=%04x", req->handle );
4250 dump_uint64( ", ckey=", &req->ckey );
4251 fprintf( stderr, ", chandle=%04x", req->chandle );
4254 static void dump_add_fd_completion_request( const struct add_fd_completion_request *req )
4256 fprintf( stderr, " handle=%04x", req->handle );
4257 dump_uint64( ", cvalue=", &req->cvalue );
4258 dump_uint64( ", information=", &req->information );
4259 fprintf( stderr, ", status=%08x", req->status );
4260 fprintf( stderr, ", async=%d", req->async );
4263 static void dump_set_fd_completion_mode_request( const struct set_fd_completion_mode_request *req )
4265 fprintf( stderr, " handle=%04x", req->handle );
4266 fprintf( stderr, ", flags=%08x", req->flags );
4269 static void dump_set_fd_disp_info_request( const struct set_fd_disp_info_request *req )
4271 fprintf( stderr, " handle=%04x", req->handle );
4272 fprintf( stderr, ", unlink=%d", req->unlink );
4275 static void dump_set_fd_name_info_request( const struct set_fd_name_info_request *req )
4277 fprintf( stderr, " handle=%04x", req->handle );
4278 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4279 fprintf( stderr, ", namelen=%u", req->namelen );
4280 fprintf( stderr, ", link=%d", req->link );
4281 fprintf( stderr, ", replace=%d", req->replace );
4282 dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
4283 dump_varargs_string( ", filename=", cur_size );
4286 static void dump_get_window_layered_info_request( const struct get_window_layered_info_request *req )
4288 fprintf( stderr, " handle=%08x", req->handle );
4291 static void dump_get_window_layered_info_reply( const struct get_window_layered_info_reply *req )
4293 fprintf( stderr, " color_key=%08x", req->color_key );
4294 fprintf( stderr, ", alpha=%08x", req->alpha );
4295 fprintf( stderr, ", flags=%08x", req->flags );
4298 static void dump_set_window_layered_info_request( const struct set_window_layered_info_request *req )
4300 fprintf( stderr, " handle=%08x", req->handle );
4301 fprintf( stderr, ", color_key=%08x", req->color_key );
4302 fprintf( stderr, ", alpha=%08x", req->alpha );
4303 fprintf( stderr, ", flags=%08x", req->flags );
4306 static void dump_alloc_user_handle_request( const struct alloc_user_handle_request *req )
4310 static void dump_alloc_user_handle_reply( const struct alloc_user_handle_reply *req )
4312 fprintf( stderr, " handle=%08x", req->handle );
4315 static void dump_free_user_handle_request( const struct free_user_handle_request *req )
4317 fprintf( stderr, " handle=%08x", req->handle );
4320 static void dump_set_cursor_request( const struct set_cursor_request *req )
4322 fprintf( stderr, " flags=%08x", req->flags );
4323 fprintf( stderr, ", handle=%08x", req->handle );
4324 fprintf( stderr, ", show_count=%d", req->show_count );
4325 fprintf( stderr, ", x=%d", req->x );
4326 fprintf( stderr, ", y=%d", req->y );
4327 dump_rectangle( ", clip=", &req->clip );
4328 fprintf( stderr, ", clip_msg=%08x", req->clip_msg );
4331 static void dump_set_cursor_reply( const struct set_cursor_reply *req )
4333 fprintf( stderr, " prev_handle=%08x", req->prev_handle );
4334 fprintf( stderr, ", prev_count=%d", req->prev_count );
4335 fprintf( stderr, ", prev_x=%d", req->prev_x );
4336 fprintf( stderr, ", prev_y=%d", req->prev_y );
4337 fprintf( stderr, ", new_x=%d", req->new_x );
4338 fprintf( stderr, ", new_y=%d", req->new_y );
4339 dump_rectangle( ", new_clip=", &req->new_clip );
4340 fprintf( stderr, ", last_change=%08x", req->last_change );
4343 static void dump_get_cursor_history_request( const struct get_cursor_history_request *req )
4347 static void dump_get_cursor_history_reply( const struct get_cursor_history_reply *req )
4349 dump_varargs_cursor_positions( " history=", cur_size );
4352 static void dump_get_rawinput_buffer_request( const struct get_rawinput_buffer_request *req )
4354 fprintf( stderr, " rawinput_size=%u", req->rawinput_size );
4355 fprintf( stderr, ", buffer_size=%u", req->buffer_size );
4358 static void dump_get_rawinput_buffer_reply( const struct get_rawinput_buffer_reply *req )
4360 fprintf( stderr, " next_size=%u", req->next_size );
4361 fprintf( stderr, ", count=%08x", req->count );
4362 dump_varargs_bytes( ", data=", cur_size );
4365 static void dump_update_rawinput_devices_request( const struct update_rawinput_devices_request *req )
4367 dump_varargs_rawinput_devices( " devices=", cur_size );
4370 static void dump_get_rawinput_devices_request( const struct get_rawinput_devices_request *req )
4374 static void dump_get_rawinput_devices_reply( const struct get_rawinput_devices_reply *req )
4376 fprintf( stderr, " device_count=%08x", req->device_count );
4377 dump_varargs_rawinput_devices( ", devices=", cur_size );
4380 static void dump_create_job_request( const struct create_job_request *req )
4382 fprintf( stderr, " access=%08x", req->access );
4383 dump_varargs_object_attributes( ", objattr=", cur_size );
4386 static void dump_create_job_reply( const struct create_job_reply *req )
4388 fprintf( stderr, " handle=%04x", req->handle );
4391 static void dump_open_job_request( const struct open_job_request *req )
4393 fprintf( stderr, " access=%08x", req->access );
4394 fprintf( stderr, ", attributes=%08x", req->attributes );
4395 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4396 dump_varargs_unicode_str( ", name=", cur_size );
4399 static void dump_open_job_reply( const struct open_job_reply *req )
4401 fprintf( stderr, " handle=%04x", req->handle );
4404 static void dump_assign_job_request( const struct assign_job_request *req )
4406 fprintf( stderr, " job=%04x", req->job );
4407 fprintf( stderr, ", process=%04x", req->process );
4410 static void dump_process_in_job_request( const struct process_in_job_request *req )
4412 fprintf( stderr, " job=%04x", req->job );
4413 fprintf( stderr, ", process=%04x", req->process );
4416 static void dump_set_job_limits_request( const struct set_job_limits_request *req )
4418 fprintf( stderr, " handle=%04x", req->handle );
4419 fprintf( stderr, ", limit_flags=%08x", req->limit_flags );
4422 static void dump_set_job_completion_port_request( const struct set_job_completion_port_request *req )
4424 fprintf( stderr, " job=%04x", req->job );
4425 fprintf( stderr, ", port=%04x", req->port );
4426 dump_uint64( ", key=", &req->key );
4429 static void dump_get_job_info_request( const struct get_job_info_request *req )
4431 fprintf( stderr, " handle=%04x", req->handle );
4434 static void dump_get_job_info_reply( const struct get_job_info_reply *req )
4436 fprintf( stderr, " total_processes=%d", req->total_processes );
4437 fprintf( stderr, ", active_processes=%d", req->active_processes );
4440 static void dump_terminate_job_request( const struct terminate_job_request *req )
4442 fprintf( stderr, " handle=%04x", req->handle );
4443 fprintf( stderr, ", status=%d", req->status );
4446 static void dump_suspend_process_request( const struct suspend_process_request *req )
4448 fprintf( stderr, " handle=%04x", req->handle );
4451 static void dump_resume_process_request( const struct resume_process_request *req )
4453 fprintf( stderr, " handle=%04x", req->handle );
4456 static const dump_func req_dumpers[REQ_NB_REQUESTS] = {
4457 (dump_func)dump_new_process_request,
4458 (dump_func)dump_get_new_process_info_request,
4459 (dump_func)dump_new_thread_request,
4460 (dump_func)dump_get_startup_info_request,
4461 (dump_func)dump_init_process_done_request,
4462 (dump_func)dump_init_first_thread_request,
4463 (dump_func)dump_init_thread_request,
4464 (dump_func)dump_terminate_process_request,
4465 (dump_func)dump_terminate_thread_request,
4466 (dump_func)dump_get_process_info_request,
4467 (dump_func)dump_get_process_debug_info_request,
4468 (dump_func)dump_get_process_image_name_request,
4469 (dump_func)dump_get_process_vm_counters_request,
4470 (dump_func)dump_set_process_info_request,
4471 (dump_func)dump_get_thread_info_request,
4472 (dump_func)dump_get_thread_times_request,
4473 (dump_func)dump_set_thread_info_request,
4474 (dump_func)dump_suspend_thread_request,
4475 (dump_func)dump_resume_thread_request,
4476 (dump_func)dump_queue_apc_request,
4477 (dump_func)dump_get_apc_result_request,
4478 (dump_func)dump_close_handle_request,
4479 (dump_func)dump_set_handle_info_request,
4480 (dump_func)dump_dup_handle_request,
4481 (dump_func)dump_make_temporary_request,
4482 (dump_func)dump_open_process_request,
4483 (dump_func)dump_open_thread_request,
4484 (dump_func)dump_select_request,
4485 (dump_func)dump_create_event_request,
4486 (dump_func)dump_event_op_request,
4487 (dump_func)dump_query_event_request,
4488 (dump_func)dump_open_event_request,
4489 (dump_func)dump_create_keyed_event_request,
4490 (dump_func)dump_open_keyed_event_request,
4491 (dump_func)dump_create_mutex_request,
4492 (dump_func)dump_release_mutex_request,
4493 (dump_func)dump_open_mutex_request,
4494 (dump_func)dump_query_mutex_request,
4495 (dump_func)dump_create_semaphore_request,
4496 (dump_func)dump_release_semaphore_request,
4497 (dump_func)dump_query_semaphore_request,
4498 (dump_func)dump_open_semaphore_request,
4499 (dump_func)dump_create_file_request,
4500 (dump_func)dump_open_file_object_request,
4501 (dump_func)dump_alloc_file_handle_request,
4502 (dump_func)dump_get_handle_unix_name_request,
4503 (dump_func)dump_get_handle_fd_request,
4504 (dump_func)dump_get_directory_cache_entry_request,
4505 (dump_func)dump_flush_request,
4506 (dump_func)dump_get_file_info_request,
4507 (dump_func)dump_get_volume_info_request,
4508 (dump_func)dump_lock_file_request,
4509 (dump_func)dump_unlock_file_request,
4510 (dump_func)dump_set_socket_event_request,
4511 (dump_func)dump_get_socket_event_request,
4512 (dump_func)dump_get_socket_info_request,
4513 (dump_func)dump_enable_socket_event_request,
4514 (dump_func)dump_set_socket_deferred_request,
4515 (dump_func)dump_get_next_console_request_request,
4516 (dump_func)dump_read_directory_changes_request,
4517 (dump_func)dump_read_change_request,
4518 (dump_func)dump_create_mapping_request,
4519 (dump_func)dump_open_mapping_request,
4520 (dump_func)dump_get_mapping_info_request,
4521 (dump_func)dump_map_view_request,
4522 (dump_func)dump_unmap_view_request,
4523 (dump_func)dump_get_mapping_committed_range_request,
4524 (dump_func)dump_add_mapping_committed_range_request,
4525 (dump_func)dump_is_same_mapping_request,
4526 (dump_func)dump_get_mapping_filename_request,
4527 (dump_func)dump_list_processes_request,
4528 (dump_func)dump_create_debug_obj_request,
4529 (dump_func)dump_wait_debug_event_request,
4530 (dump_func)dump_queue_exception_event_request,
4531 (dump_func)dump_get_exception_status_request,
4532 (dump_func)dump_continue_debug_event_request,
4533 (dump_func)dump_debug_process_request,
4534 (dump_func)dump_set_debug_obj_info_request,
4535 (dump_func)dump_read_process_memory_request,
4536 (dump_func)dump_write_process_memory_request,
4537 (dump_func)dump_create_key_request,
4538 (dump_func)dump_open_key_request,
4539 (dump_func)dump_delete_key_request,
4540 (dump_func)dump_flush_key_request,
4541 (dump_func)dump_enum_key_request,
4542 (dump_func)dump_set_key_value_request,
4543 (dump_func)dump_get_key_value_request,
4544 (dump_func)dump_enum_key_value_request,
4545 (dump_func)dump_delete_key_value_request,
4546 (dump_func)dump_load_registry_request,
4547 (dump_func)dump_unload_registry_request,
4548 (dump_func)dump_save_registry_request,
4549 (dump_func)dump_set_registry_notification_request,
4550 (dump_func)dump_create_timer_request,
4551 (dump_func)dump_open_timer_request,
4552 (dump_func)dump_set_timer_request,
4553 (dump_func)dump_cancel_timer_request,
4554 (dump_func)dump_get_timer_info_request,
4555 (dump_func)dump_get_thread_context_request,
4556 (dump_func)dump_set_thread_context_request,
4557 (dump_func)dump_get_selector_entry_request,
4558 (dump_func)dump_add_atom_request,
4559 (dump_func)dump_delete_atom_request,
4560 (dump_func)dump_find_atom_request,
4561 (dump_func)dump_get_atom_information_request,
4562 (dump_func)dump_get_msg_queue_request,
4563 (dump_func)dump_set_queue_fd_request,
4564 (dump_func)dump_set_queue_mask_request,
4565 (dump_func)dump_get_queue_status_request,
4566 (dump_func)dump_get_process_idle_event_request,
4567 (dump_func)dump_send_message_request,
4568 (dump_func)dump_post_quit_message_request,
4569 (dump_func)dump_send_hardware_message_request,
4570 (dump_func)dump_get_message_request,
4571 (dump_func)dump_reply_message_request,
4572 (dump_func)dump_accept_hardware_message_request,
4573 (dump_func)dump_get_message_reply_request,
4574 (dump_func)dump_set_win_timer_request,
4575 (dump_func)dump_kill_win_timer_request,
4576 (dump_func)dump_is_window_hung_request,
4577 (dump_func)dump_get_serial_info_request,
4578 (dump_func)dump_set_serial_info_request,
4579 (dump_func)dump_register_async_request,
4580 (dump_func)dump_cancel_async_request,
4581 (dump_func)dump_get_async_result_request,
4582 (dump_func)dump_read_request,
4583 (dump_func)dump_write_request,
4584 (dump_func)dump_ioctl_request,
4585 (dump_func)dump_set_irp_result_request,
4586 (dump_func)dump_create_named_pipe_request,
4587 (dump_func)dump_set_named_pipe_info_request,
4588 (dump_func)dump_create_window_request,
4589 (dump_func)dump_destroy_window_request,
4590 (dump_func)dump_get_desktop_window_request,
4591 (dump_func)dump_set_window_owner_request,
4592 (dump_func)dump_get_window_info_request,
4593 (dump_func)dump_set_window_info_request,
4594 (dump_func)dump_set_parent_request,
4595 (dump_func)dump_get_window_parents_request,
4596 (dump_func)dump_get_window_children_request,
4597 (dump_func)dump_get_window_children_from_point_request,
4598 (dump_func)dump_get_window_tree_request,
4599 (dump_func)dump_set_window_pos_request,
4600 (dump_func)dump_get_window_rectangles_request,
4601 (dump_func)dump_get_window_text_request,
4602 (dump_func)dump_set_window_text_request,
4603 (dump_func)dump_get_windows_offset_request,
4604 (dump_func)dump_get_visible_region_request,
4605 (dump_func)dump_get_surface_region_request,
4606 (dump_func)dump_get_window_region_request,
4607 (dump_func)dump_set_window_region_request,
4608 (dump_func)dump_get_update_region_request,
4609 (dump_func)dump_update_window_zorder_request,
4610 (dump_func)dump_redraw_window_request,
4611 (dump_func)dump_set_window_property_request,
4612 (dump_func)dump_remove_window_property_request,
4613 (dump_func)dump_get_window_property_request,
4614 (dump_func)dump_get_window_properties_request,
4615 (dump_func)dump_create_winstation_request,
4616 (dump_func)dump_open_winstation_request,
4617 (dump_func)dump_close_winstation_request,
4618 (dump_func)dump_get_process_winstation_request,
4619 (dump_func)dump_set_process_winstation_request,
4620 (dump_func)dump_enum_winstation_request,
4621 (dump_func)dump_create_desktop_request,
4622 (dump_func)dump_open_desktop_request,
4623 (dump_func)dump_open_input_desktop_request,
4624 (dump_func)dump_close_desktop_request,
4625 (dump_func)dump_get_thread_desktop_request,
4626 (dump_func)dump_set_thread_desktop_request,
4627 (dump_func)dump_enum_desktop_request,
4628 (dump_func)dump_set_user_object_info_request,
4629 (dump_func)dump_register_hotkey_request,
4630 (dump_func)dump_unregister_hotkey_request,
4631 (dump_func)dump_attach_thread_input_request,
4632 (dump_func)dump_get_thread_input_request,
4633 (dump_func)dump_get_last_input_time_request,
4634 (dump_func)dump_get_key_state_request,
4635 (dump_func)dump_set_key_state_request,
4636 (dump_func)dump_set_foreground_window_request,
4637 (dump_func)dump_set_focus_window_request,
4638 (dump_func)dump_set_active_window_request,
4639 (dump_func)dump_set_capture_window_request,
4640 (dump_func)dump_set_caret_window_request,
4641 (dump_func)dump_set_caret_info_request,
4642 (dump_func)dump_set_hook_request,
4643 (dump_func)dump_remove_hook_request,
4644 (dump_func)dump_start_hook_chain_request,
4645 (dump_func)dump_finish_hook_chain_request,
4646 (dump_func)dump_get_hook_info_request,
4647 (dump_func)dump_create_class_request,
4648 (dump_func)dump_destroy_class_request,
4649 (dump_func)dump_set_class_info_request,
4650 (dump_func)dump_open_clipboard_request,
4651 (dump_func)dump_close_clipboard_request,
4652 (dump_func)dump_empty_clipboard_request,
4653 (dump_func)dump_set_clipboard_data_request,
4654 (dump_func)dump_get_clipboard_data_request,
4655 (dump_func)dump_get_clipboard_formats_request,
4656 (dump_func)dump_enum_clipboard_formats_request,
4657 (dump_func)dump_release_clipboard_request,
4658 (dump_func)dump_get_clipboard_info_request,
4659 (dump_func)dump_set_clipboard_viewer_request,
4660 (dump_func)dump_add_clipboard_listener_request,
4661 (dump_func)dump_remove_clipboard_listener_request,
4662 (dump_func)dump_open_token_request,
4663 (dump_func)dump_set_global_windows_request,
4664 (dump_func)dump_adjust_token_privileges_request,
4665 (dump_func)dump_get_token_privileges_request,
4666 (dump_func)dump_check_token_privileges_request,
4667 (dump_func)dump_duplicate_token_request,
4668 (dump_func)dump_filter_token_request,
4669 (dump_func)dump_access_check_request,
4670 (dump_func)dump_get_token_sid_request,
4671 (dump_func)dump_get_token_groups_request,
4672 (dump_func)dump_get_token_default_dacl_request,
4673 (dump_func)dump_set_token_default_dacl_request,
4674 (dump_func)dump_set_security_object_request,
4675 (dump_func)dump_get_security_object_request,
4676 (dump_func)dump_get_system_handles_request,
4677 (dump_func)dump_create_mailslot_request,
4678 (dump_func)dump_set_mailslot_info_request,
4679 (dump_func)dump_create_directory_request,
4680 (dump_func)dump_open_directory_request,
4681 (dump_func)dump_get_directory_entry_request,
4682 (dump_func)dump_create_symlink_request,
4683 (dump_func)dump_open_symlink_request,
4684 (dump_func)dump_query_symlink_request,
4685 (dump_func)dump_get_object_info_request,
4686 (dump_func)dump_get_object_type_request,
4687 (dump_func)dump_get_object_types_request,
4688 (dump_func)dump_allocate_locally_unique_id_request,
4689 (dump_func)dump_create_device_manager_request,
4690 (dump_func)dump_create_device_request,
4691 (dump_func)dump_delete_device_request,
4692 (dump_func)dump_get_next_device_request_request,
4693 (dump_func)dump_get_kernel_object_ptr_request,
4694 (dump_func)dump_set_kernel_object_ptr_request,
4695 (dump_func)dump_grab_kernel_object_request,
4696 (dump_func)dump_release_kernel_object_request,
4697 (dump_func)dump_get_kernel_object_handle_request,
4698 (dump_func)dump_make_process_system_request,
4699 (dump_func)dump_get_token_info_request,
4700 (dump_func)dump_create_linked_token_request,
4701 (dump_func)dump_create_completion_request,
4702 (dump_func)dump_open_completion_request,
4703 (dump_func)dump_add_completion_request,
4704 (dump_func)dump_remove_completion_request,
4705 (dump_func)dump_query_completion_request,
4706 (dump_func)dump_set_completion_info_request,
4707 (dump_func)dump_add_fd_completion_request,
4708 (dump_func)dump_set_fd_completion_mode_request,
4709 (dump_func)dump_set_fd_disp_info_request,
4710 (dump_func)dump_set_fd_name_info_request,
4711 (dump_func)dump_get_window_layered_info_request,
4712 (dump_func)dump_set_window_layered_info_request,
4713 (dump_func)dump_alloc_user_handle_request,
4714 (dump_func)dump_free_user_handle_request,
4715 (dump_func)dump_set_cursor_request,
4716 (dump_func)dump_get_cursor_history_request,
4717 (dump_func)dump_get_rawinput_buffer_request,
4718 (dump_func)dump_update_rawinput_devices_request,
4719 (dump_func)dump_get_rawinput_devices_request,
4720 (dump_func)dump_create_job_request,
4721 (dump_func)dump_open_job_request,
4722 (dump_func)dump_assign_job_request,
4723 (dump_func)dump_process_in_job_request,
4724 (dump_func)dump_set_job_limits_request,
4725 (dump_func)dump_set_job_completion_port_request,
4726 (dump_func)dump_get_job_info_request,
4727 (dump_func)dump_terminate_job_request,
4728 (dump_func)dump_suspend_process_request,
4729 (dump_func)dump_resume_process_request,
4732 static const dump_func reply_dumpers[REQ_NB_REQUESTS] = {
4733 (dump_func)dump_new_process_reply,
4734 (dump_func)dump_get_new_process_info_reply,
4735 (dump_func)dump_new_thread_reply,
4736 (dump_func)dump_get_startup_info_reply,
4737 (dump_func)dump_init_process_done_reply,
4738 (dump_func)dump_init_first_thread_reply,
4739 (dump_func)dump_init_thread_reply,
4740 (dump_func)dump_terminate_process_reply,
4741 (dump_func)dump_terminate_thread_reply,
4742 (dump_func)dump_get_process_info_reply,
4743 (dump_func)dump_get_process_debug_info_reply,
4744 (dump_func)dump_get_process_image_name_reply,
4745 (dump_func)dump_get_process_vm_counters_reply,
4746 NULL,
4747 (dump_func)dump_get_thread_info_reply,
4748 (dump_func)dump_get_thread_times_reply,
4749 NULL,
4750 (dump_func)dump_suspend_thread_reply,
4751 (dump_func)dump_resume_thread_reply,
4752 (dump_func)dump_queue_apc_reply,
4753 (dump_func)dump_get_apc_result_reply,
4754 NULL,
4755 (dump_func)dump_set_handle_info_reply,
4756 (dump_func)dump_dup_handle_reply,
4757 NULL,
4758 (dump_func)dump_open_process_reply,
4759 (dump_func)dump_open_thread_reply,
4760 (dump_func)dump_select_reply,
4761 (dump_func)dump_create_event_reply,
4762 (dump_func)dump_event_op_reply,
4763 (dump_func)dump_query_event_reply,
4764 (dump_func)dump_open_event_reply,
4765 (dump_func)dump_create_keyed_event_reply,
4766 (dump_func)dump_open_keyed_event_reply,
4767 (dump_func)dump_create_mutex_reply,
4768 (dump_func)dump_release_mutex_reply,
4769 (dump_func)dump_open_mutex_reply,
4770 (dump_func)dump_query_mutex_reply,
4771 (dump_func)dump_create_semaphore_reply,
4772 (dump_func)dump_release_semaphore_reply,
4773 (dump_func)dump_query_semaphore_reply,
4774 (dump_func)dump_open_semaphore_reply,
4775 (dump_func)dump_create_file_reply,
4776 (dump_func)dump_open_file_object_reply,
4777 (dump_func)dump_alloc_file_handle_reply,
4778 (dump_func)dump_get_handle_unix_name_reply,
4779 (dump_func)dump_get_handle_fd_reply,
4780 (dump_func)dump_get_directory_cache_entry_reply,
4781 (dump_func)dump_flush_reply,
4782 (dump_func)dump_get_file_info_reply,
4783 (dump_func)dump_get_volume_info_reply,
4784 (dump_func)dump_lock_file_reply,
4785 NULL,
4786 NULL,
4787 (dump_func)dump_get_socket_event_reply,
4788 (dump_func)dump_get_socket_info_reply,
4789 NULL,
4790 NULL,
4791 (dump_func)dump_get_next_console_request_reply,
4792 NULL,
4793 (dump_func)dump_read_change_reply,
4794 (dump_func)dump_create_mapping_reply,
4795 (dump_func)dump_open_mapping_reply,
4796 (dump_func)dump_get_mapping_info_reply,
4797 NULL,
4798 NULL,
4799 (dump_func)dump_get_mapping_committed_range_reply,
4800 NULL,
4801 NULL,
4802 (dump_func)dump_get_mapping_filename_reply,
4803 (dump_func)dump_list_processes_reply,
4804 (dump_func)dump_create_debug_obj_reply,
4805 (dump_func)dump_wait_debug_event_reply,
4806 (dump_func)dump_queue_exception_event_reply,
4807 NULL,
4808 NULL,
4809 NULL,
4810 NULL,
4811 (dump_func)dump_read_process_memory_reply,
4812 NULL,
4813 (dump_func)dump_create_key_reply,
4814 (dump_func)dump_open_key_reply,
4815 NULL,
4816 NULL,
4817 (dump_func)dump_enum_key_reply,
4818 NULL,
4819 (dump_func)dump_get_key_value_reply,
4820 (dump_func)dump_enum_key_value_reply,
4821 NULL,
4822 NULL,
4823 NULL,
4824 NULL,
4825 NULL,
4826 (dump_func)dump_create_timer_reply,
4827 (dump_func)dump_open_timer_reply,
4828 (dump_func)dump_set_timer_reply,
4829 (dump_func)dump_cancel_timer_reply,
4830 (dump_func)dump_get_timer_info_reply,
4831 (dump_func)dump_get_thread_context_reply,
4832 (dump_func)dump_set_thread_context_reply,
4833 (dump_func)dump_get_selector_entry_reply,
4834 (dump_func)dump_add_atom_reply,
4835 NULL,
4836 (dump_func)dump_find_atom_reply,
4837 (dump_func)dump_get_atom_information_reply,
4838 (dump_func)dump_get_msg_queue_reply,
4839 NULL,
4840 (dump_func)dump_set_queue_mask_reply,
4841 (dump_func)dump_get_queue_status_reply,
4842 (dump_func)dump_get_process_idle_event_reply,
4843 NULL,
4844 NULL,
4845 (dump_func)dump_send_hardware_message_reply,
4846 (dump_func)dump_get_message_reply,
4847 NULL,
4848 NULL,
4849 (dump_func)dump_get_message_reply_reply,
4850 (dump_func)dump_set_win_timer_reply,
4851 NULL,
4852 (dump_func)dump_is_window_hung_reply,
4853 (dump_func)dump_get_serial_info_reply,
4854 NULL,
4855 NULL,
4856 NULL,
4857 (dump_func)dump_get_async_result_reply,
4858 (dump_func)dump_read_reply,
4859 (dump_func)dump_write_reply,
4860 (dump_func)dump_ioctl_reply,
4861 NULL,
4862 (dump_func)dump_create_named_pipe_reply,
4863 NULL,
4864 (dump_func)dump_create_window_reply,
4865 NULL,
4866 (dump_func)dump_get_desktop_window_reply,
4867 (dump_func)dump_set_window_owner_reply,
4868 (dump_func)dump_get_window_info_reply,
4869 (dump_func)dump_set_window_info_reply,
4870 (dump_func)dump_set_parent_reply,
4871 (dump_func)dump_get_window_parents_reply,
4872 (dump_func)dump_get_window_children_reply,
4873 (dump_func)dump_get_window_children_from_point_reply,
4874 (dump_func)dump_get_window_tree_reply,
4875 (dump_func)dump_set_window_pos_reply,
4876 (dump_func)dump_get_window_rectangles_reply,
4877 (dump_func)dump_get_window_text_reply,
4878 NULL,
4879 (dump_func)dump_get_windows_offset_reply,
4880 (dump_func)dump_get_visible_region_reply,
4881 (dump_func)dump_get_surface_region_reply,
4882 (dump_func)dump_get_window_region_reply,
4883 NULL,
4884 (dump_func)dump_get_update_region_reply,
4885 NULL,
4886 NULL,
4887 NULL,
4888 (dump_func)dump_remove_window_property_reply,
4889 (dump_func)dump_get_window_property_reply,
4890 (dump_func)dump_get_window_properties_reply,
4891 (dump_func)dump_create_winstation_reply,
4892 (dump_func)dump_open_winstation_reply,
4893 NULL,
4894 (dump_func)dump_get_process_winstation_reply,
4895 NULL,
4896 (dump_func)dump_enum_winstation_reply,
4897 (dump_func)dump_create_desktop_reply,
4898 (dump_func)dump_open_desktop_reply,
4899 (dump_func)dump_open_input_desktop_reply,
4900 NULL,
4901 (dump_func)dump_get_thread_desktop_reply,
4902 NULL,
4903 (dump_func)dump_enum_desktop_reply,
4904 (dump_func)dump_set_user_object_info_reply,
4905 (dump_func)dump_register_hotkey_reply,
4906 (dump_func)dump_unregister_hotkey_reply,
4907 NULL,
4908 (dump_func)dump_get_thread_input_reply,
4909 (dump_func)dump_get_last_input_time_reply,
4910 (dump_func)dump_get_key_state_reply,
4911 NULL,
4912 (dump_func)dump_set_foreground_window_reply,
4913 (dump_func)dump_set_focus_window_reply,
4914 (dump_func)dump_set_active_window_reply,
4915 (dump_func)dump_set_capture_window_reply,
4916 (dump_func)dump_set_caret_window_reply,
4917 (dump_func)dump_set_caret_info_reply,
4918 (dump_func)dump_set_hook_reply,
4919 (dump_func)dump_remove_hook_reply,
4920 (dump_func)dump_start_hook_chain_reply,
4921 NULL,
4922 (dump_func)dump_get_hook_info_reply,
4923 (dump_func)dump_create_class_reply,
4924 (dump_func)dump_destroy_class_reply,
4925 (dump_func)dump_set_class_info_reply,
4926 (dump_func)dump_open_clipboard_reply,
4927 (dump_func)dump_close_clipboard_reply,
4928 NULL,
4929 (dump_func)dump_set_clipboard_data_reply,
4930 (dump_func)dump_get_clipboard_data_reply,
4931 (dump_func)dump_get_clipboard_formats_reply,
4932 (dump_func)dump_enum_clipboard_formats_reply,
4933 (dump_func)dump_release_clipboard_reply,
4934 (dump_func)dump_get_clipboard_info_reply,
4935 (dump_func)dump_set_clipboard_viewer_reply,
4936 NULL,
4937 NULL,
4938 (dump_func)dump_open_token_reply,
4939 (dump_func)dump_set_global_windows_reply,
4940 (dump_func)dump_adjust_token_privileges_reply,
4941 (dump_func)dump_get_token_privileges_reply,
4942 (dump_func)dump_check_token_privileges_reply,
4943 (dump_func)dump_duplicate_token_reply,
4944 (dump_func)dump_filter_token_reply,
4945 (dump_func)dump_access_check_reply,
4946 (dump_func)dump_get_token_sid_reply,
4947 (dump_func)dump_get_token_groups_reply,
4948 (dump_func)dump_get_token_default_dacl_reply,
4949 NULL,
4950 NULL,
4951 (dump_func)dump_get_security_object_reply,
4952 (dump_func)dump_get_system_handles_reply,
4953 (dump_func)dump_create_mailslot_reply,
4954 (dump_func)dump_set_mailslot_info_reply,
4955 (dump_func)dump_create_directory_reply,
4956 (dump_func)dump_open_directory_reply,
4957 (dump_func)dump_get_directory_entry_reply,
4958 (dump_func)dump_create_symlink_reply,
4959 (dump_func)dump_open_symlink_reply,
4960 (dump_func)dump_query_symlink_reply,
4961 (dump_func)dump_get_object_info_reply,
4962 (dump_func)dump_get_object_type_reply,
4963 (dump_func)dump_get_object_types_reply,
4964 (dump_func)dump_allocate_locally_unique_id_reply,
4965 (dump_func)dump_create_device_manager_reply,
4966 NULL,
4967 NULL,
4968 (dump_func)dump_get_next_device_request_reply,
4969 (dump_func)dump_get_kernel_object_ptr_reply,
4970 NULL,
4971 NULL,
4972 NULL,
4973 (dump_func)dump_get_kernel_object_handle_reply,
4974 (dump_func)dump_make_process_system_reply,
4975 (dump_func)dump_get_token_info_reply,
4976 (dump_func)dump_create_linked_token_reply,
4977 (dump_func)dump_create_completion_reply,
4978 (dump_func)dump_open_completion_reply,
4979 NULL,
4980 (dump_func)dump_remove_completion_reply,
4981 (dump_func)dump_query_completion_reply,
4982 NULL,
4983 NULL,
4984 NULL,
4985 NULL,
4986 NULL,
4987 (dump_func)dump_get_window_layered_info_reply,
4988 NULL,
4989 (dump_func)dump_alloc_user_handle_reply,
4990 NULL,
4991 (dump_func)dump_set_cursor_reply,
4992 (dump_func)dump_get_cursor_history_reply,
4993 (dump_func)dump_get_rawinput_buffer_reply,
4994 NULL,
4995 (dump_func)dump_get_rawinput_devices_reply,
4996 (dump_func)dump_create_job_reply,
4997 (dump_func)dump_open_job_reply,
4998 NULL,
4999 NULL,
5000 NULL,
5001 NULL,
5002 (dump_func)dump_get_job_info_reply,
5003 NULL,
5004 NULL,
5005 NULL,
5008 static const char * const req_names[REQ_NB_REQUESTS] = {
5009 "new_process",
5010 "get_new_process_info",
5011 "new_thread",
5012 "get_startup_info",
5013 "init_process_done",
5014 "init_first_thread",
5015 "init_thread",
5016 "terminate_process",
5017 "terminate_thread",
5018 "get_process_info",
5019 "get_process_debug_info",
5020 "get_process_image_name",
5021 "get_process_vm_counters",
5022 "set_process_info",
5023 "get_thread_info",
5024 "get_thread_times",
5025 "set_thread_info",
5026 "suspend_thread",
5027 "resume_thread",
5028 "queue_apc",
5029 "get_apc_result",
5030 "close_handle",
5031 "set_handle_info",
5032 "dup_handle",
5033 "make_temporary",
5034 "open_process",
5035 "open_thread",
5036 "select",
5037 "create_event",
5038 "event_op",
5039 "query_event",
5040 "open_event",
5041 "create_keyed_event",
5042 "open_keyed_event",
5043 "create_mutex",
5044 "release_mutex",
5045 "open_mutex",
5046 "query_mutex",
5047 "create_semaphore",
5048 "release_semaphore",
5049 "query_semaphore",
5050 "open_semaphore",
5051 "create_file",
5052 "open_file_object",
5053 "alloc_file_handle",
5054 "get_handle_unix_name",
5055 "get_handle_fd",
5056 "get_directory_cache_entry",
5057 "flush",
5058 "get_file_info",
5059 "get_volume_info",
5060 "lock_file",
5061 "unlock_file",
5062 "set_socket_event",
5063 "get_socket_event",
5064 "get_socket_info",
5065 "enable_socket_event",
5066 "set_socket_deferred",
5067 "get_next_console_request",
5068 "read_directory_changes",
5069 "read_change",
5070 "create_mapping",
5071 "open_mapping",
5072 "get_mapping_info",
5073 "map_view",
5074 "unmap_view",
5075 "get_mapping_committed_range",
5076 "add_mapping_committed_range",
5077 "is_same_mapping",
5078 "get_mapping_filename",
5079 "list_processes",
5080 "create_debug_obj",
5081 "wait_debug_event",
5082 "queue_exception_event",
5083 "get_exception_status",
5084 "continue_debug_event",
5085 "debug_process",
5086 "set_debug_obj_info",
5087 "read_process_memory",
5088 "write_process_memory",
5089 "create_key",
5090 "open_key",
5091 "delete_key",
5092 "flush_key",
5093 "enum_key",
5094 "set_key_value",
5095 "get_key_value",
5096 "enum_key_value",
5097 "delete_key_value",
5098 "load_registry",
5099 "unload_registry",
5100 "save_registry",
5101 "set_registry_notification",
5102 "create_timer",
5103 "open_timer",
5104 "set_timer",
5105 "cancel_timer",
5106 "get_timer_info",
5107 "get_thread_context",
5108 "set_thread_context",
5109 "get_selector_entry",
5110 "add_atom",
5111 "delete_atom",
5112 "find_atom",
5113 "get_atom_information",
5114 "get_msg_queue",
5115 "set_queue_fd",
5116 "set_queue_mask",
5117 "get_queue_status",
5118 "get_process_idle_event",
5119 "send_message",
5120 "post_quit_message",
5121 "send_hardware_message",
5122 "get_message",
5123 "reply_message",
5124 "accept_hardware_message",
5125 "get_message_reply",
5126 "set_win_timer",
5127 "kill_win_timer",
5128 "is_window_hung",
5129 "get_serial_info",
5130 "set_serial_info",
5131 "register_async",
5132 "cancel_async",
5133 "get_async_result",
5134 "read",
5135 "write",
5136 "ioctl",
5137 "set_irp_result",
5138 "create_named_pipe",
5139 "set_named_pipe_info",
5140 "create_window",
5141 "destroy_window",
5142 "get_desktop_window",
5143 "set_window_owner",
5144 "get_window_info",
5145 "set_window_info",
5146 "set_parent",
5147 "get_window_parents",
5148 "get_window_children",
5149 "get_window_children_from_point",
5150 "get_window_tree",
5151 "set_window_pos",
5152 "get_window_rectangles",
5153 "get_window_text",
5154 "set_window_text",
5155 "get_windows_offset",
5156 "get_visible_region",
5157 "get_surface_region",
5158 "get_window_region",
5159 "set_window_region",
5160 "get_update_region",
5161 "update_window_zorder",
5162 "redraw_window",
5163 "set_window_property",
5164 "remove_window_property",
5165 "get_window_property",
5166 "get_window_properties",
5167 "create_winstation",
5168 "open_winstation",
5169 "close_winstation",
5170 "get_process_winstation",
5171 "set_process_winstation",
5172 "enum_winstation",
5173 "create_desktop",
5174 "open_desktop",
5175 "open_input_desktop",
5176 "close_desktop",
5177 "get_thread_desktop",
5178 "set_thread_desktop",
5179 "enum_desktop",
5180 "set_user_object_info",
5181 "register_hotkey",
5182 "unregister_hotkey",
5183 "attach_thread_input",
5184 "get_thread_input",
5185 "get_last_input_time",
5186 "get_key_state",
5187 "set_key_state",
5188 "set_foreground_window",
5189 "set_focus_window",
5190 "set_active_window",
5191 "set_capture_window",
5192 "set_caret_window",
5193 "set_caret_info",
5194 "set_hook",
5195 "remove_hook",
5196 "start_hook_chain",
5197 "finish_hook_chain",
5198 "get_hook_info",
5199 "create_class",
5200 "destroy_class",
5201 "set_class_info",
5202 "open_clipboard",
5203 "close_clipboard",
5204 "empty_clipboard",
5205 "set_clipboard_data",
5206 "get_clipboard_data",
5207 "get_clipboard_formats",
5208 "enum_clipboard_formats",
5209 "release_clipboard",
5210 "get_clipboard_info",
5211 "set_clipboard_viewer",
5212 "add_clipboard_listener",
5213 "remove_clipboard_listener",
5214 "open_token",
5215 "set_global_windows",
5216 "adjust_token_privileges",
5217 "get_token_privileges",
5218 "check_token_privileges",
5219 "duplicate_token",
5220 "filter_token",
5221 "access_check",
5222 "get_token_sid",
5223 "get_token_groups",
5224 "get_token_default_dacl",
5225 "set_token_default_dacl",
5226 "set_security_object",
5227 "get_security_object",
5228 "get_system_handles",
5229 "create_mailslot",
5230 "set_mailslot_info",
5231 "create_directory",
5232 "open_directory",
5233 "get_directory_entry",
5234 "create_symlink",
5235 "open_symlink",
5236 "query_symlink",
5237 "get_object_info",
5238 "get_object_type",
5239 "get_object_types",
5240 "allocate_locally_unique_id",
5241 "create_device_manager",
5242 "create_device",
5243 "delete_device",
5244 "get_next_device_request",
5245 "get_kernel_object_ptr",
5246 "set_kernel_object_ptr",
5247 "grab_kernel_object",
5248 "release_kernel_object",
5249 "get_kernel_object_handle",
5250 "make_process_system",
5251 "get_token_info",
5252 "create_linked_token",
5253 "create_completion",
5254 "open_completion",
5255 "add_completion",
5256 "remove_completion",
5257 "query_completion",
5258 "set_completion_info",
5259 "add_fd_completion",
5260 "set_fd_completion_mode",
5261 "set_fd_disp_info",
5262 "set_fd_name_info",
5263 "get_window_layered_info",
5264 "set_window_layered_info",
5265 "alloc_user_handle",
5266 "free_user_handle",
5267 "set_cursor",
5268 "get_cursor_history",
5269 "get_rawinput_buffer",
5270 "update_rawinput_devices",
5271 "get_rawinput_devices",
5272 "create_job",
5273 "open_job",
5274 "assign_job",
5275 "process_in_job",
5276 "set_job_limits",
5277 "set_job_completion_port",
5278 "get_job_info",
5279 "terminate_job",
5280 "suspend_process",
5281 "resume_process",
5284 static const struct
5286 const char *name;
5287 unsigned int value;
5288 } status_names[] =
5290 { "ABANDONED_WAIT_0", STATUS_ABANDONED_WAIT_0 },
5291 { "ACCESS_DENIED", STATUS_ACCESS_DENIED },
5292 { "ACCESS_VIOLATION", STATUS_ACCESS_VIOLATION },
5293 { "ADDRESS_ALREADY_ASSOCIATED", STATUS_ADDRESS_ALREADY_ASSOCIATED },
5294 { "ALERTED", STATUS_ALERTED },
5295 { "BAD_DEVICE_TYPE", STATUS_BAD_DEVICE_TYPE },
5296 { "BAD_IMPERSONATION_LEVEL", STATUS_BAD_IMPERSONATION_LEVEL },
5297 { "BUFFER_OVERFLOW", STATUS_BUFFER_OVERFLOW },
5298 { "BUFFER_TOO_SMALL", STATUS_BUFFER_TOO_SMALL },
5299 { "CANCELLED", STATUS_CANCELLED },
5300 { "CANNOT_DELETE", STATUS_CANNOT_DELETE },
5301 { "CANT_OPEN_ANONYMOUS", STATUS_CANT_OPEN_ANONYMOUS },
5302 { "CANT_WAIT", STATUS_CANT_WAIT },
5303 { "CHILD_MUST_BE_VOLATILE", STATUS_CHILD_MUST_BE_VOLATILE },
5304 { "CONNECTION_ABORTED", STATUS_CONNECTION_ABORTED },
5305 { "CONNECTION_DISCONNECTED", STATUS_CONNECTION_DISCONNECTED },
5306 { "CONNECTION_REFUSED", STATUS_CONNECTION_REFUSED },
5307 { "CONNECTION_RESET", STATUS_CONNECTION_RESET },
5308 { "DEBUGGER_INACTIVE", STATUS_DEBUGGER_INACTIVE },
5309 { "DEVICE_BUSY", STATUS_DEVICE_BUSY },
5310 { "DIRECTORY_NOT_EMPTY", STATUS_DIRECTORY_NOT_EMPTY },
5311 { "DISK_FULL", STATUS_DISK_FULL },
5312 { "DLL_NOT_FOUND", STATUS_DLL_NOT_FOUND },
5313 { "ERROR_CLASS_ALREADY_EXISTS", 0xc0010000 | ERROR_CLASS_ALREADY_EXISTS },
5314 { "ERROR_CLASS_DOES_NOT_EXIST", 0xc0010000 | ERROR_CLASS_DOES_NOT_EXIST },
5315 { "ERROR_CLASS_HAS_WINDOWS", 0xc0010000 | ERROR_CLASS_HAS_WINDOWS },
5316 { "ERROR_CLIPBOARD_NOT_OPEN", 0xc0010000 | ERROR_CLIPBOARD_NOT_OPEN },
5317 { "ERROR_HOTKEY_ALREADY_REGISTERED", 0xc0010000 | ERROR_HOTKEY_ALREADY_REGISTERED },
5318 { "ERROR_HOTKEY_NOT_REGISTERED", 0xc0010000 | ERROR_HOTKEY_NOT_REGISTERED },
5319 { "ERROR_INVALID_CURSOR_HANDLE", 0xc0010000 | ERROR_INVALID_CURSOR_HANDLE },
5320 { "ERROR_INVALID_INDEX", 0xc0010000 | ERROR_INVALID_INDEX },
5321 { "ERROR_INVALID_WINDOW_HANDLE", 0xc0010000 | ERROR_INVALID_WINDOW_HANDLE },
5322 { "ERROR_NO_MORE_USER_HANDLES", 0xc0010000 | ERROR_NO_MORE_USER_HANDLES },
5323 { "ERROR_WINDOW_OF_OTHER_THREAD", 0xc0010000 | ERROR_WINDOW_OF_OTHER_THREAD },
5324 { "FILE_DELETED", STATUS_FILE_DELETED },
5325 { "FILE_INVALID", STATUS_FILE_INVALID },
5326 { "FILE_IS_A_DIRECTORY", STATUS_FILE_IS_A_DIRECTORY },
5327 { "FILE_LOCK_CONFLICT", STATUS_FILE_LOCK_CONFLICT },
5328 { "GENERIC_NOT_MAPPED", STATUS_GENERIC_NOT_MAPPED },
5329 { "HANDLES_CLOSED", STATUS_HANDLES_CLOSED },
5330 { "HANDLE_NOT_CLOSABLE", STATUS_HANDLE_NOT_CLOSABLE },
5331 { "HOST_UNREACHABLE", STATUS_HOST_UNREACHABLE },
5332 { "ILLEGAL_FUNCTION", STATUS_ILLEGAL_FUNCTION },
5333 { "IMAGE_NOT_AT_BASE", STATUS_IMAGE_NOT_AT_BASE },
5334 { "INFO_LENGTH_MISMATCH", STATUS_INFO_LENGTH_MISMATCH },
5335 { "INSTANCE_NOT_AVAILABLE", STATUS_INSTANCE_NOT_AVAILABLE },
5336 { "INSUFFICIENT_RESOURCES", STATUS_INSUFFICIENT_RESOURCES },
5337 { "INVALID_ADDRESS", STATUS_INVALID_ADDRESS },
5338 { "INVALID_CID", STATUS_INVALID_CID },
5339 { "INVALID_DEVICE_REQUEST", STATUS_INVALID_DEVICE_REQUEST },
5340 { "INVALID_FILE_FOR_SECTION", STATUS_INVALID_FILE_FOR_SECTION },
5341 { "INVALID_HANDLE", STATUS_INVALID_HANDLE },
5342 { "INVALID_IMAGE_FORMAT", STATUS_INVALID_IMAGE_FORMAT },
5343 { "INVALID_IMAGE_NE_FORMAT", STATUS_INVALID_IMAGE_NE_FORMAT },
5344 { "INVALID_IMAGE_NOT_MZ", STATUS_INVALID_IMAGE_NOT_MZ },
5345 { "INVALID_IMAGE_PROTECT", STATUS_INVALID_IMAGE_PROTECT },
5346 { "INVALID_IMAGE_WIN_16", STATUS_INVALID_IMAGE_WIN_16 },
5347 { "INVALID_IMAGE_WIN_64", STATUS_INVALID_IMAGE_WIN_64 },
5348 { "INVALID_LOCK_SEQUENCE", STATUS_INVALID_LOCK_SEQUENCE },
5349 { "INVALID_OWNER", STATUS_INVALID_OWNER },
5350 { "INVALID_PARAMETER", STATUS_INVALID_PARAMETER },
5351 { "INVALID_PIPE_STATE", STATUS_INVALID_PIPE_STATE },
5352 { "INVALID_READ_MODE", STATUS_INVALID_READ_MODE },
5353 { "INVALID_SECURITY_DESCR", STATUS_INVALID_SECURITY_DESCR },
5354 { "IO_TIMEOUT", STATUS_IO_TIMEOUT },
5355 { "KERNEL_APC", STATUS_KERNEL_APC },
5356 { "KEY_DELETED", STATUS_KEY_DELETED },
5357 { "MAPPED_FILE_SIZE_ZERO", STATUS_MAPPED_FILE_SIZE_ZERO },
5358 { "MORE_PROCESSING_REQUIRED", STATUS_MORE_PROCESSING_REQUIRED },
5359 { "MUTANT_NOT_OWNED", STATUS_MUTANT_NOT_OWNED },
5360 { "NAME_TOO_LONG", STATUS_NAME_TOO_LONG },
5361 { "NETWORK_BUSY", STATUS_NETWORK_BUSY },
5362 { "NETWORK_UNREACHABLE", STATUS_NETWORK_UNREACHABLE },
5363 { "NOT_ALL_ASSIGNED", STATUS_NOT_ALL_ASSIGNED },
5364 { "NOT_A_DIRECTORY", STATUS_NOT_A_DIRECTORY },
5365 { "NOT_FOUND", STATUS_NOT_FOUND },
5366 { "NOT_IMPLEMENTED", STATUS_NOT_IMPLEMENTED },
5367 { "NOT_MAPPED_VIEW", STATUS_NOT_MAPPED_VIEW },
5368 { "NOT_REGISTRY_FILE", STATUS_NOT_REGISTRY_FILE },
5369 { "NOT_SAME_DEVICE", STATUS_NOT_SAME_DEVICE },
5370 { "NOT_SUPPORTED", STATUS_NOT_SUPPORTED },
5371 { "NO_DATA_DETECTED", STATUS_NO_DATA_DETECTED },
5372 { "NO_IMPERSONATION_TOKEN", STATUS_NO_IMPERSONATION_TOKEN },
5373 { "NO_MEMORY", STATUS_NO_MEMORY },
5374 { "NO_MORE_ENTRIES", STATUS_NO_MORE_ENTRIES },
5375 { "NO_SUCH_DEVICE", STATUS_NO_SUCH_DEVICE },
5376 { "NO_SUCH_FILE", STATUS_NO_SUCH_FILE },
5377 { "NO_TOKEN", STATUS_NO_TOKEN },
5378 { "OBJECT_NAME_COLLISION", STATUS_OBJECT_NAME_COLLISION },
5379 { "OBJECT_NAME_EXISTS", STATUS_OBJECT_NAME_EXISTS },
5380 { "OBJECT_NAME_INVALID", STATUS_OBJECT_NAME_INVALID },
5381 { "OBJECT_NAME_NOT_FOUND", STATUS_OBJECT_NAME_NOT_FOUND },
5382 { "OBJECT_PATH_INVALID", STATUS_OBJECT_PATH_INVALID },
5383 { "OBJECT_PATH_NOT_FOUND", STATUS_OBJECT_PATH_NOT_FOUND },
5384 { "OBJECT_PATH_SYNTAX_BAD", STATUS_OBJECT_PATH_SYNTAX_BAD },
5385 { "OBJECT_TYPE_MISMATCH", STATUS_OBJECT_TYPE_MISMATCH },
5386 { "PENDING", STATUS_PENDING },
5387 { "PIPE_BROKEN", STATUS_PIPE_BROKEN },
5388 { "PIPE_BUSY", STATUS_PIPE_BUSY },
5389 { "PIPE_CLOSING", STATUS_PIPE_CLOSING },
5390 { "PIPE_CONNECTED", STATUS_PIPE_CONNECTED },
5391 { "PIPE_DISCONNECTED", STATUS_PIPE_DISCONNECTED },
5392 { "PIPE_EMPTY", STATUS_PIPE_EMPTY },
5393 { "PIPE_LISTENING", STATUS_PIPE_LISTENING },
5394 { "PIPE_NOT_AVAILABLE", STATUS_PIPE_NOT_AVAILABLE },
5395 { "PORT_NOT_SET", STATUS_PORT_NOT_SET },
5396 { "PRIVILEGE_NOT_HELD", STATUS_PRIVILEGE_NOT_HELD },
5397 { "PROCESS_IN_JOB", STATUS_PROCESS_IN_JOB },
5398 { "PROCESS_IS_TERMINATING", STATUS_PROCESS_IS_TERMINATING },
5399 { "PROCESS_NOT_IN_JOB", STATUS_PROCESS_NOT_IN_JOB },
5400 { "REPARSE_POINT_NOT_RESOLVED", STATUS_REPARSE_POINT_NOT_RESOLVED },
5401 { "SECTION_TOO_BIG", STATUS_SECTION_TOO_BIG },
5402 { "SEMAPHORE_LIMIT_EXCEEDED", STATUS_SEMAPHORE_LIMIT_EXCEEDED },
5403 { "SHARING_VIOLATION", STATUS_SHARING_VIOLATION },
5404 { "SHUTDOWN_IN_PROGRESS", STATUS_SHUTDOWN_IN_PROGRESS },
5405 { "SUSPEND_COUNT_EXCEEDED", STATUS_SUSPEND_COUNT_EXCEEDED },
5406 { "THREAD_IS_TERMINATING", STATUS_THREAD_IS_TERMINATING },
5407 { "TIMEOUT", STATUS_TIMEOUT },
5408 { "TOO_MANY_OPENED_FILES", STATUS_TOO_MANY_OPENED_FILES },
5409 { "UNSUCCESSFUL", STATUS_UNSUCCESSFUL },
5410 { "USER_APC", STATUS_USER_APC },
5411 { "USER_MAPPED_FILE", STATUS_USER_MAPPED_FILE },
5412 { "VOLUME_DISMOUNTED", STATUS_VOLUME_DISMOUNTED },
5413 { "WAS_LOCKED", STATUS_WAS_LOCKED },
5414 { "WSAEACCES", 0xc0010000 | WSAEACCES },
5415 { "WSAEADDRINUSE", 0xc0010000 | WSAEADDRINUSE },
5416 { "WSAEADDRNOTAVAIL", 0xc0010000 | WSAEADDRNOTAVAIL },
5417 { "WSAEAFNOSUPPORT", 0xc0010000 | WSAEAFNOSUPPORT },
5418 { "WSAEALREADY", 0xc0010000 | WSAEALREADY },
5419 { "WSAEBADF", 0xc0010000 | WSAEBADF },
5420 { "WSAECONNABORTED", 0xc0010000 | WSAECONNABORTED },
5421 { "WSAECONNREFUSED", 0xc0010000 | WSAECONNREFUSED },
5422 { "WSAECONNRESET", 0xc0010000 | WSAECONNRESET },
5423 { "WSAEDESTADDRREQ", 0xc0010000 | WSAEDESTADDRREQ },
5424 { "WSAEDQUOT", 0xc0010000 | WSAEDQUOT },
5425 { "WSAEFAULT", 0xc0010000 | WSAEFAULT },
5426 { "WSAEHOSTDOWN", 0xc0010000 | WSAEHOSTDOWN },
5427 { "WSAEHOSTUNREACH", 0xc0010000 | WSAEHOSTUNREACH },
5428 { "WSAEINPROGRESS", 0xc0010000 | WSAEINPROGRESS },
5429 { "WSAEINTR", 0xc0010000 | WSAEINTR },
5430 { "WSAEINVAL", 0xc0010000 | WSAEINVAL },
5431 { "WSAEISCONN", 0xc0010000 | WSAEISCONN },
5432 { "WSAELOOP", 0xc0010000 | WSAELOOP },
5433 { "WSAEMFILE", 0xc0010000 | WSAEMFILE },
5434 { "WSAEMSGSIZE", 0xc0010000 | WSAEMSGSIZE },
5435 { "WSAENAMETOOLONG", 0xc0010000 | WSAENAMETOOLONG },
5436 { "WSAENETDOWN", 0xc0010000 | WSAENETDOWN },
5437 { "WSAENETRESET", 0xc0010000 | WSAENETRESET },
5438 { "WSAENETUNREACH", 0xc0010000 | WSAENETUNREACH },
5439 { "WSAENOBUFS", 0xc0010000 | WSAENOBUFS },
5440 { "WSAENOPROTOOPT", 0xc0010000 | WSAENOPROTOOPT },
5441 { "WSAENOTCONN", 0xc0010000 | WSAENOTCONN },
5442 { "WSAENOTEMPTY", 0xc0010000 | WSAENOTEMPTY },
5443 { "WSAENOTSOCK", 0xc0010000 | WSAENOTSOCK },
5444 { "WSAEOPNOTSUPP", 0xc0010000 | WSAEOPNOTSUPP },
5445 { "WSAEPFNOSUPPORT", 0xc0010000 | WSAEPFNOSUPPORT },
5446 { "WSAEPROCLIM", 0xc0010000 | WSAEPROCLIM },
5447 { "WSAEPROTONOSUPPORT", 0xc0010000 | WSAEPROTONOSUPPORT },
5448 { "WSAEPROTOTYPE", 0xc0010000 | WSAEPROTOTYPE },
5449 { "WSAEREMOTE", 0xc0010000 | WSAEREMOTE },
5450 { "WSAESHUTDOWN", 0xc0010000 | WSAESHUTDOWN },
5451 { "WSAESOCKTNOSUPPORT", 0xc0010000 | WSAESOCKTNOSUPPORT },
5452 { "WSAESTALE", 0xc0010000 | WSAESTALE },
5453 { "WSAETIMEDOUT", 0xc0010000 | WSAETIMEDOUT },
5454 { "WSAETOOMANYREFS", 0xc0010000 | WSAETOOMANYREFS },
5455 { "WSAEUSERS", 0xc0010000 | WSAEUSERS },
5456 { "WSAEWOULDBLOCK", 0xc0010000 | WSAEWOULDBLOCK },
5457 { NULL, 0 }
5460 /* ### make_requests end ### */
5461 /* Everything above this line is generated automatically by tools/make_requests */
5463 static const char *get_status_name( unsigned int status )
5465 int i;
5466 static char buffer[10];
5468 if (status)
5470 for (i = 0; status_names[i].name; i++)
5471 if (status_names[i].value == status) return status_names[i].name;
5473 sprintf( buffer, "%x", status );
5474 return buffer;
5477 void trace_request(void)
5479 enum request req = current->req.request_header.req;
5480 if (req < REQ_NB_REQUESTS)
5482 fprintf( stderr, "%04x: %s(", current->id, req_names[req] );
5483 if (req_dumpers[req])
5485 cur_data = get_req_data();
5486 cur_size = get_req_data_size();
5487 req_dumpers[req]( &current->req );
5489 fprintf( stderr, " )\n" );
5491 else fprintf( stderr, "%04x: %d(?)\n", current->id, req );
5494 void trace_reply( enum request req, const union generic_reply *reply )
5496 if (req < REQ_NB_REQUESTS)
5498 fprintf( stderr, "%04x: %s() = %s",
5499 current->id, req_names[req], get_status_name(current->error) );
5500 if (reply_dumpers[req])
5502 fprintf( stderr, " {" );
5503 cur_data = current->reply_data;
5504 cur_size = reply->reply_header.reply_size;
5505 reply_dumpers[req]( reply );
5506 fprintf( stderr, " }" );
5508 fputc( '\n', stderr );
5510 else fprintf( stderr, "%04x: %d() = %s\n",
5511 current->id, req, get_status_name(current->error) );