regedit: Use wide character string literals in framewnd.c.
[wine.git] / server / trace.c
blobd71561e1247bc86754da10ca125d1715896aa5f1
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"
23 #include <ctype.h>
24 #include <stdarg.h>
25 #include <stdio.h>
26 #include <sys/types.h>
28 #ifdef HAVE_SYS_UIO_H
29 #include <sys/uio.h>
30 #endif
32 #include "ntstatus.h"
33 #define WIN32_NO_STATUS
34 #include "windef.h"
35 #include "winbase.h"
36 #include "wincon.h"
37 #include "winternl.h"
38 #include "winuser.h"
39 #include "winioctl.h"
40 #include "wine/condrv.h"
41 #include "ddk/wdm.h"
42 #include "ddk/ntddser.h"
43 #define USE_WS_PREFIX
44 #include "winsock2.h"
45 #include "file.h"
46 #include "request.h"
47 #include "security.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_uint128( const char *prefix, const unsigned __int64 val[2] )
108 unsigned __int64 low = val[0], high = val[1];
110 if ((unsigned int)high != high)
111 fprintf( stderr, "%s%x%08x%08x%08x", prefix, (unsigned int)(high >> 32), (unsigned int)high,
112 (unsigned int)(low >> 32), (unsigned int)low );
113 else if (high)
114 fprintf( stderr, "%s%x%08x%08x", prefix, (unsigned int)high,
115 (unsigned int)(low >> 32), (unsigned int)low );
116 else if ((unsigned int)low != low)
117 fprintf( stderr, "%s%x%08x", prefix, (unsigned int)(low >> 32), (unsigned int)low );
118 else
119 fprintf( stderr, "%s%x", prefix, (unsigned int)low );
122 static void dump_rectangle( const char *prefix, const rectangle_t *rect )
124 fprintf( stderr, "%s{%d,%d;%d,%d}", prefix,
125 rect->left, rect->top, rect->right, rect->bottom );
128 static void dump_ioctl_code( const char *prefix, const ioctl_code_t *code )
130 switch(*code)
132 #define CASE(c) case c: fprintf( stderr, "%s%s", prefix, #c ); break
133 CASE(IOCTL_CONDRV_ACTIVATE);
134 CASE(IOCTL_CONDRV_BIND_PID);
135 CASE(IOCTL_CONDRV_CTRL_EVENT);
136 CASE(IOCTL_CONDRV_FILL_OUTPUT);
137 CASE(IOCTL_CONDRV_GET_INPUT_INFO);
138 CASE(IOCTL_CONDRV_GET_MODE);
139 CASE(IOCTL_CONDRV_GET_OUTPUT_INFO);
140 CASE(IOCTL_CONDRV_GET_TITLE);
141 CASE(IOCTL_CONDRV_PEEK);
142 CASE(IOCTL_CONDRV_READ_CONSOLE);
143 CASE(IOCTL_CONDRV_READ_INPUT);
144 CASE(IOCTL_CONDRV_READ_OUTPUT);
145 CASE(IOCTL_CONDRV_SET_MODE);
146 CASE(IOCTL_CONDRV_SET_OUTPUT_INFO);
147 CASE(IOCTL_CONDRV_SETUP_INPUT);
148 CASE(IOCTL_CONDRV_WRITE_CONSOLE);
149 CASE(IOCTL_CONDRV_WRITE_INPUT);
150 CASE(IOCTL_CONDRV_WRITE_OUTPUT);
151 CASE(FSCTL_DISMOUNT_VOLUME);
152 CASE(FSCTL_PIPE_DISCONNECT);
153 CASE(FSCTL_PIPE_LISTEN);
154 CASE(FSCTL_PIPE_PEEK);
155 CASE(FSCTL_PIPE_WAIT);
156 CASE(IOCTL_SERIAL_GET_TIMEOUTS);
157 CASE(IOCTL_SERIAL_GET_WAIT_MASK);
158 CASE(IOCTL_SERIAL_SET_TIMEOUTS);
159 CASE(IOCTL_SERIAL_SET_WAIT_MASK);
160 CASE(WS_SIO_ADDRESS_LIST_CHANGE);
161 default: fprintf( stderr, "%s%08x", prefix, *code ); break;
162 #undef CASE
166 static void dump_apc_call( const char *prefix, const apc_call_t *call )
168 fprintf( stderr, "%s{", prefix );
169 switch(call->type)
171 case APC_NONE:
172 fprintf( stderr, "APC_NONE" );
173 break;
174 case APC_USER:
175 dump_uint64( "APC_USER,func=", &call->user.func );
176 dump_uint64( ",args={", &call->user.args[0] );
177 dump_uint64( ",", &call->user.args[1] );
178 dump_uint64( ",", &call->user.args[2] );
179 fputc( '}', stderr );
180 break;
181 case APC_ASYNC_IO:
182 dump_uint64( "APC_ASYNC_IO,user=", &call->async_io.user );
183 dump_uint64( ",sb=", &call->async_io.sb );
184 fprintf( stderr, ",status=%s,result=%u", get_status_name(call->async_io.status), call->async_io.result );
185 break;
186 case APC_VIRTUAL_ALLOC:
187 dump_uint64( "APC_VIRTUAL_ALLOC,addr==", &call->virtual_alloc.addr );
188 dump_uint64( ",size=", &call->virtual_alloc.size );
189 dump_uint64( ",zero_bits=", &call->virtual_alloc.zero_bits );
190 fprintf( stderr, ",op_type=%x,prot=%x", call->virtual_alloc.op_type, call->virtual_alloc.prot );
191 break;
192 case APC_VIRTUAL_FREE:
193 dump_uint64( "APC_VIRTUAL_FREE,addr=", &call->virtual_free.addr );
194 dump_uint64( ",size=", &call->virtual_free.size );
195 fprintf( stderr, ",op_type=%x", call->virtual_free.op_type );
196 break;
197 case APC_VIRTUAL_QUERY:
198 dump_uint64( "APC_VIRTUAL_QUERY,addr=", &call->virtual_query.addr );
199 break;
200 case APC_VIRTUAL_PROTECT:
201 dump_uint64( "APC_VIRTUAL_PROTECT,addr=", &call->virtual_protect.addr );
202 dump_uint64( ",size=", &call->virtual_protect.size );
203 fprintf( stderr, ",prot=%x", call->virtual_protect.prot );
204 break;
205 case APC_VIRTUAL_FLUSH:
206 dump_uint64( "APC_VIRTUAL_FLUSH,addr=", &call->virtual_flush.addr );
207 dump_uint64( ",size=", &call->virtual_flush.size );
208 break;
209 case APC_VIRTUAL_LOCK:
210 dump_uint64( "APC_VIRTUAL_LOCK,addr=", &call->virtual_lock.addr );
211 dump_uint64( ",size=", &call->virtual_lock.size );
212 break;
213 case APC_VIRTUAL_UNLOCK:
214 dump_uint64( "APC_VIRTUAL_UNLOCK,addr=", &call->virtual_unlock.addr );
215 dump_uint64( ",size=", &call->virtual_unlock.size );
216 break;
217 case APC_MAP_VIEW:
218 fprintf( stderr, "APC_MAP_VIEW,handle=%04x", call->map_view.handle );
219 dump_uint64( ",addr=", &call->map_view.addr );
220 dump_uint64( ",size=", &call->map_view.size );
221 dump_uint64( ",offset=", &call->map_view.offset );
222 dump_uint64( ",zero_bits=", &call->map_view.zero_bits );
223 fprintf( stderr, ",alloc_type=%x,prot=%x", call->map_view.alloc_type, call->map_view.prot );
224 break;
225 case APC_UNMAP_VIEW:
226 dump_uint64( "APC_UNMAP_VIEW,addr=", &call->unmap_view.addr );
227 break;
228 case APC_CREATE_THREAD:
229 dump_uint64( "APC_CREATE_THREAD,func=", &call->create_thread.func );
230 dump_uint64( ",arg=", &call->create_thread.arg );
231 dump_uint64( ",zero_bits=", &call->create_thread.zero_bits );
232 dump_uint64( ",reserve=", &call->create_thread.reserve );
233 dump_uint64( ",commit=", &call->create_thread.commit );
234 fprintf( stderr, ",flags=%x", call->create_thread.flags );
235 break;
236 case APC_DUP_HANDLE:
237 fprintf( stderr, "APC_DUP_HANDLE,src_handle=%04x,dst_process=%04x,access=%x,attributes=%x,options=%x",
238 call->dup_handle.src_handle, call->dup_handle.dst_process, call->dup_handle.access,
239 call->dup_handle.attributes, call->dup_handle.options );
240 break;
241 default:
242 fprintf( stderr, "type=%u", call->type );
243 break;
245 fputc( '}', stderr );
248 static void dump_apc_result( const char *prefix, const apc_result_t *result )
250 fprintf( stderr, "%s{", prefix );
251 switch(result->type)
253 case APC_NONE:
254 break;
255 case APC_ASYNC_IO:
256 fprintf( stderr, "APC_ASYNC_IO,status=%s,total=%u",
257 get_status_name( result->async_io.status ), result->async_io.total );
258 break;
259 case APC_VIRTUAL_ALLOC:
260 fprintf( stderr, "APC_VIRTUAL_ALLOC,status=%s",
261 get_status_name( result->virtual_alloc.status ));
262 dump_uint64( ",addr=", &result->virtual_alloc.addr );
263 dump_uint64( ",size=", &result->virtual_alloc.size );
264 break;
265 case APC_VIRTUAL_FREE:
266 fprintf( stderr, "APC_VIRTUAL_FREE,status=%s",
267 get_status_name( result->virtual_free.status ));
268 dump_uint64( ",addr=", &result->virtual_free.addr );
269 dump_uint64( ",size=", &result->virtual_free.size );
270 break;
271 case APC_VIRTUAL_QUERY:
272 fprintf( stderr, "APC_VIRTUAL_QUERY,status=%s",
273 get_status_name( result->virtual_query.status ));
274 dump_uint64( ",base=", &result->virtual_query.base );
275 dump_uint64( ",alloc_base=", &result->virtual_query.alloc_base );
276 dump_uint64( ",size=", &result->virtual_query.size );
277 fprintf( stderr, ",state=%x,prot=%x,alloc_prot=%x,alloc_type=%x",
278 result->virtual_query.state, result->virtual_query.prot,
279 result->virtual_query.alloc_prot, result->virtual_query.alloc_type );
280 break;
281 case APC_VIRTUAL_PROTECT:
282 fprintf( stderr, "APC_VIRTUAL_PROTECT,status=%s",
283 get_status_name( result->virtual_protect.status ));
284 dump_uint64( ",addr=", &result->virtual_protect.addr );
285 dump_uint64( ",size=", &result->virtual_protect.size );
286 fprintf( stderr, ",prot=%x", result->virtual_protect.prot );
287 break;
288 case APC_VIRTUAL_FLUSH:
289 fprintf( stderr, "APC_VIRTUAL_FLUSH,status=%s",
290 get_status_name( result->virtual_flush.status ));
291 dump_uint64( ",addr=", &result->virtual_flush.addr );
292 dump_uint64( ",size=", &result->virtual_flush.size );
293 break;
294 case APC_VIRTUAL_LOCK:
295 fprintf( stderr, "APC_VIRTUAL_LOCK,status=%s",
296 get_status_name( result->virtual_lock.status ));
297 dump_uint64( ",addr=", &result->virtual_lock.addr );
298 dump_uint64( ",size=", &result->virtual_lock.size );
299 break;
300 case APC_VIRTUAL_UNLOCK:
301 fprintf( stderr, "APC_VIRTUAL_UNLOCK,status=%s",
302 get_status_name( result->virtual_unlock.status ));
303 dump_uint64( ",addr=", &result->virtual_unlock.addr );
304 dump_uint64( ",size=", &result->virtual_unlock.size );
305 break;
306 case APC_MAP_VIEW:
307 fprintf( stderr, "APC_MAP_VIEW,status=%s",
308 get_status_name( result->map_view.status ));
309 dump_uint64( ",addr=", &result->map_view.addr );
310 dump_uint64( ",size=", &result->map_view.size );
311 break;
312 case APC_UNMAP_VIEW:
313 fprintf( stderr, "APC_UNMAP_VIEW,status=%s",
314 get_status_name( result->unmap_view.status ) );
315 break;
316 case APC_CREATE_THREAD:
317 fprintf( stderr, "APC_CREATE_THREAD,status=%s,pid=%04x,tid=%04x,handle=%04x",
318 get_status_name( result->create_thread.status ),
319 result->create_thread.pid, result->create_thread.tid, result->create_thread.handle );
320 break;
321 case APC_DUP_HANDLE:
322 fprintf( stderr, "APC_DUP_HANDLE,status=%s,handle=%04x",
323 get_status_name( result->dup_handle.status ), result->dup_handle.handle );
324 break;
325 default:
326 fprintf( stderr, "type=%u", result->type );
327 break;
329 fputc( '}', stderr );
332 static void dump_async_data( const char *prefix, const async_data_t *data )
334 fprintf( stderr, "%s{handle=%04x,event=%04x", prefix, data->handle, data->event );
335 dump_uint64( ",iosb=", &data->iosb );
336 dump_uint64( ",user=", &data->user );
337 dump_uint64( ",apc=", &data->apc );
338 dump_uint64( ",apc_context=", &data->apc_context );
339 fputc( '}', stderr );
342 static void dump_irp_params( const char *prefix, const irp_params_t *data )
344 switch (data->type)
346 case IRP_CALL_NONE:
347 fprintf( stderr, "%s{NONE}", prefix );
348 break;
349 case IRP_CALL_CREATE:
350 fprintf( stderr, "%s{CREATE,access=%08x,sharing=%08x,options=%08x",
351 prefix, data->create.access, data->create.sharing, data->create.options );
352 dump_uint64( ",device=", &data->create.device );
353 fprintf( stderr, ",file=%08x}", data->create.file );
354 break;
355 case IRP_CALL_CLOSE:
356 fprintf( stderr, "%s{CLOSE", prefix );
357 dump_uint64( ",file=", &data->close.file );
358 fputc( '}', stderr );
359 break;
360 case IRP_CALL_READ:
361 fprintf( stderr, "%s{READ,key=%08x,out_size=%u", prefix, data->read.key,
362 data->read.out_size );
363 dump_uint64( ",pos=", &data->read.pos );
364 dump_uint64( ",file=", &data->read.file );
365 fputc( '}', stderr );
366 break;
367 case IRP_CALL_WRITE:
368 fprintf( stderr, "%s{WRITE,key=%08x", prefix, data->write.key );
369 dump_uint64( ",pos=", &data->write.pos );
370 dump_uint64( ",file=", &data->write.file );
371 fputc( '}', stderr );
372 break;
373 case IRP_CALL_FLUSH:
374 fprintf( stderr, "%s{FLUSH", prefix );
375 dump_uint64( ",file=", &data->flush.file );
376 fputc( '}', stderr );
377 break;
378 case IRP_CALL_IOCTL:
379 fprintf( stderr, "%s{IOCTL", prefix );
380 dump_ioctl_code( ",code=", &data->ioctl.code );
381 fprintf( stderr, ",out_size=%u", data->ioctl.out_size );
382 dump_uint64( ",file=", &data->ioctl.file );
383 fputc( '}', stderr );
384 break;
385 case IRP_CALL_VOLUME:
386 fprintf( stderr, "%s{VOLUME,class=%u,out_size=%u", prefix,
387 data->volume.info_class, data->volume.out_size );
388 dump_uint64( ",file=", &data->volume.file );
389 fputc( '}', stderr );
390 break;
391 case IRP_CALL_FREE:
392 fprintf( stderr, "%s{FREE", prefix );
393 dump_uint64( ",obj=", &data->free.obj );
394 fputc( '}', stderr );
395 break;
396 case IRP_CALL_CANCEL:
397 fprintf( stderr, "%s{CANCEL", prefix );
398 dump_uint64( ",irp=", &data->cancel.irp );
399 fputc( '}', stderr );
400 break;
404 static void dump_rawinput( const char *prefix, const union rawinput *rawinput )
406 switch (rawinput->type)
408 case RIM_TYPEMOUSE:
409 fprintf( stderr, "%s{type=MOUSE,x=%d,y=%d,data=%08x}", prefix, rawinput->mouse.x,
410 rawinput->mouse.y, rawinput->mouse.data );
411 break;
412 case RIM_TYPEKEYBOARD:
413 fprintf( stderr, "%s{type=KEYBOARD,message=%04x,vkey=%04hx,scan=%04hx}", prefix,
414 rawinput->kbd.message, rawinput->kbd.vkey, rawinput->kbd.scan );
415 break;
416 case RIM_TYPEHID:
417 fprintf( stderr, "%s{type=HID,device=%04x,param=%04x,page=%04hx,usage=%04hx,count=%u,length=%u}",
418 prefix, rawinput->hid.device, rawinput->hid.param, rawinput->hid.usage_page,
419 rawinput->hid.usage, rawinput->hid.count, rawinput->hid.length );
420 break;
421 default:
422 fprintf( stderr, "%s{type=%04x}", prefix, rawinput->type );
423 break;
427 static void dump_hw_input( const char *prefix, const hw_input_t *input )
429 switch (input->type)
431 case INPUT_MOUSE:
432 fprintf( stderr, "%s{type=MOUSE,x=%d,y=%d,data=%08x,flags=%08x,time=%u",
433 prefix, input->mouse.x, input->mouse.y, input->mouse.data, input->mouse.flags,
434 input->mouse.time );
435 dump_uint64( ",info=", &input->mouse.info );
436 fputc( '}', stderr );
437 break;
438 case INPUT_KEYBOARD:
439 fprintf( stderr, "%s{type=KEYBOARD,vkey=%04hx,scan=%04hx,flags=%08x,time=%u",
440 prefix, input->kbd.vkey, input->kbd.scan, input->kbd.flags, input->kbd.time );
441 dump_uint64( ",info=", &input->kbd.info );
442 fputc( '}', stderr );
443 break;
444 case INPUT_HARDWARE:
445 fprintf( stderr, "%s{type=HARDWARE,msg=%04x", prefix, input->hw.msg );
446 dump_uint64( ",lparam=", &input->hw.lparam );
447 switch (input->hw.msg)
449 case WM_INPUT:
450 case WM_INPUT_DEVICE_CHANGE:
451 dump_rawinput( ",rawinput=", &input->hw.rawinput );
453 fputc( '}', stderr );
454 break;
455 default:
456 fprintf( stderr, "%s{type=%04x}", prefix, input->type );
457 break;
461 static void dump_luid( const char *prefix, const struct luid *luid )
463 fprintf( stderr, "%s%d.%u", prefix, luid->high_part, luid->low_part );
466 static void dump_generic_map( const char *prefix, const generic_map_t *map )
468 fprintf( stderr, "%s{r=%08x,w=%08x,x=%08x,a=%08x}",
469 prefix, map->read, map->write, map->exec, map->all );
472 static void dump_varargs_ints( const char *prefix, data_size_t size )
474 const int *data = cur_data;
475 data_size_t len = size / sizeof(*data);
477 fprintf( stderr,"%s{", prefix );
478 while (len > 0)
480 fprintf( stderr, "%d", *data++ );
481 if (--len) fputc( ',', stderr );
483 fputc( '}', stderr );
484 remove_data( size );
487 static void dump_varargs_uints( const char *prefix, data_size_t size )
489 const unsigned int *data = cur_data;
491 dump_uints( prefix, data, size / sizeof(*data) );
492 remove_data( size );
495 static void dump_varargs_uints64( const char *prefix, data_size_t size )
497 const unsigned __int64 *data = cur_data;
498 data_size_t len = size / sizeof(*data);
500 fprintf( stderr,"%s{", prefix );
501 while (len > 0)
503 dump_uint64( "", data++ );
504 if (--len) fputc( ',', stderr );
506 fputc( '}', stderr );
507 remove_data( size );
510 static void dump_varargs_ushorts( const char *prefix, data_size_t size )
512 const unsigned short *data = cur_data;
513 data_size_t len = size / sizeof(*data);
515 fprintf( stderr, "%s{", prefix );
516 while (len > 0)
518 fprintf( stderr, "%04x", *data++ );
519 if (--len) fputc( ',', stderr );
521 fputc( '}', stderr );
522 remove_data( size );
525 static void dump_varargs_apc_result( const char *prefix, data_size_t size )
527 const apc_result_t *result = cur_data;
529 if (size >= sizeof(*result))
531 dump_apc_result( prefix, result );
532 size = sizeof(*result);
534 remove_data( size );
537 static void dump_varargs_select_op( const char *prefix, data_size_t size )
539 select_op_t data;
541 if (!size)
543 fprintf( stderr, "%s{}", prefix );
544 return;
546 memset( &data, 0, sizeof(data) );
547 memcpy( &data, cur_data, min( size, sizeof(data) ));
549 fprintf( stderr, "%s{", prefix );
550 switch (data.op)
552 case SELECT_NONE:
553 fprintf( stderr, "NONE" );
554 break;
555 case SELECT_WAIT:
556 case SELECT_WAIT_ALL:
557 fprintf( stderr, "%s", data.op == SELECT_WAIT ? "WAIT" : "WAIT_ALL" );
558 if (size > offsetof( select_op_t, wait.handles ))
559 dump_handles( ",handles=", data.wait.handles,
560 min( size, sizeof(data.wait) ) - offsetof( select_op_t, wait.handles ));
561 break;
562 case SELECT_SIGNAL_AND_WAIT:
563 fprintf( stderr, "SIGNAL_AND_WAIT,signal=%04x,wait=%04x",
564 data.signal_and_wait.signal, data.signal_and_wait.wait );
565 break;
566 case SELECT_KEYED_EVENT_WAIT:
567 case SELECT_KEYED_EVENT_RELEASE:
568 fprintf( stderr, "KEYED_EVENT_%s,handle=%04x",
569 data.op == SELECT_KEYED_EVENT_WAIT ? "WAIT" : "RELEASE",
570 data.keyed_event.handle );
571 dump_uint64( ",key=", &data.keyed_event.key );
572 break;
573 default:
574 fprintf( stderr, "op=%u", data.op );
575 break;
577 fputc( '}', stderr );
578 remove_data( size );
581 static void dump_varargs_user_handles( const char *prefix, data_size_t size )
583 const user_handle_t *data = cur_data;
584 data_size_t len = size / sizeof(*data);
586 fprintf( stderr,"%s{", prefix );
587 while (len > 0)
589 fprintf( stderr, "%08x", *data++ );
590 if (--len) fputc( ',', stderr );
592 fputc( '}', stderr );
593 remove_data( size );
596 static void dump_varargs_bytes( const char *prefix, data_size_t size )
598 const unsigned char *data = cur_data;
599 data_size_t len = min( 1024, size );
601 fprintf( stderr,"%s{", prefix );
602 while (len > 0)
604 fprintf( stderr, "%02x", *data++ );
605 if (--len) fputc( ',', stderr );
607 if (size > 1024) fprintf( stderr, "...(total %u)", size );
608 fputc( '}', stderr );
609 remove_data( size );
612 static void dump_varargs_string( const char *prefix, data_size_t size )
614 fprintf( stderr, "%s\"%.*s\"", prefix, (int)size, (const char *)cur_data );
615 remove_data( size );
618 static void dump_varargs_unicode_str( const char *prefix, data_size_t size )
620 fprintf( stderr, "%sL\"", prefix );
621 dump_strW( cur_data, size, stderr, "\"\"" );
622 fputc( '\"', stderr );
623 remove_data( size );
626 static void dump_varargs_context( const char *prefix, data_size_t size )
628 const context_t *context = cur_data;
629 context_t ctx;
630 unsigned int i;
632 if (!size)
634 fprintf( stderr, "%s{}", prefix );
635 return;
637 size = min( size, sizeof(ctx) );
638 memset( &ctx, 0, sizeof(ctx) );
639 memcpy( &ctx, context, size );
641 switch (ctx.machine)
643 case IMAGE_FILE_MACHINE_I386:
644 fprintf( stderr, "%s{machine=i386", prefix );
645 if (ctx.flags & SERVER_CTX_CONTROL)
646 fprintf( stderr, ",eip=%08x,esp=%08x,ebp=%08x,eflags=%08x,cs=%04x,ss=%04x",
647 ctx.ctl.i386_regs.eip, ctx.ctl.i386_regs.esp, ctx.ctl.i386_regs.ebp,
648 ctx.ctl.i386_regs.eflags, ctx.ctl.i386_regs.cs, ctx.ctl.i386_regs.ss );
649 if (ctx.flags & SERVER_CTX_SEGMENTS)
650 fprintf( stderr, ",ds=%04x,es=%04x,fs=%04x,gs=%04x",
651 ctx.seg.i386_regs.ds, ctx.seg.i386_regs.es,
652 ctx.seg.i386_regs.fs, ctx.seg.i386_regs.gs );
653 if (ctx.flags & SERVER_CTX_INTEGER)
654 fprintf( stderr, ",eax=%08x,ebx=%08x,ecx=%08x,edx=%08x,esi=%08x,edi=%08x",
655 ctx.integer.i386_regs.eax, ctx.integer.i386_regs.ebx, ctx.integer.i386_regs.ecx,
656 ctx.integer.i386_regs.edx, ctx.integer.i386_regs.esi, ctx.integer.i386_regs.edi );
657 if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
658 fprintf( stderr, ",dr0=%08x,dr1=%08x,dr2=%08x,dr3=%08x,dr6=%08x,dr7=%08x",
659 ctx.debug.i386_regs.dr0, ctx.debug.i386_regs.dr1, ctx.debug.i386_regs.dr2,
660 ctx.debug.i386_regs.dr3, ctx.debug.i386_regs.dr6, ctx.debug.i386_regs.dr7 );
661 if (ctx.flags & SERVER_CTX_FLOATING_POINT)
663 fprintf( stderr, ",fp.ctrl=%08x,fp.status=%08x,fp.tag=%08x,fp.err_off=%08x,fp.err_sel=%08x",
664 ctx.fp.i386_regs.ctrl, ctx.fp.i386_regs.status, ctx.fp.i386_regs.tag,
665 ctx.fp.i386_regs.err_off, ctx.fp.i386_regs.err_sel );
666 fprintf( stderr, ",fp.data_off=%08x,fp.data_sel=%08x,fp.cr0npx=%08x",
667 ctx.fp.i386_regs.data_off, ctx.fp.i386_regs.data_sel, ctx.fp.i386_regs.cr0npx );
668 for (i = 0; i < 8; i++)
670 unsigned __int64 reg[2];
671 memset( reg, 0, sizeof(reg) );
672 memcpy( reg, &ctx.fp.i386_regs.regs[10 * i], 10 );
673 fprintf( stderr, ",fp.reg%u=", i );
674 dump_uint128( "", reg );
677 if (ctx.flags & SERVER_CTX_EXTENDED_REGISTERS)
678 dump_uints( ",extended=", (const unsigned int *)ctx.ext.i386_regs,
679 sizeof(ctx.ext.i386_regs) / sizeof(int) );
680 if (ctx.flags & SERVER_CTX_YMM_REGISTERS)
681 for (i = 0; i < 16; i++)
683 fprintf( stderr, ",ymm%u=", i );
684 dump_uint128( "", (const unsigned __int64 *)&ctx.ymm.regs.ymm_high[i] );
686 break;
687 case IMAGE_FILE_MACHINE_AMD64:
688 fprintf( stderr, "%s{machine=x86_64", prefix );
689 if (ctx.flags & SERVER_CTX_CONTROL)
691 dump_uint64( ",rip=", &ctx.ctl.x86_64_regs.rip );
692 dump_uint64( ",rbp=", &ctx.ctl.x86_64_regs.rbp );
693 dump_uint64( ",rsp=", &ctx.ctl.x86_64_regs.rsp );
694 fprintf( stderr, ",cs=%04x,ss=%04x,flags=%08x",
695 ctx.ctl.x86_64_regs.cs, ctx.ctl.x86_64_regs.ss, ctx.ctl.x86_64_regs.flags );
697 if (ctx.flags & SERVER_CTX_INTEGER)
699 dump_uint64( ",rax=", &ctx.integer.x86_64_regs.rax );
700 dump_uint64( ",rbx=", &ctx.integer.x86_64_regs.rbx );
701 dump_uint64( ",rcx=", &ctx.integer.x86_64_regs.rcx );
702 dump_uint64( ",rdx=", &ctx.integer.x86_64_regs.rdx );
703 dump_uint64( ",rsi=", &ctx.integer.x86_64_regs.rsi );
704 dump_uint64( ",rdi=", &ctx.integer.x86_64_regs.rdi );
705 dump_uint64( ",r8=", &ctx.integer.x86_64_regs.r8 );
706 dump_uint64( ",r9=", &ctx.integer.x86_64_regs.r9 );
707 dump_uint64( ",r10=", &ctx.integer.x86_64_regs.r10 );
708 dump_uint64( ",r11=", &ctx.integer.x86_64_regs.r11 );
709 dump_uint64( ",r12=", &ctx.integer.x86_64_regs.r12 );
710 dump_uint64( ",r13=", &ctx.integer.x86_64_regs.r13 );
711 dump_uint64( ",r14=", &ctx.integer.x86_64_regs.r14 );
712 dump_uint64( ",r15=", &ctx.integer.x86_64_regs.r15 );
714 if (ctx.flags & SERVER_CTX_SEGMENTS)
715 fprintf( stderr, ",ds=%04x,es=%04x,fs=%04x,gs=%04x",
716 ctx.seg.x86_64_regs.ds, ctx.seg.x86_64_regs.es,
717 ctx.seg.x86_64_regs.fs, ctx.seg.x86_64_regs.gs );
718 if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
720 dump_uint64( ",dr0=", &ctx.debug.x86_64_regs.dr0 );
721 dump_uint64( ",dr1=", &ctx.debug.x86_64_regs.dr1 );
722 dump_uint64( ",dr2=", &ctx.debug.x86_64_regs.dr2 );
723 dump_uint64( ",dr3=", &ctx.debug.x86_64_regs.dr3 );
724 dump_uint64( ",dr6=", &ctx.debug.x86_64_regs.dr6 );
725 dump_uint64( ",dr7=", &ctx.debug.x86_64_regs.dr7 );
727 if (ctx.flags & SERVER_CTX_FLOATING_POINT)
728 for (i = 0; i < 32; i++)
730 fprintf( stderr, ",fp%u=", i );
731 dump_uint128( "", (const unsigned __int64 *)&ctx.fp.x86_64_regs.fpregs[i] );
733 if (ctx.flags & SERVER_CTX_YMM_REGISTERS)
734 for (i = 0; i < 16; i++)
736 fprintf( stderr, ",ymm%u=", i );
737 dump_uint128( "", (const unsigned __int64 *)&ctx.ymm.regs.ymm_high[i] );
739 break;
740 case IMAGE_FILE_MACHINE_ARMNT:
741 fprintf( stderr, "%s{machine=arm", prefix );
742 if (ctx.flags & SERVER_CTX_CONTROL)
743 fprintf( stderr, ",sp=%08x,lr=%08x,pc=%08x,cpsr=%08x",
744 ctx.ctl.arm_regs.sp, ctx.ctl.arm_regs.lr,
745 ctx.ctl.arm_regs.pc, ctx.ctl.arm_regs.cpsr );
746 if (ctx.flags & SERVER_CTX_INTEGER)
747 for (i = 0; i < 13; i++) fprintf( stderr, ",r%u=%08x", i, ctx.integer.arm_regs.r[i] );
748 if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
750 for (i = 0; i < 8; i++)
751 fprintf( stderr, ",bcr%u=%08x,bvr%u=%08x",
752 i, ctx.debug.arm_regs.bcr[i], i, ctx.debug.arm_regs.bvr[i] );
753 fprintf( stderr, ",wcr0=%08x,wvr0=%08x",
754 ctx.debug.arm_regs.wcr[0], ctx.debug.arm_regs.wvr[0] );
756 if (ctx.flags & SERVER_CTX_FLOATING_POINT)
758 for (i = 0; i < 32; i++)
760 fprintf( stderr, ",d%u=", i );
761 dump_uint64( "", &ctx.fp.arm_regs.d[i] );
763 fprintf( stderr, ",fpscr=%08x", ctx.fp.arm_regs.fpscr );
765 break;
766 case IMAGE_FILE_MACHINE_ARM64:
767 fprintf( stderr, "%s{machine=arm64", prefix );
768 if (ctx.flags & SERVER_CTX_CONTROL)
770 dump_uint64( ",sp=", &ctx.ctl.arm64_regs.sp );
771 dump_uint64( ",pc=", &ctx.ctl.arm64_regs.pc );
772 dump_uint64( ",pstate=", &ctx.ctl.arm64_regs.pstate );
774 if (ctx.flags & SERVER_CTX_INTEGER)
776 for (i = 0; i < 31; i++)
778 fprintf( stderr, ",x%u=", i );
779 dump_uint64( "", &ctx.integer.arm64_regs.x[i] );
782 if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
784 for (i = 0; i < 8; i++)
786 fprintf( stderr, ",bcr%u=%08x,bvr%u=", i, ctx.debug.arm64_regs.bcr[i], i );
787 dump_uint64( "", &ctx.debug.arm64_regs.bvr[i] );
789 for (i = 0; i < 2; i++)
791 fprintf( stderr, ",wcr%u=%08x,wvr%u=", i, ctx.debug.arm64_regs.wcr[i], i );
792 dump_uint64( "", &ctx.debug.arm64_regs.wvr[i] );
795 if (ctx.flags & SERVER_CTX_FLOATING_POINT)
797 for (i = 0; i < 32; i++)
799 fprintf( stderr, ",q%u=", i );
800 dump_uint64( "", &ctx.fp.arm64_regs.q[i].high );
801 dump_uint64( "", &ctx.fp.arm64_regs.q[i].low );
803 fprintf( stderr, ",fpcr=%08x,fpsr=%08x", ctx.fp.arm64_regs.fpcr, ctx.fp.arm64_regs.fpsr );
805 break;
806 default:
807 fprintf( stderr, "%s{machine=%04x", prefix, ctx.machine );
808 break;
810 fputc( '}', stderr );
811 remove_data( size );
814 static void dump_varargs_contexts( const char *prefix, data_size_t size )
816 if (!size)
818 fprintf( stderr, "%s{}", prefix );
819 return;
821 fprintf( stderr, "%s{", prefix );
822 while (cur_size)
824 dump_varargs_context( "", cur_size );
825 fputc( cur_size ? ',' : '}', stderr );
829 static void dump_varargs_debug_event( const char *prefix, data_size_t size )
831 debug_event_t event;
832 unsigned int i;
834 if (!size)
836 fprintf( stderr, "%s{}", prefix );
837 return;
839 size = min( size, sizeof(event) );
840 memset( &event, 0, sizeof(event) );
841 memcpy( &event, cur_data, size );
843 switch(event.code)
845 case DbgIdle:
846 fprintf( stderr, "%s{idle}", prefix );
847 break;
848 case DbgReplyPending:
849 fprintf( stderr, "%s{pending}", prefix );
850 break;
851 case DbgCreateThreadStateChange:
852 fprintf( stderr, "%s{create_thread,thread=%04x", prefix, event.create_thread.handle );
853 dump_uint64( ",start=", &event.create_thread.start );
854 fputc( '}', stderr );
855 break;
856 case DbgCreateProcessStateChange:
857 fprintf( stderr, "%s{create_process,file=%04x,process=%04x,thread=%04x", prefix,
858 event.create_process.file, event.create_process.process,
859 event.create_process.thread );
860 dump_uint64( ",base=", &event.create_process.base );
861 fprintf( stderr, ",offset=%d,size=%d",
862 event.create_process.dbg_offset, event.create_process.dbg_size );
863 dump_uint64( ",start=", &event.create_process.start );
864 fputc( '}', stderr );
865 break;
866 case DbgExitThreadStateChange:
867 fprintf( stderr, "%s{exit_thread,code=%d}", prefix, event.exit.exit_code );
868 break;
869 case DbgExitProcessStateChange:
870 fprintf( stderr, "%s{exit_process,code=%d}", prefix, event.exit.exit_code );
871 break;
872 case DbgExceptionStateChange:
873 case DbgBreakpointStateChange:
874 case DbgSingleStepStateChange:
875 fprintf( stderr, "%s{%s,first=%d,exc_code=%08x,flags=%08x", prefix,
876 event.code == DbgBreakpointStateChange ? "breakpoint" :
877 event.code == DbgSingleStepStateChange ? "singlestep" : "exception",
878 event.exception.first, event.exception.exc_code, event.exception.flags );
879 dump_uint64( ",record=", &event.exception.record );
880 dump_uint64( ",address=", &event.exception.address );
881 fprintf( stderr, ",params={" );
882 event.exception.nb_params = min( event.exception.nb_params, EXCEPTION_MAXIMUM_PARAMETERS );
883 for (i = 0; i < event.exception.nb_params; i++)
885 dump_uint64( "", &event.exception.params[i] );
886 if (i < event.exception.nb_params) fputc( ',', stderr );
888 fprintf( stderr, "}}" );
889 break;
890 case DbgLoadDllStateChange:
891 fprintf( stderr, "%s{load_dll,file=%04x", prefix, event.load_dll.handle );
892 dump_uint64( ",base=", &event.load_dll.base );
893 fprintf( stderr, ",offset=%d,size=%d",
894 event.load_dll.dbg_offset, event.load_dll.dbg_size );
895 dump_uint64( ",name=", &event.load_dll.name );
896 fputc( '}', stderr );
897 break;
898 case DbgUnloadDllStateChange:
899 fprintf( stderr, "%s{unload_dll", prefix );
900 dump_uint64( ",base=", &event.unload_dll.base );
901 fputc( '}', stderr );
902 break;
903 default:
904 fprintf( stderr, "%s{code=??? (%d)}", prefix, event.code );
905 break;
907 remove_data( size );
910 /* dump a unicode string contained in a buffer; helper for dump_varargs_startup_info */
911 static data_size_t dump_inline_unicode_string( const char *prefix, data_size_t pos, data_size_t len, data_size_t total_size )
913 fputs( prefix, stderr );
914 if (pos >= total_size) return pos;
915 if (len > total_size - pos) len = total_size - pos;
916 dump_strW( (const WCHAR *)cur_data + pos/sizeof(WCHAR), len, stderr, "\"\"" );
917 return pos + (len / sizeof(WCHAR)) * sizeof(WCHAR);
920 static void dump_varargs_startup_info( const char *prefix, data_size_t size )
922 startup_info_t info;
923 data_size_t pos = sizeof(info);
925 memset( &info, 0, sizeof(info) );
926 memcpy( &info, cur_data, min( size, sizeof(info) ));
928 fprintf( stderr,
929 "%s{debug_flags=%x,console_flags=%x,console=%04x,hstdin=%04x,hstdout=%04x,hstderr=%04x,"
930 "x=%u,y=%u,xsize=%u,ysize=%u,xchars=%u,ychars=%u,attribute=%02x,flags=%x,show=%u",
931 prefix, info.debug_flags, info.console_flags, info.console,
932 info.hstdin, info.hstdout, info.hstderr, info.x, info.y, info.xsize, info.ysize,
933 info.xchars, info.ychars, info.attribute, info.flags, info.show );
934 pos = dump_inline_unicode_string( ",curdir=L\"", pos, info.curdir_len, size );
935 pos = dump_inline_unicode_string( "\",dllpath=L\"", pos, info.dllpath_len, size );
936 pos = dump_inline_unicode_string( "\",imagepath=L\"", pos, info.imagepath_len, size );
937 pos = dump_inline_unicode_string( "\",cmdline=L\"", pos, info.cmdline_len, size );
938 pos = dump_inline_unicode_string( "\",title=L\"", pos, info.title_len, size );
939 pos = dump_inline_unicode_string( "\",desktop=L\"", pos, info.desktop_len, size );
940 pos = dump_inline_unicode_string( "\",shellinfo=L\"", pos, info.shellinfo_len, size );
941 pos = dump_inline_unicode_string( "\",runtime=L\"", pos, info.runtime_len, size );
942 fprintf( stderr, "\"}" );
943 remove_data( size );
946 static void dump_varargs_rectangles( const char *prefix, data_size_t size )
948 const rectangle_t *rect = cur_data;
949 data_size_t len = size / sizeof(*rect);
951 fprintf( stderr,"%s{", prefix );
952 while (len > 0)
954 dump_rectangle( "", rect++ );
955 if (--len) fputc( ',', stderr );
957 fputc( '}', stderr );
958 remove_data( size );
961 static void dump_varargs_cursor_positions( const char *prefix, data_size_t size )
963 const cursor_pos_t *pos = cur_data;
964 data_size_t len = size / sizeof(*pos);
966 fprintf( stderr, "%s{", prefix );
967 while (len > 0)
969 fprintf( stderr, "{x=%d,y=%d,time=%u", pos->x, pos->y, pos->time );
970 dump_uint64( ",info=", &pos->info );
971 fputc( '}', stderr );
972 pos++;
973 if (--len) fputc( ',', stderr );
975 fputc( '}', stderr );
976 remove_data( size );
979 static void dump_varargs_message_data( const char *prefix, data_size_t size )
981 /* FIXME: dump the structured data */
982 dump_varargs_bytes( prefix, size );
985 static void dump_varargs_properties( const char *prefix, data_size_t size )
987 const property_data_t *prop = cur_data;
988 data_size_t len = size / sizeof(*prop);
990 fprintf( stderr,"%s{", prefix );
991 while (len > 0)
993 fprintf( stderr, "{atom=%04x,str=%d", prop->atom, prop->string );
994 dump_uint64( ",data=", &prop->data );
995 fputc( '}', stderr );
996 prop++;
997 if (--len) fputc( ',', stderr );
999 fputc( '}', stderr );
1000 remove_data( size );
1003 static void dump_varargs_luid_attr( const char *prefix, data_size_t size )
1005 const struct luid_attr *lat = cur_data;
1006 data_size_t len = size / sizeof(*lat);
1008 fprintf( stderr,"%s{", prefix );
1009 while (len > 0)
1011 fprintf( stderr, "{luid=%08x%08x,attrs=%x}", lat->luid.high_part, lat->luid.low_part, lat->attrs );
1012 lat++;
1013 if (--len) fputc( ',', stderr );
1015 fputc( '}', stderr );
1016 remove_data( size );
1019 static void dump_inline_sid( const char *prefix, const struct sid *sid, data_size_t size )
1021 DWORD i;
1023 fprintf( stderr,"%s", prefix );
1024 if (sid_valid_size( sid, size ))
1026 fprintf( stderr, "S-%u-%u", sid->revision,
1027 ((unsigned int)sid->id_auth[2] << 24) |
1028 ((unsigned int)sid->id_auth[3] << 16) |
1029 ((unsigned int)sid->id_auth[4] << 8) |
1030 ((unsigned int)sid->id_auth[5]) );
1031 for (i = 0; i < sid->sub_count; i++) fprintf( stderr, "-%u", sid->sub_auth[i] );
1033 else fprintf( stderr, "<invalid>" );
1036 static void dump_varargs_sid( const char *prefix, data_size_t size )
1038 const struct sid *sid = cur_data;
1039 if (size) dump_inline_sid( prefix, sid, size );
1040 remove_data( size );
1043 static void dump_varargs_sids( const char *prefix, data_size_t size )
1045 const struct sid *sid = cur_data;
1046 data_size_t len = size;
1048 fprintf( stderr,"%s{", prefix );
1049 while (len > 0)
1051 if (!sid_valid_size( sid, len ))
1053 fprintf( stderr, "bad len %u", len);
1054 break;
1056 dump_inline_sid( "", sid, size );
1057 len -= sid_len( sid );
1058 sid = (const struct sid *)((const char *)sid + sid_len( sid ));
1059 if (len) fputc( ',', stderr );
1061 fputc( '}', stderr );
1062 remove_data( size );
1065 static void dump_inline_acl( const char *prefix, const struct acl *acl, data_size_t size )
1067 const struct ace *ace;
1068 ULONG i;
1070 fprintf( stderr,"%s{", prefix );
1071 if (size)
1073 if (size < sizeof(*acl))
1075 fprintf( stderr, "<invalid acl>}" );
1076 return;
1078 size -= sizeof(*acl);
1079 for (i = 0, ace = ace_first( acl ); i < acl->count; i++, ace = ace_next( ace ))
1081 const struct sid *sid = (const struct sid *)(ace + 1);
1082 data_size_t sid_size;
1084 if (size < sizeof(*ace) || size < ace->size) break;
1085 size -= ace->size;
1086 sid_size = ace->size - sizeof(*ace);
1087 if (i != 0) fputc( ',', stderr );
1088 fprintf( stderr, "{type=" );
1089 switch (ace->type)
1091 case ACCESS_DENIED_ACE_TYPE: fprintf( stderr, "ACCESS_DENIED" ); break;
1092 case ACCESS_ALLOWED_ACE_TYPE: fprintf( stderr, "ACCESS_ALLOWED" ); break;
1093 case SYSTEM_AUDIT_ACE_TYPE: fprintf( stderr, "SYSTEM_AUDIT" ); break;
1094 case SYSTEM_ALARM_ACE_TYPE: fprintf( stderr, "SYSTEM_ALARM" ); break;
1095 case SYSTEM_MANDATORY_LABEL_ACE_TYPE: fprintf( stderr, "SYSTEM_MANDATORY_LABEL" ); break;
1096 default:
1097 fprintf( stderr, "%02x", ace->type );
1098 sid = NULL;
1099 break;
1101 fprintf( stderr, ",flags=%x,mask=%x", ace->flags, ace->mask );
1102 if (sid) dump_inline_sid( ",sid=", sid, sid_size );
1103 fputc( '}', stderr );
1106 fputc( '}', stderr );
1109 static void dump_varargs_acl( const char *prefix, data_size_t size )
1111 const struct acl *acl = cur_data;
1112 dump_inline_acl( prefix, acl, size );
1113 remove_data( size );
1116 static void dump_inline_security_descriptor( const char *prefix, const struct security_descriptor *sd, data_size_t size )
1118 fprintf( stderr,"%s{", prefix );
1119 if (size >= sizeof(struct security_descriptor))
1121 size_t offset = sizeof(struct security_descriptor);
1122 fprintf( stderr, "control=%08x", sd->control );
1123 if ((sd->owner_len > offsetof(struct sid, sub_auth[255])) || (offset + sd->owner_len > size))
1124 return;
1125 if (sd->owner_len)
1126 dump_inline_sid( ",owner=", (const struct sid *)((const char *)sd + offset), sd->owner_len );
1127 else
1128 fprintf( stderr, ",owner=<not present>" );
1129 offset += sd->owner_len;
1130 if ((sd->group_len > offsetof(struct sid, sub_auth[255])) || (offset + sd->group_len > size))
1131 return;
1132 if (sd->group_len)
1133 dump_inline_sid( ",group=", (const struct sid *)((const char *)sd + offset), sd->group_len );
1134 else
1135 fprintf( stderr, ",group=<not present>" );
1136 offset += sd->group_len;
1137 if ((sd->sacl_len >= MAX_ACL_LEN) || (offset + sd->sacl_len > size))
1138 return;
1139 dump_inline_acl( ",sacl=", (const struct acl *)((const char *)sd + offset), sd->sacl_len );
1140 offset += sd->sacl_len;
1141 if ((sd->dacl_len >= MAX_ACL_LEN) || (offset + sd->dacl_len > size))
1142 return;
1143 dump_inline_acl( ",dacl=", (const struct acl *)((const char *)sd + offset), sd->dacl_len );
1144 offset += sd->dacl_len;
1146 fputc( '}', stderr );
1149 static void dump_varargs_security_descriptor( const char *prefix, data_size_t size )
1151 const struct security_descriptor *sd = cur_data;
1152 dump_inline_security_descriptor( prefix, sd, size );
1153 remove_data( size );
1156 static void dump_varargs_process_info( const char *prefix, data_size_t size )
1158 data_size_t pos = 0;
1159 unsigned int i;
1161 fprintf( stderr,"%s{", prefix );
1163 while (size - pos >= sizeof(struct process_info))
1165 const struct process_info *process;
1166 pos = (pos + 7) & ~7;
1167 process = (const struct process_info *)((const char *)cur_data + pos);
1168 if (size - pos < sizeof(*process)) break;
1169 if (pos) fputc( ',', stderr );
1170 dump_timeout( "{start_time=", &process->start_time );
1171 fprintf( stderr, ",thread_count=%u,priority=%d,pid=%04x,parent_pid=%04x,session_id=%08x,handle_count=%u,unix_pid=%d,",
1172 process->thread_count, process->priority, process->pid,
1173 process->parent_pid, process->session_id, process->handle_count, process->unix_pid );
1174 pos += sizeof(*process);
1176 pos = dump_inline_unicode_string( "name=L\"", pos, process->name_len, size );
1178 pos = (pos + 7) & ~7;
1179 fprintf( stderr, "\",threads={" );
1180 for (i = 0; i < process->thread_count; i++)
1182 const struct thread_info *thread = (const struct thread_info *)((const char *)cur_data + pos);
1183 if (size - pos < sizeof(*thread)) break;
1184 if (i) fputc( ',', stderr );
1185 dump_timeout( "{start_time=", &thread->start_time );
1186 fprintf( stderr, ",tid=%04x,base_priority=%d,current_priority=%d,unix_tid=%d}",
1187 thread->tid, thread->base_priority, thread->current_priority, thread->unix_tid );
1188 pos += sizeof(*thread);
1190 fprintf( stderr, "}}" );
1192 fputc( '}', stderr );
1193 remove_data( size );
1196 static void dump_varargs_object_attributes( const char *prefix, data_size_t size )
1198 const struct object_attributes *objattr = cur_data;
1200 fprintf( stderr,"%s{", prefix );
1201 if (size)
1203 const WCHAR *str;
1205 if (size < sizeof(*objattr) ||
1206 (size - sizeof(*objattr) < objattr->sd_len) ||
1207 (size - sizeof(*objattr) - objattr->sd_len < objattr->name_len))
1209 fprintf( stderr, "***invalid***}" );
1210 remove_data( size );
1211 return;
1214 fprintf( stderr, "rootdir=%04x,attributes=%08x", objattr->rootdir, objattr->attributes );
1215 dump_inline_security_descriptor( ",sd=", (const struct security_descriptor *)(objattr + 1), objattr->sd_len );
1216 str = (const WCHAR *)objattr + (sizeof(*objattr) + objattr->sd_len) / sizeof(WCHAR);
1217 fprintf( stderr, ",name=L\"" );
1218 dump_strW( str, objattr->name_len, stderr, "\"\"" );
1219 fputc( '\"', stderr );
1220 remove_data( (sizeof(*objattr) + (objattr->sd_len & ~1) + (objattr->name_len & ~1) + 3) & ~3 );
1222 fputc( '}', stderr );
1225 static void dump_varargs_object_type_info( const char *prefix, data_size_t size )
1227 const struct object_type_info *info = cur_data;
1229 fprintf( stderr,"%s{", prefix );
1230 if (size)
1232 if (size < sizeof(*info) || (size - sizeof(*info) < info->name_len))
1234 fprintf( stderr, "***invalid***}" );
1235 remove_data( size );
1236 return;
1239 fprintf( stderr, "index=%u,obj_count=%u,handle_count=%u,obj_max=%u,handle_max=%u,valid=%08x",
1240 info->index,info->obj_count, info->handle_count, info->obj_max, info->handle_max,
1241 info->valid_access );
1242 dump_generic_map( ",access=", &info->mapping );
1243 fprintf( stderr, ",name=L\"" );
1244 dump_strW( (const WCHAR *)(info + 1), info->name_len, stderr, "\"\"" );
1245 fputc( '\"', stderr );
1246 remove_data( min( size, sizeof(*info) + ((info->name_len + 2) & ~3 )));
1248 fputc( '}', stderr );
1251 static void dump_varargs_object_types_info( const char *prefix, data_size_t size )
1253 fprintf( stderr,"%s{", prefix );
1254 while (cur_size) dump_varargs_object_type_info( ",", cur_size );
1255 fputc( '}', stderr );
1258 static void dump_varargs_filesystem_event( const char *prefix, data_size_t size )
1260 static const char * const actions[] = {
1261 NULL,
1262 "ADDED",
1263 "REMOVED",
1264 "MODIFIED",
1265 "RENAMED_OLD_NAME",
1266 "RENAMED_NEW_NAME",
1267 "ADDED_STREAM",
1268 "REMOVED_STREAM",
1269 "MODIFIED_STREAM"
1272 fprintf( stderr,"%s{", prefix );
1273 while (size)
1275 const struct filesystem_event *event = cur_data;
1276 data_size_t len = (offsetof( struct filesystem_event, name[event->len] ) + sizeof(int)-1)
1277 / sizeof(int) * sizeof(int);
1278 if (size < len) break;
1279 if (event->action < ARRAY_SIZE( actions ) && actions[event->action])
1280 fprintf( stderr, "{action=%s", actions[event->action] );
1281 else
1282 fprintf( stderr, "{action=%u", event->action );
1283 fprintf( stderr, ",name=\"%.*s\"}", event->len, event->name );
1284 size -= len;
1285 remove_data( len );
1286 if (size)fputc( ',', stderr );
1288 fputc( '}', stderr );
1291 static void dump_varargs_pe_image_info( const char *prefix, data_size_t size )
1293 pe_image_info_t info;
1295 if (!size)
1297 fprintf( stderr, "%s{}", prefix );
1298 return;
1300 memset( &info, 0, sizeof(info) );
1301 memcpy( &info, cur_data, min( size, sizeof(info) ));
1303 fprintf( stderr, "%s{", prefix );
1304 dump_uint64( "base=", &info.base );
1305 dump_uint64( ",stack_size=", &info.stack_size );
1306 dump_uint64( ",stack_commit=", &info.stack_commit );
1307 fprintf( stderr, ",entry_point=%08x,map_size=%08x,zerobits=%08x,subsystem=%08x,subsystem_minor=%04x,subsystem_major=%04x"
1308 ",osversion_major=%04x,osversion_minor=%04x,image_charact=%04x,dll_charact=%04x,machine=%04x"
1309 ",contains_code=%u,image_flags=%02x"
1310 ",loader_flags=%08x,header_size=%08x,file_size=%08x,checksum=%08x}",
1311 info.entry_point, info.map_size, info.zerobits, info.subsystem, info.subsystem_minor,
1312 info.subsystem_major, info.osversion_major, info.osversion_minor, info.image_charact,
1313 info.dll_charact, info.machine, info.contains_code, info.image_flags, info.loader_flags,
1314 info.header_size, info.file_size, info.checksum );
1315 remove_data( min( size, sizeof(info) ));
1318 static void dump_varargs_rawinput_devices(const char *prefix, data_size_t size )
1320 const struct rawinput_device *device;
1322 fprintf( stderr, "%s{", prefix );
1323 while (size >= sizeof(*device))
1325 device = cur_data;
1326 fprintf( stderr, "{usage_page=%04x,usage=%04x,flags=%08x,target=%08x}",
1327 device->usage_page, device->usage, device->flags, device->target );
1328 size -= sizeof(*device);
1329 remove_data( sizeof(*device) );
1330 if (size) fputc( ',', stderr );
1332 fputc( '}', stderr );
1335 static void dump_varargs_handle_infos( const char *prefix, data_size_t size )
1337 const struct handle_info *handle;
1339 fprintf( stderr, "%s{", prefix );
1340 while (size >= sizeof(*handle))
1342 handle = cur_data;
1343 fprintf( stderr, "{owner=%04x,handle=%04x,access=%08x,attributes=%08x,type=%u}",
1344 handle->owner, handle->handle, handle->access, handle->attributes, handle->type );
1345 size -= sizeof(*handle);
1346 remove_data( sizeof(*handle) );
1347 if (size) fputc( ',', stderr );
1349 fputc( '}', stderr );
1352 typedef void (*dump_func)( const void *req );
1354 /* Everything below this line is generated automatically by tools/make_requests */
1355 /* ### make_requests begin ### */
1357 static void dump_new_process_request( const struct new_process_request *req )
1359 fprintf( stderr, " token=%04x", req->token );
1360 fprintf( stderr, ", debug=%04x", req->debug );
1361 fprintf( stderr, ", parent_process=%04x", req->parent_process );
1362 fprintf( stderr, ", flags=%08x", req->flags );
1363 fprintf( stderr, ", socket_fd=%d", req->socket_fd );
1364 fprintf( stderr, ", access=%08x", req->access );
1365 fprintf( stderr, ", machine=%04x", req->machine );
1366 fprintf( stderr, ", info_size=%u", req->info_size );
1367 fprintf( stderr, ", handles_size=%u", req->handles_size );
1368 fprintf( stderr, ", jobs_size=%u", req->jobs_size );
1369 dump_varargs_object_attributes( ", objattr=", cur_size );
1370 dump_varargs_uints( ", handles=", min(cur_size,req->handles_size) );
1371 dump_varargs_uints( ", jobs=", min(cur_size,req->jobs_size) );
1372 dump_varargs_startup_info( ", info=", min(cur_size,req->info_size) );
1373 dump_varargs_unicode_str( ", env=", cur_size );
1376 static void dump_new_process_reply( const struct new_process_reply *req )
1378 fprintf( stderr, " info=%04x", req->info );
1379 fprintf( stderr, ", pid=%04x", req->pid );
1380 fprintf( stderr, ", handle=%04x", req->handle );
1383 static void dump_get_new_process_info_request( const struct get_new_process_info_request *req )
1385 fprintf( stderr, " info=%04x", req->info );
1388 static void dump_get_new_process_info_reply( const struct get_new_process_info_reply *req )
1390 fprintf( stderr, " success=%d", req->success );
1391 fprintf( stderr, ", exit_code=%d", req->exit_code );
1394 static void dump_new_thread_request( const struct new_thread_request *req )
1396 fprintf( stderr, " process=%04x", req->process );
1397 fprintf( stderr, ", access=%08x", req->access );
1398 fprintf( stderr, ", flags=%08x", req->flags );
1399 fprintf( stderr, ", request_fd=%d", req->request_fd );
1400 dump_varargs_object_attributes( ", objattr=", cur_size );
1403 static void dump_new_thread_reply( const struct new_thread_reply *req )
1405 fprintf( stderr, " tid=%04x", req->tid );
1406 fprintf( stderr, ", handle=%04x", req->handle );
1409 static void dump_get_startup_info_request( const struct get_startup_info_request *req )
1413 static void dump_get_startup_info_reply( const struct get_startup_info_reply *req )
1415 fprintf( stderr, " info_size=%u", req->info_size );
1416 dump_varargs_startup_info( ", info=", min(cur_size,req->info_size) );
1417 dump_varargs_unicode_str( ", env=", cur_size );
1420 static void dump_init_process_done_request( const struct init_process_done_request *req )
1422 dump_uint64( " teb=", &req->teb );
1423 dump_uint64( ", peb=", &req->peb );
1424 dump_uint64( ", ldt_copy=", &req->ldt_copy );
1427 static void dump_init_process_done_reply( const struct init_process_done_reply *req )
1429 dump_uint64( " entry=", &req->entry );
1430 fprintf( stderr, ", suspend=%d", req->suspend );
1433 static void dump_init_first_thread_request( const struct init_first_thread_request *req )
1435 fprintf( stderr, " unix_pid=%d", req->unix_pid );
1436 fprintf( stderr, ", unix_tid=%d", req->unix_tid );
1437 fprintf( stderr, ", debug_level=%d", req->debug_level );
1438 fprintf( stderr, ", reply_fd=%d", req->reply_fd );
1439 fprintf( stderr, ", wait_fd=%d", req->wait_fd );
1442 static void dump_init_first_thread_reply( const struct init_first_thread_reply *req )
1444 fprintf( stderr, " pid=%04x", req->pid );
1445 fprintf( stderr, ", tid=%04x", req->tid );
1446 dump_timeout( ", server_start=", &req->server_start );
1447 fprintf( stderr, ", session_id=%08x", req->session_id );
1448 fprintf( stderr, ", info_size=%u", req->info_size );
1449 dump_varargs_ushorts( ", machines=", cur_size );
1452 static void dump_init_thread_request( const struct init_thread_request *req )
1454 fprintf( stderr, " unix_tid=%d", req->unix_tid );
1455 fprintf( stderr, ", reply_fd=%d", req->reply_fd );
1456 fprintf( stderr, ", wait_fd=%d", req->wait_fd );
1457 dump_uint64( ", teb=", &req->teb );
1458 dump_uint64( ", entry=", &req->entry );
1461 static void dump_init_thread_reply( const struct init_thread_reply *req )
1463 fprintf( stderr, " suspend=%d", req->suspend );
1466 static void dump_terminate_process_request( const struct terminate_process_request *req )
1468 fprintf( stderr, " handle=%04x", req->handle );
1469 fprintf( stderr, ", exit_code=%d", req->exit_code );
1472 static void dump_terminate_process_reply( const struct terminate_process_reply *req )
1474 fprintf( stderr, " self=%d", req->self );
1477 static void dump_terminate_thread_request( const struct terminate_thread_request *req )
1479 fprintf( stderr, " handle=%04x", req->handle );
1480 fprintf( stderr, ", exit_code=%d", req->exit_code );
1483 static void dump_terminate_thread_reply( const struct terminate_thread_reply *req )
1485 fprintf( stderr, " self=%d", req->self );
1488 static void dump_get_process_info_request( const struct get_process_info_request *req )
1490 fprintf( stderr, " handle=%04x", req->handle );
1493 static void dump_get_process_info_reply( const struct get_process_info_reply *req )
1495 fprintf( stderr, " pid=%04x", req->pid );
1496 fprintf( stderr, ", ppid=%04x", req->ppid );
1497 dump_uint64( ", affinity=", &req->affinity );
1498 dump_uint64( ", peb=", &req->peb );
1499 dump_timeout( ", start_time=", &req->start_time );
1500 dump_timeout( ", end_time=", &req->end_time );
1501 fprintf( stderr, ", session_id=%08x", req->session_id );
1502 fprintf( stderr, ", exit_code=%d", req->exit_code );
1503 fprintf( stderr, ", priority=%d", req->priority );
1504 fprintf( stderr, ", machine=%04x", req->machine );
1505 dump_varargs_pe_image_info( ", image=", cur_size );
1508 static void dump_get_process_debug_info_request( const struct get_process_debug_info_request *req )
1510 fprintf( stderr, " handle=%04x", req->handle );
1513 static void dump_get_process_debug_info_reply( const struct get_process_debug_info_reply *req )
1515 fprintf( stderr, " debug=%04x", req->debug );
1516 fprintf( stderr, ", debug_children=%d", req->debug_children );
1517 dump_varargs_pe_image_info( ", image=", cur_size );
1520 static void dump_get_process_image_name_request( const struct get_process_image_name_request *req )
1522 fprintf( stderr, " handle=%04x", req->handle );
1523 fprintf( stderr, ", win32=%d", req->win32 );
1526 static void dump_get_process_image_name_reply( const struct get_process_image_name_reply *req )
1528 fprintf( stderr, " len=%u", req->len );
1529 dump_varargs_unicode_str( ", name=", cur_size );
1532 static void dump_get_process_vm_counters_request( const struct get_process_vm_counters_request *req )
1534 fprintf( stderr, " handle=%04x", req->handle );
1537 static void dump_get_process_vm_counters_reply( const struct get_process_vm_counters_reply *req )
1539 dump_uint64( " peak_virtual_size=", &req->peak_virtual_size );
1540 dump_uint64( ", virtual_size=", &req->virtual_size );
1541 dump_uint64( ", peak_working_set_size=", &req->peak_working_set_size );
1542 dump_uint64( ", working_set_size=", &req->working_set_size );
1543 dump_uint64( ", pagefile_usage=", &req->pagefile_usage );
1544 dump_uint64( ", peak_pagefile_usage=", &req->peak_pagefile_usage );
1547 static void dump_set_process_info_request( const struct set_process_info_request *req )
1549 fprintf( stderr, " handle=%04x", req->handle );
1550 fprintf( stderr, ", mask=%d", req->mask );
1551 fprintf( stderr, ", priority=%d", req->priority );
1552 dump_uint64( ", affinity=", &req->affinity );
1555 static void dump_get_thread_info_request( const struct get_thread_info_request *req )
1557 fprintf( stderr, " handle=%04x", req->handle );
1558 fprintf( stderr, ", access=%08x", req->access );
1561 static void dump_get_thread_info_reply( const struct get_thread_info_reply *req )
1563 fprintf( stderr, " pid=%04x", req->pid );
1564 fprintf( stderr, ", tid=%04x", req->tid );
1565 dump_uint64( ", teb=", &req->teb );
1566 dump_uint64( ", entry_point=", &req->entry_point );
1567 dump_uint64( ", affinity=", &req->affinity );
1568 fprintf( stderr, ", exit_code=%d", req->exit_code );
1569 fprintf( stderr, ", priority=%d", req->priority );
1570 fprintf( stderr, ", last=%d", req->last );
1571 fprintf( stderr, ", suspend_count=%d", req->suspend_count );
1572 fprintf( stderr, ", dbg_hidden=%d", req->dbg_hidden );
1573 fprintf( stderr, ", desc_len=%u", req->desc_len );
1574 dump_varargs_unicode_str( ", desc=", cur_size );
1577 static void dump_get_thread_times_request( const struct get_thread_times_request *req )
1579 fprintf( stderr, " handle=%04x", req->handle );
1582 static void dump_get_thread_times_reply( const struct get_thread_times_reply *req )
1584 dump_timeout( " creation_time=", &req->creation_time );
1585 dump_timeout( ", exit_time=", &req->exit_time );
1586 fprintf( stderr, ", unix_pid=%d", req->unix_pid );
1587 fprintf( stderr, ", unix_tid=%d", req->unix_tid );
1590 static void dump_set_thread_info_request( const struct set_thread_info_request *req )
1592 fprintf( stderr, " handle=%04x", req->handle );
1593 fprintf( stderr, ", mask=%d", req->mask );
1594 fprintf( stderr, ", priority=%d", req->priority );
1595 dump_uint64( ", affinity=", &req->affinity );
1596 dump_uint64( ", entry_point=", &req->entry_point );
1597 fprintf( stderr, ", token=%04x", req->token );
1598 dump_varargs_unicode_str( ", desc=", cur_size );
1601 static void dump_suspend_thread_request( const struct suspend_thread_request *req )
1603 fprintf( stderr, " handle=%04x", req->handle );
1606 static void dump_suspend_thread_reply( const struct suspend_thread_reply *req )
1608 fprintf( stderr, " count=%d", req->count );
1611 static void dump_resume_thread_request( const struct resume_thread_request *req )
1613 fprintf( stderr, " handle=%04x", req->handle );
1616 static void dump_resume_thread_reply( const struct resume_thread_reply *req )
1618 fprintf( stderr, " count=%d", req->count );
1621 static void dump_queue_apc_request( const struct queue_apc_request *req )
1623 fprintf( stderr, " handle=%04x", req->handle );
1624 dump_apc_call( ", call=", &req->call );
1627 static void dump_queue_apc_reply( const struct queue_apc_reply *req )
1629 fprintf( stderr, " handle=%04x", req->handle );
1630 fprintf( stderr, ", self=%d", req->self );
1633 static void dump_get_apc_result_request( const struct get_apc_result_request *req )
1635 fprintf( stderr, " handle=%04x", req->handle );
1638 static void dump_get_apc_result_reply( const struct get_apc_result_reply *req )
1640 dump_apc_result( " result=", &req->result );
1643 static void dump_close_handle_request( const struct close_handle_request *req )
1645 fprintf( stderr, " handle=%04x", req->handle );
1648 static void dump_set_handle_info_request( const struct set_handle_info_request *req )
1650 fprintf( stderr, " handle=%04x", req->handle );
1651 fprintf( stderr, ", flags=%d", req->flags );
1652 fprintf( stderr, ", mask=%d", req->mask );
1655 static void dump_set_handle_info_reply( const struct set_handle_info_reply *req )
1657 fprintf( stderr, " old_flags=%d", req->old_flags );
1660 static void dump_dup_handle_request( const struct dup_handle_request *req )
1662 fprintf( stderr, " src_process=%04x", req->src_process );
1663 fprintf( stderr, ", src_handle=%04x", req->src_handle );
1664 fprintf( stderr, ", dst_process=%04x", req->dst_process );
1665 fprintf( stderr, ", access=%08x", req->access );
1666 fprintf( stderr, ", attributes=%08x", req->attributes );
1667 fprintf( stderr, ", options=%08x", req->options );
1670 static void dump_dup_handle_reply( const struct dup_handle_reply *req )
1672 fprintf( stderr, " handle=%04x", req->handle );
1675 static void dump_compare_objects_request( const struct compare_objects_request *req )
1677 fprintf( stderr, " first=%04x", req->first );
1678 fprintf( stderr, ", second=%04x", req->second );
1681 static void dump_make_temporary_request( const struct make_temporary_request *req )
1683 fprintf( stderr, " handle=%04x", req->handle );
1686 static void dump_open_process_request( const struct open_process_request *req )
1688 fprintf( stderr, " pid=%04x", req->pid );
1689 fprintf( stderr, ", access=%08x", req->access );
1690 fprintf( stderr, ", attributes=%08x", req->attributes );
1693 static void dump_open_process_reply( const struct open_process_reply *req )
1695 fprintf( stderr, " handle=%04x", req->handle );
1698 static void dump_open_thread_request( const struct open_thread_request *req )
1700 fprintf( stderr, " tid=%04x", req->tid );
1701 fprintf( stderr, ", access=%08x", req->access );
1702 fprintf( stderr, ", attributes=%08x", req->attributes );
1705 static void dump_open_thread_reply( const struct open_thread_reply *req )
1707 fprintf( stderr, " handle=%04x", req->handle );
1710 static void dump_select_request( const struct select_request *req )
1712 fprintf( stderr, " flags=%d", req->flags );
1713 dump_uint64( ", cookie=", &req->cookie );
1714 dump_abstime( ", timeout=", &req->timeout );
1715 fprintf( stderr, ", size=%u", req->size );
1716 fprintf( stderr, ", prev_apc=%04x", req->prev_apc );
1717 dump_varargs_apc_result( ", result=", cur_size );
1718 dump_varargs_select_op( ", data=", min(cur_size,req->size) );
1719 dump_varargs_contexts( ", contexts=", cur_size );
1722 static void dump_select_reply( const struct select_reply *req )
1724 dump_apc_call( " call=", &req->call );
1725 fprintf( stderr, ", apc_handle=%04x", req->apc_handle );
1726 fprintf( stderr, ", signaled=%d", req->signaled );
1727 dump_varargs_contexts( ", contexts=", cur_size );
1730 static void dump_create_event_request( const struct create_event_request *req )
1732 fprintf( stderr, " access=%08x", req->access );
1733 fprintf( stderr, ", manual_reset=%d", req->manual_reset );
1734 fprintf( stderr, ", initial_state=%d", req->initial_state );
1735 dump_varargs_object_attributes( ", objattr=", cur_size );
1738 static void dump_create_event_reply( const struct create_event_reply *req )
1740 fprintf( stderr, " handle=%04x", req->handle );
1743 static void dump_event_op_request( const struct event_op_request *req )
1745 fprintf( stderr, " handle=%04x", req->handle );
1746 fprintf( stderr, ", op=%d", req->op );
1749 static void dump_event_op_reply( const struct event_op_reply *req )
1751 fprintf( stderr, " state=%d", req->state );
1754 static void dump_query_event_request( const struct query_event_request *req )
1756 fprintf( stderr, " handle=%04x", req->handle );
1759 static void dump_query_event_reply( const struct query_event_reply *req )
1761 fprintf( stderr, " manual_reset=%d", req->manual_reset );
1762 fprintf( stderr, ", state=%d", req->state );
1765 static void dump_open_event_request( const struct open_event_request *req )
1767 fprintf( stderr, " access=%08x", req->access );
1768 fprintf( stderr, ", attributes=%08x", req->attributes );
1769 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1770 dump_varargs_unicode_str( ", name=", cur_size );
1773 static void dump_open_event_reply( const struct open_event_reply *req )
1775 fprintf( stderr, " handle=%04x", req->handle );
1778 static void dump_create_keyed_event_request( const struct create_keyed_event_request *req )
1780 fprintf( stderr, " access=%08x", req->access );
1781 dump_varargs_object_attributes( ", objattr=", cur_size );
1784 static void dump_create_keyed_event_reply( const struct create_keyed_event_reply *req )
1786 fprintf( stderr, " handle=%04x", req->handle );
1789 static void dump_open_keyed_event_request( const struct open_keyed_event_request *req )
1791 fprintf( stderr, " access=%08x", req->access );
1792 fprintf( stderr, ", attributes=%08x", req->attributes );
1793 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1794 dump_varargs_unicode_str( ", name=", cur_size );
1797 static void dump_open_keyed_event_reply( const struct open_keyed_event_reply *req )
1799 fprintf( stderr, " handle=%04x", req->handle );
1802 static void dump_create_mutex_request( const struct create_mutex_request *req )
1804 fprintf( stderr, " access=%08x", req->access );
1805 fprintf( stderr, ", owned=%d", req->owned );
1806 dump_varargs_object_attributes( ", objattr=", cur_size );
1809 static void dump_create_mutex_reply( const struct create_mutex_reply *req )
1811 fprintf( stderr, " handle=%04x", req->handle );
1814 static void dump_release_mutex_request( const struct release_mutex_request *req )
1816 fprintf( stderr, " handle=%04x", req->handle );
1819 static void dump_release_mutex_reply( const struct release_mutex_reply *req )
1821 fprintf( stderr, " prev_count=%08x", req->prev_count );
1824 static void dump_open_mutex_request( const struct open_mutex_request *req )
1826 fprintf( stderr, " access=%08x", req->access );
1827 fprintf( stderr, ", attributes=%08x", req->attributes );
1828 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1829 dump_varargs_unicode_str( ", name=", cur_size );
1832 static void dump_open_mutex_reply( const struct open_mutex_reply *req )
1834 fprintf( stderr, " handle=%04x", req->handle );
1837 static void dump_query_mutex_request( const struct query_mutex_request *req )
1839 fprintf( stderr, " handle=%04x", req->handle );
1842 static void dump_query_mutex_reply( const struct query_mutex_reply *req )
1844 fprintf( stderr, " count=%08x", req->count );
1845 fprintf( stderr, ", owned=%d", req->owned );
1846 fprintf( stderr, ", abandoned=%d", req->abandoned );
1849 static void dump_create_semaphore_request( const struct create_semaphore_request *req )
1851 fprintf( stderr, " access=%08x", req->access );
1852 fprintf( stderr, ", initial=%08x", req->initial );
1853 fprintf( stderr, ", max=%08x", req->max );
1854 dump_varargs_object_attributes( ", objattr=", cur_size );
1857 static void dump_create_semaphore_reply( const struct create_semaphore_reply *req )
1859 fprintf( stderr, " handle=%04x", req->handle );
1862 static void dump_release_semaphore_request( const struct release_semaphore_request *req )
1864 fprintf( stderr, " handle=%04x", req->handle );
1865 fprintf( stderr, ", count=%08x", req->count );
1868 static void dump_release_semaphore_reply( const struct release_semaphore_reply *req )
1870 fprintf( stderr, " prev_count=%08x", req->prev_count );
1873 static void dump_query_semaphore_request( const struct query_semaphore_request *req )
1875 fprintf( stderr, " handle=%04x", req->handle );
1878 static void dump_query_semaphore_reply( const struct query_semaphore_reply *req )
1880 fprintf( stderr, " current=%08x", req->current );
1881 fprintf( stderr, ", max=%08x", req->max );
1884 static void dump_open_semaphore_request( const struct open_semaphore_request *req )
1886 fprintf( stderr, " access=%08x", req->access );
1887 fprintf( stderr, ", attributes=%08x", req->attributes );
1888 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1889 dump_varargs_unicode_str( ", name=", cur_size );
1892 static void dump_open_semaphore_reply( const struct open_semaphore_reply *req )
1894 fprintf( stderr, " handle=%04x", req->handle );
1897 static void dump_create_file_request( const struct create_file_request *req )
1899 fprintf( stderr, " access=%08x", req->access );
1900 fprintf( stderr, ", sharing=%08x", req->sharing );
1901 fprintf( stderr, ", create=%d", req->create );
1902 fprintf( stderr, ", options=%08x", req->options );
1903 fprintf( stderr, ", attrs=%08x", req->attrs );
1904 dump_varargs_object_attributes( ", objattr=", cur_size );
1905 dump_varargs_string( ", filename=", cur_size );
1908 static void dump_create_file_reply( const struct create_file_reply *req )
1910 fprintf( stderr, " handle=%04x", req->handle );
1913 static void dump_open_file_object_request( const struct open_file_object_request *req )
1915 fprintf( stderr, " access=%08x", req->access );
1916 fprintf( stderr, ", attributes=%08x", req->attributes );
1917 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1918 fprintf( stderr, ", sharing=%08x", req->sharing );
1919 fprintf( stderr, ", options=%08x", req->options );
1920 dump_varargs_unicode_str( ", filename=", cur_size );
1923 static void dump_open_file_object_reply( const struct open_file_object_reply *req )
1925 fprintf( stderr, " handle=%04x", req->handle );
1928 static void dump_alloc_file_handle_request( const struct alloc_file_handle_request *req )
1930 fprintf( stderr, " access=%08x", req->access );
1931 fprintf( stderr, ", attributes=%08x", req->attributes );
1932 fprintf( stderr, ", fd=%d", req->fd );
1935 static void dump_alloc_file_handle_reply( const struct alloc_file_handle_reply *req )
1937 fprintf( stderr, " handle=%04x", req->handle );
1940 static void dump_get_handle_unix_name_request( const struct get_handle_unix_name_request *req )
1942 fprintf( stderr, " handle=%04x", req->handle );
1945 static void dump_get_handle_unix_name_reply( const struct get_handle_unix_name_reply *req )
1947 fprintf( stderr, " name_len=%u", req->name_len );
1948 dump_varargs_string( ", name=", cur_size );
1951 static void dump_get_handle_fd_request( const struct get_handle_fd_request *req )
1953 fprintf( stderr, " handle=%04x", req->handle );
1956 static void dump_get_handle_fd_reply( const struct get_handle_fd_reply *req )
1958 fprintf( stderr, " type=%d", req->type );
1959 fprintf( stderr, ", cacheable=%d", req->cacheable );
1960 fprintf( stderr, ", access=%08x", req->access );
1961 fprintf( stderr, ", options=%08x", req->options );
1964 static void dump_get_directory_cache_entry_request( const struct get_directory_cache_entry_request *req )
1966 fprintf( stderr, " handle=%04x", req->handle );
1969 static void dump_get_directory_cache_entry_reply( const struct get_directory_cache_entry_reply *req )
1971 fprintf( stderr, " entry=%d", req->entry );
1972 dump_varargs_ints( ", free=", cur_size );
1975 static void dump_flush_request( const struct flush_request *req )
1977 dump_async_data( " async=", &req->async );
1980 static void dump_flush_reply( const struct flush_reply *req )
1982 fprintf( stderr, " event=%04x", req->event );
1985 static void dump_get_file_info_request( const struct get_file_info_request *req )
1987 fprintf( stderr, " handle=%04x", req->handle );
1988 fprintf( stderr, ", info_class=%08x", req->info_class );
1991 static void dump_get_file_info_reply( const struct get_file_info_reply *req )
1993 dump_varargs_bytes( " data=", cur_size );
1996 static void dump_get_volume_info_request( const struct get_volume_info_request *req )
1998 fprintf( stderr, " handle=%04x", req->handle );
1999 dump_async_data( ", async=", &req->async );
2000 fprintf( stderr, ", info_class=%08x", req->info_class );
2003 static void dump_get_volume_info_reply( const struct get_volume_info_reply *req )
2005 fprintf( stderr, " wait=%04x", req->wait );
2006 dump_varargs_bytes( ", data=", cur_size );
2009 static void dump_lock_file_request( const struct lock_file_request *req )
2011 fprintf( stderr, " handle=%04x", req->handle );
2012 dump_uint64( ", offset=", &req->offset );
2013 dump_uint64( ", count=", &req->count );
2014 fprintf( stderr, ", shared=%d", req->shared );
2015 fprintf( stderr, ", wait=%d", req->wait );
2018 static void dump_lock_file_reply( const struct lock_file_reply *req )
2020 fprintf( stderr, " handle=%04x", req->handle );
2021 fprintf( stderr, ", overlapped=%d", req->overlapped );
2024 static void dump_unlock_file_request( const struct unlock_file_request *req )
2026 fprintf( stderr, " handle=%04x", req->handle );
2027 dump_uint64( ", offset=", &req->offset );
2028 dump_uint64( ", count=", &req->count );
2031 static void dump_recv_socket_request( const struct recv_socket_request *req )
2033 fprintf( stderr, " oob=%d", req->oob );
2034 dump_async_data( ", async=", &req->async );
2035 fprintf( stderr, ", force_async=%d", req->force_async );
2038 static void dump_recv_socket_reply( const struct recv_socket_reply *req )
2040 fprintf( stderr, " wait=%04x", req->wait );
2041 fprintf( stderr, ", options=%08x", req->options );
2042 fprintf( stderr, ", nonblocking=%d", req->nonblocking );
2045 static void dump_send_socket_request( const struct send_socket_request *req )
2047 dump_async_data( " async=", &req->async );
2048 fprintf( stderr, ", force_async=%d", req->force_async );
2051 static void dump_send_socket_reply( const struct send_socket_reply *req )
2053 fprintf( stderr, " wait=%04x", req->wait );
2054 fprintf( stderr, ", options=%08x", req->options );
2055 fprintf( stderr, ", nonblocking=%d", req->nonblocking );
2058 static void dump_get_next_console_request_request( const struct get_next_console_request_request *req )
2060 fprintf( stderr, " handle=%04x", req->handle );
2061 fprintf( stderr, ", signal=%d", req->signal );
2062 fprintf( stderr, ", read=%d", req->read );
2063 fprintf( stderr, ", status=%08x", req->status );
2064 dump_varargs_bytes( ", out_data=", cur_size );
2067 static void dump_get_next_console_request_reply( const struct get_next_console_request_reply *req )
2069 fprintf( stderr, " code=%08x", req->code );
2070 fprintf( stderr, ", output=%08x", req->output );
2071 fprintf( stderr, ", out_size=%u", req->out_size );
2072 dump_varargs_bytes( ", in_data=", cur_size );
2075 static void dump_read_directory_changes_request( const struct read_directory_changes_request *req )
2077 fprintf( stderr, " filter=%08x", req->filter );
2078 fprintf( stderr, ", subtree=%d", req->subtree );
2079 fprintf( stderr, ", want_data=%d", req->want_data );
2080 dump_async_data( ", async=", &req->async );
2083 static void dump_read_change_request( const struct read_change_request *req )
2085 fprintf( stderr, " handle=%04x", req->handle );
2088 static void dump_read_change_reply( const struct read_change_reply *req )
2090 dump_varargs_filesystem_event( " events=", cur_size );
2093 static void dump_create_mapping_request( const struct create_mapping_request *req )
2095 fprintf( stderr, " access=%08x", req->access );
2096 fprintf( stderr, ", flags=%08x", req->flags );
2097 fprintf( stderr, ", file_access=%08x", req->file_access );
2098 dump_uint64( ", size=", &req->size );
2099 fprintf( stderr, ", file_handle=%04x", req->file_handle );
2100 dump_varargs_object_attributes( ", objattr=", cur_size );
2103 static void dump_create_mapping_reply( const struct create_mapping_reply *req )
2105 fprintf( stderr, " handle=%04x", req->handle );
2108 static void dump_open_mapping_request( const struct open_mapping_request *req )
2110 fprintf( stderr, " access=%08x", req->access );
2111 fprintf( stderr, ", attributes=%08x", req->attributes );
2112 fprintf( stderr, ", rootdir=%04x", req->rootdir );
2113 dump_varargs_unicode_str( ", name=", cur_size );
2116 static void dump_open_mapping_reply( const struct open_mapping_reply *req )
2118 fprintf( stderr, " handle=%04x", req->handle );
2121 static void dump_get_mapping_info_request( const struct get_mapping_info_request *req )
2123 fprintf( stderr, " handle=%04x", req->handle );
2124 fprintf( stderr, ", access=%08x", req->access );
2127 static void dump_get_mapping_info_reply( const struct get_mapping_info_reply *req )
2129 dump_uint64( " size=", &req->size );
2130 fprintf( stderr, ", flags=%08x", req->flags );
2131 fprintf( stderr, ", shared_file=%04x", req->shared_file );
2132 fprintf( stderr, ", total=%u", req->total );
2133 dump_varargs_pe_image_info( ", image=", cur_size );
2134 dump_varargs_unicode_str( ", name=", cur_size );
2137 static void dump_map_view_request( const struct map_view_request *req )
2139 fprintf( stderr, " mapping=%04x", req->mapping );
2140 fprintf( stderr, ", access=%08x", req->access );
2141 dump_uint64( ", base=", &req->base );
2142 dump_uint64( ", size=", &req->size );
2143 dump_uint64( ", start=", &req->start );
2144 dump_varargs_pe_image_info( ", image=", cur_size );
2145 dump_varargs_unicode_str( ", name=", cur_size );
2148 static void dump_unmap_view_request( const struct unmap_view_request *req )
2150 dump_uint64( " base=", &req->base );
2153 static void dump_get_mapping_committed_range_request( const struct get_mapping_committed_range_request *req )
2155 dump_uint64( " base=", &req->base );
2156 dump_uint64( ", offset=", &req->offset );
2159 static void dump_get_mapping_committed_range_reply( const struct get_mapping_committed_range_reply *req )
2161 dump_uint64( " size=", &req->size );
2162 fprintf( stderr, ", committed=%d", req->committed );
2165 static void dump_add_mapping_committed_range_request( const struct add_mapping_committed_range_request *req )
2167 dump_uint64( " base=", &req->base );
2168 dump_uint64( ", offset=", &req->offset );
2169 dump_uint64( ", size=", &req->size );
2172 static void dump_is_same_mapping_request( const struct is_same_mapping_request *req )
2174 dump_uint64( " base1=", &req->base1 );
2175 dump_uint64( ", base2=", &req->base2 );
2178 static void dump_get_mapping_filename_request( const struct get_mapping_filename_request *req )
2180 fprintf( stderr, " process=%04x", req->process );
2181 dump_uint64( ", addr=", &req->addr );
2184 static void dump_get_mapping_filename_reply( const struct get_mapping_filename_reply *req )
2186 fprintf( stderr, " len=%u", req->len );
2187 dump_varargs_unicode_str( ", filename=", cur_size );
2190 static void dump_list_processes_request( const struct list_processes_request *req )
2194 static void dump_list_processes_reply( const struct list_processes_reply *req )
2196 fprintf( stderr, " info_size=%u", req->info_size );
2197 fprintf( stderr, ", process_count=%d", req->process_count );
2198 fprintf( stderr, ", total_thread_count=%d", req->total_thread_count );
2199 fprintf( stderr, ", total_name_len=%u", req->total_name_len );
2200 dump_varargs_process_info( ", data=", min(cur_size,req->info_size) );
2203 static void dump_create_debug_obj_request( const struct create_debug_obj_request *req )
2205 fprintf( stderr, " access=%08x", req->access );
2206 fprintf( stderr, ", flags=%08x", req->flags );
2207 dump_varargs_object_attributes( ", objattr=", cur_size );
2210 static void dump_create_debug_obj_reply( const struct create_debug_obj_reply *req )
2212 fprintf( stderr, " handle=%04x", req->handle );
2215 static void dump_wait_debug_event_request( const struct wait_debug_event_request *req )
2217 fprintf( stderr, " debug=%04x", req->debug );
2220 static void dump_wait_debug_event_reply( const struct wait_debug_event_reply *req )
2222 fprintf( stderr, " pid=%04x", req->pid );
2223 fprintf( stderr, ", tid=%04x", req->tid );
2224 dump_varargs_debug_event( ", event=", cur_size );
2227 static void dump_queue_exception_event_request( const struct queue_exception_event_request *req )
2229 fprintf( stderr, " first=%d", req->first );
2230 fprintf( stderr, ", code=%08x", req->code );
2231 fprintf( stderr, ", flags=%08x", req->flags );
2232 dump_uint64( ", record=", &req->record );
2233 dump_uint64( ", address=", &req->address );
2234 fprintf( stderr, ", len=%u", req->len );
2235 dump_varargs_uints64( ", params=", min(cur_size,req->len) );
2238 static void dump_queue_exception_event_reply( const struct queue_exception_event_reply *req )
2240 fprintf( stderr, " handle=%04x", req->handle );
2243 static void dump_get_exception_status_request( const struct get_exception_status_request *req )
2245 fprintf( stderr, " handle=%04x", req->handle );
2248 static void dump_continue_debug_event_request( const struct continue_debug_event_request *req )
2250 fprintf( stderr, " debug=%04x", req->debug );
2251 fprintf( stderr, ", pid=%04x", req->pid );
2252 fprintf( stderr, ", tid=%04x", req->tid );
2253 fprintf( stderr, ", status=%08x", req->status );
2256 static void dump_debug_process_request( const struct debug_process_request *req )
2258 fprintf( stderr, " handle=%04x", req->handle );
2259 fprintf( stderr, ", debug=%04x", req->debug );
2260 fprintf( stderr, ", attach=%d", req->attach );
2263 static void dump_set_debug_obj_info_request( const struct set_debug_obj_info_request *req )
2265 fprintf( stderr, " debug=%04x", req->debug );
2266 fprintf( stderr, ", flags=%08x", req->flags );
2269 static void dump_read_process_memory_request( const struct read_process_memory_request *req )
2271 fprintf( stderr, " handle=%04x", req->handle );
2272 dump_uint64( ", addr=", &req->addr );
2275 static void dump_read_process_memory_reply( const struct read_process_memory_reply *req )
2277 dump_varargs_bytes( " data=", cur_size );
2280 static void dump_write_process_memory_request( const struct write_process_memory_request *req )
2282 fprintf( stderr, " handle=%04x", req->handle );
2283 dump_uint64( ", addr=", &req->addr );
2284 dump_varargs_bytes( ", data=", cur_size );
2287 static void dump_create_key_request( const struct create_key_request *req )
2289 fprintf( stderr, " access=%08x", req->access );
2290 fprintf( stderr, ", options=%08x", req->options );
2291 dump_varargs_object_attributes( ", objattr=", cur_size );
2292 dump_varargs_unicode_str( ", class=", cur_size );
2295 static void dump_create_key_reply( const struct create_key_reply *req )
2297 fprintf( stderr, " hkey=%04x", req->hkey );
2298 fprintf( stderr, ", created=%d", req->created );
2301 static void dump_open_key_request( const struct open_key_request *req )
2303 fprintf( stderr, " parent=%04x", req->parent );
2304 fprintf( stderr, ", access=%08x", req->access );
2305 fprintf( stderr, ", attributes=%08x", req->attributes );
2306 dump_varargs_unicode_str( ", name=", cur_size );
2309 static void dump_open_key_reply( const struct open_key_reply *req )
2311 fprintf( stderr, " hkey=%04x", req->hkey );
2314 static void dump_delete_key_request( const struct delete_key_request *req )
2316 fprintf( stderr, " hkey=%04x", req->hkey );
2319 static void dump_flush_key_request( const struct flush_key_request *req )
2321 fprintf( stderr, " hkey=%04x", req->hkey );
2324 static void dump_enum_key_request( const struct enum_key_request *req )
2326 fprintf( stderr, " hkey=%04x", req->hkey );
2327 fprintf( stderr, ", index=%d", req->index );
2328 fprintf( stderr, ", info_class=%d", req->info_class );
2331 static void dump_enum_key_reply( const struct enum_key_reply *req )
2333 fprintf( stderr, " subkeys=%d", req->subkeys );
2334 fprintf( stderr, ", max_subkey=%d", req->max_subkey );
2335 fprintf( stderr, ", max_class=%d", req->max_class );
2336 fprintf( stderr, ", values=%d", req->values );
2337 fprintf( stderr, ", max_value=%d", req->max_value );
2338 fprintf( stderr, ", max_data=%d", req->max_data );
2339 dump_timeout( ", modif=", &req->modif );
2340 fprintf( stderr, ", total=%u", req->total );
2341 fprintf( stderr, ", namelen=%u", req->namelen );
2342 dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
2343 dump_varargs_unicode_str( ", class=", cur_size );
2346 static void dump_set_key_value_request( const struct set_key_value_request *req )
2348 fprintf( stderr, " hkey=%04x", req->hkey );
2349 fprintf( stderr, ", type=%d", req->type );
2350 fprintf( stderr, ", namelen=%u", req->namelen );
2351 dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
2352 dump_varargs_bytes( ", data=", cur_size );
2355 static void dump_get_key_value_request( const struct get_key_value_request *req )
2357 fprintf( stderr, " hkey=%04x", req->hkey );
2358 dump_varargs_unicode_str( ", name=", cur_size );
2361 static void dump_get_key_value_reply( const struct get_key_value_reply *req )
2363 fprintf( stderr, " type=%d", req->type );
2364 fprintf( stderr, ", total=%u", req->total );
2365 dump_varargs_bytes( ", data=", cur_size );
2368 static void dump_enum_key_value_request( const struct enum_key_value_request *req )
2370 fprintf( stderr, " hkey=%04x", req->hkey );
2371 fprintf( stderr, ", index=%d", req->index );
2372 fprintf( stderr, ", info_class=%d", req->info_class );
2375 static void dump_enum_key_value_reply( const struct enum_key_value_reply *req )
2377 fprintf( stderr, " type=%d", req->type );
2378 fprintf( stderr, ", total=%u", req->total );
2379 fprintf( stderr, ", namelen=%u", req->namelen );
2380 dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
2381 dump_varargs_bytes( ", data=", cur_size );
2384 static void dump_delete_key_value_request( const struct delete_key_value_request *req )
2386 fprintf( stderr, " hkey=%04x", req->hkey );
2387 dump_varargs_unicode_str( ", name=", cur_size );
2390 static void dump_load_registry_request( const struct load_registry_request *req )
2392 fprintf( stderr, " file=%04x", req->file );
2393 dump_varargs_object_attributes( ", objattr=", cur_size );
2396 static void dump_unload_registry_request( const struct unload_registry_request *req )
2398 fprintf( stderr, " parent=%04x", req->parent );
2399 fprintf( stderr, ", attributes=%08x", req->attributes );
2400 dump_varargs_unicode_str( ", name=", cur_size );
2403 static void dump_save_registry_request( const struct save_registry_request *req )
2405 fprintf( stderr, " hkey=%04x", req->hkey );
2406 fprintf( stderr, ", file=%04x", req->file );
2409 static void dump_set_registry_notification_request( const struct set_registry_notification_request *req )
2411 fprintf( stderr, " hkey=%04x", req->hkey );
2412 fprintf( stderr, ", event=%04x", req->event );
2413 fprintf( stderr, ", subtree=%d", req->subtree );
2414 fprintf( stderr, ", filter=%08x", req->filter );
2417 static void dump_create_timer_request( const struct create_timer_request *req )
2419 fprintf( stderr, " access=%08x", req->access );
2420 fprintf( stderr, ", manual=%d", req->manual );
2421 dump_varargs_object_attributes( ", objattr=", cur_size );
2424 static void dump_create_timer_reply( const struct create_timer_reply *req )
2426 fprintf( stderr, " handle=%04x", req->handle );
2429 static void dump_open_timer_request( const struct open_timer_request *req )
2431 fprintf( stderr, " access=%08x", req->access );
2432 fprintf( stderr, ", attributes=%08x", req->attributes );
2433 fprintf( stderr, ", rootdir=%04x", req->rootdir );
2434 dump_varargs_unicode_str( ", name=", cur_size );
2437 static void dump_open_timer_reply( const struct open_timer_reply *req )
2439 fprintf( stderr, " handle=%04x", req->handle );
2442 static void dump_set_timer_request( const struct set_timer_request *req )
2444 fprintf( stderr, " handle=%04x", req->handle );
2445 dump_timeout( ", expire=", &req->expire );
2446 dump_uint64( ", callback=", &req->callback );
2447 dump_uint64( ", arg=", &req->arg );
2448 fprintf( stderr, ", period=%d", req->period );
2451 static void dump_set_timer_reply( const struct set_timer_reply *req )
2453 fprintf( stderr, " signaled=%d", req->signaled );
2456 static void dump_cancel_timer_request( const struct cancel_timer_request *req )
2458 fprintf( stderr, " handle=%04x", req->handle );
2461 static void dump_cancel_timer_reply( const struct cancel_timer_reply *req )
2463 fprintf( stderr, " signaled=%d", req->signaled );
2466 static void dump_get_timer_info_request( const struct get_timer_info_request *req )
2468 fprintf( stderr, " handle=%04x", req->handle );
2471 static void dump_get_timer_info_reply( const struct get_timer_info_reply *req )
2473 dump_timeout( " when=", &req->when );
2474 fprintf( stderr, ", signaled=%d", req->signaled );
2477 static void dump_get_thread_context_request( const struct get_thread_context_request *req )
2479 fprintf( stderr, " handle=%04x", req->handle );
2480 fprintf( stderr, ", context=%04x", req->context );
2481 fprintf( stderr, ", flags=%08x", req->flags );
2482 fprintf( stderr, ", machine=%04x", req->machine );
2485 static void dump_get_thread_context_reply( const struct get_thread_context_reply *req )
2487 fprintf( stderr, " self=%d", req->self );
2488 fprintf( stderr, ", handle=%04x", req->handle );
2489 dump_varargs_contexts( ", contexts=", cur_size );
2492 static void dump_set_thread_context_request( const struct set_thread_context_request *req )
2494 fprintf( stderr, " handle=%04x", req->handle );
2495 dump_varargs_contexts( ", contexts=", cur_size );
2498 static void dump_set_thread_context_reply( const struct set_thread_context_reply *req )
2500 fprintf( stderr, " self=%d", req->self );
2503 static void dump_get_selector_entry_request( const struct get_selector_entry_request *req )
2505 fprintf( stderr, " handle=%04x", req->handle );
2506 fprintf( stderr, ", entry=%d", req->entry );
2509 static void dump_get_selector_entry_reply( const struct get_selector_entry_reply *req )
2511 fprintf( stderr, " base=%08x", req->base );
2512 fprintf( stderr, ", limit=%08x", req->limit );
2513 fprintf( stderr, ", flags=%02x", req->flags );
2516 static void dump_add_atom_request( const struct add_atom_request *req )
2518 dump_varargs_unicode_str( " name=", cur_size );
2521 static void dump_add_atom_reply( const struct add_atom_reply *req )
2523 fprintf( stderr, " atom=%04x", req->atom );
2526 static void dump_delete_atom_request( const struct delete_atom_request *req )
2528 fprintf( stderr, " atom=%04x", req->atom );
2531 static void dump_find_atom_request( const struct find_atom_request *req )
2533 dump_varargs_unicode_str( " name=", cur_size );
2536 static void dump_find_atom_reply( const struct find_atom_reply *req )
2538 fprintf( stderr, " atom=%04x", req->atom );
2541 static void dump_get_atom_information_request( const struct get_atom_information_request *req )
2543 fprintf( stderr, " atom=%04x", req->atom );
2546 static void dump_get_atom_information_reply( const struct get_atom_information_reply *req )
2548 fprintf( stderr, " count=%d", req->count );
2549 fprintf( stderr, ", pinned=%d", req->pinned );
2550 fprintf( stderr, ", total=%u", req->total );
2551 dump_varargs_unicode_str( ", name=", cur_size );
2554 static void dump_get_msg_queue_request( const struct get_msg_queue_request *req )
2558 static void dump_get_msg_queue_reply( const struct get_msg_queue_reply *req )
2560 fprintf( stderr, " handle=%04x", req->handle );
2563 static void dump_set_queue_fd_request( const struct set_queue_fd_request *req )
2565 fprintf( stderr, " handle=%04x", req->handle );
2568 static void dump_set_queue_mask_request( const struct set_queue_mask_request *req )
2570 fprintf( stderr, " wake_mask=%08x", req->wake_mask );
2571 fprintf( stderr, ", changed_mask=%08x", req->changed_mask );
2572 fprintf( stderr, ", skip_wait=%d", req->skip_wait );
2575 static void dump_set_queue_mask_reply( const struct set_queue_mask_reply *req )
2577 fprintf( stderr, " wake_bits=%08x", req->wake_bits );
2578 fprintf( stderr, ", changed_bits=%08x", req->changed_bits );
2581 static void dump_get_queue_status_request( const struct get_queue_status_request *req )
2583 fprintf( stderr, " clear_bits=%08x", req->clear_bits );
2586 static void dump_get_queue_status_reply( const struct get_queue_status_reply *req )
2588 fprintf( stderr, " wake_bits=%08x", req->wake_bits );
2589 fprintf( stderr, ", changed_bits=%08x", req->changed_bits );
2592 static void dump_get_process_idle_event_request( const struct get_process_idle_event_request *req )
2594 fprintf( stderr, " handle=%04x", req->handle );
2597 static void dump_get_process_idle_event_reply( const struct get_process_idle_event_reply *req )
2599 fprintf( stderr, " event=%04x", req->event );
2602 static void dump_send_message_request( const struct send_message_request *req )
2604 fprintf( stderr, " id=%04x", req->id );
2605 fprintf( stderr, ", type=%d", req->type );
2606 fprintf( stderr, ", flags=%d", req->flags );
2607 fprintf( stderr, ", win=%08x", req->win );
2608 fprintf( stderr, ", msg=%08x", req->msg );
2609 dump_uint64( ", wparam=", &req->wparam );
2610 dump_uint64( ", lparam=", &req->lparam );
2611 dump_timeout( ", timeout=", &req->timeout );
2612 dump_varargs_message_data( ", data=", cur_size );
2615 static void dump_post_quit_message_request( const struct post_quit_message_request *req )
2617 fprintf( stderr, " exit_code=%d", req->exit_code );
2620 static void dump_send_hardware_message_request( const struct send_hardware_message_request *req )
2622 fprintf( stderr, " win=%08x", req->win );
2623 dump_hw_input( ", input=", &req->input );
2624 fprintf( stderr, ", flags=%08x", req->flags );
2625 dump_varargs_bytes( ", report=", cur_size );
2628 static void dump_send_hardware_message_reply( const struct send_hardware_message_reply *req )
2630 fprintf( stderr, " wait=%d", req->wait );
2631 fprintf( stderr, ", prev_x=%d", req->prev_x );
2632 fprintf( stderr, ", prev_y=%d", req->prev_y );
2633 fprintf( stderr, ", new_x=%d", req->new_x );
2634 fprintf( stderr, ", new_y=%d", req->new_y );
2635 dump_varargs_bytes( ", keystate=", cur_size );
2638 static void dump_get_message_request( const struct get_message_request *req )
2640 fprintf( stderr, " flags=%08x", req->flags );
2641 fprintf( stderr, ", get_win=%08x", req->get_win );
2642 fprintf( stderr, ", get_first=%08x", req->get_first );
2643 fprintf( stderr, ", get_last=%08x", req->get_last );
2644 fprintf( stderr, ", hw_id=%08x", req->hw_id );
2645 fprintf( stderr, ", wake_mask=%08x", req->wake_mask );
2646 fprintf( stderr, ", changed_mask=%08x", req->changed_mask );
2649 static void dump_get_message_reply( const struct get_message_reply *req )
2651 fprintf( stderr, " win=%08x", req->win );
2652 fprintf( stderr, ", msg=%08x", req->msg );
2653 dump_uint64( ", wparam=", &req->wparam );
2654 dump_uint64( ", lparam=", &req->lparam );
2655 fprintf( stderr, ", type=%d", req->type );
2656 fprintf( stderr, ", x=%d", req->x );
2657 fprintf( stderr, ", y=%d", req->y );
2658 fprintf( stderr, ", time=%08x", req->time );
2659 fprintf( stderr, ", active_hooks=%08x", req->active_hooks );
2660 fprintf( stderr, ", total=%u", req->total );
2661 dump_varargs_message_data( ", data=", cur_size );
2664 static void dump_reply_message_request( const struct reply_message_request *req )
2666 fprintf( stderr, " remove=%d", req->remove );
2667 dump_uint64( ", result=", &req->result );
2668 dump_varargs_bytes( ", data=", cur_size );
2671 static void dump_accept_hardware_message_request( const struct accept_hardware_message_request *req )
2673 fprintf( stderr, " hw_id=%08x", req->hw_id );
2676 static void dump_get_message_reply_request( const struct get_message_reply_request *req )
2678 fprintf( stderr, " cancel=%d", req->cancel );
2681 static void dump_get_message_reply_reply( const struct get_message_reply_reply *req )
2683 dump_uint64( " result=", &req->result );
2684 dump_varargs_bytes( ", data=", cur_size );
2687 static void dump_set_win_timer_request( const struct set_win_timer_request *req )
2689 fprintf( stderr, " win=%08x", req->win );
2690 fprintf( stderr, ", msg=%08x", req->msg );
2691 fprintf( stderr, ", rate=%08x", req->rate );
2692 dump_uint64( ", id=", &req->id );
2693 dump_uint64( ", lparam=", &req->lparam );
2696 static void dump_set_win_timer_reply( const struct set_win_timer_reply *req )
2698 dump_uint64( " id=", &req->id );
2701 static void dump_kill_win_timer_request( const struct kill_win_timer_request *req )
2703 fprintf( stderr, " win=%08x", req->win );
2704 dump_uint64( ", id=", &req->id );
2705 fprintf( stderr, ", msg=%08x", req->msg );
2708 static void dump_is_window_hung_request( const struct is_window_hung_request *req )
2710 fprintf( stderr, " win=%08x", req->win );
2713 static void dump_is_window_hung_reply( const struct is_window_hung_reply *req )
2715 fprintf( stderr, " is_hung=%d", req->is_hung );
2718 static void dump_get_serial_info_request( const struct get_serial_info_request *req )
2720 fprintf( stderr, " handle=%04x", req->handle );
2721 fprintf( stderr, ", flags=%d", req->flags );
2724 static void dump_get_serial_info_reply( const struct get_serial_info_reply *req )
2726 fprintf( stderr, " eventmask=%08x", req->eventmask );
2727 fprintf( stderr, ", cookie=%08x", req->cookie );
2728 fprintf( stderr, ", pending_write=%08x", req->pending_write );
2731 static void dump_set_serial_info_request( const struct set_serial_info_request *req )
2733 fprintf( stderr, " handle=%04x", req->handle );
2734 fprintf( stderr, ", flags=%d", req->flags );
2737 static void dump_register_async_request( const struct register_async_request *req )
2739 fprintf( stderr, " type=%d", req->type );
2740 dump_async_data( ", async=", &req->async );
2741 fprintf( stderr, ", count=%d", req->count );
2744 static void dump_cancel_async_request( const struct cancel_async_request *req )
2746 fprintf( stderr, " handle=%04x", req->handle );
2747 dump_uint64( ", iosb=", &req->iosb );
2748 fprintf( stderr, ", only_thread=%d", req->only_thread );
2751 static void dump_get_async_result_request( const struct get_async_result_request *req )
2753 dump_uint64( " user_arg=", &req->user_arg );
2756 static void dump_get_async_result_reply( const struct get_async_result_reply *req )
2758 dump_varargs_bytes( " out_data=", cur_size );
2761 static void dump_set_async_direct_result_request( const struct set_async_direct_result_request *req )
2763 fprintf( stderr, " handle=%04x", req->handle );
2764 dump_uint64( ", information=", &req->information );
2765 fprintf( stderr, ", status=%08x", req->status );
2766 fprintf( stderr, ", mark_pending=%d", req->mark_pending );
2769 static void dump_set_async_direct_result_reply( const struct set_async_direct_result_reply *req )
2771 fprintf( stderr, " handle=%04x", req->handle );
2774 static void dump_read_request( const struct read_request *req )
2776 dump_async_data( " async=", &req->async );
2777 dump_uint64( ", pos=", &req->pos );
2780 static void dump_read_reply( const struct read_reply *req )
2782 fprintf( stderr, " wait=%04x", req->wait );
2783 fprintf( stderr, ", options=%08x", req->options );
2784 dump_varargs_bytes( ", data=", cur_size );
2787 static void dump_write_request( const struct write_request *req )
2789 dump_async_data( " async=", &req->async );
2790 dump_uint64( ", pos=", &req->pos );
2791 dump_varargs_bytes( ", data=", cur_size );
2794 static void dump_write_reply( const struct write_reply *req )
2796 fprintf( stderr, " wait=%04x", req->wait );
2797 fprintf( stderr, ", options=%08x", req->options );
2798 fprintf( stderr, ", size=%u", req->size );
2801 static void dump_ioctl_request( const struct ioctl_request *req )
2803 dump_ioctl_code( " code=", &req->code );
2804 dump_async_data( ", async=", &req->async );
2805 dump_varargs_bytes( ", in_data=", cur_size );
2808 static void dump_ioctl_reply( const struct ioctl_reply *req )
2810 fprintf( stderr, " wait=%04x", req->wait );
2811 fprintf( stderr, ", options=%08x", req->options );
2812 dump_varargs_bytes( ", out_data=", cur_size );
2815 static void dump_set_irp_result_request( const struct set_irp_result_request *req )
2817 fprintf( stderr, " handle=%04x", req->handle );
2818 fprintf( stderr, ", status=%08x", req->status );
2819 fprintf( stderr, ", size=%u", req->size );
2820 dump_varargs_bytes( ", data=", cur_size );
2823 static void dump_create_named_pipe_request( const struct create_named_pipe_request *req )
2825 fprintf( stderr, " access=%08x", req->access );
2826 fprintf( stderr, ", options=%08x", req->options );
2827 fprintf( stderr, ", sharing=%08x", req->sharing );
2828 fprintf( stderr, ", maxinstances=%08x", req->maxinstances );
2829 fprintf( stderr, ", outsize=%08x", req->outsize );
2830 fprintf( stderr, ", insize=%08x", req->insize );
2831 dump_timeout( ", timeout=", &req->timeout );
2832 fprintf( stderr, ", flags=%08x", req->flags );
2833 dump_varargs_object_attributes( ", objattr=", cur_size );
2836 static void dump_create_named_pipe_reply( const struct create_named_pipe_reply *req )
2838 fprintf( stderr, " handle=%04x", req->handle );
2841 static void dump_set_named_pipe_info_request( const struct set_named_pipe_info_request *req )
2843 fprintf( stderr, " handle=%04x", req->handle );
2844 fprintf( stderr, ", flags=%08x", req->flags );
2847 static void dump_create_window_request( const struct create_window_request *req )
2849 fprintf( stderr, " parent=%08x", req->parent );
2850 fprintf( stderr, ", owner=%08x", req->owner );
2851 fprintf( stderr, ", atom=%04x", req->atom );
2852 dump_uint64( ", instance=", &req->instance );
2853 fprintf( stderr, ", dpi=%d", req->dpi );
2854 fprintf( stderr, ", awareness=%d", req->awareness );
2855 fprintf( stderr, ", style=%08x", req->style );
2856 fprintf( stderr, ", ex_style=%08x", req->ex_style );
2857 dump_varargs_unicode_str( ", class=", cur_size );
2860 static void dump_create_window_reply( const struct create_window_reply *req )
2862 fprintf( stderr, " handle=%08x", req->handle );
2863 fprintf( stderr, ", parent=%08x", req->parent );
2864 fprintf( stderr, ", owner=%08x", req->owner );
2865 fprintf( stderr, ", extra=%d", req->extra );
2866 dump_uint64( ", class_ptr=", &req->class_ptr );
2867 fprintf( stderr, ", dpi=%d", req->dpi );
2868 fprintf( stderr, ", awareness=%d", req->awareness );
2871 static void dump_destroy_window_request( const struct destroy_window_request *req )
2873 fprintf( stderr, " handle=%08x", req->handle );
2876 static void dump_get_desktop_window_request( const struct get_desktop_window_request *req )
2878 fprintf( stderr, " force=%d", req->force );
2881 static void dump_get_desktop_window_reply( const struct get_desktop_window_reply *req )
2883 fprintf( stderr, " top_window=%08x", req->top_window );
2884 fprintf( stderr, ", msg_window=%08x", req->msg_window );
2887 static void dump_set_window_owner_request( const struct set_window_owner_request *req )
2889 fprintf( stderr, " handle=%08x", req->handle );
2890 fprintf( stderr, ", owner=%08x", req->owner );
2893 static void dump_set_window_owner_reply( const struct set_window_owner_reply *req )
2895 fprintf( stderr, " full_owner=%08x", req->full_owner );
2896 fprintf( stderr, ", prev_owner=%08x", req->prev_owner );
2899 static void dump_get_window_info_request( const struct get_window_info_request *req )
2901 fprintf( stderr, " handle=%08x", req->handle );
2904 static void dump_get_window_info_reply( const struct get_window_info_reply *req )
2906 fprintf( stderr, " full_handle=%08x", req->full_handle );
2907 fprintf( stderr, ", last_active=%08x", req->last_active );
2908 fprintf( stderr, ", pid=%04x", req->pid );
2909 fprintf( stderr, ", tid=%04x", req->tid );
2910 fprintf( stderr, ", atom=%04x", req->atom );
2911 fprintf( stderr, ", is_unicode=%d", req->is_unicode );
2912 fprintf( stderr, ", dpi=%d", req->dpi );
2913 fprintf( stderr, ", awareness=%d", req->awareness );
2916 static void dump_set_window_info_request( const struct set_window_info_request *req )
2918 fprintf( stderr, " flags=%04x", req->flags );
2919 fprintf( stderr, ", is_unicode=%d", req->is_unicode );
2920 fprintf( stderr, ", handle=%08x", req->handle );
2921 fprintf( stderr, ", style=%08x", req->style );
2922 fprintf( stderr, ", ex_style=%08x", req->ex_style );
2923 fprintf( stderr, ", extra_size=%u", req->extra_size );
2924 dump_uint64( ", instance=", &req->instance );
2925 dump_uint64( ", user_data=", &req->user_data );
2926 dump_uint64( ", extra_value=", &req->extra_value );
2927 fprintf( stderr, ", extra_offset=%d", req->extra_offset );
2930 static void dump_set_window_info_reply( const struct set_window_info_reply *req )
2932 fprintf( stderr, " old_style=%08x", req->old_style );
2933 fprintf( stderr, ", old_ex_style=%08x", req->old_ex_style );
2934 dump_uint64( ", old_instance=", &req->old_instance );
2935 dump_uint64( ", old_user_data=", &req->old_user_data );
2936 dump_uint64( ", old_extra_value=", &req->old_extra_value );
2937 dump_uint64( ", old_id=", &req->old_id );
2940 static void dump_set_parent_request( const struct set_parent_request *req )
2942 fprintf( stderr, " handle=%08x", req->handle );
2943 fprintf( stderr, ", parent=%08x", req->parent );
2946 static void dump_set_parent_reply( const struct set_parent_reply *req )
2948 fprintf( stderr, " old_parent=%08x", req->old_parent );
2949 fprintf( stderr, ", full_parent=%08x", req->full_parent );
2950 fprintf( stderr, ", dpi=%d", req->dpi );
2951 fprintf( stderr, ", awareness=%d", req->awareness );
2954 static void dump_get_window_parents_request( const struct get_window_parents_request *req )
2956 fprintf( stderr, " handle=%08x", req->handle );
2959 static void dump_get_window_parents_reply( const struct get_window_parents_reply *req )
2961 fprintf( stderr, " count=%d", req->count );
2962 dump_varargs_user_handles( ", parents=", cur_size );
2965 static void dump_get_window_children_request( const struct get_window_children_request *req )
2967 fprintf( stderr, " desktop=%04x", req->desktop );
2968 fprintf( stderr, ", parent=%08x", req->parent );
2969 fprintf( stderr, ", atom=%04x", req->atom );
2970 fprintf( stderr, ", tid=%04x", req->tid );
2971 dump_varargs_unicode_str( ", class=", cur_size );
2974 static void dump_get_window_children_reply( const struct get_window_children_reply *req )
2976 fprintf( stderr, " count=%d", req->count );
2977 dump_varargs_user_handles( ", children=", cur_size );
2980 static void dump_get_window_children_from_point_request( const struct get_window_children_from_point_request *req )
2982 fprintf( stderr, " parent=%08x", req->parent );
2983 fprintf( stderr, ", x=%d", req->x );
2984 fprintf( stderr, ", y=%d", req->y );
2985 fprintf( stderr, ", dpi=%d", req->dpi );
2988 static void dump_get_window_children_from_point_reply( const struct get_window_children_from_point_reply *req )
2990 fprintf( stderr, " count=%d", req->count );
2991 dump_varargs_user_handles( ", children=", cur_size );
2994 static void dump_get_window_tree_request( const struct get_window_tree_request *req )
2996 fprintf( stderr, " handle=%08x", req->handle );
2999 static void dump_get_window_tree_reply( const struct get_window_tree_reply *req )
3001 fprintf( stderr, " parent=%08x", req->parent );
3002 fprintf( stderr, ", owner=%08x", req->owner );
3003 fprintf( stderr, ", next_sibling=%08x", req->next_sibling );
3004 fprintf( stderr, ", prev_sibling=%08x", req->prev_sibling );
3005 fprintf( stderr, ", first_sibling=%08x", req->first_sibling );
3006 fprintf( stderr, ", last_sibling=%08x", req->last_sibling );
3007 fprintf( stderr, ", first_child=%08x", req->first_child );
3008 fprintf( stderr, ", last_child=%08x", req->last_child );
3011 static void dump_set_window_pos_request( const struct set_window_pos_request *req )
3013 fprintf( stderr, " swp_flags=%04x", req->swp_flags );
3014 fprintf( stderr, ", paint_flags=%04x", req->paint_flags );
3015 fprintf( stderr, ", handle=%08x", req->handle );
3016 fprintf( stderr, ", previous=%08x", req->previous );
3017 dump_rectangle( ", window=", &req->window );
3018 dump_rectangle( ", client=", &req->client );
3019 dump_varargs_rectangles( ", valid=", cur_size );
3022 static void dump_set_window_pos_reply( const struct set_window_pos_reply *req )
3024 fprintf( stderr, " new_style=%08x", req->new_style );
3025 fprintf( stderr, ", new_ex_style=%08x", req->new_ex_style );
3026 fprintf( stderr, ", surface_win=%08x", req->surface_win );
3027 fprintf( stderr, ", needs_update=%d", req->needs_update );
3030 static void dump_get_window_rectangles_request( const struct get_window_rectangles_request *req )
3032 fprintf( stderr, " handle=%08x", req->handle );
3033 fprintf( stderr, ", relative=%d", req->relative );
3034 fprintf( stderr, ", dpi=%d", req->dpi );
3037 static void dump_get_window_rectangles_reply( const struct get_window_rectangles_reply *req )
3039 dump_rectangle( " window=", &req->window );
3040 dump_rectangle( ", client=", &req->client );
3043 static void dump_get_window_text_request( const struct get_window_text_request *req )
3045 fprintf( stderr, " handle=%08x", req->handle );
3048 static void dump_get_window_text_reply( const struct get_window_text_reply *req )
3050 fprintf( stderr, " length=%u", req->length );
3051 dump_varargs_unicode_str( ", text=", cur_size );
3054 static void dump_set_window_text_request( const struct set_window_text_request *req )
3056 fprintf( stderr, " handle=%08x", req->handle );
3057 dump_varargs_unicode_str( ", text=", cur_size );
3060 static void dump_get_windows_offset_request( const struct get_windows_offset_request *req )
3062 fprintf( stderr, " from=%08x", req->from );
3063 fprintf( stderr, ", to=%08x", req->to );
3064 fprintf( stderr, ", dpi=%d", req->dpi );
3067 static void dump_get_windows_offset_reply( const struct get_windows_offset_reply *req )
3069 fprintf( stderr, " x=%d", req->x );
3070 fprintf( stderr, ", y=%d", req->y );
3071 fprintf( stderr, ", mirror=%d", req->mirror );
3074 static void dump_get_visible_region_request( const struct get_visible_region_request *req )
3076 fprintf( stderr, " window=%08x", req->window );
3077 fprintf( stderr, ", flags=%08x", req->flags );
3080 static void dump_get_visible_region_reply( const struct get_visible_region_reply *req )
3082 fprintf( stderr, " top_win=%08x", req->top_win );
3083 dump_rectangle( ", top_rect=", &req->top_rect );
3084 dump_rectangle( ", win_rect=", &req->win_rect );
3085 fprintf( stderr, ", paint_flags=%08x", req->paint_flags );
3086 fprintf( stderr, ", total_size=%u", req->total_size );
3087 dump_varargs_rectangles( ", region=", cur_size );
3090 static void dump_get_surface_region_request( const struct get_surface_region_request *req )
3092 fprintf( stderr, " window=%08x", req->window );
3095 static void dump_get_surface_region_reply( const struct get_surface_region_reply *req )
3097 dump_rectangle( " visible_rect=", &req->visible_rect );
3098 fprintf( stderr, ", total_size=%u", req->total_size );
3099 dump_varargs_rectangles( ", region=", cur_size );
3102 static void dump_get_window_region_request( const struct get_window_region_request *req )
3104 fprintf( stderr, " window=%08x", req->window );
3107 static void dump_get_window_region_reply( const struct get_window_region_reply *req )
3109 fprintf( stderr, " total_size=%u", req->total_size );
3110 dump_varargs_rectangles( ", region=", cur_size );
3113 static void dump_set_window_region_request( const struct set_window_region_request *req )
3115 fprintf( stderr, " window=%08x", req->window );
3116 fprintf( stderr, ", redraw=%d", req->redraw );
3117 dump_varargs_rectangles( ", region=", cur_size );
3120 static void dump_get_update_region_request( const struct get_update_region_request *req )
3122 fprintf( stderr, " window=%08x", req->window );
3123 fprintf( stderr, ", from_child=%08x", req->from_child );
3124 fprintf( stderr, ", flags=%08x", req->flags );
3127 static void dump_get_update_region_reply( const struct get_update_region_reply *req )
3129 fprintf( stderr, " child=%08x", req->child );
3130 fprintf( stderr, ", flags=%08x", req->flags );
3131 fprintf( stderr, ", total_size=%u", req->total_size );
3132 dump_varargs_rectangles( ", region=", cur_size );
3135 static void dump_update_window_zorder_request( const struct update_window_zorder_request *req )
3137 fprintf( stderr, " window=%08x", req->window );
3138 dump_rectangle( ", rect=", &req->rect );
3141 static void dump_redraw_window_request( const struct redraw_window_request *req )
3143 fprintf( stderr, " window=%08x", req->window );
3144 fprintf( stderr, ", flags=%08x", req->flags );
3145 dump_varargs_rectangles( ", region=", cur_size );
3148 static void dump_set_window_property_request( const struct set_window_property_request *req )
3150 fprintf( stderr, " window=%08x", req->window );
3151 dump_uint64( ", data=", &req->data );
3152 fprintf( stderr, ", atom=%04x", req->atom );
3153 dump_varargs_unicode_str( ", name=", cur_size );
3156 static void dump_remove_window_property_request( const struct remove_window_property_request *req )
3158 fprintf( stderr, " window=%08x", req->window );
3159 fprintf( stderr, ", atom=%04x", req->atom );
3160 dump_varargs_unicode_str( ", name=", cur_size );
3163 static void dump_remove_window_property_reply( const struct remove_window_property_reply *req )
3165 dump_uint64( " data=", &req->data );
3168 static void dump_get_window_property_request( const struct get_window_property_request *req )
3170 fprintf( stderr, " window=%08x", req->window );
3171 fprintf( stderr, ", atom=%04x", req->atom );
3172 dump_varargs_unicode_str( ", name=", cur_size );
3175 static void dump_get_window_property_reply( const struct get_window_property_reply *req )
3177 dump_uint64( " data=", &req->data );
3180 static void dump_get_window_properties_request( const struct get_window_properties_request *req )
3182 fprintf( stderr, " window=%08x", req->window );
3185 static void dump_get_window_properties_reply( const struct get_window_properties_reply *req )
3187 fprintf( stderr, " total=%d", req->total );
3188 dump_varargs_properties( ", props=", cur_size );
3191 static void dump_create_winstation_request( const struct create_winstation_request *req )
3193 fprintf( stderr, " flags=%08x", req->flags );
3194 fprintf( stderr, ", access=%08x", req->access );
3195 fprintf( stderr, ", attributes=%08x", req->attributes );
3196 fprintf( stderr, ", rootdir=%04x", req->rootdir );
3197 dump_varargs_unicode_str( ", name=", cur_size );
3200 static void dump_create_winstation_reply( const struct create_winstation_reply *req )
3202 fprintf( stderr, " handle=%04x", req->handle );
3205 static void dump_open_winstation_request( const struct open_winstation_request *req )
3207 fprintf( stderr, " access=%08x", req->access );
3208 fprintf( stderr, ", attributes=%08x", req->attributes );
3209 fprintf( stderr, ", rootdir=%04x", req->rootdir );
3210 dump_varargs_unicode_str( ", name=", cur_size );
3213 static void dump_open_winstation_reply( const struct open_winstation_reply *req )
3215 fprintf( stderr, " handle=%04x", req->handle );
3218 static void dump_close_winstation_request( const struct close_winstation_request *req )
3220 fprintf( stderr, " handle=%04x", req->handle );
3223 static void dump_get_process_winstation_request( const struct get_process_winstation_request *req )
3227 static void dump_get_process_winstation_reply( const struct get_process_winstation_reply *req )
3229 fprintf( stderr, " handle=%04x", req->handle );
3232 static void dump_set_process_winstation_request( const struct set_process_winstation_request *req )
3234 fprintf( stderr, " handle=%04x", req->handle );
3237 static void dump_enum_winstation_request( const struct enum_winstation_request *req )
3239 fprintf( stderr, " index=%08x", req->index );
3242 static void dump_enum_winstation_reply( const struct enum_winstation_reply *req )
3244 fprintf( stderr, " next=%08x", req->next );
3245 dump_varargs_unicode_str( ", name=", cur_size );
3248 static void dump_create_desktop_request( const struct create_desktop_request *req )
3250 fprintf( stderr, " flags=%08x", req->flags );
3251 fprintf( stderr, ", access=%08x", req->access );
3252 fprintf( stderr, ", attributes=%08x", req->attributes );
3253 dump_varargs_unicode_str( ", name=", cur_size );
3256 static void dump_create_desktop_reply( const struct create_desktop_reply *req )
3258 fprintf( stderr, " handle=%04x", req->handle );
3261 static void dump_open_desktop_request( const struct open_desktop_request *req )
3263 fprintf( stderr, " winsta=%04x", req->winsta );
3264 fprintf( stderr, ", flags=%08x", req->flags );
3265 fprintf( stderr, ", access=%08x", req->access );
3266 fprintf( stderr, ", attributes=%08x", req->attributes );
3267 dump_varargs_unicode_str( ", name=", cur_size );
3270 static void dump_open_desktop_reply( const struct open_desktop_reply *req )
3272 fprintf( stderr, " handle=%04x", req->handle );
3275 static void dump_open_input_desktop_request( const struct open_input_desktop_request *req )
3277 fprintf( stderr, " flags=%08x", req->flags );
3278 fprintf( stderr, ", access=%08x", req->access );
3279 fprintf( stderr, ", attributes=%08x", req->attributes );
3282 static void dump_open_input_desktop_reply( const struct open_input_desktop_reply *req )
3284 fprintf( stderr, " handle=%04x", req->handle );
3287 static void dump_close_desktop_request( const struct close_desktop_request *req )
3289 fprintf( stderr, " handle=%04x", req->handle );
3292 static void dump_get_thread_desktop_request( const struct get_thread_desktop_request *req )
3294 fprintf( stderr, " tid=%04x", req->tid );
3297 static void dump_get_thread_desktop_reply( const struct get_thread_desktop_reply *req )
3299 fprintf( stderr, " handle=%04x", req->handle );
3302 static void dump_set_thread_desktop_request( const struct set_thread_desktop_request *req )
3304 fprintf( stderr, " handle=%04x", req->handle );
3307 static void dump_enum_desktop_request( const struct enum_desktop_request *req )
3309 fprintf( stderr, " winstation=%04x", req->winstation );
3310 fprintf( stderr, ", index=%08x", req->index );
3313 static void dump_enum_desktop_reply( const struct enum_desktop_reply *req )
3315 fprintf( stderr, " next=%08x", req->next );
3316 dump_varargs_unicode_str( ", name=", cur_size );
3319 static void dump_set_user_object_info_request( const struct set_user_object_info_request *req )
3321 fprintf( stderr, " handle=%04x", req->handle );
3322 fprintf( stderr, ", flags=%08x", req->flags );
3323 fprintf( stderr, ", obj_flags=%08x", req->obj_flags );
3326 static void dump_set_user_object_info_reply( const struct set_user_object_info_reply *req )
3328 fprintf( stderr, " is_desktop=%d", req->is_desktop );
3329 fprintf( stderr, ", old_obj_flags=%08x", req->old_obj_flags );
3330 dump_varargs_unicode_str( ", name=", cur_size );
3333 static void dump_register_hotkey_request( const struct register_hotkey_request *req )
3335 fprintf( stderr, " window=%08x", req->window );
3336 fprintf( stderr, ", id=%d", req->id );
3337 fprintf( stderr, ", flags=%08x", req->flags );
3338 fprintf( stderr, ", vkey=%08x", req->vkey );
3341 static void dump_register_hotkey_reply( const struct register_hotkey_reply *req )
3343 fprintf( stderr, " replaced=%d", req->replaced );
3344 fprintf( stderr, ", flags=%08x", req->flags );
3345 fprintf( stderr, ", vkey=%08x", req->vkey );
3348 static void dump_unregister_hotkey_request( const struct unregister_hotkey_request *req )
3350 fprintf( stderr, " window=%08x", req->window );
3351 fprintf( stderr, ", id=%d", req->id );
3354 static void dump_unregister_hotkey_reply( const struct unregister_hotkey_reply *req )
3356 fprintf( stderr, " flags=%08x", req->flags );
3357 fprintf( stderr, ", vkey=%08x", req->vkey );
3360 static void dump_attach_thread_input_request( const struct attach_thread_input_request *req )
3362 fprintf( stderr, " tid_from=%04x", req->tid_from );
3363 fprintf( stderr, ", tid_to=%04x", req->tid_to );
3364 fprintf( stderr, ", attach=%d", req->attach );
3367 static void dump_get_thread_input_request( const struct get_thread_input_request *req )
3369 fprintf( stderr, " tid=%04x", req->tid );
3372 static void dump_get_thread_input_reply( const struct get_thread_input_reply *req )
3374 fprintf( stderr, " focus=%08x", req->focus );
3375 fprintf( stderr, ", capture=%08x", req->capture );
3376 fprintf( stderr, ", active=%08x", req->active );
3377 fprintf( stderr, ", foreground=%08x", req->foreground );
3378 fprintf( stderr, ", menu_owner=%08x", req->menu_owner );
3379 fprintf( stderr, ", move_size=%08x", req->move_size );
3380 fprintf( stderr, ", caret=%08x", req->caret );
3381 fprintf( stderr, ", cursor=%08x", req->cursor );
3382 fprintf( stderr, ", show_count=%d", req->show_count );
3383 dump_rectangle( ", rect=", &req->rect );
3386 static void dump_get_last_input_time_request( const struct get_last_input_time_request *req )
3390 static void dump_get_last_input_time_reply( const struct get_last_input_time_reply *req )
3392 fprintf( stderr, " time=%08x", req->time );
3395 static void dump_get_key_state_request( const struct get_key_state_request *req )
3397 fprintf( stderr, " async=%d", req->async );
3398 fprintf( stderr, ", key=%d", req->key );
3401 static void dump_get_key_state_reply( const struct get_key_state_reply *req )
3403 fprintf( stderr, " state=%02x", req->state );
3404 dump_varargs_bytes( ", keystate=", cur_size );
3407 static void dump_set_key_state_request( const struct set_key_state_request *req )
3409 fprintf( stderr, " async=%d", req->async );
3410 dump_varargs_bytes( ", keystate=", cur_size );
3413 static void dump_set_foreground_window_request( const struct set_foreground_window_request *req )
3415 fprintf( stderr, " handle=%08x", req->handle );
3418 static void dump_set_foreground_window_reply( const struct set_foreground_window_reply *req )
3420 fprintf( stderr, " previous=%08x", req->previous );
3421 fprintf( stderr, ", send_msg_old=%d", req->send_msg_old );
3422 fprintf( stderr, ", send_msg_new=%d", req->send_msg_new );
3425 static void dump_set_focus_window_request( const struct set_focus_window_request *req )
3427 fprintf( stderr, " handle=%08x", req->handle );
3430 static void dump_set_focus_window_reply( const struct set_focus_window_reply *req )
3432 fprintf( stderr, " previous=%08x", req->previous );
3435 static void dump_set_active_window_request( const struct set_active_window_request *req )
3437 fprintf( stderr, " handle=%08x", req->handle );
3440 static void dump_set_active_window_reply( const struct set_active_window_reply *req )
3442 fprintf( stderr, " previous=%08x", req->previous );
3445 static void dump_set_capture_window_request( const struct set_capture_window_request *req )
3447 fprintf( stderr, " handle=%08x", req->handle );
3448 fprintf( stderr, ", flags=%08x", req->flags );
3451 static void dump_set_capture_window_reply( const struct set_capture_window_reply *req )
3453 fprintf( stderr, " previous=%08x", req->previous );
3454 fprintf( stderr, ", full_handle=%08x", req->full_handle );
3457 static void dump_set_caret_window_request( const struct set_caret_window_request *req )
3459 fprintf( stderr, " handle=%08x", req->handle );
3460 fprintf( stderr, ", width=%d", req->width );
3461 fprintf( stderr, ", height=%d", req->height );
3464 static void dump_set_caret_window_reply( const struct set_caret_window_reply *req )
3466 fprintf( stderr, " previous=%08x", req->previous );
3467 dump_rectangle( ", old_rect=", &req->old_rect );
3468 fprintf( stderr, ", old_hide=%d", req->old_hide );
3469 fprintf( stderr, ", old_state=%d", req->old_state );
3472 static void dump_set_caret_info_request( const struct set_caret_info_request *req )
3474 fprintf( stderr, " flags=%08x", req->flags );
3475 fprintf( stderr, ", handle=%08x", req->handle );
3476 fprintf( stderr, ", x=%d", req->x );
3477 fprintf( stderr, ", y=%d", req->y );
3478 fprintf( stderr, ", hide=%d", req->hide );
3479 fprintf( stderr, ", state=%d", req->state );
3482 static void dump_set_caret_info_reply( const struct set_caret_info_reply *req )
3484 fprintf( stderr, " full_handle=%08x", req->full_handle );
3485 dump_rectangle( ", old_rect=", &req->old_rect );
3486 fprintf( stderr, ", old_hide=%d", req->old_hide );
3487 fprintf( stderr, ", old_state=%d", req->old_state );
3490 static void dump_set_hook_request( const struct set_hook_request *req )
3492 fprintf( stderr, " id=%d", req->id );
3493 fprintf( stderr, ", pid=%04x", req->pid );
3494 fprintf( stderr, ", tid=%04x", req->tid );
3495 fprintf( stderr, ", event_min=%d", req->event_min );
3496 fprintf( stderr, ", event_max=%d", req->event_max );
3497 dump_uint64( ", proc=", &req->proc );
3498 fprintf( stderr, ", flags=%d", req->flags );
3499 fprintf( stderr, ", unicode=%d", req->unicode );
3500 dump_varargs_unicode_str( ", module=", cur_size );
3503 static void dump_set_hook_reply( const struct set_hook_reply *req )
3505 fprintf( stderr, " handle=%08x", req->handle );
3506 fprintf( stderr, ", active_hooks=%08x", req->active_hooks );
3509 static void dump_remove_hook_request( const struct remove_hook_request *req )
3511 fprintf( stderr, " handle=%08x", req->handle );
3512 dump_uint64( ", proc=", &req->proc );
3513 fprintf( stderr, ", id=%d", req->id );
3516 static void dump_remove_hook_reply( const struct remove_hook_reply *req )
3518 fprintf( stderr, " active_hooks=%08x", req->active_hooks );
3521 static void dump_start_hook_chain_request( const struct start_hook_chain_request *req )
3523 fprintf( stderr, " id=%d", req->id );
3524 fprintf( stderr, ", event=%d", req->event );
3525 fprintf( stderr, ", window=%08x", req->window );
3526 fprintf( stderr, ", object_id=%d", req->object_id );
3527 fprintf( stderr, ", child_id=%d", req->child_id );
3530 static void dump_start_hook_chain_reply( const struct start_hook_chain_reply *req )
3532 fprintf( stderr, " handle=%08x", req->handle );
3533 fprintf( stderr, ", pid=%04x", req->pid );
3534 fprintf( stderr, ", tid=%04x", req->tid );
3535 fprintf( stderr, ", unicode=%d", req->unicode );
3536 dump_uint64( ", proc=", &req->proc );
3537 fprintf( stderr, ", active_hooks=%08x", req->active_hooks );
3538 dump_varargs_unicode_str( ", module=", cur_size );
3541 static void dump_finish_hook_chain_request( const struct finish_hook_chain_request *req )
3543 fprintf( stderr, " id=%d", req->id );
3546 static void dump_get_hook_info_request( const struct get_hook_info_request *req )
3548 fprintf( stderr, " handle=%08x", req->handle );
3549 fprintf( stderr, ", get_next=%d", req->get_next );
3550 fprintf( stderr, ", event=%d", req->event );
3551 fprintf( stderr, ", window=%08x", req->window );
3552 fprintf( stderr, ", object_id=%d", req->object_id );
3553 fprintf( stderr, ", child_id=%d", req->child_id );
3556 static void dump_get_hook_info_reply( const struct get_hook_info_reply *req )
3558 fprintf( stderr, " handle=%08x", req->handle );
3559 fprintf( stderr, ", id=%d", req->id );
3560 fprintf( stderr, ", pid=%04x", req->pid );
3561 fprintf( stderr, ", tid=%04x", req->tid );
3562 dump_uint64( ", proc=", &req->proc );
3563 fprintf( stderr, ", unicode=%d", req->unicode );
3564 dump_varargs_unicode_str( ", module=", cur_size );
3567 static void dump_create_class_request( const struct create_class_request *req )
3569 fprintf( stderr, " local=%d", req->local );
3570 fprintf( stderr, ", atom=%04x", req->atom );
3571 fprintf( stderr, ", style=%08x", req->style );
3572 dump_uint64( ", instance=", &req->instance );
3573 fprintf( stderr, ", extra=%d", req->extra );
3574 fprintf( stderr, ", win_extra=%d", req->win_extra );
3575 dump_uint64( ", client_ptr=", &req->client_ptr );
3576 fprintf( stderr, ", name_offset=%u", req->name_offset );
3577 dump_varargs_unicode_str( ", name=", cur_size );
3580 static void dump_create_class_reply( const struct create_class_reply *req )
3582 fprintf( stderr, " atom=%04x", req->atom );
3585 static void dump_destroy_class_request( const struct destroy_class_request *req )
3587 fprintf( stderr, " atom=%04x", req->atom );
3588 dump_uint64( ", instance=", &req->instance );
3589 dump_varargs_unicode_str( ", name=", cur_size );
3592 static void dump_destroy_class_reply( const struct destroy_class_reply *req )
3594 dump_uint64( " client_ptr=", &req->client_ptr );
3597 static void dump_set_class_info_request( const struct set_class_info_request *req )
3599 fprintf( stderr, " window=%08x", req->window );
3600 fprintf( stderr, ", flags=%08x", req->flags );
3601 fprintf( stderr, ", atom=%04x", req->atom );
3602 fprintf( stderr, ", style=%08x", req->style );
3603 fprintf( stderr, ", win_extra=%d", req->win_extra );
3604 dump_uint64( ", instance=", &req->instance );
3605 fprintf( stderr, ", extra_offset=%d", req->extra_offset );
3606 fprintf( stderr, ", extra_size=%u", req->extra_size );
3607 dump_uint64( ", extra_value=", &req->extra_value );
3610 static void dump_set_class_info_reply( const struct set_class_info_reply *req )
3612 fprintf( stderr, " old_atom=%04x", req->old_atom );
3613 fprintf( stderr, ", base_atom=%04x", req->base_atom );
3614 dump_uint64( ", old_instance=", &req->old_instance );
3615 dump_uint64( ", old_extra_value=", &req->old_extra_value );
3616 fprintf( stderr, ", old_style=%08x", req->old_style );
3617 fprintf( stderr, ", old_extra=%d", req->old_extra );
3618 fprintf( stderr, ", old_win_extra=%d", req->old_win_extra );
3621 static void dump_open_clipboard_request( const struct open_clipboard_request *req )
3623 fprintf( stderr, " window=%08x", req->window );
3626 static void dump_open_clipboard_reply( const struct open_clipboard_reply *req )
3628 fprintf( stderr, " owner=%08x", req->owner );
3631 static void dump_close_clipboard_request( const struct close_clipboard_request *req )
3635 static void dump_close_clipboard_reply( const struct close_clipboard_reply *req )
3637 fprintf( stderr, " viewer=%08x", req->viewer );
3638 fprintf( stderr, ", owner=%08x", req->owner );
3641 static void dump_empty_clipboard_request( const struct empty_clipboard_request *req )
3645 static void dump_set_clipboard_data_request( const struct set_clipboard_data_request *req )
3647 fprintf( stderr, " format=%08x", req->format );
3648 fprintf( stderr, ", lcid=%08x", req->lcid );
3649 dump_varargs_bytes( ", data=", cur_size );
3652 static void dump_set_clipboard_data_reply( const struct set_clipboard_data_reply *req )
3654 fprintf( stderr, " seqno=%08x", req->seqno );
3657 static void dump_get_clipboard_data_request( const struct get_clipboard_data_request *req )
3659 fprintf( stderr, " format=%08x", req->format );
3660 fprintf( stderr, ", render=%d", req->render );
3661 fprintf( stderr, ", cached=%d", req->cached );
3662 fprintf( stderr, ", seqno=%08x", req->seqno );
3665 static void dump_get_clipboard_data_reply( const struct get_clipboard_data_reply *req )
3667 fprintf( stderr, " from=%08x", req->from );
3668 fprintf( stderr, ", owner=%08x", req->owner );
3669 fprintf( stderr, ", seqno=%08x", req->seqno );
3670 fprintf( stderr, ", total=%u", req->total );
3671 dump_varargs_bytes( ", data=", cur_size );
3674 static void dump_get_clipboard_formats_request( const struct get_clipboard_formats_request *req )
3676 fprintf( stderr, " format=%08x", req->format );
3679 static void dump_get_clipboard_formats_reply( const struct get_clipboard_formats_reply *req )
3681 fprintf( stderr, " count=%08x", req->count );
3682 dump_varargs_uints( ", formats=", cur_size );
3685 static void dump_enum_clipboard_formats_request( const struct enum_clipboard_formats_request *req )
3687 fprintf( stderr, " previous=%08x", req->previous );
3690 static void dump_enum_clipboard_formats_reply( const struct enum_clipboard_formats_reply *req )
3692 fprintf( stderr, " format=%08x", req->format );
3695 static void dump_release_clipboard_request( const struct release_clipboard_request *req )
3697 fprintf( stderr, " owner=%08x", req->owner );
3700 static void dump_release_clipboard_reply( const struct release_clipboard_reply *req )
3702 fprintf( stderr, " viewer=%08x", req->viewer );
3703 fprintf( stderr, ", owner=%08x", req->owner );
3706 static void dump_get_clipboard_info_request( const struct get_clipboard_info_request *req )
3710 static void dump_get_clipboard_info_reply( const struct get_clipboard_info_reply *req )
3712 fprintf( stderr, " window=%08x", req->window );
3713 fprintf( stderr, ", owner=%08x", req->owner );
3714 fprintf( stderr, ", viewer=%08x", req->viewer );
3715 fprintf( stderr, ", seqno=%08x", req->seqno );
3718 static void dump_set_clipboard_viewer_request( const struct set_clipboard_viewer_request *req )
3720 fprintf( stderr, " viewer=%08x", req->viewer );
3721 fprintf( stderr, ", previous=%08x", req->previous );
3724 static void dump_set_clipboard_viewer_reply( const struct set_clipboard_viewer_reply *req )
3726 fprintf( stderr, " old_viewer=%08x", req->old_viewer );
3727 fprintf( stderr, ", owner=%08x", req->owner );
3730 static void dump_add_clipboard_listener_request( const struct add_clipboard_listener_request *req )
3732 fprintf( stderr, " window=%08x", req->window );
3735 static void dump_remove_clipboard_listener_request( const struct remove_clipboard_listener_request *req )
3737 fprintf( stderr, " window=%08x", req->window );
3740 static void dump_open_token_request( const struct open_token_request *req )
3742 fprintf( stderr, " handle=%04x", req->handle );
3743 fprintf( stderr, ", access=%08x", req->access );
3744 fprintf( stderr, ", attributes=%08x", req->attributes );
3745 fprintf( stderr, ", flags=%08x", req->flags );
3748 static void dump_open_token_reply( const struct open_token_reply *req )
3750 fprintf( stderr, " token=%04x", req->token );
3753 static void dump_set_global_windows_request( const struct set_global_windows_request *req )
3755 fprintf( stderr, " flags=%08x", req->flags );
3756 fprintf( stderr, ", shell_window=%08x", req->shell_window );
3757 fprintf( stderr, ", shell_listview=%08x", req->shell_listview );
3758 fprintf( stderr, ", progman_window=%08x", req->progman_window );
3759 fprintf( stderr, ", taskman_window=%08x", req->taskman_window );
3762 static void dump_set_global_windows_reply( const struct set_global_windows_reply *req )
3764 fprintf( stderr, " old_shell_window=%08x", req->old_shell_window );
3765 fprintf( stderr, ", old_shell_listview=%08x", req->old_shell_listview );
3766 fprintf( stderr, ", old_progman_window=%08x", req->old_progman_window );
3767 fprintf( stderr, ", old_taskman_window=%08x", req->old_taskman_window );
3770 static void dump_adjust_token_privileges_request( const struct adjust_token_privileges_request *req )
3772 fprintf( stderr, " handle=%04x", req->handle );
3773 fprintf( stderr, ", disable_all=%d", req->disable_all );
3774 fprintf( stderr, ", get_modified_state=%d", req->get_modified_state );
3775 dump_varargs_luid_attr( ", privileges=", cur_size );
3778 static void dump_adjust_token_privileges_reply( const struct adjust_token_privileges_reply *req )
3780 fprintf( stderr, " len=%08x", req->len );
3781 dump_varargs_luid_attr( ", privileges=", cur_size );
3784 static void dump_get_token_privileges_request( const struct get_token_privileges_request *req )
3786 fprintf( stderr, " handle=%04x", req->handle );
3789 static void dump_get_token_privileges_reply( const struct get_token_privileges_reply *req )
3791 fprintf( stderr, " len=%08x", req->len );
3792 dump_varargs_luid_attr( ", privileges=", cur_size );
3795 static void dump_check_token_privileges_request( const struct check_token_privileges_request *req )
3797 fprintf( stderr, " handle=%04x", req->handle );
3798 fprintf( stderr, ", all_required=%d", req->all_required );
3799 dump_varargs_luid_attr( ", privileges=", cur_size );
3802 static void dump_check_token_privileges_reply( const struct check_token_privileges_reply *req )
3804 fprintf( stderr, " has_privileges=%d", req->has_privileges );
3805 dump_varargs_luid_attr( ", privileges=", cur_size );
3808 static void dump_duplicate_token_request( const struct duplicate_token_request *req )
3810 fprintf( stderr, " handle=%04x", req->handle );
3811 fprintf( stderr, ", access=%08x", req->access );
3812 fprintf( stderr, ", primary=%d", req->primary );
3813 fprintf( stderr, ", impersonation_level=%d", req->impersonation_level );
3814 dump_varargs_object_attributes( ", objattr=", cur_size );
3817 static void dump_duplicate_token_reply( const struct duplicate_token_reply *req )
3819 fprintf( stderr, " new_handle=%04x", req->new_handle );
3822 static void dump_filter_token_request( const struct filter_token_request *req )
3824 fprintf( stderr, " handle=%04x", req->handle );
3825 fprintf( stderr, ", flags=%08x", req->flags );
3826 fprintf( stderr, ", privileges_size=%u", req->privileges_size );
3827 dump_varargs_luid_attr( ", privileges=", min(cur_size,req->privileges_size) );
3828 dump_varargs_sid( ", disable_sids=", cur_size );
3831 static void dump_filter_token_reply( const struct filter_token_reply *req )
3833 fprintf( stderr, " new_handle=%04x", req->new_handle );
3836 static void dump_access_check_request( const struct access_check_request *req )
3838 fprintf( stderr, " handle=%04x", req->handle );
3839 fprintf( stderr, ", desired_access=%08x", req->desired_access );
3840 dump_generic_map( ", mapping=", &req->mapping );
3841 dump_varargs_security_descriptor( ", sd=", cur_size );
3844 static void dump_access_check_reply( const struct access_check_reply *req )
3846 fprintf( stderr, " access_granted=%08x", req->access_granted );
3847 fprintf( stderr, ", access_status=%08x", req->access_status );
3848 fprintf( stderr, ", privileges_len=%08x", req->privileges_len );
3849 dump_varargs_luid_attr( ", privileges=", cur_size );
3852 static void dump_get_token_sid_request( const struct get_token_sid_request *req )
3854 fprintf( stderr, " handle=%04x", req->handle );
3855 fprintf( stderr, ", which_sid=%08x", req->which_sid );
3858 static void dump_get_token_sid_reply( const struct get_token_sid_reply *req )
3860 fprintf( stderr, " sid_len=%u", req->sid_len );
3861 dump_varargs_sid( ", sid=", cur_size );
3864 static void dump_get_token_groups_request( const struct get_token_groups_request *req )
3866 fprintf( stderr, " handle=%04x", req->handle );
3869 static void dump_get_token_groups_reply( const struct get_token_groups_reply *req )
3871 fprintf( stderr, " attr_len=%u", req->attr_len );
3872 fprintf( stderr, ", sid_len=%u", req->sid_len );
3873 dump_varargs_uints( ", attrs=", min(cur_size,req->attr_len) );
3874 dump_varargs_sids( ", sids=", cur_size );
3877 static void dump_get_token_default_dacl_request( const struct get_token_default_dacl_request *req )
3879 fprintf( stderr, " handle=%04x", req->handle );
3882 static void dump_get_token_default_dacl_reply( const struct get_token_default_dacl_reply *req )
3884 fprintf( stderr, " acl_len=%u", req->acl_len );
3885 dump_varargs_acl( ", acl=", cur_size );
3888 static void dump_set_token_default_dacl_request( const struct set_token_default_dacl_request *req )
3890 fprintf( stderr, " handle=%04x", req->handle );
3891 dump_varargs_acl( ", acl=", cur_size );
3894 static void dump_set_security_object_request( const struct set_security_object_request *req )
3896 fprintf( stderr, " handle=%04x", req->handle );
3897 fprintf( stderr, ", security_info=%08x", req->security_info );
3898 dump_varargs_security_descriptor( ", sd=", cur_size );
3901 static void dump_get_security_object_request( const struct get_security_object_request *req )
3903 fprintf( stderr, " handle=%04x", req->handle );
3904 fprintf( stderr, ", security_info=%08x", req->security_info );
3907 static void dump_get_security_object_reply( const struct get_security_object_reply *req )
3909 fprintf( stderr, " sd_len=%08x", req->sd_len );
3910 dump_varargs_security_descriptor( ", sd=", cur_size );
3913 static void dump_get_system_handles_request( const struct get_system_handles_request *req )
3917 static void dump_get_system_handles_reply( const struct get_system_handles_reply *req )
3919 fprintf( stderr, " count=%08x", req->count );
3920 dump_varargs_handle_infos( ", data=", cur_size );
3923 static void dump_create_mailslot_request( const struct create_mailslot_request *req )
3925 fprintf( stderr, " access=%08x", req->access );
3926 dump_timeout( ", read_timeout=", &req->read_timeout );
3927 fprintf( stderr, ", max_msgsize=%08x", req->max_msgsize );
3928 dump_varargs_object_attributes( ", objattr=", cur_size );
3931 static void dump_create_mailslot_reply( const struct create_mailslot_reply *req )
3933 fprintf( stderr, " handle=%04x", req->handle );
3936 static void dump_set_mailslot_info_request( const struct set_mailslot_info_request *req )
3938 fprintf( stderr, " handle=%04x", req->handle );
3939 dump_timeout( ", read_timeout=", &req->read_timeout );
3940 fprintf( stderr, ", flags=%08x", req->flags );
3943 static void dump_set_mailslot_info_reply( const struct set_mailslot_info_reply *req )
3945 dump_timeout( " read_timeout=", &req->read_timeout );
3946 fprintf( stderr, ", max_msgsize=%08x", req->max_msgsize );
3949 static void dump_create_directory_request( const struct create_directory_request *req )
3951 fprintf( stderr, " access=%08x", req->access );
3952 dump_varargs_object_attributes( ", objattr=", cur_size );
3955 static void dump_create_directory_reply( const struct create_directory_reply *req )
3957 fprintf( stderr, " handle=%04x", req->handle );
3960 static void dump_open_directory_request( const struct open_directory_request *req )
3962 fprintf( stderr, " access=%08x", req->access );
3963 fprintf( stderr, ", attributes=%08x", req->attributes );
3964 fprintf( stderr, ", rootdir=%04x", req->rootdir );
3965 dump_varargs_unicode_str( ", directory_name=", cur_size );
3968 static void dump_open_directory_reply( const struct open_directory_reply *req )
3970 fprintf( stderr, " handle=%04x", req->handle );
3973 static void dump_get_directory_entry_request( const struct get_directory_entry_request *req )
3975 fprintf( stderr, " handle=%04x", req->handle );
3976 fprintf( stderr, ", index=%08x", req->index );
3979 static void dump_get_directory_entry_reply( const struct get_directory_entry_reply *req )
3981 fprintf( stderr, " total_len=%u", req->total_len );
3982 fprintf( stderr, ", name_len=%u", req->name_len );
3983 dump_varargs_unicode_str( ", name=", min(cur_size,req->name_len) );
3984 dump_varargs_unicode_str( ", type=", cur_size );
3987 static void dump_create_symlink_request( const struct create_symlink_request *req )
3989 fprintf( stderr, " access=%08x", req->access );
3990 dump_varargs_object_attributes( ", objattr=", cur_size );
3991 dump_varargs_unicode_str( ", target_name=", cur_size );
3994 static void dump_create_symlink_reply( const struct create_symlink_reply *req )
3996 fprintf( stderr, " handle=%04x", req->handle );
3999 static void dump_open_symlink_request( const struct open_symlink_request *req )
4001 fprintf( stderr, " access=%08x", req->access );
4002 fprintf( stderr, ", attributes=%08x", req->attributes );
4003 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4004 dump_varargs_unicode_str( ", name=", cur_size );
4007 static void dump_open_symlink_reply( const struct open_symlink_reply *req )
4009 fprintf( stderr, " handle=%04x", req->handle );
4012 static void dump_query_symlink_request( const struct query_symlink_request *req )
4014 fprintf( stderr, " handle=%04x", req->handle );
4017 static void dump_query_symlink_reply( const struct query_symlink_reply *req )
4019 fprintf( stderr, " total=%u", req->total );
4020 dump_varargs_unicode_str( ", target_name=", cur_size );
4023 static void dump_get_object_info_request( const struct get_object_info_request *req )
4025 fprintf( stderr, " handle=%04x", req->handle );
4028 static void dump_get_object_info_reply( const struct get_object_info_reply *req )
4030 fprintf( stderr, " access=%08x", req->access );
4031 fprintf( stderr, ", ref_count=%08x", req->ref_count );
4032 fprintf( stderr, ", handle_count=%08x", req->handle_count );
4035 static void dump_get_object_name_request( const struct get_object_name_request *req )
4037 fprintf( stderr, " handle=%04x", req->handle );
4040 static void dump_get_object_name_reply( const struct get_object_name_reply *req )
4042 fprintf( stderr, " total=%u", req->total );
4043 dump_varargs_unicode_str( ", name=", cur_size );
4046 static void dump_get_object_type_request( const struct get_object_type_request *req )
4048 fprintf( stderr, " handle=%04x", req->handle );
4051 static void dump_get_object_type_reply( const struct get_object_type_reply *req )
4053 dump_varargs_object_type_info( " info=", cur_size );
4056 static void dump_get_object_types_request( const struct get_object_types_request *req )
4060 static void dump_get_object_types_reply( const struct get_object_types_reply *req )
4062 fprintf( stderr, " count=%d", req->count );
4063 dump_varargs_object_types_info( ", info=", cur_size );
4066 static void dump_allocate_locally_unique_id_request( const struct allocate_locally_unique_id_request *req )
4070 static void dump_allocate_locally_unique_id_reply( const struct allocate_locally_unique_id_reply *req )
4072 dump_luid( " luid=", &req->luid );
4075 static void dump_create_device_manager_request( const struct create_device_manager_request *req )
4077 fprintf( stderr, " access=%08x", req->access );
4078 fprintf( stderr, ", attributes=%08x", req->attributes );
4081 static void dump_create_device_manager_reply( const struct create_device_manager_reply *req )
4083 fprintf( stderr, " handle=%04x", req->handle );
4086 static void dump_create_device_request( const struct create_device_request *req )
4088 fprintf( stderr, " rootdir=%04x", req->rootdir );
4089 dump_uint64( ", user_ptr=", &req->user_ptr );
4090 fprintf( stderr, ", manager=%04x", req->manager );
4091 dump_varargs_unicode_str( ", name=", cur_size );
4094 static void dump_delete_device_request( const struct delete_device_request *req )
4096 fprintf( stderr, " manager=%04x", req->manager );
4097 dump_uint64( ", device=", &req->device );
4100 static void dump_get_next_device_request_request( const struct get_next_device_request_request *req )
4102 fprintf( stderr, " manager=%04x", req->manager );
4103 fprintf( stderr, ", prev=%04x", req->prev );
4104 fprintf( stderr, ", status=%08x", req->status );
4105 dump_uint64( ", user_ptr=", &req->user_ptr );
4106 fprintf( stderr, ", pending=%d", req->pending );
4107 fprintf( stderr, ", iosb_status=%08x", req->iosb_status );
4108 fprintf( stderr, ", result=%u", req->result );
4109 dump_varargs_bytes( ", data=", cur_size );
4112 static void dump_get_next_device_request_reply( const struct get_next_device_request_reply *req )
4114 dump_irp_params( " params=", &req->params );
4115 fprintf( stderr, ", next=%04x", req->next );
4116 fprintf( stderr, ", client_tid=%04x", req->client_tid );
4117 dump_uint64( ", client_thread=", &req->client_thread );
4118 fprintf( stderr, ", in_size=%u", req->in_size );
4119 dump_varargs_bytes( ", next_data=", cur_size );
4122 static void dump_get_kernel_object_ptr_request( const struct get_kernel_object_ptr_request *req )
4124 fprintf( stderr, " manager=%04x", req->manager );
4125 fprintf( stderr, ", handle=%04x", req->handle );
4128 static void dump_get_kernel_object_ptr_reply( const struct get_kernel_object_ptr_reply *req )
4130 dump_uint64( " user_ptr=", &req->user_ptr );
4133 static void dump_set_kernel_object_ptr_request( const struct set_kernel_object_ptr_request *req )
4135 fprintf( stderr, " manager=%04x", req->manager );
4136 fprintf( stderr, ", handle=%04x", req->handle );
4137 dump_uint64( ", user_ptr=", &req->user_ptr );
4140 static void dump_grab_kernel_object_request( const struct grab_kernel_object_request *req )
4142 fprintf( stderr, " manager=%04x", req->manager );
4143 dump_uint64( ", user_ptr=", &req->user_ptr );
4146 static void dump_release_kernel_object_request( const struct release_kernel_object_request *req )
4148 fprintf( stderr, " manager=%04x", req->manager );
4149 dump_uint64( ", user_ptr=", &req->user_ptr );
4152 static void dump_get_kernel_object_handle_request( const struct get_kernel_object_handle_request *req )
4154 fprintf( stderr, " manager=%04x", req->manager );
4155 dump_uint64( ", user_ptr=", &req->user_ptr );
4156 fprintf( stderr, ", access=%08x", req->access );
4159 static void dump_get_kernel_object_handle_reply( const struct get_kernel_object_handle_reply *req )
4161 fprintf( stderr, " handle=%04x", req->handle );
4164 static void dump_make_process_system_request( const struct make_process_system_request *req )
4166 fprintf( stderr, " handle=%04x", req->handle );
4169 static void dump_make_process_system_reply( const struct make_process_system_reply *req )
4171 fprintf( stderr, " event=%04x", req->event );
4174 static void dump_get_token_info_request( const struct get_token_info_request *req )
4176 fprintf( stderr, " handle=%04x", req->handle );
4179 static void dump_get_token_info_reply( const struct get_token_info_reply *req )
4181 dump_luid( " token_id=", &req->token_id );
4182 dump_luid( ", modified_id=", &req->modified_id );
4183 fprintf( stderr, ", session_id=%08x", req->session_id );
4184 fprintf( stderr, ", primary=%d", req->primary );
4185 fprintf( stderr, ", impersonation_level=%d", req->impersonation_level );
4186 fprintf( stderr, ", elevation=%d", req->elevation );
4187 fprintf( stderr, ", group_count=%d", req->group_count );
4188 fprintf( stderr, ", privilege_count=%d", req->privilege_count );
4191 static void dump_create_linked_token_request( const struct create_linked_token_request *req )
4193 fprintf( stderr, " handle=%04x", req->handle );
4196 static void dump_create_linked_token_reply( const struct create_linked_token_reply *req )
4198 fprintf( stderr, " linked=%04x", req->linked );
4201 static void dump_create_completion_request( const struct create_completion_request *req )
4203 fprintf( stderr, " access=%08x", req->access );
4204 fprintf( stderr, ", concurrent=%08x", req->concurrent );
4205 dump_varargs_object_attributes( ", objattr=", cur_size );
4208 static void dump_create_completion_reply( const struct create_completion_reply *req )
4210 fprintf( stderr, " handle=%04x", req->handle );
4213 static void dump_open_completion_request( const struct open_completion_request *req )
4215 fprintf( stderr, " access=%08x", req->access );
4216 fprintf( stderr, ", attributes=%08x", req->attributes );
4217 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4218 dump_varargs_unicode_str( ", filename=", cur_size );
4221 static void dump_open_completion_reply( const struct open_completion_reply *req )
4223 fprintf( stderr, " handle=%04x", req->handle );
4226 static void dump_add_completion_request( const struct add_completion_request *req )
4228 fprintf( stderr, " handle=%04x", req->handle );
4229 dump_uint64( ", ckey=", &req->ckey );
4230 dump_uint64( ", cvalue=", &req->cvalue );
4231 dump_uint64( ", information=", &req->information );
4232 fprintf( stderr, ", status=%08x", req->status );
4235 static void dump_remove_completion_request( const struct remove_completion_request *req )
4237 fprintf( stderr, " handle=%04x", req->handle );
4240 static void dump_remove_completion_reply( const struct remove_completion_reply *req )
4242 dump_uint64( " ckey=", &req->ckey );
4243 dump_uint64( ", cvalue=", &req->cvalue );
4244 dump_uint64( ", information=", &req->information );
4245 fprintf( stderr, ", status=%08x", req->status );
4248 static void dump_query_completion_request( const struct query_completion_request *req )
4250 fprintf( stderr, " handle=%04x", req->handle );
4253 static void dump_query_completion_reply( const struct query_completion_reply *req )
4255 fprintf( stderr, " depth=%08x", req->depth );
4258 static void dump_set_completion_info_request( const struct set_completion_info_request *req )
4260 fprintf( stderr, " handle=%04x", req->handle );
4261 dump_uint64( ", ckey=", &req->ckey );
4262 fprintf( stderr, ", chandle=%04x", req->chandle );
4265 static void dump_add_fd_completion_request( const struct add_fd_completion_request *req )
4267 fprintf( stderr, " handle=%04x", req->handle );
4268 dump_uint64( ", cvalue=", &req->cvalue );
4269 dump_uint64( ", information=", &req->information );
4270 fprintf( stderr, ", status=%08x", req->status );
4271 fprintf( stderr, ", async=%d", req->async );
4274 static void dump_set_fd_completion_mode_request( const struct set_fd_completion_mode_request *req )
4276 fprintf( stderr, " handle=%04x", req->handle );
4277 fprintf( stderr, ", flags=%08x", req->flags );
4280 static void dump_set_fd_disp_info_request( const struct set_fd_disp_info_request *req )
4282 fprintf( stderr, " handle=%04x", req->handle );
4283 fprintf( stderr, ", unlink=%d", req->unlink );
4286 static void dump_set_fd_name_info_request( const struct set_fd_name_info_request *req )
4288 fprintf( stderr, " handle=%04x", req->handle );
4289 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4290 fprintf( stderr, ", namelen=%u", req->namelen );
4291 fprintf( stderr, ", link=%d", req->link );
4292 fprintf( stderr, ", replace=%d", req->replace );
4293 dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
4294 dump_varargs_string( ", filename=", cur_size );
4297 static void dump_set_fd_eof_info_request( const struct set_fd_eof_info_request *req )
4299 fprintf( stderr, " handle=%04x", req->handle );
4300 dump_uint64( ", eof=", &req->eof );
4303 static void dump_get_window_layered_info_request( const struct get_window_layered_info_request *req )
4305 fprintf( stderr, " handle=%08x", req->handle );
4308 static void dump_get_window_layered_info_reply( const struct get_window_layered_info_reply *req )
4310 fprintf( stderr, " color_key=%08x", req->color_key );
4311 fprintf( stderr, ", alpha=%08x", req->alpha );
4312 fprintf( stderr, ", flags=%08x", req->flags );
4315 static void dump_set_window_layered_info_request( const struct set_window_layered_info_request *req )
4317 fprintf( stderr, " handle=%08x", req->handle );
4318 fprintf( stderr, ", color_key=%08x", req->color_key );
4319 fprintf( stderr, ", alpha=%08x", req->alpha );
4320 fprintf( stderr, ", flags=%08x", req->flags );
4323 static void dump_alloc_user_handle_request( const struct alloc_user_handle_request *req )
4327 static void dump_alloc_user_handle_reply( const struct alloc_user_handle_reply *req )
4329 fprintf( stderr, " handle=%08x", req->handle );
4332 static void dump_free_user_handle_request( const struct free_user_handle_request *req )
4334 fprintf( stderr, " handle=%08x", req->handle );
4337 static void dump_set_cursor_request( const struct set_cursor_request *req )
4339 fprintf( stderr, " flags=%08x", req->flags );
4340 fprintf( stderr, ", handle=%08x", req->handle );
4341 fprintf( stderr, ", show_count=%d", req->show_count );
4342 fprintf( stderr, ", x=%d", req->x );
4343 fprintf( stderr, ", y=%d", req->y );
4344 dump_rectangle( ", clip=", &req->clip );
4345 fprintf( stderr, ", clip_msg=%08x", req->clip_msg );
4348 static void dump_set_cursor_reply( const struct set_cursor_reply *req )
4350 fprintf( stderr, " prev_handle=%08x", req->prev_handle );
4351 fprintf( stderr, ", prev_count=%d", req->prev_count );
4352 fprintf( stderr, ", prev_x=%d", req->prev_x );
4353 fprintf( stderr, ", prev_y=%d", req->prev_y );
4354 fprintf( stderr, ", new_x=%d", req->new_x );
4355 fprintf( stderr, ", new_y=%d", req->new_y );
4356 dump_rectangle( ", new_clip=", &req->new_clip );
4357 fprintf( stderr, ", last_change=%08x", req->last_change );
4360 static void dump_get_cursor_history_request( const struct get_cursor_history_request *req )
4364 static void dump_get_cursor_history_reply( const struct get_cursor_history_reply *req )
4366 dump_varargs_cursor_positions( " history=", cur_size );
4369 static void dump_get_rawinput_buffer_request( const struct get_rawinput_buffer_request *req )
4371 fprintf( stderr, " rawinput_size=%u", req->rawinput_size );
4372 fprintf( stderr, ", buffer_size=%u", req->buffer_size );
4375 static void dump_get_rawinput_buffer_reply( const struct get_rawinput_buffer_reply *req )
4377 fprintf( stderr, " next_size=%u", req->next_size );
4378 fprintf( stderr, ", count=%08x", req->count );
4379 dump_varargs_bytes( ", data=", cur_size );
4382 static void dump_update_rawinput_devices_request( const struct update_rawinput_devices_request *req )
4384 dump_varargs_rawinput_devices( " devices=", cur_size );
4387 static void dump_get_rawinput_devices_request( const struct get_rawinput_devices_request *req )
4391 static void dump_get_rawinput_devices_reply( const struct get_rawinput_devices_reply *req )
4393 fprintf( stderr, " device_count=%08x", req->device_count );
4394 dump_varargs_rawinput_devices( ", devices=", cur_size );
4397 static void dump_create_job_request( const struct create_job_request *req )
4399 fprintf( stderr, " access=%08x", req->access );
4400 dump_varargs_object_attributes( ", objattr=", cur_size );
4403 static void dump_create_job_reply( const struct create_job_reply *req )
4405 fprintf( stderr, " handle=%04x", req->handle );
4408 static void dump_open_job_request( const struct open_job_request *req )
4410 fprintf( stderr, " access=%08x", req->access );
4411 fprintf( stderr, ", attributes=%08x", req->attributes );
4412 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4413 dump_varargs_unicode_str( ", name=", cur_size );
4416 static void dump_open_job_reply( const struct open_job_reply *req )
4418 fprintf( stderr, " handle=%04x", req->handle );
4421 static void dump_assign_job_request( const struct assign_job_request *req )
4423 fprintf( stderr, " job=%04x", req->job );
4424 fprintf( stderr, ", process=%04x", req->process );
4427 static void dump_process_in_job_request( const struct process_in_job_request *req )
4429 fprintf( stderr, " job=%04x", req->job );
4430 fprintf( stderr, ", process=%04x", req->process );
4433 static void dump_set_job_limits_request( const struct set_job_limits_request *req )
4435 fprintf( stderr, " handle=%04x", req->handle );
4436 fprintf( stderr, ", limit_flags=%08x", req->limit_flags );
4439 static void dump_set_job_completion_port_request( const struct set_job_completion_port_request *req )
4441 fprintf( stderr, " job=%04x", req->job );
4442 fprintf( stderr, ", port=%04x", req->port );
4443 dump_uint64( ", key=", &req->key );
4446 static void dump_get_job_info_request( const struct get_job_info_request *req )
4448 fprintf( stderr, " handle=%04x", req->handle );
4451 static void dump_get_job_info_reply( const struct get_job_info_reply *req )
4453 fprintf( stderr, " total_processes=%d", req->total_processes );
4454 fprintf( stderr, ", active_processes=%d", req->active_processes );
4455 dump_varargs_uints( ", pids=", cur_size );
4458 static void dump_terminate_job_request( const struct terminate_job_request *req )
4460 fprintf( stderr, " handle=%04x", req->handle );
4461 fprintf( stderr, ", status=%d", req->status );
4464 static void dump_suspend_process_request( const struct suspend_process_request *req )
4466 fprintf( stderr, " handle=%04x", req->handle );
4469 static void dump_resume_process_request( const struct resume_process_request *req )
4471 fprintf( stderr, " handle=%04x", req->handle );
4474 static void dump_get_next_thread_request( const struct get_next_thread_request *req )
4476 fprintf( stderr, " process=%04x", req->process );
4477 fprintf( stderr, ", last=%04x", req->last );
4478 fprintf( stderr, ", access=%08x", req->access );
4479 fprintf( stderr, ", attributes=%08x", req->attributes );
4480 fprintf( stderr, ", flags=%08x", req->flags );
4483 static void dump_get_next_thread_reply( const struct get_next_thread_reply *req )
4485 fprintf( stderr, " handle=%04x", req->handle );
4488 static const dump_func req_dumpers[REQ_NB_REQUESTS] = {
4489 (dump_func)dump_new_process_request,
4490 (dump_func)dump_get_new_process_info_request,
4491 (dump_func)dump_new_thread_request,
4492 (dump_func)dump_get_startup_info_request,
4493 (dump_func)dump_init_process_done_request,
4494 (dump_func)dump_init_first_thread_request,
4495 (dump_func)dump_init_thread_request,
4496 (dump_func)dump_terminate_process_request,
4497 (dump_func)dump_terminate_thread_request,
4498 (dump_func)dump_get_process_info_request,
4499 (dump_func)dump_get_process_debug_info_request,
4500 (dump_func)dump_get_process_image_name_request,
4501 (dump_func)dump_get_process_vm_counters_request,
4502 (dump_func)dump_set_process_info_request,
4503 (dump_func)dump_get_thread_info_request,
4504 (dump_func)dump_get_thread_times_request,
4505 (dump_func)dump_set_thread_info_request,
4506 (dump_func)dump_suspend_thread_request,
4507 (dump_func)dump_resume_thread_request,
4508 (dump_func)dump_queue_apc_request,
4509 (dump_func)dump_get_apc_result_request,
4510 (dump_func)dump_close_handle_request,
4511 (dump_func)dump_set_handle_info_request,
4512 (dump_func)dump_dup_handle_request,
4513 (dump_func)dump_compare_objects_request,
4514 (dump_func)dump_make_temporary_request,
4515 (dump_func)dump_open_process_request,
4516 (dump_func)dump_open_thread_request,
4517 (dump_func)dump_select_request,
4518 (dump_func)dump_create_event_request,
4519 (dump_func)dump_event_op_request,
4520 (dump_func)dump_query_event_request,
4521 (dump_func)dump_open_event_request,
4522 (dump_func)dump_create_keyed_event_request,
4523 (dump_func)dump_open_keyed_event_request,
4524 (dump_func)dump_create_mutex_request,
4525 (dump_func)dump_release_mutex_request,
4526 (dump_func)dump_open_mutex_request,
4527 (dump_func)dump_query_mutex_request,
4528 (dump_func)dump_create_semaphore_request,
4529 (dump_func)dump_release_semaphore_request,
4530 (dump_func)dump_query_semaphore_request,
4531 (dump_func)dump_open_semaphore_request,
4532 (dump_func)dump_create_file_request,
4533 (dump_func)dump_open_file_object_request,
4534 (dump_func)dump_alloc_file_handle_request,
4535 (dump_func)dump_get_handle_unix_name_request,
4536 (dump_func)dump_get_handle_fd_request,
4537 (dump_func)dump_get_directory_cache_entry_request,
4538 (dump_func)dump_flush_request,
4539 (dump_func)dump_get_file_info_request,
4540 (dump_func)dump_get_volume_info_request,
4541 (dump_func)dump_lock_file_request,
4542 (dump_func)dump_unlock_file_request,
4543 (dump_func)dump_recv_socket_request,
4544 (dump_func)dump_send_socket_request,
4545 (dump_func)dump_get_next_console_request_request,
4546 (dump_func)dump_read_directory_changes_request,
4547 (dump_func)dump_read_change_request,
4548 (dump_func)dump_create_mapping_request,
4549 (dump_func)dump_open_mapping_request,
4550 (dump_func)dump_get_mapping_info_request,
4551 (dump_func)dump_map_view_request,
4552 (dump_func)dump_unmap_view_request,
4553 (dump_func)dump_get_mapping_committed_range_request,
4554 (dump_func)dump_add_mapping_committed_range_request,
4555 (dump_func)dump_is_same_mapping_request,
4556 (dump_func)dump_get_mapping_filename_request,
4557 (dump_func)dump_list_processes_request,
4558 (dump_func)dump_create_debug_obj_request,
4559 (dump_func)dump_wait_debug_event_request,
4560 (dump_func)dump_queue_exception_event_request,
4561 (dump_func)dump_get_exception_status_request,
4562 (dump_func)dump_continue_debug_event_request,
4563 (dump_func)dump_debug_process_request,
4564 (dump_func)dump_set_debug_obj_info_request,
4565 (dump_func)dump_read_process_memory_request,
4566 (dump_func)dump_write_process_memory_request,
4567 (dump_func)dump_create_key_request,
4568 (dump_func)dump_open_key_request,
4569 (dump_func)dump_delete_key_request,
4570 (dump_func)dump_flush_key_request,
4571 (dump_func)dump_enum_key_request,
4572 (dump_func)dump_set_key_value_request,
4573 (dump_func)dump_get_key_value_request,
4574 (dump_func)dump_enum_key_value_request,
4575 (dump_func)dump_delete_key_value_request,
4576 (dump_func)dump_load_registry_request,
4577 (dump_func)dump_unload_registry_request,
4578 (dump_func)dump_save_registry_request,
4579 (dump_func)dump_set_registry_notification_request,
4580 (dump_func)dump_create_timer_request,
4581 (dump_func)dump_open_timer_request,
4582 (dump_func)dump_set_timer_request,
4583 (dump_func)dump_cancel_timer_request,
4584 (dump_func)dump_get_timer_info_request,
4585 (dump_func)dump_get_thread_context_request,
4586 (dump_func)dump_set_thread_context_request,
4587 (dump_func)dump_get_selector_entry_request,
4588 (dump_func)dump_add_atom_request,
4589 (dump_func)dump_delete_atom_request,
4590 (dump_func)dump_find_atom_request,
4591 (dump_func)dump_get_atom_information_request,
4592 (dump_func)dump_get_msg_queue_request,
4593 (dump_func)dump_set_queue_fd_request,
4594 (dump_func)dump_set_queue_mask_request,
4595 (dump_func)dump_get_queue_status_request,
4596 (dump_func)dump_get_process_idle_event_request,
4597 (dump_func)dump_send_message_request,
4598 (dump_func)dump_post_quit_message_request,
4599 (dump_func)dump_send_hardware_message_request,
4600 (dump_func)dump_get_message_request,
4601 (dump_func)dump_reply_message_request,
4602 (dump_func)dump_accept_hardware_message_request,
4603 (dump_func)dump_get_message_reply_request,
4604 (dump_func)dump_set_win_timer_request,
4605 (dump_func)dump_kill_win_timer_request,
4606 (dump_func)dump_is_window_hung_request,
4607 (dump_func)dump_get_serial_info_request,
4608 (dump_func)dump_set_serial_info_request,
4609 (dump_func)dump_register_async_request,
4610 (dump_func)dump_cancel_async_request,
4611 (dump_func)dump_get_async_result_request,
4612 (dump_func)dump_set_async_direct_result_request,
4613 (dump_func)dump_read_request,
4614 (dump_func)dump_write_request,
4615 (dump_func)dump_ioctl_request,
4616 (dump_func)dump_set_irp_result_request,
4617 (dump_func)dump_create_named_pipe_request,
4618 (dump_func)dump_set_named_pipe_info_request,
4619 (dump_func)dump_create_window_request,
4620 (dump_func)dump_destroy_window_request,
4621 (dump_func)dump_get_desktop_window_request,
4622 (dump_func)dump_set_window_owner_request,
4623 (dump_func)dump_get_window_info_request,
4624 (dump_func)dump_set_window_info_request,
4625 (dump_func)dump_set_parent_request,
4626 (dump_func)dump_get_window_parents_request,
4627 (dump_func)dump_get_window_children_request,
4628 (dump_func)dump_get_window_children_from_point_request,
4629 (dump_func)dump_get_window_tree_request,
4630 (dump_func)dump_set_window_pos_request,
4631 (dump_func)dump_get_window_rectangles_request,
4632 (dump_func)dump_get_window_text_request,
4633 (dump_func)dump_set_window_text_request,
4634 (dump_func)dump_get_windows_offset_request,
4635 (dump_func)dump_get_visible_region_request,
4636 (dump_func)dump_get_surface_region_request,
4637 (dump_func)dump_get_window_region_request,
4638 (dump_func)dump_set_window_region_request,
4639 (dump_func)dump_get_update_region_request,
4640 (dump_func)dump_update_window_zorder_request,
4641 (dump_func)dump_redraw_window_request,
4642 (dump_func)dump_set_window_property_request,
4643 (dump_func)dump_remove_window_property_request,
4644 (dump_func)dump_get_window_property_request,
4645 (dump_func)dump_get_window_properties_request,
4646 (dump_func)dump_create_winstation_request,
4647 (dump_func)dump_open_winstation_request,
4648 (dump_func)dump_close_winstation_request,
4649 (dump_func)dump_get_process_winstation_request,
4650 (dump_func)dump_set_process_winstation_request,
4651 (dump_func)dump_enum_winstation_request,
4652 (dump_func)dump_create_desktop_request,
4653 (dump_func)dump_open_desktop_request,
4654 (dump_func)dump_open_input_desktop_request,
4655 (dump_func)dump_close_desktop_request,
4656 (dump_func)dump_get_thread_desktop_request,
4657 (dump_func)dump_set_thread_desktop_request,
4658 (dump_func)dump_enum_desktop_request,
4659 (dump_func)dump_set_user_object_info_request,
4660 (dump_func)dump_register_hotkey_request,
4661 (dump_func)dump_unregister_hotkey_request,
4662 (dump_func)dump_attach_thread_input_request,
4663 (dump_func)dump_get_thread_input_request,
4664 (dump_func)dump_get_last_input_time_request,
4665 (dump_func)dump_get_key_state_request,
4666 (dump_func)dump_set_key_state_request,
4667 (dump_func)dump_set_foreground_window_request,
4668 (dump_func)dump_set_focus_window_request,
4669 (dump_func)dump_set_active_window_request,
4670 (dump_func)dump_set_capture_window_request,
4671 (dump_func)dump_set_caret_window_request,
4672 (dump_func)dump_set_caret_info_request,
4673 (dump_func)dump_set_hook_request,
4674 (dump_func)dump_remove_hook_request,
4675 (dump_func)dump_start_hook_chain_request,
4676 (dump_func)dump_finish_hook_chain_request,
4677 (dump_func)dump_get_hook_info_request,
4678 (dump_func)dump_create_class_request,
4679 (dump_func)dump_destroy_class_request,
4680 (dump_func)dump_set_class_info_request,
4681 (dump_func)dump_open_clipboard_request,
4682 (dump_func)dump_close_clipboard_request,
4683 (dump_func)dump_empty_clipboard_request,
4684 (dump_func)dump_set_clipboard_data_request,
4685 (dump_func)dump_get_clipboard_data_request,
4686 (dump_func)dump_get_clipboard_formats_request,
4687 (dump_func)dump_enum_clipboard_formats_request,
4688 (dump_func)dump_release_clipboard_request,
4689 (dump_func)dump_get_clipboard_info_request,
4690 (dump_func)dump_set_clipboard_viewer_request,
4691 (dump_func)dump_add_clipboard_listener_request,
4692 (dump_func)dump_remove_clipboard_listener_request,
4693 (dump_func)dump_open_token_request,
4694 (dump_func)dump_set_global_windows_request,
4695 (dump_func)dump_adjust_token_privileges_request,
4696 (dump_func)dump_get_token_privileges_request,
4697 (dump_func)dump_check_token_privileges_request,
4698 (dump_func)dump_duplicate_token_request,
4699 (dump_func)dump_filter_token_request,
4700 (dump_func)dump_access_check_request,
4701 (dump_func)dump_get_token_sid_request,
4702 (dump_func)dump_get_token_groups_request,
4703 (dump_func)dump_get_token_default_dacl_request,
4704 (dump_func)dump_set_token_default_dacl_request,
4705 (dump_func)dump_set_security_object_request,
4706 (dump_func)dump_get_security_object_request,
4707 (dump_func)dump_get_system_handles_request,
4708 (dump_func)dump_create_mailslot_request,
4709 (dump_func)dump_set_mailslot_info_request,
4710 (dump_func)dump_create_directory_request,
4711 (dump_func)dump_open_directory_request,
4712 (dump_func)dump_get_directory_entry_request,
4713 (dump_func)dump_create_symlink_request,
4714 (dump_func)dump_open_symlink_request,
4715 (dump_func)dump_query_symlink_request,
4716 (dump_func)dump_get_object_info_request,
4717 (dump_func)dump_get_object_name_request,
4718 (dump_func)dump_get_object_type_request,
4719 (dump_func)dump_get_object_types_request,
4720 (dump_func)dump_allocate_locally_unique_id_request,
4721 (dump_func)dump_create_device_manager_request,
4722 (dump_func)dump_create_device_request,
4723 (dump_func)dump_delete_device_request,
4724 (dump_func)dump_get_next_device_request_request,
4725 (dump_func)dump_get_kernel_object_ptr_request,
4726 (dump_func)dump_set_kernel_object_ptr_request,
4727 (dump_func)dump_grab_kernel_object_request,
4728 (dump_func)dump_release_kernel_object_request,
4729 (dump_func)dump_get_kernel_object_handle_request,
4730 (dump_func)dump_make_process_system_request,
4731 (dump_func)dump_get_token_info_request,
4732 (dump_func)dump_create_linked_token_request,
4733 (dump_func)dump_create_completion_request,
4734 (dump_func)dump_open_completion_request,
4735 (dump_func)dump_add_completion_request,
4736 (dump_func)dump_remove_completion_request,
4737 (dump_func)dump_query_completion_request,
4738 (dump_func)dump_set_completion_info_request,
4739 (dump_func)dump_add_fd_completion_request,
4740 (dump_func)dump_set_fd_completion_mode_request,
4741 (dump_func)dump_set_fd_disp_info_request,
4742 (dump_func)dump_set_fd_name_info_request,
4743 (dump_func)dump_set_fd_eof_info_request,
4744 (dump_func)dump_get_window_layered_info_request,
4745 (dump_func)dump_set_window_layered_info_request,
4746 (dump_func)dump_alloc_user_handle_request,
4747 (dump_func)dump_free_user_handle_request,
4748 (dump_func)dump_set_cursor_request,
4749 (dump_func)dump_get_cursor_history_request,
4750 (dump_func)dump_get_rawinput_buffer_request,
4751 (dump_func)dump_update_rawinput_devices_request,
4752 (dump_func)dump_get_rawinput_devices_request,
4753 (dump_func)dump_create_job_request,
4754 (dump_func)dump_open_job_request,
4755 (dump_func)dump_assign_job_request,
4756 (dump_func)dump_process_in_job_request,
4757 (dump_func)dump_set_job_limits_request,
4758 (dump_func)dump_set_job_completion_port_request,
4759 (dump_func)dump_get_job_info_request,
4760 (dump_func)dump_terminate_job_request,
4761 (dump_func)dump_suspend_process_request,
4762 (dump_func)dump_resume_process_request,
4763 (dump_func)dump_get_next_thread_request,
4766 static const dump_func reply_dumpers[REQ_NB_REQUESTS] = {
4767 (dump_func)dump_new_process_reply,
4768 (dump_func)dump_get_new_process_info_reply,
4769 (dump_func)dump_new_thread_reply,
4770 (dump_func)dump_get_startup_info_reply,
4771 (dump_func)dump_init_process_done_reply,
4772 (dump_func)dump_init_first_thread_reply,
4773 (dump_func)dump_init_thread_reply,
4774 (dump_func)dump_terminate_process_reply,
4775 (dump_func)dump_terminate_thread_reply,
4776 (dump_func)dump_get_process_info_reply,
4777 (dump_func)dump_get_process_debug_info_reply,
4778 (dump_func)dump_get_process_image_name_reply,
4779 (dump_func)dump_get_process_vm_counters_reply,
4780 NULL,
4781 (dump_func)dump_get_thread_info_reply,
4782 (dump_func)dump_get_thread_times_reply,
4783 NULL,
4784 (dump_func)dump_suspend_thread_reply,
4785 (dump_func)dump_resume_thread_reply,
4786 (dump_func)dump_queue_apc_reply,
4787 (dump_func)dump_get_apc_result_reply,
4788 NULL,
4789 (dump_func)dump_set_handle_info_reply,
4790 (dump_func)dump_dup_handle_reply,
4791 NULL,
4792 NULL,
4793 (dump_func)dump_open_process_reply,
4794 (dump_func)dump_open_thread_reply,
4795 (dump_func)dump_select_reply,
4796 (dump_func)dump_create_event_reply,
4797 (dump_func)dump_event_op_reply,
4798 (dump_func)dump_query_event_reply,
4799 (dump_func)dump_open_event_reply,
4800 (dump_func)dump_create_keyed_event_reply,
4801 (dump_func)dump_open_keyed_event_reply,
4802 (dump_func)dump_create_mutex_reply,
4803 (dump_func)dump_release_mutex_reply,
4804 (dump_func)dump_open_mutex_reply,
4805 (dump_func)dump_query_mutex_reply,
4806 (dump_func)dump_create_semaphore_reply,
4807 (dump_func)dump_release_semaphore_reply,
4808 (dump_func)dump_query_semaphore_reply,
4809 (dump_func)dump_open_semaphore_reply,
4810 (dump_func)dump_create_file_reply,
4811 (dump_func)dump_open_file_object_reply,
4812 (dump_func)dump_alloc_file_handle_reply,
4813 (dump_func)dump_get_handle_unix_name_reply,
4814 (dump_func)dump_get_handle_fd_reply,
4815 (dump_func)dump_get_directory_cache_entry_reply,
4816 (dump_func)dump_flush_reply,
4817 (dump_func)dump_get_file_info_reply,
4818 (dump_func)dump_get_volume_info_reply,
4819 (dump_func)dump_lock_file_reply,
4820 NULL,
4821 (dump_func)dump_recv_socket_reply,
4822 (dump_func)dump_send_socket_reply,
4823 (dump_func)dump_get_next_console_request_reply,
4824 NULL,
4825 (dump_func)dump_read_change_reply,
4826 (dump_func)dump_create_mapping_reply,
4827 (dump_func)dump_open_mapping_reply,
4828 (dump_func)dump_get_mapping_info_reply,
4829 NULL,
4830 NULL,
4831 (dump_func)dump_get_mapping_committed_range_reply,
4832 NULL,
4833 NULL,
4834 (dump_func)dump_get_mapping_filename_reply,
4835 (dump_func)dump_list_processes_reply,
4836 (dump_func)dump_create_debug_obj_reply,
4837 (dump_func)dump_wait_debug_event_reply,
4838 (dump_func)dump_queue_exception_event_reply,
4839 NULL,
4840 NULL,
4841 NULL,
4842 NULL,
4843 (dump_func)dump_read_process_memory_reply,
4844 NULL,
4845 (dump_func)dump_create_key_reply,
4846 (dump_func)dump_open_key_reply,
4847 NULL,
4848 NULL,
4849 (dump_func)dump_enum_key_reply,
4850 NULL,
4851 (dump_func)dump_get_key_value_reply,
4852 (dump_func)dump_enum_key_value_reply,
4853 NULL,
4854 NULL,
4855 NULL,
4856 NULL,
4857 NULL,
4858 (dump_func)dump_create_timer_reply,
4859 (dump_func)dump_open_timer_reply,
4860 (dump_func)dump_set_timer_reply,
4861 (dump_func)dump_cancel_timer_reply,
4862 (dump_func)dump_get_timer_info_reply,
4863 (dump_func)dump_get_thread_context_reply,
4864 (dump_func)dump_set_thread_context_reply,
4865 (dump_func)dump_get_selector_entry_reply,
4866 (dump_func)dump_add_atom_reply,
4867 NULL,
4868 (dump_func)dump_find_atom_reply,
4869 (dump_func)dump_get_atom_information_reply,
4870 (dump_func)dump_get_msg_queue_reply,
4871 NULL,
4872 (dump_func)dump_set_queue_mask_reply,
4873 (dump_func)dump_get_queue_status_reply,
4874 (dump_func)dump_get_process_idle_event_reply,
4875 NULL,
4876 NULL,
4877 (dump_func)dump_send_hardware_message_reply,
4878 (dump_func)dump_get_message_reply,
4879 NULL,
4880 NULL,
4881 (dump_func)dump_get_message_reply_reply,
4882 (dump_func)dump_set_win_timer_reply,
4883 NULL,
4884 (dump_func)dump_is_window_hung_reply,
4885 (dump_func)dump_get_serial_info_reply,
4886 NULL,
4887 NULL,
4888 NULL,
4889 (dump_func)dump_get_async_result_reply,
4890 (dump_func)dump_set_async_direct_result_reply,
4891 (dump_func)dump_read_reply,
4892 (dump_func)dump_write_reply,
4893 (dump_func)dump_ioctl_reply,
4894 NULL,
4895 (dump_func)dump_create_named_pipe_reply,
4896 NULL,
4897 (dump_func)dump_create_window_reply,
4898 NULL,
4899 (dump_func)dump_get_desktop_window_reply,
4900 (dump_func)dump_set_window_owner_reply,
4901 (dump_func)dump_get_window_info_reply,
4902 (dump_func)dump_set_window_info_reply,
4903 (dump_func)dump_set_parent_reply,
4904 (dump_func)dump_get_window_parents_reply,
4905 (dump_func)dump_get_window_children_reply,
4906 (dump_func)dump_get_window_children_from_point_reply,
4907 (dump_func)dump_get_window_tree_reply,
4908 (dump_func)dump_set_window_pos_reply,
4909 (dump_func)dump_get_window_rectangles_reply,
4910 (dump_func)dump_get_window_text_reply,
4911 NULL,
4912 (dump_func)dump_get_windows_offset_reply,
4913 (dump_func)dump_get_visible_region_reply,
4914 (dump_func)dump_get_surface_region_reply,
4915 (dump_func)dump_get_window_region_reply,
4916 NULL,
4917 (dump_func)dump_get_update_region_reply,
4918 NULL,
4919 NULL,
4920 NULL,
4921 (dump_func)dump_remove_window_property_reply,
4922 (dump_func)dump_get_window_property_reply,
4923 (dump_func)dump_get_window_properties_reply,
4924 (dump_func)dump_create_winstation_reply,
4925 (dump_func)dump_open_winstation_reply,
4926 NULL,
4927 (dump_func)dump_get_process_winstation_reply,
4928 NULL,
4929 (dump_func)dump_enum_winstation_reply,
4930 (dump_func)dump_create_desktop_reply,
4931 (dump_func)dump_open_desktop_reply,
4932 (dump_func)dump_open_input_desktop_reply,
4933 NULL,
4934 (dump_func)dump_get_thread_desktop_reply,
4935 NULL,
4936 (dump_func)dump_enum_desktop_reply,
4937 (dump_func)dump_set_user_object_info_reply,
4938 (dump_func)dump_register_hotkey_reply,
4939 (dump_func)dump_unregister_hotkey_reply,
4940 NULL,
4941 (dump_func)dump_get_thread_input_reply,
4942 (dump_func)dump_get_last_input_time_reply,
4943 (dump_func)dump_get_key_state_reply,
4944 NULL,
4945 (dump_func)dump_set_foreground_window_reply,
4946 (dump_func)dump_set_focus_window_reply,
4947 (dump_func)dump_set_active_window_reply,
4948 (dump_func)dump_set_capture_window_reply,
4949 (dump_func)dump_set_caret_window_reply,
4950 (dump_func)dump_set_caret_info_reply,
4951 (dump_func)dump_set_hook_reply,
4952 (dump_func)dump_remove_hook_reply,
4953 (dump_func)dump_start_hook_chain_reply,
4954 NULL,
4955 (dump_func)dump_get_hook_info_reply,
4956 (dump_func)dump_create_class_reply,
4957 (dump_func)dump_destroy_class_reply,
4958 (dump_func)dump_set_class_info_reply,
4959 (dump_func)dump_open_clipboard_reply,
4960 (dump_func)dump_close_clipboard_reply,
4961 NULL,
4962 (dump_func)dump_set_clipboard_data_reply,
4963 (dump_func)dump_get_clipboard_data_reply,
4964 (dump_func)dump_get_clipboard_formats_reply,
4965 (dump_func)dump_enum_clipboard_formats_reply,
4966 (dump_func)dump_release_clipboard_reply,
4967 (dump_func)dump_get_clipboard_info_reply,
4968 (dump_func)dump_set_clipboard_viewer_reply,
4969 NULL,
4970 NULL,
4971 (dump_func)dump_open_token_reply,
4972 (dump_func)dump_set_global_windows_reply,
4973 (dump_func)dump_adjust_token_privileges_reply,
4974 (dump_func)dump_get_token_privileges_reply,
4975 (dump_func)dump_check_token_privileges_reply,
4976 (dump_func)dump_duplicate_token_reply,
4977 (dump_func)dump_filter_token_reply,
4978 (dump_func)dump_access_check_reply,
4979 (dump_func)dump_get_token_sid_reply,
4980 (dump_func)dump_get_token_groups_reply,
4981 (dump_func)dump_get_token_default_dacl_reply,
4982 NULL,
4983 NULL,
4984 (dump_func)dump_get_security_object_reply,
4985 (dump_func)dump_get_system_handles_reply,
4986 (dump_func)dump_create_mailslot_reply,
4987 (dump_func)dump_set_mailslot_info_reply,
4988 (dump_func)dump_create_directory_reply,
4989 (dump_func)dump_open_directory_reply,
4990 (dump_func)dump_get_directory_entry_reply,
4991 (dump_func)dump_create_symlink_reply,
4992 (dump_func)dump_open_symlink_reply,
4993 (dump_func)dump_query_symlink_reply,
4994 (dump_func)dump_get_object_info_reply,
4995 (dump_func)dump_get_object_name_reply,
4996 (dump_func)dump_get_object_type_reply,
4997 (dump_func)dump_get_object_types_reply,
4998 (dump_func)dump_allocate_locally_unique_id_reply,
4999 (dump_func)dump_create_device_manager_reply,
5000 NULL,
5001 NULL,
5002 (dump_func)dump_get_next_device_request_reply,
5003 (dump_func)dump_get_kernel_object_ptr_reply,
5004 NULL,
5005 NULL,
5006 NULL,
5007 (dump_func)dump_get_kernel_object_handle_reply,
5008 (dump_func)dump_make_process_system_reply,
5009 (dump_func)dump_get_token_info_reply,
5010 (dump_func)dump_create_linked_token_reply,
5011 (dump_func)dump_create_completion_reply,
5012 (dump_func)dump_open_completion_reply,
5013 NULL,
5014 (dump_func)dump_remove_completion_reply,
5015 (dump_func)dump_query_completion_reply,
5016 NULL,
5017 NULL,
5018 NULL,
5019 NULL,
5020 NULL,
5021 NULL,
5022 (dump_func)dump_get_window_layered_info_reply,
5023 NULL,
5024 (dump_func)dump_alloc_user_handle_reply,
5025 NULL,
5026 (dump_func)dump_set_cursor_reply,
5027 (dump_func)dump_get_cursor_history_reply,
5028 (dump_func)dump_get_rawinput_buffer_reply,
5029 NULL,
5030 (dump_func)dump_get_rawinput_devices_reply,
5031 (dump_func)dump_create_job_reply,
5032 (dump_func)dump_open_job_reply,
5033 NULL,
5034 NULL,
5035 NULL,
5036 NULL,
5037 (dump_func)dump_get_job_info_reply,
5038 NULL,
5039 NULL,
5040 NULL,
5041 (dump_func)dump_get_next_thread_reply,
5044 static const char * const req_names[REQ_NB_REQUESTS] = {
5045 "new_process",
5046 "get_new_process_info",
5047 "new_thread",
5048 "get_startup_info",
5049 "init_process_done",
5050 "init_first_thread",
5051 "init_thread",
5052 "terminate_process",
5053 "terminate_thread",
5054 "get_process_info",
5055 "get_process_debug_info",
5056 "get_process_image_name",
5057 "get_process_vm_counters",
5058 "set_process_info",
5059 "get_thread_info",
5060 "get_thread_times",
5061 "set_thread_info",
5062 "suspend_thread",
5063 "resume_thread",
5064 "queue_apc",
5065 "get_apc_result",
5066 "close_handle",
5067 "set_handle_info",
5068 "dup_handle",
5069 "compare_objects",
5070 "make_temporary",
5071 "open_process",
5072 "open_thread",
5073 "select",
5074 "create_event",
5075 "event_op",
5076 "query_event",
5077 "open_event",
5078 "create_keyed_event",
5079 "open_keyed_event",
5080 "create_mutex",
5081 "release_mutex",
5082 "open_mutex",
5083 "query_mutex",
5084 "create_semaphore",
5085 "release_semaphore",
5086 "query_semaphore",
5087 "open_semaphore",
5088 "create_file",
5089 "open_file_object",
5090 "alloc_file_handle",
5091 "get_handle_unix_name",
5092 "get_handle_fd",
5093 "get_directory_cache_entry",
5094 "flush",
5095 "get_file_info",
5096 "get_volume_info",
5097 "lock_file",
5098 "unlock_file",
5099 "recv_socket",
5100 "send_socket",
5101 "get_next_console_request",
5102 "read_directory_changes",
5103 "read_change",
5104 "create_mapping",
5105 "open_mapping",
5106 "get_mapping_info",
5107 "map_view",
5108 "unmap_view",
5109 "get_mapping_committed_range",
5110 "add_mapping_committed_range",
5111 "is_same_mapping",
5112 "get_mapping_filename",
5113 "list_processes",
5114 "create_debug_obj",
5115 "wait_debug_event",
5116 "queue_exception_event",
5117 "get_exception_status",
5118 "continue_debug_event",
5119 "debug_process",
5120 "set_debug_obj_info",
5121 "read_process_memory",
5122 "write_process_memory",
5123 "create_key",
5124 "open_key",
5125 "delete_key",
5126 "flush_key",
5127 "enum_key",
5128 "set_key_value",
5129 "get_key_value",
5130 "enum_key_value",
5131 "delete_key_value",
5132 "load_registry",
5133 "unload_registry",
5134 "save_registry",
5135 "set_registry_notification",
5136 "create_timer",
5137 "open_timer",
5138 "set_timer",
5139 "cancel_timer",
5140 "get_timer_info",
5141 "get_thread_context",
5142 "set_thread_context",
5143 "get_selector_entry",
5144 "add_atom",
5145 "delete_atom",
5146 "find_atom",
5147 "get_atom_information",
5148 "get_msg_queue",
5149 "set_queue_fd",
5150 "set_queue_mask",
5151 "get_queue_status",
5152 "get_process_idle_event",
5153 "send_message",
5154 "post_quit_message",
5155 "send_hardware_message",
5156 "get_message",
5157 "reply_message",
5158 "accept_hardware_message",
5159 "get_message_reply",
5160 "set_win_timer",
5161 "kill_win_timer",
5162 "is_window_hung",
5163 "get_serial_info",
5164 "set_serial_info",
5165 "register_async",
5166 "cancel_async",
5167 "get_async_result",
5168 "set_async_direct_result",
5169 "read",
5170 "write",
5171 "ioctl",
5172 "set_irp_result",
5173 "create_named_pipe",
5174 "set_named_pipe_info",
5175 "create_window",
5176 "destroy_window",
5177 "get_desktop_window",
5178 "set_window_owner",
5179 "get_window_info",
5180 "set_window_info",
5181 "set_parent",
5182 "get_window_parents",
5183 "get_window_children",
5184 "get_window_children_from_point",
5185 "get_window_tree",
5186 "set_window_pos",
5187 "get_window_rectangles",
5188 "get_window_text",
5189 "set_window_text",
5190 "get_windows_offset",
5191 "get_visible_region",
5192 "get_surface_region",
5193 "get_window_region",
5194 "set_window_region",
5195 "get_update_region",
5196 "update_window_zorder",
5197 "redraw_window",
5198 "set_window_property",
5199 "remove_window_property",
5200 "get_window_property",
5201 "get_window_properties",
5202 "create_winstation",
5203 "open_winstation",
5204 "close_winstation",
5205 "get_process_winstation",
5206 "set_process_winstation",
5207 "enum_winstation",
5208 "create_desktop",
5209 "open_desktop",
5210 "open_input_desktop",
5211 "close_desktop",
5212 "get_thread_desktop",
5213 "set_thread_desktop",
5214 "enum_desktop",
5215 "set_user_object_info",
5216 "register_hotkey",
5217 "unregister_hotkey",
5218 "attach_thread_input",
5219 "get_thread_input",
5220 "get_last_input_time",
5221 "get_key_state",
5222 "set_key_state",
5223 "set_foreground_window",
5224 "set_focus_window",
5225 "set_active_window",
5226 "set_capture_window",
5227 "set_caret_window",
5228 "set_caret_info",
5229 "set_hook",
5230 "remove_hook",
5231 "start_hook_chain",
5232 "finish_hook_chain",
5233 "get_hook_info",
5234 "create_class",
5235 "destroy_class",
5236 "set_class_info",
5237 "open_clipboard",
5238 "close_clipboard",
5239 "empty_clipboard",
5240 "set_clipboard_data",
5241 "get_clipboard_data",
5242 "get_clipboard_formats",
5243 "enum_clipboard_formats",
5244 "release_clipboard",
5245 "get_clipboard_info",
5246 "set_clipboard_viewer",
5247 "add_clipboard_listener",
5248 "remove_clipboard_listener",
5249 "open_token",
5250 "set_global_windows",
5251 "adjust_token_privileges",
5252 "get_token_privileges",
5253 "check_token_privileges",
5254 "duplicate_token",
5255 "filter_token",
5256 "access_check",
5257 "get_token_sid",
5258 "get_token_groups",
5259 "get_token_default_dacl",
5260 "set_token_default_dacl",
5261 "set_security_object",
5262 "get_security_object",
5263 "get_system_handles",
5264 "create_mailslot",
5265 "set_mailslot_info",
5266 "create_directory",
5267 "open_directory",
5268 "get_directory_entry",
5269 "create_symlink",
5270 "open_symlink",
5271 "query_symlink",
5272 "get_object_info",
5273 "get_object_name",
5274 "get_object_type",
5275 "get_object_types",
5276 "allocate_locally_unique_id",
5277 "create_device_manager",
5278 "create_device",
5279 "delete_device",
5280 "get_next_device_request",
5281 "get_kernel_object_ptr",
5282 "set_kernel_object_ptr",
5283 "grab_kernel_object",
5284 "release_kernel_object",
5285 "get_kernel_object_handle",
5286 "make_process_system",
5287 "get_token_info",
5288 "create_linked_token",
5289 "create_completion",
5290 "open_completion",
5291 "add_completion",
5292 "remove_completion",
5293 "query_completion",
5294 "set_completion_info",
5295 "add_fd_completion",
5296 "set_fd_completion_mode",
5297 "set_fd_disp_info",
5298 "set_fd_name_info",
5299 "set_fd_eof_info",
5300 "get_window_layered_info",
5301 "set_window_layered_info",
5302 "alloc_user_handle",
5303 "free_user_handle",
5304 "set_cursor",
5305 "get_cursor_history",
5306 "get_rawinput_buffer",
5307 "update_rawinput_devices",
5308 "get_rawinput_devices",
5309 "create_job",
5310 "open_job",
5311 "assign_job",
5312 "process_in_job",
5313 "set_job_limits",
5314 "set_job_completion_port",
5315 "get_job_info",
5316 "terminate_job",
5317 "suspend_process",
5318 "resume_process",
5319 "get_next_thread",
5322 static const struct
5324 const char *name;
5325 unsigned int value;
5326 } status_names[] =
5328 { "ABANDONED_WAIT_0", STATUS_ABANDONED_WAIT_0 },
5329 { "ACCESS_DENIED", STATUS_ACCESS_DENIED },
5330 { "ACCESS_VIOLATION", STATUS_ACCESS_VIOLATION },
5331 { "ADDRESS_ALREADY_ASSOCIATED", STATUS_ADDRESS_ALREADY_ASSOCIATED },
5332 { "ALERTED", STATUS_ALERTED },
5333 { "BAD_DEVICE_TYPE", STATUS_BAD_DEVICE_TYPE },
5334 { "BAD_IMPERSONATION_LEVEL", STATUS_BAD_IMPERSONATION_LEVEL },
5335 { "BUFFER_OVERFLOW", STATUS_BUFFER_OVERFLOW },
5336 { "BUFFER_TOO_SMALL", STATUS_BUFFER_TOO_SMALL },
5337 { "CANCELLED", STATUS_CANCELLED },
5338 { "CANNOT_DELETE", STATUS_CANNOT_DELETE },
5339 { "CANT_OPEN_ANONYMOUS", STATUS_CANT_OPEN_ANONYMOUS },
5340 { "CHILD_MUST_BE_VOLATILE", STATUS_CHILD_MUST_BE_VOLATILE },
5341 { "CONNECTION_ABORTED", STATUS_CONNECTION_ABORTED },
5342 { "CONNECTION_ACTIVE", STATUS_CONNECTION_ACTIVE },
5343 { "CONNECTION_REFUSED", STATUS_CONNECTION_REFUSED },
5344 { "CONNECTION_RESET", STATUS_CONNECTION_RESET },
5345 { "DEBUGGER_INACTIVE", STATUS_DEBUGGER_INACTIVE },
5346 { "DEVICE_BUSY", STATUS_DEVICE_BUSY },
5347 { "DEVICE_NOT_READY", STATUS_DEVICE_NOT_READY },
5348 { "DIRECTORY_NOT_EMPTY", STATUS_DIRECTORY_NOT_EMPTY },
5349 { "DISK_FULL", STATUS_DISK_FULL },
5350 { "DLL_NOT_FOUND", STATUS_DLL_NOT_FOUND },
5351 { "ERROR_CLASS_ALREADY_EXISTS", 0xc0010000 | ERROR_CLASS_ALREADY_EXISTS },
5352 { "ERROR_CLASS_DOES_NOT_EXIST", 0xc0010000 | ERROR_CLASS_DOES_NOT_EXIST },
5353 { "ERROR_CLASS_HAS_WINDOWS", 0xc0010000 | ERROR_CLASS_HAS_WINDOWS },
5354 { "ERROR_CLIPBOARD_NOT_OPEN", 0xc0010000 | ERROR_CLIPBOARD_NOT_OPEN },
5355 { "ERROR_HOTKEY_ALREADY_REGISTERED", 0xc0010000 | ERROR_HOTKEY_ALREADY_REGISTERED },
5356 { "ERROR_HOTKEY_NOT_REGISTERED", 0xc0010000 | ERROR_HOTKEY_NOT_REGISTERED },
5357 { "ERROR_INVALID_CURSOR_HANDLE", 0xc0010000 | ERROR_INVALID_CURSOR_HANDLE },
5358 { "ERROR_INVALID_INDEX", 0xc0010000 | ERROR_INVALID_INDEX },
5359 { "ERROR_INVALID_WINDOW_HANDLE", 0xc0010000 | ERROR_INVALID_WINDOW_HANDLE },
5360 { "ERROR_NO_MORE_USER_HANDLES", 0xc0010000 | ERROR_NO_MORE_USER_HANDLES },
5361 { "ERROR_WINDOW_OF_OTHER_THREAD", 0xc0010000 | ERROR_WINDOW_OF_OTHER_THREAD },
5362 { "FILE_DELETED", STATUS_FILE_DELETED },
5363 { "FILE_INVALID", STATUS_FILE_INVALID },
5364 { "FILE_IS_A_DIRECTORY", STATUS_FILE_IS_A_DIRECTORY },
5365 { "FILE_LOCK_CONFLICT", STATUS_FILE_LOCK_CONFLICT },
5366 { "GENERIC_NOT_MAPPED", STATUS_GENERIC_NOT_MAPPED },
5367 { "HANDLES_CLOSED", STATUS_HANDLES_CLOSED },
5368 { "HANDLE_NOT_CLOSABLE", STATUS_HANDLE_NOT_CLOSABLE },
5369 { "HOST_UNREACHABLE", STATUS_HOST_UNREACHABLE },
5370 { "ILLEGAL_FUNCTION", STATUS_ILLEGAL_FUNCTION },
5371 { "IMAGE_NOT_AT_BASE", STATUS_IMAGE_NOT_AT_BASE },
5372 { "INFO_LENGTH_MISMATCH", STATUS_INFO_LENGTH_MISMATCH },
5373 { "INSTANCE_NOT_AVAILABLE", STATUS_INSTANCE_NOT_AVAILABLE },
5374 { "INSUFFICIENT_RESOURCES", STATUS_INSUFFICIENT_RESOURCES },
5375 { "INVALID_ACL", STATUS_INVALID_ACL },
5376 { "INVALID_ADDRESS", STATUS_INVALID_ADDRESS },
5377 { "INVALID_ADDRESS_COMPONENT", STATUS_INVALID_ADDRESS_COMPONENT },
5378 { "INVALID_CID", STATUS_INVALID_CID },
5379 { "INVALID_CONNECTION", STATUS_INVALID_CONNECTION },
5380 { "INVALID_DEVICE_REQUEST", STATUS_INVALID_DEVICE_REQUEST },
5381 { "INVALID_FILE_FOR_SECTION", STATUS_INVALID_FILE_FOR_SECTION },
5382 { "INVALID_HANDLE", STATUS_INVALID_HANDLE },
5383 { "INVALID_IMAGE_FORMAT", STATUS_INVALID_IMAGE_FORMAT },
5384 { "INVALID_IMAGE_NE_FORMAT", STATUS_INVALID_IMAGE_NE_FORMAT },
5385 { "INVALID_IMAGE_NOT_MZ", STATUS_INVALID_IMAGE_NOT_MZ },
5386 { "INVALID_IMAGE_PROTECT", STATUS_INVALID_IMAGE_PROTECT },
5387 { "INVALID_IMAGE_WIN_16", STATUS_INVALID_IMAGE_WIN_16 },
5388 { "INVALID_IMAGE_WIN_64", STATUS_INVALID_IMAGE_WIN_64 },
5389 { "INVALID_LOCK_SEQUENCE", STATUS_INVALID_LOCK_SEQUENCE },
5390 { "INVALID_OWNER", STATUS_INVALID_OWNER },
5391 { "INVALID_PARAMETER", STATUS_INVALID_PARAMETER },
5392 { "INVALID_PIPE_STATE", STATUS_INVALID_PIPE_STATE },
5393 { "INVALID_READ_MODE", STATUS_INVALID_READ_MODE },
5394 { "INVALID_SECURITY_DESCR", STATUS_INVALID_SECURITY_DESCR },
5395 { "IO_TIMEOUT", STATUS_IO_TIMEOUT },
5396 { "KERNEL_APC", STATUS_KERNEL_APC },
5397 { "KEY_DELETED", STATUS_KEY_DELETED },
5398 { "MAPPED_FILE_SIZE_ZERO", STATUS_MAPPED_FILE_SIZE_ZERO },
5399 { "MUTANT_NOT_OWNED", STATUS_MUTANT_NOT_OWNED },
5400 { "NAME_TOO_LONG", STATUS_NAME_TOO_LONG },
5401 { "NETWORK_BUSY", STATUS_NETWORK_BUSY },
5402 { "NETWORK_UNREACHABLE", STATUS_NETWORK_UNREACHABLE },
5403 { "NOT_ALL_ASSIGNED", STATUS_NOT_ALL_ASSIGNED },
5404 { "NOT_A_DIRECTORY", STATUS_NOT_A_DIRECTORY },
5405 { "NOT_FOUND", STATUS_NOT_FOUND },
5406 { "NOT_IMPLEMENTED", STATUS_NOT_IMPLEMENTED },
5407 { "NOT_MAPPED_VIEW", STATUS_NOT_MAPPED_VIEW },
5408 { "NOT_REGISTRY_FILE", STATUS_NOT_REGISTRY_FILE },
5409 { "NOT_SAME_DEVICE", STATUS_NOT_SAME_DEVICE },
5410 { "NOT_SAME_OBJECT", STATUS_NOT_SAME_OBJECT },
5411 { "NOT_SUPPORTED", STATUS_NOT_SUPPORTED },
5412 { "NO_DATA_DETECTED", STATUS_NO_DATA_DETECTED },
5413 { "NO_IMPERSONATION_TOKEN", STATUS_NO_IMPERSONATION_TOKEN },
5414 { "NO_MEMORY", STATUS_NO_MEMORY },
5415 { "NO_MORE_ENTRIES", STATUS_NO_MORE_ENTRIES },
5416 { "NO_SUCH_DEVICE", STATUS_NO_SUCH_DEVICE },
5417 { "NO_SUCH_FILE", STATUS_NO_SUCH_FILE },
5418 { "NO_TOKEN", STATUS_NO_TOKEN },
5419 { "OBJECT_NAME_COLLISION", STATUS_OBJECT_NAME_COLLISION },
5420 { "OBJECT_NAME_EXISTS", STATUS_OBJECT_NAME_EXISTS },
5421 { "OBJECT_NAME_INVALID", STATUS_OBJECT_NAME_INVALID },
5422 { "OBJECT_NAME_NOT_FOUND", STATUS_OBJECT_NAME_NOT_FOUND },
5423 { "OBJECT_PATH_INVALID", STATUS_OBJECT_PATH_INVALID },
5424 { "OBJECT_PATH_NOT_FOUND", STATUS_OBJECT_PATH_NOT_FOUND },
5425 { "OBJECT_PATH_SYNTAX_BAD", STATUS_OBJECT_PATH_SYNTAX_BAD },
5426 { "OBJECT_TYPE_MISMATCH", STATUS_OBJECT_TYPE_MISMATCH },
5427 { "PENDING", STATUS_PENDING },
5428 { "PIPE_BROKEN", STATUS_PIPE_BROKEN },
5429 { "PIPE_BUSY", STATUS_PIPE_BUSY },
5430 { "PIPE_CLOSING", STATUS_PIPE_CLOSING },
5431 { "PIPE_CONNECTED", STATUS_PIPE_CONNECTED },
5432 { "PIPE_DISCONNECTED", STATUS_PIPE_DISCONNECTED },
5433 { "PIPE_EMPTY", STATUS_PIPE_EMPTY },
5434 { "PIPE_LISTENING", STATUS_PIPE_LISTENING },
5435 { "PIPE_NOT_AVAILABLE", STATUS_PIPE_NOT_AVAILABLE },
5436 { "PORT_NOT_SET", STATUS_PORT_NOT_SET },
5437 { "PREDEFINED_HANDLE", STATUS_PREDEFINED_HANDLE },
5438 { "PRIVILEGE_NOT_HELD", STATUS_PRIVILEGE_NOT_HELD },
5439 { "PROCESS_IN_JOB", STATUS_PROCESS_IN_JOB },
5440 { "PROCESS_IS_TERMINATING", STATUS_PROCESS_IS_TERMINATING },
5441 { "PROCESS_NOT_IN_JOB", STATUS_PROCESS_NOT_IN_JOB },
5442 { "REPARSE_POINT_NOT_RESOLVED", STATUS_REPARSE_POINT_NOT_RESOLVED },
5443 { "SECTION_TOO_BIG", STATUS_SECTION_TOO_BIG },
5444 { "SEMAPHORE_LIMIT_EXCEEDED", STATUS_SEMAPHORE_LIMIT_EXCEEDED },
5445 { "SHARING_VIOLATION", STATUS_SHARING_VIOLATION },
5446 { "SHUTDOWN_IN_PROGRESS", STATUS_SHUTDOWN_IN_PROGRESS },
5447 { "SUSPEND_COUNT_EXCEEDED", STATUS_SUSPEND_COUNT_EXCEEDED },
5448 { "THREAD_IS_TERMINATING", STATUS_THREAD_IS_TERMINATING },
5449 { "TIMEOUT", STATUS_TIMEOUT },
5450 { "TOO_MANY_OPENED_FILES", STATUS_TOO_MANY_OPENED_FILES },
5451 { "UNSUCCESSFUL", STATUS_UNSUCCESSFUL },
5452 { "USER_APC", STATUS_USER_APC },
5453 { "USER_MAPPED_FILE", STATUS_USER_MAPPED_FILE },
5454 { "VOLUME_DISMOUNTED", STATUS_VOLUME_DISMOUNTED },
5455 { "WAS_LOCKED", STATUS_WAS_LOCKED },
5456 { "WSAEACCES", 0xc0010000 | WSAEACCES },
5457 { "WSAEADDRINUSE", 0xc0010000 | WSAEADDRINUSE },
5458 { "WSAEADDRNOTAVAIL", 0xc0010000 | WSAEADDRNOTAVAIL },
5459 { "WSAEAFNOSUPPORT", 0xc0010000 | WSAEAFNOSUPPORT },
5460 { "WSAEALREADY", 0xc0010000 | WSAEALREADY },
5461 { "WSAEBADF", 0xc0010000 | WSAEBADF },
5462 { "WSAECONNABORTED", 0xc0010000 | WSAECONNABORTED },
5463 { "WSAECONNREFUSED", 0xc0010000 | WSAECONNREFUSED },
5464 { "WSAECONNRESET", 0xc0010000 | WSAECONNRESET },
5465 { "WSAEDESTADDRREQ", 0xc0010000 | WSAEDESTADDRREQ },
5466 { "WSAEDQUOT", 0xc0010000 | WSAEDQUOT },
5467 { "WSAEFAULT", 0xc0010000 | WSAEFAULT },
5468 { "WSAEHOSTDOWN", 0xc0010000 | WSAEHOSTDOWN },
5469 { "WSAEHOSTUNREACH", 0xc0010000 | WSAEHOSTUNREACH },
5470 { "WSAEINTR", 0xc0010000 | WSAEINTR },
5471 { "WSAEINVAL", 0xc0010000 | WSAEINVAL },
5472 { "WSAEISCONN", 0xc0010000 | WSAEISCONN },
5473 { "WSAELOOP", 0xc0010000 | WSAELOOP },
5474 { "WSAEMFILE", 0xc0010000 | WSAEMFILE },
5475 { "WSAEMSGSIZE", 0xc0010000 | WSAEMSGSIZE },
5476 { "WSAENAMETOOLONG", 0xc0010000 | WSAENAMETOOLONG },
5477 { "WSAENETDOWN", 0xc0010000 | WSAENETDOWN },
5478 { "WSAENETRESET", 0xc0010000 | WSAENETRESET },
5479 { "WSAENETUNREACH", 0xc0010000 | WSAENETUNREACH },
5480 { "WSAENOBUFS", 0xc0010000 | WSAENOBUFS },
5481 { "WSAENOPROTOOPT", 0xc0010000 | WSAENOPROTOOPT },
5482 { "WSAENOTCONN", 0xc0010000 | WSAENOTCONN },
5483 { "WSAENOTEMPTY", 0xc0010000 | WSAENOTEMPTY },
5484 { "WSAENOTSOCK", 0xc0010000 | WSAENOTSOCK },
5485 { "WSAEOPNOTSUPP", 0xc0010000 | WSAEOPNOTSUPP },
5486 { "WSAEPFNOSUPPORT", 0xc0010000 | WSAEPFNOSUPPORT },
5487 { "WSAEPROCLIM", 0xc0010000 | WSAEPROCLIM },
5488 { "WSAEPROTONOSUPPORT", 0xc0010000 | WSAEPROTONOSUPPORT },
5489 { "WSAEPROTOTYPE", 0xc0010000 | WSAEPROTOTYPE },
5490 { "WSAEREMOTE", 0xc0010000 | WSAEREMOTE },
5491 { "WSAESHUTDOWN", 0xc0010000 | WSAESHUTDOWN },
5492 { "WSAESOCKTNOSUPPORT", 0xc0010000 | WSAESOCKTNOSUPPORT },
5493 { "WSAESTALE", 0xc0010000 | WSAESTALE },
5494 { "WSAETIMEDOUT", 0xc0010000 | WSAETIMEDOUT },
5495 { "WSAETOOMANYREFS", 0xc0010000 | WSAETOOMANYREFS },
5496 { "WSAEUSERS", 0xc0010000 | WSAEUSERS },
5497 { "WSAEWOULDBLOCK", 0xc0010000 | WSAEWOULDBLOCK },
5498 { NULL, 0 }
5501 /* ### make_requests end ### */
5502 /* Everything above this line is generated automatically by tools/make_requests */
5504 static const char *get_status_name( unsigned int status )
5506 int i;
5507 static char buffer[10];
5509 if (status)
5511 for (i = 0; status_names[i].name; i++)
5512 if (status_names[i].value == status) return status_names[i].name;
5514 sprintf( buffer, "%x", status );
5515 return buffer;
5518 void trace_request(void)
5520 enum request req = current->req.request_header.req;
5521 if (req < REQ_NB_REQUESTS)
5523 fprintf( stderr, "%04x: %s(", current->id, req_names[req] );
5524 if (req_dumpers[req])
5526 cur_data = get_req_data();
5527 cur_size = get_req_data_size();
5528 req_dumpers[req]( &current->req );
5530 fprintf( stderr, " )\n" );
5532 else fprintf( stderr, "%04x: %d(?)\n", current->id, req );
5535 void trace_reply( enum request req, const union generic_reply *reply )
5537 if (req < REQ_NB_REQUESTS)
5539 fprintf( stderr, "%04x: %s() = %s",
5540 current->id, req_names[req], get_status_name(current->error) );
5541 if (reply_dumpers[req])
5543 fprintf( stderr, " {" );
5544 cur_data = current->reply_data;
5545 cur_size = reply->reply_header.reply_size;
5546 reply_dumpers[req]( reply );
5547 fprintf( stderr, " }" );
5549 fputc( '\n', stderr );
5551 else fprintf( stderr, "%04x: %d() = %s\n",
5552 current->id, req, get_status_name(current->error) );