ntdll: Support extended address requirements in NtMapViewOfSectionEx().
[wine.git] / server / trace.c
blob0e8f118ceb5831a3f4c2e6bc01da16e2fc567113
1 /*
2 * Server request tracing
4 * Copyright (C) 1999 Alexandre Julliard
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #include "config.h"
23 #include <ctype.h>
24 #include <stdarg.h>
25 #include <stdio.h>
26 #include <sys/types.h>
28 #ifdef HAVE_SYS_UIO_H
29 #include <sys/uio.h>
30 #endif
32 #include "ntstatus.h"
33 #define WIN32_NO_STATUS
34 #include "windef.h"
35 #include "winbase.h"
36 #include "wincon.h"
37 #include "winternl.h"
38 #include "winuser.h"
39 #include "winioctl.h"
40 #include "wine/condrv.h"
41 #include "ddk/wdm.h"
42 #include "ddk/ntddser.h"
43 #define USE_WS_PREFIX
44 #include "winsock2.h"
45 #include "file.h"
46 #include "request.h"
47 #include "security.h"
48 #include "unicode.h"
50 static const void *cur_data;
51 static data_size_t cur_size;
53 static const char *get_status_name( unsigned int status );
55 /* utility functions */
57 static inline void remove_data( data_size_t size )
59 cur_data = (const char *)cur_data + size;
60 cur_size -= size;
63 static void dump_uints( const char *prefix, const unsigned int *ptr, int len )
65 fprintf( stderr, "%s{", prefix );
66 while (len > 0)
68 fprintf( stderr, "%08x", *ptr++ );
69 if (--len) fputc( ',', stderr );
71 fputc( '}', stderr );
74 static void dump_handles( const char *prefix, const obj_handle_t *data, data_size_t size )
76 data_size_t len = size / sizeof(*data);
78 fprintf( stderr,"%s{", prefix );
79 while (len > 0)
81 fprintf( stderr, "%04x", *data++ );
82 if (--len) fputc( ',', stderr );
84 fputc( '}', stderr );
87 static void dump_timeout( const char *prefix, const timeout_t *time )
89 fprintf( stderr, "%s%s", prefix, get_timeout_str(*time) );
92 static void dump_abstime( const char *prefix, const abstime_t *when )
94 timeout_t timeout = abstime_to_timeout( *when );
95 dump_timeout( prefix, &timeout );
98 static void dump_uint64( const char *prefix, const unsigned __int64 *val )
100 if ((unsigned int)*val != *val)
101 fprintf( stderr, "%s%x%08x", prefix, (unsigned int)(*val >> 32), (unsigned int)*val );
102 else
103 fprintf( stderr, "%s%08x", prefix, (unsigned int)*val );
106 static void dump_uint128( const char *prefix, const unsigned __int64 val[2] )
108 unsigned __int64 low = val[0], high = val[1];
110 if ((unsigned int)high != high)
111 fprintf( stderr, "%s%x%08x%08x%08x", prefix, (unsigned int)(high >> 32), (unsigned int)high,
112 (unsigned int)(low >> 32), (unsigned int)low );
113 else if (high)
114 fprintf( stderr, "%s%x%08x%08x", prefix, (unsigned int)high,
115 (unsigned int)(low >> 32), (unsigned int)low );
116 else if ((unsigned int)low != low)
117 fprintf( stderr, "%s%x%08x", prefix, (unsigned int)(low >> 32), (unsigned int)low );
118 else
119 fprintf( stderr, "%s%x", prefix, (unsigned int)low );
122 static void dump_rectangle( const char *prefix, const rectangle_t *rect )
124 fprintf( stderr, "%s{%d,%d;%d,%d}", prefix,
125 rect->left, rect->top, rect->right, rect->bottom );
128 static void dump_ioctl_code( const char *prefix, const ioctl_code_t *code )
130 switch(*code)
132 #define CASE(c) case c: fprintf( stderr, "%s%s", prefix, #c ); break
133 CASE(IOCTL_CONDRV_ACTIVATE);
134 CASE(IOCTL_CONDRV_BIND_PID);
135 CASE(IOCTL_CONDRV_CTRL_EVENT);
136 CASE(IOCTL_CONDRV_FILL_OUTPUT);
137 CASE(IOCTL_CONDRV_GET_INPUT_INFO);
138 CASE(IOCTL_CONDRV_GET_MODE);
139 CASE(IOCTL_CONDRV_GET_OUTPUT_INFO);
140 CASE(IOCTL_CONDRV_GET_TITLE);
141 CASE(IOCTL_CONDRV_PEEK);
142 CASE(IOCTL_CONDRV_READ_CONSOLE);
143 CASE(IOCTL_CONDRV_READ_INPUT);
144 CASE(IOCTL_CONDRV_READ_OUTPUT);
145 CASE(IOCTL_CONDRV_SET_MODE);
146 CASE(IOCTL_CONDRV_SET_OUTPUT_INFO);
147 CASE(IOCTL_CONDRV_SETUP_INPUT);
148 CASE(IOCTL_CONDRV_WRITE_CONSOLE);
149 CASE(IOCTL_CONDRV_WRITE_INPUT);
150 CASE(IOCTL_CONDRV_WRITE_OUTPUT);
151 CASE(FSCTL_DISMOUNT_VOLUME);
152 CASE(FSCTL_PIPE_DISCONNECT);
153 CASE(FSCTL_PIPE_LISTEN);
154 CASE(FSCTL_PIPE_PEEK);
155 CASE(FSCTL_PIPE_WAIT);
156 CASE(IOCTL_SERIAL_GET_TIMEOUTS);
157 CASE(IOCTL_SERIAL_GET_WAIT_MASK);
158 CASE(IOCTL_SERIAL_SET_TIMEOUTS);
159 CASE(IOCTL_SERIAL_SET_WAIT_MASK);
160 CASE(WS_SIO_ADDRESS_LIST_CHANGE);
161 default: fprintf( stderr, "%s%08x", prefix, *code ); break;
162 #undef CASE
166 static void dump_apc_call( const char *prefix, const apc_call_t *call )
168 fprintf( stderr, "%s{", prefix );
169 switch(call->type)
171 case APC_NONE:
172 fprintf( stderr, "APC_NONE" );
173 break;
174 case APC_USER:
175 dump_uint64( "APC_USER,func=", &call->user.func );
176 dump_uint64( ",args={", &call->user.args[0] );
177 dump_uint64( ",", &call->user.args[1] );
178 dump_uint64( ",", &call->user.args[2] );
179 fputc( '}', stderr );
180 break;
181 case APC_ASYNC_IO:
182 dump_uint64( "APC_ASYNC_IO,user=", &call->async_io.user );
183 dump_uint64( ",sb=", &call->async_io.sb );
184 fprintf( stderr, ",status=%s,result=%u", get_status_name(call->async_io.status), call->async_io.result );
185 break;
186 case APC_VIRTUAL_ALLOC:
187 dump_uint64( "APC_VIRTUAL_ALLOC,addr=", &call->virtual_alloc.addr );
188 dump_uint64( ",size=", &call->virtual_alloc.size );
189 dump_uint64( ",zero_bits=", &call->virtual_alloc.zero_bits );
190 fprintf( stderr, ",op_type=%x,prot=%x", call->virtual_alloc.op_type, call->virtual_alloc.prot );
191 break;
192 case APC_VIRTUAL_ALLOC_EX:
193 dump_uint64( "APC_VIRTUAL_ALLOC_EX,addr=", &call->virtual_alloc_ex.addr );
194 dump_uint64( ",size=", &call->virtual_alloc_ex.size );
195 dump_uint64( ",limit=", &call->virtual_alloc_ex.limit );
196 dump_uint64( ",align=", &call->virtual_alloc_ex.align );
197 fprintf( stderr, ",op_type=%x,prot=%x,attributes=%x",
198 call->virtual_alloc_ex.op_type, call->virtual_alloc_ex.prot,
199 call->virtual_alloc_ex.attributes );
200 break;
201 case APC_VIRTUAL_FREE:
202 dump_uint64( "APC_VIRTUAL_FREE,addr=", &call->virtual_free.addr );
203 dump_uint64( ",size=", &call->virtual_free.size );
204 fprintf( stderr, ",op_type=%x", call->virtual_free.op_type );
205 break;
206 case APC_VIRTUAL_QUERY:
207 dump_uint64( "APC_VIRTUAL_QUERY,addr=", &call->virtual_query.addr );
208 break;
209 case APC_VIRTUAL_PROTECT:
210 dump_uint64( "APC_VIRTUAL_PROTECT,addr=", &call->virtual_protect.addr );
211 dump_uint64( ",size=", &call->virtual_protect.size );
212 fprintf( stderr, ",prot=%x", call->virtual_protect.prot );
213 break;
214 case APC_VIRTUAL_FLUSH:
215 dump_uint64( "APC_VIRTUAL_FLUSH,addr=", &call->virtual_flush.addr );
216 dump_uint64( ",size=", &call->virtual_flush.size );
217 break;
218 case APC_VIRTUAL_LOCK:
219 dump_uint64( "APC_VIRTUAL_LOCK,addr=", &call->virtual_lock.addr );
220 dump_uint64( ",size=", &call->virtual_lock.size );
221 break;
222 case APC_VIRTUAL_UNLOCK:
223 dump_uint64( "APC_VIRTUAL_UNLOCK,addr=", &call->virtual_unlock.addr );
224 dump_uint64( ",size=", &call->virtual_unlock.size );
225 break;
226 case APC_MAP_VIEW:
227 fprintf( stderr, "APC_MAP_VIEW,handle=%04x", call->map_view.handle );
228 dump_uint64( ",addr=", &call->map_view.addr );
229 dump_uint64( ",size=", &call->map_view.size );
230 dump_uint64( ",offset=", &call->map_view.offset );
231 dump_uint64( ",zero_bits=", &call->map_view.zero_bits );
232 fprintf( stderr, ",alloc_type=%x,prot=%x", call->map_view.alloc_type, call->map_view.prot );
233 break;
234 case APC_MAP_VIEW_EX:
235 fprintf( stderr, "APC_MAP_VIEW_EX,handle=%04x", call->map_view_ex.handle );
236 dump_uint64( ",addr=", &call->map_view_ex.addr );
237 dump_uint64( ",size=", &call->map_view_ex.size );
238 dump_uint64( ",offset=", &call->map_view_ex.offset );
239 dump_uint64( ",limit=", &call->map_view_ex.limit );
240 fprintf( stderr, ",alloc_type=%x,prot=%x", call->map_view_ex.alloc_type, call->map_view_ex.prot );
241 break;
242 case APC_UNMAP_VIEW:
243 dump_uint64( "APC_UNMAP_VIEW,addr=", &call->unmap_view.addr );
244 break;
245 case APC_CREATE_THREAD:
246 dump_uint64( "APC_CREATE_THREAD,func=", &call->create_thread.func );
247 dump_uint64( ",arg=", &call->create_thread.arg );
248 dump_uint64( ",zero_bits=", &call->create_thread.zero_bits );
249 dump_uint64( ",reserve=", &call->create_thread.reserve );
250 dump_uint64( ",commit=", &call->create_thread.commit );
251 fprintf( stderr, ",flags=%x", call->create_thread.flags );
252 break;
253 case APC_DUP_HANDLE:
254 fprintf( stderr, "APC_DUP_HANDLE,src_handle=%04x,dst_process=%04x,access=%x,attributes=%x,options=%x",
255 call->dup_handle.src_handle, call->dup_handle.dst_process, call->dup_handle.access,
256 call->dup_handle.attributes, call->dup_handle.options );
257 break;
258 default:
259 fprintf( stderr, "type=%u", call->type );
260 break;
262 fputc( '}', stderr );
265 static void dump_apc_result( const char *prefix, const apc_result_t *result )
267 fprintf( stderr, "%s{", prefix );
268 switch(result->type)
270 case APC_NONE:
271 break;
272 case APC_ASYNC_IO:
273 fprintf( stderr, "APC_ASYNC_IO,status=%s,total=%u",
274 get_status_name( result->async_io.status ), result->async_io.total );
275 break;
276 case APC_VIRTUAL_ALLOC:
277 fprintf( stderr, "APC_VIRTUAL_ALLOC,status=%s",
278 get_status_name( result->virtual_alloc.status ));
279 dump_uint64( ",addr=", &result->virtual_alloc.addr );
280 dump_uint64( ",size=", &result->virtual_alloc.size );
281 break;
282 case APC_VIRTUAL_FREE:
283 fprintf( stderr, "APC_VIRTUAL_FREE,status=%s",
284 get_status_name( result->virtual_free.status ));
285 dump_uint64( ",addr=", &result->virtual_free.addr );
286 dump_uint64( ",size=", &result->virtual_free.size );
287 break;
288 case APC_VIRTUAL_QUERY:
289 fprintf( stderr, "APC_VIRTUAL_QUERY,status=%s",
290 get_status_name( result->virtual_query.status ));
291 dump_uint64( ",base=", &result->virtual_query.base );
292 dump_uint64( ",alloc_base=", &result->virtual_query.alloc_base );
293 dump_uint64( ",size=", &result->virtual_query.size );
294 fprintf( stderr, ",state=%x,prot=%x,alloc_prot=%x,alloc_type=%x",
295 result->virtual_query.state, result->virtual_query.prot,
296 result->virtual_query.alloc_prot, result->virtual_query.alloc_type );
297 break;
298 case APC_VIRTUAL_PROTECT:
299 fprintf( stderr, "APC_VIRTUAL_PROTECT,status=%s",
300 get_status_name( result->virtual_protect.status ));
301 dump_uint64( ",addr=", &result->virtual_protect.addr );
302 dump_uint64( ",size=", &result->virtual_protect.size );
303 fprintf( stderr, ",prot=%x", result->virtual_protect.prot );
304 break;
305 case APC_VIRTUAL_FLUSH:
306 fprintf( stderr, "APC_VIRTUAL_FLUSH,status=%s",
307 get_status_name( result->virtual_flush.status ));
308 dump_uint64( ",addr=", &result->virtual_flush.addr );
309 dump_uint64( ",size=", &result->virtual_flush.size );
310 break;
311 case APC_VIRTUAL_LOCK:
312 fprintf( stderr, "APC_VIRTUAL_LOCK,status=%s",
313 get_status_name( result->virtual_lock.status ));
314 dump_uint64( ",addr=", &result->virtual_lock.addr );
315 dump_uint64( ",size=", &result->virtual_lock.size );
316 break;
317 case APC_VIRTUAL_UNLOCK:
318 fprintf( stderr, "APC_VIRTUAL_UNLOCK,status=%s",
319 get_status_name( result->virtual_unlock.status ));
320 dump_uint64( ",addr=", &result->virtual_unlock.addr );
321 dump_uint64( ",size=", &result->virtual_unlock.size );
322 break;
323 case APC_MAP_VIEW:
324 fprintf( stderr, "APC_MAP_VIEW,status=%s",
325 get_status_name( result->map_view.status ));
326 dump_uint64( ",addr=", &result->map_view.addr );
327 dump_uint64( ",size=", &result->map_view.size );
328 break;
329 case APC_UNMAP_VIEW:
330 fprintf( stderr, "APC_UNMAP_VIEW,status=%s",
331 get_status_name( result->unmap_view.status ) );
332 break;
333 case APC_CREATE_THREAD:
334 fprintf( stderr, "APC_CREATE_THREAD,status=%s,pid=%04x,tid=%04x,handle=%04x",
335 get_status_name( result->create_thread.status ),
336 result->create_thread.pid, result->create_thread.tid, result->create_thread.handle );
337 break;
338 case APC_DUP_HANDLE:
339 fprintf( stderr, "APC_DUP_HANDLE,status=%s,handle=%04x",
340 get_status_name( result->dup_handle.status ), result->dup_handle.handle );
341 break;
342 default:
343 fprintf( stderr, "type=%u", result->type );
344 break;
346 fputc( '}', stderr );
349 static void dump_async_data( const char *prefix, const async_data_t *data )
351 fprintf( stderr, "%s{handle=%04x,event=%04x", prefix, data->handle, data->event );
352 dump_uint64( ",iosb=", &data->iosb );
353 dump_uint64( ",user=", &data->user );
354 dump_uint64( ",apc=", &data->apc );
355 dump_uint64( ",apc_context=", &data->apc_context );
356 fputc( '}', stderr );
359 static void dump_irp_params( const char *prefix, const irp_params_t *data )
361 switch (data->type)
363 case IRP_CALL_NONE:
364 fprintf( stderr, "%s{NONE}", prefix );
365 break;
366 case IRP_CALL_CREATE:
367 fprintf( stderr, "%s{CREATE,access=%08x,sharing=%08x,options=%08x",
368 prefix, data->create.access, data->create.sharing, data->create.options );
369 dump_uint64( ",device=", &data->create.device );
370 fprintf( stderr, ",file=%08x}", data->create.file );
371 break;
372 case IRP_CALL_CLOSE:
373 fprintf( stderr, "%s{CLOSE", prefix );
374 dump_uint64( ",file=", &data->close.file );
375 fputc( '}', stderr );
376 break;
377 case IRP_CALL_READ:
378 fprintf( stderr, "%s{READ,key=%08x,out_size=%u", prefix, data->read.key,
379 data->read.out_size );
380 dump_uint64( ",pos=", &data->read.pos );
381 dump_uint64( ",file=", &data->read.file );
382 fputc( '}', stderr );
383 break;
384 case IRP_CALL_WRITE:
385 fprintf( stderr, "%s{WRITE,key=%08x", prefix, data->write.key );
386 dump_uint64( ",pos=", &data->write.pos );
387 dump_uint64( ",file=", &data->write.file );
388 fputc( '}', stderr );
389 break;
390 case IRP_CALL_FLUSH:
391 fprintf( stderr, "%s{FLUSH", prefix );
392 dump_uint64( ",file=", &data->flush.file );
393 fputc( '}', stderr );
394 break;
395 case IRP_CALL_IOCTL:
396 fprintf( stderr, "%s{IOCTL", prefix );
397 dump_ioctl_code( ",code=", &data->ioctl.code );
398 fprintf( stderr, ",out_size=%u", data->ioctl.out_size );
399 dump_uint64( ",file=", &data->ioctl.file );
400 fputc( '}', stderr );
401 break;
402 case IRP_CALL_VOLUME:
403 fprintf( stderr, "%s{VOLUME,class=%u,out_size=%u", prefix,
404 data->volume.info_class, data->volume.out_size );
405 dump_uint64( ",file=", &data->volume.file );
406 fputc( '}', stderr );
407 break;
408 case IRP_CALL_FREE:
409 fprintf( stderr, "%s{FREE", prefix );
410 dump_uint64( ",obj=", &data->free.obj );
411 fputc( '}', stderr );
412 break;
413 case IRP_CALL_CANCEL:
414 fprintf( stderr, "%s{CANCEL", prefix );
415 dump_uint64( ",irp=", &data->cancel.irp );
416 fputc( '}', stderr );
417 break;
421 static void dump_rawinput( const char *prefix, const union rawinput *rawinput )
423 switch (rawinput->type)
425 case RIM_TYPEMOUSE:
426 fprintf( stderr, "%s{type=MOUSE,x=%d,y=%d,data=%08x}", prefix, rawinput->mouse.x,
427 rawinput->mouse.y, rawinput->mouse.data );
428 break;
429 case RIM_TYPEKEYBOARD:
430 fprintf( stderr, "%s{type=KEYBOARD,message=%04x,vkey=%04hx,scan=%04hx}", prefix,
431 rawinput->kbd.message, rawinput->kbd.vkey, rawinput->kbd.scan );
432 break;
433 case RIM_TYPEHID:
434 fprintf( stderr, "%s{type=HID,device=%04x,param=%04x,page=%04hx,usage=%04hx,count=%u,length=%u}",
435 prefix, rawinput->hid.device, rawinput->hid.param, rawinput->hid.usage_page,
436 rawinput->hid.usage, rawinput->hid.count, rawinput->hid.length );
437 break;
438 default:
439 fprintf( stderr, "%s{type=%04x}", prefix, rawinput->type );
440 break;
444 static void dump_hw_input( const char *prefix, const hw_input_t *input )
446 switch (input->type)
448 case INPUT_MOUSE:
449 fprintf( stderr, "%s{type=MOUSE,x=%d,y=%d,data=%08x,flags=%08x,time=%u",
450 prefix, input->mouse.x, input->mouse.y, input->mouse.data, input->mouse.flags,
451 input->mouse.time );
452 dump_uint64( ",info=", &input->mouse.info );
453 fputc( '}', stderr );
454 break;
455 case INPUT_KEYBOARD:
456 fprintf( stderr, "%s{type=KEYBOARD,vkey=%04hx,scan=%04hx,flags=%08x,time=%u",
457 prefix, input->kbd.vkey, input->kbd.scan, input->kbd.flags, input->kbd.time );
458 dump_uint64( ",info=", &input->kbd.info );
459 fputc( '}', stderr );
460 break;
461 case INPUT_HARDWARE:
462 fprintf( stderr, "%s{type=HARDWARE,msg=%04x", prefix, input->hw.msg );
463 dump_uint64( ",lparam=", &input->hw.lparam );
464 switch (input->hw.msg)
466 case WM_INPUT:
467 case WM_INPUT_DEVICE_CHANGE:
468 dump_rawinput( ",rawinput=", &input->hw.rawinput );
470 fputc( '}', stderr );
471 break;
472 default:
473 fprintf( stderr, "%s{type=%04x}", prefix, input->type );
474 break;
478 static void dump_luid( const char *prefix, const struct luid *luid )
480 fprintf( stderr, "%s%d.%u", prefix, luid->high_part, luid->low_part );
483 static void dump_generic_map( const char *prefix, const generic_map_t *map )
485 fprintf( stderr, "%s{r=%08x,w=%08x,x=%08x,a=%08x}",
486 prefix, map->read, map->write, map->exec, map->all );
489 static void dump_varargs_ints( const char *prefix, data_size_t size )
491 const int *data = cur_data;
492 data_size_t len = size / sizeof(*data);
494 fprintf( stderr,"%s{", prefix );
495 while (len > 0)
497 fprintf( stderr, "%d", *data++ );
498 if (--len) fputc( ',', stderr );
500 fputc( '}', stderr );
501 remove_data( size );
504 static void dump_varargs_uints( const char *prefix, data_size_t size )
506 const unsigned int *data = cur_data;
508 dump_uints( prefix, data, size / sizeof(*data) );
509 remove_data( size );
512 static void dump_varargs_uints64( const char *prefix, data_size_t size )
514 const unsigned __int64 *data = cur_data;
515 data_size_t len = size / sizeof(*data);
517 fprintf( stderr,"%s{", prefix );
518 while (len > 0)
520 dump_uint64( "", data++ );
521 if (--len) fputc( ',', stderr );
523 fputc( '}', stderr );
524 remove_data( size );
527 static void dump_varargs_ushorts( const char *prefix, data_size_t size )
529 const unsigned short *data = cur_data;
530 data_size_t len = size / sizeof(*data);
532 fprintf( stderr, "%s{", prefix );
533 while (len > 0)
535 fprintf( stderr, "%04x", *data++ );
536 if (--len) fputc( ',', stderr );
538 fputc( '}', stderr );
539 remove_data( size );
542 static void dump_varargs_apc_result( const char *prefix, data_size_t size )
544 const apc_result_t *result = cur_data;
546 if (size >= sizeof(*result))
548 dump_apc_result( prefix, result );
549 size = sizeof(*result);
551 remove_data( size );
554 static void dump_varargs_select_op( const char *prefix, data_size_t size )
556 select_op_t data;
558 if (!size)
560 fprintf( stderr, "%s{}", prefix );
561 return;
563 memset( &data, 0, sizeof(data) );
564 memcpy( &data, cur_data, min( size, sizeof(data) ));
566 fprintf( stderr, "%s{", prefix );
567 switch (data.op)
569 case SELECT_NONE:
570 fprintf( stderr, "NONE" );
571 break;
572 case SELECT_WAIT:
573 case SELECT_WAIT_ALL:
574 fprintf( stderr, "%s", data.op == SELECT_WAIT ? "WAIT" : "WAIT_ALL" );
575 if (size > offsetof( select_op_t, wait.handles ))
576 dump_handles( ",handles=", data.wait.handles,
577 min( size, sizeof(data.wait) ) - offsetof( select_op_t, wait.handles ));
578 break;
579 case SELECT_SIGNAL_AND_WAIT:
580 fprintf( stderr, "SIGNAL_AND_WAIT,signal=%04x,wait=%04x",
581 data.signal_and_wait.signal, data.signal_and_wait.wait );
582 break;
583 case SELECT_KEYED_EVENT_WAIT:
584 case SELECT_KEYED_EVENT_RELEASE:
585 fprintf( stderr, "KEYED_EVENT_%s,handle=%04x",
586 data.op == SELECT_KEYED_EVENT_WAIT ? "WAIT" : "RELEASE",
587 data.keyed_event.handle );
588 dump_uint64( ",key=", &data.keyed_event.key );
589 break;
590 default:
591 fprintf( stderr, "op=%u", data.op );
592 break;
594 fputc( '}', stderr );
595 remove_data( size );
598 static void dump_varargs_user_handles( const char *prefix, data_size_t size )
600 const user_handle_t *data = cur_data;
601 data_size_t len = size / sizeof(*data);
603 fprintf( stderr,"%s{", prefix );
604 while (len > 0)
606 fprintf( stderr, "%08x", *data++ );
607 if (--len) fputc( ',', stderr );
609 fputc( '}', stderr );
610 remove_data( size );
613 static void dump_varargs_bytes( const char *prefix, data_size_t size )
615 const unsigned char *data = cur_data;
616 data_size_t len = min( 1024, size );
618 fprintf( stderr,"%s{", prefix );
619 while (len > 0)
621 fprintf( stderr, "%02x", *data++ );
622 if (--len) fputc( ',', stderr );
624 if (size > 1024) fprintf( stderr, "...(total %u)", size );
625 fputc( '}', stderr );
626 remove_data( size );
629 static void dump_varargs_string( const char *prefix, data_size_t size )
631 fprintf( stderr, "%s\"%.*s\"", prefix, (int)size, (const char *)cur_data );
632 remove_data( size );
635 static void dump_varargs_unicode_str( const char *prefix, data_size_t size )
637 fprintf( stderr, "%sL\"", prefix );
638 dump_strW( cur_data, size, stderr, "\"\"" );
639 fputc( '\"', stderr );
640 remove_data( size );
643 static void dump_varargs_context( const char *prefix, data_size_t size )
645 const context_t *context = cur_data;
646 context_t ctx;
647 unsigned int i;
649 if (!size)
651 fprintf( stderr, "%s{}", prefix );
652 return;
654 size = min( size, sizeof(ctx) );
655 memset( &ctx, 0, sizeof(ctx) );
656 memcpy( &ctx, context, size );
658 switch (ctx.machine)
660 case IMAGE_FILE_MACHINE_I386:
661 fprintf( stderr, "%s{machine=i386", prefix );
662 if (ctx.flags & SERVER_CTX_CONTROL)
663 fprintf( stderr, ",eip=%08x,esp=%08x,ebp=%08x,eflags=%08x,cs=%04x,ss=%04x",
664 ctx.ctl.i386_regs.eip, ctx.ctl.i386_regs.esp, ctx.ctl.i386_regs.ebp,
665 ctx.ctl.i386_regs.eflags, ctx.ctl.i386_regs.cs, ctx.ctl.i386_regs.ss );
666 if (ctx.flags & SERVER_CTX_SEGMENTS)
667 fprintf( stderr, ",ds=%04x,es=%04x,fs=%04x,gs=%04x",
668 ctx.seg.i386_regs.ds, ctx.seg.i386_regs.es,
669 ctx.seg.i386_regs.fs, ctx.seg.i386_regs.gs );
670 if (ctx.flags & SERVER_CTX_INTEGER)
671 fprintf( stderr, ",eax=%08x,ebx=%08x,ecx=%08x,edx=%08x,esi=%08x,edi=%08x",
672 ctx.integer.i386_regs.eax, ctx.integer.i386_regs.ebx, ctx.integer.i386_regs.ecx,
673 ctx.integer.i386_regs.edx, ctx.integer.i386_regs.esi, ctx.integer.i386_regs.edi );
674 if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
675 fprintf( stderr, ",dr0=%08x,dr1=%08x,dr2=%08x,dr3=%08x,dr6=%08x,dr7=%08x",
676 ctx.debug.i386_regs.dr0, ctx.debug.i386_regs.dr1, ctx.debug.i386_regs.dr2,
677 ctx.debug.i386_regs.dr3, ctx.debug.i386_regs.dr6, ctx.debug.i386_regs.dr7 );
678 if (ctx.flags & SERVER_CTX_FLOATING_POINT)
680 fprintf( stderr, ",fp.ctrl=%08x,fp.status=%08x,fp.tag=%08x,fp.err_off=%08x,fp.err_sel=%08x",
681 ctx.fp.i386_regs.ctrl, ctx.fp.i386_regs.status, ctx.fp.i386_regs.tag,
682 ctx.fp.i386_regs.err_off, ctx.fp.i386_regs.err_sel );
683 fprintf( stderr, ",fp.data_off=%08x,fp.data_sel=%08x,fp.cr0npx=%08x",
684 ctx.fp.i386_regs.data_off, ctx.fp.i386_regs.data_sel, ctx.fp.i386_regs.cr0npx );
685 for (i = 0; i < 8; i++)
687 unsigned __int64 reg[2];
688 memset( reg, 0, sizeof(reg) );
689 memcpy( reg, &ctx.fp.i386_regs.regs[10 * i], 10 );
690 fprintf( stderr, ",fp.reg%u=", i );
691 dump_uint128( "", reg );
694 if (ctx.flags & SERVER_CTX_EXTENDED_REGISTERS)
695 dump_uints( ",extended=", (const unsigned int *)ctx.ext.i386_regs,
696 sizeof(ctx.ext.i386_regs) / sizeof(int) );
697 if (ctx.flags & SERVER_CTX_YMM_REGISTERS)
698 for (i = 0; i < 16; i++)
700 fprintf( stderr, ",ymm%u=", i );
701 dump_uint128( "", (const unsigned __int64 *)&ctx.ymm.regs.ymm_high[i] );
703 break;
704 case IMAGE_FILE_MACHINE_AMD64:
705 fprintf( stderr, "%s{machine=x86_64", prefix );
706 if (ctx.flags & SERVER_CTX_CONTROL)
708 dump_uint64( ",rip=", &ctx.ctl.x86_64_regs.rip );
709 dump_uint64( ",rbp=", &ctx.ctl.x86_64_regs.rbp );
710 dump_uint64( ",rsp=", &ctx.ctl.x86_64_regs.rsp );
711 fprintf( stderr, ",cs=%04x,ss=%04x,flags=%08x",
712 ctx.ctl.x86_64_regs.cs, ctx.ctl.x86_64_regs.ss, ctx.ctl.x86_64_regs.flags );
714 if (ctx.flags & SERVER_CTX_INTEGER)
716 dump_uint64( ",rax=", &ctx.integer.x86_64_regs.rax );
717 dump_uint64( ",rbx=", &ctx.integer.x86_64_regs.rbx );
718 dump_uint64( ",rcx=", &ctx.integer.x86_64_regs.rcx );
719 dump_uint64( ",rdx=", &ctx.integer.x86_64_regs.rdx );
720 dump_uint64( ",rsi=", &ctx.integer.x86_64_regs.rsi );
721 dump_uint64( ",rdi=", &ctx.integer.x86_64_regs.rdi );
722 dump_uint64( ",r8=", &ctx.integer.x86_64_regs.r8 );
723 dump_uint64( ",r9=", &ctx.integer.x86_64_regs.r9 );
724 dump_uint64( ",r10=", &ctx.integer.x86_64_regs.r10 );
725 dump_uint64( ",r11=", &ctx.integer.x86_64_regs.r11 );
726 dump_uint64( ",r12=", &ctx.integer.x86_64_regs.r12 );
727 dump_uint64( ",r13=", &ctx.integer.x86_64_regs.r13 );
728 dump_uint64( ",r14=", &ctx.integer.x86_64_regs.r14 );
729 dump_uint64( ",r15=", &ctx.integer.x86_64_regs.r15 );
731 if (ctx.flags & SERVER_CTX_SEGMENTS)
732 fprintf( stderr, ",ds=%04x,es=%04x,fs=%04x,gs=%04x",
733 ctx.seg.x86_64_regs.ds, ctx.seg.x86_64_regs.es,
734 ctx.seg.x86_64_regs.fs, ctx.seg.x86_64_regs.gs );
735 if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
737 dump_uint64( ",dr0=", &ctx.debug.x86_64_regs.dr0 );
738 dump_uint64( ",dr1=", &ctx.debug.x86_64_regs.dr1 );
739 dump_uint64( ",dr2=", &ctx.debug.x86_64_regs.dr2 );
740 dump_uint64( ",dr3=", &ctx.debug.x86_64_regs.dr3 );
741 dump_uint64( ",dr6=", &ctx.debug.x86_64_regs.dr6 );
742 dump_uint64( ",dr7=", &ctx.debug.x86_64_regs.dr7 );
744 if (ctx.flags & SERVER_CTX_FLOATING_POINT)
745 for (i = 0; i < 32; i++)
747 fprintf( stderr, ",fp%u=", i );
748 dump_uint128( "", (const unsigned __int64 *)&ctx.fp.x86_64_regs.fpregs[i] );
750 if (ctx.flags & SERVER_CTX_YMM_REGISTERS)
751 for (i = 0; i < 16; i++)
753 fprintf( stderr, ",ymm%u=", i );
754 dump_uint128( "", (const unsigned __int64 *)&ctx.ymm.regs.ymm_high[i] );
756 break;
757 case IMAGE_FILE_MACHINE_ARMNT:
758 fprintf( stderr, "%s{machine=arm", prefix );
759 if (ctx.flags & SERVER_CTX_CONTROL)
760 fprintf( stderr, ",sp=%08x,lr=%08x,pc=%08x,cpsr=%08x",
761 ctx.ctl.arm_regs.sp, ctx.ctl.arm_regs.lr,
762 ctx.ctl.arm_regs.pc, ctx.ctl.arm_regs.cpsr );
763 if (ctx.flags & SERVER_CTX_INTEGER)
764 for (i = 0; i < 13; i++) fprintf( stderr, ",r%u=%08x", i, ctx.integer.arm_regs.r[i] );
765 if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
767 for (i = 0; i < 8; i++)
768 fprintf( stderr, ",bcr%u=%08x,bvr%u=%08x",
769 i, ctx.debug.arm_regs.bcr[i], i, ctx.debug.arm_regs.bvr[i] );
770 fprintf( stderr, ",wcr0=%08x,wvr0=%08x",
771 ctx.debug.arm_regs.wcr[0], ctx.debug.arm_regs.wvr[0] );
773 if (ctx.flags & SERVER_CTX_FLOATING_POINT)
775 for (i = 0; i < 32; i++)
777 fprintf( stderr, ",d%u=", i );
778 dump_uint64( "", &ctx.fp.arm_regs.d[i] );
780 fprintf( stderr, ",fpscr=%08x", ctx.fp.arm_regs.fpscr );
782 break;
783 case IMAGE_FILE_MACHINE_ARM64:
784 fprintf( stderr, "%s{machine=arm64", prefix );
785 if (ctx.flags & SERVER_CTX_CONTROL)
787 dump_uint64( ",sp=", &ctx.ctl.arm64_regs.sp );
788 dump_uint64( ",pc=", &ctx.ctl.arm64_regs.pc );
789 dump_uint64( ",pstate=", &ctx.ctl.arm64_regs.pstate );
791 if (ctx.flags & SERVER_CTX_INTEGER)
793 for (i = 0; i < 31; i++)
795 fprintf( stderr, ",x%u=", i );
796 dump_uint64( "", &ctx.integer.arm64_regs.x[i] );
799 if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
801 for (i = 0; i < 8; i++)
803 fprintf( stderr, ",bcr%u=%08x,bvr%u=", i, ctx.debug.arm64_regs.bcr[i], i );
804 dump_uint64( "", &ctx.debug.arm64_regs.bvr[i] );
806 for (i = 0; i < 2; i++)
808 fprintf( stderr, ",wcr%u=%08x,wvr%u=", i, ctx.debug.arm64_regs.wcr[i], i );
809 dump_uint64( "", &ctx.debug.arm64_regs.wvr[i] );
812 if (ctx.flags & SERVER_CTX_FLOATING_POINT)
814 for (i = 0; i < 32; i++)
816 fprintf( stderr, ",q%u=", i );
817 dump_uint64( "", &ctx.fp.arm64_regs.q[i].high );
818 dump_uint64( "", &ctx.fp.arm64_regs.q[i].low );
820 fprintf( stderr, ",fpcr=%08x,fpsr=%08x", ctx.fp.arm64_regs.fpcr, ctx.fp.arm64_regs.fpsr );
822 break;
823 default:
824 fprintf( stderr, "%s{machine=%04x", prefix, ctx.machine );
825 break;
827 fputc( '}', stderr );
828 remove_data( size );
831 static void dump_varargs_contexts( const char *prefix, data_size_t size )
833 if (!size)
835 fprintf( stderr, "%s{}", prefix );
836 return;
838 fprintf( stderr, "%s{", prefix );
839 while (cur_size)
841 dump_varargs_context( "", cur_size );
842 fputc( cur_size ? ',' : '}', stderr );
846 static void dump_varargs_debug_event( const char *prefix, data_size_t size )
848 debug_event_t event;
849 unsigned int i;
851 if (!size)
853 fprintf( stderr, "%s{}", prefix );
854 return;
856 size = min( size, sizeof(event) );
857 memset( &event, 0, sizeof(event) );
858 memcpy( &event, cur_data, size );
860 switch(event.code)
862 case DbgIdle:
863 fprintf( stderr, "%s{idle}", prefix );
864 break;
865 case DbgReplyPending:
866 fprintf( stderr, "%s{pending}", prefix );
867 break;
868 case DbgCreateThreadStateChange:
869 fprintf( stderr, "%s{create_thread,thread=%04x", prefix, event.create_thread.handle );
870 dump_uint64( ",start=", &event.create_thread.start );
871 fputc( '}', stderr );
872 break;
873 case DbgCreateProcessStateChange:
874 fprintf( stderr, "%s{create_process,file=%04x,process=%04x,thread=%04x", prefix,
875 event.create_process.file, event.create_process.process,
876 event.create_process.thread );
877 dump_uint64( ",base=", &event.create_process.base );
878 fprintf( stderr, ",offset=%d,size=%d",
879 event.create_process.dbg_offset, event.create_process.dbg_size );
880 dump_uint64( ",start=", &event.create_process.start );
881 fputc( '}', stderr );
882 break;
883 case DbgExitThreadStateChange:
884 fprintf( stderr, "%s{exit_thread,code=%d}", prefix, event.exit.exit_code );
885 break;
886 case DbgExitProcessStateChange:
887 fprintf( stderr, "%s{exit_process,code=%d}", prefix, event.exit.exit_code );
888 break;
889 case DbgExceptionStateChange:
890 case DbgBreakpointStateChange:
891 case DbgSingleStepStateChange:
892 fprintf( stderr, "%s{%s,first=%d,exc_code=%08x,flags=%08x", prefix,
893 event.code == DbgBreakpointStateChange ? "breakpoint" :
894 event.code == DbgSingleStepStateChange ? "singlestep" : "exception",
895 event.exception.first, event.exception.exc_code, event.exception.flags );
896 dump_uint64( ",record=", &event.exception.record );
897 dump_uint64( ",address=", &event.exception.address );
898 fprintf( stderr, ",params={" );
899 event.exception.nb_params = min( event.exception.nb_params, EXCEPTION_MAXIMUM_PARAMETERS );
900 for (i = 0; i < event.exception.nb_params; i++)
902 dump_uint64( "", &event.exception.params[i] );
903 if (i < event.exception.nb_params) fputc( ',', stderr );
905 fprintf( stderr, "}}" );
906 break;
907 case DbgLoadDllStateChange:
908 fprintf( stderr, "%s{load_dll,file=%04x", prefix, event.load_dll.handle );
909 dump_uint64( ",base=", &event.load_dll.base );
910 fprintf( stderr, ",offset=%d,size=%d",
911 event.load_dll.dbg_offset, event.load_dll.dbg_size );
912 dump_uint64( ",name=", &event.load_dll.name );
913 fputc( '}', stderr );
914 break;
915 case DbgUnloadDllStateChange:
916 fprintf( stderr, "%s{unload_dll", prefix );
917 dump_uint64( ",base=", &event.unload_dll.base );
918 fputc( '}', stderr );
919 break;
920 default:
921 fprintf( stderr, "%s{code=??? (%d)}", prefix, event.code );
922 break;
924 remove_data( size );
927 /* dump a unicode string contained in a buffer; helper for dump_varargs_startup_info */
928 static data_size_t dump_inline_unicode_string( const char *prefix, data_size_t pos, data_size_t len, data_size_t total_size )
930 fputs( prefix, stderr );
931 if (pos >= total_size) return pos;
932 if (len > total_size - pos) len = total_size - pos;
933 dump_strW( (const WCHAR *)cur_data + pos/sizeof(WCHAR), len, stderr, "\"\"" );
934 return pos + (len / sizeof(WCHAR)) * sizeof(WCHAR);
937 static void dump_varargs_startup_info( const char *prefix, data_size_t size )
939 startup_info_t info;
940 data_size_t pos = sizeof(info);
942 memset( &info, 0, sizeof(info) );
943 memcpy( &info, cur_data, min( size, sizeof(info) ));
945 fprintf( stderr,
946 "%s{debug_flags=%x,console_flags=%x,console=%04x,hstdin=%04x,hstdout=%04x,hstderr=%04x,"
947 "x=%u,y=%u,xsize=%u,ysize=%u,xchars=%u,ychars=%u,attribute=%02x,flags=%x,show=%u",
948 prefix, info.debug_flags, info.console_flags, info.console,
949 info.hstdin, info.hstdout, info.hstderr, info.x, info.y, info.xsize, info.ysize,
950 info.xchars, info.ychars, info.attribute, info.flags, info.show );
951 pos = dump_inline_unicode_string( ",curdir=L\"", pos, info.curdir_len, size );
952 pos = dump_inline_unicode_string( "\",dllpath=L\"", pos, info.dllpath_len, size );
953 pos = dump_inline_unicode_string( "\",imagepath=L\"", pos, info.imagepath_len, size );
954 pos = dump_inline_unicode_string( "\",cmdline=L\"", pos, info.cmdline_len, size );
955 pos = dump_inline_unicode_string( "\",title=L\"", pos, info.title_len, size );
956 pos = dump_inline_unicode_string( "\",desktop=L\"", pos, info.desktop_len, size );
957 pos = dump_inline_unicode_string( "\",shellinfo=L\"", pos, info.shellinfo_len, size );
958 pos = dump_inline_unicode_string( "\",runtime=L\"", pos, info.runtime_len, size );
959 fprintf( stderr, "\"}" );
960 remove_data( size );
963 static void dump_varargs_rectangles( const char *prefix, data_size_t size )
965 const rectangle_t *rect = cur_data;
966 data_size_t len = size / sizeof(*rect);
968 fprintf( stderr,"%s{", prefix );
969 while (len > 0)
971 dump_rectangle( "", rect++ );
972 if (--len) fputc( ',', stderr );
974 fputc( '}', stderr );
975 remove_data( size );
978 static void dump_varargs_cursor_positions( const char *prefix, data_size_t size )
980 const cursor_pos_t *pos = cur_data;
981 data_size_t len = size / sizeof(*pos);
983 fprintf( stderr, "%s{", prefix );
984 while (len > 0)
986 fprintf( stderr, "{x=%d,y=%d,time=%u", pos->x, pos->y, pos->time );
987 dump_uint64( ",info=", &pos->info );
988 fputc( '}', stderr );
989 pos++;
990 if (--len) fputc( ',', stderr );
992 fputc( '}', stderr );
993 remove_data( size );
996 static void dump_varargs_message_data( const char *prefix, data_size_t size )
998 /* FIXME: dump the structured data */
999 dump_varargs_bytes( prefix, size );
1002 static void dump_varargs_properties( const char *prefix, data_size_t size )
1004 const property_data_t *prop = cur_data;
1005 data_size_t len = size / sizeof(*prop);
1007 fprintf( stderr,"%s{", prefix );
1008 while (len > 0)
1010 fprintf( stderr, "{atom=%04x,str=%d", prop->atom, prop->string );
1011 dump_uint64( ",data=", &prop->data );
1012 fputc( '}', stderr );
1013 prop++;
1014 if (--len) fputc( ',', stderr );
1016 fputc( '}', stderr );
1017 remove_data( size );
1020 static void dump_varargs_luid_attr( const char *prefix, data_size_t size )
1022 const struct luid_attr *lat = cur_data;
1023 data_size_t len = size / sizeof(*lat);
1025 fprintf( stderr,"%s{", prefix );
1026 while (len > 0)
1028 fprintf( stderr, "{luid=%08x%08x,attrs=%x}", lat->luid.high_part, lat->luid.low_part, lat->attrs );
1029 lat++;
1030 if (--len) fputc( ',', stderr );
1032 fputc( '}', stderr );
1033 remove_data( size );
1036 static void dump_inline_sid( const char *prefix, const struct sid *sid, data_size_t size )
1038 DWORD i;
1040 fprintf( stderr,"%s", prefix );
1041 if (sid_valid_size( sid, size ))
1043 fprintf( stderr, "S-%u-%u", sid->revision,
1044 ((unsigned int)sid->id_auth[2] << 24) |
1045 ((unsigned int)sid->id_auth[3] << 16) |
1046 ((unsigned int)sid->id_auth[4] << 8) |
1047 ((unsigned int)sid->id_auth[5]) );
1048 for (i = 0; i < sid->sub_count; i++) fprintf( stderr, "-%u", sid->sub_auth[i] );
1050 else fprintf( stderr, "<invalid>" );
1053 static void dump_varargs_sid( const char *prefix, data_size_t size )
1055 const struct sid *sid = cur_data;
1056 if (size) dump_inline_sid( prefix, sid, size );
1057 remove_data( size );
1060 static void dump_varargs_sids( const char *prefix, data_size_t size )
1062 const struct sid *sid = cur_data;
1063 data_size_t len = size;
1065 fprintf( stderr,"%s{", prefix );
1066 while (len > 0)
1068 if (!sid_valid_size( sid, len ))
1070 fprintf( stderr, "bad len %u", len);
1071 break;
1073 dump_inline_sid( "", sid, size );
1074 len -= sid_len( sid );
1075 sid = (const struct sid *)((const char *)sid + sid_len( sid ));
1076 if (len) fputc( ',', stderr );
1078 fputc( '}', stderr );
1079 remove_data( size );
1082 static void dump_inline_acl( const char *prefix, const struct acl *acl, data_size_t size )
1084 const struct ace *ace;
1085 ULONG i;
1087 fprintf( stderr,"%s{", prefix );
1088 if (size)
1090 if (size < sizeof(*acl))
1092 fprintf( stderr, "<invalid acl>}" );
1093 return;
1095 size -= sizeof(*acl);
1096 for (i = 0, ace = ace_first( acl ); i < acl->count; i++, ace = ace_next( ace ))
1098 const struct sid *sid = (const struct sid *)(ace + 1);
1099 data_size_t sid_size;
1101 if (size < sizeof(*ace) || size < ace->size) break;
1102 size -= ace->size;
1103 sid_size = ace->size - sizeof(*ace);
1104 if (i != 0) fputc( ',', stderr );
1105 fprintf( stderr, "{type=" );
1106 switch (ace->type)
1108 case ACCESS_DENIED_ACE_TYPE: fprintf( stderr, "ACCESS_DENIED" ); break;
1109 case ACCESS_ALLOWED_ACE_TYPE: fprintf( stderr, "ACCESS_ALLOWED" ); break;
1110 case SYSTEM_AUDIT_ACE_TYPE: fprintf( stderr, "SYSTEM_AUDIT" ); break;
1111 case SYSTEM_ALARM_ACE_TYPE: fprintf( stderr, "SYSTEM_ALARM" ); break;
1112 case SYSTEM_MANDATORY_LABEL_ACE_TYPE: fprintf( stderr, "SYSTEM_MANDATORY_LABEL" ); break;
1113 default:
1114 fprintf( stderr, "%02x", ace->type );
1115 sid = NULL;
1116 break;
1118 fprintf( stderr, ",flags=%x,mask=%x", ace->flags, ace->mask );
1119 if (sid) dump_inline_sid( ",sid=", sid, sid_size );
1120 fputc( '}', stderr );
1123 fputc( '}', stderr );
1126 static void dump_varargs_acl( const char *prefix, data_size_t size )
1128 const struct acl *acl = cur_data;
1129 dump_inline_acl( prefix, acl, size );
1130 remove_data( size );
1133 static void dump_inline_security_descriptor( const char *prefix, const struct security_descriptor *sd, data_size_t size )
1135 fprintf( stderr,"%s{", prefix );
1136 if (size >= sizeof(struct security_descriptor))
1138 size_t offset = sizeof(struct security_descriptor);
1139 fprintf( stderr, "control=%08x", sd->control );
1140 if ((sd->owner_len > offsetof(struct sid, sub_auth[255])) || (offset + sd->owner_len > size))
1141 return;
1142 if (sd->owner_len)
1143 dump_inline_sid( ",owner=", (const struct sid *)((const char *)sd + offset), sd->owner_len );
1144 else
1145 fprintf( stderr, ",owner=<not present>" );
1146 offset += sd->owner_len;
1147 if ((sd->group_len > offsetof(struct sid, sub_auth[255])) || (offset + sd->group_len > size))
1148 return;
1149 if (sd->group_len)
1150 dump_inline_sid( ",group=", (const struct sid *)((const char *)sd + offset), sd->group_len );
1151 else
1152 fprintf( stderr, ",group=<not present>" );
1153 offset += sd->group_len;
1154 if ((sd->sacl_len >= MAX_ACL_LEN) || (offset + sd->sacl_len > size))
1155 return;
1156 dump_inline_acl( ",sacl=", (const struct acl *)((const char *)sd + offset), sd->sacl_len );
1157 offset += sd->sacl_len;
1158 if ((sd->dacl_len >= MAX_ACL_LEN) || (offset + sd->dacl_len > size))
1159 return;
1160 dump_inline_acl( ",dacl=", (const struct acl *)((const char *)sd + offset), sd->dacl_len );
1161 offset += sd->dacl_len;
1163 fputc( '}', stderr );
1166 static void dump_varargs_security_descriptor( const char *prefix, data_size_t size )
1168 const struct security_descriptor *sd = cur_data;
1169 dump_inline_security_descriptor( prefix, sd, size );
1170 remove_data( size );
1173 static void dump_varargs_process_info( const char *prefix, data_size_t size )
1175 data_size_t pos = 0;
1176 unsigned int i;
1178 fprintf( stderr,"%s{", prefix );
1180 while (size - pos >= sizeof(struct process_info))
1182 const struct process_info *process;
1183 pos = (pos + 7) & ~7;
1184 process = (const struct process_info *)((const char *)cur_data + pos);
1185 if (size - pos < sizeof(*process)) break;
1186 if (pos) fputc( ',', stderr );
1187 dump_timeout( "{start_time=", &process->start_time );
1188 fprintf( stderr, ",thread_count=%u,priority=%d,pid=%04x,parent_pid=%04x,session_id=%08x,handle_count=%u,unix_pid=%d,",
1189 process->thread_count, process->priority, process->pid,
1190 process->parent_pid, process->session_id, process->handle_count, process->unix_pid );
1191 pos += sizeof(*process);
1193 pos = dump_inline_unicode_string( "name=L\"", pos, process->name_len, size );
1195 pos = (pos + 7) & ~7;
1196 fprintf( stderr, "\",threads={" );
1197 for (i = 0; i < process->thread_count; i++)
1199 const struct thread_info *thread = (const struct thread_info *)((const char *)cur_data + pos);
1200 if (size - pos < sizeof(*thread)) break;
1201 if (i) fputc( ',', stderr );
1202 dump_timeout( "{start_time=", &thread->start_time );
1203 fprintf( stderr, ",tid=%04x,base_priority=%d,current_priority=%d,unix_tid=%d}",
1204 thread->tid, thread->base_priority, thread->current_priority, thread->unix_tid );
1205 pos += sizeof(*thread);
1207 fprintf( stderr, "}}" );
1209 fputc( '}', stderr );
1210 remove_data( size );
1213 static void dump_varargs_object_attributes( const char *prefix, data_size_t size )
1215 const struct object_attributes *objattr = cur_data;
1217 fprintf( stderr,"%s{", prefix );
1218 if (size)
1220 const WCHAR *str;
1222 if (size < sizeof(*objattr) ||
1223 (size - sizeof(*objattr) < objattr->sd_len) ||
1224 (size - sizeof(*objattr) - objattr->sd_len < objattr->name_len))
1226 fprintf( stderr, "***invalid***}" );
1227 remove_data( size );
1228 return;
1231 fprintf( stderr, "rootdir=%04x,attributes=%08x", objattr->rootdir, objattr->attributes );
1232 dump_inline_security_descriptor( ",sd=", (const struct security_descriptor *)(objattr + 1), objattr->sd_len );
1233 str = (const WCHAR *)objattr + (sizeof(*objattr) + objattr->sd_len) / sizeof(WCHAR);
1234 fprintf( stderr, ",name=L\"" );
1235 dump_strW( str, objattr->name_len, stderr, "\"\"" );
1236 fputc( '\"', stderr );
1237 remove_data( (sizeof(*objattr) + (objattr->sd_len & ~1) + (objattr->name_len & ~1) + 3) & ~3 );
1239 fputc( '}', stderr );
1242 static void dump_varargs_object_type_info( const char *prefix, data_size_t size )
1244 const struct object_type_info *info = cur_data;
1246 fprintf( stderr,"%s{", prefix );
1247 if (size)
1249 if (size < sizeof(*info) || (size - sizeof(*info) < info->name_len))
1251 fprintf( stderr, "***invalid***}" );
1252 remove_data( size );
1253 return;
1256 fprintf( stderr, "index=%u,obj_count=%u,handle_count=%u,obj_max=%u,handle_max=%u,valid=%08x",
1257 info->index,info->obj_count, info->handle_count, info->obj_max, info->handle_max,
1258 info->valid_access );
1259 dump_generic_map( ",access=", &info->mapping );
1260 fprintf( stderr, ",name=L\"" );
1261 dump_strW( (const WCHAR *)(info + 1), info->name_len, stderr, "\"\"" );
1262 fputc( '\"', stderr );
1263 remove_data( min( size, sizeof(*info) + ((info->name_len + 2) & ~3 )));
1265 fputc( '}', stderr );
1268 static void dump_varargs_object_types_info( const char *prefix, data_size_t size )
1270 fprintf( stderr,"%s{", prefix );
1271 while (cur_size) dump_varargs_object_type_info( ",", cur_size );
1272 fputc( '}', stderr );
1275 static void dump_varargs_filesystem_event( const char *prefix, data_size_t size )
1277 static const char * const actions[] = {
1278 NULL,
1279 "ADDED",
1280 "REMOVED",
1281 "MODIFIED",
1282 "RENAMED_OLD_NAME",
1283 "RENAMED_NEW_NAME",
1284 "ADDED_STREAM",
1285 "REMOVED_STREAM",
1286 "MODIFIED_STREAM"
1289 fprintf( stderr,"%s{", prefix );
1290 while (size)
1292 const struct filesystem_event *event = cur_data;
1293 data_size_t len = (offsetof( struct filesystem_event, name[event->len] ) + sizeof(int)-1)
1294 / sizeof(int) * sizeof(int);
1295 if (size < len) break;
1296 if (event->action < ARRAY_SIZE( actions ) && actions[event->action])
1297 fprintf( stderr, "{action=%s", actions[event->action] );
1298 else
1299 fprintf( stderr, "{action=%u", event->action );
1300 fprintf( stderr, ",name=\"%.*s\"}", event->len, event->name );
1301 size -= len;
1302 remove_data( len );
1303 if (size)fputc( ',', stderr );
1305 fputc( '}', stderr );
1308 static void dump_varargs_pe_image_info( const char *prefix, data_size_t size )
1310 pe_image_info_t info;
1312 if (!size)
1314 fprintf( stderr, "%s{}", prefix );
1315 return;
1317 memset( &info, 0, sizeof(info) );
1318 memcpy( &info, cur_data, min( size, sizeof(info) ));
1320 fprintf( stderr, "%s{", prefix );
1321 dump_uint64( "base=", &info.base );
1322 dump_uint64( ",stack_size=", &info.stack_size );
1323 dump_uint64( ",stack_commit=", &info.stack_commit );
1324 fprintf( stderr, ",entry_point=%08x,map_size=%08x,zerobits=%08x,subsystem=%08x,subsystem_minor=%04x,subsystem_major=%04x"
1325 ",osversion_major=%04x,osversion_minor=%04x,image_charact=%04x,dll_charact=%04x,machine=%04x"
1326 ",contains_code=%u,image_flags=%02x"
1327 ",loader_flags=%08x,header_size=%08x,file_size=%08x,checksum=%08x}",
1328 info.entry_point, info.map_size, info.zerobits, info.subsystem, info.subsystem_minor,
1329 info.subsystem_major, info.osversion_major, info.osversion_minor, info.image_charact,
1330 info.dll_charact, info.machine, info.contains_code, info.image_flags, info.loader_flags,
1331 info.header_size, info.file_size, info.checksum );
1332 remove_data( min( size, sizeof(info) ));
1335 static void dump_varargs_rawinput_devices(const char *prefix, data_size_t size )
1337 const struct rawinput_device *device;
1339 fprintf( stderr, "%s{", prefix );
1340 while (size >= sizeof(*device))
1342 device = cur_data;
1343 fprintf( stderr, "{usage_page=%04x,usage=%04x,flags=%08x,target=%08x}",
1344 device->usage_page, device->usage, device->flags, device->target );
1345 size -= sizeof(*device);
1346 remove_data( sizeof(*device) );
1347 if (size) fputc( ',', stderr );
1349 fputc( '}', stderr );
1352 static void dump_varargs_handle_infos( const char *prefix, data_size_t size )
1354 const struct handle_info *handle;
1356 fprintf( stderr, "%s{", prefix );
1357 while (size >= sizeof(*handle))
1359 handle = cur_data;
1360 fprintf( stderr, "{owner=%04x,handle=%04x,access=%08x,attributes=%08x,type=%u}",
1361 handle->owner, handle->handle, handle->access, handle->attributes, handle->type );
1362 size -= sizeof(*handle);
1363 remove_data( sizeof(*handle) );
1364 if (size) fputc( ',', stderr );
1366 fputc( '}', stderr );
1369 typedef void (*dump_func)( const void *req );
1371 /* Everything below this line is generated automatically by tools/make_requests */
1372 /* ### make_requests begin ### */
1374 static void dump_new_process_request( const struct new_process_request *req )
1376 fprintf( stderr, " token=%04x", req->token );
1377 fprintf( stderr, ", debug=%04x", req->debug );
1378 fprintf( stderr, ", parent_process=%04x", req->parent_process );
1379 fprintf( stderr, ", flags=%08x", req->flags );
1380 fprintf( stderr, ", socket_fd=%d", req->socket_fd );
1381 fprintf( stderr, ", access=%08x", req->access );
1382 fprintf( stderr, ", machine=%04x", req->machine );
1383 fprintf( stderr, ", info_size=%u", req->info_size );
1384 fprintf( stderr, ", handles_size=%u", req->handles_size );
1385 fprintf( stderr, ", jobs_size=%u", req->jobs_size );
1386 dump_varargs_object_attributes( ", objattr=", cur_size );
1387 dump_varargs_uints( ", handles=", min(cur_size,req->handles_size) );
1388 dump_varargs_uints( ", jobs=", min(cur_size,req->jobs_size) );
1389 dump_varargs_startup_info( ", info=", min(cur_size,req->info_size) );
1390 dump_varargs_unicode_str( ", env=", cur_size );
1393 static void dump_new_process_reply( const struct new_process_reply *req )
1395 fprintf( stderr, " info=%04x", req->info );
1396 fprintf( stderr, ", pid=%04x", req->pid );
1397 fprintf( stderr, ", handle=%04x", req->handle );
1400 static void dump_get_new_process_info_request( const struct get_new_process_info_request *req )
1402 fprintf( stderr, " info=%04x", req->info );
1405 static void dump_get_new_process_info_reply( const struct get_new_process_info_reply *req )
1407 fprintf( stderr, " success=%d", req->success );
1408 fprintf( stderr, ", exit_code=%d", req->exit_code );
1411 static void dump_new_thread_request( const struct new_thread_request *req )
1413 fprintf( stderr, " process=%04x", req->process );
1414 fprintf( stderr, ", access=%08x", req->access );
1415 fprintf( stderr, ", flags=%08x", req->flags );
1416 fprintf( stderr, ", request_fd=%d", req->request_fd );
1417 dump_varargs_object_attributes( ", objattr=", cur_size );
1420 static void dump_new_thread_reply( const struct new_thread_reply *req )
1422 fprintf( stderr, " tid=%04x", req->tid );
1423 fprintf( stderr, ", handle=%04x", req->handle );
1426 static void dump_get_startup_info_request( const struct get_startup_info_request *req )
1430 static void dump_get_startup_info_reply( const struct get_startup_info_reply *req )
1432 fprintf( stderr, " info_size=%u", req->info_size );
1433 dump_varargs_startup_info( ", info=", min(cur_size,req->info_size) );
1434 dump_varargs_unicode_str( ", env=", cur_size );
1437 static void dump_init_process_done_request( const struct init_process_done_request *req )
1439 dump_uint64( " teb=", &req->teb );
1440 dump_uint64( ", peb=", &req->peb );
1441 dump_uint64( ", ldt_copy=", &req->ldt_copy );
1444 static void dump_init_process_done_reply( const struct init_process_done_reply *req )
1446 dump_uint64( " entry=", &req->entry );
1447 fprintf( stderr, ", suspend=%d", req->suspend );
1450 static void dump_init_first_thread_request( const struct init_first_thread_request *req )
1452 fprintf( stderr, " unix_pid=%d", req->unix_pid );
1453 fprintf( stderr, ", unix_tid=%d", req->unix_tid );
1454 fprintf( stderr, ", debug_level=%d", req->debug_level );
1455 fprintf( stderr, ", reply_fd=%d", req->reply_fd );
1456 fprintf( stderr, ", wait_fd=%d", req->wait_fd );
1459 static void dump_init_first_thread_reply( const struct init_first_thread_reply *req )
1461 fprintf( stderr, " pid=%04x", req->pid );
1462 fprintf( stderr, ", tid=%04x", req->tid );
1463 dump_timeout( ", server_start=", &req->server_start );
1464 fprintf( stderr, ", session_id=%08x", req->session_id );
1465 fprintf( stderr, ", info_size=%u", req->info_size );
1466 dump_varargs_ushorts( ", machines=", cur_size );
1469 static void dump_init_thread_request( const struct init_thread_request *req )
1471 fprintf( stderr, " unix_tid=%d", req->unix_tid );
1472 fprintf( stderr, ", reply_fd=%d", req->reply_fd );
1473 fprintf( stderr, ", wait_fd=%d", req->wait_fd );
1474 dump_uint64( ", teb=", &req->teb );
1475 dump_uint64( ", entry=", &req->entry );
1478 static void dump_init_thread_reply( const struct init_thread_reply *req )
1480 fprintf( stderr, " suspend=%d", req->suspend );
1483 static void dump_terminate_process_request( const struct terminate_process_request *req )
1485 fprintf( stderr, " handle=%04x", req->handle );
1486 fprintf( stderr, ", exit_code=%d", req->exit_code );
1489 static void dump_terminate_process_reply( const struct terminate_process_reply *req )
1491 fprintf( stderr, " self=%d", req->self );
1494 static void dump_terminate_thread_request( const struct terminate_thread_request *req )
1496 fprintf( stderr, " handle=%04x", req->handle );
1497 fprintf( stderr, ", exit_code=%d", req->exit_code );
1500 static void dump_terminate_thread_reply( const struct terminate_thread_reply *req )
1502 fprintf( stderr, " self=%d", req->self );
1505 static void dump_get_process_info_request( const struct get_process_info_request *req )
1507 fprintf( stderr, " handle=%04x", req->handle );
1510 static void dump_get_process_info_reply( const struct get_process_info_reply *req )
1512 fprintf( stderr, " pid=%04x", req->pid );
1513 fprintf( stderr, ", ppid=%04x", req->ppid );
1514 dump_uint64( ", affinity=", &req->affinity );
1515 dump_uint64( ", peb=", &req->peb );
1516 dump_timeout( ", start_time=", &req->start_time );
1517 dump_timeout( ", end_time=", &req->end_time );
1518 fprintf( stderr, ", session_id=%08x", req->session_id );
1519 fprintf( stderr, ", exit_code=%d", req->exit_code );
1520 fprintf( stderr, ", priority=%d", req->priority );
1521 fprintf( stderr, ", machine=%04x", req->machine );
1522 dump_varargs_pe_image_info( ", image=", cur_size );
1525 static void dump_get_process_debug_info_request( const struct get_process_debug_info_request *req )
1527 fprintf( stderr, " handle=%04x", req->handle );
1530 static void dump_get_process_debug_info_reply( const struct get_process_debug_info_reply *req )
1532 fprintf( stderr, " debug=%04x", req->debug );
1533 fprintf( stderr, ", debug_children=%d", req->debug_children );
1534 dump_varargs_pe_image_info( ", image=", cur_size );
1537 static void dump_get_process_image_name_request( const struct get_process_image_name_request *req )
1539 fprintf( stderr, " handle=%04x", req->handle );
1540 fprintf( stderr, ", win32=%d", req->win32 );
1543 static void dump_get_process_image_name_reply( const struct get_process_image_name_reply *req )
1545 fprintf( stderr, " len=%u", req->len );
1546 dump_varargs_unicode_str( ", name=", cur_size );
1549 static void dump_get_process_vm_counters_request( const struct get_process_vm_counters_request *req )
1551 fprintf( stderr, " handle=%04x", req->handle );
1554 static void dump_get_process_vm_counters_reply( const struct get_process_vm_counters_reply *req )
1556 dump_uint64( " peak_virtual_size=", &req->peak_virtual_size );
1557 dump_uint64( ", virtual_size=", &req->virtual_size );
1558 dump_uint64( ", peak_working_set_size=", &req->peak_working_set_size );
1559 dump_uint64( ", working_set_size=", &req->working_set_size );
1560 dump_uint64( ", pagefile_usage=", &req->pagefile_usage );
1561 dump_uint64( ", peak_pagefile_usage=", &req->peak_pagefile_usage );
1564 static void dump_set_process_info_request( const struct set_process_info_request *req )
1566 fprintf( stderr, " handle=%04x", req->handle );
1567 fprintf( stderr, ", mask=%d", req->mask );
1568 fprintf( stderr, ", priority=%d", req->priority );
1569 dump_uint64( ", affinity=", &req->affinity );
1572 static void dump_get_thread_info_request( const struct get_thread_info_request *req )
1574 fprintf( stderr, " handle=%04x", req->handle );
1575 fprintf( stderr, ", access=%08x", req->access );
1578 static void dump_get_thread_info_reply( const struct get_thread_info_reply *req )
1580 fprintf( stderr, " pid=%04x", req->pid );
1581 fprintf( stderr, ", tid=%04x", req->tid );
1582 dump_uint64( ", teb=", &req->teb );
1583 dump_uint64( ", entry_point=", &req->entry_point );
1584 dump_uint64( ", affinity=", &req->affinity );
1585 fprintf( stderr, ", exit_code=%d", req->exit_code );
1586 fprintf( stderr, ", priority=%d", req->priority );
1587 fprintf( stderr, ", last=%d", req->last );
1588 fprintf( stderr, ", suspend_count=%d", req->suspend_count );
1589 fprintf( stderr, ", dbg_hidden=%d", req->dbg_hidden );
1590 fprintf( stderr, ", desc_len=%u", req->desc_len );
1591 dump_varargs_unicode_str( ", desc=", cur_size );
1594 static void dump_get_thread_times_request( const struct get_thread_times_request *req )
1596 fprintf( stderr, " handle=%04x", req->handle );
1599 static void dump_get_thread_times_reply( const struct get_thread_times_reply *req )
1601 dump_timeout( " creation_time=", &req->creation_time );
1602 dump_timeout( ", exit_time=", &req->exit_time );
1603 fprintf( stderr, ", unix_pid=%d", req->unix_pid );
1604 fprintf( stderr, ", unix_tid=%d", req->unix_tid );
1607 static void dump_set_thread_info_request( const struct set_thread_info_request *req )
1609 fprintf( stderr, " handle=%04x", req->handle );
1610 fprintf( stderr, ", mask=%d", req->mask );
1611 fprintf( stderr, ", priority=%d", req->priority );
1612 dump_uint64( ", affinity=", &req->affinity );
1613 dump_uint64( ", entry_point=", &req->entry_point );
1614 fprintf( stderr, ", token=%04x", req->token );
1615 dump_varargs_unicode_str( ", desc=", cur_size );
1618 static void dump_suspend_thread_request( const struct suspend_thread_request *req )
1620 fprintf( stderr, " handle=%04x", req->handle );
1623 static void dump_suspend_thread_reply( const struct suspend_thread_reply *req )
1625 fprintf( stderr, " count=%d", req->count );
1628 static void dump_resume_thread_request( const struct resume_thread_request *req )
1630 fprintf( stderr, " handle=%04x", req->handle );
1633 static void dump_resume_thread_reply( const struct resume_thread_reply *req )
1635 fprintf( stderr, " count=%d", req->count );
1638 static void dump_queue_apc_request( const struct queue_apc_request *req )
1640 fprintf( stderr, " handle=%04x", req->handle );
1641 dump_apc_call( ", call=", &req->call );
1644 static void dump_queue_apc_reply( const struct queue_apc_reply *req )
1646 fprintf( stderr, " handle=%04x", req->handle );
1647 fprintf( stderr, ", self=%d", req->self );
1650 static void dump_get_apc_result_request( const struct get_apc_result_request *req )
1652 fprintf( stderr, " handle=%04x", req->handle );
1655 static void dump_get_apc_result_reply( const struct get_apc_result_reply *req )
1657 dump_apc_result( " result=", &req->result );
1660 static void dump_close_handle_request( const struct close_handle_request *req )
1662 fprintf( stderr, " handle=%04x", req->handle );
1665 static void dump_set_handle_info_request( const struct set_handle_info_request *req )
1667 fprintf( stderr, " handle=%04x", req->handle );
1668 fprintf( stderr, ", flags=%d", req->flags );
1669 fprintf( stderr, ", mask=%d", req->mask );
1672 static void dump_set_handle_info_reply( const struct set_handle_info_reply *req )
1674 fprintf( stderr, " old_flags=%d", req->old_flags );
1677 static void dump_dup_handle_request( const struct dup_handle_request *req )
1679 fprintf( stderr, " src_process=%04x", req->src_process );
1680 fprintf( stderr, ", src_handle=%04x", req->src_handle );
1681 fprintf( stderr, ", dst_process=%04x", req->dst_process );
1682 fprintf( stderr, ", access=%08x", req->access );
1683 fprintf( stderr, ", attributes=%08x", req->attributes );
1684 fprintf( stderr, ", options=%08x", req->options );
1687 static void dump_dup_handle_reply( const struct dup_handle_reply *req )
1689 fprintf( stderr, " handle=%04x", req->handle );
1692 static void dump_compare_objects_request( const struct compare_objects_request *req )
1694 fprintf( stderr, " first=%04x", req->first );
1695 fprintf( stderr, ", second=%04x", req->second );
1698 static void dump_make_temporary_request( const struct make_temporary_request *req )
1700 fprintf( stderr, " handle=%04x", req->handle );
1703 static void dump_open_process_request( const struct open_process_request *req )
1705 fprintf( stderr, " pid=%04x", req->pid );
1706 fprintf( stderr, ", access=%08x", req->access );
1707 fprintf( stderr, ", attributes=%08x", req->attributes );
1710 static void dump_open_process_reply( const struct open_process_reply *req )
1712 fprintf( stderr, " handle=%04x", req->handle );
1715 static void dump_open_thread_request( const struct open_thread_request *req )
1717 fprintf( stderr, " tid=%04x", req->tid );
1718 fprintf( stderr, ", access=%08x", req->access );
1719 fprintf( stderr, ", attributes=%08x", req->attributes );
1722 static void dump_open_thread_reply( const struct open_thread_reply *req )
1724 fprintf( stderr, " handle=%04x", req->handle );
1727 static void dump_select_request( const struct select_request *req )
1729 fprintf( stderr, " flags=%d", req->flags );
1730 dump_uint64( ", cookie=", &req->cookie );
1731 dump_abstime( ", timeout=", &req->timeout );
1732 fprintf( stderr, ", size=%u", req->size );
1733 fprintf( stderr, ", prev_apc=%04x", req->prev_apc );
1734 dump_varargs_apc_result( ", result=", cur_size );
1735 dump_varargs_select_op( ", data=", min(cur_size,req->size) );
1736 dump_varargs_contexts( ", contexts=", cur_size );
1739 static void dump_select_reply( const struct select_reply *req )
1741 dump_apc_call( " call=", &req->call );
1742 fprintf( stderr, ", apc_handle=%04x", req->apc_handle );
1743 fprintf( stderr, ", signaled=%d", req->signaled );
1744 dump_varargs_contexts( ", contexts=", cur_size );
1747 static void dump_create_event_request( const struct create_event_request *req )
1749 fprintf( stderr, " access=%08x", req->access );
1750 fprintf( stderr, ", manual_reset=%d", req->manual_reset );
1751 fprintf( stderr, ", initial_state=%d", req->initial_state );
1752 dump_varargs_object_attributes( ", objattr=", cur_size );
1755 static void dump_create_event_reply( const struct create_event_reply *req )
1757 fprintf( stderr, " handle=%04x", req->handle );
1760 static void dump_event_op_request( const struct event_op_request *req )
1762 fprintf( stderr, " handle=%04x", req->handle );
1763 fprintf( stderr, ", op=%d", req->op );
1766 static void dump_event_op_reply( const struct event_op_reply *req )
1768 fprintf( stderr, " state=%d", req->state );
1771 static void dump_query_event_request( const struct query_event_request *req )
1773 fprintf( stderr, " handle=%04x", req->handle );
1776 static void dump_query_event_reply( const struct query_event_reply *req )
1778 fprintf( stderr, " manual_reset=%d", req->manual_reset );
1779 fprintf( stderr, ", state=%d", req->state );
1782 static void dump_open_event_request( const struct open_event_request *req )
1784 fprintf( stderr, " access=%08x", req->access );
1785 fprintf( stderr, ", attributes=%08x", req->attributes );
1786 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1787 dump_varargs_unicode_str( ", name=", cur_size );
1790 static void dump_open_event_reply( const struct open_event_reply *req )
1792 fprintf( stderr, " handle=%04x", req->handle );
1795 static void dump_create_keyed_event_request( const struct create_keyed_event_request *req )
1797 fprintf( stderr, " access=%08x", req->access );
1798 dump_varargs_object_attributes( ", objattr=", cur_size );
1801 static void dump_create_keyed_event_reply( const struct create_keyed_event_reply *req )
1803 fprintf( stderr, " handle=%04x", req->handle );
1806 static void dump_open_keyed_event_request( const struct open_keyed_event_request *req )
1808 fprintf( stderr, " access=%08x", req->access );
1809 fprintf( stderr, ", attributes=%08x", req->attributes );
1810 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1811 dump_varargs_unicode_str( ", name=", cur_size );
1814 static void dump_open_keyed_event_reply( const struct open_keyed_event_reply *req )
1816 fprintf( stderr, " handle=%04x", req->handle );
1819 static void dump_create_mutex_request( const struct create_mutex_request *req )
1821 fprintf( stderr, " access=%08x", req->access );
1822 fprintf( stderr, ", owned=%d", req->owned );
1823 dump_varargs_object_attributes( ", objattr=", cur_size );
1826 static void dump_create_mutex_reply( const struct create_mutex_reply *req )
1828 fprintf( stderr, " handle=%04x", req->handle );
1831 static void dump_release_mutex_request( const struct release_mutex_request *req )
1833 fprintf( stderr, " handle=%04x", req->handle );
1836 static void dump_release_mutex_reply( const struct release_mutex_reply *req )
1838 fprintf( stderr, " prev_count=%08x", req->prev_count );
1841 static void dump_open_mutex_request( const struct open_mutex_request *req )
1843 fprintf( stderr, " access=%08x", req->access );
1844 fprintf( stderr, ", attributes=%08x", req->attributes );
1845 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1846 dump_varargs_unicode_str( ", name=", cur_size );
1849 static void dump_open_mutex_reply( const struct open_mutex_reply *req )
1851 fprintf( stderr, " handle=%04x", req->handle );
1854 static void dump_query_mutex_request( const struct query_mutex_request *req )
1856 fprintf( stderr, " handle=%04x", req->handle );
1859 static void dump_query_mutex_reply( const struct query_mutex_reply *req )
1861 fprintf( stderr, " count=%08x", req->count );
1862 fprintf( stderr, ", owned=%d", req->owned );
1863 fprintf( stderr, ", abandoned=%d", req->abandoned );
1866 static void dump_create_semaphore_request( const struct create_semaphore_request *req )
1868 fprintf( stderr, " access=%08x", req->access );
1869 fprintf( stderr, ", initial=%08x", req->initial );
1870 fprintf( stderr, ", max=%08x", req->max );
1871 dump_varargs_object_attributes( ", objattr=", cur_size );
1874 static void dump_create_semaphore_reply( const struct create_semaphore_reply *req )
1876 fprintf( stderr, " handle=%04x", req->handle );
1879 static void dump_release_semaphore_request( const struct release_semaphore_request *req )
1881 fprintf( stderr, " handle=%04x", req->handle );
1882 fprintf( stderr, ", count=%08x", req->count );
1885 static void dump_release_semaphore_reply( const struct release_semaphore_reply *req )
1887 fprintf( stderr, " prev_count=%08x", req->prev_count );
1890 static void dump_query_semaphore_request( const struct query_semaphore_request *req )
1892 fprintf( stderr, " handle=%04x", req->handle );
1895 static void dump_query_semaphore_reply( const struct query_semaphore_reply *req )
1897 fprintf( stderr, " current=%08x", req->current );
1898 fprintf( stderr, ", max=%08x", req->max );
1901 static void dump_open_semaphore_request( const struct open_semaphore_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_semaphore_reply( const struct open_semaphore_reply *req )
1911 fprintf( stderr, " handle=%04x", req->handle );
1914 static void dump_create_file_request( const struct create_file_request *req )
1916 fprintf( stderr, " access=%08x", req->access );
1917 fprintf( stderr, ", sharing=%08x", req->sharing );
1918 fprintf( stderr, ", create=%d", req->create );
1919 fprintf( stderr, ", options=%08x", req->options );
1920 fprintf( stderr, ", attrs=%08x", req->attrs );
1921 dump_varargs_object_attributes( ", objattr=", cur_size );
1922 dump_varargs_string( ", filename=", cur_size );
1925 static void dump_create_file_reply( const struct create_file_reply *req )
1927 fprintf( stderr, " handle=%04x", req->handle );
1930 static void dump_open_file_object_request( const struct open_file_object_request *req )
1932 fprintf( stderr, " access=%08x", req->access );
1933 fprintf( stderr, ", attributes=%08x", req->attributes );
1934 fprintf( stderr, ", rootdir=%04x", req->rootdir );
1935 fprintf( stderr, ", sharing=%08x", req->sharing );
1936 fprintf( stderr, ", options=%08x", req->options );
1937 dump_varargs_unicode_str( ", filename=", cur_size );
1940 static void dump_open_file_object_reply( const struct open_file_object_reply *req )
1942 fprintf( stderr, " handle=%04x", req->handle );
1945 static void dump_alloc_file_handle_request( const struct alloc_file_handle_request *req )
1947 fprintf( stderr, " access=%08x", req->access );
1948 fprintf( stderr, ", attributes=%08x", req->attributes );
1949 fprintf( stderr, ", fd=%d", req->fd );
1952 static void dump_alloc_file_handle_reply( const struct alloc_file_handle_reply *req )
1954 fprintf( stderr, " handle=%04x", req->handle );
1957 static void dump_get_handle_unix_name_request( const struct get_handle_unix_name_request *req )
1959 fprintf( stderr, " handle=%04x", req->handle );
1962 static void dump_get_handle_unix_name_reply( const struct get_handle_unix_name_reply *req )
1964 fprintf( stderr, " name_len=%u", req->name_len );
1965 dump_varargs_string( ", name=", cur_size );
1968 static void dump_get_handle_fd_request( const struct get_handle_fd_request *req )
1970 fprintf( stderr, " handle=%04x", req->handle );
1973 static void dump_get_handle_fd_reply( const struct get_handle_fd_reply *req )
1975 fprintf( stderr, " type=%d", req->type );
1976 fprintf( stderr, ", cacheable=%d", req->cacheable );
1977 fprintf( stderr, ", access=%08x", req->access );
1978 fprintf( stderr, ", options=%08x", req->options );
1981 static void dump_get_directory_cache_entry_request( const struct get_directory_cache_entry_request *req )
1983 fprintf( stderr, " handle=%04x", req->handle );
1986 static void dump_get_directory_cache_entry_reply( const struct get_directory_cache_entry_reply *req )
1988 fprintf( stderr, " entry=%d", req->entry );
1989 dump_varargs_ints( ", free=", cur_size );
1992 static void dump_flush_request( const struct flush_request *req )
1994 dump_async_data( " async=", &req->async );
1997 static void dump_flush_reply( const struct flush_reply *req )
1999 fprintf( stderr, " event=%04x", req->event );
2002 static void dump_get_file_info_request( const struct get_file_info_request *req )
2004 fprintf( stderr, " handle=%04x", req->handle );
2005 fprintf( stderr, ", info_class=%08x", req->info_class );
2008 static void dump_get_file_info_reply( const struct get_file_info_reply *req )
2010 dump_varargs_bytes( " data=", cur_size );
2013 static void dump_get_volume_info_request( const struct get_volume_info_request *req )
2015 fprintf( stderr, " handle=%04x", req->handle );
2016 dump_async_data( ", async=", &req->async );
2017 fprintf( stderr, ", info_class=%08x", req->info_class );
2020 static void dump_get_volume_info_reply( const struct get_volume_info_reply *req )
2022 fprintf( stderr, " wait=%04x", req->wait );
2023 dump_varargs_bytes( ", data=", cur_size );
2026 static void dump_lock_file_request( const struct lock_file_request *req )
2028 fprintf( stderr, " handle=%04x", req->handle );
2029 dump_uint64( ", offset=", &req->offset );
2030 dump_uint64( ", count=", &req->count );
2031 fprintf( stderr, ", shared=%d", req->shared );
2032 fprintf( stderr, ", wait=%d", req->wait );
2035 static void dump_lock_file_reply( const struct lock_file_reply *req )
2037 fprintf( stderr, " handle=%04x", req->handle );
2038 fprintf( stderr, ", overlapped=%d", req->overlapped );
2041 static void dump_unlock_file_request( const struct unlock_file_request *req )
2043 fprintf( stderr, " handle=%04x", req->handle );
2044 dump_uint64( ", offset=", &req->offset );
2045 dump_uint64( ", count=", &req->count );
2048 static void dump_recv_socket_request( const struct recv_socket_request *req )
2050 fprintf( stderr, " oob=%d", req->oob );
2051 dump_async_data( ", async=", &req->async );
2052 fprintf( stderr, ", force_async=%d", req->force_async );
2055 static void dump_recv_socket_reply( const struct recv_socket_reply *req )
2057 fprintf( stderr, " wait=%04x", req->wait );
2058 fprintf( stderr, ", options=%08x", req->options );
2059 fprintf( stderr, ", nonblocking=%d", req->nonblocking );
2062 static void dump_send_socket_request( const struct send_socket_request *req )
2064 dump_async_data( " async=", &req->async );
2065 fprintf( stderr, ", force_async=%d", req->force_async );
2068 static void dump_send_socket_reply( const struct send_socket_reply *req )
2070 fprintf( stderr, " wait=%04x", req->wait );
2071 fprintf( stderr, ", options=%08x", req->options );
2072 fprintf( stderr, ", nonblocking=%d", req->nonblocking );
2075 static void dump_socket_send_icmp_id_request( const struct socket_send_icmp_id_request *req )
2077 fprintf( stderr, " handle=%04x", req->handle );
2078 fprintf( stderr, ", icmp_id=%04x", req->icmp_id );
2079 fprintf( stderr, ", icmp_seq=%04x", req->icmp_seq );
2082 static void dump_socket_get_icmp_id_request( const struct socket_get_icmp_id_request *req )
2084 fprintf( stderr, " handle=%04x", req->handle );
2085 fprintf( stderr, ", icmp_seq=%04x", req->icmp_seq );
2088 static void dump_socket_get_icmp_id_reply( const struct socket_get_icmp_id_reply *req )
2090 fprintf( stderr, " icmp_id=%04x", req->icmp_id );
2093 static void dump_get_next_console_request_request( const struct get_next_console_request_request *req )
2095 fprintf( stderr, " handle=%04x", req->handle );
2096 fprintf( stderr, ", signal=%d", req->signal );
2097 fprintf( stderr, ", read=%d", req->read );
2098 fprintf( stderr, ", status=%08x", req->status );
2099 dump_varargs_bytes( ", out_data=", cur_size );
2102 static void dump_get_next_console_request_reply( const struct get_next_console_request_reply *req )
2104 fprintf( stderr, " code=%08x", req->code );
2105 fprintf( stderr, ", output=%08x", req->output );
2106 fprintf( stderr, ", out_size=%u", req->out_size );
2107 dump_varargs_bytes( ", in_data=", cur_size );
2110 static void dump_read_directory_changes_request( const struct read_directory_changes_request *req )
2112 fprintf( stderr, " filter=%08x", req->filter );
2113 fprintf( stderr, ", subtree=%d", req->subtree );
2114 fprintf( stderr, ", want_data=%d", req->want_data );
2115 dump_async_data( ", async=", &req->async );
2118 static void dump_read_change_request( const struct read_change_request *req )
2120 fprintf( stderr, " handle=%04x", req->handle );
2123 static void dump_read_change_reply( const struct read_change_reply *req )
2125 dump_varargs_filesystem_event( " events=", cur_size );
2128 static void dump_create_mapping_request( const struct create_mapping_request *req )
2130 fprintf( stderr, " access=%08x", req->access );
2131 fprintf( stderr, ", flags=%08x", req->flags );
2132 fprintf( stderr, ", file_access=%08x", req->file_access );
2133 dump_uint64( ", size=", &req->size );
2134 fprintf( stderr, ", file_handle=%04x", req->file_handle );
2135 dump_varargs_object_attributes( ", objattr=", cur_size );
2138 static void dump_create_mapping_reply( const struct create_mapping_reply *req )
2140 fprintf( stderr, " handle=%04x", req->handle );
2143 static void dump_open_mapping_request( const struct open_mapping_request *req )
2145 fprintf( stderr, " access=%08x", req->access );
2146 fprintf( stderr, ", attributes=%08x", req->attributes );
2147 fprintf( stderr, ", rootdir=%04x", req->rootdir );
2148 dump_varargs_unicode_str( ", name=", cur_size );
2151 static void dump_open_mapping_reply( const struct open_mapping_reply *req )
2153 fprintf( stderr, " handle=%04x", req->handle );
2156 static void dump_get_mapping_info_request( const struct get_mapping_info_request *req )
2158 fprintf( stderr, " handle=%04x", req->handle );
2159 fprintf( stderr, ", access=%08x", req->access );
2162 static void dump_get_mapping_info_reply( const struct get_mapping_info_reply *req )
2164 dump_uint64( " size=", &req->size );
2165 fprintf( stderr, ", flags=%08x", req->flags );
2166 fprintf( stderr, ", shared_file=%04x", req->shared_file );
2167 fprintf( stderr, ", total=%u", req->total );
2168 dump_varargs_pe_image_info( ", image=", cur_size );
2169 dump_varargs_unicode_str( ", name=", cur_size );
2172 static void dump_map_view_request( const struct map_view_request *req )
2174 fprintf( stderr, " mapping=%04x", req->mapping );
2175 fprintf( stderr, ", access=%08x", req->access );
2176 dump_uint64( ", base=", &req->base );
2177 dump_uint64( ", size=", &req->size );
2178 dump_uint64( ", start=", &req->start );
2179 dump_varargs_pe_image_info( ", image=", cur_size );
2180 dump_varargs_unicode_str( ", name=", cur_size );
2183 static void dump_unmap_view_request( const struct unmap_view_request *req )
2185 dump_uint64( " base=", &req->base );
2188 static void dump_get_mapping_committed_range_request( const struct get_mapping_committed_range_request *req )
2190 dump_uint64( " base=", &req->base );
2191 dump_uint64( ", offset=", &req->offset );
2194 static void dump_get_mapping_committed_range_reply( const struct get_mapping_committed_range_reply *req )
2196 dump_uint64( " size=", &req->size );
2197 fprintf( stderr, ", committed=%d", req->committed );
2200 static void dump_add_mapping_committed_range_request( const struct add_mapping_committed_range_request *req )
2202 dump_uint64( " base=", &req->base );
2203 dump_uint64( ", offset=", &req->offset );
2204 dump_uint64( ", size=", &req->size );
2207 static void dump_is_same_mapping_request( const struct is_same_mapping_request *req )
2209 dump_uint64( " base1=", &req->base1 );
2210 dump_uint64( ", base2=", &req->base2 );
2213 static void dump_get_mapping_filename_request( const struct get_mapping_filename_request *req )
2215 fprintf( stderr, " process=%04x", req->process );
2216 dump_uint64( ", addr=", &req->addr );
2219 static void dump_get_mapping_filename_reply( const struct get_mapping_filename_reply *req )
2221 fprintf( stderr, " len=%u", req->len );
2222 dump_varargs_unicode_str( ", filename=", cur_size );
2225 static void dump_list_processes_request( const struct list_processes_request *req )
2229 static void dump_list_processes_reply( const struct list_processes_reply *req )
2231 fprintf( stderr, " info_size=%u", req->info_size );
2232 fprintf( stderr, ", process_count=%d", req->process_count );
2233 fprintf( stderr, ", total_thread_count=%d", req->total_thread_count );
2234 fprintf( stderr, ", total_name_len=%u", req->total_name_len );
2235 dump_varargs_process_info( ", data=", min(cur_size,req->info_size) );
2238 static void dump_create_debug_obj_request( const struct create_debug_obj_request *req )
2240 fprintf( stderr, " access=%08x", req->access );
2241 fprintf( stderr, ", flags=%08x", req->flags );
2242 dump_varargs_object_attributes( ", objattr=", cur_size );
2245 static void dump_create_debug_obj_reply( const struct create_debug_obj_reply *req )
2247 fprintf( stderr, " handle=%04x", req->handle );
2250 static void dump_wait_debug_event_request( const struct wait_debug_event_request *req )
2252 fprintf( stderr, " debug=%04x", req->debug );
2255 static void dump_wait_debug_event_reply( const struct wait_debug_event_reply *req )
2257 fprintf( stderr, " pid=%04x", req->pid );
2258 fprintf( stderr, ", tid=%04x", req->tid );
2259 dump_varargs_debug_event( ", event=", cur_size );
2262 static void dump_queue_exception_event_request( const struct queue_exception_event_request *req )
2264 fprintf( stderr, " first=%d", req->first );
2265 fprintf( stderr, ", code=%08x", req->code );
2266 fprintf( stderr, ", flags=%08x", req->flags );
2267 dump_uint64( ", record=", &req->record );
2268 dump_uint64( ", address=", &req->address );
2269 fprintf( stderr, ", len=%u", req->len );
2270 dump_varargs_uints64( ", params=", min(cur_size,req->len) );
2273 static void dump_queue_exception_event_reply( const struct queue_exception_event_reply *req )
2275 fprintf( stderr, " handle=%04x", req->handle );
2278 static void dump_get_exception_status_request( const struct get_exception_status_request *req )
2280 fprintf( stderr, " handle=%04x", req->handle );
2283 static void dump_continue_debug_event_request( const struct continue_debug_event_request *req )
2285 fprintf( stderr, " debug=%04x", req->debug );
2286 fprintf( stderr, ", pid=%04x", req->pid );
2287 fprintf( stderr, ", tid=%04x", req->tid );
2288 fprintf( stderr, ", status=%08x", req->status );
2291 static void dump_debug_process_request( const struct debug_process_request *req )
2293 fprintf( stderr, " handle=%04x", req->handle );
2294 fprintf( stderr, ", debug=%04x", req->debug );
2295 fprintf( stderr, ", attach=%d", req->attach );
2298 static void dump_set_debug_obj_info_request( const struct set_debug_obj_info_request *req )
2300 fprintf( stderr, " debug=%04x", req->debug );
2301 fprintf( stderr, ", flags=%08x", req->flags );
2304 static void dump_read_process_memory_request( const struct read_process_memory_request *req )
2306 fprintf( stderr, " handle=%04x", req->handle );
2307 dump_uint64( ", addr=", &req->addr );
2310 static void dump_read_process_memory_reply( const struct read_process_memory_reply *req )
2312 dump_varargs_bytes( " data=", cur_size );
2315 static void dump_write_process_memory_request( const struct write_process_memory_request *req )
2317 fprintf( stderr, " handle=%04x", req->handle );
2318 dump_uint64( ", addr=", &req->addr );
2319 dump_varargs_bytes( ", data=", cur_size );
2322 static void dump_create_key_request( const struct create_key_request *req )
2324 fprintf( stderr, " access=%08x", req->access );
2325 fprintf( stderr, ", options=%08x", req->options );
2326 dump_varargs_object_attributes( ", objattr=", cur_size );
2327 dump_varargs_unicode_str( ", class=", cur_size );
2330 static void dump_create_key_reply( const struct create_key_reply *req )
2332 fprintf( stderr, " hkey=%04x", req->hkey );
2335 static void dump_open_key_request( const struct open_key_request *req )
2337 fprintf( stderr, " parent=%04x", req->parent );
2338 fprintf( stderr, ", access=%08x", req->access );
2339 fprintf( stderr, ", attributes=%08x", req->attributes );
2340 dump_varargs_unicode_str( ", name=", cur_size );
2343 static void dump_open_key_reply( const struct open_key_reply *req )
2345 fprintf( stderr, " hkey=%04x", req->hkey );
2348 static void dump_delete_key_request( const struct delete_key_request *req )
2350 fprintf( stderr, " hkey=%04x", req->hkey );
2353 static void dump_flush_key_request( const struct flush_key_request *req )
2355 fprintf( stderr, " hkey=%04x", req->hkey );
2358 static void dump_enum_key_request( const struct enum_key_request *req )
2360 fprintf( stderr, " hkey=%04x", req->hkey );
2361 fprintf( stderr, ", index=%d", req->index );
2362 fprintf( stderr, ", info_class=%d", req->info_class );
2365 static void dump_enum_key_reply( const struct enum_key_reply *req )
2367 fprintf( stderr, " subkeys=%d", req->subkeys );
2368 fprintf( stderr, ", max_subkey=%d", req->max_subkey );
2369 fprintf( stderr, ", max_class=%d", req->max_class );
2370 fprintf( stderr, ", values=%d", req->values );
2371 fprintf( stderr, ", max_value=%d", req->max_value );
2372 fprintf( stderr, ", max_data=%d", req->max_data );
2373 dump_timeout( ", modif=", &req->modif );
2374 fprintf( stderr, ", total=%u", req->total );
2375 fprintf( stderr, ", namelen=%u", req->namelen );
2376 dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
2377 dump_varargs_unicode_str( ", class=", cur_size );
2380 static void dump_set_key_value_request( const struct set_key_value_request *req )
2382 fprintf( stderr, " hkey=%04x", req->hkey );
2383 fprintf( stderr, ", type=%d", req->type );
2384 fprintf( stderr, ", namelen=%u", req->namelen );
2385 dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
2386 dump_varargs_bytes( ", data=", cur_size );
2389 static void dump_get_key_value_request( const struct get_key_value_request *req )
2391 fprintf( stderr, " hkey=%04x", req->hkey );
2392 dump_varargs_unicode_str( ", name=", cur_size );
2395 static void dump_get_key_value_reply( const struct get_key_value_reply *req )
2397 fprintf( stderr, " type=%d", req->type );
2398 fprintf( stderr, ", total=%u", req->total );
2399 dump_varargs_bytes( ", data=", cur_size );
2402 static void dump_enum_key_value_request( const struct enum_key_value_request *req )
2404 fprintf( stderr, " hkey=%04x", req->hkey );
2405 fprintf( stderr, ", index=%d", req->index );
2406 fprintf( stderr, ", info_class=%d", req->info_class );
2409 static void dump_enum_key_value_reply( const struct enum_key_value_reply *req )
2411 fprintf( stderr, " type=%d", req->type );
2412 fprintf( stderr, ", total=%u", req->total );
2413 fprintf( stderr, ", namelen=%u", req->namelen );
2414 dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
2415 dump_varargs_bytes( ", data=", cur_size );
2418 static void dump_delete_key_value_request( const struct delete_key_value_request *req )
2420 fprintf( stderr, " hkey=%04x", req->hkey );
2421 dump_varargs_unicode_str( ", name=", cur_size );
2424 static void dump_load_registry_request( const struct load_registry_request *req )
2426 fprintf( stderr, " file=%04x", req->file );
2427 dump_varargs_object_attributes( ", objattr=", cur_size );
2430 static void dump_unload_registry_request( const struct unload_registry_request *req )
2432 fprintf( stderr, " parent=%04x", req->parent );
2433 fprintf( stderr, ", attributes=%08x", req->attributes );
2434 dump_varargs_unicode_str( ", name=", cur_size );
2437 static void dump_save_registry_request( const struct save_registry_request *req )
2439 fprintf( stderr, " hkey=%04x", req->hkey );
2440 fprintf( stderr, ", file=%04x", req->file );
2443 static void dump_set_registry_notification_request( const struct set_registry_notification_request *req )
2445 fprintf( stderr, " hkey=%04x", req->hkey );
2446 fprintf( stderr, ", event=%04x", req->event );
2447 fprintf( stderr, ", subtree=%d", req->subtree );
2448 fprintf( stderr, ", filter=%08x", req->filter );
2451 static void dump_rename_key_request( const struct rename_key_request *req )
2453 fprintf( stderr, " hkey=%04x", req->hkey );
2454 dump_varargs_unicode_str( ", name=", cur_size );
2457 static void dump_create_timer_request( const struct create_timer_request *req )
2459 fprintf( stderr, " access=%08x", req->access );
2460 fprintf( stderr, ", manual=%d", req->manual );
2461 dump_varargs_object_attributes( ", objattr=", cur_size );
2464 static void dump_create_timer_reply( const struct create_timer_reply *req )
2466 fprintf( stderr, " handle=%04x", req->handle );
2469 static void dump_open_timer_request( const struct open_timer_request *req )
2471 fprintf( stderr, " access=%08x", req->access );
2472 fprintf( stderr, ", attributes=%08x", req->attributes );
2473 fprintf( stderr, ", rootdir=%04x", req->rootdir );
2474 dump_varargs_unicode_str( ", name=", cur_size );
2477 static void dump_open_timer_reply( const struct open_timer_reply *req )
2479 fprintf( stderr, " handle=%04x", req->handle );
2482 static void dump_set_timer_request( const struct set_timer_request *req )
2484 fprintf( stderr, " handle=%04x", req->handle );
2485 dump_timeout( ", expire=", &req->expire );
2486 dump_uint64( ", callback=", &req->callback );
2487 dump_uint64( ", arg=", &req->arg );
2488 fprintf( stderr, ", period=%d", req->period );
2491 static void dump_set_timer_reply( const struct set_timer_reply *req )
2493 fprintf( stderr, " signaled=%d", req->signaled );
2496 static void dump_cancel_timer_request( const struct cancel_timer_request *req )
2498 fprintf( stderr, " handle=%04x", req->handle );
2501 static void dump_cancel_timer_reply( const struct cancel_timer_reply *req )
2503 fprintf( stderr, " signaled=%d", req->signaled );
2506 static void dump_get_timer_info_request( const struct get_timer_info_request *req )
2508 fprintf( stderr, " handle=%04x", req->handle );
2511 static void dump_get_timer_info_reply( const struct get_timer_info_reply *req )
2513 dump_timeout( " when=", &req->when );
2514 fprintf( stderr, ", signaled=%d", req->signaled );
2517 static void dump_get_thread_context_request( const struct get_thread_context_request *req )
2519 fprintf( stderr, " handle=%04x", req->handle );
2520 fprintf( stderr, ", context=%04x", req->context );
2521 fprintf( stderr, ", flags=%08x", req->flags );
2522 fprintf( stderr, ", native_flags=%08x", req->native_flags );
2523 fprintf( stderr, ", machine=%04x", req->machine );
2526 static void dump_get_thread_context_reply( const struct get_thread_context_reply *req )
2528 fprintf( stderr, " self=%d", req->self );
2529 fprintf( stderr, ", handle=%04x", req->handle );
2530 dump_varargs_contexts( ", contexts=", cur_size );
2533 static void dump_set_thread_context_request( const struct set_thread_context_request *req )
2535 fprintf( stderr, " handle=%04x", req->handle );
2536 fprintf( stderr, ", native_flags=%08x", req->native_flags );
2537 dump_varargs_contexts( ", contexts=", cur_size );
2540 static void dump_set_thread_context_reply( const struct set_thread_context_reply *req )
2542 fprintf( stderr, " self=%d", req->self );
2545 static void dump_get_selector_entry_request( const struct get_selector_entry_request *req )
2547 fprintf( stderr, " handle=%04x", req->handle );
2548 fprintf( stderr, ", entry=%d", req->entry );
2551 static void dump_get_selector_entry_reply( const struct get_selector_entry_reply *req )
2553 fprintf( stderr, " base=%08x", req->base );
2554 fprintf( stderr, ", limit=%08x", req->limit );
2555 fprintf( stderr, ", flags=%02x", req->flags );
2558 static void dump_add_atom_request( const struct add_atom_request *req )
2560 dump_varargs_unicode_str( " name=", cur_size );
2563 static void dump_add_atom_reply( const struct add_atom_reply *req )
2565 fprintf( stderr, " atom=%04x", req->atom );
2568 static void dump_delete_atom_request( const struct delete_atom_request *req )
2570 fprintf( stderr, " atom=%04x", req->atom );
2573 static void dump_find_atom_request( const struct find_atom_request *req )
2575 dump_varargs_unicode_str( " name=", cur_size );
2578 static void dump_find_atom_reply( const struct find_atom_reply *req )
2580 fprintf( stderr, " atom=%04x", req->atom );
2583 static void dump_get_atom_information_request( const struct get_atom_information_request *req )
2585 fprintf( stderr, " atom=%04x", req->atom );
2588 static void dump_get_atom_information_reply( const struct get_atom_information_reply *req )
2590 fprintf( stderr, " count=%d", req->count );
2591 fprintf( stderr, ", pinned=%d", req->pinned );
2592 fprintf( stderr, ", total=%u", req->total );
2593 dump_varargs_unicode_str( ", name=", cur_size );
2596 static void dump_get_msg_queue_request( const struct get_msg_queue_request *req )
2600 static void dump_get_msg_queue_reply( const struct get_msg_queue_reply *req )
2602 fprintf( stderr, " handle=%04x", req->handle );
2605 static void dump_set_queue_fd_request( const struct set_queue_fd_request *req )
2607 fprintf( stderr, " handle=%04x", req->handle );
2610 static void dump_set_queue_mask_request( const struct set_queue_mask_request *req )
2612 fprintf( stderr, " wake_mask=%08x", req->wake_mask );
2613 fprintf( stderr, ", changed_mask=%08x", req->changed_mask );
2614 fprintf( stderr, ", skip_wait=%d", req->skip_wait );
2617 static void dump_set_queue_mask_reply( const struct set_queue_mask_reply *req )
2619 fprintf( stderr, " wake_bits=%08x", req->wake_bits );
2620 fprintf( stderr, ", changed_bits=%08x", req->changed_bits );
2623 static void dump_get_queue_status_request( const struct get_queue_status_request *req )
2625 fprintf( stderr, " clear_bits=%08x", req->clear_bits );
2628 static void dump_get_queue_status_reply( const struct get_queue_status_reply *req )
2630 fprintf( stderr, " wake_bits=%08x", req->wake_bits );
2631 fprintf( stderr, ", changed_bits=%08x", req->changed_bits );
2634 static void dump_get_process_idle_event_request( const struct get_process_idle_event_request *req )
2636 fprintf( stderr, " handle=%04x", req->handle );
2639 static void dump_get_process_idle_event_reply( const struct get_process_idle_event_reply *req )
2641 fprintf( stderr, " event=%04x", req->event );
2644 static void dump_send_message_request( const struct send_message_request *req )
2646 fprintf( stderr, " id=%04x", req->id );
2647 fprintf( stderr, ", type=%d", req->type );
2648 fprintf( stderr, ", flags=%d", req->flags );
2649 fprintf( stderr, ", win=%08x", req->win );
2650 fprintf( stderr, ", msg=%08x", req->msg );
2651 dump_uint64( ", wparam=", &req->wparam );
2652 dump_uint64( ", lparam=", &req->lparam );
2653 dump_timeout( ", timeout=", &req->timeout );
2654 dump_varargs_message_data( ", data=", cur_size );
2657 static void dump_post_quit_message_request( const struct post_quit_message_request *req )
2659 fprintf( stderr, " exit_code=%d", req->exit_code );
2662 static void dump_send_hardware_message_request( const struct send_hardware_message_request *req )
2664 fprintf( stderr, " win=%08x", req->win );
2665 dump_hw_input( ", input=", &req->input );
2666 fprintf( stderr, ", flags=%08x", req->flags );
2667 dump_varargs_bytes( ", report=", cur_size );
2670 static void dump_send_hardware_message_reply( const struct send_hardware_message_reply *req )
2672 fprintf( stderr, " wait=%d", req->wait );
2673 fprintf( stderr, ", prev_x=%d", req->prev_x );
2674 fprintf( stderr, ", prev_y=%d", req->prev_y );
2675 fprintf( stderr, ", new_x=%d", req->new_x );
2676 fprintf( stderr, ", new_y=%d", req->new_y );
2679 static void dump_get_message_request( const struct get_message_request *req )
2681 fprintf( stderr, " flags=%08x", req->flags );
2682 fprintf( stderr, ", get_win=%08x", req->get_win );
2683 fprintf( stderr, ", get_first=%08x", req->get_first );
2684 fprintf( stderr, ", get_last=%08x", req->get_last );
2685 fprintf( stderr, ", hw_id=%08x", req->hw_id );
2686 fprintf( stderr, ", wake_mask=%08x", req->wake_mask );
2687 fprintf( stderr, ", changed_mask=%08x", req->changed_mask );
2690 static void dump_get_message_reply( const struct get_message_reply *req )
2692 fprintf( stderr, " win=%08x", req->win );
2693 fprintf( stderr, ", msg=%08x", req->msg );
2694 dump_uint64( ", wparam=", &req->wparam );
2695 dump_uint64( ", lparam=", &req->lparam );
2696 fprintf( stderr, ", type=%d", req->type );
2697 fprintf( stderr, ", x=%d", req->x );
2698 fprintf( stderr, ", y=%d", req->y );
2699 fprintf( stderr, ", time=%08x", req->time );
2700 fprintf( stderr, ", active_hooks=%08x", req->active_hooks );
2701 fprintf( stderr, ", total=%u", req->total );
2702 dump_varargs_message_data( ", data=", cur_size );
2705 static void dump_reply_message_request( const struct reply_message_request *req )
2707 fprintf( stderr, " remove=%d", req->remove );
2708 dump_uint64( ", result=", &req->result );
2709 dump_varargs_bytes( ", data=", cur_size );
2712 static void dump_accept_hardware_message_request( const struct accept_hardware_message_request *req )
2714 fprintf( stderr, " hw_id=%08x", req->hw_id );
2717 static void dump_get_message_reply_request( const struct get_message_reply_request *req )
2719 fprintf( stderr, " cancel=%d", req->cancel );
2722 static void dump_get_message_reply_reply( const struct get_message_reply_reply *req )
2724 dump_uint64( " result=", &req->result );
2725 dump_varargs_bytes( ", data=", cur_size );
2728 static void dump_set_win_timer_request( const struct set_win_timer_request *req )
2730 fprintf( stderr, " win=%08x", req->win );
2731 fprintf( stderr, ", msg=%08x", req->msg );
2732 fprintf( stderr, ", rate=%08x", req->rate );
2733 dump_uint64( ", id=", &req->id );
2734 dump_uint64( ", lparam=", &req->lparam );
2737 static void dump_set_win_timer_reply( const struct set_win_timer_reply *req )
2739 dump_uint64( " id=", &req->id );
2742 static void dump_kill_win_timer_request( const struct kill_win_timer_request *req )
2744 fprintf( stderr, " win=%08x", req->win );
2745 dump_uint64( ", id=", &req->id );
2746 fprintf( stderr, ", msg=%08x", req->msg );
2749 static void dump_is_window_hung_request( const struct is_window_hung_request *req )
2751 fprintf( stderr, " win=%08x", req->win );
2754 static void dump_is_window_hung_reply( const struct is_window_hung_reply *req )
2756 fprintf( stderr, " is_hung=%d", req->is_hung );
2759 static void dump_get_serial_info_request( const struct get_serial_info_request *req )
2761 fprintf( stderr, " handle=%04x", req->handle );
2762 fprintf( stderr, ", flags=%d", req->flags );
2765 static void dump_get_serial_info_reply( const struct get_serial_info_reply *req )
2767 fprintf( stderr, " eventmask=%08x", req->eventmask );
2768 fprintf( stderr, ", cookie=%08x", req->cookie );
2769 fprintf( stderr, ", pending_write=%08x", req->pending_write );
2772 static void dump_set_serial_info_request( const struct set_serial_info_request *req )
2774 fprintf( stderr, " handle=%04x", req->handle );
2775 fprintf( stderr, ", flags=%d", req->flags );
2778 static void dump_cancel_sync_request( const struct cancel_sync_request *req )
2780 fprintf( stderr, " handle=%04x", req->handle );
2781 dump_uint64( ", iosb=", &req->iosb );
2784 static void dump_register_async_request( const struct register_async_request *req )
2786 fprintf( stderr, " type=%d", req->type );
2787 dump_async_data( ", async=", &req->async );
2788 fprintf( stderr, ", count=%d", req->count );
2791 static void dump_cancel_async_request( const struct cancel_async_request *req )
2793 fprintf( stderr, " handle=%04x", req->handle );
2794 dump_uint64( ", iosb=", &req->iosb );
2795 fprintf( stderr, ", only_thread=%d", req->only_thread );
2798 static void dump_get_async_result_request( const struct get_async_result_request *req )
2800 dump_uint64( " user_arg=", &req->user_arg );
2803 static void dump_get_async_result_reply( const struct get_async_result_reply *req )
2805 dump_varargs_bytes( " out_data=", cur_size );
2808 static void dump_set_async_direct_result_request( const struct set_async_direct_result_request *req )
2810 fprintf( stderr, " handle=%04x", req->handle );
2811 dump_uint64( ", information=", &req->information );
2812 fprintf( stderr, ", status=%08x", req->status );
2813 fprintf( stderr, ", mark_pending=%d", req->mark_pending );
2816 static void dump_set_async_direct_result_reply( const struct set_async_direct_result_reply *req )
2818 fprintf( stderr, " handle=%04x", req->handle );
2821 static void dump_read_request( const struct read_request *req )
2823 dump_async_data( " async=", &req->async );
2824 dump_uint64( ", pos=", &req->pos );
2827 static void dump_read_reply( const struct read_reply *req )
2829 fprintf( stderr, " wait=%04x", req->wait );
2830 fprintf( stderr, ", options=%08x", req->options );
2831 dump_varargs_bytes( ", data=", cur_size );
2834 static void dump_write_request( const struct write_request *req )
2836 dump_async_data( " async=", &req->async );
2837 dump_uint64( ", pos=", &req->pos );
2838 dump_varargs_bytes( ", data=", cur_size );
2841 static void dump_write_reply( const struct write_reply *req )
2843 fprintf( stderr, " wait=%04x", req->wait );
2844 fprintf( stderr, ", options=%08x", req->options );
2845 fprintf( stderr, ", size=%u", req->size );
2848 static void dump_ioctl_request( const struct ioctl_request *req )
2850 dump_ioctl_code( " code=", &req->code );
2851 dump_async_data( ", async=", &req->async );
2852 dump_varargs_bytes( ", in_data=", cur_size );
2855 static void dump_ioctl_reply( const struct ioctl_reply *req )
2857 fprintf( stderr, " wait=%04x", req->wait );
2858 fprintf( stderr, ", options=%08x", req->options );
2859 dump_varargs_bytes( ", out_data=", cur_size );
2862 static void dump_set_irp_result_request( const struct set_irp_result_request *req )
2864 fprintf( stderr, " handle=%04x", req->handle );
2865 fprintf( stderr, ", status=%08x", req->status );
2866 fprintf( stderr, ", size=%u", req->size );
2867 dump_varargs_bytes( ", data=", cur_size );
2870 static void dump_create_named_pipe_request( const struct create_named_pipe_request *req )
2872 fprintf( stderr, " access=%08x", req->access );
2873 fprintf( stderr, ", options=%08x", req->options );
2874 fprintf( stderr, ", sharing=%08x", req->sharing );
2875 fprintf( stderr, ", disposition=%08x", req->disposition );
2876 fprintf( stderr, ", maxinstances=%08x", req->maxinstances );
2877 fprintf( stderr, ", outsize=%08x", req->outsize );
2878 fprintf( stderr, ", insize=%08x", req->insize );
2879 dump_timeout( ", timeout=", &req->timeout );
2880 fprintf( stderr, ", flags=%08x", req->flags );
2881 dump_varargs_object_attributes( ", objattr=", cur_size );
2884 static void dump_create_named_pipe_reply( const struct create_named_pipe_reply *req )
2886 fprintf( stderr, " handle=%04x", req->handle );
2887 fprintf( stderr, ", created=%d", req->created );
2890 static void dump_set_named_pipe_info_request( const struct set_named_pipe_info_request *req )
2892 fprintf( stderr, " handle=%04x", req->handle );
2893 fprintf( stderr, ", flags=%08x", req->flags );
2896 static void dump_create_window_request( const struct create_window_request *req )
2898 fprintf( stderr, " parent=%08x", req->parent );
2899 fprintf( stderr, ", owner=%08x", req->owner );
2900 fprintf( stderr, ", atom=%04x", req->atom );
2901 dump_uint64( ", instance=", &req->instance );
2902 fprintf( stderr, ", dpi=%d", req->dpi );
2903 fprintf( stderr, ", awareness=%d", req->awareness );
2904 fprintf( stderr, ", style=%08x", req->style );
2905 fprintf( stderr, ", ex_style=%08x", req->ex_style );
2906 dump_varargs_unicode_str( ", class=", cur_size );
2909 static void dump_create_window_reply( const struct create_window_reply *req )
2911 fprintf( stderr, " handle=%08x", req->handle );
2912 fprintf( stderr, ", parent=%08x", req->parent );
2913 fprintf( stderr, ", owner=%08x", req->owner );
2914 fprintf( stderr, ", extra=%d", req->extra );
2915 dump_uint64( ", class_ptr=", &req->class_ptr );
2916 fprintf( stderr, ", dpi=%d", req->dpi );
2917 fprintf( stderr, ", awareness=%d", req->awareness );
2920 static void dump_destroy_window_request( const struct destroy_window_request *req )
2922 fprintf( stderr, " handle=%08x", req->handle );
2925 static void dump_get_desktop_window_request( const struct get_desktop_window_request *req )
2927 fprintf( stderr, " force=%d", req->force );
2930 static void dump_get_desktop_window_reply( const struct get_desktop_window_reply *req )
2932 fprintf( stderr, " top_window=%08x", req->top_window );
2933 fprintf( stderr, ", msg_window=%08x", req->msg_window );
2936 static void dump_set_window_owner_request( const struct set_window_owner_request *req )
2938 fprintf( stderr, " handle=%08x", req->handle );
2939 fprintf( stderr, ", owner=%08x", req->owner );
2942 static void dump_set_window_owner_reply( const struct set_window_owner_reply *req )
2944 fprintf( stderr, " full_owner=%08x", req->full_owner );
2945 fprintf( stderr, ", prev_owner=%08x", req->prev_owner );
2948 static void dump_get_window_info_request( const struct get_window_info_request *req )
2950 fprintf( stderr, " handle=%08x", req->handle );
2953 static void dump_get_window_info_reply( const struct get_window_info_reply *req )
2955 fprintf( stderr, " full_handle=%08x", req->full_handle );
2956 fprintf( stderr, ", last_active=%08x", req->last_active );
2957 fprintf( stderr, ", pid=%04x", req->pid );
2958 fprintf( stderr, ", tid=%04x", req->tid );
2959 fprintf( stderr, ", atom=%04x", req->atom );
2960 fprintf( stderr, ", is_unicode=%d", req->is_unicode );
2961 fprintf( stderr, ", dpi=%d", req->dpi );
2962 fprintf( stderr, ", awareness=%d", req->awareness );
2965 static void dump_set_window_info_request( const struct set_window_info_request *req )
2967 fprintf( stderr, " flags=%04x", req->flags );
2968 fprintf( stderr, ", is_unicode=%d", req->is_unicode );
2969 fprintf( stderr, ", handle=%08x", req->handle );
2970 fprintf( stderr, ", style=%08x", req->style );
2971 fprintf( stderr, ", ex_style=%08x", req->ex_style );
2972 fprintf( stderr, ", extra_size=%u", req->extra_size );
2973 dump_uint64( ", instance=", &req->instance );
2974 dump_uint64( ", user_data=", &req->user_data );
2975 dump_uint64( ", extra_value=", &req->extra_value );
2976 fprintf( stderr, ", extra_offset=%d", req->extra_offset );
2979 static void dump_set_window_info_reply( const struct set_window_info_reply *req )
2981 fprintf( stderr, " old_style=%08x", req->old_style );
2982 fprintf( stderr, ", old_ex_style=%08x", req->old_ex_style );
2983 dump_uint64( ", old_instance=", &req->old_instance );
2984 dump_uint64( ", old_user_data=", &req->old_user_data );
2985 dump_uint64( ", old_extra_value=", &req->old_extra_value );
2986 dump_uint64( ", old_id=", &req->old_id );
2989 static void dump_set_parent_request( const struct set_parent_request *req )
2991 fprintf( stderr, " handle=%08x", req->handle );
2992 fprintf( stderr, ", parent=%08x", req->parent );
2995 static void dump_set_parent_reply( const struct set_parent_reply *req )
2997 fprintf( stderr, " old_parent=%08x", req->old_parent );
2998 fprintf( stderr, ", full_parent=%08x", req->full_parent );
2999 fprintf( stderr, ", dpi=%d", req->dpi );
3000 fprintf( stderr, ", awareness=%d", req->awareness );
3003 static void dump_get_window_parents_request( const struct get_window_parents_request *req )
3005 fprintf( stderr, " handle=%08x", req->handle );
3008 static void dump_get_window_parents_reply( const struct get_window_parents_reply *req )
3010 fprintf( stderr, " count=%d", req->count );
3011 dump_varargs_user_handles( ", parents=", cur_size );
3014 static void dump_get_window_children_request( const struct get_window_children_request *req )
3016 fprintf( stderr, " desktop=%04x", req->desktop );
3017 fprintf( stderr, ", parent=%08x", req->parent );
3018 fprintf( stderr, ", atom=%04x", req->atom );
3019 fprintf( stderr, ", tid=%04x", req->tid );
3020 dump_varargs_unicode_str( ", class=", cur_size );
3023 static void dump_get_window_children_reply( const struct get_window_children_reply *req )
3025 fprintf( stderr, " count=%d", req->count );
3026 dump_varargs_user_handles( ", children=", cur_size );
3029 static void dump_get_window_children_from_point_request( const struct get_window_children_from_point_request *req )
3031 fprintf( stderr, " parent=%08x", req->parent );
3032 fprintf( stderr, ", x=%d", req->x );
3033 fprintf( stderr, ", y=%d", req->y );
3034 fprintf( stderr, ", dpi=%d", req->dpi );
3037 static void dump_get_window_children_from_point_reply( const struct get_window_children_from_point_reply *req )
3039 fprintf( stderr, " count=%d", req->count );
3040 dump_varargs_user_handles( ", children=", cur_size );
3043 static void dump_get_window_tree_request( const struct get_window_tree_request *req )
3045 fprintf( stderr, " handle=%08x", req->handle );
3048 static void dump_get_window_tree_reply( const struct get_window_tree_reply *req )
3050 fprintf( stderr, " parent=%08x", req->parent );
3051 fprintf( stderr, ", owner=%08x", req->owner );
3052 fprintf( stderr, ", next_sibling=%08x", req->next_sibling );
3053 fprintf( stderr, ", prev_sibling=%08x", req->prev_sibling );
3054 fprintf( stderr, ", first_sibling=%08x", req->first_sibling );
3055 fprintf( stderr, ", last_sibling=%08x", req->last_sibling );
3056 fprintf( stderr, ", first_child=%08x", req->first_child );
3057 fprintf( stderr, ", last_child=%08x", req->last_child );
3060 static void dump_set_window_pos_request( const struct set_window_pos_request *req )
3062 fprintf( stderr, " swp_flags=%04x", req->swp_flags );
3063 fprintf( stderr, ", paint_flags=%04x", req->paint_flags );
3064 fprintf( stderr, ", handle=%08x", req->handle );
3065 fprintf( stderr, ", previous=%08x", req->previous );
3066 dump_rectangle( ", window=", &req->window );
3067 dump_rectangle( ", client=", &req->client );
3068 dump_varargs_rectangles( ", valid=", cur_size );
3071 static void dump_set_window_pos_reply( const struct set_window_pos_reply *req )
3073 fprintf( stderr, " new_style=%08x", req->new_style );
3074 fprintf( stderr, ", new_ex_style=%08x", req->new_ex_style );
3075 fprintf( stderr, ", surface_win=%08x", req->surface_win );
3076 fprintf( stderr, ", needs_update=%d", req->needs_update );
3079 static void dump_get_window_rectangles_request( const struct get_window_rectangles_request *req )
3081 fprintf( stderr, " handle=%08x", req->handle );
3082 fprintf( stderr, ", relative=%d", req->relative );
3083 fprintf( stderr, ", dpi=%d", req->dpi );
3086 static void dump_get_window_rectangles_reply( const struct get_window_rectangles_reply *req )
3088 dump_rectangle( " window=", &req->window );
3089 dump_rectangle( ", client=", &req->client );
3092 static void dump_get_window_text_request( const struct get_window_text_request *req )
3094 fprintf( stderr, " handle=%08x", req->handle );
3097 static void dump_get_window_text_reply( const struct get_window_text_reply *req )
3099 fprintf( stderr, " length=%u", req->length );
3100 dump_varargs_unicode_str( ", text=", cur_size );
3103 static void dump_set_window_text_request( const struct set_window_text_request *req )
3105 fprintf( stderr, " handle=%08x", req->handle );
3106 dump_varargs_unicode_str( ", text=", cur_size );
3109 static void dump_get_windows_offset_request( const struct get_windows_offset_request *req )
3111 fprintf( stderr, " from=%08x", req->from );
3112 fprintf( stderr, ", to=%08x", req->to );
3113 fprintf( stderr, ", dpi=%d", req->dpi );
3116 static void dump_get_windows_offset_reply( const struct get_windows_offset_reply *req )
3118 fprintf( stderr, " x=%d", req->x );
3119 fprintf( stderr, ", y=%d", req->y );
3120 fprintf( stderr, ", mirror=%d", req->mirror );
3123 static void dump_get_visible_region_request( const struct get_visible_region_request *req )
3125 fprintf( stderr, " window=%08x", req->window );
3126 fprintf( stderr, ", flags=%08x", req->flags );
3129 static void dump_get_visible_region_reply( const struct get_visible_region_reply *req )
3131 fprintf( stderr, " top_win=%08x", req->top_win );
3132 dump_rectangle( ", top_rect=", &req->top_rect );
3133 dump_rectangle( ", win_rect=", &req->win_rect );
3134 fprintf( stderr, ", paint_flags=%08x", req->paint_flags );
3135 fprintf( stderr, ", total_size=%u", req->total_size );
3136 dump_varargs_rectangles( ", region=", cur_size );
3139 static void dump_get_surface_region_request( const struct get_surface_region_request *req )
3141 fprintf( stderr, " window=%08x", req->window );
3144 static void dump_get_surface_region_reply( const struct get_surface_region_reply *req )
3146 dump_rectangle( " visible_rect=", &req->visible_rect );
3147 fprintf( stderr, ", total_size=%u", req->total_size );
3148 dump_varargs_rectangles( ", region=", cur_size );
3151 static void dump_get_window_region_request( const struct get_window_region_request *req )
3153 fprintf( stderr, " window=%08x", req->window );
3156 static void dump_get_window_region_reply( const struct get_window_region_reply *req )
3158 fprintf( stderr, " total_size=%u", req->total_size );
3159 dump_varargs_rectangles( ", region=", cur_size );
3162 static void dump_set_window_region_request( const struct set_window_region_request *req )
3164 fprintf( stderr, " window=%08x", req->window );
3165 fprintf( stderr, ", redraw=%d", req->redraw );
3166 dump_varargs_rectangles( ", region=", cur_size );
3169 static void dump_get_update_region_request( const struct get_update_region_request *req )
3171 fprintf( stderr, " window=%08x", req->window );
3172 fprintf( stderr, ", from_child=%08x", req->from_child );
3173 fprintf( stderr, ", flags=%08x", req->flags );
3176 static void dump_get_update_region_reply( const struct get_update_region_reply *req )
3178 fprintf( stderr, " child=%08x", req->child );
3179 fprintf( stderr, ", flags=%08x", req->flags );
3180 fprintf( stderr, ", total_size=%u", req->total_size );
3181 dump_varargs_rectangles( ", region=", cur_size );
3184 static void dump_update_window_zorder_request( const struct update_window_zorder_request *req )
3186 fprintf( stderr, " window=%08x", req->window );
3187 dump_rectangle( ", rect=", &req->rect );
3190 static void dump_redraw_window_request( const struct redraw_window_request *req )
3192 fprintf( stderr, " window=%08x", req->window );
3193 fprintf( stderr, ", flags=%08x", req->flags );
3194 dump_varargs_rectangles( ", region=", cur_size );
3197 static void dump_set_window_property_request( const struct set_window_property_request *req )
3199 fprintf( stderr, " window=%08x", req->window );
3200 dump_uint64( ", data=", &req->data );
3201 fprintf( stderr, ", atom=%04x", req->atom );
3202 dump_varargs_unicode_str( ", name=", cur_size );
3205 static void dump_remove_window_property_request( const struct remove_window_property_request *req )
3207 fprintf( stderr, " window=%08x", req->window );
3208 fprintf( stderr, ", atom=%04x", req->atom );
3209 dump_varargs_unicode_str( ", name=", cur_size );
3212 static void dump_remove_window_property_reply( const struct remove_window_property_reply *req )
3214 dump_uint64( " data=", &req->data );
3217 static void dump_get_window_property_request( const struct get_window_property_request *req )
3219 fprintf( stderr, " window=%08x", req->window );
3220 fprintf( stderr, ", atom=%04x", req->atom );
3221 dump_varargs_unicode_str( ", name=", cur_size );
3224 static void dump_get_window_property_reply( const struct get_window_property_reply *req )
3226 dump_uint64( " data=", &req->data );
3229 static void dump_get_window_properties_request( const struct get_window_properties_request *req )
3231 fprintf( stderr, " window=%08x", req->window );
3234 static void dump_get_window_properties_reply( const struct get_window_properties_reply *req )
3236 fprintf( stderr, " total=%d", req->total );
3237 dump_varargs_properties( ", props=", cur_size );
3240 static void dump_create_winstation_request( const struct create_winstation_request *req )
3242 fprintf( stderr, " flags=%08x", req->flags );
3243 fprintf( stderr, ", access=%08x", req->access );
3244 fprintf( stderr, ", attributes=%08x", req->attributes );
3245 fprintf( stderr, ", rootdir=%04x", req->rootdir );
3246 dump_varargs_unicode_str( ", name=", cur_size );
3249 static void dump_create_winstation_reply( const struct create_winstation_reply *req )
3251 fprintf( stderr, " handle=%04x", req->handle );
3254 static void dump_open_winstation_request( const struct open_winstation_request *req )
3256 fprintf( stderr, " access=%08x", req->access );
3257 fprintf( stderr, ", attributes=%08x", req->attributes );
3258 fprintf( stderr, ", rootdir=%04x", req->rootdir );
3259 dump_varargs_unicode_str( ", name=", cur_size );
3262 static void dump_open_winstation_reply( const struct open_winstation_reply *req )
3264 fprintf( stderr, " handle=%04x", req->handle );
3267 static void dump_close_winstation_request( const struct close_winstation_request *req )
3269 fprintf( stderr, " handle=%04x", req->handle );
3272 static void dump_get_process_winstation_request( const struct get_process_winstation_request *req )
3276 static void dump_get_process_winstation_reply( const struct get_process_winstation_reply *req )
3278 fprintf( stderr, " handle=%04x", req->handle );
3281 static void dump_set_process_winstation_request( const struct set_process_winstation_request *req )
3283 fprintf( stderr, " handle=%04x", req->handle );
3286 static void dump_enum_winstation_request( const struct enum_winstation_request *req )
3288 fprintf( stderr, " index=%08x", req->index );
3291 static void dump_enum_winstation_reply( const struct enum_winstation_reply *req )
3293 fprintf( stderr, " next=%08x", req->next );
3294 dump_varargs_unicode_str( ", name=", cur_size );
3297 static void dump_create_desktop_request( const struct create_desktop_request *req )
3299 fprintf( stderr, " flags=%08x", req->flags );
3300 fprintf( stderr, ", access=%08x", req->access );
3301 fprintf( stderr, ", attributes=%08x", req->attributes );
3302 dump_varargs_unicode_str( ", name=", cur_size );
3305 static void dump_create_desktop_reply( const struct create_desktop_reply *req )
3307 fprintf( stderr, " handle=%04x", req->handle );
3310 static void dump_open_desktop_request( const struct open_desktop_request *req )
3312 fprintf( stderr, " winsta=%04x", req->winsta );
3313 fprintf( stderr, ", flags=%08x", req->flags );
3314 fprintf( stderr, ", access=%08x", req->access );
3315 fprintf( stderr, ", attributes=%08x", req->attributes );
3316 dump_varargs_unicode_str( ", name=", cur_size );
3319 static void dump_open_desktop_reply( const struct open_desktop_reply *req )
3321 fprintf( stderr, " handle=%04x", req->handle );
3324 static void dump_open_input_desktop_request( const struct open_input_desktop_request *req )
3326 fprintf( stderr, " flags=%08x", req->flags );
3327 fprintf( stderr, ", access=%08x", req->access );
3328 fprintf( stderr, ", attributes=%08x", req->attributes );
3331 static void dump_open_input_desktop_reply( const struct open_input_desktop_reply *req )
3333 fprintf( stderr, " handle=%04x", req->handle );
3336 static void dump_close_desktop_request( const struct close_desktop_request *req )
3338 fprintf( stderr, " handle=%04x", req->handle );
3341 static void dump_get_thread_desktop_request( const struct get_thread_desktop_request *req )
3343 fprintf( stderr, " tid=%04x", req->tid );
3346 static void dump_get_thread_desktop_reply( const struct get_thread_desktop_reply *req )
3348 fprintf( stderr, " handle=%04x", req->handle );
3351 static void dump_set_thread_desktop_request( const struct set_thread_desktop_request *req )
3353 fprintf( stderr, " handle=%04x", req->handle );
3356 static void dump_enum_desktop_request( const struct enum_desktop_request *req )
3358 fprintf( stderr, " winstation=%04x", req->winstation );
3359 fprintf( stderr, ", index=%08x", req->index );
3362 static void dump_enum_desktop_reply( const struct enum_desktop_reply *req )
3364 fprintf( stderr, " next=%08x", req->next );
3365 dump_varargs_unicode_str( ", name=", cur_size );
3368 static void dump_set_user_object_info_request( const struct set_user_object_info_request *req )
3370 fprintf( stderr, " handle=%04x", req->handle );
3371 fprintf( stderr, ", flags=%08x", req->flags );
3372 fprintf( stderr, ", obj_flags=%08x", req->obj_flags );
3375 static void dump_set_user_object_info_reply( const struct set_user_object_info_reply *req )
3377 fprintf( stderr, " is_desktop=%d", req->is_desktop );
3378 fprintf( stderr, ", old_obj_flags=%08x", req->old_obj_flags );
3379 dump_varargs_unicode_str( ", name=", cur_size );
3382 static void dump_register_hotkey_request( const struct register_hotkey_request *req )
3384 fprintf( stderr, " window=%08x", req->window );
3385 fprintf( stderr, ", id=%d", req->id );
3386 fprintf( stderr, ", flags=%08x", req->flags );
3387 fprintf( stderr, ", vkey=%08x", req->vkey );
3390 static void dump_register_hotkey_reply( const struct register_hotkey_reply *req )
3392 fprintf( stderr, " replaced=%d", req->replaced );
3393 fprintf( stderr, ", flags=%08x", req->flags );
3394 fprintf( stderr, ", vkey=%08x", req->vkey );
3397 static void dump_unregister_hotkey_request( const struct unregister_hotkey_request *req )
3399 fprintf( stderr, " window=%08x", req->window );
3400 fprintf( stderr, ", id=%d", req->id );
3403 static void dump_unregister_hotkey_reply( const struct unregister_hotkey_reply *req )
3405 fprintf( stderr, " flags=%08x", req->flags );
3406 fprintf( stderr, ", vkey=%08x", req->vkey );
3409 static void dump_attach_thread_input_request( const struct attach_thread_input_request *req )
3411 fprintf( stderr, " tid_from=%04x", req->tid_from );
3412 fprintf( stderr, ", tid_to=%04x", req->tid_to );
3413 fprintf( stderr, ", attach=%d", req->attach );
3416 static void dump_get_thread_input_request( const struct get_thread_input_request *req )
3418 fprintf( stderr, " tid=%04x", req->tid );
3421 static void dump_get_thread_input_reply( const struct get_thread_input_reply *req )
3423 fprintf( stderr, " focus=%08x", req->focus );
3424 fprintf( stderr, ", capture=%08x", req->capture );
3425 fprintf( stderr, ", active=%08x", req->active );
3426 fprintf( stderr, ", foreground=%08x", req->foreground );
3427 fprintf( stderr, ", menu_owner=%08x", req->menu_owner );
3428 fprintf( stderr, ", move_size=%08x", req->move_size );
3429 fprintf( stderr, ", caret=%08x", req->caret );
3430 fprintf( stderr, ", cursor=%08x", req->cursor );
3431 fprintf( stderr, ", show_count=%d", req->show_count );
3432 dump_rectangle( ", rect=", &req->rect );
3435 static void dump_get_last_input_time_request( const struct get_last_input_time_request *req )
3439 static void dump_get_last_input_time_reply( const struct get_last_input_time_reply *req )
3441 fprintf( stderr, " time=%08x", req->time );
3444 static void dump_get_key_state_request( const struct get_key_state_request *req )
3446 fprintf( stderr, " async=%d", req->async );
3447 fprintf( stderr, ", key=%d", req->key );
3450 static void dump_get_key_state_reply( const struct get_key_state_reply *req )
3452 fprintf( stderr, " state=%02x", req->state );
3453 dump_varargs_bytes( ", keystate=", cur_size );
3456 static void dump_set_key_state_request( const struct set_key_state_request *req )
3458 fprintf( stderr, " async=%d", req->async );
3459 dump_varargs_bytes( ", keystate=", cur_size );
3462 static void dump_set_foreground_window_request( const struct set_foreground_window_request *req )
3464 fprintf( stderr, " handle=%08x", req->handle );
3467 static void dump_set_foreground_window_reply( const struct set_foreground_window_reply *req )
3469 fprintf( stderr, " previous=%08x", req->previous );
3470 fprintf( stderr, ", send_msg_old=%d", req->send_msg_old );
3471 fprintf( stderr, ", send_msg_new=%d", req->send_msg_new );
3474 static void dump_set_focus_window_request( const struct set_focus_window_request *req )
3476 fprintf( stderr, " handle=%08x", req->handle );
3479 static void dump_set_focus_window_reply( const struct set_focus_window_reply *req )
3481 fprintf( stderr, " previous=%08x", req->previous );
3484 static void dump_set_active_window_request( const struct set_active_window_request *req )
3486 fprintf( stderr, " handle=%08x", req->handle );
3489 static void dump_set_active_window_reply( const struct set_active_window_reply *req )
3491 fprintf( stderr, " previous=%08x", req->previous );
3494 static void dump_set_capture_window_request( const struct set_capture_window_request *req )
3496 fprintf( stderr, " handle=%08x", req->handle );
3497 fprintf( stderr, ", flags=%08x", req->flags );
3500 static void dump_set_capture_window_reply( const struct set_capture_window_reply *req )
3502 fprintf( stderr, " previous=%08x", req->previous );
3503 fprintf( stderr, ", full_handle=%08x", req->full_handle );
3506 static void dump_set_caret_window_request( const struct set_caret_window_request *req )
3508 fprintf( stderr, " handle=%08x", req->handle );
3509 fprintf( stderr, ", width=%d", req->width );
3510 fprintf( stderr, ", height=%d", req->height );
3513 static void dump_set_caret_window_reply( const struct set_caret_window_reply *req )
3515 fprintf( stderr, " previous=%08x", req->previous );
3516 dump_rectangle( ", old_rect=", &req->old_rect );
3517 fprintf( stderr, ", old_hide=%d", req->old_hide );
3518 fprintf( stderr, ", old_state=%d", req->old_state );
3521 static void dump_set_caret_info_request( const struct set_caret_info_request *req )
3523 fprintf( stderr, " flags=%08x", req->flags );
3524 fprintf( stderr, ", handle=%08x", req->handle );
3525 fprintf( stderr, ", x=%d", req->x );
3526 fprintf( stderr, ", y=%d", req->y );
3527 fprintf( stderr, ", hide=%d", req->hide );
3528 fprintf( stderr, ", state=%d", req->state );
3531 static void dump_set_caret_info_reply( const struct set_caret_info_reply *req )
3533 fprintf( stderr, " full_handle=%08x", req->full_handle );
3534 dump_rectangle( ", old_rect=", &req->old_rect );
3535 fprintf( stderr, ", old_hide=%d", req->old_hide );
3536 fprintf( stderr, ", old_state=%d", req->old_state );
3539 static void dump_set_hook_request( const struct set_hook_request *req )
3541 fprintf( stderr, " id=%d", req->id );
3542 fprintf( stderr, ", pid=%04x", req->pid );
3543 fprintf( stderr, ", tid=%04x", req->tid );
3544 fprintf( stderr, ", event_min=%d", req->event_min );
3545 fprintf( stderr, ", event_max=%d", req->event_max );
3546 dump_uint64( ", proc=", &req->proc );
3547 fprintf( stderr, ", flags=%d", req->flags );
3548 fprintf( stderr, ", unicode=%d", req->unicode );
3549 dump_varargs_unicode_str( ", module=", cur_size );
3552 static void dump_set_hook_reply( const struct set_hook_reply *req )
3554 fprintf( stderr, " handle=%08x", req->handle );
3555 fprintf( stderr, ", active_hooks=%08x", req->active_hooks );
3558 static void dump_remove_hook_request( const struct remove_hook_request *req )
3560 fprintf( stderr, " handle=%08x", req->handle );
3561 dump_uint64( ", proc=", &req->proc );
3562 fprintf( stderr, ", id=%d", req->id );
3565 static void dump_remove_hook_reply( const struct remove_hook_reply *req )
3567 fprintf( stderr, " active_hooks=%08x", req->active_hooks );
3570 static void dump_start_hook_chain_request( const struct start_hook_chain_request *req )
3572 fprintf( stderr, " id=%d", req->id );
3573 fprintf( stderr, ", event=%d", req->event );
3574 fprintf( stderr, ", window=%08x", req->window );
3575 fprintf( stderr, ", object_id=%d", req->object_id );
3576 fprintf( stderr, ", child_id=%d", req->child_id );
3579 static void dump_start_hook_chain_reply( const struct start_hook_chain_reply *req )
3581 fprintf( stderr, " handle=%08x", req->handle );
3582 fprintf( stderr, ", pid=%04x", req->pid );
3583 fprintf( stderr, ", tid=%04x", req->tid );
3584 fprintf( stderr, ", unicode=%d", req->unicode );
3585 dump_uint64( ", proc=", &req->proc );
3586 fprintf( stderr, ", active_hooks=%08x", req->active_hooks );
3587 dump_varargs_unicode_str( ", module=", cur_size );
3590 static void dump_finish_hook_chain_request( const struct finish_hook_chain_request *req )
3592 fprintf( stderr, " id=%d", req->id );
3595 static void dump_get_hook_info_request( const struct get_hook_info_request *req )
3597 fprintf( stderr, " handle=%08x", req->handle );
3598 fprintf( stderr, ", get_next=%d", req->get_next );
3599 fprintf( stderr, ", event=%d", req->event );
3600 fprintf( stderr, ", window=%08x", req->window );
3601 fprintf( stderr, ", object_id=%d", req->object_id );
3602 fprintf( stderr, ", child_id=%d", req->child_id );
3605 static void dump_get_hook_info_reply( const struct get_hook_info_reply *req )
3607 fprintf( stderr, " handle=%08x", req->handle );
3608 fprintf( stderr, ", id=%d", req->id );
3609 fprintf( stderr, ", pid=%04x", req->pid );
3610 fprintf( stderr, ", tid=%04x", req->tid );
3611 dump_uint64( ", proc=", &req->proc );
3612 fprintf( stderr, ", unicode=%d", req->unicode );
3613 dump_varargs_unicode_str( ", module=", cur_size );
3616 static void dump_create_class_request( const struct create_class_request *req )
3618 fprintf( stderr, " local=%d", req->local );
3619 fprintf( stderr, ", atom=%04x", req->atom );
3620 fprintf( stderr, ", style=%08x", req->style );
3621 dump_uint64( ", instance=", &req->instance );
3622 fprintf( stderr, ", extra=%d", req->extra );
3623 fprintf( stderr, ", win_extra=%d", req->win_extra );
3624 dump_uint64( ", client_ptr=", &req->client_ptr );
3625 fprintf( stderr, ", name_offset=%u", req->name_offset );
3626 dump_varargs_unicode_str( ", name=", cur_size );
3629 static void dump_create_class_reply( const struct create_class_reply *req )
3631 fprintf( stderr, " atom=%04x", req->atom );
3634 static void dump_destroy_class_request( const struct destroy_class_request *req )
3636 fprintf( stderr, " atom=%04x", req->atom );
3637 dump_uint64( ", instance=", &req->instance );
3638 dump_varargs_unicode_str( ", name=", cur_size );
3641 static void dump_destroy_class_reply( const struct destroy_class_reply *req )
3643 dump_uint64( " client_ptr=", &req->client_ptr );
3646 static void dump_set_class_info_request( const struct set_class_info_request *req )
3648 fprintf( stderr, " window=%08x", req->window );
3649 fprintf( stderr, ", flags=%08x", req->flags );
3650 fprintf( stderr, ", atom=%04x", req->atom );
3651 fprintf( stderr, ", style=%08x", req->style );
3652 fprintf( stderr, ", win_extra=%d", req->win_extra );
3653 dump_uint64( ", instance=", &req->instance );
3654 fprintf( stderr, ", extra_offset=%d", req->extra_offset );
3655 fprintf( stderr, ", extra_size=%u", req->extra_size );
3656 dump_uint64( ", extra_value=", &req->extra_value );
3659 static void dump_set_class_info_reply( const struct set_class_info_reply *req )
3661 fprintf( stderr, " old_atom=%04x", req->old_atom );
3662 fprintf( stderr, ", base_atom=%04x", req->base_atom );
3663 dump_uint64( ", old_instance=", &req->old_instance );
3664 dump_uint64( ", old_extra_value=", &req->old_extra_value );
3665 fprintf( stderr, ", old_style=%08x", req->old_style );
3666 fprintf( stderr, ", old_extra=%d", req->old_extra );
3667 fprintf( stderr, ", old_win_extra=%d", req->old_win_extra );
3670 static void dump_open_clipboard_request( const struct open_clipboard_request *req )
3672 fprintf( stderr, " window=%08x", req->window );
3675 static void dump_open_clipboard_reply( const struct open_clipboard_reply *req )
3677 fprintf( stderr, " owner=%08x", req->owner );
3680 static void dump_close_clipboard_request( const struct close_clipboard_request *req )
3684 static void dump_close_clipboard_reply( const struct close_clipboard_reply *req )
3686 fprintf( stderr, " viewer=%08x", req->viewer );
3687 fprintf( stderr, ", owner=%08x", req->owner );
3690 static void dump_empty_clipboard_request( const struct empty_clipboard_request *req )
3694 static void dump_set_clipboard_data_request( const struct set_clipboard_data_request *req )
3696 fprintf( stderr, " format=%08x", req->format );
3697 fprintf( stderr, ", lcid=%08x", req->lcid );
3698 dump_varargs_bytes( ", data=", cur_size );
3701 static void dump_set_clipboard_data_reply( const struct set_clipboard_data_reply *req )
3703 fprintf( stderr, " seqno=%08x", req->seqno );
3706 static void dump_get_clipboard_data_request( const struct get_clipboard_data_request *req )
3708 fprintf( stderr, " format=%08x", req->format );
3709 fprintf( stderr, ", render=%d", req->render );
3710 fprintf( stderr, ", cached=%d", req->cached );
3711 fprintf( stderr, ", seqno=%08x", req->seqno );
3714 static void dump_get_clipboard_data_reply( const struct get_clipboard_data_reply *req )
3716 fprintf( stderr, " from=%08x", req->from );
3717 fprintf( stderr, ", owner=%08x", req->owner );
3718 fprintf( stderr, ", seqno=%08x", req->seqno );
3719 fprintf( stderr, ", total=%u", req->total );
3720 dump_varargs_bytes( ", data=", cur_size );
3723 static void dump_get_clipboard_formats_request( const struct get_clipboard_formats_request *req )
3725 fprintf( stderr, " format=%08x", req->format );
3728 static void dump_get_clipboard_formats_reply( const struct get_clipboard_formats_reply *req )
3730 fprintf( stderr, " count=%08x", req->count );
3731 dump_varargs_uints( ", formats=", cur_size );
3734 static void dump_enum_clipboard_formats_request( const struct enum_clipboard_formats_request *req )
3736 fprintf( stderr, " previous=%08x", req->previous );
3739 static void dump_enum_clipboard_formats_reply( const struct enum_clipboard_formats_reply *req )
3741 fprintf( stderr, " format=%08x", req->format );
3744 static void dump_release_clipboard_request( const struct release_clipboard_request *req )
3746 fprintf( stderr, " owner=%08x", req->owner );
3749 static void dump_release_clipboard_reply( const struct release_clipboard_reply *req )
3751 fprintf( stderr, " viewer=%08x", req->viewer );
3752 fprintf( stderr, ", owner=%08x", req->owner );
3755 static void dump_get_clipboard_info_request( const struct get_clipboard_info_request *req )
3759 static void dump_get_clipboard_info_reply( const struct get_clipboard_info_reply *req )
3761 fprintf( stderr, " window=%08x", req->window );
3762 fprintf( stderr, ", owner=%08x", req->owner );
3763 fprintf( stderr, ", viewer=%08x", req->viewer );
3764 fprintf( stderr, ", seqno=%08x", req->seqno );
3767 static void dump_set_clipboard_viewer_request( const struct set_clipboard_viewer_request *req )
3769 fprintf( stderr, " viewer=%08x", req->viewer );
3770 fprintf( stderr, ", previous=%08x", req->previous );
3773 static void dump_set_clipboard_viewer_reply( const struct set_clipboard_viewer_reply *req )
3775 fprintf( stderr, " old_viewer=%08x", req->old_viewer );
3776 fprintf( stderr, ", owner=%08x", req->owner );
3779 static void dump_add_clipboard_listener_request( const struct add_clipboard_listener_request *req )
3781 fprintf( stderr, " window=%08x", req->window );
3784 static void dump_remove_clipboard_listener_request( const struct remove_clipboard_listener_request *req )
3786 fprintf( stderr, " window=%08x", req->window );
3789 static void dump_open_token_request( const struct open_token_request *req )
3791 fprintf( stderr, " handle=%04x", req->handle );
3792 fprintf( stderr, ", access=%08x", req->access );
3793 fprintf( stderr, ", attributes=%08x", req->attributes );
3794 fprintf( stderr, ", flags=%08x", req->flags );
3797 static void dump_open_token_reply( const struct open_token_reply *req )
3799 fprintf( stderr, " token=%04x", req->token );
3802 static void dump_set_global_windows_request( const struct set_global_windows_request *req )
3804 fprintf( stderr, " flags=%08x", req->flags );
3805 fprintf( stderr, ", shell_window=%08x", req->shell_window );
3806 fprintf( stderr, ", shell_listview=%08x", req->shell_listview );
3807 fprintf( stderr, ", progman_window=%08x", req->progman_window );
3808 fprintf( stderr, ", taskman_window=%08x", req->taskman_window );
3811 static void dump_set_global_windows_reply( const struct set_global_windows_reply *req )
3813 fprintf( stderr, " old_shell_window=%08x", req->old_shell_window );
3814 fprintf( stderr, ", old_shell_listview=%08x", req->old_shell_listview );
3815 fprintf( stderr, ", old_progman_window=%08x", req->old_progman_window );
3816 fprintf( stderr, ", old_taskman_window=%08x", req->old_taskman_window );
3819 static void dump_adjust_token_privileges_request( const struct adjust_token_privileges_request *req )
3821 fprintf( stderr, " handle=%04x", req->handle );
3822 fprintf( stderr, ", disable_all=%d", req->disable_all );
3823 fprintf( stderr, ", get_modified_state=%d", req->get_modified_state );
3824 dump_varargs_luid_attr( ", privileges=", cur_size );
3827 static void dump_adjust_token_privileges_reply( const struct adjust_token_privileges_reply *req )
3829 fprintf( stderr, " len=%08x", req->len );
3830 dump_varargs_luid_attr( ", privileges=", cur_size );
3833 static void dump_get_token_privileges_request( const struct get_token_privileges_request *req )
3835 fprintf( stderr, " handle=%04x", req->handle );
3838 static void dump_get_token_privileges_reply( const struct get_token_privileges_reply *req )
3840 fprintf( stderr, " len=%08x", req->len );
3841 dump_varargs_luid_attr( ", privileges=", cur_size );
3844 static void dump_check_token_privileges_request( const struct check_token_privileges_request *req )
3846 fprintf( stderr, " handle=%04x", req->handle );
3847 fprintf( stderr, ", all_required=%d", req->all_required );
3848 dump_varargs_luid_attr( ", privileges=", cur_size );
3851 static void dump_check_token_privileges_reply( const struct check_token_privileges_reply *req )
3853 fprintf( stderr, " has_privileges=%d", req->has_privileges );
3854 dump_varargs_luid_attr( ", privileges=", cur_size );
3857 static void dump_duplicate_token_request( const struct duplicate_token_request *req )
3859 fprintf( stderr, " handle=%04x", req->handle );
3860 fprintf( stderr, ", access=%08x", req->access );
3861 fprintf( stderr, ", primary=%d", req->primary );
3862 fprintf( stderr, ", impersonation_level=%d", req->impersonation_level );
3863 dump_varargs_object_attributes( ", objattr=", cur_size );
3866 static void dump_duplicate_token_reply( const struct duplicate_token_reply *req )
3868 fprintf( stderr, " new_handle=%04x", req->new_handle );
3871 static void dump_filter_token_request( const struct filter_token_request *req )
3873 fprintf( stderr, " handle=%04x", req->handle );
3874 fprintf( stderr, ", flags=%08x", req->flags );
3875 fprintf( stderr, ", privileges_size=%u", req->privileges_size );
3876 dump_varargs_luid_attr( ", privileges=", min(cur_size,req->privileges_size) );
3877 dump_varargs_sid( ", disable_sids=", cur_size );
3880 static void dump_filter_token_reply( const struct filter_token_reply *req )
3882 fprintf( stderr, " new_handle=%04x", req->new_handle );
3885 static void dump_access_check_request( const struct access_check_request *req )
3887 fprintf( stderr, " handle=%04x", req->handle );
3888 fprintf( stderr, ", desired_access=%08x", req->desired_access );
3889 dump_generic_map( ", mapping=", &req->mapping );
3890 dump_varargs_security_descriptor( ", sd=", cur_size );
3893 static void dump_access_check_reply( const struct access_check_reply *req )
3895 fprintf( stderr, " access_granted=%08x", req->access_granted );
3896 fprintf( stderr, ", access_status=%08x", req->access_status );
3897 fprintf( stderr, ", privileges_len=%08x", req->privileges_len );
3898 dump_varargs_luid_attr( ", privileges=", cur_size );
3901 static void dump_get_token_sid_request( const struct get_token_sid_request *req )
3903 fprintf( stderr, " handle=%04x", req->handle );
3904 fprintf( stderr, ", which_sid=%08x", req->which_sid );
3907 static void dump_get_token_sid_reply( const struct get_token_sid_reply *req )
3909 fprintf( stderr, " sid_len=%u", req->sid_len );
3910 dump_varargs_sid( ", sid=", cur_size );
3913 static void dump_get_token_groups_request( const struct get_token_groups_request *req )
3915 fprintf( stderr, " handle=%04x", req->handle );
3916 fprintf( stderr, ", attr_mask=%08x", req->attr_mask );
3919 static void dump_get_token_groups_reply( const struct get_token_groups_reply *req )
3921 fprintf( stderr, " attr_len=%u", req->attr_len );
3922 fprintf( stderr, ", sid_len=%u", req->sid_len );
3923 dump_varargs_uints( ", attrs=", min(cur_size,req->attr_len) );
3924 dump_varargs_sids( ", sids=", cur_size );
3927 static void dump_get_token_default_dacl_request( const struct get_token_default_dacl_request *req )
3929 fprintf( stderr, " handle=%04x", req->handle );
3932 static void dump_get_token_default_dacl_reply( const struct get_token_default_dacl_reply *req )
3934 fprintf( stderr, " acl_len=%u", req->acl_len );
3935 dump_varargs_acl( ", acl=", cur_size );
3938 static void dump_set_token_default_dacl_request( const struct set_token_default_dacl_request *req )
3940 fprintf( stderr, " handle=%04x", req->handle );
3941 dump_varargs_acl( ", acl=", cur_size );
3944 static void dump_set_security_object_request( const struct set_security_object_request *req )
3946 fprintf( stderr, " handle=%04x", req->handle );
3947 fprintf( stderr, ", security_info=%08x", req->security_info );
3948 dump_varargs_security_descriptor( ", sd=", cur_size );
3951 static void dump_get_security_object_request( const struct get_security_object_request *req )
3953 fprintf( stderr, " handle=%04x", req->handle );
3954 fprintf( stderr, ", security_info=%08x", req->security_info );
3957 static void dump_get_security_object_reply( const struct get_security_object_reply *req )
3959 fprintf( stderr, " sd_len=%08x", req->sd_len );
3960 dump_varargs_security_descriptor( ", sd=", cur_size );
3963 static void dump_get_system_handles_request( const struct get_system_handles_request *req )
3967 static void dump_get_system_handles_reply( const struct get_system_handles_reply *req )
3969 fprintf( stderr, " count=%08x", req->count );
3970 dump_varargs_handle_infos( ", data=", cur_size );
3973 static void dump_create_mailslot_request( const struct create_mailslot_request *req )
3975 fprintf( stderr, " access=%08x", req->access );
3976 dump_timeout( ", read_timeout=", &req->read_timeout );
3977 fprintf( stderr, ", max_msgsize=%08x", req->max_msgsize );
3978 dump_varargs_object_attributes( ", objattr=", cur_size );
3981 static void dump_create_mailslot_reply( const struct create_mailslot_reply *req )
3983 fprintf( stderr, " handle=%04x", req->handle );
3986 static void dump_set_mailslot_info_request( const struct set_mailslot_info_request *req )
3988 fprintf( stderr, " handle=%04x", req->handle );
3989 dump_timeout( ", read_timeout=", &req->read_timeout );
3990 fprintf( stderr, ", flags=%08x", req->flags );
3993 static void dump_set_mailslot_info_reply( const struct set_mailslot_info_reply *req )
3995 dump_timeout( " read_timeout=", &req->read_timeout );
3996 fprintf( stderr, ", max_msgsize=%08x", req->max_msgsize );
3999 static void dump_create_directory_request( const struct create_directory_request *req )
4001 fprintf( stderr, " access=%08x", req->access );
4002 dump_varargs_object_attributes( ", objattr=", cur_size );
4005 static void dump_create_directory_reply( const struct create_directory_reply *req )
4007 fprintf( stderr, " handle=%04x", req->handle );
4010 static void dump_open_directory_request( const struct open_directory_request *req )
4012 fprintf( stderr, " access=%08x", req->access );
4013 fprintf( stderr, ", attributes=%08x", req->attributes );
4014 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4015 dump_varargs_unicode_str( ", directory_name=", cur_size );
4018 static void dump_open_directory_reply( const struct open_directory_reply *req )
4020 fprintf( stderr, " handle=%04x", req->handle );
4023 static void dump_get_directory_entry_request( const struct get_directory_entry_request *req )
4025 fprintf( stderr, " handle=%04x", req->handle );
4026 fprintf( stderr, ", index=%08x", req->index );
4029 static void dump_get_directory_entry_reply( const struct get_directory_entry_reply *req )
4031 fprintf( stderr, " total_len=%u", req->total_len );
4032 fprintf( stderr, ", name_len=%u", req->name_len );
4033 dump_varargs_unicode_str( ", name=", min(cur_size,req->name_len) );
4034 dump_varargs_unicode_str( ", type=", cur_size );
4037 static void dump_create_symlink_request( const struct create_symlink_request *req )
4039 fprintf( stderr, " access=%08x", req->access );
4040 dump_varargs_object_attributes( ", objattr=", cur_size );
4041 dump_varargs_unicode_str( ", target_name=", cur_size );
4044 static void dump_create_symlink_reply( const struct create_symlink_reply *req )
4046 fprintf( stderr, " handle=%04x", req->handle );
4049 static void dump_open_symlink_request( const struct open_symlink_request *req )
4051 fprintf( stderr, " access=%08x", req->access );
4052 fprintf( stderr, ", attributes=%08x", req->attributes );
4053 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4054 dump_varargs_unicode_str( ", name=", cur_size );
4057 static void dump_open_symlink_reply( const struct open_symlink_reply *req )
4059 fprintf( stderr, " handle=%04x", req->handle );
4062 static void dump_query_symlink_request( const struct query_symlink_request *req )
4064 fprintf( stderr, " handle=%04x", req->handle );
4067 static void dump_query_symlink_reply( const struct query_symlink_reply *req )
4069 fprintf( stderr, " total=%u", req->total );
4070 dump_varargs_unicode_str( ", target_name=", cur_size );
4073 static void dump_get_object_info_request( const struct get_object_info_request *req )
4075 fprintf( stderr, " handle=%04x", req->handle );
4078 static void dump_get_object_info_reply( const struct get_object_info_reply *req )
4080 fprintf( stderr, " access=%08x", req->access );
4081 fprintf( stderr, ", ref_count=%08x", req->ref_count );
4082 fprintf( stderr, ", handle_count=%08x", req->handle_count );
4085 static void dump_get_object_name_request( const struct get_object_name_request *req )
4087 fprintf( stderr, " handle=%04x", req->handle );
4090 static void dump_get_object_name_reply( const struct get_object_name_reply *req )
4092 fprintf( stderr, " total=%u", req->total );
4093 dump_varargs_unicode_str( ", name=", cur_size );
4096 static void dump_get_object_type_request( const struct get_object_type_request *req )
4098 fprintf( stderr, " handle=%04x", req->handle );
4101 static void dump_get_object_type_reply( const struct get_object_type_reply *req )
4103 dump_varargs_object_type_info( " info=", cur_size );
4106 static void dump_get_object_types_request( const struct get_object_types_request *req )
4110 static void dump_get_object_types_reply( const struct get_object_types_reply *req )
4112 fprintf( stderr, " count=%d", req->count );
4113 dump_varargs_object_types_info( ", info=", cur_size );
4116 static void dump_allocate_locally_unique_id_request( const struct allocate_locally_unique_id_request *req )
4120 static void dump_allocate_locally_unique_id_reply( const struct allocate_locally_unique_id_reply *req )
4122 dump_luid( " luid=", &req->luid );
4125 static void dump_create_device_manager_request( const struct create_device_manager_request *req )
4127 fprintf( stderr, " access=%08x", req->access );
4128 fprintf( stderr, ", attributes=%08x", req->attributes );
4131 static void dump_create_device_manager_reply( const struct create_device_manager_reply *req )
4133 fprintf( stderr, " handle=%04x", req->handle );
4136 static void dump_create_device_request( const struct create_device_request *req )
4138 fprintf( stderr, " rootdir=%04x", req->rootdir );
4139 dump_uint64( ", user_ptr=", &req->user_ptr );
4140 fprintf( stderr, ", manager=%04x", req->manager );
4141 dump_varargs_unicode_str( ", name=", cur_size );
4144 static void dump_delete_device_request( const struct delete_device_request *req )
4146 fprintf( stderr, " manager=%04x", req->manager );
4147 dump_uint64( ", device=", &req->device );
4150 static void dump_get_next_device_request_request( const struct get_next_device_request_request *req )
4152 fprintf( stderr, " manager=%04x", req->manager );
4153 fprintf( stderr, ", prev=%04x", req->prev );
4154 fprintf( stderr, ", status=%08x", req->status );
4155 dump_uint64( ", user_ptr=", &req->user_ptr );
4156 fprintf( stderr, ", pending=%d", req->pending );
4157 fprintf( stderr, ", iosb_status=%08x", req->iosb_status );
4158 fprintf( stderr, ", result=%u", req->result );
4159 dump_varargs_bytes( ", data=", cur_size );
4162 static void dump_get_next_device_request_reply( const struct get_next_device_request_reply *req )
4164 dump_irp_params( " params=", &req->params );
4165 fprintf( stderr, ", next=%04x", req->next );
4166 fprintf( stderr, ", client_tid=%04x", req->client_tid );
4167 dump_uint64( ", client_thread=", &req->client_thread );
4168 fprintf( stderr, ", in_size=%u", req->in_size );
4169 dump_varargs_bytes( ", next_data=", cur_size );
4172 static void dump_get_kernel_object_ptr_request( const struct get_kernel_object_ptr_request *req )
4174 fprintf( stderr, " manager=%04x", req->manager );
4175 fprintf( stderr, ", handle=%04x", req->handle );
4178 static void dump_get_kernel_object_ptr_reply( const struct get_kernel_object_ptr_reply *req )
4180 dump_uint64( " user_ptr=", &req->user_ptr );
4183 static void dump_set_kernel_object_ptr_request( const struct set_kernel_object_ptr_request *req )
4185 fprintf( stderr, " manager=%04x", req->manager );
4186 fprintf( stderr, ", handle=%04x", req->handle );
4187 dump_uint64( ", user_ptr=", &req->user_ptr );
4190 static void dump_grab_kernel_object_request( const struct grab_kernel_object_request *req )
4192 fprintf( stderr, " manager=%04x", req->manager );
4193 dump_uint64( ", user_ptr=", &req->user_ptr );
4196 static void dump_release_kernel_object_request( const struct release_kernel_object_request *req )
4198 fprintf( stderr, " manager=%04x", req->manager );
4199 dump_uint64( ", user_ptr=", &req->user_ptr );
4202 static void dump_get_kernel_object_handle_request( const struct get_kernel_object_handle_request *req )
4204 fprintf( stderr, " manager=%04x", req->manager );
4205 dump_uint64( ", user_ptr=", &req->user_ptr );
4206 fprintf( stderr, ", access=%08x", req->access );
4209 static void dump_get_kernel_object_handle_reply( const struct get_kernel_object_handle_reply *req )
4211 fprintf( stderr, " handle=%04x", req->handle );
4214 static void dump_make_process_system_request( const struct make_process_system_request *req )
4216 fprintf( stderr, " handle=%04x", req->handle );
4219 static void dump_make_process_system_reply( const struct make_process_system_reply *req )
4221 fprintf( stderr, " event=%04x", req->event );
4224 static void dump_get_token_info_request( const struct get_token_info_request *req )
4226 fprintf( stderr, " handle=%04x", req->handle );
4229 static void dump_get_token_info_reply( const struct get_token_info_reply *req )
4231 dump_luid( " token_id=", &req->token_id );
4232 dump_luid( ", modified_id=", &req->modified_id );
4233 fprintf( stderr, ", session_id=%08x", req->session_id );
4234 fprintf( stderr, ", primary=%d", req->primary );
4235 fprintf( stderr, ", impersonation_level=%d", req->impersonation_level );
4236 fprintf( stderr, ", elevation=%d", req->elevation );
4237 fprintf( stderr, ", group_count=%d", req->group_count );
4238 fprintf( stderr, ", privilege_count=%d", req->privilege_count );
4241 static void dump_create_linked_token_request( const struct create_linked_token_request *req )
4243 fprintf( stderr, " handle=%04x", req->handle );
4246 static void dump_create_linked_token_reply( const struct create_linked_token_reply *req )
4248 fprintf( stderr, " linked=%04x", req->linked );
4251 static void dump_create_completion_request( const struct create_completion_request *req )
4253 fprintf( stderr, " access=%08x", req->access );
4254 fprintf( stderr, ", concurrent=%08x", req->concurrent );
4255 dump_varargs_object_attributes( ", objattr=", cur_size );
4258 static void dump_create_completion_reply( const struct create_completion_reply *req )
4260 fprintf( stderr, " handle=%04x", req->handle );
4263 static void dump_open_completion_request( const struct open_completion_request *req )
4265 fprintf( stderr, " access=%08x", req->access );
4266 fprintf( stderr, ", attributes=%08x", req->attributes );
4267 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4268 dump_varargs_unicode_str( ", filename=", cur_size );
4271 static void dump_open_completion_reply( const struct open_completion_reply *req )
4273 fprintf( stderr, " handle=%04x", req->handle );
4276 static void dump_add_completion_request( const struct add_completion_request *req )
4278 fprintf( stderr, " handle=%04x", req->handle );
4279 dump_uint64( ", ckey=", &req->ckey );
4280 dump_uint64( ", cvalue=", &req->cvalue );
4281 dump_uint64( ", information=", &req->information );
4282 fprintf( stderr, ", status=%08x", req->status );
4285 static void dump_remove_completion_request( const struct remove_completion_request *req )
4287 fprintf( stderr, " handle=%04x", req->handle );
4290 static void dump_remove_completion_reply( const struct remove_completion_reply *req )
4292 dump_uint64( " ckey=", &req->ckey );
4293 dump_uint64( ", cvalue=", &req->cvalue );
4294 dump_uint64( ", information=", &req->information );
4295 fprintf( stderr, ", status=%08x", req->status );
4298 static void dump_query_completion_request( const struct query_completion_request *req )
4300 fprintf( stderr, " handle=%04x", req->handle );
4303 static void dump_query_completion_reply( const struct query_completion_reply *req )
4305 fprintf( stderr, " depth=%08x", req->depth );
4308 static void dump_set_completion_info_request( const struct set_completion_info_request *req )
4310 fprintf( stderr, " handle=%04x", req->handle );
4311 dump_uint64( ", ckey=", &req->ckey );
4312 fprintf( stderr, ", chandle=%04x", req->chandle );
4315 static void dump_add_fd_completion_request( const struct add_fd_completion_request *req )
4317 fprintf( stderr, " handle=%04x", req->handle );
4318 dump_uint64( ", cvalue=", &req->cvalue );
4319 dump_uint64( ", information=", &req->information );
4320 fprintf( stderr, ", status=%08x", req->status );
4321 fprintf( stderr, ", async=%d", req->async );
4324 static void dump_set_fd_completion_mode_request( const struct set_fd_completion_mode_request *req )
4326 fprintf( stderr, " handle=%04x", req->handle );
4327 fprintf( stderr, ", flags=%08x", req->flags );
4330 static void dump_set_fd_disp_info_request( const struct set_fd_disp_info_request *req )
4332 fprintf( stderr, " handle=%04x", req->handle );
4333 fprintf( stderr, ", unlink=%d", req->unlink );
4336 static void dump_set_fd_name_info_request( const struct set_fd_name_info_request *req )
4338 fprintf( stderr, " handle=%04x", req->handle );
4339 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4340 fprintf( stderr, ", namelen=%u", req->namelen );
4341 fprintf( stderr, ", link=%d", req->link );
4342 fprintf( stderr, ", replace=%d", req->replace );
4343 dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
4344 dump_varargs_string( ", filename=", cur_size );
4347 static void dump_set_fd_eof_info_request( const struct set_fd_eof_info_request *req )
4349 fprintf( stderr, " handle=%04x", req->handle );
4350 dump_uint64( ", eof=", &req->eof );
4353 static void dump_get_window_layered_info_request( const struct get_window_layered_info_request *req )
4355 fprintf( stderr, " handle=%08x", req->handle );
4358 static void dump_get_window_layered_info_reply( const struct get_window_layered_info_reply *req )
4360 fprintf( stderr, " color_key=%08x", req->color_key );
4361 fprintf( stderr, ", alpha=%08x", req->alpha );
4362 fprintf( stderr, ", flags=%08x", req->flags );
4365 static void dump_set_window_layered_info_request( const struct set_window_layered_info_request *req )
4367 fprintf( stderr, " handle=%08x", req->handle );
4368 fprintf( stderr, ", color_key=%08x", req->color_key );
4369 fprintf( stderr, ", alpha=%08x", req->alpha );
4370 fprintf( stderr, ", flags=%08x", req->flags );
4373 static void dump_alloc_user_handle_request( const struct alloc_user_handle_request *req )
4377 static void dump_alloc_user_handle_reply( const struct alloc_user_handle_reply *req )
4379 fprintf( stderr, " handle=%08x", req->handle );
4382 static void dump_free_user_handle_request( const struct free_user_handle_request *req )
4384 fprintf( stderr, " handle=%08x", req->handle );
4387 static void dump_set_cursor_request( const struct set_cursor_request *req )
4389 fprintf( stderr, " flags=%08x", req->flags );
4390 fprintf( stderr, ", handle=%08x", req->handle );
4391 fprintf( stderr, ", show_count=%d", req->show_count );
4392 fprintf( stderr, ", x=%d", req->x );
4393 fprintf( stderr, ", y=%d", req->y );
4394 dump_rectangle( ", clip=", &req->clip );
4395 fprintf( stderr, ", clip_msg=%08x", req->clip_msg );
4398 static void dump_set_cursor_reply( const struct set_cursor_reply *req )
4400 fprintf( stderr, " prev_handle=%08x", req->prev_handle );
4401 fprintf( stderr, ", prev_count=%d", req->prev_count );
4402 fprintf( stderr, ", prev_x=%d", req->prev_x );
4403 fprintf( stderr, ", prev_y=%d", req->prev_y );
4404 fprintf( stderr, ", new_x=%d", req->new_x );
4405 fprintf( stderr, ", new_y=%d", req->new_y );
4406 dump_rectangle( ", new_clip=", &req->new_clip );
4407 fprintf( stderr, ", last_change=%08x", req->last_change );
4410 static void dump_get_cursor_history_request( const struct get_cursor_history_request *req )
4414 static void dump_get_cursor_history_reply( const struct get_cursor_history_reply *req )
4416 dump_varargs_cursor_positions( " history=", cur_size );
4419 static void dump_get_rawinput_buffer_request( const struct get_rawinput_buffer_request *req )
4421 fprintf( stderr, " rawinput_size=%u", req->rawinput_size );
4422 fprintf( stderr, ", buffer_size=%u", req->buffer_size );
4425 static void dump_get_rawinput_buffer_reply( const struct get_rawinput_buffer_reply *req )
4427 fprintf( stderr, " next_size=%u", req->next_size );
4428 fprintf( stderr, ", count=%08x", req->count );
4429 dump_varargs_bytes( ", data=", cur_size );
4432 static void dump_update_rawinput_devices_request( const struct update_rawinput_devices_request *req )
4434 dump_varargs_rawinput_devices( " devices=", cur_size );
4437 static void dump_create_job_request( const struct create_job_request *req )
4439 fprintf( stderr, " access=%08x", req->access );
4440 dump_varargs_object_attributes( ", objattr=", cur_size );
4443 static void dump_create_job_reply( const struct create_job_reply *req )
4445 fprintf( stderr, " handle=%04x", req->handle );
4448 static void dump_open_job_request( const struct open_job_request *req )
4450 fprintf( stderr, " access=%08x", req->access );
4451 fprintf( stderr, ", attributes=%08x", req->attributes );
4452 fprintf( stderr, ", rootdir=%04x", req->rootdir );
4453 dump_varargs_unicode_str( ", name=", cur_size );
4456 static void dump_open_job_reply( const struct open_job_reply *req )
4458 fprintf( stderr, " handle=%04x", req->handle );
4461 static void dump_assign_job_request( const struct assign_job_request *req )
4463 fprintf( stderr, " job=%04x", req->job );
4464 fprintf( stderr, ", process=%04x", req->process );
4467 static void dump_process_in_job_request( const struct process_in_job_request *req )
4469 fprintf( stderr, " job=%04x", req->job );
4470 fprintf( stderr, ", process=%04x", req->process );
4473 static void dump_set_job_limits_request( const struct set_job_limits_request *req )
4475 fprintf( stderr, " handle=%04x", req->handle );
4476 fprintf( stderr, ", limit_flags=%08x", req->limit_flags );
4479 static void dump_set_job_completion_port_request( const struct set_job_completion_port_request *req )
4481 fprintf( stderr, " job=%04x", req->job );
4482 fprintf( stderr, ", port=%04x", req->port );
4483 dump_uint64( ", key=", &req->key );
4486 static void dump_get_job_info_request( const struct get_job_info_request *req )
4488 fprintf( stderr, " handle=%04x", req->handle );
4491 static void dump_get_job_info_reply( const struct get_job_info_reply *req )
4493 fprintf( stderr, " total_processes=%d", req->total_processes );
4494 fprintf( stderr, ", active_processes=%d", req->active_processes );
4495 dump_varargs_uints( ", pids=", cur_size );
4498 static void dump_terminate_job_request( const struct terminate_job_request *req )
4500 fprintf( stderr, " handle=%04x", req->handle );
4501 fprintf( stderr, ", status=%d", req->status );
4504 static void dump_suspend_process_request( const struct suspend_process_request *req )
4506 fprintf( stderr, " handle=%04x", req->handle );
4509 static void dump_resume_process_request( const struct resume_process_request *req )
4511 fprintf( stderr, " handle=%04x", req->handle );
4514 static void dump_get_next_thread_request( const struct get_next_thread_request *req )
4516 fprintf( stderr, " process=%04x", req->process );
4517 fprintf( stderr, ", last=%04x", req->last );
4518 fprintf( stderr, ", access=%08x", req->access );
4519 fprintf( stderr, ", attributes=%08x", req->attributes );
4520 fprintf( stderr, ", flags=%08x", req->flags );
4523 static void dump_get_next_thread_reply( const struct get_next_thread_reply *req )
4525 fprintf( stderr, " handle=%04x", req->handle );
4528 static const dump_func req_dumpers[REQ_NB_REQUESTS] = {
4529 (dump_func)dump_new_process_request,
4530 (dump_func)dump_get_new_process_info_request,
4531 (dump_func)dump_new_thread_request,
4532 (dump_func)dump_get_startup_info_request,
4533 (dump_func)dump_init_process_done_request,
4534 (dump_func)dump_init_first_thread_request,
4535 (dump_func)dump_init_thread_request,
4536 (dump_func)dump_terminate_process_request,
4537 (dump_func)dump_terminate_thread_request,
4538 (dump_func)dump_get_process_info_request,
4539 (dump_func)dump_get_process_debug_info_request,
4540 (dump_func)dump_get_process_image_name_request,
4541 (dump_func)dump_get_process_vm_counters_request,
4542 (dump_func)dump_set_process_info_request,
4543 (dump_func)dump_get_thread_info_request,
4544 (dump_func)dump_get_thread_times_request,
4545 (dump_func)dump_set_thread_info_request,
4546 (dump_func)dump_suspend_thread_request,
4547 (dump_func)dump_resume_thread_request,
4548 (dump_func)dump_queue_apc_request,
4549 (dump_func)dump_get_apc_result_request,
4550 (dump_func)dump_close_handle_request,
4551 (dump_func)dump_set_handle_info_request,
4552 (dump_func)dump_dup_handle_request,
4553 (dump_func)dump_compare_objects_request,
4554 (dump_func)dump_make_temporary_request,
4555 (dump_func)dump_open_process_request,
4556 (dump_func)dump_open_thread_request,
4557 (dump_func)dump_select_request,
4558 (dump_func)dump_create_event_request,
4559 (dump_func)dump_event_op_request,
4560 (dump_func)dump_query_event_request,
4561 (dump_func)dump_open_event_request,
4562 (dump_func)dump_create_keyed_event_request,
4563 (dump_func)dump_open_keyed_event_request,
4564 (dump_func)dump_create_mutex_request,
4565 (dump_func)dump_release_mutex_request,
4566 (dump_func)dump_open_mutex_request,
4567 (dump_func)dump_query_mutex_request,
4568 (dump_func)dump_create_semaphore_request,
4569 (dump_func)dump_release_semaphore_request,
4570 (dump_func)dump_query_semaphore_request,
4571 (dump_func)dump_open_semaphore_request,
4572 (dump_func)dump_create_file_request,
4573 (dump_func)dump_open_file_object_request,
4574 (dump_func)dump_alloc_file_handle_request,
4575 (dump_func)dump_get_handle_unix_name_request,
4576 (dump_func)dump_get_handle_fd_request,
4577 (dump_func)dump_get_directory_cache_entry_request,
4578 (dump_func)dump_flush_request,
4579 (dump_func)dump_get_file_info_request,
4580 (dump_func)dump_get_volume_info_request,
4581 (dump_func)dump_lock_file_request,
4582 (dump_func)dump_unlock_file_request,
4583 (dump_func)dump_recv_socket_request,
4584 (dump_func)dump_send_socket_request,
4585 (dump_func)dump_socket_send_icmp_id_request,
4586 (dump_func)dump_socket_get_icmp_id_request,
4587 (dump_func)dump_get_next_console_request_request,
4588 (dump_func)dump_read_directory_changes_request,
4589 (dump_func)dump_read_change_request,
4590 (dump_func)dump_create_mapping_request,
4591 (dump_func)dump_open_mapping_request,
4592 (dump_func)dump_get_mapping_info_request,
4593 (dump_func)dump_map_view_request,
4594 (dump_func)dump_unmap_view_request,
4595 (dump_func)dump_get_mapping_committed_range_request,
4596 (dump_func)dump_add_mapping_committed_range_request,
4597 (dump_func)dump_is_same_mapping_request,
4598 (dump_func)dump_get_mapping_filename_request,
4599 (dump_func)dump_list_processes_request,
4600 (dump_func)dump_create_debug_obj_request,
4601 (dump_func)dump_wait_debug_event_request,
4602 (dump_func)dump_queue_exception_event_request,
4603 (dump_func)dump_get_exception_status_request,
4604 (dump_func)dump_continue_debug_event_request,
4605 (dump_func)dump_debug_process_request,
4606 (dump_func)dump_set_debug_obj_info_request,
4607 (dump_func)dump_read_process_memory_request,
4608 (dump_func)dump_write_process_memory_request,
4609 (dump_func)dump_create_key_request,
4610 (dump_func)dump_open_key_request,
4611 (dump_func)dump_delete_key_request,
4612 (dump_func)dump_flush_key_request,
4613 (dump_func)dump_enum_key_request,
4614 (dump_func)dump_set_key_value_request,
4615 (dump_func)dump_get_key_value_request,
4616 (dump_func)dump_enum_key_value_request,
4617 (dump_func)dump_delete_key_value_request,
4618 (dump_func)dump_load_registry_request,
4619 (dump_func)dump_unload_registry_request,
4620 (dump_func)dump_save_registry_request,
4621 (dump_func)dump_set_registry_notification_request,
4622 (dump_func)dump_rename_key_request,
4623 (dump_func)dump_create_timer_request,
4624 (dump_func)dump_open_timer_request,
4625 (dump_func)dump_set_timer_request,
4626 (dump_func)dump_cancel_timer_request,
4627 (dump_func)dump_get_timer_info_request,
4628 (dump_func)dump_get_thread_context_request,
4629 (dump_func)dump_set_thread_context_request,
4630 (dump_func)dump_get_selector_entry_request,
4631 (dump_func)dump_add_atom_request,
4632 (dump_func)dump_delete_atom_request,
4633 (dump_func)dump_find_atom_request,
4634 (dump_func)dump_get_atom_information_request,
4635 (dump_func)dump_get_msg_queue_request,
4636 (dump_func)dump_set_queue_fd_request,
4637 (dump_func)dump_set_queue_mask_request,
4638 (dump_func)dump_get_queue_status_request,
4639 (dump_func)dump_get_process_idle_event_request,
4640 (dump_func)dump_send_message_request,
4641 (dump_func)dump_post_quit_message_request,
4642 (dump_func)dump_send_hardware_message_request,
4643 (dump_func)dump_get_message_request,
4644 (dump_func)dump_reply_message_request,
4645 (dump_func)dump_accept_hardware_message_request,
4646 (dump_func)dump_get_message_reply_request,
4647 (dump_func)dump_set_win_timer_request,
4648 (dump_func)dump_kill_win_timer_request,
4649 (dump_func)dump_is_window_hung_request,
4650 (dump_func)dump_get_serial_info_request,
4651 (dump_func)dump_set_serial_info_request,
4652 (dump_func)dump_cancel_sync_request,
4653 (dump_func)dump_register_async_request,
4654 (dump_func)dump_cancel_async_request,
4655 (dump_func)dump_get_async_result_request,
4656 (dump_func)dump_set_async_direct_result_request,
4657 (dump_func)dump_read_request,
4658 (dump_func)dump_write_request,
4659 (dump_func)dump_ioctl_request,
4660 (dump_func)dump_set_irp_result_request,
4661 (dump_func)dump_create_named_pipe_request,
4662 (dump_func)dump_set_named_pipe_info_request,
4663 (dump_func)dump_create_window_request,
4664 (dump_func)dump_destroy_window_request,
4665 (dump_func)dump_get_desktop_window_request,
4666 (dump_func)dump_set_window_owner_request,
4667 (dump_func)dump_get_window_info_request,
4668 (dump_func)dump_set_window_info_request,
4669 (dump_func)dump_set_parent_request,
4670 (dump_func)dump_get_window_parents_request,
4671 (dump_func)dump_get_window_children_request,
4672 (dump_func)dump_get_window_children_from_point_request,
4673 (dump_func)dump_get_window_tree_request,
4674 (dump_func)dump_set_window_pos_request,
4675 (dump_func)dump_get_window_rectangles_request,
4676 (dump_func)dump_get_window_text_request,
4677 (dump_func)dump_set_window_text_request,
4678 (dump_func)dump_get_windows_offset_request,
4679 (dump_func)dump_get_visible_region_request,
4680 (dump_func)dump_get_surface_region_request,
4681 (dump_func)dump_get_window_region_request,
4682 (dump_func)dump_set_window_region_request,
4683 (dump_func)dump_get_update_region_request,
4684 (dump_func)dump_update_window_zorder_request,
4685 (dump_func)dump_redraw_window_request,
4686 (dump_func)dump_set_window_property_request,
4687 (dump_func)dump_remove_window_property_request,
4688 (dump_func)dump_get_window_property_request,
4689 (dump_func)dump_get_window_properties_request,
4690 (dump_func)dump_create_winstation_request,
4691 (dump_func)dump_open_winstation_request,
4692 (dump_func)dump_close_winstation_request,
4693 (dump_func)dump_get_process_winstation_request,
4694 (dump_func)dump_set_process_winstation_request,
4695 (dump_func)dump_enum_winstation_request,
4696 (dump_func)dump_create_desktop_request,
4697 (dump_func)dump_open_desktop_request,
4698 (dump_func)dump_open_input_desktop_request,
4699 (dump_func)dump_close_desktop_request,
4700 (dump_func)dump_get_thread_desktop_request,
4701 (dump_func)dump_set_thread_desktop_request,
4702 (dump_func)dump_enum_desktop_request,
4703 (dump_func)dump_set_user_object_info_request,
4704 (dump_func)dump_register_hotkey_request,
4705 (dump_func)dump_unregister_hotkey_request,
4706 (dump_func)dump_attach_thread_input_request,
4707 (dump_func)dump_get_thread_input_request,
4708 (dump_func)dump_get_last_input_time_request,
4709 (dump_func)dump_get_key_state_request,
4710 (dump_func)dump_set_key_state_request,
4711 (dump_func)dump_set_foreground_window_request,
4712 (dump_func)dump_set_focus_window_request,
4713 (dump_func)dump_set_active_window_request,
4714 (dump_func)dump_set_capture_window_request,
4715 (dump_func)dump_set_caret_window_request,
4716 (dump_func)dump_set_caret_info_request,
4717 (dump_func)dump_set_hook_request,
4718 (dump_func)dump_remove_hook_request,
4719 (dump_func)dump_start_hook_chain_request,
4720 (dump_func)dump_finish_hook_chain_request,
4721 (dump_func)dump_get_hook_info_request,
4722 (dump_func)dump_create_class_request,
4723 (dump_func)dump_destroy_class_request,
4724 (dump_func)dump_set_class_info_request,
4725 (dump_func)dump_open_clipboard_request,
4726 (dump_func)dump_close_clipboard_request,
4727 (dump_func)dump_empty_clipboard_request,
4728 (dump_func)dump_set_clipboard_data_request,
4729 (dump_func)dump_get_clipboard_data_request,
4730 (dump_func)dump_get_clipboard_formats_request,
4731 (dump_func)dump_enum_clipboard_formats_request,
4732 (dump_func)dump_release_clipboard_request,
4733 (dump_func)dump_get_clipboard_info_request,
4734 (dump_func)dump_set_clipboard_viewer_request,
4735 (dump_func)dump_add_clipboard_listener_request,
4736 (dump_func)dump_remove_clipboard_listener_request,
4737 (dump_func)dump_open_token_request,
4738 (dump_func)dump_set_global_windows_request,
4739 (dump_func)dump_adjust_token_privileges_request,
4740 (dump_func)dump_get_token_privileges_request,
4741 (dump_func)dump_check_token_privileges_request,
4742 (dump_func)dump_duplicate_token_request,
4743 (dump_func)dump_filter_token_request,
4744 (dump_func)dump_access_check_request,
4745 (dump_func)dump_get_token_sid_request,
4746 (dump_func)dump_get_token_groups_request,
4747 (dump_func)dump_get_token_default_dacl_request,
4748 (dump_func)dump_set_token_default_dacl_request,
4749 (dump_func)dump_set_security_object_request,
4750 (dump_func)dump_get_security_object_request,
4751 (dump_func)dump_get_system_handles_request,
4752 (dump_func)dump_create_mailslot_request,
4753 (dump_func)dump_set_mailslot_info_request,
4754 (dump_func)dump_create_directory_request,
4755 (dump_func)dump_open_directory_request,
4756 (dump_func)dump_get_directory_entry_request,
4757 (dump_func)dump_create_symlink_request,
4758 (dump_func)dump_open_symlink_request,
4759 (dump_func)dump_query_symlink_request,
4760 (dump_func)dump_get_object_info_request,
4761 (dump_func)dump_get_object_name_request,
4762 (dump_func)dump_get_object_type_request,
4763 (dump_func)dump_get_object_types_request,
4764 (dump_func)dump_allocate_locally_unique_id_request,
4765 (dump_func)dump_create_device_manager_request,
4766 (dump_func)dump_create_device_request,
4767 (dump_func)dump_delete_device_request,
4768 (dump_func)dump_get_next_device_request_request,
4769 (dump_func)dump_get_kernel_object_ptr_request,
4770 (dump_func)dump_set_kernel_object_ptr_request,
4771 (dump_func)dump_grab_kernel_object_request,
4772 (dump_func)dump_release_kernel_object_request,
4773 (dump_func)dump_get_kernel_object_handle_request,
4774 (dump_func)dump_make_process_system_request,
4775 (dump_func)dump_get_token_info_request,
4776 (dump_func)dump_create_linked_token_request,
4777 (dump_func)dump_create_completion_request,
4778 (dump_func)dump_open_completion_request,
4779 (dump_func)dump_add_completion_request,
4780 (dump_func)dump_remove_completion_request,
4781 (dump_func)dump_query_completion_request,
4782 (dump_func)dump_set_completion_info_request,
4783 (dump_func)dump_add_fd_completion_request,
4784 (dump_func)dump_set_fd_completion_mode_request,
4785 (dump_func)dump_set_fd_disp_info_request,
4786 (dump_func)dump_set_fd_name_info_request,
4787 (dump_func)dump_set_fd_eof_info_request,
4788 (dump_func)dump_get_window_layered_info_request,
4789 (dump_func)dump_set_window_layered_info_request,
4790 (dump_func)dump_alloc_user_handle_request,
4791 (dump_func)dump_free_user_handle_request,
4792 (dump_func)dump_set_cursor_request,
4793 (dump_func)dump_get_cursor_history_request,
4794 (dump_func)dump_get_rawinput_buffer_request,
4795 (dump_func)dump_update_rawinput_devices_request,
4796 (dump_func)dump_create_job_request,
4797 (dump_func)dump_open_job_request,
4798 (dump_func)dump_assign_job_request,
4799 (dump_func)dump_process_in_job_request,
4800 (dump_func)dump_set_job_limits_request,
4801 (dump_func)dump_set_job_completion_port_request,
4802 (dump_func)dump_get_job_info_request,
4803 (dump_func)dump_terminate_job_request,
4804 (dump_func)dump_suspend_process_request,
4805 (dump_func)dump_resume_process_request,
4806 (dump_func)dump_get_next_thread_request,
4809 static const dump_func reply_dumpers[REQ_NB_REQUESTS] = {
4810 (dump_func)dump_new_process_reply,
4811 (dump_func)dump_get_new_process_info_reply,
4812 (dump_func)dump_new_thread_reply,
4813 (dump_func)dump_get_startup_info_reply,
4814 (dump_func)dump_init_process_done_reply,
4815 (dump_func)dump_init_first_thread_reply,
4816 (dump_func)dump_init_thread_reply,
4817 (dump_func)dump_terminate_process_reply,
4818 (dump_func)dump_terminate_thread_reply,
4819 (dump_func)dump_get_process_info_reply,
4820 (dump_func)dump_get_process_debug_info_reply,
4821 (dump_func)dump_get_process_image_name_reply,
4822 (dump_func)dump_get_process_vm_counters_reply,
4823 NULL,
4824 (dump_func)dump_get_thread_info_reply,
4825 (dump_func)dump_get_thread_times_reply,
4826 NULL,
4827 (dump_func)dump_suspend_thread_reply,
4828 (dump_func)dump_resume_thread_reply,
4829 (dump_func)dump_queue_apc_reply,
4830 (dump_func)dump_get_apc_result_reply,
4831 NULL,
4832 (dump_func)dump_set_handle_info_reply,
4833 (dump_func)dump_dup_handle_reply,
4834 NULL,
4835 NULL,
4836 (dump_func)dump_open_process_reply,
4837 (dump_func)dump_open_thread_reply,
4838 (dump_func)dump_select_reply,
4839 (dump_func)dump_create_event_reply,
4840 (dump_func)dump_event_op_reply,
4841 (dump_func)dump_query_event_reply,
4842 (dump_func)dump_open_event_reply,
4843 (dump_func)dump_create_keyed_event_reply,
4844 (dump_func)dump_open_keyed_event_reply,
4845 (dump_func)dump_create_mutex_reply,
4846 (dump_func)dump_release_mutex_reply,
4847 (dump_func)dump_open_mutex_reply,
4848 (dump_func)dump_query_mutex_reply,
4849 (dump_func)dump_create_semaphore_reply,
4850 (dump_func)dump_release_semaphore_reply,
4851 (dump_func)dump_query_semaphore_reply,
4852 (dump_func)dump_open_semaphore_reply,
4853 (dump_func)dump_create_file_reply,
4854 (dump_func)dump_open_file_object_reply,
4855 (dump_func)dump_alloc_file_handle_reply,
4856 (dump_func)dump_get_handle_unix_name_reply,
4857 (dump_func)dump_get_handle_fd_reply,
4858 (dump_func)dump_get_directory_cache_entry_reply,
4859 (dump_func)dump_flush_reply,
4860 (dump_func)dump_get_file_info_reply,
4861 (dump_func)dump_get_volume_info_reply,
4862 (dump_func)dump_lock_file_reply,
4863 NULL,
4864 (dump_func)dump_recv_socket_reply,
4865 (dump_func)dump_send_socket_reply,
4866 NULL,
4867 (dump_func)dump_socket_get_icmp_id_reply,
4868 (dump_func)dump_get_next_console_request_reply,
4869 NULL,
4870 (dump_func)dump_read_change_reply,
4871 (dump_func)dump_create_mapping_reply,
4872 (dump_func)dump_open_mapping_reply,
4873 (dump_func)dump_get_mapping_info_reply,
4874 NULL,
4875 NULL,
4876 (dump_func)dump_get_mapping_committed_range_reply,
4877 NULL,
4878 NULL,
4879 (dump_func)dump_get_mapping_filename_reply,
4880 (dump_func)dump_list_processes_reply,
4881 (dump_func)dump_create_debug_obj_reply,
4882 (dump_func)dump_wait_debug_event_reply,
4883 (dump_func)dump_queue_exception_event_reply,
4884 NULL,
4885 NULL,
4886 NULL,
4887 NULL,
4888 (dump_func)dump_read_process_memory_reply,
4889 NULL,
4890 (dump_func)dump_create_key_reply,
4891 (dump_func)dump_open_key_reply,
4892 NULL,
4893 NULL,
4894 (dump_func)dump_enum_key_reply,
4895 NULL,
4896 (dump_func)dump_get_key_value_reply,
4897 (dump_func)dump_enum_key_value_reply,
4898 NULL,
4899 NULL,
4900 NULL,
4901 NULL,
4902 NULL,
4903 NULL,
4904 (dump_func)dump_create_timer_reply,
4905 (dump_func)dump_open_timer_reply,
4906 (dump_func)dump_set_timer_reply,
4907 (dump_func)dump_cancel_timer_reply,
4908 (dump_func)dump_get_timer_info_reply,
4909 (dump_func)dump_get_thread_context_reply,
4910 (dump_func)dump_set_thread_context_reply,
4911 (dump_func)dump_get_selector_entry_reply,
4912 (dump_func)dump_add_atom_reply,
4913 NULL,
4914 (dump_func)dump_find_atom_reply,
4915 (dump_func)dump_get_atom_information_reply,
4916 (dump_func)dump_get_msg_queue_reply,
4917 NULL,
4918 (dump_func)dump_set_queue_mask_reply,
4919 (dump_func)dump_get_queue_status_reply,
4920 (dump_func)dump_get_process_idle_event_reply,
4921 NULL,
4922 NULL,
4923 (dump_func)dump_send_hardware_message_reply,
4924 (dump_func)dump_get_message_reply,
4925 NULL,
4926 NULL,
4927 (dump_func)dump_get_message_reply_reply,
4928 (dump_func)dump_set_win_timer_reply,
4929 NULL,
4930 (dump_func)dump_is_window_hung_reply,
4931 (dump_func)dump_get_serial_info_reply,
4932 NULL,
4933 NULL,
4934 NULL,
4935 NULL,
4936 (dump_func)dump_get_async_result_reply,
4937 (dump_func)dump_set_async_direct_result_reply,
4938 (dump_func)dump_read_reply,
4939 (dump_func)dump_write_reply,
4940 (dump_func)dump_ioctl_reply,
4941 NULL,
4942 (dump_func)dump_create_named_pipe_reply,
4943 NULL,
4944 (dump_func)dump_create_window_reply,
4945 NULL,
4946 (dump_func)dump_get_desktop_window_reply,
4947 (dump_func)dump_set_window_owner_reply,
4948 (dump_func)dump_get_window_info_reply,
4949 (dump_func)dump_set_window_info_reply,
4950 (dump_func)dump_set_parent_reply,
4951 (dump_func)dump_get_window_parents_reply,
4952 (dump_func)dump_get_window_children_reply,
4953 (dump_func)dump_get_window_children_from_point_reply,
4954 (dump_func)dump_get_window_tree_reply,
4955 (dump_func)dump_set_window_pos_reply,
4956 (dump_func)dump_get_window_rectangles_reply,
4957 (dump_func)dump_get_window_text_reply,
4958 NULL,
4959 (dump_func)dump_get_windows_offset_reply,
4960 (dump_func)dump_get_visible_region_reply,
4961 (dump_func)dump_get_surface_region_reply,
4962 (dump_func)dump_get_window_region_reply,
4963 NULL,
4964 (dump_func)dump_get_update_region_reply,
4965 NULL,
4966 NULL,
4967 NULL,
4968 (dump_func)dump_remove_window_property_reply,
4969 (dump_func)dump_get_window_property_reply,
4970 (dump_func)dump_get_window_properties_reply,
4971 (dump_func)dump_create_winstation_reply,
4972 (dump_func)dump_open_winstation_reply,
4973 NULL,
4974 (dump_func)dump_get_process_winstation_reply,
4975 NULL,
4976 (dump_func)dump_enum_winstation_reply,
4977 (dump_func)dump_create_desktop_reply,
4978 (dump_func)dump_open_desktop_reply,
4979 (dump_func)dump_open_input_desktop_reply,
4980 NULL,
4981 (dump_func)dump_get_thread_desktop_reply,
4982 NULL,
4983 (dump_func)dump_enum_desktop_reply,
4984 (dump_func)dump_set_user_object_info_reply,
4985 (dump_func)dump_register_hotkey_reply,
4986 (dump_func)dump_unregister_hotkey_reply,
4987 NULL,
4988 (dump_func)dump_get_thread_input_reply,
4989 (dump_func)dump_get_last_input_time_reply,
4990 (dump_func)dump_get_key_state_reply,
4991 NULL,
4992 (dump_func)dump_set_foreground_window_reply,
4993 (dump_func)dump_set_focus_window_reply,
4994 (dump_func)dump_set_active_window_reply,
4995 (dump_func)dump_set_capture_window_reply,
4996 (dump_func)dump_set_caret_window_reply,
4997 (dump_func)dump_set_caret_info_reply,
4998 (dump_func)dump_set_hook_reply,
4999 (dump_func)dump_remove_hook_reply,
5000 (dump_func)dump_start_hook_chain_reply,
5001 NULL,
5002 (dump_func)dump_get_hook_info_reply,
5003 (dump_func)dump_create_class_reply,
5004 (dump_func)dump_destroy_class_reply,
5005 (dump_func)dump_set_class_info_reply,
5006 (dump_func)dump_open_clipboard_reply,
5007 (dump_func)dump_close_clipboard_reply,
5008 NULL,
5009 (dump_func)dump_set_clipboard_data_reply,
5010 (dump_func)dump_get_clipboard_data_reply,
5011 (dump_func)dump_get_clipboard_formats_reply,
5012 (dump_func)dump_enum_clipboard_formats_reply,
5013 (dump_func)dump_release_clipboard_reply,
5014 (dump_func)dump_get_clipboard_info_reply,
5015 (dump_func)dump_set_clipboard_viewer_reply,
5016 NULL,
5017 NULL,
5018 (dump_func)dump_open_token_reply,
5019 (dump_func)dump_set_global_windows_reply,
5020 (dump_func)dump_adjust_token_privileges_reply,
5021 (dump_func)dump_get_token_privileges_reply,
5022 (dump_func)dump_check_token_privileges_reply,
5023 (dump_func)dump_duplicate_token_reply,
5024 (dump_func)dump_filter_token_reply,
5025 (dump_func)dump_access_check_reply,
5026 (dump_func)dump_get_token_sid_reply,
5027 (dump_func)dump_get_token_groups_reply,
5028 (dump_func)dump_get_token_default_dacl_reply,
5029 NULL,
5030 NULL,
5031 (dump_func)dump_get_security_object_reply,
5032 (dump_func)dump_get_system_handles_reply,
5033 (dump_func)dump_create_mailslot_reply,
5034 (dump_func)dump_set_mailslot_info_reply,
5035 (dump_func)dump_create_directory_reply,
5036 (dump_func)dump_open_directory_reply,
5037 (dump_func)dump_get_directory_entry_reply,
5038 (dump_func)dump_create_symlink_reply,
5039 (dump_func)dump_open_symlink_reply,
5040 (dump_func)dump_query_symlink_reply,
5041 (dump_func)dump_get_object_info_reply,
5042 (dump_func)dump_get_object_name_reply,
5043 (dump_func)dump_get_object_type_reply,
5044 (dump_func)dump_get_object_types_reply,
5045 (dump_func)dump_allocate_locally_unique_id_reply,
5046 (dump_func)dump_create_device_manager_reply,
5047 NULL,
5048 NULL,
5049 (dump_func)dump_get_next_device_request_reply,
5050 (dump_func)dump_get_kernel_object_ptr_reply,
5051 NULL,
5052 NULL,
5053 NULL,
5054 (dump_func)dump_get_kernel_object_handle_reply,
5055 (dump_func)dump_make_process_system_reply,
5056 (dump_func)dump_get_token_info_reply,
5057 (dump_func)dump_create_linked_token_reply,
5058 (dump_func)dump_create_completion_reply,
5059 (dump_func)dump_open_completion_reply,
5060 NULL,
5061 (dump_func)dump_remove_completion_reply,
5062 (dump_func)dump_query_completion_reply,
5063 NULL,
5064 NULL,
5065 NULL,
5066 NULL,
5067 NULL,
5068 NULL,
5069 (dump_func)dump_get_window_layered_info_reply,
5070 NULL,
5071 (dump_func)dump_alloc_user_handle_reply,
5072 NULL,
5073 (dump_func)dump_set_cursor_reply,
5074 (dump_func)dump_get_cursor_history_reply,
5075 (dump_func)dump_get_rawinput_buffer_reply,
5076 NULL,
5077 (dump_func)dump_create_job_reply,
5078 (dump_func)dump_open_job_reply,
5079 NULL,
5080 NULL,
5081 NULL,
5082 NULL,
5083 (dump_func)dump_get_job_info_reply,
5084 NULL,
5085 NULL,
5086 NULL,
5087 (dump_func)dump_get_next_thread_reply,
5090 static const char * const req_names[REQ_NB_REQUESTS] = {
5091 "new_process",
5092 "get_new_process_info",
5093 "new_thread",
5094 "get_startup_info",
5095 "init_process_done",
5096 "init_first_thread",
5097 "init_thread",
5098 "terminate_process",
5099 "terminate_thread",
5100 "get_process_info",
5101 "get_process_debug_info",
5102 "get_process_image_name",
5103 "get_process_vm_counters",
5104 "set_process_info",
5105 "get_thread_info",
5106 "get_thread_times",
5107 "set_thread_info",
5108 "suspend_thread",
5109 "resume_thread",
5110 "queue_apc",
5111 "get_apc_result",
5112 "close_handle",
5113 "set_handle_info",
5114 "dup_handle",
5115 "compare_objects",
5116 "make_temporary",
5117 "open_process",
5118 "open_thread",
5119 "select",
5120 "create_event",
5121 "event_op",
5122 "query_event",
5123 "open_event",
5124 "create_keyed_event",
5125 "open_keyed_event",
5126 "create_mutex",
5127 "release_mutex",
5128 "open_mutex",
5129 "query_mutex",
5130 "create_semaphore",
5131 "release_semaphore",
5132 "query_semaphore",
5133 "open_semaphore",
5134 "create_file",
5135 "open_file_object",
5136 "alloc_file_handle",
5137 "get_handle_unix_name",
5138 "get_handle_fd",
5139 "get_directory_cache_entry",
5140 "flush",
5141 "get_file_info",
5142 "get_volume_info",
5143 "lock_file",
5144 "unlock_file",
5145 "recv_socket",
5146 "send_socket",
5147 "socket_send_icmp_id",
5148 "socket_get_icmp_id",
5149 "get_next_console_request",
5150 "read_directory_changes",
5151 "read_change",
5152 "create_mapping",
5153 "open_mapping",
5154 "get_mapping_info",
5155 "map_view",
5156 "unmap_view",
5157 "get_mapping_committed_range",
5158 "add_mapping_committed_range",
5159 "is_same_mapping",
5160 "get_mapping_filename",
5161 "list_processes",
5162 "create_debug_obj",
5163 "wait_debug_event",
5164 "queue_exception_event",
5165 "get_exception_status",
5166 "continue_debug_event",
5167 "debug_process",
5168 "set_debug_obj_info",
5169 "read_process_memory",
5170 "write_process_memory",
5171 "create_key",
5172 "open_key",
5173 "delete_key",
5174 "flush_key",
5175 "enum_key",
5176 "set_key_value",
5177 "get_key_value",
5178 "enum_key_value",
5179 "delete_key_value",
5180 "load_registry",
5181 "unload_registry",
5182 "save_registry",
5183 "set_registry_notification",
5184 "rename_key",
5185 "create_timer",
5186 "open_timer",
5187 "set_timer",
5188 "cancel_timer",
5189 "get_timer_info",
5190 "get_thread_context",
5191 "set_thread_context",
5192 "get_selector_entry",
5193 "add_atom",
5194 "delete_atom",
5195 "find_atom",
5196 "get_atom_information",
5197 "get_msg_queue",
5198 "set_queue_fd",
5199 "set_queue_mask",
5200 "get_queue_status",
5201 "get_process_idle_event",
5202 "send_message",
5203 "post_quit_message",
5204 "send_hardware_message",
5205 "get_message",
5206 "reply_message",
5207 "accept_hardware_message",
5208 "get_message_reply",
5209 "set_win_timer",
5210 "kill_win_timer",
5211 "is_window_hung",
5212 "get_serial_info",
5213 "set_serial_info",
5214 "cancel_sync",
5215 "register_async",
5216 "cancel_async",
5217 "get_async_result",
5218 "set_async_direct_result",
5219 "read",
5220 "write",
5221 "ioctl",
5222 "set_irp_result",
5223 "create_named_pipe",
5224 "set_named_pipe_info",
5225 "create_window",
5226 "destroy_window",
5227 "get_desktop_window",
5228 "set_window_owner",
5229 "get_window_info",
5230 "set_window_info",
5231 "set_parent",
5232 "get_window_parents",
5233 "get_window_children",
5234 "get_window_children_from_point",
5235 "get_window_tree",
5236 "set_window_pos",
5237 "get_window_rectangles",
5238 "get_window_text",
5239 "set_window_text",
5240 "get_windows_offset",
5241 "get_visible_region",
5242 "get_surface_region",
5243 "get_window_region",
5244 "set_window_region",
5245 "get_update_region",
5246 "update_window_zorder",
5247 "redraw_window",
5248 "set_window_property",
5249 "remove_window_property",
5250 "get_window_property",
5251 "get_window_properties",
5252 "create_winstation",
5253 "open_winstation",
5254 "close_winstation",
5255 "get_process_winstation",
5256 "set_process_winstation",
5257 "enum_winstation",
5258 "create_desktop",
5259 "open_desktop",
5260 "open_input_desktop",
5261 "close_desktop",
5262 "get_thread_desktop",
5263 "set_thread_desktop",
5264 "enum_desktop",
5265 "set_user_object_info",
5266 "register_hotkey",
5267 "unregister_hotkey",
5268 "attach_thread_input",
5269 "get_thread_input",
5270 "get_last_input_time",
5271 "get_key_state",
5272 "set_key_state",
5273 "set_foreground_window",
5274 "set_focus_window",
5275 "set_active_window",
5276 "set_capture_window",
5277 "set_caret_window",
5278 "set_caret_info",
5279 "set_hook",
5280 "remove_hook",
5281 "start_hook_chain",
5282 "finish_hook_chain",
5283 "get_hook_info",
5284 "create_class",
5285 "destroy_class",
5286 "set_class_info",
5287 "open_clipboard",
5288 "close_clipboard",
5289 "empty_clipboard",
5290 "set_clipboard_data",
5291 "get_clipboard_data",
5292 "get_clipboard_formats",
5293 "enum_clipboard_formats",
5294 "release_clipboard",
5295 "get_clipboard_info",
5296 "set_clipboard_viewer",
5297 "add_clipboard_listener",
5298 "remove_clipboard_listener",
5299 "open_token",
5300 "set_global_windows",
5301 "adjust_token_privileges",
5302 "get_token_privileges",
5303 "check_token_privileges",
5304 "duplicate_token",
5305 "filter_token",
5306 "access_check",
5307 "get_token_sid",
5308 "get_token_groups",
5309 "get_token_default_dacl",
5310 "set_token_default_dacl",
5311 "set_security_object",
5312 "get_security_object",
5313 "get_system_handles",
5314 "create_mailslot",
5315 "set_mailslot_info",
5316 "create_directory",
5317 "open_directory",
5318 "get_directory_entry",
5319 "create_symlink",
5320 "open_symlink",
5321 "query_symlink",
5322 "get_object_info",
5323 "get_object_name",
5324 "get_object_type",
5325 "get_object_types",
5326 "allocate_locally_unique_id",
5327 "create_device_manager",
5328 "create_device",
5329 "delete_device",
5330 "get_next_device_request",
5331 "get_kernel_object_ptr",
5332 "set_kernel_object_ptr",
5333 "grab_kernel_object",
5334 "release_kernel_object",
5335 "get_kernel_object_handle",
5336 "make_process_system",
5337 "get_token_info",
5338 "create_linked_token",
5339 "create_completion",
5340 "open_completion",
5341 "add_completion",
5342 "remove_completion",
5343 "query_completion",
5344 "set_completion_info",
5345 "add_fd_completion",
5346 "set_fd_completion_mode",
5347 "set_fd_disp_info",
5348 "set_fd_name_info",
5349 "set_fd_eof_info",
5350 "get_window_layered_info",
5351 "set_window_layered_info",
5352 "alloc_user_handle",
5353 "free_user_handle",
5354 "set_cursor",
5355 "get_cursor_history",
5356 "get_rawinput_buffer",
5357 "update_rawinput_devices",
5358 "create_job",
5359 "open_job",
5360 "assign_job",
5361 "process_in_job",
5362 "set_job_limits",
5363 "set_job_completion_port",
5364 "get_job_info",
5365 "terminate_job",
5366 "suspend_process",
5367 "resume_process",
5368 "get_next_thread",
5371 static const struct
5373 const char *name;
5374 unsigned int value;
5375 } status_names[] =
5377 { "ABANDONED_WAIT_0", STATUS_ABANDONED_WAIT_0 },
5378 { "ACCESS_DENIED", STATUS_ACCESS_DENIED },
5379 { "ACCESS_VIOLATION", STATUS_ACCESS_VIOLATION },
5380 { "ADDRESS_ALREADY_ASSOCIATED", STATUS_ADDRESS_ALREADY_ASSOCIATED },
5381 { "ALERTED", STATUS_ALERTED },
5382 { "BAD_DEVICE_TYPE", STATUS_BAD_DEVICE_TYPE },
5383 { "BAD_IMPERSONATION_LEVEL", STATUS_BAD_IMPERSONATION_LEVEL },
5384 { "BUFFER_OVERFLOW", STATUS_BUFFER_OVERFLOW },
5385 { "BUFFER_TOO_SMALL", STATUS_BUFFER_TOO_SMALL },
5386 { "CANCELLED", STATUS_CANCELLED },
5387 { "CANNOT_DELETE", STATUS_CANNOT_DELETE },
5388 { "CANT_OPEN_ANONYMOUS", STATUS_CANT_OPEN_ANONYMOUS },
5389 { "CHILD_MUST_BE_VOLATILE", STATUS_CHILD_MUST_BE_VOLATILE },
5390 { "CONNECTION_ABORTED", STATUS_CONNECTION_ABORTED },
5391 { "CONNECTION_ACTIVE", STATUS_CONNECTION_ACTIVE },
5392 { "CONNECTION_REFUSED", STATUS_CONNECTION_REFUSED },
5393 { "CONNECTION_RESET", STATUS_CONNECTION_RESET },
5394 { "DEBUGGER_INACTIVE", STATUS_DEBUGGER_INACTIVE },
5395 { "DEVICE_BUSY", STATUS_DEVICE_BUSY },
5396 { "DEVICE_NOT_READY", STATUS_DEVICE_NOT_READY },
5397 { "DIRECTORY_NOT_EMPTY", STATUS_DIRECTORY_NOT_EMPTY },
5398 { "DISK_FULL", STATUS_DISK_FULL },
5399 { "DLL_NOT_FOUND", STATUS_DLL_NOT_FOUND },
5400 { "ERROR_CLASS_ALREADY_EXISTS", 0xc0010000 | ERROR_CLASS_ALREADY_EXISTS },
5401 { "ERROR_CLASS_DOES_NOT_EXIST", 0xc0010000 | ERROR_CLASS_DOES_NOT_EXIST },
5402 { "ERROR_CLASS_HAS_WINDOWS", 0xc0010000 | ERROR_CLASS_HAS_WINDOWS },
5403 { "ERROR_CLIPBOARD_NOT_OPEN", 0xc0010000 | ERROR_CLIPBOARD_NOT_OPEN },
5404 { "ERROR_HOTKEY_ALREADY_REGISTERED", 0xc0010000 | ERROR_HOTKEY_ALREADY_REGISTERED },
5405 { "ERROR_HOTKEY_NOT_REGISTERED", 0xc0010000 | ERROR_HOTKEY_NOT_REGISTERED },
5406 { "ERROR_INVALID_CURSOR_HANDLE", 0xc0010000 | ERROR_INVALID_CURSOR_HANDLE },
5407 { "ERROR_INVALID_INDEX", 0xc0010000 | ERROR_INVALID_INDEX },
5408 { "ERROR_INVALID_WINDOW_HANDLE", 0xc0010000 | ERROR_INVALID_WINDOW_HANDLE },
5409 { "ERROR_NO_MORE_USER_HANDLES", 0xc0010000 | ERROR_NO_MORE_USER_HANDLES },
5410 { "ERROR_WINDOW_OF_OTHER_THREAD", 0xc0010000 | ERROR_WINDOW_OF_OTHER_THREAD },
5411 { "FILE_DELETED", STATUS_FILE_DELETED },
5412 { "FILE_INVALID", STATUS_FILE_INVALID },
5413 { "FILE_IS_A_DIRECTORY", STATUS_FILE_IS_A_DIRECTORY },
5414 { "FILE_LOCK_CONFLICT", STATUS_FILE_LOCK_CONFLICT },
5415 { "GENERIC_NOT_MAPPED", STATUS_GENERIC_NOT_MAPPED },
5416 { "HANDLES_CLOSED", STATUS_HANDLES_CLOSED },
5417 { "HANDLE_NOT_CLOSABLE", STATUS_HANDLE_NOT_CLOSABLE },
5418 { "HOST_UNREACHABLE", STATUS_HOST_UNREACHABLE },
5419 { "ILLEGAL_FUNCTION", STATUS_ILLEGAL_FUNCTION },
5420 { "IMAGE_NOT_AT_BASE", STATUS_IMAGE_NOT_AT_BASE },
5421 { "INFO_LENGTH_MISMATCH", STATUS_INFO_LENGTH_MISMATCH },
5422 { "INSTANCE_NOT_AVAILABLE", STATUS_INSTANCE_NOT_AVAILABLE },
5423 { "INSUFFICIENT_RESOURCES", STATUS_INSUFFICIENT_RESOURCES },
5424 { "INVALID_ACL", STATUS_INVALID_ACL },
5425 { "INVALID_ADDRESS", STATUS_INVALID_ADDRESS },
5426 { "INVALID_ADDRESS_COMPONENT", STATUS_INVALID_ADDRESS_COMPONENT },
5427 { "INVALID_CID", STATUS_INVALID_CID },
5428 { "INVALID_CONNECTION", STATUS_INVALID_CONNECTION },
5429 { "INVALID_DEVICE_REQUEST", STATUS_INVALID_DEVICE_REQUEST },
5430 { "INVALID_FILE_FOR_SECTION", STATUS_INVALID_FILE_FOR_SECTION },
5431 { "INVALID_HANDLE", STATUS_INVALID_HANDLE },
5432 { "INVALID_IMAGE_FORMAT", STATUS_INVALID_IMAGE_FORMAT },
5433 { "INVALID_IMAGE_NE_FORMAT", STATUS_INVALID_IMAGE_NE_FORMAT },
5434 { "INVALID_IMAGE_NOT_MZ", STATUS_INVALID_IMAGE_NOT_MZ },
5435 { "INVALID_IMAGE_PROTECT", STATUS_INVALID_IMAGE_PROTECT },
5436 { "INVALID_IMAGE_WIN_16", STATUS_INVALID_IMAGE_WIN_16 },
5437 { "INVALID_IMAGE_WIN_64", STATUS_INVALID_IMAGE_WIN_64 },
5438 { "INVALID_LOCK_SEQUENCE", STATUS_INVALID_LOCK_SEQUENCE },
5439 { "INVALID_OWNER", STATUS_INVALID_OWNER },
5440 { "INVALID_PARAMETER", STATUS_INVALID_PARAMETER },
5441 { "INVALID_PIPE_STATE", STATUS_INVALID_PIPE_STATE },
5442 { "INVALID_READ_MODE", STATUS_INVALID_READ_MODE },
5443 { "INVALID_SECURITY_DESCR", STATUS_INVALID_SECURITY_DESCR },
5444 { "IO_TIMEOUT", STATUS_IO_TIMEOUT },
5445 { "KERNEL_APC", STATUS_KERNEL_APC },
5446 { "KEY_DELETED", STATUS_KEY_DELETED },
5447 { "MAPPED_FILE_SIZE_ZERO", STATUS_MAPPED_FILE_SIZE_ZERO },
5448 { "MUTANT_NOT_OWNED", STATUS_MUTANT_NOT_OWNED },
5449 { "NAME_TOO_LONG", STATUS_NAME_TOO_LONG },
5450 { "NETWORK_BUSY", STATUS_NETWORK_BUSY },
5451 { "NETWORK_UNREACHABLE", STATUS_NETWORK_UNREACHABLE },
5452 { "NOT_ALL_ASSIGNED", STATUS_NOT_ALL_ASSIGNED },
5453 { "NOT_A_DIRECTORY", STATUS_NOT_A_DIRECTORY },
5454 { "NOT_FOUND", STATUS_NOT_FOUND },
5455 { "NOT_IMPLEMENTED", STATUS_NOT_IMPLEMENTED },
5456 { "NOT_MAPPED_VIEW", STATUS_NOT_MAPPED_VIEW },
5457 { "NOT_REGISTRY_FILE", STATUS_NOT_REGISTRY_FILE },
5458 { "NOT_SAME_DEVICE", STATUS_NOT_SAME_DEVICE },
5459 { "NOT_SAME_OBJECT", STATUS_NOT_SAME_OBJECT },
5460 { "NOT_SUPPORTED", STATUS_NOT_SUPPORTED },
5461 { "NO_DATA_DETECTED", STATUS_NO_DATA_DETECTED },
5462 { "NO_IMPERSONATION_TOKEN", STATUS_NO_IMPERSONATION_TOKEN },
5463 { "NO_MEMORY", STATUS_NO_MEMORY },
5464 { "NO_MORE_ENTRIES", STATUS_NO_MORE_ENTRIES },
5465 { "NO_SUCH_DEVICE", STATUS_NO_SUCH_DEVICE },
5466 { "NO_SUCH_FILE", STATUS_NO_SUCH_FILE },
5467 { "NO_TOKEN", STATUS_NO_TOKEN },
5468 { "OBJECT_NAME_COLLISION", STATUS_OBJECT_NAME_COLLISION },
5469 { "OBJECT_NAME_EXISTS", STATUS_OBJECT_NAME_EXISTS },
5470 { "OBJECT_NAME_INVALID", STATUS_OBJECT_NAME_INVALID },
5471 { "OBJECT_NAME_NOT_FOUND", STATUS_OBJECT_NAME_NOT_FOUND },
5472 { "OBJECT_PATH_INVALID", STATUS_OBJECT_PATH_INVALID },
5473 { "OBJECT_PATH_NOT_FOUND", STATUS_OBJECT_PATH_NOT_FOUND },
5474 { "OBJECT_PATH_SYNTAX_BAD", STATUS_OBJECT_PATH_SYNTAX_BAD },
5475 { "OBJECT_TYPE_MISMATCH", STATUS_OBJECT_TYPE_MISMATCH },
5476 { "PENDING", STATUS_PENDING },
5477 { "PIPE_BROKEN", STATUS_PIPE_BROKEN },
5478 { "PIPE_BUSY", STATUS_PIPE_BUSY },
5479 { "PIPE_CLOSING", STATUS_PIPE_CLOSING },
5480 { "PIPE_CONNECTED", STATUS_PIPE_CONNECTED },
5481 { "PIPE_DISCONNECTED", STATUS_PIPE_DISCONNECTED },
5482 { "PIPE_EMPTY", STATUS_PIPE_EMPTY },
5483 { "PIPE_LISTENING", STATUS_PIPE_LISTENING },
5484 { "PIPE_NOT_AVAILABLE", STATUS_PIPE_NOT_AVAILABLE },
5485 { "PORT_NOT_SET", STATUS_PORT_NOT_SET },
5486 { "PREDEFINED_HANDLE", STATUS_PREDEFINED_HANDLE },
5487 { "PRIVILEGE_NOT_HELD", STATUS_PRIVILEGE_NOT_HELD },
5488 { "PROCESS_IN_JOB", STATUS_PROCESS_IN_JOB },
5489 { "PROCESS_IS_TERMINATING", STATUS_PROCESS_IS_TERMINATING },
5490 { "PROCESS_NOT_IN_JOB", STATUS_PROCESS_NOT_IN_JOB },
5491 { "REPARSE_POINT_NOT_RESOLVED", STATUS_REPARSE_POINT_NOT_RESOLVED },
5492 { "SECTION_TOO_BIG", STATUS_SECTION_TOO_BIG },
5493 { "SEMAPHORE_LIMIT_EXCEEDED", STATUS_SEMAPHORE_LIMIT_EXCEEDED },
5494 { "SHARING_VIOLATION", STATUS_SHARING_VIOLATION },
5495 { "SHUTDOWN_IN_PROGRESS", STATUS_SHUTDOWN_IN_PROGRESS },
5496 { "SUSPEND_COUNT_EXCEEDED", STATUS_SUSPEND_COUNT_EXCEEDED },
5497 { "THREAD_IS_TERMINATING", STATUS_THREAD_IS_TERMINATING },
5498 { "TIMEOUT", STATUS_TIMEOUT },
5499 { "TOO_MANY_OPENED_FILES", STATUS_TOO_MANY_OPENED_FILES },
5500 { "UNSUCCESSFUL", STATUS_UNSUCCESSFUL },
5501 { "USER_APC", STATUS_USER_APC },
5502 { "USER_MAPPED_FILE", STATUS_USER_MAPPED_FILE },
5503 { "VOLUME_DISMOUNTED", STATUS_VOLUME_DISMOUNTED },
5504 { "WAS_LOCKED", STATUS_WAS_LOCKED },
5505 { "WSAEACCES", 0xc0010000 | WSAEACCES },
5506 { "WSAEADDRINUSE", 0xc0010000 | WSAEADDRINUSE },
5507 { "WSAEADDRNOTAVAIL", 0xc0010000 | WSAEADDRNOTAVAIL },
5508 { "WSAEAFNOSUPPORT", 0xc0010000 | WSAEAFNOSUPPORT },
5509 { "WSAEALREADY", 0xc0010000 | WSAEALREADY },
5510 { "WSAEBADF", 0xc0010000 | WSAEBADF },
5511 { "WSAECONNABORTED", 0xc0010000 | WSAECONNABORTED },
5512 { "WSAECONNREFUSED", 0xc0010000 | WSAECONNREFUSED },
5513 { "WSAECONNRESET", 0xc0010000 | WSAECONNRESET },
5514 { "WSAEDESTADDRREQ", 0xc0010000 | WSAEDESTADDRREQ },
5515 { "WSAEDQUOT", 0xc0010000 | WSAEDQUOT },
5516 { "WSAEFAULT", 0xc0010000 | WSAEFAULT },
5517 { "WSAEHOSTDOWN", 0xc0010000 | WSAEHOSTDOWN },
5518 { "WSAEHOSTUNREACH", 0xc0010000 | WSAEHOSTUNREACH },
5519 { "WSAEINTR", 0xc0010000 | WSAEINTR },
5520 { "WSAEINVAL", 0xc0010000 | WSAEINVAL },
5521 { "WSAEISCONN", 0xc0010000 | WSAEISCONN },
5522 { "WSAELOOP", 0xc0010000 | WSAELOOP },
5523 { "WSAEMFILE", 0xc0010000 | WSAEMFILE },
5524 { "WSAEMSGSIZE", 0xc0010000 | WSAEMSGSIZE },
5525 { "WSAENAMETOOLONG", 0xc0010000 | WSAENAMETOOLONG },
5526 { "WSAENETDOWN", 0xc0010000 | WSAENETDOWN },
5527 { "WSAENETRESET", 0xc0010000 | WSAENETRESET },
5528 { "WSAENETUNREACH", 0xc0010000 | WSAENETUNREACH },
5529 { "WSAENOBUFS", 0xc0010000 | WSAENOBUFS },
5530 { "WSAENOPROTOOPT", 0xc0010000 | WSAENOPROTOOPT },
5531 { "WSAENOTCONN", 0xc0010000 | WSAENOTCONN },
5532 { "WSAENOTEMPTY", 0xc0010000 | WSAENOTEMPTY },
5533 { "WSAENOTSOCK", 0xc0010000 | WSAENOTSOCK },
5534 { "WSAEOPNOTSUPP", 0xc0010000 | WSAEOPNOTSUPP },
5535 { "WSAEPFNOSUPPORT", 0xc0010000 | WSAEPFNOSUPPORT },
5536 { "WSAEPROCLIM", 0xc0010000 | WSAEPROCLIM },
5537 { "WSAEPROTONOSUPPORT", 0xc0010000 | WSAEPROTONOSUPPORT },
5538 { "WSAEPROTOTYPE", 0xc0010000 | WSAEPROTOTYPE },
5539 { "WSAEREMOTE", 0xc0010000 | WSAEREMOTE },
5540 { "WSAESHUTDOWN", 0xc0010000 | WSAESHUTDOWN },
5541 { "WSAESOCKTNOSUPPORT", 0xc0010000 | WSAESOCKTNOSUPPORT },
5542 { "WSAESTALE", 0xc0010000 | WSAESTALE },
5543 { "WSAETIMEDOUT", 0xc0010000 | WSAETIMEDOUT },
5544 { "WSAETOOMANYREFS", 0xc0010000 | WSAETOOMANYREFS },
5545 { "WSAEUSERS", 0xc0010000 | WSAEUSERS },
5546 { "WSAEWOULDBLOCK", 0xc0010000 | WSAEWOULDBLOCK },
5547 { NULL, 0 }
5550 /* ### make_requests end ### */
5551 /* Everything above this line is generated automatically by tools/make_requests */
5553 static const char *get_status_name( unsigned int status )
5555 int i;
5556 static char buffer[10];
5558 if (status)
5560 for (i = 0; status_names[i].name; i++)
5561 if (status_names[i].value == status) return status_names[i].name;
5563 sprintf( buffer, "%x", status );
5564 return buffer;
5567 void trace_request(void)
5569 enum request req = current->req.request_header.req;
5570 if (req < REQ_NB_REQUESTS)
5572 fprintf( stderr, "%04x: %s(", current->id, req_names[req] );
5573 if (req_dumpers[req])
5575 cur_data = get_req_data();
5576 cur_size = get_req_data_size();
5577 req_dumpers[req]( &current->req );
5579 fprintf( stderr, " )\n" );
5581 else fprintf( stderr, "%04x: %d(?)\n", current->id, req );
5584 void trace_reply( enum request req, const union generic_reply *reply )
5586 if (req < REQ_NB_REQUESTS)
5588 fprintf( stderr, "%04x: %s() = %s",
5589 current->id, req_names[req], get_status_name(current->error) );
5590 if (reply_dumpers[req])
5592 fprintf( stderr, " {" );
5593 cur_data = current->reply_data;
5594 cur_size = reply->reply_header.reply_size;
5595 reply_dumpers[req]( reply );
5596 fprintf( stderr, " }" );
5598 fputc( '\n', stderr );
5600 else fprintf( stderr, "%04x: %d() = %s\n",
5601 current->id, req, get_status_name(current->error) );