server: Use a separate request to retrieve the object name.
[wine.git] / server / trace.c
blobb3eea8464534c3960ba361cee596ebded54695b8
1 /*
2 * Server request tracing
4 * Copyright (C) 1999 Alexandre Julliard
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #include "config.h"
22 #include "wine/port.h"
24 #include <ctype.h>
25 #include <stdarg.h>
26 #include <stdio.h>
27 #include <sys/types.h>
29 #ifdef HAVE_SYS_UIO_H
30 #include <sys/uio.h>
31 #endif
33 #include "ntstatus.h"
34 #define WIN32_NO_STATUS
35 #include "windef.h"
36 #include "winbase.h"
37 #include "wincon.h"
38 #include "winternl.h"
39 #include "winuser.h"
40 #include "winioctl.h"
41 #include "wine/condrv.h"
42 #include "ddk/wdm.h"
43 #include "ddk/ntddser.h"
44 #define USE_WS_PREFIX
45 #include "winsock2.h"
46 #include "file.h"
47 #include "request.h"
48 #include "unicode.h"
50 static const void *cur_data;
51 static data_size_t cur_size;
53 static const char *get_status_name( unsigned int status );
55 /* utility functions */
57 static inline void remove_data( data_size_t size )
59 cur_data = (const char *)cur_data + size;
60 cur_size -= size;
63 static void dump_uints( const char *prefix, const unsigned int *ptr, int len )
65 fprintf( stderr, "%s{", prefix );
66 while (len > 0)
68 fprintf( stderr, "%08x", *ptr++ );
69 if (--len) fputc( ',', stderr );
71 fputc( '}', stderr );
74 static void dump_handles( const char *prefix, const obj_handle_t *data, data_size_t size )
76 data_size_t len = size / sizeof(*data);
78 fprintf( stderr,"%s{", prefix );
79 while (len > 0)
81 fprintf( stderr, "%04x", *data++ );
82 if (--len) fputc( ',', stderr );
84 fputc( '}', stderr );
87 static void dump_timeout( const char *prefix, const timeout_t *time )
89 fprintf( stderr, "%s%s", prefix, get_timeout_str(*time) );
92 static void dump_abstime( const char *prefix, const abstime_t *when )
94 timeout_t timeout = abstime_to_timeout( *when );
95 dump_timeout( prefix, &timeout );
98 static void dump_uint64( const char *prefix, const unsigned __int64 *val )
100 if ((unsigned int)*val != *val)
101 fprintf( stderr, "%s%x%08x", prefix, (unsigned int)(*val >> 32), (unsigned int)*val );
102 else
103 fprintf( stderr, "%s%08x", prefix, (unsigned int)*val );
106 static void dump_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", get_status_name(call->async_io.status) );
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 case APC_BREAK_PROCESS:
242 fprintf( stderr, "APC_BREAK_PROCESS" );
243 break;
244 default:
245 fprintf( stderr, "type=%u", call->type );
246 break;
248 fputc( '}', stderr );
251 static void dump_apc_result( const char *prefix, const apc_result_t *result )
253 fprintf( stderr, "%s{", prefix );
254 switch(result->type)
256 case APC_NONE:
257 break;
258 case APC_ASYNC_IO:
259 fprintf( stderr, "APC_ASYNC_IO,status=%s,total=%u",
260 get_status_name( result->async_io.status ), result->async_io.total );
261 break;
262 case APC_VIRTUAL_ALLOC:
263 fprintf( stderr, "APC_VIRTUAL_ALLOC,status=%s",
264 get_status_name( result->virtual_alloc.status ));
265 dump_uint64( ",addr=", &result->virtual_alloc.addr );
266 dump_uint64( ",size=", &result->virtual_alloc.size );
267 break;
268 case APC_VIRTUAL_FREE:
269 fprintf( stderr, "APC_VIRTUAL_FREE,status=%s",
270 get_status_name( result->virtual_free.status ));
271 dump_uint64( ",addr=", &result->virtual_free.addr );
272 dump_uint64( ",size=", &result->virtual_free.size );
273 break;
274 case APC_VIRTUAL_QUERY:
275 fprintf( stderr, "APC_VIRTUAL_QUERY,status=%s",
276 get_status_name( result->virtual_query.status ));
277 dump_uint64( ",base=", &result->virtual_query.base );
278 dump_uint64( ",alloc_base=", &result->virtual_query.alloc_base );
279 dump_uint64( ",size=", &result->virtual_query.size );
280 fprintf( stderr, ",state=%x,prot=%x,alloc_prot=%x,alloc_type=%x",
281 result->virtual_query.state, result->virtual_query.prot,
282 result->virtual_query.alloc_prot, result->virtual_query.alloc_type );
283 break;
284 case APC_VIRTUAL_PROTECT:
285 fprintf( stderr, "APC_VIRTUAL_PROTECT,status=%s",
286 get_status_name( result->virtual_protect.status ));
287 dump_uint64( ",addr=", &result->virtual_protect.addr );
288 dump_uint64( ",size=", &result->virtual_protect.size );
289 fprintf( stderr, ",prot=%x", result->virtual_protect.prot );
290 break;
291 case APC_VIRTUAL_FLUSH:
292 fprintf( stderr, "APC_VIRTUAL_FLUSH,status=%s",
293 get_status_name( result->virtual_flush.status ));
294 dump_uint64( ",addr=", &result->virtual_flush.addr );
295 dump_uint64( ",size=", &result->virtual_flush.size );
296 break;
297 case APC_VIRTUAL_LOCK:
298 fprintf( stderr, "APC_VIRTUAL_LOCK,status=%s",
299 get_status_name( result->virtual_lock.status ));
300 dump_uint64( ",addr=", &result->virtual_lock.addr );
301 dump_uint64( ",size=", &result->virtual_lock.size );
302 break;
303 case APC_VIRTUAL_UNLOCK:
304 fprintf( stderr, "APC_VIRTUAL_UNLOCK,status=%s",
305 get_status_name( result->virtual_unlock.status ));
306 dump_uint64( ",addr=", &result->virtual_unlock.addr );
307 dump_uint64( ",size=", &result->virtual_unlock.size );
308 break;
309 case APC_MAP_VIEW:
310 fprintf( stderr, "APC_MAP_VIEW,status=%s",
311 get_status_name( result->map_view.status ));
312 dump_uint64( ",addr=", &result->map_view.addr );
313 dump_uint64( ",size=", &result->map_view.size );
314 break;
315 case APC_UNMAP_VIEW:
316 fprintf( stderr, "APC_UNMAP_VIEW,status=%s",
317 get_status_name( result->unmap_view.status ) );
318 break;
319 case APC_CREATE_THREAD:
320 fprintf( stderr, "APC_CREATE_THREAD,status=%s,pid=%04x,tid=%04x,handle=%04x",
321 get_status_name( result->create_thread.status ),
322 result->create_thread.pid, result->create_thread.tid, result->create_thread.handle );
323 break;
324 case APC_DUP_HANDLE:
325 fprintf( stderr, "APC_DUP_HANDLE,status=%s,handle=%04x",
326 get_status_name( result->dup_handle.status ), result->dup_handle.handle );
327 break;
328 case APC_BREAK_PROCESS:
329 fprintf( stderr, "APC_BREAK_PROCESS,status=%s", get_status_name( result->break_process.status ) );
330 break;
331 default:
332 fprintf( stderr, "type=%u", result->type );
333 break;
335 fputc( '}', stderr );
338 static void dump_async_data( const char *prefix, const async_data_t *data )
340 fprintf( stderr, "%s{handle=%04x,event=%04x", prefix, data->handle, data->event );
341 dump_uint64( ",iosb=", &data->iosb );
342 dump_uint64( ",user=", &data->user );
343 dump_uint64( ",apc=", &data->apc );
344 dump_uint64( ",apc_context=", &data->apc_context );
345 fputc( '}', stderr );
348 static void dump_irp_params( const char *prefix, const irp_params_t *data )
350 switch (data->type)
352 case IRP_CALL_NONE:
353 fprintf( stderr, "%s{NONE}", prefix );
354 break;
355 case IRP_CALL_CREATE:
356 fprintf( stderr, "%s{CREATE,access=%08x,sharing=%08x,options=%08x",
357 prefix, data->create.access, data->create.sharing, data->create.options );
358 dump_uint64( ",device=", &data->create.device );
359 fprintf( stderr, ",file=%08x}", data->create.file );
360 break;
361 case IRP_CALL_CLOSE:
362 fprintf( stderr, "%s{CLOSE", prefix );
363 dump_uint64( ",file=", &data->close.file );
364 fputc( '}', stderr );
365 break;
366 case IRP_CALL_READ:
367 fprintf( stderr, "%s{READ,key=%08x,out_size=%u", prefix, data->read.key,
368 data->read.out_size );
369 dump_uint64( ",pos=", &data->read.pos );
370 dump_uint64( ",file=", &data->read.file );
371 fputc( '}', stderr );
372 break;
373 case IRP_CALL_WRITE:
374 fprintf( stderr, "%s{WRITE,key=%08x", prefix, data->write.key );
375 dump_uint64( ",pos=", &data->write.pos );
376 dump_uint64( ",file=", &data->write.file );
377 fputc( '}', stderr );
378 break;
379 case IRP_CALL_FLUSH:
380 fprintf( stderr, "%s{FLUSH", prefix );
381 dump_uint64( ",file=", &data->flush.file );
382 fputc( '}', stderr );
383 break;
384 case IRP_CALL_IOCTL:
385 fprintf( stderr, "%s{IOCTL", prefix );
386 dump_ioctl_code( ",code=", &data->ioctl.code );
387 fprintf( stderr, ",out_size=%u", data->ioctl.out_size );
388 dump_uint64( ",file=", &data->ioctl.file );
389 fputc( '}', stderr );
390 break;
391 case IRP_CALL_VOLUME:
392 fprintf( stderr, "%s{VOLUME,class=%u,out_size=%u", prefix,
393 data->volume.info_class, data->volume.out_size );
394 dump_uint64( ",file=", &data->volume.file );
395 fputc( '}', stderr );
396 break;
397 case IRP_CALL_FREE:
398 fprintf( stderr, "%s{FREE", prefix );
399 dump_uint64( ",obj=", &data->free.obj );
400 fputc( '}', stderr );
401 break;
402 case IRP_CALL_CANCEL:
403 fprintf( stderr, "%s{CANCEL", prefix );
404 dump_uint64( ",irp=", &data->cancel.irp );
405 fputc( '}', stderr );
406 break;
410 static void dump_rawinput( const char *prefix, const union rawinput *rawinput )
412 switch (rawinput->type)
414 case RIM_TYPEMOUSE:
415 fprintf( stderr, "%s{type=MOUSE,x=%d,y=%d,data=%08x}", prefix, rawinput->mouse.x,
416 rawinput->mouse.y, rawinput->mouse.data );
417 break;
418 case RIM_TYPEKEYBOARD:
419 fprintf( stderr, "%s{type=KEYBOARD,message=%04x,vkey=%04hx,scan=%04hx}", prefix,
420 rawinput->kbd.message, rawinput->kbd.vkey, rawinput->kbd.scan );
421 break;
422 case RIM_TYPEHID:
423 fprintf( stderr, "%s{type=HID,device=%04x,param=%04x,page=%04hx,usage=%04hx,count=%u,length=%u}",
424 prefix, rawinput->hid.device, rawinput->hid.param, rawinput->hid.usage_page,
425 rawinput->hid.usage, rawinput->hid.count, rawinput->hid.length );
426 break;
427 default:
428 fprintf( stderr, "%s{type=%04x}", prefix, rawinput->type );
429 break;
433 static void dump_hw_input( const char *prefix, const hw_input_t *input )
435 switch (input->type)
437 case INPUT_MOUSE:
438 fprintf( stderr, "%s{type=MOUSE,x=%d,y=%d,data=%08x,flags=%08x,time=%u",
439 prefix, input->mouse.x, input->mouse.y, input->mouse.data, input->mouse.flags,
440 input->mouse.time );
441 dump_uint64( ",info=", &input->mouse.info );
442 fputc( '}', stderr );
443 break;
444 case INPUT_KEYBOARD:
445 fprintf( stderr, "%s{type=KEYBOARD,vkey=%04hx,scan=%04hx,flags=%08x,time=%u",
446 prefix, input->kbd.vkey, input->kbd.scan, input->kbd.flags, input->kbd.time );
447 dump_uint64( ",info=", &input->kbd.info );
448 fputc( '}', stderr );
449 break;
450 case INPUT_HARDWARE:
451 fprintf( stderr, "%s{type=HARDWARE,msg=%04x", prefix, input->hw.msg );
452 dump_uint64( ",lparam=", &input->hw.lparam );
453 switch (input->hw.msg)
455 case WM_INPUT:
456 case WM_INPUT_DEVICE_CHANGE:
457 dump_rawinput( ",rawinput=", &input->hw.rawinput );
459 fputc( '}', stderr );
460 break;
461 default:
462 fprintf( stderr, "%s{type=%04x}", prefix, input->type );
463 break;
467 static void dump_luid( const char *prefix, const luid_t *luid )
469 fprintf( stderr, "%s%d.%u", prefix, luid->high_part, luid->low_part );
472 static void dump_generic_map( const char *prefix, const generic_map_t *map )
474 fprintf( stderr, "%s{r=%08x,w=%08x,x=%08x,a=%08x}",
475 prefix, map->read, map->write, map->exec, map->all );
478 static void dump_varargs_ints( const char *prefix, data_size_t size )
480 const int *data = cur_data;
481 data_size_t len = size / sizeof(*data);
483 fprintf( stderr,"%s{", prefix );
484 while (len > 0)
486 fprintf( stderr, "%d", *data++ );
487 if (--len) fputc( ',', stderr );
489 fputc( '}', stderr );
490 remove_data( size );
493 static void dump_varargs_uints( const char *prefix, data_size_t size )
495 const unsigned int *data = cur_data;
497 dump_uints( prefix, data, size / sizeof(*data) );
498 remove_data( size );
501 static void dump_varargs_uints64( const char *prefix, data_size_t size )
503 const unsigned __int64 *data = cur_data;
504 data_size_t len = size / sizeof(*data);
506 fprintf( stderr,"%s{", prefix );
507 while (len > 0)
509 dump_uint64( "", data++ );
510 if (--len) fputc( ',', stderr );
512 fputc( '}', stderr );
513 remove_data( size );
516 static void dump_varargs_ushorts( const char *prefix, data_size_t size )
518 const unsigned short *data = cur_data;
519 data_size_t len = size / sizeof(*data);
521 fprintf( stderr, "%s{", prefix );
522 while (len > 0)
524 fprintf( stderr, "%04x", *data++ );
525 if (--len) fputc( ',', stderr );
527 fputc( '}', stderr );
528 remove_data( size );
531 static void dump_varargs_apc_result( const char *prefix, data_size_t size )
533 const apc_result_t *result = cur_data;
535 if (size >= sizeof(*result))
537 dump_apc_result( prefix, result );
538 size = sizeof(*result);
540 remove_data( size );
543 static void dump_varargs_select_op( const char *prefix, data_size_t size )
545 select_op_t data;
547 if (!size)
549 fprintf( stderr, "%s{}", prefix );
550 return;
552 memset( &data, 0, sizeof(data) );
553 memcpy( &data, cur_data, min( size, sizeof(data) ));
555 fprintf( stderr, "%s{", prefix );
556 switch (data.op)
558 case SELECT_NONE:
559 fprintf( stderr, "NONE" );
560 break;
561 case SELECT_WAIT:
562 case SELECT_WAIT_ALL:
563 fprintf( stderr, "%s", data.op == SELECT_WAIT ? "WAIT" : "WAIT_ALL" );
564 if (size > offsetof( select_op_t, wait.handles ))
565 dump_handles( ",handles=", data.wait.handles,
566 min( size, sizeof(data.wait) ) - offsetof( select_op_t, wait.handles ));
567 break;
568 case SELECT_SIGNAL_AND_WAIT:
569 fprintf( stderr, "SIGNAL_AND_WAIT,signal=%04x,wait=%04x",
570 data.signal_and_wait.signal, data.signal_and_wait.wait );
571 break;
572 case SELECT_KEYED_EVENT_WAIT:
573 case SELECT_KEYED_EVENT_RELEASE:
574 fprintf( stderr, "KEYED_EVENT_%s,handle=%04x",
575 data.op == SELECT_KEYED_EVENT_WAIT ? "WAIT" : "RELEASE",
576 data.keyed_event.handle );
577 dump_uint64( ",key=", &data.keyed_event.key );
578 break;
579 default:
580 fprintf( stderr, "op=%u", data.op );
581 break;
583 fputc( '}', stderr );
584 remove_data( size );
587 static void dump_varargs_user_handles( const char *prefix, data_size_t size )
589 const user_handle_t *data = cur_data;
590 data_size_t len = size / sizeof(*data);
592 fprintf( stderr,"%s{", prefix );
593 while (len > 0)
595 fprintf( stderr, "%08x", *data++ );
596 if (--len) fputc( ',', stderr );
598 fputc( '}', stderr );
599 remove_data( size );
602 static void dump_varargs_bytes( const char *prefix, data_size_t size )
604 const unsigned char *data = cur_data;
605 data_size_t len = min( 1024, size );
607 fprintf( stderr,"%s{", prefix );
608 while (len > 0)
610 fprintf( stderr, "%02x", *data++ );
611 if (--len) fputc( ',', stderr );
613 if (size > 1024) fprintf( stderr, "...(total %u)", size );
614 fputc( '}', stderr );
615 remove_data( size );
618 static void dump_varargs_string( const char *prefix, data_size_t size )
620 fprintf( stderr, "%s\"%.*s\"", prefix, (int)size, (const char *)cur_data );
621 remove_data( size );
624 static void dump_varargs_unicode_str( const char *prefix, data_size_t size )
626 fprintf( stderr, "%sL\"", prefix );
627 dump_strW( cur_data, size, stderr, "\"\"" );
628 fputc( '\"', stderr );
629 remove_data( size );
632 static void dump_varargs_context( const char *prefix, data_size_t size )
634 const context_t *context = cur_data;
635 context_t ctx;
636 unsigned int i;
638 if (!size)
640 fprintf( stderr, "%s{}", prefix );
641 return;
643 size = min( size, sizeof(ctx) );
644 memset( &ctx, 0, sizeof(ctx) );
645 memcpy( &ctx, context, size );
647 switch (ctx.machine)
649 case IMAGE_FILE_MACHINE_I386:
650 fprintf( stderr, "%s{machine=i386", prefix );
651 if (ctx.flags & SERVER_CTX_CONTROL)
652 fprintf( stderr, ",eip=%08x,esp=%08x,ebp=%08x,eflags=%08x,cs=%04x,ss=%04x",
653 ctx.ctl.i386_regs.eip, ctx.ctl.i386_regs.esp, ctx.ctl.i386_regs.ebp,
654 ctx.ctl.i386_regs.eflags, ctx.ctl.i386_regs.cs, ctx.ctl.i386_regs.ss );
655 if (ctx.flags & SERVER_CTX_SEGMENTS)
656 fprintf( stderr, ",ds=%04x,es=%04x,fs=%04x,gs=%04x",
657 ctx.seg.i386_regs.ds, ctx.seg.i386_regs.es,
658 ctx.seg.i386_regs.fs, ctx.seg.i386_regs.gs );
659 if (ctx.flags & SERVER_CTX_INTEGER)
660 fprintf( stderr, ",eax=%08x,ebx=%08x,ecx=%08x,edx=%08x,esi=%08x,edi=%08x",
661 ctx.integer.i386_regs.eax, ctx.integer.i386_regs.ebx, ctx.integer.i386_regs.ecx,
662 ctx.integer.i386_regs.edx, ctx.integer.i386_regs.esi, ctx.integer.i386_regs.edi );
663 if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
664 fprintf( stderr, ",dr0=%08x,dr1=%08x,dr2=%08x,dr3=%08x,dr6=%08x,dr7=%08x",
665 ctx.debug.i386_regs.dr0, ctx.debug.i386_regs.dr1, ctx.debug.i386_regs.dr2,
666 ctx.debug.i386_regs.dr3, ctx.debug.i386_regs.dr6, ctx.debug.i386_regs.dr7 );
667 if (ctx.flags & SERVER_CTX_FLOATING_POINT)
669 fprintf( stderr, ",fp.ctrl=%08x,fp.status=%08x,fp.tag=%08x,fp.err_off=%08x,fp.err_sel=%08x",
670 ctx.fp.i386_regs.ctrl, ctx.fp.i386_regs.status, ctx.fp.i386_regs.tag,
671 ctx.fp.i386_regs.err_off, ctx.fp.i386_regs.err_sel );
672 fprintf( stderr, ",fp.data_off=%08x,fp.data_sel=%08x,fp.cr0npx=%08x",
673 ctx.fp.i386_regs.data_off, ctx.fp.i386_regs.data_sel, ctx.fp.i386_regs.cr0npx );
674 for (i = 0; i < 8; i++)
676 long double reg = 0;
677 memcpy( &reg, &ctx.fp.i386_regs.regs[10 * i], 10 );
678 fprintf( stderr, ",fp.reg%u=%Lg", i, reg );
681 if (ctx.flags & SERVER_CTX_EXTENDED_REGISTERS)
682 dump_uints( ",extended=", (const unsigned int *)ctx.ext.i386_regs,
683 sizeof(ctx.ext.i386_regs) / sizeof(int) );
684 if (ctx.flags & SERVER_CTX_YMM_REGISTERS)
685 for (i = 0; i < 16; i++)
687 fprintf( stderr, ",ymm%u=", i );
688 dump_uint128( "", (const unsigned __int64 *)&ctx.ymm.regs.ymm_high[i] );
690 break;
691 case IMAGE_FILE_MACHINE_AMD64:
692 fprintf( stderr, "%s{machine=x86_64", prefix );
693 if (ctx.flags & SERVER_CTX_CONTROL)
695 dump_uint64( ",rip=", &ctx.ctl.x86_64_regs.rip );
696 dump_uint64( ",rbp=", &ctx.ctl.x86_64_regs.rbp );
697 dump_uint64( ",rsp=", &ctx.ctl.x86_64_regs.rsp );
698 fprintf( stderr, ",cs=%04x,ss=%04x,flags=%08x",
699 ctx.ctl.x86_64_regs.cs, ctx.ctl.x86_64_regs.ss, ctx.ctl.x86_64_regs.flags );
701 if (ctx.flags & SERVER_CTX_INTEGER)
703 dump_uint64( ",rax=", &ctx.integer.x86_64_regs.rax );
704 dump_uint64( ",rbx=", &ctx.integer.x86_64_regs.rbx );
705 dump_uint64( ",rcx=", &ctx.integer.x86_64_regs.rcx );
706 dump_uint64( ",rdx=", &ctx.integer.x86_64_regs.rdx );
707 dump_uint64( ",rsi=", &ctx.integer.x86_64_regs.rsi );
708 dump_uint64( ",rdi=", &ctx.integer.x86_64_regs.rdi );
709 dump_uint64( ",r8=", &ctx.integer.x86_64_regs.r8 );
710 dump_uint64( ",r9=", &ctx.integer.x86_64_regs.r9 );
711 dump_uint64( ",r10=", &ctx.integer.x86_64_regs.r10 );
712 dump_uint64( ",r11=", &ctx.integer.x86_64_regs.r11 );
713 dump_uint64( ",r12=", &ctx.integer.x86_64_regs.r12 );
714 dump_uint64( ",r13=", &ctx.integer.x86_64_regs.r13 );
715 dump_uint64( ",r14=", &ctx.integer.x86_64_regs.r14 );
716 dump_uint64( ",r15=", &ctx.integer.x86_64_regs.r15 );
718 if (ctx.flags & SERVER_CTX_SEGMENTS)
719 fprintf( stderr, ",ds=%04x,es=%04x,fs=%04x,gs=%04x",
720 ctx.seg.x86_64_regs.ds, ctx.seg.x86_64_regs.es,
721 ctx.seg.x86_64_regs.fs, ctx.seg.x86_64_regs.gs );
722 if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
724 dump_uint64( ",dr0=", &ctx.debug.x86_64_regs.dr0 );
725 dump_uint64( ",dr1=", &ctx.debug.x86_64_regs.dr1 );
726 dump_uint64( ",dr2=", &ctx.debug.x86_64_regs.dr2 );
727 dump_uint64( ",dr3=", &ctx.debug.x86_64_regs.dr3 );
728 dump_uint64( ",dr6=", &ctx.debug.x86_64_regs.dr6 );
729 dump_uint64( ",dr7=", &ctx.debug.x86_64_regs.dr7 );
731 if (ctx.flags & SERVER_CTX_FLOATING_POINT)
732 for (i = 0; i < 32; i++)
734 fprintf( stderr, ",fp%u=", i );
735 dump_uint128( "", (const unsigned __int64 *)&ctx.fp.x86_64_regs.fpregs[i] );
737 if (ctx.flags & SERVER_CTX_YMM_REGISTERS)
738 for (i = 0; i < 16; i++)
740 fprintf( stderr, ",ymm%u=", i );
741 dump_uint128( "", (const unsigned __int64 *)&ctx.ymm.regs.ymm_high[i] );
743 break;
744 case IMAGE_FILE_MACHINE_ARMNT:
745 fprintf( stderr, "%s{machine=arm", prefix );
746 if (ctx.flags & SERVER_CTX_CONTROL)
747 fprintf( stderr, ",sp=%08x,lr=%08x,pc=%08x,cpsr=%08x",
748 ctx.ctl.arm_regs.sp, ctx.ctl.arm_regs.lr,
749 ctx.ctl.arm_regs.pc, ctx.ctl.arm_regs.cpsr );
750 if (ctx.flags & SERVER_CTX_INTEGER)
751 for (i = 0; i < 13; i++) fprintf( stderr, ",r%u=%08x", i, ctx.integer.arm_regs.r[i] );
752 if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
754 for (i = 0; i < 8; i++)
755 fprintf( stderr, ",bcr%u=%08x,bvr%u=%08x",
756 i, ctx.debug.arm_regs.bcr[i], i, ctx.debug.arm_regs.bvr[i] );
757 fprintf( stderr, ",wcr0=%08x,wvr0=%08x",
758 ctx.debug.arm_regs.wcr[0], ctx.debug.arm_regs.wvr[0] );
760 if (ctx.flags & SERVER_CTX_FLOATING_POINT)
762 for (i = 0; i < 32; i++)
764 fprintf( stderr, ",d%u=", i );
765 dump_uint64( "", &ctx.fp.arm_regs.d[i] );
767 fprintf( stderr, ",fpscr=%08x", ctx.fp.arm_regs.fpscr );
769 break;
770 case IMAGE_FILE_MACHINE_ARM64:
771 fprintf( stderr, "%s{machine=arm64", prefix );
772 if (ctx.flags & SERVER_CTX_CONTROL)
774 dump_uint64( ",sp=", &ctx.ctl.arm64_regs.sp );
775 dump_uint64( ",pc=", &ctx.ctl.arm64_regs.pc );
776 dump_uint64( ",pstate=", &ctx.ctl.arm64_regs.pstate );
778 if (ctx.flags & SERVER_CTX_INTEGER)
780 for (i = 0; i < 31; i++)
782 fprintf( stderr, ",x%u=", i );
783 dump_uint64( "", &ctx.integer.arm64_regs.x[i] );
786 if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
788 for (i = 0; i < 8; i++)
790 fprintf( stderr, ",bcr%u=%08x,bvr%u=", i, ctx.debug.arm64_regs.bcr[i], i );
791 dump_uint64( "", &ctx.debug.arm64_regs.bvr[i] );
793 for (i = 0; i < 2; i++)
795 fprintf( stderr, ",wcr%u=%08x,wvr%u=", i, ctx.debug.arm64_regs.wcr[i], i );
796 dump_uint64( "", &ctx.debug.arm64_regs.wvr[i] );
799 if (ctx.flags & SERVER_CTX_FLOATING_POINT)
801 for (i = 0; i < 32; i++)
803 fprintf( stderr, ",q%u=", i );
804 dump_uint64( "", &ctx.fp.arm64_regs.q[i].high );
805 dump_uint64( "", &ctx.fp.arm64_regs.q[i].low );
807 fprintf( stderr, ",fpcr=%08x,fpsr=%08x", ctx.fp.arm64_regs.fpcr, ctx.fp.arm64_regs.fpsr );
809 break;
810 default:
811 fprintf( stderr, "%s{machine=%04x", prefix, ctx.machine );
812 break;
814 fputc( '}', stderr );
815 remove_data( size );
818 static void dump_varargs_contexts( const char *prefix, data_size_t size )
820 if (!size)
822 fprintf( stderr, "%s{}", prefix );
823 return;
825 fprintf( stderr, "%s{", prefix );
826 while (cur_size)
828 dump_varargs_context( "", cur_size );
829 fputc( cur_size ? ',' : '}', stderr );
833 static void dump_varargs_debug_event( const char *prefix, data_size_t size )
835 debug_event_t event;
836 unsigned int i;
838 if (!size)
840 fprintf( stderr, "%s{}", prefix );
841 return;
843 size = min( size, sizeof(event) );
844 memset( &event, 0, sizeof(event) );
845 memcpy( &event, cur_data, size );
847 switch(event.code)
849 case DbgIdle:
850 fprintf( stderr, "%s{idle}", prefix );
851 break;
852 case DbgReplyPending:
853 fprintf( stderr, "%s{pending}", prefix );
854 break;
855 case DbgCreateThreadStateChange:
856 fprintf( stderr, "%s{create_thread,thread=%04x", prefix, event.create_thread.handle );
857 dump_uint64( ",start=", &event.create_thread.start );
858 fputc( '}', stderr );
859 break;
860 case DbgCreateProcessStateChange:
861 fprintf( stderr, "%s{create_process,file=%04x,process=%04x,thread=%04x", prefix,
862 event.create_process.file, event.create_process.process,
863 event.create_process.thread );
864 dump_uint64( ",base=", &event.create_process.base );
865 fprintf( stderr, ",offset=%d,size=%d",
866 event.create_process.dbg_offset, event.create_process.dbg_size );
867 dump_uint64( ",start=", &event.create_process.start );
868 fputc( '}', stderr );
869 break;
870 case DbgExitThreadStateChange:
871 fprintf( stderr, "%s{exit_thread,code=%d}", prefix, event.exit.exit_code );
872 break;
873 case DbgExitProcessStateChange:
874 fprintf( stderr, "%s{exit_process,code=%d}", prefix, event.exit.exit_code );
875 break;
876 case DbgExceptionStateChange:
877 case DbgBreakpointStateChange:
878 case DbgSingleStepStateChange:
879 fprintf( stderr, "%s{%s,first=%d,exc_code=%08x,flags=%08x", prefix,
880 event.code == DbgBreakpointStateChange ? "breakpoint" :
881 event.code == DbgSingleStepStateChange ? "singlestep" : "exception",
882 event.exception.first, event.exception.exc_code, event.exception.flags );
883 dump_uint64( ",record=", &event.exception.record );
884 dump_uint64( ",address=", &event.exception.address );
885 fprintf( stderr, ",params={" );
886 event.exception.nb_params = min( event.exception.nb_params, EXCEPTION_MAXIMUM_PARAMETERS );
887 for (i = 0; i < event.exception.nb_params; i++)
889 dump_uint64( "", &event.exception.params[i] );
890 if (i < event.exception.nb_params) fputc( ',', stderr );
892 fprintf( stderr, "}}" );
893 break;
894 case DbgLoadDllStateChange:
895 fprintf( stderr, "%s{load_dll,file=%04x", prefix, event.load_dll.handle );
896 dump_uint64( ",base=", &event.load_dll.base );
897 fprintf( stderr, ",offset=%d,size=%d",
898 event.load_dll.dbg_offset, event.load_dll.dbg_size );
899 dump_uint64( ",name=", &event.load_dll.name );
900 fputc( '}', stderr );
901 break;
902 case DbgUnloadDllStateChange:
903 fprintf( stderr, "%s{unload_dll", prefix );
904 dump_uint64( ",base=", &event.unload_dll.base );
905 fputc( '}', stderr );
906 break;
907 default:
908 fprintf( stderr, "%s{code=??? (%d)}", prefix, event.code );
909 break;
911 remove_data( size );
914 /* dump a unicode string contained in a buffer; helper for dump_varargs_startup_info */
915 static data_size_t dump_inline_unicode_string( const char *prefix, data_size_t pos, data_size_t len, data_size_t total_size )
917 fputs( prefix, stderr );
918 if (pos >= total_size) return pos;
919 if (len > total_size - pos) len = total_size - pos;
920 dump_strW( (const WCHAR *)cur_data + pos/sizeof(WCHAR), len, stderr, "\"\"" );
921 return pos + (len / sizeof(WCHAR)) * sizeof(WCHAR);
924 static void dump_varargs_startup_info( const char *prefix, data_size_t size )
926 startup_info_t info;
927 data_size_t pos = sizeof(info);
929 memset( &info, 0, sizeof(info) );
930 memcpy( &info, cur_data, min( size, sizeof(info) ));
932 fprintf( stderr,
933 "%s{debug_flags=%x,console_flags=%x,console=%04x,hstdin=%04x,hstdout=%04x,hstderr=%04x,"
934 "x=%u,y=%u,xsize=%u,ysize=%u,xchars=%u,ychars=%u,attribute=%02x,flags=%x,show=%u",
935 prefix, info.debug_flags, info.console_flags, info.console,
936 info.hstdin, info.hstdout, info.hstderr, info.x, info.y, info.xsize, info.ysize,
937 info.xchars, info.ychars, info.attribute, info.flags, info.show );
938 pos = dump_inline_unicode_string( ",curdir=L\"", pos, info.curdir_len, size );
939 pos = dump_inline_unicode_string( "\",dllpath=L\"", pos, info.dllpath_len, size );
940 pos = dump_inline_unicode_string( "\",imagepath=L\"", pos, info.imagepath_len, size );
941 pos = dump_inline_unicode_string( "\",cmdline=L\"", pos, info.cmdline_len, size );
942 pos = dump_inline_unicode_string( "\",title=L\"", pos, info.title_len, size );
943 pos = dump_inline_unicode_string( "\",desktop=L\"", pos, info.desktop_len, size );
944 pos = dump_inline_unicode_string( "\",shellinfo=L\"", pos, info.shellinfo_len, size );
945 pos = dump_inline_unicode_string( "\",runtime=L\"", pos, info.runtime_len, size );
946 fprintf( stderr, "\"}" );
947 remove_data( size );
950 static void dump_varargs_rectangles( const char *prefix, data_size_t size )
952 const rectangle_t *rect = cur_data;
953 data_size_t len = size / sizeof(*rect);
955 fprintf( stderr,"%s{", prefix );
956 while (len > 0)
958 dump_rectangle( "", rect++ );
959 if (--len) fputc( ',', stderr );
961 fputc( '}', stderr );
962 remove_data( size );
965 static void dump_varargs_cursor_positions( const char *prefix, data_size_t size )
967 const cursor_pos_t *pos = cur_data;
968 data_size_t len = size / sizeof(*pos);
970 fprintf( stderr, "%s{", prefix );
971 while (len > 0)
973 fprintf( stderr, "{x=%d,y=%d,time=%u", pos->x, pos->y, pos->time );
974 dump_uint64( ",info=", &pos->info );
975 fputc( '}', stderr );
976 pos++;
977 if (--len) fputc( ',', stderr );
979 fputc( '}', stderr );
980 remove_data( size );
983 static void dump_varargs_message_data( const char *prefix, data_size_t size )
985 /* FIXME: dump the structured data */
986 dump_varargs_bytes( prefix, size );
989 static void dump_varargs_properties( const char *prefix, data_size_t size )
991 const property_data_t *prop = cur_data;
992 data_size_t len = size / sizeof(*prop);
994 fprintf( stderr,"%s{", prefix );
995 while (len > 0)
997 fprintf( stderr, "{atom=%04x,str=%d", prop->atom, prop->string );
998 dump_uint64( ",data=", &prop->data );
999 fputc( '}', stderr );
1000 prop++;
1001 if (--len) fputc( ',', stderr );
1003 fputc( '}', stderr );
1004 remove_data( size );
1007 static void dump_varargs_LUID_AND_ATTRIBUTES( const char *prefix, data_size_t size )
1009 const LUID_AND_ATTRIBUTES *lat = cur_data;
1010 data_size_t len = size / sizeof(*lat);
1012 fprintf( stderr,"%s{", prefix );
1013 while (len > 0)
1015 fprintf( stderr, "{luid=%08x%08x,attr=%x}",
1016 lat->Luid.HighPart, lat->Luid.LowPart, lat->Attributes );
1017 lat++;
1018 if (--len) fputc( ',', stderr );
1020 fputc( '}', stderr );
1021 remove_data( size );
1024 static void dump_inline_sid( const char *prefix, const SID *sid, data_size_t size )
1026 DWORD i;
1028 /* security check */
1029 if ((FIELD_OFFSET(SID, SubAuthority[0]) > size) ||
1030 (FIELD_OFFSET(SID, SubAuthority[sid->SubAuthorityCount]) > size))
1032 fprintf( stderr, "<invalid sid>" );
1033 return;
1036 fprintf( stderr,"%s{", prefix );
1037 fprintf( stderr, "S-%u-%u", sid->Revision, MAKELONG(
1038 MAKEWORD( sid->IdentifierAuthority.Value[5],
1039 sid->IdentifierAuthority.Value[4] ),
1040 MAKEWORD( sid->IdentifierAuthority.Value[3],
1041 sid->IdentifierAuthority.Value[2] ) ) );
1042 for (i = 0; i < sid->SubAuthorityCount; i++)
1043 fprintf( stderr, "-%u", sid->SubAuthority[i] );
1044 fputc( '}', stderr );
1047 static void dump_varargs_SID( const char *prefix, data_size_t size )
1049 const SID *sid = cur_data;
1050 dump_inline_sid( prefix, sid, size );
1051 remove_data( size );
1054 static void dump_inline_acl( const char *prefix, const ACL *acl, data_size_t size )
1056 const ACE_HEADER *ace;
1057 ULONG i;
1059 fprintf( stderr,"%s{", prefix );
1060 if (size)
1062 if (size < sizeof(ACL))
1064 fprintf( stderr, "<invalid acl>}" );
1065 return;
1067 size -= sizeof(ACL);
1068 ace = (const ACE_HEADER *)(acl + 1);
1069 for (i = 0; i < acl->AceCount; i++)
1071 const SID *sid = NULL;
1072 data_size_t sid_size = 0;
1074 if (size < sizeof(ACE_HEADER) || size < ace->AceSize) break;
1075 size -= ace->AceSize;
1076 if (i != 0) fputc( ',', stderr );
1077 fprintf( stderr, "{AceType=" );
1078 switch (ace->AceType)
1080 case ACCESS_DENIED_ACE_TYPE:
1081 sid = (const SID *)&((const ACCESS_DENIED_ACE *)ace)->SidStart;
1082 sid_size = ace->AceSize - FIELD_OFFSET(ACCESS_DENIED_ACE, SidStart);
1083 fprintf( stderr, "ACCESS_DENIED_ACE_TYPE,Mask=%x",
1084 ((const ACCESS_DENIED_ACE *)ace)->Mask );
1085 break;
1086 case ACCESS_ALLOWED_ACE_TYPE:
1087 sid = (const SID *)&((const ACCESS_ALLOWED_ACE *)ace)->SidStart;
1088 sid_size = ace->AceSize - FIELD_OFFSET(ACCESS_ALLOWED_ACE, SidStart);
1089 fprintf( stderr, "ACCESS_ALLOWED_ACE_TYPE,Mask=%x",
1090 ((const ACCESS_ALLOWED_ACE *)ace)->Mask );
1091 break;
1092 case SYSTEM_AUDIT_ACE_TYPE:
1093 sid = (const SID *)&((const SYSTEM_AUDIT_ACE *)ace)->SidStart;
1094 sid_size = ace->AceSize - FIELD_OFFSET(SYSTEM_AUDIT_ACE, SidStart);
1095 fprintf( stderr, "SYSTEM_AUDIT_ACE_TYPE,Mask=%x",
1096 ((const SYSTEM_AUDIT_ACE *)ace)->Mask );
1097 break;
1098 case SYSTEM_ALARM_ACE_TYPE:
1099 sid = (const SID *)&((const SYSTEM_ALARM_ACE *)ace)->SidStart;
1100 sid_size = ace->AceSize - FIELD_OFFSET(SYSTEM_ALARM_ACE, SidStart);
1101 fprintf( stderr, "SYSTEM_ALARM_ACE_TYPE,Mask=%x",
1102 ((const SYSTEM_ALARM_ACE *)ace)->Mask );
1103 break;
1104 case SYSTEM_MANDATORY_LABEL_ACE_TYPE:
1105 sid = (const SID *)&((const SYSTEM_MANDATORY_LABEL_ACE *)ace)->SidStart;
1106 sid_size = ace->AceSize - FIELD_OFFSET(SYSTEM_MANDATORY_LABEL_ACE, SidStart);
1107 fprintf( stderr, "SYSTEM_MANDATORY_LABEL_ACE_TYPE,Mask=%x",
1108 ((const SYSTEM_MANDATORY_LABEL_ACE *)ace)->Mask );
1109 break;
1110 default:
1111 fprintf( stderr, "unknown<%d>", ace->AceType );
1112 break;
1114 fprintf( stderr, ",AceFlags=%x", ace->AceFlags );
1115 if (sid)
1116 dump_inline_sid( ",Sid=", sid, sid_size );
1117 ace = (const ACE_HEADER *)((const char *)ace + ace->AceSize);
1118 fputc( '}', stderr );
1121 fputc( '}', stderr );
1124 static void dump_varargs_ACL( const char *prefix, data_size_t size )
1126 const ACL *acl = cur_data;
1127 dump_inline_acl( prefix, acl, size );
1128 remove_data( size );
1131 static void dump_inline_security_descriptor( const char *prefix, const struct security_descriptor *sd, data_size_t size )
1133 fprintf( stderr,"%s{", prefix );
1134 if (size >= sizeof(struct security_descriptor))
1136 size_t offset = sizeof(struct security_descriptor);
1137 fprintf( stderr, "control=%08x", sd->control );
1138 if ((sd->owner_len > FIELD_OFFSET(SID, SubAuthority[255])) || (offset + sd->owner_len > size))
1139 return;
1140 if (sd->owner_len)
1141 dump_inline_sid( ",owner=", (const SID *)((const char *)sd + offset), sd->owner_len );
1142 else
1143 fprintf( stderr, ",owner=<not present>" );
1144 offset += sd->owner_len;
1145 if ((sd->group_len > FIELD_OFFSET(SID, SubAuthority[255])) || (offset + sd->group_len > size))
1146 return;
1147 if (sd->group_len)
1148 dump_inline_sid( ",group=", (const SID *)((const char *)sd + offset), sd->group_len );
1149 else
1150 fprintf( stderr, ",group=<not present>" );
1151 offset += sd->group_len;
1152 if ((sd->sacl_len >= MAX_ACL_LEN) || (offset + sd->sacl_len > size))
1153 return;
1154 dump_inline_acl( ",sacl=", (const ACL *)((const char *)sd + offset), sd->sacl_len );
1155 offset += sd->sacl_len;
1156 if ((sd->dacl_len >= MAX_ACL_LEN) || (offset + sd->dacl_len > size))
1157 return;
1158 dump_inline_acl( ",dacl=", (const ACL *)((const char *)sd + offset), sd->dacl_len );
1159 offset += sd->dacl_len;
1161 fputc( '}', stderr );
1164 static void dump_varargs_security_descriptor( const char *prefix, data_size_t size )
1166 const struct security_descriptor *sd = cur_data;
1167 dump_inline_security_descriptor( prefix, sd, size );
1168 remove_data( size );
1171 static void dump_varargs_token_groups( const char *prefix, data_size_t size )
1173 const struct token_groups *tg = cur_data;
1175 fprintf( stderr,"%s{", prefix );
1176 if (size >= sizeof(struct token_groups))
1178 size_t offset = sizeof(*tg);
1179 fprintf( stderr, "count=%08x,", tg->count );
1180 if (tg->count * sizeof(unsigned int) <= size)
1182 unsigned int i;
1183 const unsigned int *attr = (const unsigned int *)(tg + 1);
1185 offset += tg->count * sizeof(unsigned int);
1187 fputc( '[', stderr );
1188 for (i = 0; i < tg->count; i++)
1190 const SID *sid = (const SID *)((const char *)cur_data + offset);
1191 if (i != 0)
1192 fputc( ',', stderr );
1193 fputc( '{', stderr );
1194 fprintf( stderr, "attributes=%08x", attr[i] );
1195 dump_inline_sid( ",sid=", sid, size - offset );
1196 if ((offset + FIELD_OFFSET(SID, SubAuthority[0]) > size) ||
1197 (offset + FIELD_OFFSET(SID, SubAuthority[sid->SubAuthorityCount]) > size))
1198 break;
1199 offset += FIELD_OFFSET(SID, SubAuthority[sid->SubAuthorityCount]);
1200 fputc( '}', stderr );
1202 fputc( ']', stderr );
1205 fputc( '}', stderr );
1208 static void dump_varargs_process_info( const char *prefix, data_size_t size )
1210 data_size_t pos = 0;
1211 unsigned int i;
1213 fprintf( stderr,"%s{", prefix );
1215 while (size - pos >= sizeof(struct process_info))
1217 const struct process_info *process;
1218 pos = (pos + 7) & ~7;
1219 process = (const struct process_info *)((const char *)cur_data + pos);
1220 if (size - pos < sizeof(*process)) break;
1221 if (pos) fputc( ',', stderr );
1222 dump_timeout( "{start_time=", &process->start_time );
1223 fprintf( stderr, ",thread_count=%u,priority=%d,pid=%04x,parent_pid=%04x,handle_count=%u,unix_pid=%d,",
1224 process->thread_count, process->priority, process->pid,
1225 process->parent_pid, process->handle_count, process->unix_pid );
1226 pos += sizeof(*process);
1228 pos = dump_inline_unicode_string( "name=L\"", pos, process->name_len, size );
1230 pos = (pos + 7) & ~7;
1231 fprintf( stderr, "\",threads={" );
1232 for (i = 0; i < process->thread_count; i++)
1234 const struct thread_info *thread = (const struct thread_info *)((const char *)cur_data + pos);
1235 if (size - pos < sizeof(*thread)) break;
1236 if (i) fputc( ',', stderr );
1237 dump_timeout( "{start_time=", &thread->start_time );
1238 fprintf( stderr, ",tid=%04x,base_priority=%d,current_priority=%d,unix_tid=%d}",
1239 thread->tid, thread->base_priority, thread->current_priority, thread->unix_tid );
1240 pos += sizeof(*thread);
1242 fprintf( stderr, "}}" );
1244 fputc( '}', stderr );
1245 remove_data( size );
1248 static void dump_varargs_object_attributes( const char *prefix, data_size_t size )
1250 const struct object_attributes *objattr = cur_data;
1252 fprintf( stderr,"%s{", prefix );
1253 if (size)
1255 const WCHAR *str;
1257 if (size < sizeof(*objattr) ||
1258 (size - sizeof(*objattr) < objattr->sd_len) ||
1259 (size - sizeof(*objattr) - objattr->sd_len < objattr->name_len))
1261 fprintf( stderr, "***invalid***}" );
1262 remove_data( size );
1263 return;
1266 fprintf( stderr, "rootdir=%04x,attributes=%08x", objattr->rootdir, objattr->attributes );
1267 dump_inline_security_descriptor( ",sd=", (const struct security_descriptor *)(objattr + 1), objattr->sd_len );
1268 str = (const WCHAR *)objattr + (sizeof(*objattr) + objattr->sd_len) / sizeof(WCHAR);
1269 fprintf( stderr, ",name=L\"" );
1270 dump_strW( str, objattr->name_len, stderr, "\"\"" );
1271 fputc( '\"', stderr );
1272 remove_data( (sizeof(*objattr) + (objattr->sd_len & ~1) + (objattr->name_len & ~1) + 3) & ~3 );
1274 fputc( '}', stderr );
1277 static void dump_varargs_object_type_info( const char *prefix, data_size_t size )
1279 const struct object_type_info *info = cur_data;
1281 fprintf( stderr,"%s{", prefix );
1282 if (size)
1284 if (size < sizeof(*info) || (size - sizeof(*info) < info->name_len))
1286 fprintf( stderr, "***invalid***}" );
1287 remove_data( size );
1288 return;
1291 fprintf( stderr, "index=%u,obj_count=%u,handle_count=%u,obj_max=%u,handle_max=%u,valid=%08x",
1292 info->index,info->obj_count, info->handle_count, info->obj_max, info->handle_max,
1293 info->valid_access );
1294 dump_generic_map( ",access=", &info->mapping );
1295 fprintf( stderr, ",name=L\"" );
1296 dump_strW( (const WCHAR *)(info + 1), info->name_len, stderr, "\"\"" );
1297 fputc( '\"', stderr );
1298 remove_data( min( size, sizeof(*info) + ((info->name_len + 2) & ~3 )));
1300 fputc( '}', stderr );
1303 static void dump_varargs_object_types_info( const char *prefix, data_size_t size )
1305 fprintf( stderr,"%s{", prefix );
1306 while (cur_size) dump_varargs_object_type_info( ",", cur_size );
1307 fputc( '}', stderr );
1310 static void dump_varargs_filesystem_event( const char *prefix, data_size_t size )
1312 static const char * const actions[] = {
1313 NULL,
1314 "ADDED",
1315 "REMOVED",
1316 "MODIFIED",
1317 "RENAMED_OLD_NAME",
1318 "RENAMED_NEW_NAME",
1319 "ADDED_STREAM",
1320 "REMOVED_STREAM",
1321 "MODIFIED_STREAM"
1324 fprintf( stderr,"%s{", prefix );
1325 while (size)
1327 const struct filesystem_event *event = cur_data;
1328 data_size_t len = (offsetof( struct filesystem_event, name[event->len] ) + sizeof(int)-1)
1329 / sizeof(int) * sizeof(int);
1330 if (size < len) break;
1331 if (event->action < ARRAY_SIZE( actions ) && actions[event->action])
1332 fprintf( stderr, "{action=%s", actions[event->action] );
1333 else
1334 fprintf( stderr, "{action=%u", event->action );
1335 fprintf( stderr, ",name=\"%.*s\"}", event->len, event->name );
1336 size -= len;
1337 remove_data( len );
1338 if (size)fputc( ',', stderr );
1340 fputc( '}', stderr );
1343 static void dump_varargs_pe_image_info( const char *prefix, data_size_t size )
1345 pe_image_info_t info;
1347 if (!size)
1349 fprintf( stderr, "%s{}", prefix );
1350 return;
1352 memset( &info, 0, sizeof(info) );
1353 memcpy( &info, cur_data, min( size, sizeof(info) ));
1355 fprintf( stderr, "%s{", prefix );
1356 dump_uint64( "base=", &info.base );
1357 dump_uint64( ",entry_point=", &info.entry_point );
1358 dump_uint64( ",map_size=", &info.map_size );
1359 dump_uint64( ",stack_size=", &info.stack_size );
1360 dump_uint64( ",stack_commit=", &info.stack_commit );
1361 fprintf( stderr, ",zerobits=%08x,subsystem=%08x,subsystem_minor=%04x,subsystem_major=%04x"
1362 ",osversion_major=%04x,osversion_minor=%04x,image_charact=%04x,dll_charact=%04x,machine=%04x"
1363 ",contains_code=%u,image_flags=%02x"
1364 ",loader_flags=%08x,header_size=%08x,file_size=%08x,checksum=%08x}",
1365 info.zerobits, info.subsystem, info.subsystem_minor, info.subsystem_major,
1366 info.osversion_major, info.osversion_minor, info.image_charact, info.dll_charact,
1367 info.machine, info.contains_code, info.image_flags, info.loader_flags,
1368 info.header_size, info.file_size, info.checksum );
1369 remove_data( min( size, sizeof(info) ));
1372 static void dump_varargs_rawinput_devices(const char *prefix, data_size_t size )
1374 const struct rawinput_device *device;
1376 fprintf( stderr, "%s{", prefix );
1377 while (size >= sizeof(*device))
1379 device = cur_data;
1380 fprintf( stderr, "{usage_page=%04x,usage=%04x,flags=%08x,target=%08x}",
1381 device->usage_page, device->usage, device->flags, device->target );
1382 size -= sizeof(*device);
1383 remove_data( sizeof(*device) );
1384 if (size) fputc( ',', stderr );
1386 fputc( '}', stderr );
1389 static void dump_varargs_handle_infos( const char *prefix, data_size_t size )
1391 const struct handle_info *handle;
1393 fprintf( stderr, "%s{", prefix );
1394 while (size >= sizeof(*handle))
1396 handle = cur_data;
1397 fprintf( stderr, "{owner=%04x,handle=%04x,access=%08x,attributes=%08x,type=%u}",
1398 handle->owner, handle->handle, handle->access, handle->attributes, handle->type );
1399 size -= sizeof(*handle);
1400 remove_data( sizeof(*handle) );
1401 if (size) fputc( ',', stderr );
1403 fputc( '}', stderr );
1406 static void dump_varargs_poll_socket_input( const char *prefix, data_size_t size )
1408 const struct poll_socket_input *input;
1410 fprintf( stderr, "%s{", prefix );
1411 while (size >= sizeof(*input))
1413 input = cur_data;
1414 fprintf( stderr, "{socket=%04x,flags=%08x}", input->socket, input->flags );
1415 size -= sizeof(*input);
1416 remove_data( sizeof(*input) );
1417 if (size) fputc( ',', stderr );
1419 fputc( '}', stderr );
1422 static void dump_varargs_poll_socket_output( const char *prefix, data_size_t size )
1424 const struct poll_socket_output *output;
1426 fprintf( stderr, "%s{", prefix );
1427 while (size >= sizeof(*output))
1429 output = cur_data;
1430 fprintf( stderr, "{flags=%08x,status=%s}", output->flags, get_status_name( output->status ) );
1431 size -= sizeof(*output);
1432 remove_data( sizeof(*output) );
1433 if (size) fputc( ',', stderr );
1435 fputc( '}', stderr );
1438 typedef void (*dump_func)( const void *req );
1440 /* Everything below this line is generated automatically by tools/make_requests */
1441 /* ### make_requests begin ### */
1443 static void dump_new_process_request( const struct new_process_request *req )
1445 fprintf( stderr, " token=%04x", req->token );
1446 fprintf( stderr, ", debug=%04x", req->debug );
1447 fprintf( stderr, ", parent_process=%04x", req->parent_process );
1448 fprintf( stderr, ", flags=%08x", req->flags );
1449 fprintf( stderr, ", socket_fd=%d", req->socket_fd );
1450 fprintf( stderr, ", access=%08x", req->access );
1451 fprintf( stderr, ", machine=%04x", req->machine );
1452 fprintf( stderr, ", info_size=%u", req->info_size );
1453 fprintf( stderr, ", handles_size=%u", req->handles_size );
1454 fprintf( stderr, ", jobs_size=%u", req->jobs_size );
1455 dump_varargs_object_attributes( ", objattr=", cur_size );
1456 dump_varargs_uints( ", handles=", min(cur_size,req->handles_size) );
1457 dump_varargs_uints( ", jobs=", min(cur_size,req->jobs_size) );
1458 dump_varargs_startup_info( ", info=", min(cur_size,req->info_size) );
1459 dump_varargs_unicode_str( ", env=", cur_size );
1462 static void dump_new_process_reply( const struct new_process_reply *req )
1464 fprintf( stderr, " info=%04x", req->info );
1465 fprintf( stderr, ", pid=%04x", req->pid );
1466 fprintf( stderr, ", handle=%04x", req->handle );
1469 static void dump_get_new_process_info_request( const struct get_new_process_info_request *req )
1471 fprintf( stderr, " info=%04x", req->info );
1474 static void dump_get_new_process_info_reply( const struct get_new_process_info_reply *req )
1476 fprintf( stderr, " success=%d", req->success );
1477 fprintf( stderr, ", exit_code=%d", req->exit_code );
1480 static void dump_new_thread_request( const struct new_thread_request *req )
1482 fprintf( stderr, " process=%04x", req->process );
1483 fprintf( stderr, ", access=%08x", req->access );
1484 fprintf( stderr, ", suspend=%d", req->suspend );
1485 fprintf( stderr, ", request_fd=%d", req->request_fd );
1486 dump_varargs_object_attributes( ", objattr=", cur_size );
1489 static void dump_new_thread_reply( const struct new_thread_reply *req )
1491 fprintf( stderr, " tid=%04x", req->tid );
1492 fprintf( stderr, ", handle=%04x", req->handle );
1495 static void dump_get_startup_info_request( const struct get_startup_info_request *req )
1499 static void dump_get_startup_info_reply( const struct get_startup_info_reply *req )
1501 fprintf( stderr, " info_size=%u", req->info_size );
1502 dump_varargs_startup_info( ", info=", min(cur_size,req->info_size) );
1503 dump_varargs_unicode_str( ", env=", cur_size );
1506 static void dump_init_process_done_request( const struct init_process_done_request *req )
1508 dump_uint64( " teb=", &req->teb );
1509 dump_uint64( ", peb=", &req->peb );
1510 dump_uint64( ", ldt_copy=", &req->ldt_copy );
1513 static void dump_init_process_done_reply( const struct init_process_done_reply *req )
1515 dump_uint64( " entry=", &req->entry );
1516 fprintf( stderr, ", suspend=%d", req->suspend );
1519 static void dump_init_first_thread_request( const struct init_first_thread_request *req )
1521 fprintf( stderr, " unix_pid=%d", req->unix_pid );
1522 fprintf( stderr, ", unix_tid=%d", req->unix_tid );
1523 fprintf( stderr, ", debug_level=%d", req->debug_level );
1524 fprintf( stderr, ", reply_fd=%d", req->reply_fd );
1525 fprintf( stderr, ", wait_fd=%d", req->wait_fd );
1528 static void dump_init_first_thread_reply( const struct init_first_thread_reply *req )
1530 fprintf( stderr, " pid=%04x", req->pid );
1531 fprintf( stderr, ", tid=%04x", req->tid );
1532 dump_timeout( ", server_start=", &req->server_start );
1533 fprintf( stderr, ", info_size=%u", req->info_size );
1534 dump_varargs_ushorts( ", machines=", cur_size );
1537 static void dump_init_thread_request( const struct init_thread_request *req )
1539 fprintf( stderr, " unix_tid=%d", req->unix_tid );
1540 fprintf( stderr, ", reply_fd=%d", req->reply_fd );
1541 fprintf( stderr, ", wait_fd=%d", req->wait_fd );
1542 dump_uint64( ", teb=", &req->teb );
1543 dump_uint64( ", entry=", &req->entry );
1546 static void dump_init_thread_reply( const struct init_thread_reply *req )
1548 fprintf( stderr, " suspend=%d", req->suspend );
1551 static void dump_terminate_process_request( const struct terminate_process_request *req )
1553 fprintf( stderr, " handle=%04x", req->handle );
1554 fprintf( stderr, ", exit_code=%d", req->exit_code );
1557 static void dump_terminate_process_reply( const struct terminate_process_reply *req )
1559 fprintf( stderr, " self=%d", req->self );
1562 static void dump_terminate_thread_request( const struct terminate_thread_request *req )
1564 fprintf( stderr, " handle=%04x", req->handle );
1565 fprintf( stderr, ", exit_code=%d", req->exit_code );
1568 static void dump_terminate_thread_reply( const struct terminate_thread_reply *req )
1570 fprintf( stderr, " self=%d", req->self );
1573 static void dump_get_process_info_request( const struct get_process_info_request *req )
1575 fprintf( stderr, " handle=%04x", req->handle );
1578 static void dump_get_process_info_reply( const struct get_process_info_reply *req )
1580 fprintf( stderr, " pid=%04x", req->pid );
1581 fprintf( stderr, ", ppid=%04x", req->ppid );
1582 dump_uint64( ", affinity=", &req->affinity );
1583 dump_uint64( ", peb=", &req->peb );
1584 dump_timeout( ", start_time=", &req->start_time );
1585 dump_timeout( ", end_time=", &req->end_time );
1586 fprintf( stderr, ", exit_code=%d", req->exit_code );
1587 fprintf( stderr, ", priority=%d", req->priority );
1588 fprintf( stderr, ", machine=%04x", req->machine );
1589 dump_varargs_pe_image_info( ", image=", cur_size );
1592 static void dump_get_process_debug_info_request( const struct get_process_debug_info_request *req )
1594 fprintf( stderr, " handle=%04x", req->handle );
1597 static void dump_get_process_debug_info_reply( const struct get_process_debug_info_reply *req )
1599 fprintf( stderr, " debug=%04x", req->debug );
1600 fprintf( stderr, ", debug_children=%d", req->debug_children );
1601 dump_varargs_pe_image_info( ", image=", cur_size );
1604 static void dump_get_process_image_name_request( const struct get_process_image_name_request *req )
1606 fprintf( stderr, " handle=%04x", req->handle );
1607 fprintf( stderr, ", win32=%d", req->win32 );
1610 static void dump_get_process_image_name_reply( const struct get_process_image_name_reply *req )
1612 fprintf( stderr, " len=%u", req->len );
1613 dump_varargs_unicode_str( ", name=", cur_size );
1616 static void dump_get_process_vm_counters_request( const struct get_process_vm_counters_request *req )
1618 fprintf( stderr, " handle=%04x", req->handle );
1621 static void dump_get_process_vm_counters_reply( const struct get_process_vm_counters_reply *req )
1623 dump_uint64( " peak_virtual_size=", &req->peak_virtual_size );
1624 dump_uint64( ", virtual_size=", &req->virtual_size );
1625 dump_uint64( ", peak_working_set_size=", &req->peak_working_set_size );
1626 dump_uint64( ", working_set_size=", &req->working_set_size );
1627 dump_uint64( ", pagefile_usage=", &req->pagefile_usage );
1628 dump_uint64( ", peak_pagefile_usage=", &req->peak_pagefile_usage );
1631 static void dump_set_process_info_request( const struct set_process_info_request *req )
1633 fprintf( stderr, " handle=%04x", req->handle );
1634 fprintf( stderr, ", mask=%d", req->mask );
1635 fprintf( stderr, ", priority=%d", req->priority );
1636 dump_uint64( ", affinity=", &req->affinity );
1639 static void dump_get_thread_info_request( const struct get_thread_info_request *req )
1641 fprintf( stderr, " handle=%04x", req->handle );
1642 fprintf( stderr, ", access=%08x", req->access );
1645 static void dump_get_thread_info_reply( const struct get_thread_info_reply *req )
1647 fprintf( stderr, " pid=%04x", req->pid );
1648 fprintf( stderr, ", tid=%04x", req->tid );
1649 dump_uint64( ", teb=", &req->teb );
1650 dump_uint64( ", entry_point=", &req->entry_point );
1651 dump_uint64( ", affinity=", &req->affinity );
1652 fprintf( stderr, ", exit_code=%d", req->exit_code );
1653 fprintf( stderr, ", priority=%d", req->priority );
1654 fprintf( stderr, ", last=%d", req->last );
1655 fprintf( stderr, ", suspend_count=%d", req->suspend_count );
1656 fprintf( stderr, ", dbg_hidden=%d", req->dbg_hidden );
1657 fprintf( stderr, ", desc_len=%u", req->desc_len );
1658 dump_varargs_unicode_str( ", desc=", cur_size );
1661 static void dump_get_thread_times_request( const struct get_thread_times_request *req )
1663 fprintf( stderr, " handle=%04x", req->handle );
1666 static void dump_get_thread_times_reply( const struct get_thread_times_reply *req )
1668 dump_timeout( " creation_time=", &req->creation_time );
1669 dump_timeout( ", exit_time=", &req->exit_time );
1670 fprintf( stderr, ", unix_pid=%d", req->unix_pid );
1671 fprintf( stderr, ", unix_tid=%d", req->unix_tid );
1674 static void dump_set_thread_info_request( const struct set_thread_info_request *req )
1676 fprintf( stderr, " handle=%04x", req->handle );
1677 fprintf( stderr, ", mask=%d", req->mask );
1678 fprintf( stderr, ", priority=%d", req->priority );
1679 dump_uint64( ", affinity=", &req->affinity );
1680 dump_uint64( ", entry_point=", &req->entry_point );
1681 fprintf( stderr, ", token=%04x", req->token );
1682 dump_varargs_unicode_str( ", desc=", cur_size );
1685 static void dump_suspend_thread_request( const struct suspend_thread_request *req )
1687 fprintf( stderr, " handle=%04x", req->handle );
1690 static void dump_suspend_thread_reply( const struct suspend_thread_reply *req )
1692 fprintf( stderr, " count=%d", req->count );
1695 static void dump_resume_thread_request( const struct resume_thread_request *req )
1697 fprintf( stderr, " handle=%04x", req->handle );
1700 static void dump_resume_thread_reply( const struct resume_thread_reply *req )
1702 fprintf( stderr, " count=%d", req->count );
1705 static void dump_queue_apc_request( const struct queue_apc_request *req )
1707 fprintf( stderr, " handle=%04x", req->handle );
1708 dump_apc_call( ", call=", &req->call );
1711 static void dump_queue_apc_reply( const struct queue_apc_reply *req )
1713 fprintf( stderr, " handle=%04x", req->handle );
1714 fprintf( stderr, ", self=%d", req->self );
1717 static void dump_get_apc_result_request( const struct get_apc_result_request *req )
1719 fprintf( stderr, " handle=%04x", req->handle );
1722 static void dump_get_apc_result_reply( const struct get_apc_result_reply *req )
1724 dump_apc_result( " result=", &req->result );
1727 static void dump_close_handle_request( const struct close_handle_request *req )
1729 fprintf( stderr, " handle=%04x", req->handle );
1732 static void dump_set_handle_info_request( const struct set_handle_info_request *req )
1734 fprintf( stderr, " handle=%04x", req->handle );
1735 fprintf( stderr, ", flags=%d", req->flags );
1736 fprintf( stderr, ", mask=%d", req->mask );
1739 static void dump_set_handle_info_reply( const struct set_handle_info_reply *req )
1741 fprintf( stderr, " old_flags=%d", req->old_flags );
1744 static void dump_dup_handle_request( const struct dup_handle_request *req )
1746 fprintf( stderr, " src_process=%04x", req->src_process );
1747 fprintf( stderr, ", src_handle=%04x", req->src_handle );
1748 fprintf( stderr, ", dst_process=%04x", req->dst_process );
1749 fprintf( stderr, ", access=%08x", req->access );
1750 fprintf( stderr, ", attributes=%08x", req->attributes );
1751 fprintf( stderr, ", options=%08x", req->options );
1754 static void dump_dup_handle_reply( const struct dup_handle_reply *req )
1756 fprintf( stderr, " handle=%04x", req->handle );
1759 static void dump_make_temporary_request( const struct make_temporary_request *req )
1761 fprintf( stderr, " handle=%04x", req->handle );
1764 static void dump_open_process_request( const struct open_process_request *req )
1766 fprintf( stderr, " pid=%04x", req->pid );
1767 fprintf( stderr, ", access=%08x", req->access );
1768 fprintf( stderr, ", attributes=%08x", req->attributes );
1771 static void dump_open_process_reply( const struct open_process_reply *req )
1773 fprintf( stderr, " handle=%04x", req->handle );
1776 static void dump_open_thread_request( const struct open_thread_request *req )
1778 fprintf( stderr, " tid=%04x", req->tid );
1779 fprintf( stderr, ", access=%08x", req->access );
1780 fprintf( stderr, ", attributes=%08x", req->attributes );
1783 static void dump_open_thread_reply( const struct open_thread_reply *req )
1785 fprintf( stderr, " handle=%04x", req->handle );
1788 static void dump_select_request( const struct select_request *req )
1790 fprintf( stderr, " flags=%d", req->flags );
1791 dump_uint64( ", cookie=", &req->cookie );
1792 dump_abstime( ", timeout=", &req->timeout );
1793 fprintf( stderr, ", size=%u", req->size );
1794 fprintf( stderr, ", prev_apc=%04x", req->prev_apc );
1795 dump_varargs_apc_result( ", result=", cur_size );
1796 dump_varargs_select_op( ", data=", min(cur_size,req->size) );
1797 dump_varargs_contexts( ", contexts=", cur_size );
1800 static void dump_select_reply( const struct select_reply *req )
1802 dump_apc_call( " call=", &req->call );
1803 fprintf( stderr, ", apc_handle=%04x", req->apc_handle );
1804 dump_varargs_contexts( ", contexts=", cur_size );
1807 static void dump_create_event_request( const struct create_event_request *req )
1809 fprintf( stderr, " access=%08x", req->access );
1810 fprintf( stderr, ", manual_reset=%d", req->manual_reset );
1811 fprintf( stderr, ", initial_state=%d", req->initial_state );
1812 dump_varargs_object_attributes( ", objattr=", cur_size );
1815 static void dump_create_event_reply( const struct create_event_reply *req )
1817 fprintf( stderr, " handle=%04x", req->handle );
1820 static void dump_event_op_request( const struct event_op_request *req )
1822 fprintf( stderr, " handle=%04x", req->handle );
1823 fprintf( stderr, ", op=%d", req->op );
1826 static void dump_event_op_reply( const struct event_op_reply *req )
1828 fprintf( stderr, " state=%d", req->state );
1831 static void dump_query_event_request( const struct query_event_request *req )
1833 fprintf( stderr, " handle=%04x", req->handle );
1836 static void dump_query_event_reply( const struct query_event_reply *req )
1838 fprintf( stderr, " manual_reset=%d", req->manual_reset );
1839 fprintf( stderr, ", state=%d", req->state );
1842 static void dump_open_event_request( const struct open_event_request *req )
1844 fprintf( stderr, " access=%08x", req->access );
1845 fprintf( stderr, ", attributes=%08x", req->attributes );
1846 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1847 dump_varargs_unicode_str( ", name=", cur_size );
1850 static void dump_open_event_reply( const struct open_event_reply *req )
1852 fprintf( stderr, " handle=%04x", req->handle );
1855 static void dump_create_keyed_event_request( const struct create_keyed_event_request *req )
1857 fprintf( stderr, " access=%08x", req->access );
1858 dump_varargs_object_attributes( ", objattr=", cur_size );
1861 static void dump_create_keyed_event_reply( const struct create_keyed_event_reply *req )
1863 fprintf( stderr, " handle=%04x", req->handle );
1866 static void dump_open_keyed_event_request( const struct open_keyed_event_request *req )
1868 fprintf( stderr, " access=%08x", req->access );
1869 fprintf( stderr, ", attributes=%08x", req->attributes );
1870 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1871 dump_varargs_unicode_str( ", name=", cur_size );
1874 static void dump_open_keyed_event_reply( const struct open_keyed_event_reply *req )
1876 fprintf( stderr, " handle=%04x", req->handle );
1879 static void dump_create_mutex_request( const struct create_mutex_request *req )
1881 fprintf( stderr, " access=%08x", req->access );
1882 fprintf( stderr, ", owned=%d", req->owned );
1883 dump_varargs_object_attributes( ", objattr=", cur_size );
1886 static void dump_create_mutex_reply( const struct create_mutex_reply *req )
1888 fprintf( stderr, " handle=%04x", req->handle );
1891 static void dump_release_mutex_request( const struct release_mutex_request *req )
1893 fprintf( stderr, " handle=%04x", req->handle );
1896 static void dump_release_mutex_reply( const struct release_mutex_reply *req )
1898 fprintf( stderr, " prev_count=%08x", req->prev_count );
1901 static void dump_open_mutex_request( const struct open_mutex_request *req )
1903 fprintf( stderr, " access=%08x", req->access );
1904 fprintf( stderr, ", attributes=%08x", req->attributes );
1905 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1906 dump_varargs_unicode_str( ", name=", cur_size );
1909 static void dump_open_mutex_reply( const struct open_mutex_reply *req )
1911 fprintf( stderr, " handle=%04x", req->handle );
1914 static void dump_query_mutex_request( const struct query_mutex_request *req )
1916 fprintf( stderr, " handle=%04x", req->handle );
1919 static void dump_query_mutex_reply( const struct query_mutex_reply *req )
1921 fprintf( stderr, " count=%08x", req->count );
1922 fprintf( stderr, ", owned=%d", req->owned );
1923 fprintf( stderr, ", abandoned=%d", req->abandoned );
1926 static void dump_create_semaphore_request( const struct create_semaphore_request *req )
1928 fprintf( stderr, " access=%08x", req->access );
1929 fprintf( stderr, ", initial=%08x", req->initial );
1930 fprintf( stderr, ", max=%08x", req->max );
1931 dump_varargs_object_attributes( ", objattr=", cur_size );
1934 static void dump_create_semaphore_reply( const struct create_semaphore_reply *req )
1936 fprintf( stderr, " handle=%04x", req->handle );
1939 static void dump_release_semaphore_request( const struct release_semaphore_request *req )
1941 fprintf( stderr, " handle=%04x", req->handle );
1942 fprintf( stderr, ", count=%08x", req->count );
1945 static void dump_release_semaphore_reply( const struct release_semaphore_reply *req )
1947 fprintf( stderr, " prev_count=%08x", req->prev_count );
1950 static void dump_query_semaphore_request( const struct query_semaphore_request *req )
1952 fprintf( stderr, " handle=%04x", req->handle );
1955 static void dump_query_semaphore_reply( const struct query_semaphore_reply *req )
1957 fprintf( stderr, " current=%08x", req->current );
1958 fprintf( stderr, ", max=%08x", req->max );
1961 static void dump_open_semaphore_request( const struct open_semaphore_request *req )
1963 fprintf( stderr, " access=%08x", req->access );
1964 fprintf( stderr, ", attributes=%08x", req->attributes );
1965 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1966 dump_varargs_unicode_str( ", name=", cur_size );
1969 static void dump_open_semaphore_reply( const struct open_semaphore_reply *req )
1971 fprintf( stderr, " handle=%04x", req->handle );
1974 static void dump_create_file_request( const struct create_file_request *req )
1976 fprintf( stderr, " access=%08x", req->access );
1977 fprintf( stderr, ", sharing=%08x", req->sharing );
1978 fprintf( stderr, ", create=%d", req->create );
1979 fprintf( stderr, ", options=%08x", req->options );
1980 fprintf( stderr, ", attrs=%08x", req->attrs );
1981 dump_varargs_object_attributes( ", objattr=", cur_size );
1982 dump_varargs_string( ", filename=", cur_size );
1985 static void dump_create_file_reply( const struct create_file_reply *req )
1987 fprintf( stderr, " handle=%04x", req->handle );
1990 static void dump_open_file_object_request( const struct open_file_object_request *req )
1992 fprintf( stderr, " access=%08x", req->access );
1993 fprintf( stderr, ", attributes=%08x", req->attributes );
1994 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1995 fprintf( stderr, ", sharing=%08x", req->sharing );
1996 fprintf( stderr, ", options=%08x", req->options );
1997 dump_varargs_unicode_str( ", filename=", cur_size );
2000 static void dump_open_file_object_reply( const struct open_file_object_reply *req )
2002 fprintf( stderr, " handle=%04x", req->handle );
2005 static void dump_alloc_file_handle_request( const struct alloc_file_handle_request *req )
2007 fprintf( stderr, " access=%08x", req->access );
2008 fprintf( stderr, ", attributes=%08x", req->attributes );
2009 fprintf( stderr, ", fd=%d", req->fd );
2012 static void dump_alloc_file_handle_reply( const struct alloc_file_handle_reply *req )
2014 fprintf( stderr, " handle=%04x", req->handle );
2017 static void dump_get_handle_unix_name_request( const struct get_handle_unix_name_request *req )
2019 fprintf( stderr, " handle=%04x", req->handle );
2022 static void dump_get_handle_unix_name_reply( const struct get_handle_unix_name_reply *req )
2024 fprintf( stderr, " name_len=%u", req->name_len );
2025 dump_varargs_string( ", name=", cur_size );
2028 static void dump_get_handle_fd_request( const struct get_handle_fd_request *req )
2030 fprintf( stderr, " handle=%04x", req->handle );
2033 static void dump_get_handle_fd_reply( const struct get_handle_fd_reply *req )
2035 fprintf( stderr, " type=%d", req->type );
2036 fprintf( stderr, ", cacheable=%d", req->cacheable );
2037 fprintf( stderr, ", access=%08x", req->access );
2038 fprintf( stderr, ", options=%08x", req->options );
2041 static void dump_get_directory_cache_entry_request( const struct get_directory_cache_entry_request *req )
2043 fprintf( stderr, " handle=%04x", req->handle );
2046 static void dump_get_directory_cache_entry_reply( const struct get_directory_cache_entry_reply *req )
2048 fprintf( stderr, " entry=%d", req->entry );
2049 dump_varargs_ints( ", free=", cur_size );
2052 static void dump_flush_request( const struct flush_request *req )
2054 dump_async_data( " async=", &req->async );
2057 static void dump_flush_reply( const struct flush_reply *req )
2059 fprintf( stderr, " event=%04x", req->event );
2062 static void dump_get_file_info_request( const struct get_file_info_request *req )
2064 fprintf( stderr, " handle=%04x", req->handle );
2065 fprintf( stderr, ", info_class=%08x", req->info_class );
2068 static void dump_get_file_info_reply( const struct get_file_info_reply *req )
2070 dump_varargs_bytes( " data=", cur_size );
2073 static void dump_get_volume_info_request( const struct get_volume_info_request *req )
2075 fprintf( stderr, " handle=%04x", req->handle );
2076 dump_async_data( ", async=", &req->async );
2077 fprintf( stderr, ", info_class=%08x", req->info_class );
2080 static void dump_get_volume_info_reply( const struct get_volume_info_reply *req )
2082 fprintf( stderr, " wait=%04x", req->wait );
2083 dump_varargs_bytes( ", data=", cur_size );
2086 static void dump_lock_file_request( const struct lock_file_request *req )
2088 fprintf( stderr, " handle=%04x", req->handle );
2089 dump_uint64( ", offset=", &req->offset );
2090 dump_uint64( ", count=", &req->count );
2091 fprintf( stderr, ", shared=%d", req->shared );
2092 fprintf( stderr, ", wait=%d", req->wait );
2095 static void dump_lock_file_reply( const struct lock_file_reply *req )
2097 fprintf( stderr, " handle=%04x", req->handle );
2098 fprintf( stderr, ", overlapped=%d", req->overlapped );
2101 static void dump_unlock_file_request( const struct unlock_file_request *req )
2103 fprintf( stderr, " handle=%04x", req->handle );
2104 dump_uint64( ", offset=", &req->offset );
2105 dump_uint64( ", count=", &req->count );
2108 static void dump_recv_socket_request( const struct recv_socket_request *req )
2110 fprintf( stderr, " oob=%d", req->oob );
2111 dump_async_data( ", async=", &req->async );
2112 fprintf( stderr, ", status=%08x", req->status );
2113 fprintf( stderr, ", total=%08x", req->total );
2116 static void dump_recv_socket_reply( const struct recv_socket_reply *req )
2118 fprintf( stderr, " wait=%04x", req->wait );
2119 fprintf( stderr, ", options=%08x", req->options );
2122 static void dump_poll_socket_request( const struct poll_socket_request *req )
2124 dump_async_data( " async=", &req->async );
2125 dump_timeout( ", timeout=", &req->timeout );
2126 dump_varargs_poll_socket_input( ", sockets=", cur_size );
2129 static void dump_poll_socket_reply( const struct poll_socket_reply *req )
2131 fprintf( stderr, " wait=%04x", req->wait );
2132 fprintf( stderr, ", options=%08x", req->options );
2133 dump_varargs_poll_socket_output( ", sockets=", cur_size );
2136 static void dump_send_socket_request( const struct send_socket_request *req )
2138 dump_async_data( " async=", &req->async );
2139 fprintf( stderr, ", status=%08x", req->status );
2140 fprintf( stderr, ", total=%08x", req->total );
2143 static void dump_send_socket_reply( const struct send_socket_reply *req )
2145 fprintf( stderr, " wait=%04x", req->wait );
2146 fprintf( stderr, ", options=%08x", req->options );
2149 static void dump_get_next_console_request_request( const struct get_next_console_request_request *req )
2151 fprintf( stderr, " handle=%04x", req->handle );
2152 fprintf( stderr, ", signal=%d", req->signal );
2153 fprintf( stderr, ", read=%d", req->read );
2154 fprintf( stderr, ", status=%08x", req->status );
2155 dump_varargs_bytes( ", out_data=", cur_size );
2158 static void dump_get_next_console_request_reply( const struct get_next_console_request_reply *req )
2160 fprintf( stderr, " code=%08x", req->code );
2161 fprintf( stderr, ", output=%08x", req->output );
2162 fprintf( stderr, ", out_size=%u", req->out_size );
2163 dump_varargs_bytes( ", in_data=", cur_size );
2166 static void dump_read_directory_changes_request( const struct read_directory_changes_request *req )
2168 fprintf( stderr, " filter=%08x", req->filter );
2169 fprintf( stderr, ", subtree=%d", req->subtree );
2170 fprintf( stderr, ", want_data=%d", req->want_data );
2171 dump_async_data( ", async=", &req->async );
2174 static void dump_read_change_request( const struct read_change_request *req )
2176 fprintf( stderr, " handle=%04x", req->handle );
2179 static void dump_read_change_reply( const struct read_change_reply *req )
2181 dump_varargs_filesystem_event( " events=", cur_size );
2184 static void dump_create_mapping_request( const struct create_mapping_request *req )
2186 fprintf( stderr, " access=%08x", req->access );
2187 fprintf( stderr, ", flags=%08x", req->flags );
2188 fprintf( stderr, ", file_access=%08x", req->file_access );
2189 dump_uint64( ", size=", &req->size );
2190 fprintf( stderr, ", file_handle=%04x", req->file_handle );
2191 dump_varargs_object_attributes( ", objattr=", cur_size );
2194 static void dump_create_mapping_reply( const struct create_mapping_reply *req )
2196 fprintf( stderr, " handle=%04x", req->handle );
2199 static void dump_open_mapping_request( const struct open_mapping_request *req )
2201 fprintf( stderr, " access=%08x", req->access );
2202 fprintf( stderr, ", attributes=%08x", req->attributes );
2203 fprintf( stderr, ", rootdir=%04x", req->rootdir );
2204 dump_varargs_unicode_str( ", name=", cur_size );
2207 static void dump_open_mapping_reply( const struct open_mapping_reply *req )
2209 fprintf( stderr, " handle=%04x", req->handle );
2212 static void dump_get_mapping_info_request( const struct get_mapping_info_request *req )
2214 fprintf( stderr, " handle=%04x", req->handle );
2215 fprintf( stderr, ", access=%08x", req->access );
2218 static void dump_get_mapping_info_reply( const struct get_mapping_info_reply *req )
2220 dump_uint64( " size=", &req->size );
2221 fprintf( stderr, ", flags=%08x", req->flags );
2222 fprintf( stderr, ", shared_file=%04x", req->shared_file );
2223 fprintf( stderr, ", total=%u", req->total );
2224 dump_varargs_pe_image_info( ", image=", cur_size );
2225 dump_varargs_unicode_str( ", name=", cur_size );
2228 static void dump_map_view_request( const struct map_view_request *req )
2230 fprintf( stderr, " mapping=%04x", req->mapping );
2231 fprintf( stderr, ", access=%08x", req->access );
2232 dump_uint64( ", base=", &req->base );
2233 dump_uint64( ", size=", &req->size );
2234 dump_uint64( ", start=", &req->start );
2235 dump_varargs_pe_image_info( ", image=", cur_size );
2236 dump_varargs_unicode_str( ", name=", cur_size );
2239 static void dump_unmap_view_request( const struct unmap_view_request *req )
2241 dump_uint64( " base=", &req->base );
2244 static void dump_get_mapping_committed_range_request( const struct get_mapping_committed_range_request *req )
2246 dump_uint64( " base=", &req->base );
2247 dump_uint64( ", offset=", &req->offset );
2250 static void dump_get_mapping_committed_range_reply( const struct get_mapping_committed_range_reply *req )
2252 dump_uint64( " size=", &req->size );
2253 fprintf( stderr, ", committed=%d", req->committed );
2256 static void dump_add_mapping_committed_range_request( const struct add_mapping_committed_range_request *req )
2258 dump_uint64( " base=", &req->base );
2259 dump_uint64( ", offset=", &req->offset );
2260 dump_uint64( ", size=", &req->size );
2263 static void dump_is_same_mapping_request( const struct is_same_mapping_request *req )
2265 dump_uint64( " base1=", &req->base1 );
2266 dump_uint64( ", base2=", &req->base2 );
2269 static void dump_get_mapping_filename_request( const struct get_mapping_filename_request *req )
2271 fprintf( stderr, " process=%04x", req->process );
2272 dump_uint64( ", addr=", &req->addr );
2275 static void dump_get_mapping_filename_reply( const struct get_mapping_filename_reply *req )
2277 fprintf( stderr, " len=%u", req->len );
2278 dump_varargs_unicode_str( ", filename=", cur_size );
2281 static void dump_list_processes_request( const struct list_processes_request *req )
2285 static void dump_list_processes_reply( const struct list_processes_reply *req )
2287 fprintf( stderr, " info_size=%u", req->info_size );
2288 fprintf( stderr, ", process_count=%d", req->process_count );
2289 dump_varargs_process_info( ", data=", min(cur_size,req->info_size) );
2292 static void dump_create_debug_obj_request( const struct create_debug_obj_request *req )
2294 fprintf( stderr, " access=%08x", req->access );
2295 fprintf( stderr, ", flags=%08x", req->flags );
2296 dump_varargs_object_attributes( ", objattr=", cur_size );
2299 static void dump_create_debug_obj_reply( const struct create_debug_obj_reply *req )
2301 fprintf( stderr, " handle=%04x", req->handle );
2304 static void dump_wait_debug_event_request( const struct wait_debug_event_request *req )
2306 fprintf( stderr, " debug=%04x", req->debug );
2309 static void dump_wait_debug_event_reply( const struct wait_debug_event_reply *req )
2311 fprintf( stderr, " pid=%04x", req->pid );
2312 fprintf( stderr, ", tid=%04x", req->tid );
2313 dump_varargs_debug_event( ", event=", cur_size );
2316 static void dump_queue_exception_event_request( const struct queue_exception_event_request *req )
2318 fprintf( stderr, " first=%d", req->first );
2319 fprintf( stderr, ", code=%08x", req->code );
2320 fprintf( stderr, ", flags=%08x", req->flags );
2321 dump_uint64( ", record=", &req->record );
2322 dump_uint64( ", address=", &req->address );
2323 fprintf( stderr, ", len=%u", req->len );
2324 dump_varargs_uints64( ", params=", min(cur_size,req->len) );
2327 static void dump_queue_exception_event_reply( const struct queue_exception_event_reply *req )
2329 fprintf( stderr, " handle=%04x", req->handle );
2332 static void dump_get_exception_status_request( const struct get_exception_status_request *req )
2334 fprintf( stderr, " handle=%04x", req->handle );
2337 static void dump_continue_debug_event_request( const struct continue_debug_event_request *req )
2339 fprintf( stderr, " debug=%04x", req->debug );
2340 fprintf( stderr, ", pid=%04x", req->pid );
2341 fprintf( stderr, ", tid=%04x", req->tid );
2342 fprintf( stderr, ", status=%08x", req->status );
2345 static void dump_debug_process_request( const struct debug_process_request *req )
2347 fprintf( stderr, " handle=%04x", req->handle );
2348 fprintf( stderr, ", debug=%04x", req->debug );
2349 fprintf( stderr, ", attach=%d", req->attach );
2352 static void dump_set_debug_obj_info_request( const struct set_debug_obj_info_request *req )
2354 fprintf( stderr, " debug=%04x", req->debug );
2355 fprintf( stderr, ", flags=%08x", req->flags );
2358 static void dump_read_process_memory_request( const struct read_process_memory_request *req )
2360 fprintf( stderr, " handle=%04x", req->handle );
2361 dump_uint64( ", addr=", &req->addr );
2364 static void dump_read_process_memory_reply( const struct read_process_memory_reply *req )
2366 dump_varargs_bytes( " data=", cur_size );
2369 static void dump_write_process_memory_request( const struct write_process_memory_request *req )
2371 fprintf( stderr, " handle=%04x", req->handle );
2372 dump_uint64( ", addr=", &req->addr );
2373 dump_varargs_bytes( ", data=", cur_size );
2376 static void dump_create_key_request( const struct create_key_request *req )
2378 fprintf( stderr, " access=%08x", req->access );
2379 fprintf( stderr, ", options=%08x", req->options );
2380 dump_varargs_object_attributes( ", objattr=", cur_size );
2381 dump_varargs_unicode_str( ", class=", cur_size );
2384 static void dump_create_key_reply( const struct create_key_reply *req )
2386 fprintf( stderr, " hkey=%04x", req->hkey );
2387 fprintf( stderr, ", created=%d", req->created );
2390 static void dump_open_key_request( const struct open_key_request *req )
2392 fprintf( stderr, " parent=%04x", req->parent );
2393 fprintf( stderr, ", access=%08x", req->access );
2394 fprintf( stderr, ", attributes=%08x", req->attributes );
2395 dump_varargs_unicode_str( ", name=", cur_size );
2398 static void dump_open_key_reply( const struct open_key_reply *req )
2400 fprintf( stderr, " hkey=%04x", req->hkey );
2403 static void dump_delete_key_request( const struct delete_key_request *req )
2405 fprintf( stderr, " hkey=%04x", req->hkey );
2408 static void dump_flush_key_request( const struct flush_key_request *req )
2410 fprintf( stderr, " hkey=%04x", req->hkey );
2413 static void dump_enum_key_request( const struct enum_key_request *req )
2415 fprintf( stderr, " hkey=%04x", req->hkey );
2416 fprintf( stderr, ", index=%d", req->index );
2417 fprintf( stderr, ", info_class=%d", req->info_class );
2420 static void dump_enum_key_reply( const struct enum_key_reply *req )
2422 fprintf( stderr, " subkeys=%d", req->subkeys );
2423 fprintf( stderr, ", max_subkey=%d", req->max_subkey );
2424 fprintf( stderr, ", max_class=%d", req->max_class );
2425 fprintf( stderr, ", values=%d", req->values );
2426 fprintf( stderr, ", max_value=%d", req->max_value );
2427 fprintf( stderr, ", max_data=%d", req->max_data );
2428 dump_timeout( ", modif=", &req->modif );
2429 fprintf( stderr, ", total=%u", req->total );
2430 fprintf( stderr, ", namelen=%u", req->namelen );
2431 dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
2432 dump_varargs_unicode_str( ", class=", cur_size );
2435 static void dump_set_key_value_request( const struct set_key_value_request *req )
2437 fprintf( stderr, " hkey=%04x", req->hkey );
2438 fprintf( stderr, ", type=%d", req->type );
2439 fprintf( stderr, ", namelen=%u", req->namelen );
2440 dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
2441 dump_varargs_bytes( ", data=", cur_size );
2444 static void dump_get_key_value_request( const struct get_key_value_request *req )
2446 fprintf( stderr, " hkey=%04x", req->hkey );
2447 dump_varargs_unicode_str( ", name=", cur_size );
2450 static void dump_get_key_value_reply( const struct get_key_value_reply *req )
2452 fprintf( stderr, " type=%d", req->type );
2453 fprintf( stderr, ", total=%u", req->total );
2454 dump_varargs_bytes( ", data=", cur_size );
2457 static void dump_enum_key_value_request( const struct enum_key_value_request *req )
2459 fprintf( stderr, " hkey=%04x", req->hkey );
2460 fprintf( stderr, ", index=%d", req->index );
2461 fprintf( stderr, ", info_class=%d", req->info_class );
2464 static void dump_enum_key_value_reply( const struct enum_key_value_reply *req )
2466 fprintf( stderr, " type=%d", req->type );
2467 fprintf( stderr, ", total=%u", req->total );
2468 fprintf( stderr, ", namelen=%u", req->namelen );
2469 dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
2470 dump_varargs_bytes( ", data=", cur_size );
2473 static void dump_delete_key_value_request( const struct delete_key_value_request *req )
2475 fprintf( stderr, " hkey=%04x", req->hkey );
2476 dump_varargs_unicode_str( ", name=", cur_size );
2479 static void dump_load_registry_request( const struct load_registry_request *req )
2481 fprintf( stderr, " file=%04x", req->file );
2482 dump_varargs_object_attributes( ", objattr=", cur_size );
2485 static void dump_unload_registry_request( const struct unload_registry_request *req )
2487 fprintf( stderr, " parent=%04x", req->parent );
2488 fprintf( stderr, ", attributes=%08x", req->attributes );
2489 dump_varargs_unicode_str( ", name=", cur_size );
2492 static void dump_save_registry_request( const struct save_registry_request *req )
2494 fprintf( stderr, " hkey=%04x", req->hkey );
2495 fprintf( stderr, ", file=%04x", req->file );
2498 static void dump_set_registry_notification_request( const struct set_registry_notification_request *req )
2500 fprintf( stderr, " hkey=%04x", req->hkey );
2501 fprintf( stderr, ", event=%04x", req->event );
2502 fprintf( stderr, ", subtree=%d", req->subtree );
2503 fprintf( stderr, ", filter=%08x", req->filter );
2506 static void dump_create_timer_request( const struct create_timer_request *req )
2508 fprintf( stderr, " access=%08x", req->access );
2509 fprintf( stderr, ", manual=%d", req->manual );
2510 dump_varargs_object_attributes( ", objattr=", cur_size );
2513 static void dump_create_timer_reply( const struct create_timer_reply *req )
2515 fprintf( stderr, " handle=%04x", req->handle );
2518 static void dump_open_timer_request( const struct open_timer_request *req )
2520 fprintf( stderr, " access=%08x", req->access );
2521 fprintf( stderr, ", attributes=%08x", req->attributes );
2522 fprintf( stderr, ", rootdir=%04x", req->rootdir );
2523 dump_varargs_unicode_str( ", name=", cur_size );
2526 static void dump_open_timer_reply( const struct open_timer_reply *req )
2528 fprintf( stderr, " handle=%04x", req->handle );
2531 static void dump_set_timer_request( const struct set_timer_request *req )
2533 fprintf( stderr, " handle=%04x", req->handle );
2534 dump_timeout( ", expire=", &req->expire );
2535 dump_uint64( ", callback=", &req->callback );
2536 dump_uint64( ", arg=", &req->arg );
2537 fprintf( stderr, ", period=%d", req->period );
2540 static void dump_set_timer_reply( const struct set_timer_reply *req )
2542 fprintf( stderr, " signaled=%d", req->signaled );
2545 static void dump_cancel_timer_request( const struct cancel_timer_request *req )
2547 fprintf( stderr, " handle=%04x", req->handle );
2550 static void dump_cancel_timer_reply( const struct cancel_timer_reply *req )
2552 fprintf( stderr, " signaled=%d", req->signaled );
2555 static void dump_get_timer_info_request( const struct get_timer_info_request *req )
2557 fprintf( stderr, " handle=%04x", req->handle );
2560 static void dump_get_timer_info_reply( const struct get_timer_info_reply *req )
2562 dump_timeout( " when=", &req->when );
2563 fprintf( stderr, ", signaled=%d", req->signaled );
2566 static void dump_get_thread_context_request( const struct get_thread_context_request *req )
2568 fprintf( stderr, " handle=%04x", req->handle );
2569 fprintf( stderr, ", context=%04x", req->context );
2570 fprintf( stderr, ", flags=%08x", req->flags );
2571 fprintf( stderr, ", machine=%04x", req->machine );
2574 static void dump_get_thread_context_reply( const struct get_thread_context_reply *req )
2576 fprintf( stderr, " self=%d", req->self );
2577 fprintf( stderr, ", handle=%04x", req->handle );
2578 dump_varargs_contexts( ", contexts=", cur_size );
2581 static void dump_set_thread_context_request( const struct set_thread_context_request *req )
2583 fprintf( stderr, " handle=%04x", req->handle );
2584 dump_varargs_contexts( ", contexts=", cur_size );
2587 static void dump_set_thread_context_reply( const struct set_thread_context_reply *req )
2589 fprintf( stderr, " self=%d", req->self );
2592 static void dump_get_selector_entry_request( const struct get_selector_entry_request *req )
2594 fprintf( stderr, " handle=%04x", req->handle );
2595 fprintf( stderr, ", entry=%d", req->entry );
2598 static void dump_get_selector_entry_reply( const struct get_selector_entry_reply *req )
2600 fprintf( stderr, " base=%08x", req->base );
2601 fprintf( stderr, ", limit=%08x", req->limit );
2602 fprintf( stderr, ", flags=%02x", req->flags );
2605 static void dump_add_atom_request( const struct add_atom_request *req )
2607 dump_varargs_unicode_str( " name=", cur_size );
2610 static void dump_add_atom_reply( const struct add_atom_reply *req )
2612 fprintf( stderr, " atom=%04x", req->atom );
2615 static void dump_delete_atom_request( const struct delete_atom_request *req )
2617 fprintf( stderr, " atom=%04x", req->atom );
2620 static void dump_find_atom_request( const struct find_atom_request *req )
2622 dump_varargs_unicode_str( " name=", cur_size );
2625 static void dump_find_atom_reply( const struct find_atom_reply *req )
2627 fprintf( stderr, " atom=%04x", req->atom );
2630 static void dump_get_atom_information_request( const struct get_atom_information_request *req )
2632 fprintf( stderr, " atom=%04x", req->atom );
2635 static void dump_get_atom_information_reply( const struct get_atom_information_reply *req )
2637 fprintf( stderr, " count=%d", req->count );
2638 fprintf( stderr, ", pinned=%d", req->pinned );
2639 fprintf( stderr, ", total=%u", req->total );
2640 dump_varargs_unicode_str( ", name=", cur_size );
2643 static void dump_get_msg_queue_request( const struct get_msg_queue_request *req )
2647 static void dump_get_msg_queue_reply( const struct get_msg_queue_reply *req )
2649 fprintf( stderr, " handle=%04x", req->handle );
2652 static void dump_set_queue_fd_request( const struct set_queue_fd_request *req )
2654 fprintf( stderr, " handle=%04x", req->handle );
2657 static void dump_set_queue_mask_request( const struct set_queue_mask_request *req )
2659 fprintf( stderr, " wake_mask=%08x", req->wake_mask );
2660 fprintf( stderr, ", changed_mask=%08x", req->changed_mask );
2661 fprintf( stderr, ", skip_wait=%d", req->skip_wait );
2664 static void dump_set_queue_mask_reply( const struct set_queue_mask_reply *req )
2666 fprintf( stderr, " wake_bits=%08x", req->wake_bits );
2667 fprintf( stderr, ", changed_bits=%08x", req->changed_bits );
2670 static void dump_get_queue_status_request( const struct get_queue_status_request *req )
2672 fprintf( stderr, " clear_bits=%08x", req->clear_bits );
2675 static void dump_get_queue_status_reply( const struct get_queue_status_reply *req )
2677 fprintf( stderr, " wake_bits=%08x", req->wake_bits );
2678 fprintf( stderr, ", changed_bits=%08x", req->changed_bits );
2681 static void dump_get_process_idle_event_request( const struct get_process_idle_event_request *req )
2683 fprintf( stderr, " handle=%04x", req->handle );
2686 static void dump_get_process_idle_event_reply( const struct get_process_idle_event_reply *req )
2688 fprintf( stderr, " event=%04x", req->event );
2691 static void dump_send_message_request( const struct send_message_request *req )
2693 fprintf( stderr, " id=%04x", req->id );
2694 fprintf( stderr, ", type=%d", req->type );
2695 fprintf( stderr, ", flags=%d", req->flags );
2696 fprintf( stderr, ", win=%08x", req->win );
2697 fprintf( stderr, ", msg=%08x", req->msg );
2698 dump_uint64( ", wparam=", &req->wparam );
2699 dump_uint64( ", lparam=", &req->lparam );
2700 dump_timeout( ", timeout=", &req->timeout );
2701 dump_varargs_message_data( ", data=", cur_size );
2704 static void dump_post_quit_message_request( const struct post_quit_message_request *req )
2706 fprintf( stderr, " exit_code=%d", req->exit_code );
2709 static void dump_send_hardware_message_request( const struct send_hardware_message_request *req )
2711 fprintf( stderr, " win=%08x", req->win );
2712 dump_hw_input( ", input=", &req->input );
2713 fprintf( stderr, ", flags=%08x", req->flags );
2714 dump_varargs_bytes( ", report=", cur_size );
2717 static void dump_send_hardware_message_reply( const struct send_hardware_message_reply *req )
2719 fprintf( stderr, " wait=%d", req->wait );
2720 fprintf( stderr, ", prev_x=%d", req->prev_x );
2721 fprintf( stderr, ", prev_y=%d", req->prev_y );
2722 fprintf( stderr, ", new_x=%d", req->new_x );
2723 fprintf( stderr, ", new_y=%d", req->new_y );
2724 dump_varargs_bytes( ", keystate=", cur_size );
2727 static void dump_get_message_request( const struct get_message_request *req )
2729 fprintf( stderr, " flags=%08x", req->flags );
2730 fprintf( stderr, ", get_win=%08x", req->get_win );
2731 fprintf( stderr, ", get_first=%08x", req->get_first );
2732 fprintf( stderr, ", get_last=%08x", req->get_last );
2733 fprintf( stderr, ", hw_id=%08x", req->hw_id );
2734 fprintf( stderr, ", wake_mask=%08x", req->wake_mask );
2735 fprintf( stderr, ", changed_mask=%08x", req->changed_mask );
2738 static void dump_get_message_reply( const struct get_message_reply *req )
2740 fprintf( stderr, " win=%08x", req->win );
2741 fprintf( stderr, ", msg=%08x", req->msg );
2742 dump_uint64( ", wparam=", &req->wparam );
2743 dump_uint64( ", lparam=", &req->lparam );
2744 fprintf( stderr, ", type=%d", req->type );
2745 fprintf( stderr, ", x=%d", req->x );
2746 fprintf( stderr, ", y=%d", req->y );
2747 fprintf( stderr, ", time=%08x", req->time );
2748 fprintf( stderr, ", active_hooks=%08x", req->active_hooks );
2749 fprintf( stderr, ", total=%u", req->total );
2750 dump_varargs_message_data( ", data=", cur_size );
2753 static void dump_reply_message_request( const struct reply_message_request *req )
2755 fprintf( stderr, " remove=%d", req->remove );
2756 dump_uint64( ", result=", &req->result );
2757 dump_varargs_bytes( ", data=", cur_size );
2760 static void dump_accept_hardware_message_request( const struct accept_hardware_message_request *req )
2762 fprintf( stderr, " hw_id=%08x", req->hw_id );
2765 static void dump_get_message_reply_request( const struct get_message_reply_request *req )
2767 fprintf( stderr, " cancel=%d", req->cancel );
2770 static void dump_get_message_reply_reply( const struct get_message_reply_reply *req )
2772 dump_uint64( " result=", &req->result );
2773 dump_varargs_bytes( ", data=", cur_size );
2776 static void dump_set_win_timer_request( const struct set_win_timer_request *req )
2778 fprintf( stderr, " win=%08x", req->win );
2779 fprintf( stderr, ", msg=%08x", req->msg );
2780 fprintf( stderr, ", rate=%08x", req->rate );
2781 dump_uint64( ", id=", &req->id );
2782 dump_uint64( ", lparam=", &req->lparam );
2785 static void dump_set_win_timer_reply( const struct set_win_timer_reply *req )
2787 dump_uint64( " id=", &req->id );
2790 static void dump_kill_win_timer_request( const struct kill_win_timer_request *req )
2792 fprintf( stderr, " win=%08x", req->win );
2793 dump_uint64( ", id=", &req->id );
2794 fprintf( stderr, ", msg=%08x", req->msg );
2797 static void dump_is_window_hung_request( const struct is_window_hung_request *req )
2799 fprintf( stderr, " win=%08x", req->win );
2802 static void dump_is_window_hung_reply( const struct is_window_hung_reply *req )
2804 fprintf( stderr, " is_hung=%d", req->is_hung );
2807 static void dump_get_serial_info_request( const struct get_serial_info_request *req )
2809 fprintf( stderr, " handle=%04x", req->handle );
2810 fprintf( stderr, ", flags=%d", req->flags );
2813 static void dump_get_serial_info_reply( const struct get_serial_info_reply *req )
2815 fprintf( stderr, " eventmask=%08x", req->eventmask );
2816 fprintf( stderr, ", cookie=%08x", req->cookie );
2817 fprintf( stderr, ", pending_write=%08x", req->pending_write );
2820 static void dump_set_serial_info_request( const struct set_serial_info_request *req )
2822 fprintf( stderr, " handle=%04x", req->handle );
2823 fprintf( stderr, ", flags=%d", req->flags );
2826 static void dump_register_async_request( const struct register_async_request *req )
2828 fprintf( stderr, " type=%d", req->type );
2829 dump_async_data( ", async=", &req->async );
2830 fprintf( stderr, ", count=%d", req->count );
2833 static void dump_cancel_async_request( const struct cancel_async_request *req )
2835 fprintf( stderr, " handle=%04x", req->handle );
2836 dump_uint64( ", iosb=", &req->iosb );
2837 fprintf( stderr, ", only_thread=%d", req->only_thread );
2840 static void dump_get_async_result_request( const struct get_async_result_request *req )
2842 dump_uint64( " user_arg=", &req->user_arg );
2845 static void dump_get_async_result_reply( const struct get_async_result_reply *req )
2847 fprintf( stderr, " size=%u", req->size );
2848 dump_varargs_bytes( ", out_data=", cur_size );
2851 static void dump_read_request( const struct read_request *req )
2853 dump_async_data( " async=", &req->async );
2854 dump_uint64( ", pos=", &req->pos );
2857 static void dump_read_reply( const struct read_reply *req )
2859 fprintf( stderr, " wait=%04x", req->wait );
2860 fprintf( stderr, ", options=%08x", req->options );
2861 dump_varargs_bytes( ", data=", cur_size );
2864 static void dump_write_request( const struct write_request *req )
2866 dump_async_data( " async=", &req->async );
2867 dump_uint64( ", pos=", &req->pos );
2868 dump_varargs_bytes( ", data=", cur_size );
2871 static void dump_write_reply( const struct write_reply *req )
2873 fprintf( stderr, " wait=%04x", req->wait );
2874 fprintf( stderr, ", options=%08x", req->options );
2875 fprintf( stderr, ", size=%u", req->size );
2878 static void dump_ioctl_request( const struct ioctl_request *req )
2880 dump_ioctl_code( " code=", &req->code );
2881 dump_async_data( ", async=", &req->async );
2882 dump_varargs_bytes( ", in_data=", cur_size );
2885 static void dump_ioctl_reply( const struct ioctl_reply *req )
2887 fprintf( stderr, " wait=%04x", req->wait );
2888 fprintf( stderr, ", options=%08x", req->options );
2889 dump_varargs_bytes( ", out_data=", cur_size );
2892 static void dump_set_irp_result_request( const struct set_irp_result_request *req )
2894 fprintf( stderr, " handle=%04x", req->handle );
2895 fprintf( stderr, ", status=%08x", req->status );
2896 fprintf( stderr, ", size=%u", req->size );
2897 dump_varargs_bytes( ", data=", cur_size );
2900 static void dump_create_named_pipe_request( const struct create_named_pipe_request *req )
2902 fprintf( stderr, " access=%08x", req->access );
2903 fprintf( stderr, ", options=%08x", req->options );
2904 fprintf( stderr, ", sharing=%08x", req->sharing );
2905 fprintf( stderr, ", maxinstances=%08x", req->maxinstances );
2906 fprintf( stderr, ", outsize=%08x", req->outsize );
2907 fprintf( stderr, ", insize=%08x", req->insize );
2908 dump_timeout( ", timeout=", &req->timeout );
2909 fprintf( stderr, ", flags=%08x", req->flags );
2910 dump_varargs_object_attributes( ", objattr=", cur_size );
2913 static void dump_create_named_pipe_reply( const struct create_named_pipe_reply *req )
2915 fprintf( stderr, " handle=%04x", req->handle );
2918 static void dump_set_named_pipe_info_request( const struct set_named_pipe_info_request *req )
2920 fprintf( stderr, " handle=%04x", req->handle );
2921 fprintf( stderr, ", flags=%08x", req->flags );
2924 static void dump_create_window_request( const struct create_window_request *req )
2926 fprintf( stderr, " parent=%08x", req->parent );
2927 fprintf( stderr, ", owner=%08x", req->owner );
2928 fprintf( stderr, ", atom=%04x", req->atom );
2929 dump_uint64( ", instance=", &req->instance );
2930 fprintf( stderr, ", dpi=%d", req->dpi );
2931 fprintf( stderr, ", awareness=%d", req->awareness );
2932 dump_varargs_unicode_str( ", class=", cur_size );
2935 static void dump_create_window_reply( const struct create_window_reply *req )
2937 fprintf( stderr, " handle=%08x", req->handle );
2938 fprintf( stderr, ", parent=%08x", req->parent );
2939 fprintf( stderr, ", owner=%08x", req->owner );
2940 fprintf( stderr, ", extra=%d", req->extra );
2941 dump_uint64( ", class_ptr=", &req->class_ptr );
2942 fprintf( stderr, ", dpi=%d", req->dpi );
2943 fprintf( stderr, ", awareness=%d", req->awareness );
2946 static void dump_destroy_window_request( const struct destroy_window_request *req )
2948 fprintf( stderr, " handle=%08x", req->handle );
2951 static void dump_get_desktop_window_request( const struct get_desktop_window_request *req )
2953 fprintf( stderr, " force=%d", req->force );
2956 static void dump_get_desktop_window_reply( const struct get_desktop_window_reply *req )
2958 fprintf( stderr, " top_window=%08x", req->top_window );
2959 fprintf( stderr, ", msg_window=%08x", req->msg_window );
2962 static void dump_set_window_owner_request( const struct set_window_owner_request *req )
2964 fprintf( stderr, " handle=%08x", req->handle );
2965 fprintf( stderr, ", owner=%08x", req->owner );
2968 static void dump_set_window_owner_reply( const struct set_window_owner_reply *req )
2970 fprintf( stderr, " full_owner=%08x", req->full_owner );
2971 fprintf( stderr, ", prev_owner=%08x", req->prev_owner );
2974 static void dump_get_window_info_request( const struct get_window_info_request *req )
2976 fprintf( stderr, " handle=%08x", req->handle );
2979 static void dump_get_window_info_reply( const struct get_window_info_reply *req )
2981 fprintf( stderr, " full_handle=%08x", req->full_handle );
2982 fprintf( stderr, ", last_active=%08x", req->last_active );
2983 fprintf( stderr, ", pid=%04x", req->pid );
2984 fprintf( stderr, ", tid=%04x", req->tid );
2985 fprintf( stderr, ", atom=%04x", req->atom );
2986 fprintf( stderr, ", is_unicode=%d", req->is_unicode );
2987 fprintf( stderr, ", dpi=%d", req->dpi );
2988 fprintf( stderr, ", awareness=%d", req->awareness );
2991 static void dump_set_window_info_request( const struct set_window_info_request *req )
2993 fprintf( stderr, " flags=%04x", req->flags );
2994 fprintf( stderr, ", is_unicode=%d", req->is_unicode );
2995 fprintf( stderr, ", handle=%08x", req->handle );
2996 fprintf( stderr, ", style=%08x", req->style );
2997 fprintf( stderr, ", ex_style=%08x", req->ex_style );
2998 fprintf( stderr, ", id=%08x", req->id );
2999 dump_uint64( ", instance=", &req->instance );
3000 dump_uint64( ", user_data=", &req->user_data );
3001 fprintf( stderr, ", extra_offset=%d", req->extra_offset );
3002 fprintf( stderr, ", extra_size=%u", req->extra_size );
3003 dump_uint64( ", extra_value=", &req->extra_value );
3006 static void dump_set_window_info_reply( const struct set_window_info_reply *req )
3008 fprintf( stderr, " old_style=%08x", req->old_style );
3009 fprintf( stderr, ", old_ex_style=%08x", req->old_ex_style );
3010 dump_uint64( ", old_instance=", &req->old_instance );
3011 dump_uint64( ", old_user_data=", &req->old_user_data );
3012 dump_uint64( ", old_extra_value=", &req->old_extra_value );
3013 fprintf( stderr, ", old_id=%08x", req->old_id );
3016 static void dump_set_parent_request( const struct set_parent_request *req )
3018 fprintf( stderr, " handle=%08x", req->handle );
3019 fprintf( stderr, ", parent=%08x", req->parent );
3022 static void dump_set_parent_reply( const struct set_parent_reply *req )
3024 fprintf( stderr, " old_parent=%08x", req->old_parent );
3025 fprintf( stderr, ", full_parent=%08x", req->full_parent );
3026 fprintf( stderr, ", dpi=%d", req->dpi );
3027 fprintf( stderr, ", awareness=%d", req->awareness );
3030 static void dump_get_window_parents_request( const struct get_window_parents_request *req )
3032 fprintf( stderr, " handle=%08x", req->handle );
3035 static void dump_get_window_parents_reply( const struct get_window_parents_reply *req )
3037 fprintf( stderr, " count=%d", req->count );
3038 dump_varargs_user_handles( ", parents=", cur_size );
3041 static void dump_get_window_children_request( const struct get_window_children_request *req )
3043 fprintf( stderr, " desktop=%04x", req->desktop );
3044 fprintf( stderr, ", parent=%08x", req->parent );
3045 fprintf( stderr, ", atom=%04x", req->atom );
3046 fprintf( stderr, ", tid=%04x", req->tid );
3047 dump_varargs_unicode_str( ", class=", cur_size );
3050 static void dump_get_window_children_reply( const struct get_window_children_reply *req )
3052 fprintf( stderr, " count=%d", req->count );
3053 dump_varargs_user_handles( ", children=", cur_size );
3056 static void dump_get_window_children_from_point_request( const struct get_window_children_from_point_request *req )
3058 fprintf( stderr, " parent=%08x", req->parent );
3059 fprintf( stderr, ", x=%d", req->x );
3060 fprintf( stderr, ", y=%d", req->y );
3061 fprintf( stderr, ", dpi=%d", req->dpi );
3064 static void dump_get_window_children_from_point_reply( const struct get_window_children_from_point_reply *req )
3066 fprintf( stderr, " count=%d", req->count );
3067 dump_varargs_user_handles( ", children=", cur_size );
3070 static void dump_get_window_tree_request( const struct get_window_tree_request *req )
3072 fprintf( stderr, " handle=%08x", req->handle );
3075 static void dump_get_window_tree_reply( const struct get_window_tree_reply *req )
3077 fprintf( stderr, " parent=%08x", req->parent );
3078 fprintf( stderr, ", owner=%08x", req->owner );
3079 fprintf( stderr, ", next_sibling=%08x", req->next_sibling );
3080 fprintf( stderr, ", prev_sibling=%08x", req->prev_sibling );
3081 fprintf( stderr, ", first_sibling=%08x", req->first_sibling );
3082 fprintf( stderr, ", last_sibling=%08x", req->last_sibling );
3083 fprintf( stderr, ", first_child=%08x", req->first_child );
3084 fprintf( stderr, ", last_child=%08x", req->last_child );
3087 static void dump_set_window_pos_request( const struct set_window_pos_request *req )
3089 fprintf( stderr, " swp_flags=%04x", req->swp_flags );
3090 fprintf( stderr, ", paint_flags=%04x", req->paint_flags );
3091 fprintf( stderr, ", handle=%08x", req->handle );
3092 fprintf( stderr, ", previous=%08x", req->previous );
3093 dump_rectangle( ", window=", &req->window );
3094 dump_rectangle( ", client=", &req->client );
3095 dump_varargs_rectangles( ", valid=", cur_size );
3098 static void dump_set_window_pos_reply( const struct set_window_pos_reply *req )
3100 fprintf( stderr, " new_style=%08x", req->new_style );
3101 fprintf( stderr, ", new_ex_style=%08x", req->new_ex_style );
3102 fprintf( stderr, ", surface_win=%08x", req->surface_win );
3103 fprintf( stderr, ", needs_update=%d", req->needs_update );
3106 static void dump_get_window_rectangles_request( const struct get_window_rectangles_request *req )
3108 fprintf( stderr, " handle=%08x", req->handle );
3109 fprintf( stderr, ", relative=%d", req->relative );
3110 fprintf( stderr, ", dpi=%d", req->dpi );
3113 static void dump_get_window_rectangles_reply( const struct get_window_rectangles_reply *req )
3115 dump_rectangle( " window=", &req->window );
3116 dump_rectangle( ", client=", &req->client );
3119 static void dump_get_window_text_request( const struct get_window_text_request *req )
3121 fprintf( stderr, " handle=%08x", req->handle );
3124 static void dump_get_window_text_reply( const struct get_window_text_reply *req )
3126 fprintf( stderr, " length=%u", req->length );
3127 dump_varargs_unicode_str( ", text=", cur_size );
3130 static void dump_set_window_text_request( const struct set_window_text_request *req )
3132 fprintf( stderr, " handle=%08x", req->handle );
3133 dump_varargs_unicode_str( ", text=", cur_size );
3136 static void dump_get_windows_offset_request( const struct get_windows_offset_request *req )
3138 fprintf( stderr, " from=%08x", req->from );
3139 fprintf( stderr, ", to=%08x", req->to );
3140 fprintf( stderr, ", dpi=%d", req->dpi );
3143 static void dump_get_windows_offset_reply( const struct get_windows_offset_reply *req )
3145 fprintf( stderr, " x=%d", req->x );
3146 fprintf( stderr, ", y=%d", req->y );
3147 fprintf( stderr, ", mirror=%d", req->mirror );
3150 static void dump_get_visible_region_request( const struct get_visible_region_request *req )
3152 fprintf( stderr, " window=%08x", req->window );
3153 fprintf( stderr, ", flags=%08x", req->flags );
3156 static void dump_get_visible_region_reply( const struct get_visible_region_reply *req )
3158 fprintf( stderr, " top_win=%08x", req->top_win );
3159 dump_rectangle( ", top_rect=", &req->top_rect );
3160 dump_rectangle( ", win_rect=", &req->win_rect );
3161 fprintf( stderr, ", paint_flags=%08x", req->paint_flags );
3162 fprintf( stderr, ", total_size=%u", req->total_size );
3163 dump_varargs_rectangles( ", region=", cur_size );
3166 static void dump_get_surface_region_request( const struct get_surface_region_request *req )
3168 fprintf( stderr, " window=%08x", req->window );
3171 static void dump_get_surface_region_reply( const struct get_surface_region_reply *req )
3173 dump_rectangle( " visible_rect=", &req->visible_rect );
3174 fprintf( stderr, ", total_size=%u", req->total_size );
3175 dump_varargs_rectangles( ", region=", cur_size );
3178 static void dump_get_window_region_request( const struct get_window_region_request *req )
3180 fprintf( stderr, " window=%08x", req->window );
3183 static void dump_get_window_region_reply( const struct get_window_region_reply *req )
3185 fprintf( stderr, " total_size=%u", req->total_size );
3186 dump_varargs_rectangles( ", region=", cur_size );
3189 static void dump_set_window_region_request( const struct set_window_region_request *req )
3191 fprintf( stderr, " window=%08x", req->window );
3192 fprintf( stderr, ", redraw=%d", req->redraw );
3193 dump_varargs_rectangles( ", region=", cur_size );
3196 static void dump_get_update_region_request( const struct get_update_region_request *req )
3198 fprintf( stderr, " window=%08x", req->window );
3199 fprintf( stderr, ", from_child=%08x", req->from_child );
3200 fprintf( stderr, ", flags=%08x", req->flags );
3203 static void dump_get_update_region_reply( const struct get_update_region_reply *req )
3205 fprintf( stderr, " child=%08x", req->child );
3206 fprintf( stderr, ", flags=%08x", req->flags );
3207 fprintf( stderr, ", total_size=%u", req->total_size );
3208 dump_varargs_rectangles( ", region=", cur_size );
3211 static void dump_update_window_zorder_request( const struct update_window_zorder_request *req )
3213 fprintf( stderr, " window=%08x", req->window );
3214 dump_rectangle( ", rect=", &req->rect );
3217 static void dump_redraw_window_request( const struct redraw_window_request *req )
3219 fprintf( stderr, " window=%08x", req->window );
3220 fprintf( stderr, ", flags=%08x", req->flags );
3221 dump_varargs_rectangles( ", region=", cur_size );
3224 static void dump_set_window_property_request( const struct set_window_property_request *req )
3226 fprintf( stderr, " window=%08x", req->window );
3227 dump_uint64( ", data=", &req->data );
3228 fprintf( stderr, ", atom=%04x", req->atom );
3229 dump_varargs_unicode_str( ", name=", cur_size );
3232 static void dump_remove_window_property_request( const struct remove_window_property_request *req )
3234 fprintf( stderr, " window=%08x", req->window );
3235 fprintf( stderr, ", atom=%04x", req->atom );
3236 dump_varargs_unicode_str( ", name=", cur_size );
3239 static void dump_remove_window_property_reply( const struct remove_window_property_reply *req )
3241 dump_uint64( " data=", &req->data );
3244 static void dump_get_window_property_request( const struct get_window_property_request *req )
3246 fprintf( stderr, " window=%08x", req->window );
3247 fprintf( stderr, ", atom=%04x", req->atom );
3248 dump_varargs_unicode_str( ", name=", cur_size );
3251 static void dump_get_window_property_reply( const struct get_window_property_reply *req )
3253 dump_uint64( " data=", &req->data );
3256 static void dump_get_window_properties_request( const struct get_window_properties_request *req )
3258 fprintf( stderr, " window=%08x", req->window );
3261 static void dump_get_window_properties_reply( const struct get_window_properties_reply *req )
3263 fprintf( stderr, " total=%d", req->total );
3264 dump_varargs_properties( ", props=", cur_size );
3267 static void dump_create_winstation_request( const struct create_winstation_request *req )
3269 fprintf( stderr, " flags=%08x", req->flags );
3270 fprintf( stderr, ", access=%08x", req->access );
3271 fprintf( stderr, ", attributes=%08x", req->attributes );
3272 fprintf( stderr, ", rootdir=%04x", req->rootdir );
3273 dump_varargs_unicode_str( ", name=", cur_size );
3276 static void dump_create_winstation_reply( const struct create_winstation_reply *req )
3278 fprintf( stderr, " handle=%04x", req->handle );
3281 static void dump_open_winstation_request( const struct open_winstation_request *req )
3283 fprintf( stderr, " access=%08x", req->access );
3284 fprintf( stderr, ", attributes=%08x", req->attributes );
3285 fprintf( stderr, ", rootdir=%04x", req->rootdir );
3286 dump_varargs_unicode_str( ", name=", cur_size );
3289 static void dump_open_winstation_reply( const struct open_winstation_reply *req )
3291 fprintf( stderr, " handle=%04x", req->handle );
3294 static void dump_close_winstation_request( const struct close_winstation_request *req )
3296 fprintf( stderr, " handle=%04x", req->handle );
3299 static void dump_get_process_winstation_request( const struct get_process_winstation_request *req )
3303 static void dump_get_process_winstation_reply( const struct get_process_winstation_reply *req )
3305 fprintf( stderr, " handle=%04x", req->handle );
3308 static void dump_set_process_winstation_request( const struct set_process_winstation_request *req )
3310 fprintf( stderr, " handle=%04x", req->handle );
3313 static void dump_enum_winstation_request( const struct enum_winstation_request *req )
3315 fprintf( stderr, " index=%08x", req->index );
3318 static void dump_enum_winstation_reply( const struct enum_winstation_reply *req )
3320 fprintf( stderr, " next=%08x", req->next );
3321 dump_varargs_unicode_str( ", name=", cur_size );
3324 static void dump_create_desktop_request( const struct create_desktop_request *req )
3326 fprintf( stderr, " flags=%08x", req->flags );
3327 fprintf( stderr, ", access=%08x", req->access );
3328 fprintf( stderr, ", attributes=%08x", req->attributes );
3329 dump_varargs_unicode_str( ", name=", cur_size );
3332 static void dump_create_desktop_reply( const struct create_desktop_reply *req )
3334 fprintf( stderr, " handle=%04x", req->handle );
3337 static void dump_open_desktop_request( const struct open_desktop_request *req )
3339 fprintf( stderr, " winsta=%04x", req->winsta );
3340 fprintf( stderr, ", flags=%08x", req->flags );
3341 fprintf( stderr, ", access=%08x", req->access );
3342 fprintf( stderr, ", attributes=%08x", req->attributes );
3343 dump_varargs_unicode_str( ", name=", cur_size );
3346 static void dump_open_desktop_reply( const struct open_desktop_reply *req )
3348 fprintf( stderr, " handle=%04x", req->handle );
3351 static void dump_open_input_desktop_request( const struct open_input_desktop_request *req )
3353 fprintf( stderr, " flags=%08x", req->flags );
3354 fprintf( stderr, ", access=%08x", req->access );
3355 fprintf( stderr, ", attributes=%08x", req->attributes );
3358 static void dump_open_input_desktop_reply( const struct open_input_desktop_reply *req )
3360 fprintf( stderr, " handle=%04x", req->handle );
3363 static void dump_close_desktop_request( const struct close_desktop_request *req )
3365 fprintf( stderr, " handle=%04x", req->handle );
3368 static void dump_get_thread_desktop_request( const struct get_thread_desktop_request *req )
3370 fprintf( stderr, " tid=%04x", req->tid );
3373 static void dump_get_thread_desktop_reply( const struct get_thread_desktop_reply *req )
3375 fprintf( stderr, " handle=%04x", req->handle );
3378 static void dump_set_thread_desktop_request( const struct set_thread_desktop_request *req )
3380 fprintf( stderr, " handle=%04x", req->handle );
3383 static void dump_enum_desktop_request( const struct enum_desktop_request *req )
3385 fprintf( stderr, " winstation=%04x", req->winstation );
3386 fprintf( stderr, ", index=%08x", req->index );
3389 static void dump_enum_desktop_reply( const struct enum_desktop_reply *req )
3391 fprintf( stderr, " next=%08x", req->next );
3392 dump_varargs_unicode_str( ", name=", cur_size );
3395 static void dump_set_user_object_info_request( const struct set_user_object_info_request *req )
3397 fprintf( stderr, " handle=%04x", req->handle );
3398 fprintf( stderr, ", flags=%08x", req->flags );
3399 fprintf( stderr, ", obj_flags=%08x", req->obj_flags );
3402 static void dump_set_user_object_info_reply( const struct set_user_object_info_reply *req )
3404 fprintf( stderr, " is_desktop=%d", req->is_desktop );
3405 fprintf( stderr, ", old_obj_flags=%08x", req->old_obj_flags );
3406 dump_varargs_unicode_str( ", name=", cur_size );
3409 static void dump_register_hotkey_request( const struct register_hotkey_request *req )
3411 fprintf( stderr, " window=%08x", req->window );
3412 fprintf( stderr, ", id=%d", req->id );
3413 fprintf( stderr, ", flags=%08x", req->flags );
3414 fprintf( stderr, ", vkey=%08x", req->vkey );
3417 static void dump_register_hotkey_reply( const struct register_hotkey_reply *req )
3419 fprintf( stderr, " replaced=%d", req->replaced );
3420 fprintf( stderr, ", flags=%08x", req->flags );
3421 fprintf( stderr, ", vkey=%08x", req->vkey );
3424 static void dump_unregister_hotkey_request( const struct unregister_hotkey_request *req )
3426 fprintf( stderr, " window=%08x", req->window );
3427 fprintf( stderr, ", id=%d", req->id );
3430 static void dump_unregister_hotkey_reply( const struct unregister_hotkey_reply *req )
3432 fprintf( stderr, " flags=%08x", req->flags );
3433 fprintf( stderr, ", vkey=%08x", req->vkey );
3436 static void dump_attach_thread_input_request( const struct attach_thread_input_request *req )
3438 fprintf( stderr, " tid_from=%04x", req->tid_from );
3439 fprintf( stderr, ", tid_to=%04x", req->tid_to );
3440 fprintf( stderr, ", attach=%d", req->attach );
3443 static void dump_get_thread_input_request( const struct get_thread_input_request *req )
3445 fprintf( stderr, " tid=%04x", req->tid );
3448 static void dump_get_thread_input_reply( const struct get_thread_input_reply *req )
3450 fprintf( stderr, " focus=%08x", req->focus );
3451 fprintf( stderr, ", capture=%08x", req->capture );
3452 fprintf( stderr, ", active=%08x", req->active );
3453 fprintf( stderr, ", foreground=%08x", req->foreground );
3454 fprintf( stderr, ", menu_owner=%08x", req->menu_owner );
3455 fprintf( stderr, ", move_size=%08x", req->move_size );
3456 fprintf( stderr, ", caret=%08x", req->caret );
3457 fprintf( stderr, ", cursor=%08x", req->cursor );
3458 fprintf( stderr, ", show_count=%d", req->show_count );
3459 dump_rectangle( ", rect=", &req->rect );
3462 static void dump_get_last_input_time_request( const struct get_last_input_time_request *req )
3466 static void dump_get_last_input_time_reply( const struct get_last_input_time_reply *req )
3468 fprintf( stderr, " time=%08x", req->time );
3471 static void dump_get_key_state_request( const struct get_key_state_request *req )
3473 fprintf( stderr, " async=%d", req->async );
3474 fprintf( stderr, ", key=%d", req->key );
3477 static void dump_get_key_state_reply( const struct get_key_state_reply *req )
3479 fprintf( stderr, " state=%02x", req->state );
3480 dump_varargs_bytes( ", keystate=", cur_size );
3483 static void dump_set_key_state_request( const struct set_key_state_request *req )
3485 fprintf( stderr, " async=%d", req->async );
3486 dump_varargs_bytes( ", keystate=", cur_size );
3489 static void dump_set_foreground_window_request( const struct set_foreground_window_request *req )
3491 fprintf( stderr, " handle=%08x", req->handle );
3494 static void dump_set_foreground_window_reply( const struct set_foreground_window_reply *req )
3496 fprintf( stderr, " previous=%08x", req->previous );
3497 fprintf( stderr, ", send_msg_old=%d", req->send_msg_old );
3498 fprintf( stderr, ", send_msg_new=%d", req->send_msg_new );
3501 static void dump_set_focus_window_request( const struct set_focus_window_request *req )
3503 fprintf( stderr, " handle=%08x", req->handle );
3506 static void dump_set_focus_window_reply( const struct set_focus_window_reply *req )
3508 fprintf( stderr, " previous=%08x", req->previous );
3511 static void dump_set_active_window_request( const struct set_active_window_request *req )
3513 fprintf( stderr, " handle=%08x", req->handle );
3516 static void dump_set_active_window_reply( const struct set_active_window_reply *req )
3518 fprintf( stderr, " previous=%08x", req->previous );
3521 static void dump_set_capture_window_request( const struct set_capture_window_request *req )
3523 fprintf( stderr, " handle=%08x", req->handle );
3524 fprintf( stderr, ", flags=%08x", req->flags );
3527 static void dump_set_capture_window_reply( const struct set_capture_window_reply *req )
3529 fprintf( stderr, " previous=%08x", req->previous );
3530 fprintf( stderr, ", full_handle=%08x", req->full_handle );
3533 static void dump_set_caret_window_request( const struct set_caret_window_request *req )
3535 fprintf( stderr, " handle=%08x", req->handle );
3536 fprintf( stderr, ", width=%d", req->width );
3537 fprintf( stderr, ", height=%d", req->height );
3540 static void dump_set_caret_window_reply( const struct set_caret_window_reply *req )
3542 fprintf( stderr, " previous=%08x", req->previous );
3543 dump_rectangle( ", old_rect=", &req->old_rect );
3544 fprintf( stderr, ", old_hide=%d", req->old_hide );
3545 fprintf( stderr, ", old_state=%d", req->old_state );
3548 static void dump_set_caret_info_request( const struct set_caret_info_request *req )
3550 fprintf( stderr, " flags=%08x", req->flags );
3551 fprintf( stderr, ", handle=%08x", req->handle );
3552 fprintf( stderr, ", x=%d", req->x );
3553 fprintf( stderr, ", y=%d", req->y );
3554 fprintf( stderr, ", hide=%d", req->hide );
3555 fprintf( stderr, ", state=%d", req->state );
3558 static void dump_set_caret_info_reply( const struct set_caret_info_reply *req )
3560 fprintf( stderr, " full_handle=%08x", req->full_handle );
3561 dump_rectangle( ", old_rect=", &req->old_rect );
3562 fprintf( stderr, ", old_hide=%d", req->old_hide );
3563 fprintf( stderr, ", old_state=%d", req->old_state );
3566 static void dump_set_hook_request( const struct set_hook_request *req )
3568 fprintf( stderr, " id=%d", req->id );
3569 fprintf( stderr, ", pid=%04x", req->pid );
3570 fprintf( stderr, ", tid=%04x", req->tid );
3571 fprintf( stderr, ", event_min=%d", req->event_min );
3572 fprintf( stderr, ", event_max=%d", req->event_max );
3573 dump_uint64( ", proc=", &req->proc );
3574 fprintf( stderr, ", flags=%d", req->flags );
3575 fprintf( stderr, ", unicode=%d", req->unicode );
3576 dump_varargs_unicode_str( ", module=", cur_size );
3579 static void dump_set_hook_reply( const struct set_hook_reply *req )
3581 fprintf( stderr, " handle=%08x", req->handle );
3582 fprintf( stderr, ", active_hooks=%08x", req->active_hooks );
3585 static void dump_remove_hook_request( const struct remove_hook_request *req )
3587 fprintf( stderr, " handle=%08x", req->handle );
3588 dump_uint64( ", proc=", &req->proc );
3589 fprintf( stderr, ", id=%d", req->id );
3592 static void dump_remove_hook_reply( const struct remove_hook_reply *req )
3594 fprintf( stderr, " active_hooks=%08x", req->active_hooks );
3597 static void dump_start_hook_chain_request( const struct start_hook_chain_request *req )
3599 fprintf( stderr, " id=%d", req->id );
3600 fprintf( stderr, ", event=%d", req->event );
3601 fprintf( stderr, ", window=%08x", req->window );
3602 fprintf( stderr, ", object_id=%d", req->object_id );
3603 fprintf( stderr, ", child_id=%d", req->child_id );
3606 static void dump_start_hook_chain_reply( const struct start_hook_chain_reply *req )
3608 fprintf( stderr, " handle=%08x", req->handle );
3609 fprintf( stderr, ", pid=%04x", req->pid );
3610 fprintf( stderr, ", tid=%04x", req->tid );
3611 fprintf( stderr, ", unicode=%d", req->unicode );
3612 dump_uint64( ", proc=", &req->proc );
3613 fprintf( stderr, ", active_hooks=%08x", req->active_hooks );
3614 dump_varargs_unicode_str( ", module=", cur_size );
3617 static void dump_finish_hook_chain_request( const struct finish_hook_chain_request *req )
3619 fprintf( stderr, " id=%d", req->id );
3622 static void dump_get_hook_info_request( const struct get_hook_info_request *req )
3624 fprintf( stderr, " handle=%08x", req->handle );
3625 fprintf( stderr, ", get_next=%d", req->get_next );
3626 fprintf( stderr, ", event=%d", req->event );
3627 fprintf( stderr, ", window=%08x", req->window );
3628 fprintf( stderr, ", object_id=%d", req->object_id );
3629 fprintf( stderr, ", child_id=%d", req->child_id );
3632 static void dump_get_hook_info_reply( const struct get_hook_info_reply *req )
3634 fprintf( stderr, " handle=%08x", req->handle );
3635 fprintf( stderr, ", id=%d", req->id );
3636 fprintf( stderr, ", pid=%04x", req->pid );
3637 fprintf( stderr, ", tid=%04x", req->tid );
3638 dump_uint64( ", proc=", &req->proc );
3639 fprintf( stderr, ", unicode=%d", req->unicode );
3640 dump_varargs_unicode_str( ", module=", cur_size );
3643 static void dump_create_class_request( const struct create_class_request *req )
3645 fprintf( stderr, " local=%d", req->local );
3646 fprintf( stderr, ", atom=%04x", req->atom );
3647 fprintf( stderr, ", style=%08x", req->style );
3648 dump_uint64( ", instance=", &req->instance );
3649 fprintf( stderr, ", extra=%d", req->extra );
3650 fprintf( stderr, ", win_extra=%d", req->win_extra );
3651 dump_uint64( ", client_ptr=", &req->client_ptr );
3652 fprintf( stderr, ", name_offset=%u", req->name_offset );
3653 dump_varargs_unicode_str( ", name=", cur_size );
3656 static void dump_create_class_reply( const struct create_class_reply *req )
3658 fprintf( stderr, " atom=%04x", req->atom );
3661 static void dump_destroy_class_request( const struct destroy_class_request *req )
3663 fprintf( stderr, " atom=%04x", req->atom );
3664 dump_uint64( ", instance=", &req->instance );
3665 dump_varargs_unicode_str( ", name=", cur_size );
3668 static void dump_destroy_class_reply( const struct destroy_class_reply *req )
3670 dump_uint64( " client_ptr=", &req->client_ptr );
3673 static void dump_set_class_info_request( const struct set_class_info_request *req )
3675 fprintf( stderr, " window=%08x", req->window );
3676 fprintf( stderr, ", flags=%08x", req->flags );
3677 fprintf( stderr, ", atom=%04x", req->atom );
3678 fprintf( stderr, ", style=%08x", req->style );
3679 fprintf( stderr, ", win_extra=%d", req->win_extra );
3680 dump_uint64( ", instance=", &req->instance );
3681 fprintf( stderr, ", extra_offset=%d", req->extra_offset );
3682 fprintf( stderr, ", extra_size=%u", req->extra_size );
3683 dump_uint64( ", extra_value=", &req->extra_value );
3686 static void dump_set_class_info_reply( const struct set_class_info_reply *req )
3688 fprintf( stderr, " old_atom=%04x", req->old_atom );
3689 fprintf( stderr, ", base_atom=%04x", req->base_atom );
3690 dump_uint64( ", old_instance=", &req->old_instance );
3691 dump_uint64( ", old_extra_value=", &req->old_extra_value );
3692 fprintf( stderr, ", old_style=%08x", req->old_style );
3693 fprintf( stderr, ", old_extra=%d", req->old_extra );
3694 fprintf( stderr, ", old_win_extra=%d", req->old_win_extra );
3697 static void dump_open_clipboard_request( const struct open_clipboard_request *req )
3699 fprintf( stderr, " window=%08x", req->window );
3702 static void dump_open_clipboard_reply( const struct open_clipboard_reply *req )
3704 fprintf( stderr, " owner=%08x", req->owner );
3707 static void dump_close_clipboard_request( const struct close_clipboard_request *req )
3711 static void dump_close_clipboard_reply( const struct close_clipboard_reply *req )
3713 fprintf( stderr, " viewer=%08x", req->viewer );
3714 fprintf( stderr, ", owner=%08x", req->owner );
3717 static void dump_empty_clipboard_request( const struct empty_clipboard_request *req )
3721 static void dump_set_clipboard_data_request( const struct set_clipboard_data_request *req )
3723 fprintf( stderr, " format=%08x", req->format );
3724 fprintf( stderr, ", lcid=%08x", req->lcid );
3725 dump_varargs_bytes( ", data=", cur_size );
3728 static void dump_set_clipboard_data_reply( const struct set_clipboard_data_reply *req )
3730 fprintf( stderr, " seqno=%08x", req->seqno );
3733 static void dump_get_clipboard_data_request( const struct get_clipboard_data_request *req )
3735 fprintf( stderr, " format=%08x", req->format );
3736 fprintf( stderr, ", render=%d", req->render );
3737 fprintf( stderr, ", cached=%d", req->cached );
3738 fprintf( stderr, ", seqno=%08x", req->seqno );
3741 static void dump_get_clipboard_data_reply( const struct get_clipboard_data_reply *req )
3743 fprintf( stderr, " from=%08x", req->from );
3744 fprintf( stderr, ", owner=%08x", req->owner );
3745 fprintf( stderr, ", seqno=%08x", req->seqno );
3746 fprintf( stderr, ", total=%u", req->total );
3747 dump_varargs_bytes( ", data=", cur_size );
3750 static void dump_get_clipboard_formats_request( const struct get_clipboard_formats_request *req )
3752 fprintf( stderr, " format=%08x", req->format );
3755 static void dump_get_clipboard_formats_reply( const struct get_clipboard_formats_reply *req )
3757 fprintf( stderr, " count=%08x", req->count );
3758 dump_varargs_uints( ", formats=", cur_size );
3761 static void dump_enum_clipboard_formats_request( const struct enum_clipboard_formats_request *req )
3763 fprintf( stderr, " previous=%08x", req->previous );
3766 static void dump_enum_clipboard_formats_reply( const struct enum_clipboard_formats_reply *req )
3768 fprintf( stderr, " format=%08x", req->format );
3771 static void dump_release_clipboard_request( const struct release_clipboard_request *req )
3773 fprintf( stderr, " owner=%08x", req->owner );
3776 static void dump_release_clipboard_reply( const struct release_clipboard_reply *req )
3778 fprintf( stderr, " viewer=%08x", req->viewer );
3779 fprintf( stderr, ", owner=%08x", req->owner );
3782 static void dump_get_clipboard_info_request( const struct get_clipboard_info_request *req )
3786 static void dump_get_clipboard_info_reply( const struct get_clipboard_info_reply *req )
3788 fprintf( stderr, " window=%08x", req->window );
3789 fprintf( stderr, ", owner=%08x", req->owner );
3790 fprintf( stderr, ", viewer=%08x", req->viewer );
3791 fprintf( stderr, ", seqno=%08x", req->seqno );
3794 static void dump_set_clipboard_viewer_request( const struct set_clipboard_viewer_request *req )
3796 fprintf( stderr, " viewer=%08x", req->viewer );
3797 fprintf( stderr, ", previous=%08x", req->previous );
3800 static void dump_set_clipboard_viewer_reply( const struct set_clipboard_viewer_reply *req )
3802 fprintf( stderr, " old_viewer=%08x", req->old_viewer );
3803 fprintf( stderr, ", owner=%08x", req->owner );
3806 static void dump_add_clipboard_listener_request( const struct add_clipboard_listener_request *req )
3808 fprintf( stderr, " window=%08x", req->window );
3811 static void dump_remove_clipboard_listener_request( const struct remove_clipboard_listener_request *req )
3813 fprintf( stderr, " window=%08x", req->window );
3816 static void dump_open_token_request( const struct open_token_request *req )
3818 fprintf( stderr, " handle=%04x", req->handle );
3819 fprintf( stderr, ", access=%08x", req->access );
3820 fprintf( stderr, ", attributes=%08x", req->attributes );
3821 fprintf( stderr, ", flags=%08x", req->flags );
3824 static void dump_open_token_reply( const struct open_token_reply *req )
3826 fprintf( stderr, " token=%04x", req->token );
3829 static void dump_set_global_windows_request( const struct set_global_windows_request *req )
3831 fprintf( stderr, " flags=%08x", req->flags );
3832 fprintf( stderr, ", shell_window=%08x", req->shell_window );
3833 fprintf( stderr, ", shell_listview=%08x", req->shell_listview );
3834 fprintf( stderr, ", progman_window=%08x", req->progman_window );
3835 fprintf( stderr, ", taskman_window=%08x", req->taskman_window );
3838 static void dump_set_global_windows_reply( const struct set_global_windows_reply *req )
3840 fprintf( stderr, " old_shell_window=%08x", req->old_shell_window );
3841 fprintf( stderr, ", old_shell_listview=%08x", req->old_shell_listview );
3842 fprintf( stderr, ", old_progman_window=%08x", req->old_progman_window );
3843 fprintf( stderr, ", old_taskman_window=%08x", req->old_taskman_window );
3846 static void dump_adjust_token_privileges_request( const struct adjust_token_privileges_request *req )
3848 fprintf( stderr, " handle=%04x", req->handle );
3849 fprintf( stderr, ", disable_all=%d", req->disable_all );
3850 fprintf( stderr, ", get_modified_state=%d", req->get_modified_state );
3851 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3854 static void dump_adjust_token_privileges_reply( const struct adjust_token_privileges_reply *req )
3856 fprintf( stderr, " len=%08x", req->len );
3857 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3860 static void dump_get_token_privileges_request( const struct get_token_privileges_request *req )
3862 fprintf( stderr, " handle=%04x", req->handle );
3865 static void dump_get_token_privileges_reply( const struct get_token_privileges_reply *req )
3867 fprintf( stderr, " len=%08x", req->len );
3868 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3871 static void dump_check_token_privileges_request( const struct check_token_privileges_request *req )
3873 fprintf( stderr, " handle=%04x", req->handle );
3874 fprintf( stderr, ", all_required=%d", req->all_required );
3875 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3878 static void dump_check_token_privileges_reply( const struct check_token_privileges_reply *req )
3880 fprintf( stderr, " has_privileges=%d", req->has_privileges );
3881 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3884 static void dump_duplicate_token_request( const struct duplicate_token_request *req )
3886 fprintf( stderr, " handle=%04x", req->handle );
3887 fprintf( stderr, ", access=%08x", req->access );
3888 fprintf( stderr, ", primary=%d", req->primary );
3889 fprintf( stderr, ", impersonation_level=%d", req->impersonation_level );
3890 dump_varargs_object_attributes( ", objattr=", cur_size );
3893 static void dump_duplicate_token_reply( const struct duplicate_token_reply *req )
3895 fprintf( stderr, " new_handle=%04x", req->new_handle );
3898 static void dump_filter_token_request( const struct filter_token_request *req )
3900 fprintf( stderr, " handle=%04x", req->handle );
3901 fprintf( stderr, ", flags=%08x", req->flags );
3902 fprintf( stderr, ", privileges_size=%u", req->privileges_size );
3903 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", min(cur_size,req->privileges_size) );
3904 dump_varargs_SID( ", disable_sids=", cur_size );
3907 static void dump_filter_token_reply( const struct filter_token_reply *req )
3909 fprintf( stderr, " new_handle=%04x", req->new_handle );
3912 static void dump_access_check_request( const struct access_check_request *req )
3914 fprintf( stderr, " handle=%04x", req->handle );
3915 fprintf( stderr, ", desired_access=%08x", req->desired_access );
3916 dump_generic_map( ", mapping=", &req->mapping );
3917 dump_varargs_security_descriptor( ", sd=", cur_size );
3920 static void dump_access_check_reply( const struct access_check_reply *req )
3922 fprintf( stderr, " access_granted=%08x", req->access_granted );
3923 fprintf( stderr, ", access_status=%08x", req->access_status );
3924 fprintf( stderr, ", privileges_len=%08x", req->privileges_len );
3925 dump_varargs_LUID_AND_ATTRIBUTES( ", privileges=", cur_size );
3928 static void dump_get_token_sid_request( const struct get_token_sid_request *req )
3930 fprintf( stderr, " handle=%04x", req->handle );
3931 fprintf( stderr, ", which_sid=%08x", req->which_sid );
3934 static void dump_get_token_sid_reply( const struct get_token_sid_reply *req )
3936 fprintf( stderr, " sid_len=%u", req->sid_len );
3937 dump_varargs_SID( ", sid=", cur_size );
3940 static void dump_get_token_groups_request( const struct get_token_groups_request *req )
3942 fprintf( stderr, " handle=%04x", req->handle );
3945 static void dump_get_token_groups_reply( const struct get_token_groups_reply *req )
3947 fprintf( stderr, " user_len=%u", req->user_len );
3948 dump_varargs_token_groups( ", user=", cur_size );
3951 static void dump_get_token_default_dacl_request( const struct get_token_default_dacl_request *req )
3953 fprintf( stderr, " handle=%04x", req->handle );
3956 static void dump_get_token_default_dacl_reply( const struct get_token_default_dacl_reply *req )
3958 fprintf( stderr, " acl_len=%u", req->acl_len );
3959 dump_varargs_ACL( ", acl=", cur_size );
3962 static void dump_set_token_default_dacl_request( const struct set_token_default_dacl_request *req )
3964 fprintf( stderr, " handle=%04x", req->handle );
3965 dump_varargs_ACL( ", acl=", cur_size );
3968 static void dump_set_security_object_request( const struct set_security_object_request *req )
3970 fprintf( stderr, " handle=%04x", req->handle );
3971 fprintf( stderr, ", security_info=%08x", req->security_info );
3972 dump_varargs_security_descriptor( ", sd=", cur_size );
3975 static void dump_get_security_object_request( const struct get_security_object_request *req )
3977 fprintf( stderr, " handle=%04x", req->handle );
3978 fprintf( stderr, ", security_info=%08x", req->security_info );
3981 static void dump_get_security_object_reply( const struct get_security_object_reply *req )
3983 fprintf( stderr, " sd_len=%08x", req->sd_len );
3984 dump_varargs_security_descriptor( ", sd=", cur_size );
3987 static void dump_get_system_handles_request( const struct get_system_handles_request *req )
3991 static void dump_get_system_handles_reply( const struct get_system_handles_reply *req )
3993 fprintf( stderr, " count=%08x", req->count );
3994 dump_varargs_handle_infos( ", data=", cur_size );
3997 static void dump_create_mailslot_request( const struct create_mailslot_request *req )
3999 fprintf( stderr, " access=%08x", req->access );
4000 dump_timeout( ", read_timeout=", &req->read_timeout );
4001 fprintf( stderr, ", max_msgsize=%08x", req->max_msgsize );
4002 dump_varargs_object_attributes( ", objattr=", cur_size );
4005 static void dump_create_mailslot_reply( const struct create_mailslot_reply *req )
4007 fprintf( stderr, " handle=%04x", req->handle );
4010 static void dump_set_mailslot_info_request( const struct set_mailslot_info_request *req )
4012 fprintf( stderr, " handle=%04x", req->handle );
4013 dump_timeout( ", read_timeout=", &req->read_timeout );
4014 fprintf( stderr, ", flags=%08x", req->flags );
4017 static void dump_set_mailslot_info_reply( const struct set_mailslot_info_reply *req )
4019 dump_timeout( " read_timeout=", &req->read_timeout );
4020 fprintf( stderr, ", max_msgsize=%08x", req->max_msgsize );
4023 static void dump_create_directory_request( const struct create_directory_request *req )
4025 fprintf( stderr, " access=%08x", req->access );
4026 dump_varargs_object_attributes( ", objattr=", cur_size );
4029 static void dump_create_directory_reply( const struct create_directory_reply *req )
4031 fprintf( stderr, " handle=%04x", req->handle );
4034 static void dump_open_directory_request( const struct open_directory_request *req )
4036 fprintf( stderr, " access=%08x", req->access );
4037 fprintf( stderr, ", attributes=%08x", req->attributes );
4038 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4039 dump_varargs_unicode_str( ", directory_name=", cur_size );
4042 static void dump_open_directory_reply( const struct open_directory_reply *req )
4044 fprintf( stderr, " handle=%04x", req->handle );
4047 static void dump_get_directory_entry_request( const struct get_directory_entry_request *req )
4049 fprintf( stderr, " handle=%04x", req->handle );
4050 fprintf( stderr, ", index=%08x", req->index );
4053 static void dump_get_directory_entry_reply( const struct get_directory_entry_reply *req )
4055 fprintf( stderr, " name_len=%u", req->name_len );
4056 dump_varargs_unicode_str( ", name=", min(cur_size,req->name_len) );
4057 dump_varargs_unicode_str( ", type=", cur_size );
4060 static void dump_create_symlink_request( const struct create_symlink_request *req )
4062 fprintf( stderr, " access=%08x", req->access );
4063 dump_varargs_object_attributes( ", objattr=", cur_size );
4064 dump_varargs_unicode_str( ", target_name=", cur_size );
4067 static void dump_create_symlink_reply( const struct create_symlink_reply *req )
4069 fprintf( stderr, " handle=%04x", req->handle );
4072 static void dump_open_symlink_request( const struct open_symlink_request *req )
4074 fprintf( stderr, " access=%08x", req->access );
4075 fprintf( stderr, ", attributes=%08x", req->attributes );
4076 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4077 dump_varargs_unicode_str( ", name=", cur_size );
4080 static void dump_open_symlink_reply( const struct open_symlink_reply *req )
4082 fprintf( stderr, " handle=%04x", req->handle );
4085 static void dump_query_symlink_request( const struct query_symlink_request *req )
4087 fprintf( stderr, " handle=%04x", req->handle );
4090 static void dump_query_symlink_reply( const struct query_symlink_reply *req )
4092 fprintf( stderr, " total=%u", req->total );
4093 dump_varargs_unicode_str( ", target_name=", cur_size );
4096 static void dump_get_object_info_request( const struct get_object_info_request *req )
4098 fprintf( stderr, " handle=%04x", req->handle );
4101 static void dump_get_object_info_reply( const struct get_object_info_reply *req )
4103 fprintf( stderr, " access=%08x", req->access );
4104 fprintf( stderr, ", ref_count=%08x", req->ref_count );
4105 fprintf( stderr, ", handle_count=%08x", req->handle_count );
4108 static void dump_get_object_name_request( const struct get_object_name_request *req )
4110 fprintf( stderr, " handle=%04x", req->handle );
4113 static void dump_get_object_name_reply( const struct get_object_name_reply *req )
4115 fprintf( stderr, " total=%u", req->total );
4116 dump_varargs_unicode_str( ", name=", cur_size );
4119 static void dump_get_object_type_request( const struct get_object_type_request *req )
4121 fprintf( stderr, " handle=%04x", req->handle );
4124 static void dump_get_object_type_reply( const struct get_object_type_reply *req )
4126 dump_varargs_object_type_info( " info=", cur_size );
4129 static void dump_get_object_types_request( const struct get_object_types_request *req )
4133 static void dump_get_object_types_reply( const struct get_object_types_reply *req )
4135 fprintf( stderr, " count=%d", req->count );
4136 dump_varargs_object_types_info( ", info=", cur_size );
4139 static void dump_allocate_locally_unique_id_request( const struct allocate_locally_unique_id_request *req )
4143 static void dump_allocate_locally_unique_id_reply( const struct allocate_locally_unique_id_reply *req )
4145 dump_luid( " luid=", &req->luid );
4148 static void dump_create_device_manager_request( const struct create_device_manager_request *req )
4150 fprintf( stderr, " access=%08x", req->access );
4151 fprintf( stderr, ", attributes=%08x", req->attributes );
4154 static void dump_create_device_manager_reply( const struct create_device_manager_reply *req )
4156 fprintf( stderr, " handle=%04x", req->handle );
4159 static void dump_create_device_request( const struct create_device_request *req )
4161 fprintf( stderr, " rootdir=%04x", req->rootdir );
4162 dump_uint64( ", user_ptr=", &req->user_ptr );
4163 fprintf( stderr, ", manager=%04x", req->manager );
4164 dump_varargs_unicode_str( ", name=", cur_size );
4167 static void dump_delete_device_request( const struct delete_device_request *req )
4169 fprintf( stderr, " manager=%04x", req->manager );
4170 dump_uint64( ", device=", &req->device );
4173 static void dump_get_next_device_request_request( const struct get_next_device_request_request *req )
4175 fprintf( stderr, " manager=%04x", req->manager );
4176 fprintf( stderr, ", prev=%04x", req->prev );
4177 fprintf( stderr, ", status=%08x", req->status );
4178 dump_uint64( ", user_ptr=", &req->user_ptr );
4181 static void dump_get_next_device_request_reply( const struct get_next_device_request_reply *req )
4183 dump_irp_params( " params=", &req->params );
4184 fprintf( stderr, ", next=%04x", req->next );
4185 fprintf( stderr, ", client_tid=%04x", req->client_tid );
4186 dump_uint64( ", client_thread=", &req->client_thread );
4187 fprintf( stderr, ", in_size=%u", req->in_size );
4188 dump_varargs_bytes( ", next_data=", cur_size );
4191 static void dump_get_kernel_object_ptr_request( const struct get_kernel_object_ptr_request *req )
4193 fprintf( stderr, " manager=%04x", req->manager );
4194 fprintf( stderr, ", handle=%04x", req->handle );
4197 static void dump_get_kernel_object_ptr_reply( const struct get_kernel_object_ptr_reply *req )
4199 dump_uint64( " user_ptr=", &req->user_ptr );
4202 static void dump_set_kernel_object_ptr_request( const struct set_kernel_object_ptr_request *req )
4204 fprintf( stderr, " manager=%04x", req->manager );
4205 fprintf( stderr, ", handle=%04x", req->handle );
4206 dump_uint64( ", user_ptr=", &req->user_ptr );
4209 static void dump_grab_kernel_object_request( const struct grab_kernel_object_request *req )
4211 fprintf( stderr, " manager=%04x", req->manager );
4212 dump_uint64( ", user_ptr=", &req->user_ptr );
4215 static void dump_release_kernel_object_request( const struct release_kernel_object_request *req )
4217 fprintf( stderr, " manager=%04x", req->manager );
4218 dump_uint64( ", user_ptr=", &req->user_ptr );
4221 static void dump_get_kernel_object_handle_request( const struct get_kernel_object_handle_request *req )
4223 fprintf( stderr, " manager=%04x", req->manager );
4224 dump_uint64( ", user_ptr=", &req->user_ptr );
4225 fprintf( stderr, ", access=%08x", req->access );
4228 static void dump_get_kernel_object_handle_reply( const struct get_kernel_object_handle_reply *req )
4230 fprintf( stderr, " handle=%04x", req->handle );
4233 static void dump_make_process_system_request( const struct make_process_system_request *req )
4235 fprintf( stderr, " handle=%04x", req->handle );
4238 static void dump_make_process_system_reply( const struct make_process_system_reply *req )
4240 fprintf( stderr, " event=%04x", req->event );
4243 static void dump_get_token_info_request( const struct get_token_info_request *req )
4245 fprintf( stderr, " handle=%04x", req->handle );
4248 static void dump_get_token_info_reply( const struct get_token_info_reply *req )
4250 dump_luid( " token_id=", &req->token_id );
4251 dump_luid( ", modified_id=", &req->modified_id );
4252 fprintf( stderr, ", primary=%d", req->primary );
4253 fprintf( stderr, ", impersonation_level=%d", req->impersonation_level );
4254 fprintf( stderr, ", elevation=%d", req->elevation );
4255 fprintf( stderr, ", group_count=%d", req->group_count );
4256 fprintf( stderr, ", privilege_count=%d", req->privilege_count );
4259 static void dump_create_linked_token_request( const struct create_linked_token_request *req )
4261 fprintf( stderr, " handle=%04x", req->handle );
4264 static void dump_create_linked_token_reply( const struct create_linked_token_reply *req )
4266 fprintf( stderr, " linked=%04x", req->linked );
4269 static void dump_create_completion_request( const struct create_completion_request *req )
4271 fprintf( stderr, " access=%08x", req->access );
4272 fprintf( stderr, ", concurrent=%08x", req->concurrent );
4273 dump_varargs_object_attributes( ", objattr=", cur_size );
4276 static void dump_create_completion_reply( const struct create_completion_reply *req )
4278 fprintf( stderr, " handle=%04x", req->handle );
4281 static void dump_open_completion_request( const struct open_completion_request *req )
4283 fprintf( stderr, " access=%08x", req->access );
4284 fprintf( stderr, ", attributes=%08x", req->attributes );
4285 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4286 dump_varargs_unicode_str( ", filename=", cur_size );
4289 static void dump_open_completion_reply( const struct open_completion_reply *req )
4291 fprintf( stderr, " handle=%04x", req->handle );
4294 static void dump_add_completion_request( const struct add_completion_request *req )
4296 fprintf( stderr, " handle=%04x", req->handle );
4297 dump_uint64( ", ckey=", &req->ckey );
4298 dump_uint64( ", cvalue=", &req->cvalue );
4299 dump_uint64( ", information=", &req->information );
4300 fprintf( stderr, ", status=%08x", req->status );
4303 static void dump_remove_completion_request( const struct remove_completion_request *req )
4305 fprintf( stderr, " handle=%04x", req->handle );
4308 static void dump_remove_completion_reply( const struct remove_completion_reply *req )
4310 dump_uint64( " ckey=", &req->ckey );
4311 dump_uint64( ", cvalue=", &req->cvalue );
4312 dump_uint64( ", information=", &req->information );
4313 fprintf( stderr, ", status=%08x", req->status );
4316 static void dump_query_completion_request( const struct query_completion_request *req )
4318 fprintf( stderr, " handle=%04x", req->handle );
4321 static void dump_query_completion_reply( const struct query_completion_reply *req )
4323 fprintf( stderr, " depth=%08x", req->depth );
4326 static void dump_set_completion_info_request( const struct set_completion_info_request *req )
4328 fprintf( stderr, " handle=%04x", req->handle );
4329 dump_uint64( ", ckey=", &req->ckey );
4330 fprintf( stderr, ", chandle=%04x", req->chandle );
4333 static void dump_add_fd_completion_request( const struct add_fd_completion_request *req )
4335 fprintf( stderr, " handle=%04x", req->handle );
4336 dump_uint64( ", cvalue=", &req->cvalue );
4337 dump_uint64( ", information=", &req->information );
4338 fprintf( stderr, ", status=%08x", req->status );
4339 fprintf( stderr, ", async=%d", req->async );
4342 static void dump_set_fd_completion_mode_request( const struct set_fd_completion_mode_request *req )
4344 fprintf( stderr, " handle=%04x", req->handle );
4345 fprintf( stderr, ", flags=%08x", req->flags );
4348 static void dump_set_fd_disp_info_request( const struct set_fd_disp_info_request *req )
4350 fprintf( stderr, " handle=%04x", req->handle );
4351 fprintf( stderr, ", unlink=%d", req->unlink );
4354 static void dump_set_fd_name_info_request( const struct set_fd_name_info_request *req )
4356 fprintf( stderr, " handle=%04x", req->handle );
4357 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4358 fprintf( stderr, ", namelen=%u", req->namelen );
4359 fprintf( stderr, ", link=%d", req->link );
4360 fprintf( stderr, ", replace=%d", req->replace );
4361 dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
4362 dump_varargs_string( ", filename=", cur_size );
4365 static void dump_set_fd_eof_info_request( const struct set_fd_eof_info_request *req )
4367 fprintf( stderr, " handle=%04x", req->handle );
4368 dump_uint64( ", eof=", &req->eof );
4371 static void dump_get_window_layered_info_request( const struct get_window_layered_info_request *req )
4373 fprintf( stderr, " handle=%08x", req->handle );
4376 static void dump_get_window_layered_info_reply( const struct get_window_layered_info_reply *req )
4378 fprintf( stderr, " color_key=%08x", req->color_key );
4379 fprintf( stderr, ", alpha=%08x", req->alpha );
4380 fprintf( stderr, ", flags=%08x", req->flags );
4383 static void dump_set_window_layered_info_request( const struct set_window_layered_info_request *req )
4385 fprintf( stderr, " handle=%08x", req->handle );
4386 fprintf( stderr, ", color_key=%08x", req->color_key );
4387 fprintf( stderr, ", alpha=%08x", req->alpha );
4388 fprintf( stderr, ", flags=%08x", req->flags );
4391 static void dump_alloc_user_handle_request( const struct alloc_user_handle_request *req )
4395 static void dump_alloc_user_handle_reply( const struct alloc_user_handle_reply *req )
4397 fprintf( stderr, " handle=%08x", req->handle );
4400 static void dump_free_user_handle_request( const struct free_user_handle_request *req )
4402 fprintf( stderr, " handle=%08x", req->handle );
4405 static void dump_set_cursor_request( const struct set_cursor_request *req )
4407 fprintf( stderr, " flags=%08x", req->flags );
4408 fprintf( stderr, ", handle=%08x", req->handle );
4409 fprintf( stderr, ", show_count=%d", req->show_count );
4410 fprintf( stderr, ", x=%d", req->x );
4411 fprintf( stderr, ", y=%d", req->y );
4412 dump_rectangle( ", clip=", &req->clip );
4413 fprintf( stderr, ", clip_msg=%08x", req->clip_msg );
4416 static void dump_set_cursor_reply( const struct set_cursor_reply *req )
4418 fprintf( stderr, " prev_handle=%08x", req->prev_handle );
4419 fprintf( stderr, ", prev_count=%d", req->prev_count );
4420 fprintf( stderr, ", prev_x=%d", req->prev_x );
4421 fprintf( stderr, ", prev_y=%d", req->prev_y );
4422 fprintf( stderr, ", new_x=%d", req->new_x );
4423 fprintf( stderr, ", new_y=%d", req->new_y );
4424 dump_rectangle( ", new_clip=", &req->new_clip );
4425 fprintf( stderr, ", last_change=%08x", req->last_change );
4428 static void dump_get_cursor_history_request( const struct get_cursor_history_request *req )
4432 static void dump_get_cursor_history_reply( const struct get_cursor_history_reply *req )
4434 dump_varargs_cursor_positions( " history=", cur_size );
4437 static void dump_get_rawinput_buffer_request( const struct get_rawinput_buffer_request *req )
4439 fprintf( stderr, " rawinput_size=%u", req->rawinput_size );
4440 fprintf( stderr, ", buffer_size=%u", req->buffer_size );
4443 static void dump_get_rawinput_buffer_reply( const struct get_rawinput_buffer_reply *req )
4445 fprintf( stderr, " next_size=%u", req->next_size );
4446 fprintf( stderr, ", count=%08x", req->count );
4447 dump_varargs_bytes( ", data=", cur_size );
4450 static void dump_update_rawinput_devices_request( const struct update_rawinput_devices_request *req )
4452 dump_varargs_rawinput_devices( " devices=", cur_size );
4455 static void dump_get_rawinput_devices_request( const struct get_rawinput_devices_request *req )
4459 static void dump_get_rawinput_devices_reply( const struct get_rawinput_devices_reply *req )
4461 fprintf( stderr, " device_count=%08x", req->device_count );
4462 dump_varargs_rawinput_devices( ", devices=", cur_size );
4465 static void dump_create_job_request( const struct create_job_request *req )
4467 fprintf( stderr, " access=%08x", req->access );
4468 dump_varargs_object_attributes( ", objattr=", cur_size );
4471 static void dump_create_job_reply( const struct create_job_reply *req )
4473 fprintf( stderr, " handle=%04x", req->handle );
4476 static void dump_open_job_request( const struct open_job_request *req )
4478 fprintf( stderr, " access=%08x", req->access );
4479 fprintf( stderr, ", attributes=%08x", req->attributes );
4480 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4481 dump_varargs_unicode_str( ", name=", cur_size );
4484 static void dump_open_job_reply( const struct open_job_reply *req )
4486 fprintf( stderr, " handle=%04x", req->handle );
4489 static void dump_assign_job_request( const struct assign_job_request *req )
4491 fprintf( stderr, " job=%04x", req->job );
4492 fprintf( stderr, ", process=%04x", req->process );
4495 static void dump_process_in_job_request( const struct process_in_job_request *req )
4497 fprintf( stderr, " job=%04x", req->job );
4498 fprintf( stderr, ", process=%04x", req->process );
4501 static void dump_set_job_limits_request( const struct set_job_limits_request *req )
4503 fprintf( stderr, " handle=%04x", req->handle );
4504 fprintf( stderr, ", limit_flags=%08x", req->limit_flags );
4507 static void dump_set_job_completion_port_request( const struct set_job_completion_port_request *req )
4509 fprintf( stderr, " job=%04x", req->job );
4510 fprintf( stderr, ", port=%04x", req->port );
4511 dump_uint64( ", key=", &req->key );
4514 static void dump_get_job_info_request( const struct get_job_info_request *req )
4516 fprintf( stderr, " handle=%04x", req->handle );
4519 static void dump_get_job_info_reply( const struct get_job_info_reply *req )
4521 fprintf( stderr, " total_processes=%d", req->total_processes );
4522 fprintf( stderr, ", active_processes=%d", req->active_processes );
4525 static void dump_terminate_job_request( const struct terminate_job_request *req )
4527 fprintf( stderr, " handle=%04x", req->handle );
4528 fprintf( stderr, ", status=%d", req->status );
4531 static void dump_suspend_process_request( const struct suspend_process_request *req )
4533 fprintf( stderr, " handle=%04x", req->handle );
4536 static void dump_resume_process_request( const struct resume_process_request *req )
4538 fprintf( stderr, " handle=%04x", req->handle );
4541 static void dump_get_next_thread_request( const struct get_next_thread_request *req )
4543 fprintf( stderr, " process=%04x", req->process );
4544 fprintf( stderr, ", last=%04x", req->last );
4545 fprintf( stderr, ", access=%08x", req->access );
4546 fprintf( stderr, ", attributes=%08x", req->attributes );
4547 fprintf( stderr, ", flags=%08x", req->flags );
4550 static void dump_get_next_thread_reply( const struct get_next_thread_reply *req )
4552 fprintf( stderr, " handle=%04x", req->handle );
4555 static const dump_func req_dumpers[REQ_NB_REQUESTS] = {
4556 (dump_func)dump_new_process_request,
4557 (dump_func)dump_get_new_process_info_request,
4558 (dump_func)dump_new_thread_request,
4559 (dump_func)dump_get_startup_info_request,
4560 (dump_func)dump_init_process_done_request,
4561 (dump_func)dump_init_first_thread_request,
4562 (dump_func)dump_init_thread_request,
4563 (dump_func)dump_terminate_process_request,
4564 (dump_func)dump_terminate_thread_request,
4565 (dump_func)dump_get_process_info_request,
4566 (dump_func)dump_get_process_debug_info_request,
4567 (dump_func)dump_get_process_image_name_request,
4568 (dump_func)dump_get_process_vm_counters_request,
4569 (dump_func)dump_set_process_info_request,
4570 (dump_func)dump_get_thread_info_request,
4571 (dump_func)dump_get_thread_times_request,
4572 (dump_func)dump_set_thread_info_request,
4573 (dump_func)dump_suspend_thread_request,
4574 (dump_func)dump_resume_thread_request,
4575 (dump_func)dump_queue_apc_request,
4576 (dump_func)dump_get_apc_result_request,
4577 (dump_func)dump_close_handle_request,
4578 (dump_func)dump_set_handle_info_request,
4579 (dump_func)dump_dup_handle_request,
4580 (dump_func)dump_make_temporary_request,
4581 (dump_func)dump_open_process_request,
4582 (dump_func)dump_open_thread_request,
4583 (dump_func)dump_select_request,
4584 (dump_func)dump_create_event_request,
4585 (dump_func)dump_event_op_request,
4586 (dump_func)dump_query_event_request,
4587 (dump_func)dump_open_event_request,
4588 (dump_func)dump_create_keyed_event_request,
4589 (dump_func)dump_open_keyed_event_request,
4590 (dump_func)dump_create_mutex_request,
4591 (dump_func)dump_release_mutex_request,
4592 (dump_func)dump_open_mutex_request,
4593 (dump_func)dump_query_mutex_request,
4594 (dump_func)dump_create_semaphore_request,
4595 (dump_func)dump_release_semaphore_request,
4596 (dump_func)dump_query_semaphore_request,
4597 (dump_func)dump_open_semaphore_request,
4598 (dump_func)dump_create_file_request,
4599 (dump_func)dump_open_file_object_request,
4600 (dump_func)dump_alloc_file_handle_request,
4601 (dump_func)dump_get_handle_unix_name_request,
4602 (dump_func)dump_get_handle_fd_request,
4603 (dump_func)dump_get_directory_cache_entry_request,
4604 (dump_func)dump_flush_request,
4605 (dump_func)dump_get_file_info_request,
4606 (dump_func)dump_get_volume_info_request,
4607 (dump_func)dump_lock_file_request,
4608 (dump_func)dump_unlock_file_request,
4609 (dump_func)dump_recv_socket_request,
4610 (dump_func)dump_poll_socket_request,
4611 (dump_func)dump_send_socket_request,
4612 (dump_func)dump_get_next_console_request_request,
4613 (dump_func)dump_read_directory_changes_request,
4614 (dump_func)dump_read_change_request,
4615 (dump_func)dump_create_mapping_request,
4616 (dump_func)dump_open_mapping_request,
4617 (dump_func)dump_get_mapping_info_request,
4618 (dump_func)dump_map_view_request,
4619 (dump_func)dump_unmap_view_request,
4620 (dump_func)dump_get_mapping_committed_range_request,
4621 (dump_func)dump_add_mapping_committed_range_request,
4622 (dump_func)dump_is_same_mapping_request,
4623 (dump_func)dump_get_mapping_filename_request,
4624 (dump_func)dump_list_processes_request,
4625 (dump_func)dump_create_debug_obj_request,
4626 (dump_func)dump_wait_debug_event_request,
4627 (dump_func)dump_queue_exception_event_request,
4628 (dump_func)dump_get_exception_status_request,
4629 (dump_func)dump_continue_debug_event_request,
4630 (dump_func)dump_debug_process_request,
4631 (dump_func)dump_set_debug_obj_info_request,
4632 (dump_func)dump_read_process_memory_request,
4633 (dump_func)dump_write_process_memory_request,
4634 (dump_func)dump_create_key_request,
4635 (dump_func)dump_open_key_request,
4636 (dump_func)dump_delete_key_request,
4637 (dump_func)dump_flush_key_request,
4638 (dump_func)dump_enum_key_request,
4639 (dump_func)dump_set_key_value_request,
4640 (dump_func)dump_get_key_value_request,
4641 (dump_func)dump_enum_key_value_request,
4642 (dump_func)dump_delete_key_value_request,
4643 (dump_func)dump_load_registry_request,
4644 (dump_func)dump_unload_registry_request,
4645 (dump_func)dump_save_registry_request,
4646 (dump_func)dump_set_registry_notification_request,
4647 (dump_func)dump_create_timer_request,
4648 (dump_func)dump_open_timer_request,
4649 (dump_func)dump_set_timer_request,
4650 (dump_func)dump_cancel_timer_request,
4651 (dump_func)dump_get_timer_info_request,
4652 (dump_func)dump_get_thread_context_request,
4653 (dump_func)dump_set_thread_context_request,
4654 (dump_func)dump_get_selector_entry_request,
4655 (dump_func)dump_add_atom_request,
4656 (dump_func)dump_delete_atom_request,
4657 (dump_func)dump_find_atom_request,
4658 (dump_func)dump_get_atom_information_request,
4659 (dump_func)dump_get_msg_queue_request,
4660 (dump_func)dump_set_queue_fd_request,
4661 (dump_func)dump_set_queue_mask_request,
4662 (dump_func)dump_get_queue_status_request,
4663 (dump_func)dump_get_process_idle_event_request,
4664 (dump_func)dump_send_message_request,
4665 (dump_func)dump_post_quit_message_request,
4666 (dump_func)dump_send_hardware_message_request,
4667 (dump_func)dump_get_message_request,
4668 (dump_func)dump_reply_message_request,
4669 (dump_func)dump_accept_hardware_message_request,
4670 (dump_func)dump_get_message_reply_request,
4671 (dump_func)dump_set_win_timer_request,
4672 (dump_func)dump_kill_win_timer_request,
4673 (dump_func)dump_is_window_hung_request,
4674 (dump_func)dump_get_serial_info_request,
4675 (dump_func)dump_set_serial_info_request,
4676 (dump_func)dump_register_async_request,
4677 (dump_func)dump_cancel_async_request,
4678 (dump_func)dump_get_async_result_request,
4679 (dump_func)dump_read_request,
4680 (dump_func)dump_write_request,
4681 (dump_func)dump_ioctl_request,
4682 (dump_func)dump_set_irp_result_request,
4683 (dump_func)dump_create_named_pipe_request,
4684 (dump_func)dump_set_named_pipe_info_request,
4685 (dump_func)dump_create_window_request,
4686 (dump_func)dump_destroy_window_request,
4687 (dump_func)dump_get_desktop_window_request,
4688 (dump_func)dump_set_window_owner_request,
4689 (dump_func)dump_get_window_info_request,
4690 (dump_func)dump_set_window_info_request,
4691 (dump_func)dump_set_parent_request,
4692 (dump_func)dump_get_window_parents_request,
4693 (dump_func)dump_get_window_children_request,
4694 (dump_func)dump_get_window_children_from_point_request,
4695 (dump_func)dump_get_window_tree_request,
4696 (dump_func)dump_set_window_pos_request,
4697 (dump_func)dump_get_window_rectangles_request,
4698 (dump_func)dump_get_window_text_request,
4699 (dump_func)dump_set_window_text_request,
4700 (dump_func)dump_get_windows_offset_request,
4701 (dump_func)dump_get_visible_region_request,
4702 (dump_func)dump_get_surface_region_request,
4703 (dump_func)dump_get_window_region_request,
4704 (dump_func)dump_set_window_region_request,
4705 (dump_func)dump_get_update_region_request,
4706 (dump_func)dump_update_window_zorder_request,
4707 (dump_func)dump_redraw_window_request,
4708 (dump_func)dump_set_window_property_request,
4709 (dump_func)dump_remove_window_property_request,
4710 (dump_func)dump_get_window_property_request,
4711 (dump_func)dump_get_window_properties_request,
4712 (dump_func)dump_create_winstation_request,
4713 (dump_func)dump_open_winstation_request,
4714 (dump_func)dump_close_winstation_request,
4715 (dump_func)dump_get_process_winstation_request,
4716 (dump_func)dump_set_process_winstation_request,
4717 (dump_func)dump_enum_winstation_request,
4718 (dump_func)dump_create_desktop_request,
4719 (dump_func)dump_open_desktop_request,
4720 (dump_func)dump_open_input_desktop_request,
4721 (dump_func)dump_close_desktop_request,
4722 (dump_func)dump_get_thread_desktop_request,
4723 (dump_func)dump_set_thread_desktop_request,
4724 (dump_func)dump_enum_desktop_request,
4725 (dump_func)dump_set_user_object_info_request,
4726 (dump_func)dump_register_hotkey_request,
4727 (dump_func)dump_unregister_hotkey_request,
4728 (dump_func)dump_attach_thread_input_request,
4729 (dump_func)dump_get_thread_input_request,
4730 (dump_func)dump_get_last_input_time_request,
4731 (dump_func)dump_get_key_state_request,
4732 (dump_func)dump_set_key_state_request,
4733 (dump_func)dump_set_foreground_window_request,
4734 (dump_func)dump_set_focus_window_request,
4735 (dump_func)dump_set_active_window_request,
4736 (dump_func)dump_set_capture_window_request,
4737 (dump_func)dump_set_caret_window_request,
4738 (dump_func)dump_set_caret_info_request,
4739 (dump_func)dump_set_hook_request,
4740 (dump_func)dump_remove_hook_request,
4741 (dump_func)dump_start_hook_chain_request,
4742 (dump_func)dump_finish_hook_chain_request,
4743 (dump_func)dump_get_hook_info_request,
4744 (dump_func)dump_create_class_request,
4745 (dump_func)dump_destroy_class_request,
4746 (dump_func)dump_set_class_info_request,
4747 (dump_func)dump_open_clipboard_request,
4748 (dump_func)dump_close_clipboard_request,
4749 (dump_func)dump_empty_clipboard_request,
4750 (dump_func)dump_set_clipboard_data_request,
4751 (dump_func)dump_get_clipboard_data_request,
4752 (dump_func)dump_get_clipboard_formats_request,
4753 (dump_func)dump_enum_clipboard_formats_request,
4754 (dump_func)dump_release_clipboard_request,
4755 (dump_func)dump_get_clipboard_info_request,
4756 (dump_func)dump_set_clipboard_viewer_request,
4757 (dump_func)dump_add_clipboard_listener_request,
4758 (dump_func)dump_remove_clipboard_listener_request,
4759 (dump_func)dump_open_token_request,
4760 (dump_func)dump_set_global_windows_request,
4761 (dump_func)dump_adjust_token_privileges_request,
4762 (dump_func)dump_get_token_privileges_request,
4763 (dump_func)dump_check_token_privileges_request,
4764 (dump_func)dump_duplicate_token_request,
4765 (dump_func)dump_filter_token_request,
4766 (dump_func)dump_access_check_request,
4767 (dump_func)dump_get_token_sid_request,
4768 (dump_func)dump_get_token_groups_request,
4769 (dump_func)dump_get_token_default_dacl_request,
4770 (dump_func)dump_set_token_default_dacl_request,
4771 (dump_func)dump_set_security_object_request,
4772 (dump_func)dump_get_security_object_request,
4773 (dump_func)dump_get_system_handles_request,
4774 (dump_func)dump_create_mailslot_request,
4775 (dump_func)dump_set_mailslot_info_request,
4776 (dump_func)dump_create_directory_request,
4777 (dump_func)dump_open_directory_request,
4778 (dump_func)dump_get_directory_entry_request,
4779 (dump_func)dump_create_symlink_request,
4780 (dump_func)dump_open_symlink_request,
4781 (dump_func)dump_query_symlink_request,
4782 (dump_func)dump_get_object_info_request,
4783 (dump_func)dump_get_object_name_request,
4784 (dump_func)dump_get_object_type_request,
4785 (dump_func)dump_get_object_types_request,
4786 (dump_func)dump_allocate_locally_unique_id_request,
4787 (dump_func)dump_create_device_manager_request,
4788 (dump_func)dump_create_device_request,
4789 (dump_func)dump_delete_device_request,
4790 (dump_func)dump_get_next_device_request_request,
4791 (dump_func)dump_get_kernel_object_ptr_request,
4792 (dump_func)dump_set_kernel_object_ptr_request,
4793 (dump_func)dump_grab_kernel_object_request,
4794 (dump_func)dump_release_kernel_object_request,
4795 (dump_func)dump_get_kernel_object_handle_request,
4796 (dump_func)dump_make_process_system_request,
4797 (dump_func)dump_get_token_info_request,
4798 (dump_func)dump_create_linked_token_request,
4799 (dump_func)dump_create_completion_request,
4800 (dump_func)dump_open_completion_request,
4801 (dump_func)dump_add_completion_request,
4802 (dump_func)dump_remove_completion_request,
4803 (dump_func)dump_query_completion_request,
4804 (dump_func)dump_set_completion_info_request,
4805 (dump_func)dump_add_fd_completion_request,
4806 (dump_func)dump_set_fd_completion_mode_request,
4807 (dump_func)dump_set_fd_disp_info_request,
4808 (dump_func)dump_set_fd_name_info_request,
4809 (dump_func)dump_set_fd_eof_info_request,
4810 (dump_func)dump_get_window_layered_info_request,
4811 (dump_func)dump_set_window_layered_info_request,
4812 (dump_func)dump_alloc_user_handle_request,
4813 (dump_func)dump_free_user_handle_request,
4814 (dump_func)dump_set_cursor_request,
4815 (dump_func)dump_get_cursor_history_request,
4816 (dump_func)dump_get_rawinput_buffer_request,
4817 (dump_func)dump_update_rawinput_devices_request,
4818 (dump_func)dump_get_rawinput_devices_request,
4819 (dump_func)dump_create_job_request,
4820 (dump_func)dump_open_job_request,
4821 (dump_func)dump_assign_job_request,
4822 (dump_func)dump_process_in_job_request,
4823 (dump_func)dump_set_job_limits_request,
4824 (dump_func)dump_set_job_completion_port_request,
4825 (dump_func)dump_get_job_info_request,
4826 (dump_func)dump_terminate_job_request,
4827 (dump_func)dump_suspend_process_request,
4828 (dump_func)dump_resume_process_request,
4829 (dump_func)dump_get_next_thread_request,
4832 static const dump_func reply_dumpers[REQ_NB_REQUESTS] = {
4833 (dump_func)dump_new_process_reply,
4834 (dump_func)dump_get_new_process_info_reply,
4835 (dump_func)dump_new_thread_reply,
4836 (dump_func)dump_get_startup_info_reply,
4837 (dump_func)dump_init_process_done_reply,
4838 (dump_func)dump_init_first_thread_reply,
4839 (dump_func)dump_init_thread_reply,
4840 (dump_func)dump_terminate_process_reply,
4841 (dump_func)dump_terminate_thread_reply,
4842 (dump_func)dump_get_process_info_reply,
4843 (dump_func)dump_get_process_debug_info_reply,
4844 (dump_func)dump_get_process_image_name_reply,
4845 (dump_func)dump_get_process_vm_counters_reply,
4846 NULL,
4847 (dump_func)dump_get_thread_info_reply,
4848 (dump_func)dump_get_thread_times_reply,
4849 NULL,
4850 (dump_func)dump_suspend_thread_reply,
4851 (dump_func)dump_resume_thread_reply,
4852 (dump_func)dump_queue_apc_reply,
4853 (dump_func)dump_get_apc_result_reply,
4854 NULL,
4855 (dump_func)dump_set_handle_info_reply,
4856 (dump_func)dump_dup_handle_reply,
4857 NULL,
4858 (dump_func)dump_open_process_reply,
4859 (dump_func)dump_open_thread_reply,
4860 (dump_func)dump_select_reply,
4861 (dump_func)dump_create_event_reply,
4862 (dump_func)dump_event_op_reply,
4863 (dump_func)dump_query_event_reply,
4864 (dump_func)dump_open_event_reply,
4865 (dump_func)dump_create_keyed_event_reply,
4866 (dump_func)dump_open_keyed_event_reply,
4867 (dump_func)dump_create_mutex_reply,
4868 (dump_func)dump_release_mutex_reply,
4869 (dump_func)dump_open_mutex_reply,
4870 (dump_func)dump_query_mutex_reply,
4871 (dump_func)dump_create_semaphore_reply,
4872 (dump_func)dump_release_semaphore_reply,
4873 (dump_func)dump_query_semaphore_reply,
4874 (dump_func)dump_open_semaphore_reply,
4875 (dump_func)dump_create_file_reply,
4876 (dump_func)dump_open_file_object_reply,
4877 (dump_func)dump_alloc_file_handle_reply,
4878 (dump_func)dump_get_handle_unix_name_reply,
4879 (dump_func)dump_get_handle_fd_reply,
4880 (dump_func)dump_get_directory_cache_entry_reply,
4881 (dump_func)dump_flush_reply,
4882 (dump_func)dump_get_file_info_reply,
4883 (dump_func)dump_get_volume_info_reply,
4884 (dump_func)dump_lock_file_reply,
4885 NULL,
4886 (dump_func)dump_recv_socket_reply,
4887 (dump_func)dump_poll_socket_reply,
4888 (dump_func)dump_send_socket_reply,
4889 (dump_func)dump_get_next_console_request_reply,
4890 NULL,
4891 (dump_func)dump_read_change_reply,
4892 (dump_func)dump_create_mapping_reply,
4893 (dump_func)dump_open_mapping_reply,
4894 (dump_func)dump_get_mapping_info_reply,
4895 NULL,
4896 NULL,
4897 (dump_func)dump_get_mapping_committed_range_reply,
4898 NULL,
4899 NULL,
4900 (dump_func)dump_get_mapping_filename_reply,
4901 (dump_func)dump_list_processes_reply,
4902 (dump_func)dump_create_debug_obj_reply,
4903 (dump_func)dump_wait_debug_event_reply,
4904 (dump_func)dump_queue_exception_event_reply,
4905 NULL,
4906 NULL,
4907 NULL,
4908 NULL,
4909 (dump_func)dump_read_process_memory_reply,
4910 NULL,
4911 (dump_func)dump_create_key_reply,
4912 (dump_func)dump_open_key_reply,
4913 NULL,
4914 NULL,
4915 (dump_func)dump_enum_key_reply,
4916 NULL,
4917 (dump_func)dump_get_key_value_reply,
4918 (dump_func)dump_enum_key_value_reply,
4919 NULL,
4920 NULL,
4921 NULL,
4922 NULL,
4923 NULL,
4924 (dump_func)dump_create_timer_reply,
4925 (dump_func)dump_open_timer_reply,
4926 (dump_func)dump_set_timer_reply,
4927 (dump_func)dump_cancel_timer_reply,
4928 (dump_func)dump_get_timer_info_reply,
4929 (dump_func)dump_get_thread_context_reply,
4930 (dump_func)dump_set_thread_context_reply,
4931 (dump_func)dump_get_selector_entry_reply,
4932 (dump_func)dump_add_atom_reply,
4933 NULL,
4934 (dump_func)dump_find_atom_reply,
4935 (dump_func)dump_get_atom_information_reply,
4936 (dump_func)dump_get_msg_queue_reply,
4937 NULL,
4938 (dump_func)dump_set_queue_mask_reply,
4939 (dump_func)dump_get_queue_status_reply,
4940 (dump_func)dump_get_process_idle_event_reply,
4941 NULL,
4942 NULL,
4943 (dump_func)dump_send_hardware_message_reply,
4944 (dump_func)dump_get_message_reply,
4945 NULL,
4946 NULL,
4947 (dump_func)dump_get_message_reply_reply,
4948 (dump_func)dump_set_win_timer_reply,
4949 NULL,
4950 (dump_func)dump_is_window_hung_reply,
4951 (dump_func)dump_get_serial_info_reply,
4952 NULL,
4953 NULL,
4954 NULL,
4955 (dump_func)dump_get_async_result_reply,
4956 (dump_func)dump_read_reply,
4957 (dump_func)dump_write_reply,
4958 (dump_func)dump_ioctl_reply,
4959 NULL,
4960 (dump_func)dump_create_named_pipe_reply,
4961 NULL,
4962 (dump_func)dump_create_window_reply,
4963 NULL,
4964 (dump_func)dump_get_desktop_window_reply,
4965 (dump_func)dump_set_window_owner_reply,
4966 (dump_func)dump_get_window_info_reply,
4967 (dump_func)dump_set_window_info_reply,
4968 (dump_func)dump_set_parent_reply,
4969 (dump_func)dump_get_window_parents_reply,
4970 (dump_func)dump_get_window_children_reply,
4971 (dump_func)dump_get_window_children_from_point_reply,
4972 (dump_func)dump_get_window_tree_reply,
4973 (dump_func)dump_set_window_pos_reply,
4974 (dump_func)dump_get_window_rectangles_reply,
4975 (dump_func)dump_get_window_text_reply,
4976 NULL,
4977 (dump_func)dump_get_windows_offset_reply,
4978 (dump_func)dump_get_visible_region_reply,
4979 (dump_func)dump_get_surface_region_reply,
4980 (dump_func)dump_get_window_region_reply,
4981 NULL,
4982 (dump_func)dump_get_update_region_reply,
4983 NULL,
4984 NULL,
4985 NULL,
4986 (dump_func)dump_remove_window_property_reply,
4987 (dump_func)dump_get_window_property_reply,
4988 (dump_func)dump_get_window_properties_reply,
4989 (dump_func)dump_create_winstation_reply,
4990 (dump_func)dump_open_winstation_reply,
4991 NULL,
4992 (dump_func)dump_get_process_winstation_reply,
4993 NULL,
4994 (dump_func)dump_enum_winstation_reply,
4995 (dump_func)dump_create_desktop_reply,
4996 (dump_func)dump_open_desktop_reply,
4997 (dump_func)dump_open_input_desktop_reply,
4998 NULL,
4999 (dump_func)dump_get_thread_desktop_reply,
5000 NULL,
5001 (dump_func)dump_enum_desktop_reply,
5002 (dump_func)dump_set_user_object_info_reply,
5003 (dump_func)dump_register_hotkey_reply,
5004 (dump_func)dump_unregister_hotkey_reply,
5005 NULL,
5006 (dump_func)dump_get_thread_input_reply,
5007 (dump_func)dump_get_last_input_time_reply,
5008 (dump_func)dump_get_key_state_reply,
5009 NULL,
5010 (dump_func)dump_set_foreground_window_reply,
5011 (dump_func)dump_set_focus_window_reply,
5012 (dump_func)dump_set_active_window_reply,
5013 (dump_func)dump_set_capture_window_reply,
5014 (dump_func)dump_set_caret_window_reply,
5015 (dump_func)dump_set_caret_info_reply,
5016 (dump_func)dump_set_hook_reply,
5017 (dump_func)dump_remove_hook_reply,
5018 (dump_func)dump_start_hook_chain_reply,
5019 NULL,
5020 (dump_func)dump_get_hook_info_reply,
5021 (dump_func)dump_create_class_reply,
5022 (dump_func)dump_destroy_class_reply,
5023 (dump_func)dump_set_class_info_reply,
5024 (dump_func)dump_open_clipboard_reply,
5025 (dump_func)dump_close_clipboard_reply,
5026 NULL,
5027 (dump_func)dump_set_clipboard_data_reply,
5028 (dump_func)dump_get_clipboard_data_reply,
5029 (dump_func)dump_get_clipboard_formats_reply,
5030 (dump_func)dump_enum_clipboard_formats_reply,
5031 (dump_func)dump_release_clipboard_reply,
5032 (dump_func)dump_get_clipboard_info_reply,
5033 (dump_func)dump_set_clipboard_viewer_reply,
5034 NULL,
5035 NULL,
5036 (dump_func)dump_open_token_reply,
5037 (dump_func)dump_set_global_windows_reply,
5038 (dump_func)dump_adjust_token_privileges_reply,
5039 (dump_func)dump_get_token_privileges_reply,
5040 (dump_func)dump_check_token_privileges_reply,
5041 (dump_func)dump_duplicate_token_reply,
5042 (dump_func)dump_filter_token_reply,
5043 (dump_func)dump_access_check_reply,
5044 (dump_func)dump_get_token_sid_reply,
5045 (dump_func)dump_get_token_groups_reply,
5046 (dump_func)dump_get_token_default_dacl_reply,
5047 NULL,
5048 NULL,
5049 (dump_func)dump_get_security_object_reply,
5050 (dump_func)dump_get_system_handles_reply,
5051 (dump_func)dump_create_mailslot_reply,
5052 (dump_func)dump_set_mailslot_info_reply,
5053 (dump_func)dump_create_directory_reply,
5054 (dump_func)dump_open_directory_reply,
5055 (dump_func)dump_get_directory_entry_reply,
5056 (dump_func)dump_create_symlink_reply,
5057 (dump_func)dump_open_symlink_reply,
5058 (dump_func)dump_query_symlink_reply,
5059 (dump_func)dump_get_object_info_reply,
5060 (dump_func)dump_get_object_name_reply,
5061 (dump_func)dump_get_object_type_reply,
5062 (dump_func)dump_get_object_types_reply,
5063 (dump_func)dump_allocate_locally_unique_id_reply,
5064 (dump_func)dump_create_device_manager_reply,
5065 NULL,
5066 NULL,
5067 (dump_func)dump_get_next_device_request_reply,
5068 (dump_func)dump_get_kernel_object_ptr_reply,
5069 NULL,
5070 NULL,
5071 NULL,
5072 (dump_func)dump_get_kernel_object_handle_reply,
5073 (dump_func)dump_make_process_system_reply,
5074 (dump_func)dump_get_token_info_reply,
5075 (dump_func)dump_create_linked_token_reply,
5076 (dump_func)dump_create_completion_reply,
5077 (dump_func)dump_open_completion_reply,
5078 NULL,
5079 (dump_func)dump_remove_completion_reply,
5080 (dump_func)dump_query_completion_reply,
5081 NULL,
5082 NULL,
5083 NULL,
5084 NULL,
5085 NULL,
5086 NULL,
5087 (dump_func)dump_get_window_layered_info_reply,
5088 NULL,
5089 (dump_func)dump_alloc_user_handle_reply,
5090 NULL,
5091 (dump_func)dump_set_cursor_reply,
5092 (dump_func)dump_get_cursor_history_reply,
5093 (dump_func)dump_get_rawinput_buffer_reply,
5094 NULL,
5095 (dump_func)dump_get_rawinput_devices_reply,
5096 (dump_func)dump_create_job_reply,
5097 (dump_func)dump_open_job_reply,
5098 NULL,
5099 NULL,
5100 NULL,
5101 NULL,
5102 (dump_func)dump_get_job_info_reply,
5103 NULL,
5104 NULL,
5105 NULL,
5106 (dump_func)dump_get_next_thread_reply,
5109 static const char * const req_names[REQ_NB_REQUESTS] = {
5110 "new_process",
5111 "get_new_process_info",
5112 "new_thread",
5113 "get_startup_info",
5114 "init_process_done",
5115 "init_first_thread",
5116 "init_thread",
5117 "terminate_process",
5118 "terminate_thread",
5119 "get_process_info",
5120 "get_process_debug_info",
5121 "get_process_image_name",
5122 "get_process_vm_counters",
5123 "set_process_info",
5124 "get_thread_info",
5125 "get_thread_times",
5126 "set_thread_info",
5127 "suspend_thread",
5128 "resume_thread",
5129 "queue_apc",
5130 "get_apc_result",
5131 "close_handle",
5132 "set_handle_info",
5133 "dup_handle",
5134 "make_temporary",
5135 "open_process",
5136 "open_thread",
5137 "select",
5138 "create_event",
5139 "event_op",
5140 "query_event",
5141 "open_event",
5142 "create_keyed_event",
5143 "open_keyed_event",
5144 "create_mutex",
5145 "release_mutex",
5146 "open_mutex",
5147 "query_mutex",
5148 "create_semaphore",
5149 "release_semaphore",
5150 "query_semaphore",
5151 "open_semaphore",
5152 "create_file",
5153 "open_file_object",
5154 "alloc_file_handle",
5155 "get_handle_unix_name",
5156 "get_handle_fd",
5157 "get_directory_cache_entry",
5158 "flush",
5159 "get_file_info",
5160 "get_volume_info",
5161 "lock_file",
5162 "unlock_file",
5163 "recv_socket",
5164 "poll_socket",
5165 "send_socket",
5166 "get_next_console_request",
5167 "read_directory_changes",
5168 "read_change",
5169 "create_mapping",
5170 "open_mapping",
5171 "get_mapping_info",
5172 "map_view",
5173 "unmap_view",
5174 "get_mapping_committed_range",
5175 "add_mapping_committed_range",
5176 "is_same_mapping",
5177 "get_mapping_filename",
5178 "list_processes",
5179 "create_debug_obj",
5180 "wait_debug_event",
5181 "queue_exception_event",
5182 "get_exception_status",
5183 "continue_debug_event",
5184 "debug_process",
5185 "set_debug_obj_info",
5186 "read_process_memory",
5187 "write_process_memory",
5188 "create_key",
5189 "open_key",
5190 "delete_key",
5191 "flush_key",
5192 "enum_key",
5193 "set_key_value",
5194 "get_key_value",
5195 "enum_key_value",
5196 "delete_key_value",
5197 "load_registry",
5198 "unload_registry",
5199 "save_registry",
5200 "set_registry_notification",
5201 "create_timer",
5202 "open_timer",
5203 "set_timer",
5204 "cancel_timer",
5205 "get_timer_info",
5206 "get_thread_context",
5207 "set_thread_context",
5208 "get_selector_entry",
5209 "add_atom",
5210 "delete_atom",
5211 "find_atom",
5212 "get_atom_information",
5213 "get_msg_queue",
5214 "set_queue_fd",
5215 "set_queue_mask",
5216 "get_queue_status",
5217 "get_process_idle_event",
5218 "send_message",
5219 "post_quit_message",
5220 "send_hardware_message",
5221 "get_message",
5222 "reply_message",
5223 "accept_hardware_message",
5224 "get_message_reply",
5225 "set_win_timer",
5226 "kill_win_timer",
5227 "is_window_hung",
5228 "get_serial_info",
5229 "set_serial_info",
5230 "register_async",
5231 "cancel_async",
5232 "get_async_result",
5233 "read",
5234 "write",
5235 "ioctl",
5236 "set_irp_result",
5237 "create_named_pipe",
5238 "set_named_pipe_info",
5239 "create_window",
5240 "destroy_window",
5241 "get_desktop_window",
5242 "set_window_owner",
5243 "get_window_info",
5244 "set_window_info",
5245 "set_parent",
5246 "get_window_parents",
5247 "get_window_children",
5248 "get_window_children_from_point",
5249 "get_window_tree",
5250 "set_window_pos",
5251 "get_window_rectangles",
5252 "get_window_text",
5253 "set_window_text",
5254 "get_windows_offset",
5255 "get_visible_region",
5256 "get_surface_region",
5257 "get_window_region",
5258 "set_window_region",
5259 "get_update_region",
5260 "update_window_zorder",
5261 "redraw_window",
5262 "set_window_property",
5263 "remove_window_property",
5264 "get_window_property",
5265 "get_window_properties",
5266 "create_winstation",
5267 "open_winstation",
5268 "close_winstation",
5269 "get_process_winstation",
5270 "set_process_winstation",
5271 "enum_winstation",
5272 "create_desktop",
5273 "open_desktop",
5274 "open_input_desktop",
5275 "close_desktop",
5276 "get_thread_desktop",
5277 "set_thread_desktop",
5278 "enum_desktop",
5279 "set_user_object_info",
5280 "register_hotkey",
5281 "unregister_hotkey",
5282 "attach_thread_input",
5283 "get_thread_input",
5284 "get_last_input_time",
5285 "get_key_state",
5286 "set_key_state",
5287 "set_foreground_window",
5288 "set_focus_window",
5289 "set_active_window",
5290 "set_capture_window",
5291 "set_caret_window",
5292 "set_caret_info",
5293 "set_hook",
5294 "remove_hook",
5295 "start_hook_chain",
5296 "finish_hook_chain",
5297 "get_hook_info",
5298 "create_class",
5299 "destroy_class",
5300 "set_class_info",
5301 "open_clipboard",
5302 "close_clipboard",
5303 "empty_clipboard",
5304 "set_clipboard_data",
5305 "get_clipboard_data",
5306 "get_clipboard_formats",
5307 "enum_clipboard_formats",
5308 "release_clipboard",
5309 "get_clipboard_info",
5310 "set_clipboard_viewer",
5311 "add_clipboard_listener",
5312 "remove_clipboard_listener",
5313 "open_token",
5314 "set_global_windows",
5315 "adjust_token_privileges",
5316 "get_token_privileges",
5317 "check_token_privileges",
5318 "duplicate_token",
5319 "filter_token",
5320 "access_check",
5321 "get_token_sid",
5322 "get_token_groups",
5323 "get_token_default_dacl",
5324 "set_token_default_dacl",
5325 "set_security_object",
5326 "get_security_object",
5327 "get_system_handles",
5328 "create_mailslot",
5329 "set_mailslot_info",
5330 "create_directory",
5331 "open_directory",
5332 "get_directory_entry",
5333 "create_symlink",
5334 "open_symlink",
5335 "query_symlink",
5336 "get_object_info",
5337 "get_object_name",
5338 "get_object_type",
5339 "get_object_types",
5340 "allocate_locally_unique_id",
5341 "create_device_manager",
5342 "create_device",
5343 "delete_device",
5344 "get_next_device_request",
5345 "get_kernel_object_ptr",
5346 "set_kernel_object_ptr",
5347 "grab_kernel_object",
5348 "release_kernel_object",
5349 "get_kernel_object_handle",
5350 "make_process_system",
5351 "get_token_info",
5352 "create_linked_token",
5353 "create_completion",
5354 "open_completion",
5355 "add_completion",
5356 "remove_completion",
5357 "query_completion",
5358 "set_completion_info",
5359 "add_fd_completion",
5360 "set_fd_completion_mode",
5361 "set_fd_disp_info",
5362 "set_fd_name_info",
5363 "set_fd_eof_info",
5364 "get_window_layered_info",
5365 "set_window_layered_info",
5366 "alloc_user_handle",
5367 "free_user_handle",
5368 "set_cursor",
5369 "get_cursor_history",
5370 "get_rawinput_buffer",
5371 "update_rawinput_devices",
5372 "get_rawinput_devices",
5373 "create_job",
5374 "open_job",
5375 "assign_job",
5376 "process_in_job",
5377 "set_job_limits",
5378 "set_job_completion_port",
5379 "get_job_info",
5380 "terminate_job",
5381 "suspend_process",
5382 "resume_process",
5383 "get_next_thread",
5386 static const struct
5388 const char *name;
5389 unsigned int value;
5390 } status_names[] =
5392 { "ABANDONED_WAIT_0", STATUS_ABANDONED_WAIT_0 },
5393 { "ACCESS_DENIED", STATUS_ACCESS_DENIED },
5394 { "ACCESS_VIOLATION", STATUS_ACCESS_VIOLATION },
5395 { "ADDRESS_ALREADY_ASSOCIATED", STATUS_ADDRESS_ALREADY_ASSOCIATED },
5396 { "ALERTED", STATUS_ALERTED },
5397 { "BAD_DEVICE_TYPE", STATUS_BAD_DEVICE_TYPE },
5398 { "BAD_IMPERSONATION_LEVEL", STATUS_BAD_IMPERSONATION_LEVEL },
5399 { "BUFFER_OVERFLOW", STATUS_BUFFER_OVERFLOW },
5400 { "BUFFER_TOO_SMALL", STATUS_BUFFER_TOO_SMALL },
5401 { "CANCELLED", STATUS_CANCELLED },
5402 { "CANNOT_DELETE", STATUS_CANNOT_DELETE },
5403 { "CANT_OPEN_ANONYMOUS", STATUS_CANT_OPEN_ANONYMOUS },
5404 { "CHILD_MUST_BE_VOLATILE", STATUS_CHILD_MUST_BE_VOLATILE },
5405 { "CONNECTION_ABORTED", STATUS_CONNECTION_ABORTED },
5406 { "CONNECTION_ACTIVE", STATUS_CONNECTION_ACTIVE },
5407 { "CONNECTION_REFUSED", STATUS_CONNECTION_REFUSED },
5408 { "CONNECTION_RESET", STATUS_CONNECTION_RESET },
5409 { "DEBUGGER_INACTIVE", STATUS_DEBUGGER_INACTIVE },
5410 { "DEVICE_BUSY", STATUS_DEVICE_BUSY },
5411 { "DEVICE_NOT_READY", STATUS_DEVICE_NOT_READY },
5412 { "DIRECTORY_NOT_EMPTY", STATUS_DIRECTORY_NOT_EMPTY },
5413 { "DISK_FULL", STATUS_DISK_FULL },
5414 { "DLL_NOT_FOUND", STATUS_DLL_NOT_FOUND },
5415 { "ERROR_CLASS_ALREADY_EXISTS", 0xc0010000 | ERROR_CLASS_ALREADY_EXISTS },
5416 { "ERROR_CLASS_DOES_NOT_EXIST", 0xc0010000 | ERROR_CLASS_DOES_NOT_EXIST },
5417 { "ERROR_CLASS_HAS_WINDOWS", 0xc0010000 | ERROR_CLASS_HAS_WINDOWS },
5418 { "ERROR_CLIPBOARD_NOT_OPEN", 0xc0010000 | ERROR_CLIPBOARD_NOT_OPEN },
5419 { "ERROR_HOTKEY_ALREADY_REGISTERED", 0xc0010000 | ERROR_HOTKEY_ALREADY_REGISTERED },
5420 { "ERROR_HOTKEY_NOT_REGISTERED", 0xc0010000 | ERROR_HOTKEY_NOT_REGISTERED },
5421 { "ERROR_INVALID_CURSOR_HANDLE", 0xc0010000 | ERROR_INVALID_CURSOR_HANDLE },
5422 { "ERROR_INVALID_INDEX", 0xc0010000 | ERROR_INVALID_INDEX },
5423 { "ERROR_INVALID_WINDOW_HANDLE", 0xc0010000 | ERROR_INVALID_WINDOW_HANDLE },
5424 { "ERROR_NO_MORE_USER_HANDLES", 0xc0010000 | ERROR_NO_MORE_USER_HANDLES },
5425 { "ERROR_WINDOW_OF_OTHER_THREAD", 0xc0010000 | ERROR_WINDOW_OF_OTHER_THREAD },
5426 { "FILE_DELETED", STATUS_FILE_DELETED },
5427 { "FILE_INVALID", STATUS_FILE_INVALID },
5428 { "FILE_IS_A_DIRECTORY", STATUS_FILE_IS_A_DIRECTORY },
5429 { "FILE_LOCK_CONFLICT", STATUS_FILE_LOCK_CONFLICT },
5430 { "GENERIC_NOT_MAPPED", STATUS_GENERIC_NOT_MAPPED },
5431 { "HANDLES_CLOSED", STATUS_HANDLES_CLOSED },
5432 { "HANDLE_NOT_CLOSABLE", STATUS_HANDLE_NOT_CLOSABLE },
5433 { "HOST_UNREACHABLE", STATUS_HOST_UNREACHABLE },
5434 { "ILLEGAL_FUNCTION", STATUS_ILLEGAL_FUNCTION },
5435 { "IMAGE_NOT_AT_BASE", STATUS_IMAGE_NOT_AT_BASE },
5436 { "INFO_LENGTH_MISMATCH", STATUS_INFO_LENGTH_MISMATCH },
5437 { "INSTANCE_NOT_AVAILABLE", STATUS_INSTANCE_NOT_AVAILABLE },
5438 { "INSUFFICIENT_RESOURCES", STATUS_INSUFFICIENT_RESOURCES },
5439 { "INVALID_ADDRESS", STATUS_INVALID_ADDRESS },
5440 { "INVALID_ADDRESS_COMPONENT", STATUS_INVALID_ADDRESS_COMPONENT },
5441 { "INVALID_CID", STATUS_INVALID_CID },
5442 { "INVALID_CONNECTION", STATUS_INVALID_CONNECTION },
5443 { "INVALID_DEVICE_REQUEST", STATUS_INVALID_DEVICE_REQUEST },
5444 { "INVALID_FILE_FOR_SECTION", STATUS_INVALID_FILE_FOR_SECTION },
5445 { "INVALID_HANDLE", STATUS_INVALID_HANDLE },
5446 { "INVALID_IMAGE_FORMAT", STATUS_INVALID_IMAGE_FORMAT },
5447 { "INVALID_IMAGE_NE_FORMAT", STATUS_INVALID_IMAGE_NE_FORMAT },
5448 { "INVALID_IMAGE_NOT_MZ", STATUS_INVALID_IMAGE_NOT_MZ },
5449 { "INVALID_IMAGE_PROTECT", STATUS_INVALID_IMAGE_PROTECT },
5450 { "INVALID_IMAGE_WIN_16", STATUS_INVALID_IMAGE_WIN_16 },
5451 { "INVALID_IMAGE_WIN_64", STATUS_INVALID_IMAGE_WIN_64 },
5452 { "INVALID_LOCK_SEQUENCE", STATUS_INVALID_LOCK_SEQUENCE },
5453 { "INVALID_OWNER", STATUS_INVALID_OWNER },
5454 { "INVALID_PARAMETER", STATUS_INVALID_PARAMETER },
5455 { "INVALID_PIPE_STATE", STATUS_INVALID_PIPE_STATE },
5456 { "INVALID_READ_MODE", STATUS_INVALID_READ_MODE },
5457 { "INVALID_SECURITY_DESCR", STATUS_INVALID_SECURITY_DESCR },
5458 { "IO_TIMEOUT", STATUS_IO_TIMEOUT },
5459 { "KERNEL_APC", STATUS_KERNEL_APC },
5460 { "KEY_DELETED", STATUS_KEY_DELETED },
5461 { "MAPPED_FILE_SIZE_ZERO", STATUS_MAPPED_FILE_SIZE_ZERO },
5462 { "MORE_PROCESSING_REQUIRED", STATUS_MORE_PROCESSING_REQUIRED },
5463 { "MUTANT_NOT_OWNED", STATUS_MUTANT_NOT_OWNED },
5464 { "NAME_TOO_LONG", STATUS_NAME_TOO_LONG },
5465 { "NETWORK_BUSY", STATUS_NETWORK_BUSY },
5466 { "NETWORK_UNREACHABLE", STATUS_NETWORK_UNREACHABLE },
5467 { "NOT_ALL_ASSIGNED", STATUS_NOT_ALL_ASSIGNED },
5468 { "NOT_A_DIRECTORY", STATUS_NOT_A_DIRECTORY },
5469 { "NOT_FOUND", STATUS_NOT_FOUND },
5470 { "NOT_IMPLEMENTED", STATUS_NOT_IMPLEMENTED },
5471 { "NOT_MAPPED_VIEW", STATUS_NOT_MAPPED_VIEW },
5472 { "NOT_REGISTRY_FILE", STATUS_NOT_REGISTRY_FILE },
5473 { "NOT_SAME_DEVICE", STATUS_NOT_SAME_DEVICE },
5474 { "NOT_SUPPORTED", STATUS_NOT_SUPPORTED },
5475 { "NO_DATA_DETECTED", STATUS_NO_DATA_DETECTED },
5476 { "NO_IMPERSONATION_TOKEN", STATUS_NO_IMPERSONATION_TOKEN },
5477 { "NO_MEMORY", STATUS_NO_MEMORY },
5478 { "NO_MORE_ENTRIES", STATUS_NO_MORE_ENTRIES },
5479 { "NO_SUCH_DEVICE", STATUS_NO_SUCH_DEVICE },
5480 { "NO_SUCH_FILE", STATUS_NO_SUCH_FILE },
5481 { "NO_TOKEN", STATUS_NO_TOKEN },
5482 { "OBJECT_NAME_COLLISION", STATUS_OBJECT_NAME_COLLISION },
5483 { "OBJECT_NAME_EXISTS", STATUS_OBJECT_NAME_EXISTS },
5484 { "OBJECT_NAME_INVALID", STATUS_OBJECT_NAME_INVALID },
5485 { "OBJECT_NAME_NOT_FOUND", STATUS_OBJECT_NAME_NOT_FOUND },
5486 { "OBJECT_PATH_INVALID", STATUS_OBJECT_PATH_INVALID },
5487 { "OBJECT_PATH_NOT_FOUND", STATUS_OBJECT_PATH_NOT_FOUND },
5488 { "OBJECT_PATH_SYNTAX_BAD", STATUS_OBJECT_PATH_SYNTAX_BAD },
5489 { "OBJECT_TYPE_MISMATCH", STATUS_OBJECT_TYPE_MISMATCH },
5490 { "PENDING", STATUS_PENDING },
5491 { "PIPE_BROKEN", STATUS_PIPE_BROKEN },
5492 { "PIPE_BUSY", STATUS_PIPE_BUSY },
5493 { "PIPE_CLOSING", STATUS_PIPE_CLOSING },
5494 { "PIPE_CONNECTED", STATUS_PIPE_CONNECTED },
5495 { "PIPE_DISCONNECTED", STATUS_PIPE_DISCONNECTED },
5496 { "PIPE_EMPTY", STATUS_PIPE_EMPTY },
5497 { "PIPE_LISTENING", STATUS_PIPE_LISTENING },
5498 { "PIPE_NOT_AVAILABLE", STATUS_PIPE_NOT_AVAILABLE },
5499 { "PORT_NOT_SET", STATUS_PORT_NOT_SET },
5500 { "PRIVILEGE_NOT_HELD", STATUS_PRIVILEGE_NOT_HELD },
5501 { "PROCESS_IN_JOB", STATUS_PROCESS_IN_JOB },
5502 { "PROCESS_IS_TERMINATING", STATUS_PROCESS_IS_TERMINATING },
5503 { "PROCESS_NOT_IN_JOB", STATUS_PROCESS_NOT_IN_JOB },
5504 { "REPARSE_POINT_NOT_RESOLVED", STATUS_REPARSE_POINT_NOT_RESOLVED },
5505 { "SECTION_TOO_BIG", STATUS_SECTION_TOO_BIG },
5506 { "SEMAPHORE_LIMIT_EXCEEDED", STATUS_SEMAPHORE_LIMIT_EXCEEDED },
5507 { "SHARING_VIOLATION", STATUS_SHARING_VIOLATION },
5508 { "SHUTDOWN_IN_PROGRESS", STATUS_SHUTDOWN_IN_PROGRESS },
5509 { "SUSPEND_COUNT_EXCEEDED", STATUS_SUSPEND_COUNT_EXCEEDED },
5510 { "THREAD_IS_TERMINATING", STATUS_THREAD_IS_TERMINATING },
5511 { "TIMEOUT", STATUS_TIMEOUT },
5512 { "TOO_MANY_OPENED_FILES", STATUS_TOO_MANY_OPENED_FILES },
5513 { "UNSUCCESSFUL", STATUS_UNSUCCESSFUL },
5514 { "USER_APC", STATUS_USER_APC },
5515 { "USER_MAPPED_FILE", STATUS_USER_MAPPED_FILE },
5516 { "VOLUME_DISMOUNTED", STATUS_VOLUME_DISMOUNTED },
5517 { "WAS_LOCKED", STATUS_WAS_LOCKED },
5518 { "WSAEACCES", 0xc0010000 | WSAEACCES },
5519 { "WSAEADDRINUSE", 0xc0010000 | WSAEADDRINUSE },
5520 { "WSAEADDRNOTAVAIL", 0xc0010000 | WSAEADDRNOTAVAIL },
5521 { "WSAEAFNOSUPPORT", 0xc0010000 | WSAEAFNOSUPPORT },
5522 { "WSAEALREADY", 0xc0010000 | WSAEALREADY },
5523 { "WSAEBADF", 0xc0010000 | WSAEBADF },
5524 { "WSAECONNABORTED", 0xc0010000 | WSAECONNABORTED },
5525 { "WSAECONNREFUSED", 0xc0010000 | WSAECONNREFUSED },
5526 { "WSAECONNRESET", 0xc0010000 | WSAECONNRESET },
5527 { "WSAEDESTADDRREQ", 0xc0010000 | WSAEDESTADDRREQ },
5528 { "WSAEDQUOT", 0xc0010000 | WSAEDQUOT },
5529 { "WSAEFAULT", 0xc0010000 | WSAEFAULT },
5530 { "WSAEHOSTDOWN", 0xc0010000 | WSAEHOSTDOWN },
5531 { "WSAEHOSTUNREACH", 0xc0010000 | WSAEHOSTUNREACH },
5532 { "WSAEINTR", 0xc0010000 | WSAEINTR },
5533 { "WSAEINVAL", 0xc0010000 | WSAEINVAL },
5534 { "WSAEISCONN", 0xc0010000 | WSAEISCONN },
5535 { "WSAELOOP", 0xc0010000 | WSAELOOP },
5536 { "WSAEMFILE", 0xc0010000 | WSAEMFILE },
5537 { "WSAEMSGSIZE", 0xc0010000 | WSAEMSGSIZE },
5538 { "WSAENAMETOOLONG", 0xc0010000 | WSAENAMETOOLONG },
5539 { "WSAENETDOWN", 0xc0010000 | WSAENETDOWN },
5540 { "WSAENETRESET", 0xc0010000 | WSAENETRESET },
5541 { "WSAENETUNREACH", 0xc0010000 | WSAENETUNREACH },
5542 { "WSAENOBUFS", 0xc0010000 | WSAENOBUFS },
5543 { "WSAENOPROTOOPT", 0xc0010000 | WSAENOPROTOOPT },
5544 { "WSAENOTCONN", 0xc0010000 | WSAENOTCONN },
5545 { "WSAENOTEMPTY", 0xc0010000 | WSAENOTEMPTY },
5546 { "WSAENOTSOCK", 0xc0010000 | WSAENOTSOCK },
5547 { "WSAEOPNOTSUPP", 0xc0010000 | WSAEOPNOTSUPP },
5548 { "WSAEPFNOSUPPORT", 0xc0010000 | WSAEPFNOSUPPORT },
5549 { "WSAEPROCLIM", 0xc0010000 | WSAEPROCLIM },
5550 { "WSAEPROTONOSUPPORT", 0xc0010000 | WSAEPROTONOSUPPORT },
5551 { "WSAEPROTOTYPE", 0xc0010000 | WSAEPROTOTYPE },
5552 { "WSAEREMOTE", 0xc0010000 | WSAEREMOTE },
5553 { "WSAESHUTDOWN", 0xc0010000 | WSAESHUTDOWN },
5554 { "WSAESOCKTNOSUPPORT", 0xc0010000 | WSAESOCKTNOSUPPORT },
5555 { "WSAESTALE", 0xc0010000 | WSAESTALE },
5556 { "WSAETIMEDOUT", 0xc0010000 | WSAETIMEDOUT },
5557 { "WSAETOOMANYREFS", 0xc0010000 | WSAETOOMANYREFS },
5558 { "WSAEUSERS", 0xc0010000 | WSAEUSERS },
5559 { "WSAEWOULDBLOCK", 0xc0010000 | WSAEWOULDBLOCK },
5560 { NULL, 0 }
5563 /* ### make_requests end ### */
5564 /* Everything above this line is generated automatically by tools/make_requests */
5566 static const char *get_status_name( unsigned int status )
5568 int i;
5569 static char buffer[10];
5571 if (status)
5573 for (i = 0; status_names[i].name; i++)
5574 if (status_names[i].value == status) return status_names[i].name;
5576 sprintf( buffer, "%x", status );
5577 return buffer;
5580 void trace_request(void)
5582 enum request req = current->req.request_header.req;
5583 if (req < REQ_NB_REQUESTS)
5585 fprintf( stderr, "%04x: %s(", current->id, req_names[req] );
5586 if (req_dumpers[req])
5588 cur_data = get_req_data();
5589 cur_size = get_req_data_size();
5590 req_dumpers[req]( &current->req );
5592 fprintf( stderr, " )\n" );
5594 else fprintf( stderr, "%04x: %d(?)\n", current->id, req );
5597 void trace_reply( enum request req, const union generic_reply *reply )
5599 if (req < REQ_NB_REQUESTS)
5601 fprintf( stderr, "%04x: %s() = %s",
5602 current->id, req_names[req], get_status_name(current->error) );
5603 if (reply_dumpers[req])
5605 fprintf( stderr, " {" );
5606 cur_data = current->reply_data;
5607 cur_size = reply->reply_header.reply_size;
5608 reply_dumpers[req]( reply );
5609 fprintf( stderr, " }" );
5611 fputc( '\n', stderr );
5613 else fprintf( stderr, "%04x: %d() = %s\n",
5614 current->id, req, get_status_name(current->error) );