gcc 4.0 -Wpointer-sign fixes.
[wine/multimedia.git] / server / trace.c
blob94139568466dec3be2bc0bbca394c4d0889a0783
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 #include "config.h"
22 #include "wine/port.h"
24 #include <ctype.h>
25 #include <stdarg.h>
26 #include <stdio.h>
27 #include <sys/types.h>
29 #ifdef HAVE_SYS_UIO_H
30 #include <sys/uio.h>
31 #endif
33 #include "windef.h"
34 #include "winbase.h"
35 #include "wincon.h"
36 #include "winternl.h"
37 #include "request.h"
38 #include "unicode.h"
40 static int cur_pos;
41 static const void *cur_data;
42 static int cur_size;
44 /* utility functions */
46 inline static void remove_data( size_t size )
48 cur_data = (const char *)cur_data + size;
49 cur_size -= size;
52 static void dump_uints( const int *ptr, int len )
54 fputc( '{', stderr );
55 while (len > 0)
57 fprintf( stderr, "%08x", *ptr++ );
58 if (--len) fputc( ',', stderr );
60 fputc( '}', stderr );
63 static void dump_abs_time( const abs_time_t *time )
65 struct timeval tv;
66 int secs, usecs;
68 if (!time->sec && !time->usec)
70 fprintf( stderr, "0" );
71 return;
73 gettimeofday( &tv, NULL );
74 secs = time->sec - tv.tv_sec;
75 if ((usecs = time->usec - tv.tv_usec) < 0)
77 usecs += 1000000;
78 secs--;
80 if (secs > 0 || (secs == 0 && usecs >= 0))
81 fprintf( stderr, "%d.%06d (+%d.%06d)", time->sec, time->usec, secs, usecs );
82 else
83 fprintf( stderr, "%d.%06d (-%d.%06d)", time->sec, time->usec, abs(secs+1), 1000000-usecs );
86 static void dump_rectangle( const rectangle_t *rect )
88 fprintf( stderr, "{%d,%d;%d,%d}",
89 rect->left, rect->top, rect->right, rect->bottom );
92 static void dump_char_info( const char_info_t *info )
94 fprintf( stderr, "{'" );
95 dump_strW( &info->ch, 1, stderr, "\'\'" );
96 fprintf( stderr, "',%04x}", info->attr );
99 static void dump_context( const CONTEXT *context )
101 #ifdef __i386__
102 fprintf( stderr, "{flags=%08lx,eax=%08lx,ebx=%08lx,ecx=%08lx,edx=%08lx,esi=%08lx,edi=%08lx,"
103 "ebp=%08lx,eip=%08lx,esp=%08lx,eflags=%08lx,cs=%04lx,ds=%04lx,es=%04lx,"
104 "fs=%04lx,gs=%04lx,dr0=%08lx,dr1=%08lx,dr2=%08lx,dr3=%08lx,dr6=%08lx,dr7=%08lx,",
105 context->ContextFlags, context->Eax, context->Ebx, context->Ecx, context->Edx,
106 context->Esi, context->Edi, context->Ebp, context->Eip, context->Esp, context->EFlags,
107 context->SegCs, context->SegDs, context->SegEs, context->SegFs, context->SegGs,
108 context->Dr0, context->Dr1, context->Dr2, context->Dr3, context->Dr6, context->Dr7 );
109 fprintf( stderr, "float=" );
110 dump_uints( (const int *)&context->FloatSave, sizeof(context->FloatSave) / sizeof(int) );
111 fprintf( stderr, "}" );
112 #else
113 dump_uints( (const int *)context, sizeof(*context) / sizeof(int) );
114 #endif
117 static void dump_exc_record( const EXCEPTION_RECORD *rec )
119 unsigned int i;
120 fprintf( stderr, "{code=%lx,flags=%lx,rec=%p,addr=%p,params={",
121 rec->ExceptionCode, rec->ExceptionFlags, rec->ExceptionRecord,
122 rec->ExceptionAddress );
123 for (i = 0; i < min(rec->NumberParameters,EXCEPTION_MAXIMUM_PARAMETERS); i++)
125 if (i) fputc( ',', stderr );
126 fprintf( stderr, "%lx", rec->ExceptionInformation[i] );
128 fputc( '}', stderr );
131 static void dump_varargs_ints( size_t size )
133 const int *data = cur_data;
134 size_t len = size / sizeof(*data);
136 fputc( '{', stderr );
137 while (len > 0)
139 fprintf( stderr, "%d", *data++ );
140 if (--len) fputc( ',', stderr );
142 fputc( '}', stderr );
143 remove_data( size );
146 static void dump_varargs_handles( size_t size )
148 const obj_handle_t *data = cur_data;
149 size_t len = size / sizeof(*data);
151 fputc( '{', stderr );
152 while (len > 0)
154 fprintf( stderr, "%p", *data++ );
155 if (--len) fputc( ',', stderr );
157 fputc( '}', stderr );
158 remove_data( size );
161 static void dump_varargs_user_handles( size_t size )
163 const user_handle_t *data = cur_data;
164 size_t len = size / sizeof(*data);
166 fputc( '{', stderr );
167 while (len > 0)
169 fprintf( stderr, "%p", *data++ );
170 if (--len) fputc( ',', stderr );
172 fputc( '}', stderr );
173 remove_data( size );
176 static void dump_varargs_bytes( size_t size )
178 const unsigned char *data = cur_data;
179 size_t len = size;
181 fputc( '{', stderr );
182 while (len > 0)
184 fprintf( stderr, "%02x", *data++ );
185 if (--len) fputc( ',', stderr );
187 fputc( '}', stderr );
188 remove_data( size );
191 static void dump_varargs_string( size_t size )
193 fprintf( stderr, "\"%.*s\"", (int)size, (const char *)cur_data );
194 remove_data( size );
197 static void dump_varargs_unicode_str( size_t size )
199 fprintf( stderr, "L\"" );
200 dump_strW( cur_data, size / sizeof(WCHAR), stderr, "\"\"" );
201 fputc( '\"', stderr );
202 remove_data( size );
205 static void dump_varargs_context( size_t size )
207 if (!size)
209 fprintf( stderr, "{}" );
210 return;
212 dump_context( cur_data );
213 remove_data( size );
216 static void dump_varargs_exc_event( size_t size )
218 const CONTEXT *ptr = cur_data;
220 if (!size)
222 fprintf( stderr, "{}" );
223 return;
225 fprintf( stderr, "{context=" );
226 dump_context( ptr );
227 fprintf( stderr, ",rec=" );
228 dump_exc_record( (const EXCEPTION_RECORD *)(ptr + 1) );
229 fputc( '}', stderr );
230 remove_data( size );
233 static void dump_varargs_debug_event( size_t size )
235 const debug_event_t *event = cur_data;
237 if (!size)
239 fprintf( stderr, "{}" );
240 return;
242 switch(event->code)
244 case EXCEPTION_DEBUG_EVENT:
245 fprintf( stderr, "{exception," );
246 dump_exc_record( &event->info.exception.record );
247 fprintf( stderr, ",first=%d}", event->info.exception.first );
248 break;
249 case CREATE_THREAD_DEBUG_EVENT:
250 fprintf( stderr, "{create_thread,thread=%p,teb=%p,start=%p}",
251 event->info.create_thread.handle, event->info.create_thread.teb,
252 event->info.create_thread.start );
253 break;
254 case CREATE_PROCESS_DEBUG_EVENT:
255 fprintf( stderr, "{create_process,file=%p,process=%p,thread=%p,base=%p,offset=%d,"
256 "size=%d,teb=%p,start=%p,name=%p,unicode=%d}",
257 event->info.create_process.file, event->info.create_process.process,
258 event->info.create_process.thread, event->info.create_process.base,
259 event->info.create_process.dbg_offset, event->info.create_process.dbg_size,
260 event->info.create_process.teb, event->info.create_process.start,
261 event->info.create_process.name, event->info.create_process.unicode );
262 break;
263 case EXIT_THREAD_DEBUG_EVENT:
264 fprintf( stderr, "{exit_thread,code=%d}", event->info.exit.exit_code );
265 break;
266 case EXIT_PROCESS_DEBUG_EVENT:
267 fprintf( stderr, "{exit_process,code=%d}", event->info.exit.exit_code );
268 break;
269 case LOAD_DLL_DEBUG_EVENT:
270 fprintf( stderr, "{load_dll,file=%p,base=%p,offset=%d,size=%d,name=%p,unicode=%d}",
271 event->info.load_dll.handle, event->info.load_dll.base,
272 event->info.load_dll.dbg_offset, event->info.load_dll.dbg_size,
273 event->info.load_dll.name, event->info.load_dll.unicode );
274 break;
275 case UNLOAD_DLL_DEBUG_EVENT:
276 fprintf( stderr, "{unload_dll,base=%p}", event->info.unload_dll.base );
277 break;
278 case OUTPUT_DEBUG_STRING_EVENT:
279 fprintf( stderr, "{output_string,data=%p,unicode=%d,len=%d}",
280 event->info.output_string.string, event->info.output_string.unicode,
281 event->info.output_string.length );
282 break;
283 case RIP_EVENT:
284 fprintf( stderr, "{rip,err=%d,type=%d}",
285 event->info.rip_info.error, event->info.rip_info.type );
286 break;
287 case 0: /* zero is the code returned on timeouts */
288 fprintf( stderr, "{}" );
289 break;
290 default:
291 fprintf( stderr, "{code=??? (%d)}", event->code );
292 break;
294 remove_data( size );
297 /* dump a unicode string contained in a buffer; helper for dump_varargs_startup_info */
298 static void dump_inline_unicode_string( const UNICODE_STRING *str, const void *data, size_t size )
300 size_t length = str->Length / sizeof(WCHAR);
301 size_t offset = (size_t)str->Buffer;
303 if (offset >= size) return;
304 if (offset + length > size) length = size - offset;
305 dump_strW( (const WCHAR *)data + offset/sizeof(WCHAR), length, stderr, "\"\"" );
308 static void dump_varargs_startup_info( size_t size )
310 const RTL_USER_PROCESS_PARAMETERS *ptr = cur_data;
311 RTL_USER_PROCESS_PARAMETERS params;
313 if (size < sizeof(params.Size))
315 fprintf( stderr, "{}" );
316 return;
318 if (size > ptr->Size) size = ptr->Size;
319 memset( &params, 0, sizeof(params) );
320 memcpy( &params, ptr, min( size, sizeof(params) ));
322 fprintf( stderr, "{AllocationSize=%lx,", params.AllocationSize );
323 fprintf( stderr, "Size=%lx,", params.Size );
324 fprintf( stderr, "Flags=%lx,", params.Flags );
325 fprintf( stderr, "DebugFlags=%lx,", params.DebugFlags );
326 fprintf( stderr, "ConsoleHandle=%p,", params.ConsoleHandle );
327 fprintf( stderr, "ConsoleFlags=%lx,", params.ConsoleFlags );
328 fprintf( stderr, "hStdInput=%p,", params.hStdInput );
329 fprintf( stderr, "hStdOutput=%p,", params.hStdOutput );
330 fprintf( stderr, "hStdError=%p,", params.hStdError );
331 fprintf( stderr, "CurrentDirectory.Handle=%p,", params.CurrentDirectory.Handle );
332 fprintf( stderr, "dwX=%ld,", params.dwX );
333 fprintf( stderr, "dwY=%ld,", params.dwY );
334 fprintf( stderr, "dwXSize=%ld,", params.dwXSize );
335 fprintf( stderr, "dwYSize=%ld,", params.dwYSize );
336 fprintf( stderr, "dwXCountChars=%ld,", params.dwXCountChars );
337 fprintf( stderr, "dwYCountChars=%ld,", params.dwYCountChars );
338 fprintf( stderr, "dwFillAttribute=%lx,", params.dwFillAttribute );
339 fprintf( stderr, "dwFlags=%lx,", params.dwFlags );
340 fprintf( stderr, "wShowWindow=%lx,", params.wShowWindow );
341 fprintf( stderr, "CurrentDirectory.DosPath=L\"" );
342 dump_inline_unicode_string( &params.CurrentDirectory.DosPath, cur_data, size );
343 fprintf( stderr, "\",DllPath=L\"" );
344 dump_inline_unicode_string( &params.DllPath, cur_data, size );
345 fprintf( stderr, "\",ImagePathName=L\"" );
346 dump_inline_unicode_string( &params.ImagePathName, cur_data, size );
347 fprintf( stderr, "\",CommandLine=L\"" );
348 dump_inline_unicode_string( &params.CommandLine, cur_data, size );
349 fprintf( stderr, "\",WindowTitle=L\"" );
350 dump_inline_unicode_string( &params.WindowTitle, cur_data, size );
351 fprintf( stderr, "\",Desktop=L\"" );
352 dump_inline_unicode_string( &params.Desktop, cur_data, size );
353 fprintf( stderr, "\",ShellInfo=L\"" );
354 dump_inline_unicode_string( &params.ShellInfo, cur_data, size );
355 fprintf( stderr, "\",RuntimeInfo=L\"" );
356 dump_inline_unicode_string( &params.RuntimeInfo, cur_data, size );
357 fprintf( stderr, "\"}" );
358 remove_data( size );
361 static void dump_varargs_input_records( size_t size )
363 const INPUT_RECORD *rec = cur_data;
364 size_t len = size / sizeof(*rec);
366 fputc( '{', stderr );
367 while (len > 0)
369 fprintf( stderr, "{%04x,...}", rec->EventType );
370 rec++;
371 if (--len) fputc( ',', stderr );
373 fputc( '}', stderr );
374 remove_data( size );
377 static void dump_varargs_rectangles( size_t size )
379 const rectangle_t *rect = cur_data;
380 size_t len = size / sizeof(*rect);
382 fputc( '{', stderr );
383 while (len > 0)
385 dump_rectangle( rect++ );
386 if (--len) fputc( ',', stderr );
388 fputc( '}', stderr );
389 remove_data( size );
392 static void dump_varargs_properties( size_t size )
394 const property_data_t *prop = cur_data;
395 size_t len = size / sizeof(*prop);
397 fputc( '{', stderr );
398 while (len > 0)
400 fprintf( stderr, "{atom=%04x,str=%d,handle=%p}",
401 prop->atom, prop->string, prop->handle );
402 prop++;
403 if (--len) fputc( ',', stderr );
405 fputc( '}', stderr );
406 remove_data( size );
409 static void dump_varargs_LUID_AND_ATTRIBUTES( size_t size )
411 const LUID_AND_ATTRIBUTES *lat = cur_data;
412 size_t len = size / sizeof(*lat);
414 fputc( '{', stderr );
415 while (len > 0)
417 fprintf( stderr, "{luid=%08lx%08lx,attr=%lx}",
418 lat->Luid.HighPart, lat->Luid.LowPart, lat->Attributes );
419 lat++;
420 if (--len) fputc( ',', stderr );
422 fputc( '}', stderr );
423 remove_data( size );
426 static void dump_inline_sid( const SID *sid, size_t size )
428 DWORD i;
430 /* security check */
431 if ((FIELD_OFFSET(SID, SubAuthority[0]) > size) ||
432 (FIELD_OFFSET(SID, SubAuthority[sid->SubAuthorityCount]) > size))
434 fprintf( stderr, "<invalid sid>" );
435 return;
438 fputc( '{', stderr );
439 fprintf( stderr, "S-%u-%lu", sid->Revision, MAKELONG(
440 MAKEWORD( sid->IdentifierAuthority.Value[5],
441 sid->IdentifierAuthority.Value[4] ),
442 MAKEWORD( sid->IdentifierAuthority.Value[3],
443 sid->IdentifierAuthority.Value[2] ) ) );
444 for (i = 0; i < sid->SubAuthorityCount; i++)
445 fprintf( stderr, "-%lu", sid->SubAuthority[i] );
446 fputc( '}', stderr );
449 static void dump_varargs_SID( size_t size )
451 const SID *sid = cur_data;
452 dump_inline_sid( sid, size );
453 remove_data( size );
456 static void dump_inline_acl( const ACL *acl, size_t size )
458 const ACE_HEADER *ace;
459 ULONG i;
460 fputc( '{', stderr );
462 if (size)
464 if (size < sizeof(ACL))
466 fprintf( stderr, "<invalid acl>}\n" );
467 return;
469 size -= sizeof(ACL);
470 ace = (const ACE_HEADER *)(acl + 1);
471 for (i = 0; i < acl->AceCount; i++)
473 const SID *sid = NULL;
474 size_t sid_size = 0;
476 if (size < sizeof(ACE_HEADER))
477 return;
478 if (size < ace->AceSize)
479 return;
480 size -= ace->AceSize;
481 if (i != 0) fputc( ',', stderr );
482 fprintf( stderr, "{AceType=" );
483 switch (ace->AceType)
485 case ACCESS_DENIED_ACE_TYPE:
486 sid = (const SID *)&((const ACCESS_DENIED_ACE *)ace)->SidStart;
487 sid_size = ace->AceSize - FIELD_OFFSET(ACCESS_DENIED_ACE, SidStart);
488 fprintf( stderr, "ACCESS_DENIED_ACE_TYPE,Mask=%lx",
489 ((const ACCESS_DENIED_ACE *)ace)->Mask );
490 break;
491 case ACCESS_ALLOWED_ACE_TYPE:
492 sid = (const SID *)&((const ACCESS_ALLOWED_ACE *)ace)->SidStart;
493 sid_size = ace->AceSize - FIELD_OFFSET(ACCESS_ALLOWED_ACE, SidStart);
494 fprintf( stderr, "ACCESS_ALLOWED_ACE_TYPE,Mask=%lx",
495 ((const ACCESS_ALLOWED_ACE *)ace)->Mask );
496 break;
497 case SYSTEM_AUDIT_ACE_TYPE:
498 sid = (const SID *)&((const SYSTEM_AUDIT_ACE *)ace)->SidStart;
499 sid_size = ace->AceSize - FIELD_OFFSET(SYSTEM_AUDIT_ACE, SidStart);
500 fprintf( stderr, "SYSTEM_AUDIT_ACE_TYPE,Mask=%lx",
501 ((const SYSTEM_AUDIT_ACE *)ace)->Mask );
502 break;
503 case SYSTEM_ALARM_ACE_TYPE:
504 sid = (const SID *)&((const SYSTEM_ALARM_ACE *)ace)->SidStart;
505 sid_size = ace->AceSize - FIELD_OFFSET(SYSTEM_ALARM_ACE, SidStart);
506 fprintf( stderr, "SYSTEM_ALARM_ACE_TYPE,Mask=%lx",
507 ((const SYSTEM_ALARM_ACE *)ace)->Mask );
508 break;
509 default:
510 fprintf( stderr, "unknown<%d>", ace->AceType );
511 break;
513 fprintf( stderr, ",AceFlags=%x,Sid=", ace->AceFlags );
514 if (sid)
515 dump_inline_sid( sid, sid_size );
516 ace = (const ACE_HEADER *)((const char *)ace + ace->AceSize);
517 fputc( '}', stderr );
520 fputc( '}', stderr );
523 static void dump_inline_security_descriptor( const struct security_descriptor *sd, size_t size )
525 fputc( '{', stderr );
526 if (size >= sizeof(struct security_descriptor))
528 size_t offset = sizeof(struct security_descriptor);
529 fprintf( stderr, "control=%08x", sd->control );
530 fprintf( stderr, ",owner=" );
531 if ((sd->owner_len > FIELD_OFFSET(SID, SubAuthority[255])) || (offset + sd->owner_len > size))
532 return;
533 dump_inline_sid( (const SID *)((const char *)sd + offset), sd->owner_len );
534 offset += sd->owner_len;
535 fprintf( stderr, ",group=" );
536 if ((sd->group_len > FIELD_OFFSET(SID, SubAuthority[255])) || (offset + sd->group_len > size))
537 return;
538 dump_inline_sid( (const SID *)((const char *)sd + offset), sd->group_len );
539 offset += sd->group_len;
540 fprintf( stderr, ",sacl=" );
541 if ((sd->sacl_len >= MAX_ACL_LEN) || (offset + sd->sacl_len > size))
542 return;
543 dump_inline_acl( (const ACL *)((const char *)sd + offset), sd->sacl_len );
544 offset += sd->sacl_len;
545 fprintf( stderr, ",dacl=" );
546 if ((sd->dacl_len >= MAX_ACL_LEN) || (offset + sd->dacl_len > size))
547 return;
548 dump_inline_acl( (const ACL *)((const char *)sd + offset), sd->dacl_len );
549 offset += sd->dacl_len;
551 fputc( '}', stderr );
554 static void dump_varargs_security_descriptor( size_t size )
556 const struct security_descriptor *sd = cur_data;
557 dump_inline_security_descriptor( sd, size );
558 remove_data( size );
561 typedef void (*dump_func)( const void *req );
563 /* Everything below this line is generated automatically by tools/make_requests */
564 /* ### make_requests begin ### */
566 static void dump_new_process_request( const struct new_process_request *req )
568 fprintf( stderr, " inherit_all=%d,", req->inherit_all );
569 fprintf( stderr, " create_flags=%08x,", req->create_flags );
570 fprintf( stderr, " unix_pid=%d,", req->unix_pid );
571 fprintf( stderr, " exe_file=%p,", req->exe_file );
572 fprintf( stderr, " hstdin=%p,", req->hstdin );
573 fprintf( stderr, " hstdout=%p,", req->hstdout );
574 fprintf( stderr, " hstderr=%p,", req->hstderr );
575 fprintf( stderr, " info=" );
576 dump_varargs_startup_info( cur_size );
577 fputc( ',', stderr );
578 fprintf( stderr, " env=" );
579 dump_varargs_unicode_str( cur_size );
582 static void dump_new_process_reply( const struct new_process_reply *req )
584 fprintf( stderr, " info=%p", req->info );
587 static void dump_get_new_process_info_request( const struct get_new_process_info_request *req )
589 fprintf( stderr, " info=%p,", req->info );
590 fprintf( stderr, " pinherit=%d,", req->pinherit );
591 fprintf( stderr, " tinherit=%d", req->tinherit );
594 static void dump_get_new_process_info_reply( const struct get_new_process_info_reply *req )
596 fprintf( stderr, " pid=%04x,", req->pid );
597 fprintf( stderr, " phandle=%p,", req->phandle );
598 fprintf( stderr, " tid=%04x,", req->tid );
599 fprintf( stderr, " thandle=%p,", req->thandle );
600 fprintf( stderr, " success=%d", req->success );
603 static void dump_new_thread_request( const struct new_thread_request *req )
605 fprintf( stderr, " suspend=%d,", req->suspend );
606 fprintf( stderr, " inherit=%d,", req->inherit );
607 fprintf( stderr, " request_fd=%d", req->request_fd );
610 static void dump_new_thread_reply( const struct new_thread_reply *req )
612 fprintf( stderr, " tid=%04x,", req->tid );
613 fprintf( stderr, " handle=%p", req->handle );
616 static void dump_get_startup_info_request( const struct get_startup_info_request *req )
620 static void dump_get_startup_info_reply( const struct get_startup_info_reply *req )
622 fprintf( stderr, " create_flags=%08x,", req->create_flags );
623 fprintf( stderr, " exe_file=%p,", req->exe_file );
624 fprintf( stderr, " hstdin=%p,", req->hstdin );
625 fprintf( stderr, " hstdout=%p,", req->hstdout );
626 fprintf( stderr, " hstderr=%p,", req->hstderr );
627 fprintf( stderr, " info=" );
628 dump_varargs_startup_info( cur_size );
629 fputc( ',', stderr );
630 fprintf( stderr, " env=" );
631 dump_varargs_unicode_str( cur_size );
634 static void dump_init_process_done_request( const struct init_process_done_request *req )
636 fprintf( stderr, " module=%p,", req->module );
637 fprintf( stderr, " module_size=%d,", req->module_size );
638 fprintf( stderr, " entry=%p,", req->entry );
639 fprintf( stderr, " name=%p,", req->name );
640 fprintf( stderr, " exe_file=%p,", req->exe_file );
641 fprintf( stderr, " gui=%d,", req->gui );
642 fprintf( stderr, " filename=" );
643 dump_varargs_unicode_str( cur_size );
646 static void dump_init_thread_request( const struct init_thread_request *req )
648 fprintf( stderr, " unix_pid=%d,", req->unix_pid );
649 fprintf( stderr, " unix_tid=%d,", req->unix_tid );
650 fprintf( stderr, " teb=%p,", req->teb );
651 fprintf( stderr, " peb=%p,", req->peb );
652 fprintf( stderr, " entry=%p,", req->entry );
653 fprintf( stderr, " ldt_copy=%p,", req->ldt_copy );
654 fprintf( stderr, " reply_fd=%d,", req->reply_fd );
655 fprintf( stderr, " wait_fd=%d,", req->wait_fd );
656 fprintf( stderr, " debug_level=%d", req->debug_level );
659 static void dump_init_thread_reply( const struct init_thread_reply *req )
661 fprintf( stderr, " pid=%04x,", req->pid );
662 fprintf( stderr, " tid=%04x,", req->tid );
663 fprintf( stderr, " info_size=%d,", req->info_size );
664 fprintf( stderr, " server_start=%ld,", (long)req->server_start );
665 fprintf( stderr, " version=%d", req->version );
668 static void dump_terminate_process_request( const struct terminate_process_request *req )
670 fprintf( stderr, " handle=%p,", req->handle );
671 fprintf( stderr, " exit_code=%d", req->exit_code );
674 static void dump_terminate_process_reply( const struct terminate_process_reply *req )
676 fprintf( stderr, " self=%d", req->self );
679 static void dump_terminate_thread_request( const struct terminate_thread_request *req )
681 fprintf( stderr, " handle=%p,", req->handle );
682 fprintf( stderr, " exit_code=%d", req->exit_code );
685 static void dump_terminate_thread_reply( const struct terminate_thread_reply *req )
687 fprintf( stderr, " self=%d,", req->self );
688 fprintf( stderr, " last=%d", req->last );
691 static void dump_get_process_info_request( const struct get_process_info_request *req )
693 fprintf( stderr, " handle=%p", req->handle );
696 static void dump_get_process_info_reply( const struct get_process_info_reply *req )
698 fprintf( stderr, " pid=%04x,", req->pid );
699 fprintf( stderr, " ppid=%04x,", req->ppid );
700 fprintf( stderr, " exit_code=%d,", req->exit_code );
701 fprintf( stderr, " priority=%d,", req->priority );
702 fprintf( stderr, " process_affinity=%d,", req->process_affinity );
703 fprintf( stderr, " system_affinity=%d,", req->system_affinity );
704 fprintf( stderr, " peb=%p", req->peb );
707 static void dump_set_process_info_request( const struct set_process_info_request *req )
709 fprintf( stderr, " handle=%p,", req->handle );
710 fprintf( stderr, " mask=%d,", req->mask );
711 fprintf( stderr, " priority=%d,", req->priority );
712 fprintf( stderr, " affinity=%d", req->affinity );
715 static void dump_get_thread_info_request( const struct get_thread_info_request *req )
717 fprintf( stderr, " handle=%p,", req->handle );
718 fprintf( stderr, " tid_in=%04x", req->tid_in );
721 static void dump_get_thread_info_reply( const struct get_thread_info_reply *req )
723 fprintf( stderr, " pid=%04x,", req->pid );
724 fprintf( stderr, " tid=%04x,", req->tid );
725 fprintf( stderr, " teb=%p,", req->teb );
726 fprintf( stderr, " exit_code=%d,", req->exit_code );
727 fprintf( stderr, " priority=%d,", req->priority );
728 fprintf( stderr, " affinity=%d,", req->affinity );
729 fprintf( stderr, " creation_time=%ld,", (long)req->creation_time );
730 fprintf( stderr, " exit_time=%ld", (long)req->exit_time );
733 static void dump_set_thread_info_request( const struct set_thread_info_request *req )
735 fprintf( stderr, " handle=%p,", req->handle );
736 fprintf( stderr, " mask=%d,", req->mask );
737 fprintf( stderr, " priority=%d,", req->priority );
738 fprintf( stderr, " affinity=%d,", req->affinity );
739 fprintf( stderr, " token=%p", req->token );
742 static void dump_get_dll_info_request( const struct get_dll_info_request *req )
744 fprintf( stderr, " handle=%p,", req->handle );
745 fprintf( stderr, " base_address=%p", req->base_address );
748 static void dump_get_dll_info_reply( const struct get_dll_info_reply *req )
750 fprintf( stderr, " size=%d,", req->size );
751 fprintf( stderr, " entry_point=%p,", req->entry_point );
752 fprintf( stderr, " filename=" );
753 dump_varargs_unicode_str( cur_size );
756 static void dump_suspend_thread_request( const struct suspend_thread_request *req )
758 fprintf( stderr, " handle=%p", req->handle );
761 static void dump_suspend_thread_reply( const struct suspend_thread_reply *req )
763 fprintf( stderr, " count=%d", req->count );
766 static void dump_resume_thread_request( const struct resume_thread_request *req )
768 fprintf( stderr, " handle=%p", req->handle );
771 static void dump_resume_thread_reply( const struct resume_thread_reply *req )
773 fprintf( stderr, " count=%d", req->count );
776 static void dump_load_dll_request( const struct load_dll_request *req )
778 fprintf( stderr, " handle=%p,", req->handle );
779 fprintf( stderr, " base=%p,", req->base );
780 fprintf( stderr, " size=%d,", req->size );
781 fprintf( stderr, " dbg_offset=%d,", req->dbg_offset );
782 fprintf( stderr, " dbg_size=%d,", req->dbg_size );
783 fprintf( stderr, " name=%p,", req->name );
784 fprintf( stderr, " filename=" );
785 dump_varargs_unicode_str( cur_size );
788 static void dump_unload_dll_request( const struct unload_dll_request *req )
790 fprintf( stderr, " base=%p", req->base );
793 static void dump_queue_apc_request( const struct queue_apc_request *req )
795 fprintf( stderr, " handle=%p,", req->handle );
796 fprintf( stderr, " user=%d,", req->user );
797 fprintf( stderr, " func=%p,", req->func );
798 fprintf( stderr, " arg1=%p,", req->arg1 );
799 fprintf( stderr, " arg2=%p,", req->arg2 );
800 fprintf( stderr, " arg3=%p", req->arg3 );
803 static void dump_get_apc_request( const struct get_apc_request *req )
805 fprintf( stderr, " alertable=%d", req->alertable );
808 static void dump_get_apc_reply( const struct get_apc_reply *req )
810 fprintf( stderr, " func=%p,", req->func );
811 fprintf( stderr, " type=%d,", req->type );
812 fprintf( stderr, " arg1=%p,", req->arg1 );
813 fprintf( stderr, " arg2=%p,", req->arg2 );
814 fprintf( stderr, " arg3=%p", req->arg3 );
817 static void dump_close_handle_request( const struct close_handle_request *req )
819 fprintf( stderr, " handle=%p", req->handle );
822 static void dump_close_handle_reply( const struct close_handle_reply *req )
824 fprintf( stderr, " fd=%d", req->fd );
827 static void dump_set_handle_info_request( const struct set_handle_info_request *req )
829 fprintf( stderr, " handle=%p,", req->handle );
830 fprintf( stderr, " flags=%d,", req->flags );
831 fprintf( stderr, " mask=%d,", req->mask );
832 fprintf( stderr, " fd=%d", req->fd );
835 static void dump_set_handle_info_reply( const struct set_handle_info_reply *req )
837 fprintf( stderr, " old_flags=%d,", req->old_flags );
838 fprintf( stderr, " cur_fd=%d", req->cur_fd );
841 static void dump_dup_handle_request( const struct dup_handle_request *req )
843 fprintf( stderr, " src_process=%p,", req->src_process );
844 fprintf( stderr, " src_handle=%p,", req->src_handle );
845 fprintf( stderr, " dst_process=%p,", req->dst_process );
846 fprintf( stderr, " access=%08x,", req->access );
847 fprintf( stderr, " inherit=%d,", req->inherit );
848 fprintf( stderr, " options=%d", req->options );
851 static void dump_dup_handle_reply( const struct dup_handle_reply *req )
853 fprintf( stderr, " handle=%p,", req->handle );
854 fprintf( stderr, " fd=%d", req->fd );
857 static void dump_open_process_request( const struct open_process_request *req )
859 fprintf( stderr, " pid=%04x,", req->pid );
860 fprintf( stderr, " access=%08x,", req->access );
861 fprintf( stderr, " inherit=%d", req->inherit );
864 static void dump_open_process_reply( const struct open_process_reply *req )
866 fprintf( stderr, " handle=%p", req->handle );
869 static void dump_open_thread_request( const struct open_thread_request *req )
871 fprintf( stderr, " tid=%04x,", req->tid );
872 fprintf( stderr, " access=%08x,", req->access );
873 fprintf( stderr, " inherit=%d", req->inherit );
876 static void dump_open_thread_reply( const struct open_thread_reply *req )
878 fprintf( stderr, " handle=%p", req->handle );
881 static void dump_select_request( const struct select_request *req )
883 fprintf( stderr, " flags=%d,", req->flags );
884 fprintf( stderr, " cookie=%p,", req->cookie );
885 fprintf( stderr, " signal=%p,", req->signal );
886 fprintf( stderr, " timeout=" );
887 dump_abs_time( &req->timeout );
888 fprintf( stderr, "," );
889 fprintf( stderr, " handles=" );
890 dump_varargs_handles( cur_size );
893 static void dump_create_event_request( const struct create_event_request *req )
895 fprintf( stderr, " access=%08x,", req->access );
896 fprintf( stderr, " manual_reset=%d,", req->manual_reset );
897 fprintf( stderr, " initial_state=%d,", req->initial_state );
898 fprintf( stderr, " inherit=%d,", req->inherit );
899 fprintf( stderr, " name=" );
900 dump_varargs_unicode_str( cur_size );
903 static void dump_create_event_reply( const struct create_event_reply *req )
905 fprintf( stderr, " handle=%p", req->handle );
908 static void dump_event_op_request( const struct event_op_request *req )
910 fprintf( stderr, " handle=%p,", req->handle );
911 fprintf( stderr, " op=%d", req->op );
914 static void dump_open_event_request( const struct open_event_request *req )
916 fprintf( stderr, " access=%08x,", req->access );
917 fprintf( stderr, " inherit=%d,", req->inherit );
918 fprintf( stderr, " name=" );
919 dump_varargs_unicode_str( cur_size );
922 static void dump_open_event_reply( const struct open_event_reply *req )
924 fprintf( stderr, " handle=%p", req->handle );
927 static void dump_create_mutex_request( const struct create_mutex_request *req )
929 fprintf( stderr, " access=%08x,", req->access );
930 fprintf( stderr, " owned=%d,", req->owned );
931 fprintf( stderr, " inherit=%d,", req->inherit );
932 fprintf( stderr, " name=" );
933 dump_varargs_unicode_str( cur_size );
936 static void dump_create_mutex_reply( const struct create_mutex_reply *req )
938 fprintf( stderr, " handle=%p", req->handle );
941 static void dump_release_mutex_request( const struct release_mutex_request *req )
943 fprintf( stderr, " handle=%p", req->handle );
946 static void dump_release_mutex_reply( const struct release_mutex_reply *req )
948 fprintf( stderr, " prev_count=%08x", req->prev_count );
951 static void dump_open_mutex_request( const struct open_mutex_request *req )
953 fprintf( stderr, " access=%08x,", req->access );
954 fprintf( stderr, " inherit=%d,", req->inherit );
955 fprintf( stderr, " name=" );
956 dump_varargs_unicode_str( cur_size );
959 static void dump_open_mutex_reply( const struct open_mutex_reply *req )
961 fprintf( stderr, " handle=%p", req->handle );
964 static void dump_create_semaphore_request( const struct create_semaphore_request *req )
966 fprintf( stderr, " access=%08x,", req->access );
967 fprintf( stderr, " initial=%08x,", req->initial );
968 fprintf( stderr, " max=%08x,", req->max );
969 fprintf( stderr, " inherit=%d,", req->inherit );
970 fprintf( stderr, " name=" );
971 dump_varargs_unicode_str( cur_size );
974 static void dump_create_semaphore_reply( const struct create_semaphore_reply *req )
976 fprintf( stderr, " handle=%p", req->handle );
979 static void dump_release_semaphore_request( const struct release_semaphore_request *req )
981 fprintf( stderr, " handle=%p,", req->handle );
982 fprintf( stderr, " count=%08x", req->count );
985 static void dump_release_semaphore_reply( const struct release_semaphore_reply *req )
987 fprintf( stderr, " prev_count=%08x", req->prev_count );
990 static void dump_open_semaphore_request( const struct open_semaphore_request *req )
992 fprintf( stderr, " access=%08x,", req->access );
993 fprintf( stderr, " inherit=%d,", req->inherit );
994 fprintf( stderr, " name=" );
995 dump_varargs_unicode_str( cur_size );
998 static void dump_open_semaphore_reply( const struct open_semaphore_reply *req )
1000 fprintf( stderr, " handle=%p", req->handle );
1003 static void dump_create_file_request( const struct create_file_request *req )
1005 fprintf( stderr, " access=%08x,", req->access );
1006 fprintf( stderr, " inherit=%d,", req->inherit );
1007 fprintf( stderr, " sharing=%08x,", req->sharing );
1008 fprintf( stderr, " create=%d,", req->create );
1009 fprintf( stderr, " options=%08x,", req->options );
1010 fprintf( stderr, " attrs=%08x,", req->attrs );
1011 fprintf( stderr, " filename=" );
1012 dump_varargs_string( cur_size );
1015 static void dump_create_file_reply( const struct create_file_reply *req )
1017 fprintf( stderr, " handle=%p", req->handle );
1020 static void dump_alloc_file_handle_request( const struct alloc_file_handle_request *req )
1022 fprintf( stderr, " access=%08x,", req->access );
1023 fprintf( stderr, " inherit=%d,", req->inherit );
1024 fprintf( stderr, " fd=%d", req->fd );
1027 static void dump_alloc_file_handle_reply( const struct alloc_file_handle_reply *req )
1029 fprintf( stderr, " handle=%p", req->handle );
1032 static void dump_get_handle_fd_request( const struct get_handle_fd_request *req )
1034 fprintf( stderr, " handle=%p,", req->handle );
1035 fprintf( stderr, " access=%08x", req->access );
1038 static void dump_get_handle_fd_reply( const struct get_handle_fd_reply *req )
1040 fprintf( stderr, " fd=%d,", req->fd );
1041 fprintf( stderr, " flags=%d", req->flags );
1044 static void dump_flush_file_request( const struct flush_file_request *req )
1046 fprintf( stderr, " handle=%p", req->handle );
1049 static void dump_flush_file_reply( const struct flush_file_reply *req )
1051 fprintf( stderr, " event=%p", req->event );
1054 static void dump_lock_file_request( const struct lock_file_request *req )
1056 fprintf( stderr, " handle=%p,", req->handle );
1057 fprintf( stderr, " offset_low=%08x,", req->offset_low );
1058 fprintf( stderr, " offset_high=%08x,", req->offset_high );
1059 fprintf( stderr, " count_low=%08x,", req->count_low );
1060 fprintf( stderr, " count_high=%08x,", req->count_high );
1061 fprintf( stderr, " shared=%d,", req->shared );
1062 fprintf( stderr, " wait=%d", req->wait );
1065 static void dump_lock_file_reply( const struct lock_file_reply *req )
1067 fprintf( stderr, " handle=%p,", req->handle );
1068 fprintf( stderr, " overlapped=%d", req->overlapped );
1071 static void dump_unlock_file_request( const struct unlock_file_request *req )
1073 fprintf( stderr, " handle=%p,", req->handle );
1074 fprintf( stderr, " offset_low=%08x,", req->offset_low );
1075 fprintf( stderr, " offset_high=%08x,", req->offset_high );
1076 fprintf( stderr, " count_low=%08x,", req->count_low );
1077 fprintf( stderr, " count_high=%08x", req->count_high );
1080 static void dump_create_socket_request( const struct create_socket_request *req )
1082 fprintf( stderr, " access=%08x,", req->access );
1083 fprintf( stderr, " inherit=%d,", req->inherit );
1084 fprintf( stderr, " family=%d,", req->family );
1085 fprintf( stderr, " type=%d,", req->type );
1086 fprintf( stderr, " protocol=%d,", req->protocol );
1087 fprintf( stderr, " flags=%08x", req->flags );
1090 static void dump_create_socket_reply( const struct create_socket_reply *req )
1092 fprintf( stderr, " handle=%p", req->handle );
1095 static void dump_accept_socket_request( const struct accept_socket_request *req )
1097 fprintf( stderr, " lhandle=%p,", req->lhandle );
1098 fprintf( stderr, " access=%08x,", req->access );
1099 fprintf( stderr, " inherit=%d", req->inherit );
1102 static void dump_accept_socket_reply( const struct accept_socket_reply *req )
1104 fprintf( stderr, " handle=%p", req->handle );
1107 static void dump_set_socket_event_request( const struct set_socket_event_request *req )
1109 fprintf( stderr, " handle=%p,", req->handle );
1110 fprintf( stderr, " mask=%08x,", req->mask );
1111 fprintf( stderr, " event=%p,", req->event );
1112 fprintf( stderr, " window=%p,", req->window );
1113 fprintf( stderr, " msg=%08x", req->msg );
1116 static void dump_get_socket_event_request( const struct get_socket_event_request *req )
1118 fprintf( stderr, " handle=%p,", req->handle );
1119 fprintf( stderr, " service=%d,", req->service );
1120 fprintf( stderr, " c_event=%p", req->c_event );
1123 static void dump_get_socket_event_reply( const struct get_socket_event_reply *req )
1125 fprintf( stderr, " mask=%08x,", req->mask );
1126 fprintf( stderr, " pmask=%08x,", req->pmask );
1127 fprintf( stderr, " state=%08x,", req->state );
1128 fprintf( stderr, " errors=" );
1129 dump_varargs_ints( cur_size );
1132 static void dump_enable_socket_event_request( const struct enable_socket_event_request *req )
1134 fprintf( stderr, " handle=%p,", req->handle );
1135 fprintf( stderr, " mask=%08x,", req->mask );
1136 fprintf( stderr, " sstate=%08x,", req->sstate );
1137 fprintf( stderr, " cstate=%08x", req->cstate );
1140 static void dump_set_socket_deferred_request( const struct set_socket_deferred_request *req )
1142 fprintf( stderr, " handle=%p,", req->handle );
1143 fprintf( stderr, " deferred=%p", req->deferred );
1146 static void dump_alloc_console_request( const struct alloc_console_request *req )
1148 fprintf( stderr, " access=%08x,", req->access );
1149 fprintf( stderr, " inherit=%d,", req->inherit );
1150 fprintf( stderr, " pid=%04x", req->pid );
1153 static void dump_alloc_console_reply( const struct alloc_console_reply *req )
1155 fprintf( stderr, " handle_in=%p,", req->handle_in );
1156 fprintf( stderr, " event=%p", req->event );
1159 static void dump_free_console_request( const struct free_console_request *req )
1163 static void dump_get_console_renderer_events_request( const struct get_console_renderer_events_request *req )
1165 fprintf( stderr, " handle=%p", req->handle );
1168 static void dump_get_console_renderer_events_reply( const struct get_console_renderer_events_reply *req )
1170 fprintf( stderr, " data=" );
1171 dump_varargs_bytes( cur_size );
1174 static void dump_open_console_request( const struct open_console_request *req )
1176 fprintf( stderr, " from=%d,", req->from );
1177 fprintf( stderr, " access=%08x,", req->access );
1178 fprintf( stderr, " inherit=%d,", req->inherit );
1179 fprintf( stderr, " share=%d", req->share );
1182 static void dump_open_console_reply( const struct open_console_reply *req )
1184 fprintf( stderr, " handle=%p", req->handle );
1187 static void dump_get_console_wait_event_request( const struct get_console_wait_event_request *req )
1191 static void dump_get_console_wait_event_reply( const struct get_console_wait_event_reply *req )
1193 fprintf( stderr, " handle=%p", req->handle );
1196 static void dump_get_console_mode_request( const struct get_console_mode_request *req )
1198 fprintf( stderr, " handle=%p", req->handle );
1201 static void dump_get_console_mode_reply( const struct get_console_mode_reply *req )
1203 fprintf( stderr, " mode=%d", req->mode );
1206 static void dump_set_console_mode_request( const struct set_console_mode_request *req )
1208 fprintf( stderr, " handle=%p,", req->handle );
1209 fprintf( stderr, " mode=%d", req->mode );
1212 static void dump_set_console_input_info_request( const struct set_console_input_info_request *req )
1214 fprintf( stderr, " handle=%p,", req->handle );
1215 fprintf( stderr, " mask=%d,", req->mask );
1216 fprintf( stderr, " active_sb=%p,", req->active_sb );
1217 fprintf( stderr, " history_mode=%d,", req->history_mode );
1218 fprintf( stderr, " history_size=%d,", req->history_size );
1219 fprintf( stderr, " edition_mode=%d,", req->edition_mode );
1220 fprintf( stderr, " title=" );
1221 dump_varargs_unicode_str( cur_size );
1224 static void dump_get_console_input_info_request( const struct get_console_input_info_request *req )
1226 fprintf( stderr, " handle=%p", req->handle );
1229 static void dump_get_console_input_info_reply( const struct get_console_input_info_reply *req )
1231 fprintf( stderr, " history_mode=%d,", req->history_mode );
1232 fprintf( stderr, " history_size=%d,", req->history_size );
1233 fprintf( stderr, " history_index=%d,", req->history_index );
1234 fprintf( stderr, " edition_mode=%d,", req->edition_mode );
1235 fprintf( stderr, " title=" );
1236 dump_varargs_unicode_str( cur_size );
1239 static void dump_append_console_input_history_request( const struct append_console_input_history_request *req )
1241 fprintf( stderr, " handle=%p,", req->handle );
1242 fprintf( stderr, " line=" );
1243 dump_varargs_unicode_str( cur_size );
1246 static void dump_get_console_input_history_request( const struct get_console_input_history_request *req )
1248 fprintf( stderr, " handle=%p,", req->handle );
1249 fprintf( stderr, " index=%d", req->index );
1252 static void dump_get_console_input_history_reply( const struct get_console_input_history_reply *req )
1254 fprintf( stderr, " total=%d,", req->total );
1255 fprintf( stderr, " line=" );
1256 dump_varargs_unicode_str( cur_size );
1259 static void dump_create_console_output_request( const struct create_console_output_request *req )
1261 fprintf( stderr, " handle_in=%p,", req->handle_in );
1262 fprintf( stderr, " access=%d,", req->access );
1263 fprintf( stderr, " share=%d,", req->share );
1264 fprintf( stderr, " inherit=%d", req->inherit );
1267 static void dump_create_console_output_reply( const struct create_console_output_reply *req )
1269 fprintf( stderr, " handle_out=%p", req->handle_out );
1272 static void dump_set_console_output_info_request( const struct set_console_output_info_request *req )
1274 fprintf( stderr, " handle=%p,", req->handle );
1275 fprintf( stderr, " mask=%d,", req->mask );
1276 fprintf( stderr, " cursor_size=%d,", req->cursor_size );
1277 fprintf( stderr, " cursor_visible=%d,", req->cursor_visible );
1278 fprintf( stderr, " cursor_x=%d,", req->cursor_x );
1279 fprintf( stderr, " cursor_y=%d,", req->cursor_y );
1280 fprintf( stderr, " width=%d,", req->width );
1281 fprintf( stderr, " height=%d,", req->height );
1282 fprintf( stderr, " attr=%d,", req->attr );
1283 fprintf( stderr, " win_left=%d,", req->win_left );
1284 fprintf( stderr, " win_top=%d,", req->win_top );
1285 fprintf( stderr, " win_right=%d,", req->win_right );
1286 fprintf( stderr, " win_bottom=%d,", req->win_bottom );
1287 fprintf( stderr, " max_width=%d,", req->max_width );
1288 fprintf( stderr, " max_height=%d", req->max_height );
1291 static void dump_get_console_output_info_request( const struct get_console_output_info_request *req )
1293 fprintf( stderr, " handle=%p", req->handle );
1296 static void dump_get_console_output_info_reply( const struct get_console_output_info_reply *req )
1298 fprintf( stderr, " cursor_size=%d,", req->cursor_size );
1299 fprintf( stderr, " cursor_visible=%d,", req->cursor_visible );
1300 fprintf( stderr, " cursor_x=%d,", req->cursor_x );
1301 fprintf( stderr, " cursor_y=%d,", req->cursor_y );
1302 fprintf( stderr, " width=%d,", req->width );
1303 fprintf( stderr, " height=%d,", req->height );
1304 fprintf( stderr, " attr=%d,", req->attr );
1305 fprintf( stderr, " win_left=%d,", req->win_left );
1306 fprintf( stderr, " win_top=%d,", req->win_top );
1307 fprintf( stderr, " win_right=%d,", req->win_right );
1308 fprintf( stderr, " win_bottom=%d,", req->win_bottom );
1309 fprintf( stderr, " max_width=%d,", req->max_width );
1310 fprintf( stderr, " max_height=%d", req->max_height );
1313 static void dump_write_console_input_request( const struct write_console_input_request *req )
1315 fprintf( stderr, " handle=%p,", req->handle );
1316 fprintf( stderr, " rec=" );
1317 dump_varargs_input_records( cur_size );
1320 static void dump_write_console_input_reply( const struct write_console_input_reply *req )
1322 fprintf( stderr, " written=%d", req->written );
1325 static void dump_read_console_input_request( const struct read_console_input_request *req )
1327 fprintf( stderr, " handle=%p,", req->handle );
1328 fprintf( stderr, " flush=%d", req->flush );
1331 static void dump_read_console_input_reply( const struct read_console_input_reply *req )
1333 fprintf( stderr, " read=%d,", req->read );
1334 fprintf( stderr, " rec=" );
1335 dump_varargs_input_records( cur_size );
1338 static void dump_write_console_output_request( const struct write_console_output_request *req )
1340 fprintf( stderr, " handle=%p,", req->handle );
1341 fprintf( stderr, " x=%d,", req->x );
1342 fprintf( stderr, " y=%d,", req->y );
1343 fprintf( stderr, " mode=%d,", req->mode );
1344 fprintf( stderr, " wrap=%d,", req->wrap );
1345 fprintf( stderr, " data=" );
1346 dump_varargs_bytes( cur_size );
1349 static void dump_write_console_output_reply( const struct write_console_output_reply *req )
1351 fprintf( stderr, " written=%d,", req->written );
1352 fprintf( stderr, " width=%d,", req->width );
1353 fprintf( stderr, " height=%d", req->height );
1356 static void dump_fill_console_output_request( const struct fill_console_output_request *req )
1358 fprintf( stderr, " handle=%p,", req->handle );
1359 fprintf( stderr, " x=%d,", req->x );
1360 fprintf( stderr, " y=%d,", req->y );
1361 fprintf( stderr, " mode=%d,", req->mode );
1362 fprintf( stderr, " count=%d,", req->count );
1363 fprintf( stderr, " wrap=%d,", req->wrap );
1364 fprintf( stderr, " data=" );
1365 dump_char_info( &req->data );
1368 static void dump_fill_console_output_reply( const struct fill_console_output_reply *req )
1370 fprintf( stderr, " written=%d", req->written );
1373 static void dump_read_console_output_request( const struct read_console_output_request *req )
1375 fprintf( stderr, " handle=%p,", req->handle );
1376 fprintf( stderr, " x=%d,", req->x );
1377 fprintf( stderr, " y=%d,", req->y );
1378 fprintf( stderr, " mode=%d,", req->mode );
1379 fprintf( stderr, " wrap=%d", req->wrap );
1382 static void dump_read_console_output_reply( const struct read_console_output_reply *req )
1384 fprintf( stderr, " width=%d,", req->width );
1385 fprintf( stderr, " height=%d,", req->height );
1386 fprintf( stderr, " data=" );
1387 dump_varargs_bytes( cur_size );
1390 static void dump_move_console_output_request( const struct move_console_output_request *req )
1392 fprintf( stderr, " handle=%p,", req->handle );
1393 fprintf( stderr, " x_src=%d,", req->x_src );
1394 fprintf( stderr, " y_src=%d,", req->y_src );
1395 fprintf( stderr, " x_dst=%d,", req->x_dst );
1396 fprintf( stderr, " y_dst=%d,", req->y_dst );
1397 fprintf( stderr, " w=%d,", req->w );
1398 fprintf( stderr, " h=%d", req->h );
1401 static void dump_send_console_signal_request( const struct send_console_signal_request *req )
1403 fprintf( stderr, " signal=%d,", req->signal );
1404 fprintf( stderr, " group_id=%04x", req->group_id );
1407 static void dump_create_change_notification_request( const struct create_change_notification_request *req )
1409 fprintf( stderr, " handle=%p,", req->handle );
1410 fprintf( stderr, " subtree=%d,", req->subtree );
1411 fprintf( stderr, " filter=%08x", req->filter );
1414 static void dump_create_change_notification_reply( const struct create_change_notification_reply *req )
1416 fprintf( stderr, " handle=%p", req->handle );
1419 static void dump_next_change_notification_request( const struct next_change_notification_request *req )
1421 fprintf( stderr, " handle=%p", req->handle );
1424 static void dump_create_mapping_request( const struct create_mapping_request *req )
1426 fprintf( stderr, " size_high=%d,", req->size_high );
1427 fprintf( stderr, " size_low=%d,", req->size_low );
1428 fprintf( stderr, " protect=%d,", req->protect );
1429 fprintf( stderr, " access=%08x,", req->access );
1430 fprintf( stderr, " inherit=%d,", req->inherit );
1431 fprintf( stderr, " file_handle=%p,", req->file_handle );
1432 fprintf( stderr, " name=" );
1433 dump_varargs_unicode_str( cur_size );
1436 static void dump_create_mapping_reply( const struct create_mapping_reply *req )
1438 fprintf( stderr, " handle=%p", req->handle );
1441 static void dump_open_mapping_request( const struct open_mapping_request *req )
1443 fprintf( stderr, " access=%08x,", req->access );
1444 fprintf( stderr, " inherit=%d,", req->inherit );
1445 fprintf( stderr, " name=" );
1446 dump_varargs_unicode_str( cur_size );
1449 static void dump_open_mapping_reply( const struct open_mapping_reply *req )
1451 fprintf( stderr, " handle=%p", req->handle );
1454 static void dump_get_mapping_info_request( const struct get_mapping_info_request *req )
1456 fprintf( stderr, " handle=%p", req->handle );
1459 static void dump_get_mapping_info_reply( const struct get_mapping_info_reply *req )
1461 fprintf( stderr, " size_high=%d,", req->size_high );
1462 fprintf( stderr, " size_low=%d,", req->size_low );
1463 fprintf( stderr, " protect=%d,", req->protect );
1464 fprintf( stderr, " header_size=%d,", req->header_size );
1465 fprintf( stderr, " base=%p,", req->base );
1466 fprintf( stderr, " shared_file=%p,", req->shared_file );
1467 fprintf( stderr, " shared_size=%d", req->shared_size );
1470 static void dump_create_snapshot_request( const struct create_snapshot_request *req )
1472 fprintf( stderr, " inherit=%d,", req->inherit );
1473 fprintf( stderr, " flags=%d,", req->flags );
1474 fprintf( stderr, " pid=%04x", req->pid );
1477 static void dump_create_snapshot_reply( const struct create_snapshot_reply *req )
1479 fprintf( stderr, " handle=%p", req->handle );
1482 static void dump_next_process_request( const struct next_process_request *req )
1484 fprintf( stderr, " handle=%p,", req->handle );
1485 fprintf( stderr, " reset=%d", req->reset );
1488 static void dump_next_process_reply( const struct next_process_reply *req )
1490 fprintf( stderr, " count=%d,", req->count );
1491 fprintf( stderr, " pid=%04x,", req->pid );
1492 fprintf( stderr, " ppid=%04x,", req->ppid );
1493 fprintf( stderr, " heap=%p,", req->heap );
1494 fprintf( stderr, " module=%p,", req->module );
1495 fprintf( stderr, " threads=%d,", req->threads );
1496 fprintf( stderr, " priority=%d,", req->priority );
1497 fprintf( stderr, " handles=%d,", req->handles );
1498 fprintf( stderr, " filename=" );
1499 dump_varargs_unicode_str( cur_size );
1502 static void dump_next_thread_request( const struct next_thread_request *req )
1504 fprintf( stderr, " handle=%p,", req->handle );
1505 fprintf( stderr, " reset=%d", req->reset );
1508 static void dump_next_thread_reply( const struct next_thread_reply *req )
1510 fprintf( stderr, " count=%d,", req->count );
1511 fprintf( stderr, " pid=%04x,", req->pid );
1512 fprintf( stderr, " tid=%04x,", req->tid );
1513 fprintf( stderr, " base_pri=%d,", req->base_pri );
1514 fprintf( stderr, " delta_pri=%d", req->delta_pri );
1517 static void dump_next_module_request( const struct next_module_request *req )
1519 fprintf( stderr, " handle=%p,", req->handle );
1520 fprintf( stderr, " reset=%d", req->reset );
1523 static void dump_next_module_reply( const struct next_module_reply *req )
1525 fprintf( stderr, " pid=%04x,", req->pid );
1526 fprintf( stderr, " base=%p,", req->base );
1527 fprintf( stderr, " size=%d,", req->size );
1528 fprintf( stderr, " filename=" );
1529 dump_varargs_unicode_str( cur_size );
1532 static void dump_wait_debug_event_request( const struct wait_debug_event_request *req )
1534 fprintf( stderr, " get_handle=%d", req->get_handle );
1537 static void dump_wait_debug_event_reply( const struct wait_debug_event_reply *req )
1539 fprintf( stderr, " pid=%04x,", req->pid );
1540 fprintf( stderr, " tid=%04x,", req->tid );
1541 fprintf( stderr, " wait=%p,", req->wait );
1542 fprintf( stderr, " event=" );
1543 dump_varargs_debug_event( cur_size );
1546 static void dump_queue_exception_event_request( const struct queue_exception_event_request *req )
1548 fprintf( stderr, " first=%d,", req->first );
1549 fprintf( stderr, " record=" );
1550 dump_varargs_exc_event( cur_size );
1553 static void dump_queue_exception_event_reply( const struct queue_exception_event_reply *req )
1555 fprintf( stderr, " handle=%p", req->handle );
1558 static void dump_get_exception_status_request( const struct get_exception_status_request *req )
1560 fprintf( stderr, " handle=%p", req->handle );
1563 static void dump_get_exception_status_reply( const struct get_exception_status_reply *req )
1565 fprintf( stderr, " status=%d,", req->status );
1566 fprintf( stderr, " context=" );
1567 dump_varargs_context( cur_size );
1570 static void dump_output_debug_string_request( const struct output_debug_string_request *req )
1572 fprintf( stderr, " string=%p,", req->string );
1573 fprintf( stderr, " unicode=%d,", req->unicode );
1574 fprintf( stderr, " length=%d", req->length );
1577 static void dump_continue_debug_event_request( const struct continue_debug_event_request *req )
1579 fprintf( stderr, " pid=%04x,", req->pid );
1580 fprintf( stderr, " tid=%04x,", req->tid );
1581 fprintf( stderr, " status=%d", req->status );
1584 static void dump_debug_process_request( const struct debug_process_request *req )
1586 fprintf( stderr, " pid=%04x,", req->pid );
1587 fprintf( stderr, " attach=%d", req->attach );
1590 static void dump_debug_break_request( const struct debug_break_request *req )
1592 fprintf( stderr, " handle=%p", req->handle );
1595 static void dump_debug_break_reply( const struct debug_break_reply *req )
1597 fprintf( stderr, " self=%d", req->self );
1600 static void dump_set_debugger_kill_on_exit_request( const struct set_debugger_kill_on_exit_request *req )
1602 fprintf( stderr, " kill_on_exit=%d", req->kill_on_exit );
1605 static void dump_read_process_memory_request( const struct read_process_memory_request *req )
1607 fprintf( stderr, " handle=%p,", req->handle );
1608 fprintf( stderr, " addr=%p", req->addr );
1611 static void dump_read_process_memory_reply( const struct read_process_memory_reply *req )
1613 fprintf( stderr, " data=" );
1614 dump_varargs_bytes( cur_size );
1617 static void dump_write_process_memory_request( const struct write_process_memory_request *req )
1619 fprintf( stderr, " handle=%p,", req->handle );
1620 fprintf( stderr, " addr=%p,", req->addr );
1621 fprintf( stderr, " first_mask=%08x,", req->first_mask );
1622 fprintf( stderr, " last_mask=%08x,", req->last_mask );
1623 fprintf( stderr, " data=" );
1624 dump_varargs_bytes( cur_size );
1627 static void dump_create_key_request( const struct create_key_request *req )
1629 fprintf( stderr, " parent=%p,", req->parent );
1630 fprintf( stderr, " access=%08x,", req->access );
1631 fprintf( stderr, " options=%08x,", req->options );
1632 fprintf( stderr, " modif=%ld,", (long)req->modif );
1633 fprintf( stderr, " namelen=%d,", req->namelen );
1634 fprintf( stderr, " name=" );
1635 dump_varargs_unicode_str( min(cur_size,req->namelen) );
1636 fputc( ',', stderr );
1637 fprintf( stderr, " class=" );
1638 dump_varargs_unicode_str( cur_size );
1641 static void dump_create_key_reply( const struct create_key_reply *req )
1643 fprintf( stderr, " hkey=%p,", req->hkey );
1644 fprintf( stderr, " created=%d", req->created );
1647 static void dump_open_key_request( const struct open_key_request *req )
1649 fprintf( stderr, " parent=%p,", req->parent );
1650 fprintf( stderr, " access=%08x,", req->access );
1651 fprintf( stderr, " name=" );
1652 dump_varargs_unicode_str( cur_size );
1655 static void dump_open_key_reply( const struct open_key_reply *req )
1657 fprintf( stderr, " hkey=%p", req->hkey );
1660 static void dump_delete_key_request( const struct delete_key_request *req )
1662 fprintf( stderr, " hkey=%p", req->hkey );
1665 static void dump_flush_key_request( const struct flush_key_request *req )
1667 fprintf( stderr, " hkey=%p", req->hkey );
1670 static void dump_enum_key_request( const struct enum_key_request *req )
1672 fprintf( stderr, " hkey=%p,", req->hkey );
1673 fprintf( stderr, " index=%d,", req->index );
1674 fprintf( stderr, " info_class=%d", req->info_class );
1677 static void dump_enum_key_reply( const struct enum_key_reply *req )
1679 fprintf( stderr, " subkeys=%d,", req->subkeys );
1680 fprintf( stderr, " max_subkey=%d,", req->max_subkey );
1681 fprintf( stderr, " max_class=%d,", req->max_class );
1682 fprintf( stderr, " values=%d,", req->values );
1683 fprintf( stderr, " max_value=%d,", req->max_value );
1684 fprintf( stderr, " max_data=%d,", req->max_data );
1685 fprintf( stderr, " modif=%ld,", (long)req->modif );
1686 fprintf( stderr, " total=%d,", req->total );
1687 fprintf( stderr, " namelen=%d,", req->namelen );
1688 fprintf( stderr, " name=" );
1689 dump_varargs_unicode_str( min(cur_size,req->namelen) );
1690 fputc( ',', stderr );
1691 fprintf( stderr, " class=" );
1692 dump_varargs_unicode_str( cur_size );
1695 static void dump_set_key_value_request( const struct set_key_value_request *req )
1697 fprintf( stderr, " hkey=%p,", req->hkey );
1698 fprintf( stderr, " type=%d,", req->type );
1699 fprintf( stderr, " namelen=%d,", req->namelen );
1700 fprintf( stderr, " name=" );
1701 dump_varargs_unicode_str( min(cur_size,req->namelen) );
1702 fputc( ',', stderr );
1703 fprintf( stderr, " data=" );
1704 dump_varargs_bytes( cur_size );
1707 static void dump_get_key_value_request( const struct get_key_value_request *req )
1709 fprintf( stderr, " hkey=%p,", req->hkey );
1710 fprintf( stderr, " name=" );
1711 dump_varargs_unicode_str( cur_size );
1714 static void dump_get_key_value_reply( const struct get_key_value_reply *req )
1716 fprintf( stderr, " type=%d,", req->type );
1717 fprintf( stderr, " total=%d,", req->total );
1718 fprintf( stderr, " data=" );
1719 dump_varargs_bytes( cur_size );
1722 static void dump_enum_key_value_request( const struct enum_key_value_request *req )
1724 fprintf( stderr, " hkey=%p,", req->hkey );
1725 fprintf( stderr, " index=%d,", req->index );
1726 fprintf( stderr, " info_class=%d", req->info_class );
1729 static void dump_enum_key_value_reply( const struct enum_key_value_reply *req )
1731 fprintf( stderr, " type=%d,", req->type );
1732 fprintf( stderr, " total=%d,", req->total );
1733 fprintf( stderr, " namelen=%d,", req->namelen );
1734 fprintf( stderr, " name=" );
1735 dump_varargs_unicode_str( min(cur_size,req->namelen) );
1736 fputc( ',', stderr );
1737 fprintf( stderr, " data=" );
1738 dump_varargs_bytes( cur_size );
1741 static void dump_delete_key_value_request( const struct delete_key_value_request *req )
1743 fprintf( stderr, " hkey=%p,", req->hkey );
1744 fprintf( stderr, " name=" );
1745 dump_varargs_unicode_str( cur_size );
1748 static void dump_load_registry_request( const struct load_registry_request *req )
1750 fprintf( stderr, " hkey=%p,", req->hkey );
1751 fprintf( stderr, " file=%p,", req->file );
1752 fprintf( stderr, " name=" );
1753 dump_varargs_unicode_str( cur_size );
1756 static void dump_unload_registry_request( const struct unload_registry_request *req )
1758 fprintf( stderr, " hkey=%p", req->hkey );
1761 static void dump_save_registry_request( const struct save_registry_request *req )
1763 fprintf( stderr, " hkey=%p,", req->hkey );
1764 fprintf( stderr, " file=%p", req->file );
1767 static void dump_set_registry_notification_request( const struct set_registry_notification_request *req )
1769 fprintf( stderr, " hkey=%p,", req->hkey );
1770 fprintf( stderr, " event=%p,", req->event );
1771 fprintf( stderr, " subtree=%d,", req->subtree );
1772 fprintf( stderr, " filter=%08x", req->filter );
1775 static void dump_create_timer_request( const struct create_timer_request *req )
1777 fprintf( stderr, " access=%08x,", req->access );
1778 fprintf( stderr, " inherit=%d,", req->inherit );
1779 fprintf( stderr, " manual=%d,", req->manual );
1780 fprintf( stderr, " name=" );
1781 dump_varargs_unicode_str( cur_size );
1784 static void dump_create_timer_reply( const struct create_timer_reply *req )
1786 fprintf( stderr, " handle=%p", req->handle );
1789 static void dump_open_timer_request( const struct open_timer_request *req )
1791 fprintf( stderr, " access=%08x,", req->access );
1792 fprintf( stderr, " inherit=%d,", req->inherit );
1793 fprintf( stderr, " name=" );
1794 dump_varargs_unicode_str( cur_size );
1797 static void dump_open_timer_reply( const struct open_timer_reply *req )
1799 fprintf( stderr, " handle=%p", req->handle );
1802 static void dump_set_timer_request( const struct set_timer_request *req )
1804 fprintf( stderr, " handle=%p,", req->handle );
1805 fprintf( stderr, " expire=" );
1806 dump_abs_time( &req->expire );
1807 fprintf( stderr, "," );
1808 fprintf( stderr, " period=%d,", req->period );
1809 fprintf( stderr, " callback=%p,", req->callback );
1810 fprintf( stderr, " arg=%p", req->arg );
1813 static void dump_set_timer_reply( const struct set_timer_reply *req )
1815 fprintf( stderr, " signaled=%d", req->signaled );
1818 static void dump_cancel_timer_request( const struct cancel_timer_request *req )
1820 fprintf( stderr, " handle=%p", req->handle );
1823 static void dump_cancel_timer_reply( const struct cancel_timer_reply *req )
1825 fprintf( stderr, " signaled=%d", req->signaled );
1828 static void dump_get_timer_info_request( const struct get_timer_info_request *req )
1830 fprintf( stderr, " handle=%p", req->handle );
1833 static void dump_get_timer_info_reply( const struct get_timer_info_reply *req )
1835 fprintf( stderr, " when=" );
1836 dump_abs_time( &req->when );
1837 fprintf( stderr, "," );
1838 fprintf( stderr, " signaled=%d", req->signaled );
1841 static void dump_get_thread_context_request( const struct get_thread_context_request *req )
1843 fprintf( stderr, " handle=%p,", req->handle );
1844 fprintf( stderr, " flags=%08x", req->flags );
1847 static void dump_get_thread_context_reply( const struct get_thread_context_reply *req )
1849 fprintf( stderr, " context=" );
1850 dump_varargs_context( cur_size );
1853 static void dump_set_thread_context_request( const struct set_thread_context_request *req )
1855 fprintf( stderr, " handle=%p,", req->handle );
1856 fprintf( stderr, " flags=%08x,", req->flags );
1857 fprintf( stderr, " context=" );
1858 dump_varargs_context( cur_size );
1861 static void dump_get_selector_entry_request( const struct get_selector_entry_request *req )
1863 fprintf( stderr, " handle=%p,", req->handle );
1864 fprintf( stderr, " entry=%d", req->entry );
1867 static void dump_get_selector_entry_reply( const struct get_selector_entry_reply *req )
1869 fprintf( stderr, " base=%08x,", req->base );
1870 fprintf( stderr, " limit=%08x,", req->limit );
1871 fprintf( stderr, " flags=%02x", req->flags );
1874 static void dump_add_atom_request( const struct add_atom_request *req )
1876 fprintf( stderr, " table=%p,", req->table );
1877 fprintf( stderr, " name=" );
1878 dump_varargs_unicode_str( cur_size );
1881 static void dump_add_atom_reply( const struct add_atom_reply *req )
1883 fprintf( stderr, " atom=%04x", req->atom );
1886 static void dump_delete_atom_request( const struct delete_atom_request *req )
1888 fprintf( stderr, " table=%p,", req->table );
1889 fprintf( stderr, " atom=%04x", req->atom );
1892 static void dump_find_atom_request( const struct find_atom_request *req )
1894 fprintf( stderr, " table=%p,", req->table );
1895 fprintf( stderr, " name=" );
1896 dump_varargs_unicode_str( cur_size );
1899 static void dump_find_atom_reply( const struct find_atom_reply *req )
1901 fprintf( stderr, " atom=%04x", req->atom );
1904 static void dump_get_atom_information_request( const struct get_atom_information_request *req )
1906 fprintf( stderr, " table=%p,", req->table );
1907 fprintf( stderr, " atom=%04x", req->atom );
1910 static void dump_get_atom_information_reply( const struct get_atom_information_reply *req )
1912 fprintf( stderr, " count=%d,", req->count );
1913 fprintf( stderr, " pinned=%d,", req->pinned );
1914 fprintf( stderr, " name=" );
1915 dump_varargs_unicode_str( cur_size );
1918 static void dump_set_atom_information_request( const struct set_atom_information_request *req )
1920 fprintf( stderr, " table=%p,", req->table );
1921 fprintf( stderr, " atom=%04x,", req->atom );
1922 fprintf( stderr, " pinned=%d", req->pinned );
1925 static void dump_empty_atom_table_request( const struct empty_atom_table_request *req )
1927 fprintf( stderr, " table=%p,", req->table );
1928 fprintf( stderr, " if_pinned=%d", req->if_pinned );
1931 static void dump_init_atom_table_request( const struct init_atom_table_request *req )
1933 fprintf( stderr, " entries=%d", req->entries );
1936 static void dump_init_atom_table_reply( const struct init_atom_table_reply *req )
1938 fprintf( stderr, " table=%p", req->table );
1941 static void dump_get_msg_queue_request( const struct get_msg_queue_request *req )
1945 static void dump_get_msg_queue_reply( const struct get_msg_queue_reply *req )
1947 fprintf( stderr, " handle=%p", req->handle );
1950 static void dump_set_queue_mask_request( const struct set_queue_mask_request *req )
1952 fprintf( stderr, " wake_mask=%08x,", req->wake_mask );
1953 fprintf( stderr, " changed_mask=%08x,", req->changed_mask );
1954 fprintf( stderr, " skip_wait=%d", req->skip_wait );
1957 static void dump_set_queue_mask_reply( const struct set_queue_mask_reply *req )
1959 fprintf( stderr, " wake_bits=%08x,", req->wake_bits );
1960 fprintf( stderr, " changed_bits=%08x", req->changed_bits );
1963 static void dump_get_queue_status_request( const struct get_queue_status_request *req )
1965 fprintf( stderr, " clear=%d", req->clear );
1968 static void dump_get_queue_status_reply( const struct get_queue_status_reply *req )
1970 fprintf( stderr, " wake_bits=%08x,", req->wake_bits );
1971 fprintf( stderr, " changed_bits=%08x", req->changed_bits );
1974 static void dump_wait_input_idle_request( const struct wait_input_idle_request *req )
1976 fprintf( stderr, " handle=%p,", req->handle );
1977 fprintf( stderr, " timeout=%d", req->timeout );
1980 static void dump_wait_input_idle_reply( const struct wait_input_idle_reply *req )
1982 fprintf( stderr, " event=%p", req->event );
1985 static void dump_send_message_request( const struct send_message_request *req )
1987 fprintf( stderr, " id=%04x,", req->id );
1988 fprintf( stderr, " type=%d,", req->type );
1989 fprintf( stderr, " flags=%d,", req->flags );
1990 fprintf( stderr, " win=%p,", req->win );
1991 fprintf( stderr, " msg=%08x,", req->msg );
1992 fprintf( stderr, " wparam=%08x,", req->wparam );
1993 fprintf( stderr, " lparam=%08x,", req->lparam );
1994 fprintf( stderr, " x=%d,", req->x );
1995 fprintf( stderr, " y=%d,", req->y );
1996 fprintf( stderr, " time=%08x,", req->time );
1997 fprintf( stderr, " info=%08x,", req->info );
1998 fprintf( stderr, " timeout=%d,", req->timeout );
1999 fprintf( stderr, " callback=%p,", req->callback );
2000 fprintf( stderr, " data=" );
2001 dump_varargs_bytes( cur_size );
2004 static void dump_get_message_request( const struct get_message_request *req )
2006 fprintf( stderr, " flags=%d,", req->flags );
2007 fprintf( stderr, " get_win=%p,", req->get_win );
2008 fprintf( stderr, " get_first=%08x,", req->get_first );
2009 fprintf( stderr, " get_last=%08x,", req->get_last );
2010 fprintf( stderr, " hw_id=%08x", req->hw_id );
2013 static void dump_get_message_reply( const struct get_message_reply *req )
2015 fprintf( stderr, " type=%d,", req->type );
2016 fprintf( stderr, " win=%p,", req->win );
2017 fprintf( stderr, " msg=%08x,", req->msg );
2018 fprintf( stderr, " wparam=%08x,", req->wparam );
2019 fprintf( stderr, " lparam=%08x,", req->lparam );
2020 fprintf( stderr, " x=%d,", req->x );
2021 fprintf( stderr, " y=%d,", req->y );
2022 fprintf( stderr, " hook=%p,", req->hook );
2023 fprintf( stderr, " hook_proc=%p,", req->hook_proc );
2024 fprintf( stderr, " time=%08x,", req->time );
2025 fprintf( stderr, " info=%08x,", req->info );
2026 fprintf( stderr, " hw_id=%08x,", req->hw_id );
2027 fprintf( stderr, " active_hooks=%08x,", req->active_hooks );
2028 fprintf( stderr, " total=%d,", req->total );
2029 fprintf( stderr, " data=" );
2030 dump_varargs_bytes( cur_size );
2033 static void dump_reply_message_request( const struct reply_message_request *req )
2035 fprintf( stderr, " result=%08x,", req->result );
2036 fprintf( stderr, " remove=%d,", req->remove );
2037 fprintf( stderr, " data=" );
2038 dump_varargs_bytes( cur_size );
2041 static void dump_accept_hardware_message_request( const struct accept_hardware_message_request *req )
2043 fprintf( stderr, " hw_id=%08x,", req->hw_id );
2044 fprintf( stderr, " remove=%d,", req->remove );
2045 fprintf( stderr, " new_win=%p", req->new_win );
2048 static void dump_get_message_reply_request( const struct get_message_reply_request *req )
2050 fprintf( stderr, " cancel=%d", req->cancel );
2053 static void dump_get_message_reply_reply( const struct get_message_reply_reply *req )
2055 fprintf( stderr, " result=%08x,", req->result );
2056 fprintf( stderr, " data=" );
2057 dump_varargs_bytes( cur_size );
2060 static void dump_set_win_timer_request( const struct set_win_timer_request *req )
2062 fprintf( stderr, " win=%p,", req->win );
2063 fprintf( stderr, " msg=%08x,", req->msg );
2064 fprintf( stderr, " id=%08x,", req->id );
2065 fprintf( stderr, " rate=%08x,", req->rate );
2066 fprintf( stderr, " lparam=%08x", req->lparam );
2069 static void dump_set_win_timer_reply( const struct set_win_timer_reply *req )
2071 fprintf( stderr, " id=%08x", req->id );
2074 static void dump_kill_win_timer_request( const struct kill_win_timer_request *req )
2076 fprintf( stderr, " win=%p,", req->win );
2077 fprintf( stderr, " msg=%08x,", req->msg );
2078 fprintf( stderr, " id=%08x", req->id );
2081 static void dump_get_serial_info_request( const struct get_serial_info_request *req )
2083 fprintf( stderr, " handle=%p", req->handle );
2086 static void dump_get_serial_info_reply( const struct get_serial_info_reply *req )
2088 fprintf( stderr, " readinterval=%08x,", req->readinterval );
2089 fprintf( stderr, " readconst=%08x,", req->readconst );
2090 fprintf( stderr, " readmult=%08x,", req->readmult );
2091 fprintf( stderr, " writeconst=%08x,", req->writeconst );
2092 fprintf( stderr, " writemult=%08x,", req->writemult );
2093 fprintf( stderr, " eventmask=%08x,", req->eventmask );
2094 fprintf( stderr, " commerror=%08x", req->commerror );
2097 static void dump_set_serial_info_request( const struct set_serial_info_request *req )
2099 fprintf( stderr, " handle=%p,", req->handle );
2100 fprintf( stderr, " flags=%d,", req->flags );
2101 fprintf( stderr, " readinterval=%08x,", req->readinterval );
2102 fprintf( stderr, " readconst=%08x,", req->readconst );
2103 fprintf( stderr, " readmult=%08x,", req->readmult );
2104 fprintf( stderr, " writeconst=%08x,", req->writeconst );
2105 fprintf( stderr, " writemult=%08x,", req->writemult );
2106 fprintf( stderr, " eventmask=%08x,", req->eventmask );
2107 fprintf( stderr, " commerror=%08x", req->commerror );
2110 static void dump_register_async_request( const struct register_async_request *req )
2112 fprintf( stderr, " handle=%p,", req->handle );
2113 fprintf( stderr, " type=%d,", req->type );
2114 fprintf( stderr, " io_apc=%p,", req->io_apc );
2115 fprintf( stderr, " io_sb=%p,", req->io_sb );
2116 fprintf( stderr, " io_user=%p,", req->io_user );
2117 fprintf( stderr, " count=%d", req->count );
2120 static void dump_cancel_async_request( const struct cancel_async_request *req )
2122 fprintf( stderr, " handle=%p", req->handle );
2125 static void dump_create_named_pipe_request( const struct create_named_pipe_request *req )
2127 fprintf( stderr, " options=%08x,", req->options );
2128 fprintf( stderr, " flags=%08x,", req->flags );
2129 fprintf( stderr, " maxinstances=%08x,", req->maxinstances );
2130 fprintf( stderr, " outsize=%08x,", req->outsize );
2131 fprintf( stderr, " insize=%08x,", req->insize );
2132 fprintf( stderr, " timeout=%08x,", req->timeout );
2133 fprintf( stderr, " inherit=%d,", req->inherit );
2134 fprintf( stderr, " name=" );
2135 dump_varargs_unicode_str( cur_size );
2138 static void dump_create_named_pipe_reply( const struct create_named_pipe_reply *req )
2140 fprintf( stderr, " handle=%p", req->handle );
2143 static void dump_open_named_pipe_request( const struct open_named_pipe_request *req )
2145 fprintf( stderr, " access=%08x,", req->access );
2146 fprintf( stderr, " flags=%08x,", req->flags );
2147 fprintf( stderr, " inherit=%d,", req->inherit );
2148 fprintf( stderr, " name=" );
2149 dump_varargs_unicode_str( cur_size );
2152 static void dump_open_named_pipe_reply( const struct open_named_pipe_reply *req )
2154 fprintf( stderr, " handle=%p", req->handle );
2157 static void dump_connect_named_pipe_request( const struct connect_named_pipe_request *req )
2159 fprintf( stderr, " handle=%p,", req->handle );
2160 fprintf( stderr, " overlapped=%p,", req->overlapped );
2161 fprintf( stderr, " func=%p", req->func );
2164 static void dump_wait_named_pipe_request( const struct wait_named_pipe_request *req )
2166 fprintf( stderr, " timeout=%08x,", req->timeout );
2167 fprintf( stderr, " overlapped=%p,", req->overlapped );
2168 fprintf( stderr, " func=%p,", req->func );
2169 fprintf( stderr, " name=" );
2170 dump_varargs_unicode_str( cur_size );
2173 static void dump_disconnect_named_pipe_request( const struct disconnect_named_pipe_request *req )
2175 fprintf( stderr, " handle=%p", req->handle );
2178 static void dump_disconnect_named_pipe_reply( const struct disconnect_named_pipe_reply *req )
2180 fprintf( stderr, " fd=%d", req->fd );
2183 static void dump_get_named_pipe_info_request( const struct get_named_pipe_info_request *req )
2185 fprintf( stderr, " handle=%p", req->handle );
2188 static void dump_get_named_pipe_info_reply( const struct get_named_pipe_info_reply *req )
2190 fprintf( stderr, " flags=%08x,", req->flags );
2191 fprintf( stderr, " maxinstances=%08x,", req->maxinstances );
2192 fprintf( stderr, " outsize=%08x,", req->outsize );
2193 fprintf( stderr, " insize=%08x", req->insize );
2196 static void dump_create_window_request( const struct create_window_request *req )
2198 fprintf( stderr, " parent=%p,", req->parent );
2199 fprintf( stderr, " owner=%p,", req->owner );
2200 fprintf( stderr, " atom=%04x,", req->atom );
2201 fprintf( stderr, " instance=%p", req->instance );
2204 static void dump_create_window_reply( const struct create_window_reply *req )
2206 fprintf( stderr, " handle=%p,", req->handle );
2207 fprintf( stderr, " extra=%d,", req->extra );
2208 fprintf( stderr, " class_ptr=%p", req->class_ptr );
2211 static void dump_destroy_window_request( const struct destroy_window_request *req )
2213 fprintf( stderr, " handle=%p", req->handle );
2216 static void dump_get_desktop_window_request( const struct get_desktop_window_request *req )
2220 static void dump_get_desktop_window_reply( const struct get_desktop_window_reply *req )
2222 fprintf( stderr, " handle=%p", req->handle );
2225 static void dump_set_window_owner_request( const struct set_window_owner_request *req )
2227 fprintf( stderr, " handle=%p,", req->handle );
2228 fprintf( stderr, " owner=%p", req->owner );
2231 static void dump_set_window_owner_reply( const struct set_window_owner_reply *req )
2233 fprintf( stderr, " full_owner=%p,", req->full_owner );
2234 fprintf( stderr, " prev_owner=%p", req->prev_owner );
2237 static void dump_get_window_info_request( const struct get_window_info_request *req )
2239 fprintf( stderr, " handle=%p", req->handle );
2242 static void dump_get_window_info_reply( const struct get_window_info_reply *req )
2244 fprintf( stderr, " full_handle=%p,", req->full_handle );
2245 fprintf( stderr, " last_active=%p,", req->last_active );
2246 fprintf( stderr, " pid=%04x,", req->pid );
2247 fprintf( stderr, " tid=%04x,", req->tid );
2248 fprintf( stderr, " atom=%04x,", req->atom );
2249 fprintf( stderr, " is_unicode=%d", req->is_unicode );
2252 static void dump_set_window_info_request( const struct set_window_info_request *req )
2254 fprintf( stderr, " handle=%p,", req->handle );
2255 fprintf( stderr, " flags=%08x,", req->flags );
2256 fprintf( stderr, " style=%08x,", req->style );
2257 fprintf( stderr, " ex_style=%08x,", req->ex_style );
2258 fprintf( stderr, " id=%08x,", req->id );
2259 fprintf( stderr, " instance=%p,", req->instance );
2260 fprintf( stderr, " is_unicode=%d,", req->is_unicode );
2261 fprintf( stderr, " user_data=%p,", req->user_data );
2262 fprintf( stderr, " extra_offset=%d,", req->extra_offset );
2263 fprintf( stderr, " extra_size=%d,", req->extra_size );
2264 fprintf( stderr, " extra_value=%08x", req->extra_value );
2267 static void dump_set_window_info_reply( const struct set_window_info_reply *req )
2269 fprintf( stderr, " old_style=%08x,", req->old_style );
2270 fprintf( stderr, " old_ex_style=%08x,", req->old_ex_style );
2271 fprintf( stderr, " old_id=%08x,", req->old_id );
2272 fprintf( stderr, " old_instance=%p,", req->old_instance );
2273 fprintf( stderr, " old_user_data=%p,", req->old_user_data );
2274 fprintf( stderr, " old_extra_value=%08x", req->old_extra_value );
2277 static void dump_set_parent_request( const struct set_parent_request *req )
2279 fprintf( stderr, " handle=%p,", req->handle );
2280 fprintf( stderr, " parent=%p", req->parent );
2283 static void dump_set_parent_reply( const struct set_parent_reply *req )
2285 fprintf( stderr, " old_parent=%p,", req->old_parent );
2286 fprintf( stderr, " full_parent=%p", req->full_parent );
2289 static void dump_get_window_parents_request( const struct get_window_parents_request *req )
2291 fprintf( stderr, " handle=%p", req->handle );
2294 static void dump_get_window_parents_reply( const struct get_window_parents_reply *req )
2296 fprintf( stderr, " count=%d,", req->count );
2297 fprintf( stderr, " parents=" );
2298 dump_varargs_user_handles( cur_size );
2301 static void dump_get_window_children_request( const struct get_window_children_request *req )
2303 fprintf( stderr, " parent=%p,", req->parent );
2304 fprintf( stderr, " atom=%04x,", req->atom );
2305 fprintf( stderr, " tid=%04x", req->tid );
2308 static void dump_get_window_children_reply( const struct get_window_children_reply *req )
2310 fprintf( stderr, " count=%d,", req->count );
2311 fprintf( stderr, " children=" );
2312 dump_varargs_user_handles( cur_size );
2315 static void dump_get_window_children_from_point_request( const struct get_window_children_from_point_request *req )
2317 fprintf( stderr, " parent=%p,", req->parent );
2318 fprintf( stderr, " x=%d,", req->x );
2319 fprintf( stderr, " y=%d", req->y );
2322 static void dump_get_window_children_from_point_reply( const struct get_window_children_from_point_reply *req )
2324 fprintf( stderr, " count=%d,", req->count );
2325 fprintf( stderr, " children=" );
2326 dump_varargs_user_handles( cur_size );
2329 static void dump_get_window_tree_request( const struct get_window_tree_request *req )
2331 fprintf( stderr, " handle=%p", req->handle );
2334 static void dump_get_window_tree_reply( const struct get_window_tree_reply *req )
2336 fprintf( stderr, " parent=%p,", req->parent );
2337 fprintf( stderr, " owner=%p,", req->owner );
2338 fprintf( stderr, " next_sibling=%p,", req->next_sibling );
2339 fprintf( stderr, " prev_sibling=%p,", req->prev_sibling );
2340 fprintf( stderr, " first_sibling=%p,", req->first_sibling );
2341 fprintf( stderr, " last_sibling=%p,", req->last_sibling );
2342 fprintf( stderr, " first_child=%p,", req->first_child );
2343 fprintf( stderr, " last_child=%p", req->last_child );
2346 static void dump_set_window_pos_request( const struct set_window_pos_request *req )
2348 fprintf( stderr, " handle=%p,", req->handle );
2349 fprintf( stderr, " previous=%p,", req->previous );
2350 fprintf( stderr, " flags=%08x,", req->flags );
2351 fprintf( stderr, " window=" );
2352 dump_rectangle( &req->window );
2353 fprintf( stderr, "," );
2354 fprintf( stderr, " client=" );
2355 dump_rectangle( &req->client );
2356 fprintf( stderr, "," );
2357 fprintf( stderr, " valid=" );
2358 dump_varargs_rectangles( cur_size );
2361 static void dump_set_window_pos_reply( const struct set_window_pos_reply *req )
2363 fprintf( stderr, " new_style=%08x", req->new_style );
2366 static void dump_get_window_rectangles_request( const struct get_window_rectangles_request *req )
2368 fprintf( stderr, " handle=%p", req->handle );
2371 static void dump_get_window_rectangles_reply( const struct get_window_rectangles_reply *req )
2373 fprintf( stderr, " window=" );
2374 dump_rectangle( &req->window );
2375 fprintf( stderr, "," );
2376 fprintf( stderr, " visible=" );
2377 dump_rectangle( &req->visible );
2378 fprintf( stderr, "," );
2379 fprintf( stderr, " client=" );
2380 dump_rectangle( &req->client );
2383 static void dump_get_window_text_request( const struct get_window_text_request *req )
2385 fprintf( stderr, " handle=%p", req->handle );
2388 static void dump_get_window_text_reply( const struct get_window_text_reply *req )
2390 fprintf( stderr, " text=" );
2391 dump_varargs_unicode_str( cur_size );
2394 static void dump_set_window_text_request( const struct set_window_text_request *req )
2396 fprintf( stderr, " handle=%p,", req->handle );
2397 fprintf( stderr, " text=" );
2398 dump_varargs_unicode_str( cur_size );
2401 static void dump_get_windows_offset_request( const struct get_windows_offset_request *req )
2403 fprintf( stderr, " from=%p,", req->from );
2404 fprintf( stderr, " to=%p", req->to );
2407 static void dump_get_windows_offset_reply( const struct get_windows_offset_reply *req )
2409 fprintf( stderr, " x=%d,", req->x );
2410 fprintf( stderr, " y=%d", req->y );
2413 static void dump_get_visible_region_request( const struct get_visible_region_request *req )
2415 fprintf( stderr, " window=%p,", req->window );
2416 fprintf( stderr, " flags=%08x", req->flags );
2419 static void dump_get_visible_region_reply( const struct get_visible_region_reply *req )
2421 fprintf( stderr, " top_win=%p,", req->top_win );
2422 fprintf( stderr, " top_org_x=%d,", req->top_org_x );
2423 fprintf( stderr, " top_org_y=%d,", req->top_org_y );
2424 fprintf( stderr, " win_org_x=%d,", req->win_org_x );
2425 fprintf( stderr, " win_org_y=%d,", req->win_org_y );
2426 fprintf( stderr, " total_size=%d,", req->total_size );
2427 fprintf( stderr, " region=" );
2428 dump_varargs_rectangles( cur_size );
2431 static void dump_get_window_region_request( const struct get_window_region_request *req )
2433 fprintf( stderr, " window=%p", req->window );
2436 static void dump_get_window_region_reply( const struct get_window_region_reply *req )
2438 fprintf( stderr, " total_size=%d,", req->total_size );
2439 fprintf( stderr, " region=" );
2440 dump_varargs_rectangles( cur_size );
2443 static void dump_set_window_region_request( const struct set_window_region_request *req )
2445 fprintf( stderr, " window=%p,", req->window );
2446 fprintf( stderr, " region=" );
2447 dump_varargs_rectangles( cur_size );
2450 static void dump_get_update_region_request( const struct get_update_region_request *req )
2452 fprintf( stderr, " window=%p,", req->window );
2453 fprintf( stderr, " from_child=%p,", req->from_child );
2454 fprintf( stderr, " flags=%08x", req->flags );
2457 static void dump_get_update_region_reply( const struct get_update_region_reply *req )
2459 fprintf( stderr, " child=%p,", req->child );
2460 fprintf( stderr, " flags=%08x,", req->flags );
2461 fprintf( stderr, " total_size=%d,", req->total_size );
2462 fprintf( stderr, " region=" );
2463 dump_varargs_rectangles( cur_size );
2466 static void dump_update_window_zorder_request( const struct update_window_zorder_request *req )
2468 fprintf( stderr, " window=%p,", req->window );
2469 fprintf( stderr, " rect=" );
2470 dump_rectangle( &req->rect );
2473 static void dump_redraw_window_request( const struct redraw_window_request *req )
2475 fprintf( stderr, " window=%p,", req->window );
2476 fprintf( stderr, " flags=%08x,", req->flags );
2477 fprintf( stderr, " region=" );
2478 dump_varargs_rectangles( cur_size );
2481 static void dump_set_window_property_request( const struct set_window_property_request *req )
2483 fprintf( stderr, " window=%p,", req->window );
2484 fprintf( stderr, " atom=%04x,", req->atom );
2485 fprintf( stderr, " handle=%p,", req->handle );
2486 fprintf( stderr, " name=" );
2487 dump_varargs_unicode_str( cur_size );
2490 static void dump_remove_window_property_request( const struct remove_window_property_request *req )
2492 fprintf( stderr, " window=%p,", req->window );
2493 fprintf( stderr, " atom=%04x,", req->atom );
2494 fprintf( stderr, " name=" );
2495 dump_varargs_unicode_str( cur_size );
2498 static void dump_remove_window_property_reply( const struct remove_window_property_reply *req )
2500 fprintf( stderr, " handle=%p", req->handle );
2503 static void dump_get_window_property_request( const struct get_window_property_request *req )
2505 fprintf( stderr, " window=%p,", req->window );
2506 fprintf( stderr, " atom=%04x,", req->atom );
2507 fprintf( stderr, " name=" );
2508 dump_varargs_unicode_str( cur_size );
2511 static void dump_get_window_property_reply( const struct get_window_property_reply *req )
2513 fprintf( stderr, " handle=%p", req->handle );
2516 static void dump_get_window_properties_request( const struct get_window_properties_request *req )
2518 fprintf( stderr, " window=%p", req->window );
2521 static void dump_get_window_properties_reply( const struct get_window_properties_reply *req )
2523 fprintf( stderr, " total=%d,", req->total );
2524 fprintf( stderr, " props=" );
2525 dump_varargs_properties( cur_size );
2528 static void dump_create_winstation_request( const struct create_winstation_request *req )
2530 fprintf( stderr, " flags=%08x,", req->flags );
2531 fprintf( stderr, " access=%08x,", req->access );
2532 fprintf( stderr, " inherit=%d,", req->inherit );
2533 fprintf( stderr, " name=" );
2534 dump_varargs_unicode_str( cur_size );
2537 static void dump_create_winstation_reply( const struct create_winstation_reply *req )
2539 fprintf( stderr, " handle=%p", req->handle );
2542 static void dump_open_winstation_request( const struct open_winstation_request *req )
2544 fprintf( stderr, " access=%08x,", req->access );
2545 fprintf( stderr, " inherit=%d,", req->inherit );
2546 fprintf( stderr, " name=" );
2547 dump_varargs_unicode_str( cur_size );
2550 static void dump_open_winstation_reply( const struct open_winstation_reply *req )
2552 fprintf( stderr, " handle=%p", req->handle );
2555 static void dump_close_winstation_request( const struct close_winstation_request *req )
2557 fprintf( stderr, " handle=%p", req->handle );
2560 static void dump_get_process_winstation_request( const struct get_process_winstation_request *req )
2564 static void dump_get_process_winstation_reply( const struct get_process_winstation_reply *req )
2566 fprintf( stderr, " handle=%p", req->handle );
2569 static void dump_set_process_winstation_request( const struct set_process_winstation_request *req )
2571 fprintf( stderr, " handle=%p", req->handle );
2574 static void dump_create_desktop_request( const struct create_desktop_request *req )
2576 fprintf( stderr, " flags=%08x,", req->flags );
2577 fprintf( stderr, " access=%08x,", req->access );
2578 fprintf( stderr, " inherit=%d,", req->inherit );
2579 fprintf( stderr, " name=" );
2580 dump_varargs_unicode_str( cur_size );
2583 static void dump_create_desktop_reply( const struct create_desktop_reply *req )
2585 fprintf( stderr, " handle=%p", req->handle );
2588 static void dump_open_desktop_request( const struct open_desktop_request *req )
2590 fprintf( stderr, " flags=%08x,", req->flags );
2591 fprintf( stderr, " access=%08x,", req->access );
2592 fprintf( stderr, " inherit=%d,", req->inherit );
2593 fprintf( stderr, " name=" );
2594 dump_varargs_unicode_str( cur_size );
2597 static void dump_open_desktop_reply( const struct open_desktop_reply *req )
2599 fprintf( stderr, " handle=%p", req->handle );
2602 static void dump_close_desktop_request( const struct close_desktop_request *req )
2604 fprintf( stderr, " handle=%p", req->handle );
2607 static void dump_get_thread_desktop_request( const struct get_thread_desktop_request *req )
2609 fprintf( stderr, " tid=%04x", req->tid );
2612 static void dump_get_thread_desktop_reply( const struct get_thread_desktop_reply *req )
2614 fprintf( stderr, " handle=%p", req->handle );
2617 static void dump_set_thread_desktop_request( const struct set_thread_desktop_request *req )
2619 fprintf( stderr, " handle=%p", req->handle );
2622 static void dump_set_user_object_info_request( const struct set_user_object_info_request *req )
2624 fprintf( stderr, " handle=%p,", req->handle );
2625 fprintf( stderr, " flags=%08x,", req->flags );
2626 fprintf( stderr, " obj_flags=%08x", req->obj_flags );
2629 static void dump_set_user_object_info_reply( const struct set_user_object_info_reply *req )
2631 fprintf( stderr, " is_desktop=%d,", req->is_desktop );
2632 fprintf( stderr, " old_obj_flags=%08x,", req->old_obj_flags );
2633 fprintf( stderr, " name=" );
2634 dump_varargs_unicode_str( cur_size );
2637 static void dump_attach_thread_input_request( const struct attach_thread_input_request *req )
2639 fprintf( stderr, " tid_from=%04x,", req->tid_from );
2640 fprintf( stderr, " tid_to=%04x,", req->tid_to );
2641 fprintf( stderr, " attach=%d", req->attach );
2644 static void dump_get_thread_input_request( const struct get_thread_input_request *req )
2646 fprintf( stderr, " tid=%04x", req->tid );
2649 static void dump_get_thread_input_reply( const struct get_thread_input_reply *req )
2651 fprintf( stderr, " focus=%p,", req->focus );
2652 fprintf( stderr, " capture=%p,", req->capture );
2653 fprintf( stderr, " active=%p,", req->active );
2654 fprintf( stderr, " foreground=%p,", req->foreground );
2655 fprintf( stderr, " menu_owner=%p,", req->menu_owner );
2656 fprintf( stderr, " move_size=%p,", req->move_size );
2657 fprintf( stderr, " caret=%p,", req->caret );
2658 fprintf( stderr, " rect=" );
2659 dump_rectangle( &req->rect );
2662 static void dump_get_last_input_time_request( const struct get_last_input_time_request *req )
2666 static void dump_get_last_input_time_reply( const struct get_last_input_time_reply *req )
2668 fprintf( stderr, " time=%08x", req->time );
2671 static void dump_get_key_state_request( const struct get_key_state_request *req )
2673 fprintf( stderr, " tid=%04x,", req->tid );
2674 fprintf( stderr, " key=%d", req->key );
2677 static void dump_get_key_state_reply( const struct get_key_state_reply *req )
2679 fprintf( stderr, " state=%02x,", req->state );
2680 fprintf( stderr, " keystate=" );
2681 dump_varargs_bytes( cur_size );
2684 static void dump_set_key_state_request( const struct set_key_state_request *req )
2686 fprintf( stderr, " tid=%04x,", req->tid );
2687 fprintf( stderr, " keystate=" );
2688 dump_varargs_bytes( cur_size );
2691 static void dump_set_foreground_window_request( const struct set_foreground_window_request *req )
2693 fprintf( stderr, " handle=%p", req->handle );
2696 static void dump_set_foreground_window_reply( const struct set_foreground_window_reply *req )
2698 fprintf( stderr, " previous=%p,", req->previous );
2699 fprintf( stderr, " send_msg_old=%d,", req->send_msg_old );
2700 fprintf( stderr, " send_msg_new=%d", req->send_msg_new );
2703 static void dump_set_focus_window_request( const struct set_focus_window_request *req )
2705 fprintf( stderr, " handle=%p", req->handle );
2708 static void dump_set_focus_window_reply( const struct set_focus_window_reply *req )
2710 fprintf( stderr, " previous=%p", req->previous );
2713 static void dump_set_active_window_request( const struct set_active_window_request *req )
2715 fprintf( stderr, " handle=%p", req->handle );
2718 static void dump_set_active_window_reply( const struct set_active_window_reply *req )
2720 fprintf( stderr, " previous=%p", req->previous );
2723 static void dump_set_capture_window_request( const struct set_capture_window_request *req )
2725 fprintf( stderr, " handle=%p,", req->handle );
2726 fprintf( stderr, " flags=%08x", req->flags );
2729 static void dump_set_capture_window_reply( const struct set_capture_window_reply *req )
2731 fprintf( stderr, " previous=%p,", req->previous );
2732 fprintf( stderr, " full_handle=%p", req->full_handle );
2735 static void dump_set_caret_window_request( const struct set_caret_window_request *req )
2737 fprintf( stderr, " handle=%p,", req->handle );
2738 fprintf( stderr, " width=%d,", req->width );
2739 fprintf( stderr, " height=%d", req->height );
2742 static void dump_set_caret_window_reply( const struct set_caret_window_reply *req )
2744 fprintf( stderr, " previous=%p,", req->previous );
2745 fprintf( stderr, " old_rect=" );
2746 dump_rectangle( &req->old_rect );
2747 fprintf( stderr, "," );
2748 fprintf( stderr, " old_hide=%d,", req->old_hide );
2749 fprintf( stderr, " old_state=%d", req->old_state );
2752 static void dump_set_caret_info_request( const struct set_caret_info_request *req )
2754 fprintf( stderr, " flags=%08x,", req->flags );
2755 fprintf( stderr, " handle=%p,", req->handle );
2756 fprintf( stderr, " x=%d,", req->x );
2757 fprintf( stderr, " y=%d,", req->y );
2758 fprintf( stderr, " hide=%d,", req->hide );
2759 fprintf( stderr, " state=%d", req->state );
2762 static void dump_set_caret_info_reply( const struct set_caret_info_reply *req )
2764 fprintf( stderr, " full_handle=%p,", req->full_handle );
2765 fprintf( stderr, " old_rect=" );
2766 dump_rectangle( &req->old_rect );
2767 fprintf( stderr, "," );
2768 fprintf( stderr, " old_hide=%d,", req->old_hide );
2769 fprintf( stderr, " old_state=%d", req->old_state );
2772 static void dump_set_hook_request( const struct set_hook_request *req )
2774 fprintf( stderr, " id=%d,", req->id );
2775 fprintf( stderr, " pid=%04x,", req->pid );
2776 fprintf( stderr, " tid=%04x,", req->tid );
2777 fprintf( stderr, " event_min=%d,", req->event_min );
2778 fprintf( stderr, " event_max=%d,", req->event_max );
2779 fprintf( stderr, " flags=%d,", req->flags );
2780 fprintf( stderr, " proc=%p,", req->proc );
2781 fprintf( stderr, " unicode=%d,", req->unicode );
2782 fprintf( stderr, " module=" );
2783 dump_varargs_unicode_str( cur_size );
2786 static void dump_set_hook_reply( const struct set_hook_reply *req )
2788 fprintf( stderr, " handle=%p,", req->handle );
2789 fprintf( stderr, " active_hooks=%08x", req->active_hooks );
2792 static void dump_remove_hook_request( const struct remove_hook_request *req )
2794 fprintf( stderr, " handle=%p,", req->handle );
2795 fprintf( stderr, " id=%d,", req->id );
2796 fprintf( stderr, " proc=%p", req->proc );
2799 static void dump_remove_hook_reply( const struct remove_hook_reply *req )
2801 fprintf( stderr, " active_hooks=%08x", req->active_hooks );
2804 static void dump_start_hook_chain_request( const struct start_hook_chain_request *req )
2806 fprintf( stderr, " id=%d,", req->id );
2807 fprintf( stderr, " event=%d,", req->event );
2808 fprintf( stderr, " window=%p,", req->window );
2809 fprintf( stderr, " object_id=%d,", req->object_id );
2810 fprintf( stderr, " child_id=%d", req->child_id );
2813 static void dump_start_hook_chain_reply( const struct start_hook_chain_reply *req )
2815 fprintf( stderr, " handle=%p,", req->handle );
2816 fprintf( stderr, " pid=%04x,", req->pid );
2817 fprintf( stderr, " tid=%04x,", req->tid );
2818 fprintf( stderr, " proc=%p,", req->proc );
2819 fprintf( stderr, " unicode=%d,", req->unicode );
2820 fprintf( stderr, " active_hooks=%08x,", req->active_hooks );
2821 fprintf( stderr, " module=" );
2822 dump_varargs_unicode_str( cur_size );
2825 static void dump_finish_hook_chain_request( const struct finish_hook_chain_request *req )
2827 fprintf( stderr, " id=%d", req->id );
2830 static void dump_get_next_hook_request( const struct get_next_hook_request *req )
2832 fprintf( stderr, " handle=%p,", req->handle );
2833 fprintf( stderr, " event=%d,", req->event );
2834 fprintf( stderr, " window=%p,", req->window );
2835 fprintf( stderr, " object_id=%d,", req->object_id );
2836 fprintf( stderr, " child_id=%d", req->child_id );
2839 static void dump_get_next_hook_reply( const struct get_next_hook_reply *req )
2841 fprintf( stderr, " next=%p,", req->next );
2842 fprintf( stderr, " id=%d,", req->id );
2843 fprintf( stderr, " pid=%04x,", req->pid );
2844 fprintf( stderr, " tid=%04x,", req->tid );
2845 fprintf( stderr, " proc=%p,", req->proc );
2846 fprintf( stderr, " prev_unicode=%d,", req->prev_unicode );
2847 fprintf( stderr, " next_unicode=%d,", req->next_unicode );
2848 fprintf( stderr, " module=" );
2849 dump_varargs_unicode_str( cur_size );
2852 static void dump_create_class_request( const struct create_class_request *req )
2854 fprintf( stderr, " local=%d,", req->local );
2855 fprintf( stderr, " atom=%04x,", req->atom );
2856 fprintf( stderr, " style=%08x,", req->style );
2857 fprintf( stderr, " instance=%p,", req->instance );
2858 fprintf( stderr, " extra=%d,", req->extra );
2859 fprintf( stderr, " win_extra=%d,", req->win_extra );
2860 fprintf( stderr, " client_ptr=%p", req->client_ptr );
2863 static void dump_destroy_class_request( const struct destroy_class_request *req )
2865 fprintf( stderr, " atom=%04x,", req->atom );
2866 fprintf( stderr, " instance=%p", req->instance );
2869 static void dump_destroy_class_reply( const struct destroy_class_reply *req )
2871 fprintf( stderr, " client_ptr=%p", req->client_ptr );
2874 static void dump_set_class_info_request( const struct set_class_info_request *req )
2876 fprintf( stderr, " window=%p,", req->window );
2877 fprintf( stderr, " flags=%08x,", req->flags );
2878 fprintf( stderr, " atom=%04x,", req->atom );
2879 fprintf( stderr, " style=%08x,", req->style );
2880 fprintf( stderr, " win_extra=%d,", req->win_extra );
2881 fprintf( stderr, " instance=%p,", req->instance );
2882 fprintf( stderr, " extra_offset=%d,", req->extra_offset );
2883 fprintf( stderr, " extra_size=%d,", req->extra_size );
2884 fprintf( stderr, " extra_value=%08x", req->extra_value );
2887 static void dump_set_class_info_reply( const struct set_class_info_reply *req )
2889 fprintf( stderr, " old_atom=%04x,", req->old_atom );
2890 fprintf( stderr, " old_style=%08x,", req->old_style );
2891 fprintf( stderr, " old_extra=%d,", req->old_extra );
2892 fprintf( stderr, " old_win_extra=%d,", req->old_win_extra );
2893 fprintf( stderr, " old_instance=%p,", req->old_instance );
2894 fprintf( stderr, " old_extra_value=%08x", req->old_extra_value );
2897 static void dump_set_clipboard_info_request( const struct set_clipboard_info_request *req )
2899 fprintf( stderr, " flags=%08x,", req->flags );
2900 fprintf( stderr, " clipboard=%p,", req->clipboard );
2901 fprintf( stderr, " owner=%p,", req->owner );
2902 fprintf( stderr, " viewer=%p,", req->viewer );
2903 fprintf( stderr, " seqno=%08x", req->seqno );
2906 static void dump_set_clipboard_info_reply( const struct set_clipboard_info_reply *req )
2908 fprintf( stderr, " flags=%08x,", req->flags );
2909 fprintf( stderr, " old_clipboard=%p,", req->old_clipboard );
2910 fprintf( stderr, " old_owner=%p,", req->old_owner );
2911 fprintf( stderr, " old_viewer=%p,", req->old_viewer );
2912 fprintf( stderr, " seqno=%08x", req->seqno );
2915 static void dump_open_token_request( const struct open_token_request *req )
2917 fprintf( stderr, " handle=%p,", req->handle );
2918 fprintf( stderr, " flags=%08x", req->flags );
2921 static void dump_open_token_reply( const struct open_token_reply *req )
2923 fprintf( stderr, " token=%p", req->token );
2926 static void dump_set_global_windows_request( const struct set_global_windows_request *req )
2928 fprintf( stderr, " flags=%08x,", req->flags );
2929 fprintf( stderr, " shell_window=%p,", req->shell_window );
2930 fprintf( stderr, " shell_listview=%p,", req->shell_listview );
2931 fprintf( stderr, " progman_window=%p,", req->progman_window );
2932 fprintf( stderr, " taskman_window=%p", req->taskman_window );
2935 static void dump_set_global_windows_reply( const struct set_global_windows_reply *req )
2937 fprintf( stderr, " old_shell_window=%p,", req->old_shell_window );
2938 fprintf( stderr, " old_shell_listview=%p,", req->old_shell_listview );
2939 fprintf( stderr, " old_progman_window=%p,", req->old_progman_window );
2940 fprintf( stderr, " old_taskman_window=%p", req->old_taskman_window );
2943 static void dump_adjust_token_privileges_request( const struct adjust_token_privileges_request *req )
2945 fprintf( stderr, " handle=%p,", req->handle );
2946 fprintf( stderr, " disable_all=%d,", req->disable_all );
2947 fprintf( stderr, " get_modified_state=%d,", req->get_modified_state );
2948 fprintf( stderr, " privileges=" );
2949 dump_varargs_LUID_AND_ATTRIBUTES( cur_size );
2952 static void dump_adjust_token_privileges_reply( const struct adjust_token_privileges_reply *req )
2954 fprintf( stderr, " len=%08x,", req->len );
2955 fprintf( stderr, " privileges=" );
2956 dump_varargs_LUID_AND_ATTRIBUTES( cur_size );
2959 static void dump_get_token_privileges_request( const struct get_token_privileges_request *req )
2961 fprintf( stderr, " handle=%p", req->handle );
2964 static void dump_get_token_privileges_reply( const struct get_token_privileges_reply *req )
2966 fprintf( stderr, " len=%08x,", req->len );
2967 fprintf( stderr, " privileges=" );
2968 dump_varargs_LUID_AND_ATTRIBUTES( cur_size );
2971 static void dump_check_token_privileges_request( const struct check_token_privileges_request *req )
2973 fprintf( stderr, " handle=%p,", req->handle );
2974 fprintf( stderr, " all_required=%d,", req->all_required );
2975 fprintf( stderr, " privileges=" );
2976 dump_varargs_LUID_AND_ATTRIBUTES( cur_size );
2979 static void dump_check_token_privileges_reply( const struct check_token_privileges_reply *req )
2981 fprintf( stderr, " has_privileges=%d,", req->has_privileges );
2982 fprintf( stderr, " privileges=" );
2983 dump_varargs_LUID_AND_ATTRIBUTES( cur_size );
2986 static void dump_duplicate_token_request( const struct duplicate_token_request *req )
2988 fprintf( stderr, " handle=%p,", req->handle );
2989 fprintf( stderr, " access=%08x,", req->access );
2990 fprintf( stderr, " inherit=%d,", req->inherit );
2991 fprintf( stderr, " primary=%d,", req->primary );
2992 fprintf( stderr, " impersonation_level=%d", req->impersonation_level );
2995 static void dump_duplicate_token_reply( const struct duplicate_token_reply *req )
2997 fprintf( stderr, " new_handle=%p", req->new_handle );
3000 static void dump_access_check_request( const struct access_check_request *req )
3002 fprintf( stderr, " handle=%p,", req->handle );
3003 fprintf( stderr, " desired_access=%08x,", req->desired_access );
3004 fprintf( stderr, " mapping_read=%08x,", req->mapping_read );
3005 fprintf( stderr, " mapping_write=%08x,", req->mapping_write );
3006 fprintf( stderr, " mapping_execute=%08x,", req->mapping_execute );
3007 fprintf( stderr, " mapping_all=%08x,", req->mapping_all );
3008 fprintf( stderr, " sd=" );
3009 dump_varargs_security_descriptor( cur_size );
3012 static void dump_access_check_reply( const struct access_check_reply *req )
3014 fprintf( stderr, " access_granted=%08x,", req->access_granted );
3015 fprintf( stderr, " access_status=%08x,", req->access_status );
3016 fprintf( stderr, " privileges_len=%08x,", req->privileges_len );
3017 fprintf( stderr, " privileges=" );
3018 dump_varargs_LUID_AND_ATTRIBUTES( cur_size );
3021 static void dump_get_token_user_request( const struct get_token_user_request *req )
3023 fprintf( stderr, " handle=%p", req->handle );
3026 static void dump_get_token_user_reply( const struct get_token_user_reply *req )
3028 fprintf( stderr, " user_len=%d,", req->user_len );
3029 fprintf( stderr, " user=" );
3030 dump_varargs_SID( cur_size );
3033 static void dump_create_mailslot_request( const struct create_mailslot_request *req )
3035 fprintf( stderr, " max_msgsize=%08x,", req->max_msgsize );
3036 fprintf( stderr, " read_timeout=%08x,", req->read_timeout );
3037 fprintf( stderr, " inherit=%d,", req->inherit );
3038 fprintf( stderr, " name=" );
3039 dump_varargs_unicode_str( cur_size );
3042 static void dump_create_mailslot_reply( const struct create_mailslot_reply *req )
3044 fprintf( stderr, " handle=%p", req->handle );
3047 static void dump_open_mailslot_request( const struct open_mailslot_request *req )
3049 fprintf( stderr, " access=%08x,", req->access );
3050 fprintf( stderr, " inherit=%d,", req->inherit );
3051 fprintf( stderr, " sharing=%08x,", req->sharing );
3052 fprintf( stderr, " name=" );
3053 dump_varargs_unicode_str( cur_size );
3056 static void dump_open_mailslot_reply( const struct open_mailslot_reply *req )
3058 fprintf( stderr, " handle=%p", req->handle );
3061 static void dump_set_mailslot_info_request( const struct set_mailslot_info_request *req )
3063 fprintf( stderr, " handle=%p,", req->handle );
3064 fprintf( stderr, " flags=%08x,", req->flags );
3065 fprintf( stderr, " read_timeout=%08x", req->read_timeout );
3068 static void dump_set_mailslot_info_reply( const struct set_mailslot_info_reply *req )
3070 fprintf( stderr, " max_msgsize=%08x,", req->max_msgsize );
3071 fprintf( stderr, " read_timeout=%08x,", req->read_timeout );
3072 fprintf( stderr, " msg_count=%08x,", req->msg_count );
3073 fprintf( stderr, " next_msgsize=%08x", req->next_msgsize );
3076 static const dump_func req_dumpers[REQ_NB_REQUESTS] = {
3077 (dump_func)dump_new_process_request,
3078 (dump_func)dump_get_new_process_info_request,
3079 (dump_func)dump_new_thread_request,
3080 (dump_func)dump_get_startup_info_request,
3081 (dump_func)dump_init_process_done_request,
3082 (dump_func)dump_init_thread_request,
3083 (dump_func)dump_terminate_process_request,
3084 (dump_func)dump_terminate_thread_request,
3085 (dump_func)dump_get_process_info_request,
3086 (dump_func)dump_set_process_info_request,
3087 (dump_func)dump_get_thread_info_request,
3088 (dump_func)dump_set_thread_info_request,
3089 (dump_func)dump_get_dll_info_request,
3090 (dump_func)dump_suspend_thread_request,
3091 (dump_func)dump_resume_thread_request,
3092 (dump_func)dump_load_dll_request,
3093 (dump_func)dump_unload_dll_request,
3094 (dump_func)dump_queue_apc_request,
3095 (dump_func)dump_get_apc_request,
3096 (dump_func)dump_close_handle_request,
3097 (dump_func)dump_set_handle_info_request,
3098 (dump_func)dump_dup_handle_request,
3099 (dump_func)dump_open_process_request,
3100 (dump_func)dump_open_thread_request,
3101 (dump_func)dump_select_request,
3102 (dump_func)dump_create_event_request,
3103 (dump_func)dump_event_op_request,
3104 (dump_func)dump_open_event_request,
3105 (dump_func)dump_create_mutex_request,
3106 (dump_func)dump_release_mutex_request,
3107 (dump_func)dump_open_mutex_request,
3108 (dump_func)dump_create_semaphore_request,
3109 (dump_func)dump_release_semaphore_request,
3110 (dump_func)dump_open_semaphore_request,
3111 (dump_func)dump_create_file_request,
3112 (dump_func)dump_alloc_file_handle_request,
3113 (dump_func)dump_get_handle_fd_request,
3114 (dump_func)dump_flush_file_request,
3115 (dump_func)dump_lock_file_request,
3116 (dump_func)dump_unlock_file_request,
3117 (dump_func)dump_create_socket_request,
3118 (dump_func)dump_accept_socket_request,
3119 (dump_func)dump_set_socket_event_request,
3120 (dump_func)dump_get_socket_event_request,
3121 (dump_func)dump_enable_socket_event_request,
3122 (dump_func)dump_set_socket_deferred_request,
3123 (dump_func)dump_alloc_console_request,
3124 (dump_func)dump_free_console_request,
3125 (dump_func)dump_get_console_renderer_events_request,
3126 (dump_func)dump_open_console_request,
3127 (dump_func)dump_get_console_wait_event_request,
3128 (dump_func)dump_get_console_mode_request,
3129 (dump_func)dump_set_console_mode_request,
3130 (dump_func)dump_set_console_input_info_request,
3131 (dump_func)dump_get_console_input_info_request,
3132 (dump_func)dump_append_console_input_history_request,
3133 (dump_func)dump_get_console_input_history_request,
3134 (dump_func)dump_create_console_output_request,
3135 (dump_func)dump_set_console_output_info_request,
3136 (dump_func)dump_get_console_output_info_request,
3137 (dump_func)dump_write_console_input_request,
3138 (dump_func)dump_read_console_input_request,
3139 (dump_func)dump_write_console_output_request,
3140 (dump_func)dump_fill_console_output_request,
3141 (dump_func)dump_read_console_output_request,
3142 (dump_func)dump_move_console_output_request,
3143 (dump_func)dump_send_console_signal_request,
3144 (dump_func)dump_create_change_notification_request,
3145 (dump_func)dump_next_change_notification_request,
3146 (dump_func)dump_create_mapping_request,
3147 (dump_func)dump_open_mapping_request,
3148 (dump_func)dump_get_mapping_info_request,
3149 (dump_func)dump_create_snapshot_request,
3150 (dump_func)dump_next_process_request,
3151 (dump_func)dump_next_thread_request,
3152 (dump_func)dump_next_module_request,
3153 (dump_func)dump_wait_debug_event_request,
3154 (dump_func)dump_queue_exception_event_request,
3155 (dump_func)dump_get_exception_status_request,
3156 (dump_func)dump_output_debug_string_request,
3157 (dump_func)dump_continue_debug_event_request,
3158 (dump_func)dump_debug_process_request,
3159 (dump_func)dump_debug_break_request,
3160 (dump_func)dump_set_debugger_kill_on_exit_request,
3161 (dump_func)dump_read_process_memory_request,
3162 (dump_func)dump_write_process_memory_request,
3163 (dump_func)dump_create_key_request,
3164 (dump_func)dump_open_key_request,
3165 (dump_func)dump_delete_key_request,
3166 (dump_func)dump_flush_key_request,
3167 (dump_func)dump_enum_key_request,
3168 (dump_func)dump_set_key_value_request,
3169 (dump_func)dump_get_key_value_request,
3170 (dump_func)dump_enum_key_value_request,
3171 (dump_func)dump_delete_key_value_request,
3172 (dump_func)dump_load_registry_request,
3173 (dump_func)dump_unload_registry_request,
3174 (dump_func)dump_save_registry_request,
3175 (dump_func)dump_set_registry_notification_request,
3176 (dump_func)dump_create_timer_request,
3177 (dump_func)dump_open_timer_request,
3178 (dump_func)dump_set_timer_request,
3179 (dump_func)dump_cancel_timer_request,
3180 (dump_func)dump_get_timer_info_request,
3181 (dump_func)dump_get_thread_context_request,
3182 (dump_func)dump_set_thread_context_request,
3183 (dump_func)dump_get_selector_entry_request,
3184 (dump_func)dump_add_atom_request,
3185 (dump_func)dump_delete_atom_request,
3186 (dump_func)dump_find_atom_request,
3187 (dump_func)dump_get_atom_information_request,
3188 (dump_func)dump_set_atom_information_request,
3189 (dump_func)dump_empty_atom_table_request,
3190 (dump_func)dump_init_atom_table_request,
3191 (dump_func)dump_get_msg_queue_request,
3192 (dump_func)dump_set_queue_mask_request,
3193 (dump_func)dump_get_queue_status_request,
3194 (dump_func)dump_wait_input_idle_request,
3195 (dump_func)dump_send_message_request,
3196 (dump_func)dump_get_message_request,
3197 (dump_func)dump_reply_message_request,
3198 (dump_func)dump_accept_hardware_message_request,
3199 (dump_func)dump_get_message_reply_request,
3200 (dump_func)dump_set_win_timer_request,
3201 (dump_func)dump_kill_win_timer_request,
3202 (dump_func)dump_get_serial_info_request,
3203 (dump_func)dump_set_serial_info_request,
3204 (dump_func)dump_register_async_request,
3205 (dump_func)dump_cancel_async_request,
3206 (dump_func)dump_create_named_pipe_request,
3207 (dump_func)dump_open_named_pipe_request,
3208 (dump_func)dump_connect_named_pipe_request,
3209 (dump_func)dump_wait_named_pipe_request,
3210 (dump_func)dump_disconnect_named_pipe_request,
3211 (dump_func)dump_get_named_pipe_info_request,
3212 (dump_func)dump_create_window_request,
3213 (dump_func)dump_destroy_window_request,
3214 (dump_func)dump_get_desktop_window_request,
3215 (dump_func)dump_set_window_owner_request,
3216 (dump_func)dump_get_window_info_request,
3217 (dump_func)dump_set_window_info_request,
3218 (dump_func)dump_set_parent_request,
3219 (dump_func)dump_get_window_parents_request,
3220 (dump_func)dump_get_window_children_request,
3221 (dump_func)dump_get_window_children_from_point_request,
3222 (dump_func)dump_get_window_tree_request,
3223 (dump_func)dump_set_window_pos_request,
3224 (dump_func)dump_get_window_rectangles_request,
3225 (dump_func)dump_get_window_text_request,
3226 (dump_func)dump_set_window_text_request,
3227 (dump_func)dump_get_windows_offset_request,
3228 (dump_func)dump_get_visible_region_request,
3229 (dump_func)dump_get_window_region_request,
3230 (dump_func)dump_set_window_region_request,
3231 (dump_func)dump_get_update_region_request,
3232 (dump_func)dump_update_window_zorder_request,
3233 (dump_func)dump_redraw_window_request,
3234 (dump_func)dump_set_window_property_request,
3235 (dump_func)dump_remove_window_property_request,
3236 (dump_func)dump_get_window_property_request,
3237 (dump_func)dump_get_window_properties_request,
3238 (dump_func)dump_create_winstation_request,
3239 (dump_func)dump_open_winstation_request,
3240 (dump_func)dump_close_winstation_request,
3241 (dump_func)dump_get_process_winstation_request,
3242 (dump_func)dump_set_process_winstation_request,
3243 (dump_func)dump_create_desktop_request,
3244 (dump_func)dump_open_desktop_request,
3245 (dump_func)dump_close_desktop_request,
3246 (dump_func)dump_get_thread_desktop_request,
3247 (dump_func)dump_set_thread_desktop_request,
3248 (dump_func)dump_set_user_object_info_request,
3249 (dump_func)dump_attach_thread_input_request,
3250 (dump_func)dump_get_thread_input_request,
3251 (dump_func)dump_get_last_input_time_request,
3252 (dump_func)dump_get_key_state_request,
3253 (dump_func)dump_set_key_state_request,
3254 (dump_func)dump_set_foreground_window_request,
3255 (dump_func)dump_set_focus_window_request,
3256 (dump_func)dump_set_active_window_request,
3257 (dump_func)dump_set_capture_window_request,
3258 (dump_func)dump_set_caret_window_request,
3259 (dump_func)dump_set_caret_info_request,
3260 (dump_func)dump_set_hook_request,
3261 (dump_func)dump_remove_hook_request,
3262 (dump_func)dump_start_hook_chain_request,
3263 (dump_func)dump_finish_hook_chain_request,
3264 (dump_func)dump_get_next_hook_request,
3265 (dump_func)dump_create_class_request,
3266 (dump_func)dump_destroy_class_request,
3267 (dump_func)dump_set_class_info_request,
3268 (dump_func)dump_set_clipboard_info_request,
3269 (dump_func)dump_open_token_request,
3270 (dump_func)dump_set_global_windows_request,
3271 (dump_func)dump_adjust_token_privileges_request,
3272 (dump_func)dump_get_token_privileges_request,
3273 (dump_func)dump_check_token_privileges_request,
3274 (dump_func)dump_duplicate_token_request,
3275 (dump_func)dump_access_check_request,
3276 (dump_func)dump_get_token_user_request,
3277 (dump_func)dump_create_mailslot_request,
3278 (dump_func)dump_open_mailslot_request,
3279 (dump_func)dump_set_mailslot_info_request,
3282 static const dump_func reply_dumpers[REQ_NB_REQUESTS] = {
3283 (dump_func)dump_new_process_reply,
3284 (dump_func)dump_get_new_process_info_reply,
3285 (dump_func)dump_new_thread_reply,
3286 (dump_func)dump_get_startup_info_reply,
3287 (dump_func)0,
3288 (dump_func)dump_init_thread_reply,
3289 (dump_func)dump_terminate_process_reply,
3290 (dump_func)dump_terminate_thread_reply,
3291 (dump_func)dump_get_process_info_reply,
3292 (dump_func)0,
3293 (dump_func)dump_get_thread_info_reply,
3294 (dump_func)0,
3295 (dump_func)dump_get_dll_info_reply,
3296 (dump_func)dump_suspend_thread_reply,
3297 (dump_func)dump_resume_thread_reply,
3298 (dump_func)0,
3299 (dump_func)0,
3300 (dump_func)0,
3301 (dump_func)dump_get_apc_reply,
3302 (dump_func)dump_close_handle_reply,
3303 (dump_func)dump_set_handle_info_reply,
3304 (dump_func)dump_dup_handle_reply,
3305 (dump_func)dump_open_process_reply,
3306 (dump_func)dump_open_thread_reply,
3307 (dump_func)0,
3308 (dump_func)dump_create_event_reply,
3309 (dump_func)0,
3310 (dump_func)dump_open_event_reply,
3311 (dump_func)dump_create_mutex_reply,
3312 (dump_func)dump_release_mutex_reply,
3313 (dump_func)dump_open_mutex_reply,
3314 (dump_func)dump_create_semaphore_reply,
3315 (dump_func)dump_release_semaphore_reply,
3316 (dump_func)dump_open_semaphore_reply,
3317 (dump_func)dump_create_file_reply,
3318 (dump_func)dump_alloc_file_handle_reply,
3319 (dump_func)dump_get_handle_fd_reply,
3320 (dump_func)dump_flush_file_reply,
3321 (dump_func)dump_lock_file_reply,
3322 (dump_func)0,
3323 (dump_func)dump_create_socket_reply,
3324 (dump_func)dump_accept_socket_reply,
3325 (dump_func)0,
3326 (dump_func)dump_get_socket_event_reply,
3327 (dump_func)0,
3328 (dump_func)0,
3329 (dump_func)dump_alloc_console_reply,
3330 (dump_func)0,
3331 (dump_func)dump_get_console_renderer_events_reply,
3332 (dump_func)dump_open_console_reply,
3333 (dump_func)dump_get_console_wait_event_reply,
3334 (dump_func)dump_get_console_mode_reply,
3335 (dump_func)0,
3336 (dump_func)0,
3337 (dump_func)dump_get_console_input_info_reply,
3338 (dump_func)0,
3339 (dump_func)dump_get_console_input_history_reply,
3340 (dump_func)dump_create_console_output_reply,
3341 (dump_func)0,
3342 (dump_func)dump_get_console_output_info_reply,
3343 (dump_func)dump_write_console_input_reply,
3344 (dump_func)dump_read_console_input_reply,
3345 (dump_func)dump_write_console_output_reply,
3346 (dump_func)dump_fill_console_output_reply,
3347 (dump_func)dump_read_console_output_reply,
3348 (dump_func)0,
3349 (dump_func)0,
3350 (dump_func)dump_create_change_notification_reply,
3351 (dump_func)0,
3352 (dump_func)dump_create_mapping_reply,
3353 (dump_func)dump_open_mapping_reply,
3354 (dump_func)dump_get_mapping_info_reply,
3355 (dump_func)dump_create_snapshot_reply,
3356 (dump_func)dump_next_process_reply,
3357 (dump_func)dump_next_thread_reply,
3358 (dump_func)dump_next_module_reply,
3359 (dump_func)dump_wait_debug_event_reply,
3360 (dump_func)dump_queue_exception_event_reply,
3361 (dump_func)dump_get_exception_status_reply,
3362 (dump_func)0,
3363 (dump_func)0,
3364 (dump_func)0,
3365 (dump_func)dump_debug_break_reply,
3366 (dump_func)0,
3367 (dump_func)dump_read_process_memory_reply,
3368 (dump_func)0,
3369 (dump_func)dump_create_key_reply,
3370 (dump_func)dump_open_key_reply,
3371 (dump_func)0,
3372 (dump_func)0,
3373 (dump_func)dump_enum_key_reply,
3374 (dump_func)0,
3375 (dump_func)dump_get_key_value_reply,
3376 (dump_func)dump_enum_key_value_reply,
3377 (dump_func)0,
3378 (dump_func)0,
3379 (dump_func)0,
3380 (dump_func)0,
3381 (dump_func)0,
3382 (dump_func)dump_create_timer_reply,
3383 (dump_func)dump_open_timer_reply,
3384 (dump_func)dump_set_timer_reply,
3385 (dump_func)dump_cancel_timer_reply,
3386 (dump_func)dump_get_timer_info_reply,
3387 (dump_func)dump_get_thread_context_reply,
3388 (dump_func)0,
3389 (dump_func)dump_get_selector_entry_reply,
3390 (dump_func)dump_add_atom_reply,
3391 (dump_func)0,
3392 (dump_func)dump_find_atom_reply,
3393 (dump_func)dump_get_atom_information_reply,
3394 (dump_func)0,
3395 (dump_func)0,
3396 (dump_func)dump_init_atom_table_reply,
3397 (dump_func)dump_get_msg_queue_reply,
3398 (dump_func)dump_set_queue_mask_reply,
3399 (dump_func)dump_get_queue_status_reply,
3400 (dump_func)dump_wait_input_idle_reply,
3401 (dump_func)0,
3402 (dump_func)dump_get_message_reply,
3403 (dump_func)0,
3404 (dump_func)0,
3405 (dump_func)dump_get_message_reply_reply,
3406 (dump_func)dump_set_win_timer_reply,
3407 (dump_func)0,
3408 (dump_func)dump_get_serial_info_reply,
3409 (dump_func)0,
3410 (dump_func)0,
3411 (dump_func)0,
3412 (dump_func)dump_create_named_pipe_reply,
3413 (dump_func)dump_open_named_pipe_reply,
3414 (dump_func)0,
3415 (dump_func)0,
3416 (dump_func)dump_disconnect_named_pipe_reply,
3417 (dump_func)dump_get_named_pipe_info_reply,
3418 (dump_func)dump_create_window_reply,
3419 (dump_func)0,
3420 (dump_func)dump_get_desktop_window_reply,
3421 (dump_func)dump_set_window_owner_reply,
3422 (dump_func)dump_get_window_info_reply,
3423 (dump_func)dump_set_window_info_reply,
3424 (dump_func)dump_set_parent_reply,
3425 (dump_func)dump_get_window_parents_reply,
3426 (dump_func)dump_get_window_children_reply,
3427 (dump_func)dump_get_window_children_from_point_reply,
3428 (dump_func)dump_get_window_tree_reply,
3429 (dump_func)dump_set_window_pos_reply,
3430 (dump_func)dump_get_window_rectangles_reply,
3431 (dump_func)dump_get_window_text_reply,
3432 (dump_func)0,
3433 (dump_func)dump_get_windows_offset_reply,
3434 (dump_func)dump_get_visible_region_reply,
3435 (dump_func)dump_get_window_region_reply,
3436 (dump_func)0,
3437 (dump_func)dump_get_update_region_reply,
3438 (dump_func)0,
3439 (dump_func)0,
3440 (dump_func)0,
3441 (dump_func)dump_remove_window_property_reply,
3442 (dump_func)dump_get_window_property_reply,
3443 (dump_func)dump_get_window_properties_reply,
3444 (dump_func)dump_create_winstation_reply,
3445 (dump_func)dump_open_winstation_reply,
3446 (dump_func)0,
3447 (dump_func)dump_get_process_winstation_reply,
3448 (dump_func)0,
3449 (dump_func)dump_create_desktop_reply,
3450 (dump_func)dump_open_desktop_reply,
3451 (dump_func)0,
3452 (dump_func)dump_get_thread_desktop_reply,
3453 (dump_func)0,
3454 (dump_func)dump_set_user_object_info_reply,
3455 (dump_func)0,
3456 (dump_func)dump_get_thread_input_reply,
3457 (dump_func)dump_get_last_input_time_reply,
3458 (dump_func)dump_get_key_state_reply,
3459 (dump_func)0,
3460 (dump_func)dump_set_foreground_window_reply,
3461 (dump_func)dump_set_focus_window_reply,
3462 (dump_func)dump_set_active_window_reply,
3463 (dump_func)dump_set_capture_window_reply,
3464 (dump_func)dump_set_caret_window_reply,
3465 (dump_func)dump_set_caret_info_reply,
3466 (dump_func)dump_set_hook_reply,
3467 (dump_func)dump_remove_hook_reply,
3468 (dump_func)dump_start_hook_chain_reply,
3469 (dump_func)0,
3470 (dump_func)dump_get_next_hook_reply,
3471 (dump_func)0,
3472 (dump_func)dump_destroy_class_reply,
3473 (dump_func)dump_set_class_info_reply,
3474 (dump_func)dump_set_clipboard_info_reply,
3475 (dump_func)dump_open_token_reply,
3476 (dump_func)dump_set_global_windows_reply,
3477 (dump_func)dump_adjust_token_privileges_reply,
3478 (dump_func)dump_get_token_privileges_reply,
3479 (dump_func)dump_check_token_privileges_reply,
3480 (dump_func)dump_duplicate_token_reply,
3481 (dump_func)dump_access_check_reply,
3482 (dump_func)dump_get_token_user_reply,
3483 (dump_func)dump_create_mailslot_reply,
3484 (dump_func)dump_open_mailslot_reply,
3485 (dump_func)dump_set_mailslot_info_reply,
3488 static const char * const req_names[REQ_NB_REQUESTS] = {
3489 "new_process",
3490 "get_new_process_info",
3491 "new_thread",
3492 "get_startup_info",
3493 "init_process_done",
3494 "init_thread",
3495 "terminate_process",
3496 "terminate_thread",
3497 "get_process_info",
3498 "set_process_info",
3499 "get_thread_info",
3500 "set_thread_info",
3501 "get_dll_info",
3502 "suspend_thread",
3503 "resume_thread",
3504 "load_dll",
3505 "unload_dll",
3506 "queue_apc",
3507 "get_apc",
3508 "close_handle",
3509 "set_handle_info",
3510 "dup_handle",
3511 "open_process",
3512 "open_thread",
3513 "select",
3514 "create_event",
3515 "event_op",
3516 "open_event",
3517 "create_mutex",
3518 "release_mutex",
3519 "open_mutex",
3520 "create_semaphore",
3521 "release_semaphore",
3522 "open_semaphore",
3523 "create_file",
3524 "alloc_file_handle",
3525 "get_handle_fd",
3526 "flush_file",
3527 "lock_file",
3528 "unlock_file",
3529 "create_socket",
3530 "accept_socket",
3531 "set_socket_event",
3532 "get_socket_event",
3533 "enable_socket_event",
3534 "set_socket_deferred",
3535 "alloc_console",
3536 "free_console",
3537 "get_console_renderer_events",
3538 "open_console",
3539 "get_console_wait_event",
3540 "get_console_mode",
3541 "set_console_mode",
3542 "set_console_input_info",
3543 "get_console_input_info",
3544 "append_console_input_history",
3545 "get_console_input_history",
3546 "create_console_output",
3547 "set_console_output_info",
3548 "get_console_output_info",
3549 "write_console_input",
3550 "read_console_input",
3551 "write_console_output",
3552 "fill_console_output",
3553 "read_console_output",
3554 "move_console_output",
3555 "send_console_signal",
3556 "create_change_notification",
3557 "next_change_notification",
3558 "create_mapping",
3559 "open_mapping",
3560 "get_mapping_info",
3561 "create_snapshot",
3562 "next_process",
3563 "next_thread",
3564 "next_module",
3565 "wait_debug_event",
3566 "queue_exception_event",
3567 "get_exception_status",
3568 "output_debug_string",
3569 "continue_debug_event",
3570 "debug_process",
3571 "debug_break",
3572 "set_debugger_kill_on_exit",
3573 "read_process_memory",
3574 "write_process_memory",
3575 "create_key",
3576 "open_key",
3577 "delete_key",
3578 "flush_key",
3579 "enum_key",
3580 "set_key_value",
3581 "get_key_value",
3582 "enum_key_value",
3583 "delete_key_value",
3584 "load_registry",
3585 "unload_registry",
3586 "save_registry",
3587 "set_registry_notification",
3588 "create_timer",
3589 "open_timer",
3590 "set_timer",
3591 "cancel_timer",
3592 "get_timer_info",
3593 "get_thread_context",
3594 "set_thread_context",
3595 "get_selector_entry",
3596 "add_atom",
3597 "delete_atom",
3598 "find_atom",
3599 "get_atom_information",
3600 "set_atom_information",
3601 "empty_atom_table",
3602 "init_atom_table",
3603 "get_msg_queue",
3604 "set_queue_mask",
3605 "get_queue_status",
3606 "wait_input_idle",
3607 "send_message",
3608 "get_message",
3609 "reply_message",
3610 "accept_hardware_message",
3611 "get_message_reply",
3612 "set_win_timer",
3613 "kill_win_timer",
3614 "get_serial_info",
3615 "set_serial_info",
3616 "register_async",
3617 "cancel_async",
3618 "create_named_pipe",
3619 "open_named_pipe",
3620 "connect_named_pipe",
3621 "wait_named_pipe",
3622 "disconnect_named_pipe",
3623 "get_named_pipe_info",
3624 "create_window",
3625 "destroy_window",
3626 "get_desktop_window",
3627 "set_window_owner",
3628 "get_window_info",
3629 "set_window_info",
3630 "set_parent",
3631 "get_window_parents",
3632 "get_window_children",
3633 "get_window_children_from_point",
3634 "get_window_tree",
3635 "set_window_pos",
3636 "get_window_rectangles",
3637 "get_window_text",
3638 "set_window_text",
3639 "get_windows_offset",
3640 "get_visible_region",
3641 "get_window_region",
3642 "set_window_region",
3643 "get_update_region",
3644 "update_window_zorder",
3645 "redraw_window",
3646 "set_window_property",
3647 "remove_window_property",
3648 "get_window_property",
3649 "get_window_properties",
3650 "create_winstation",
3651 "open_winstation",
3652 "close_winstation",
3653 "get_process_winstation",
3654 "set_process_winstation",
3655 "create_desktop",
3656 "open_desktop",
3657 "close_desktop",
3658 "get_thread_desktop",
3659 "set_thread_desktop",
3660 "set_user_object_info",
3661 "attach_thread_input",
3662 "get_thread_input",
3663 "get_last_input_time",
3664 "get_key_state",
3665 "set_key_state",
3666 "set_foreground_window",
3667 "set_focus_window",
3668 "set_active_window",
3669 "set_capture_window",
3670 "set_caret_window",
3671 "set_caret_info",
3672 "set_hook",
3673 "remove_hook",
3674 "start_hook_chain",
3675 "finish_hook_chain",
3676 "get_next_hook",
3677 "create_class",
3678 "destroy_class",
3679 "set_class_info",
3680 "set_clipboard_info",
3681 "open_token",
3682 "set_global_windows",
3683 "adjust_token_privileges",
3684 "get_token_privileges",
3685 "check_token_privileges",
3686 "duplicate_token",
3687 "access_check",
3688 "get_token_user",
3689 "create_mailslot",
3690 "open_mailslot",
3691 "set_mailslot_info",
3694 /* ### make_requests end ### */
3695 /* Everything above this line is generated automatically by tools/make_requests */
3697 static const char *get_status_name( unsigned int status )
3699 #define NAME(status) { #status, STATUS_##status }
3700 #define NAME_WIN32(error) { #error, 0xc0010000 | error }
3701 static const struct
3703 const char *name;
3704 unsigned int value;
3705 } status_names[] =
3707 NAME(ACCESS_DENIED),
3708 NAME(ACCESS_VIOLATION),
3709 NAME(ALIAS_EXISTS),
3710 NAME(BUFFER_OVERFLOW),
3711 NAME(CHILD_MUST_BE_VOLATILE),
3712 NAME(DIRECTORY_NOT_EMPTY),
3713 NAME(DISK_FULL),
3714 NAME(DLL_NOT_FOUND),
3715 NAME(FILE_IS_A_DIRECTORY),
3716 NAME(FILE_LOCK_CONFLICT),
3717 NAME(INVALID_FILE_FOR_SECTION),
3718 NAME(INVALID_HANDLE),
3719 NAME(INVALID_PARAMETER),
3720 NAME(KEY_DELETED),
3721 NAME(MEDIA_WRITE_PROTECTED),
3722 NAME(MUTANT_NOT_OWNED),
3723 NAME(NOT_A_DIRECTORY),
3724 NAME(NOT_IMPLEMENTED),
3725 NAME(NOT_REGISTRY_FILE),
3726 NAME(NO_DATA_DETECTED),
3727 NAME(NO_MEMORY),
3728 NAME(NO_MORE_ENTRIES),
3729 NAME(NO_MORE_FILES),
3730 NAME(NO_SUCH_FILE),
3731 NAME(OBJECT_NAME_COLLISION),
3732 NAME(OBJECT_NAME_INVALID),
3733 NAME(OBJECT_NAME_NOT_FOUND),
3734 NAME(OBJECT_PATH_INVALID),
3735 NAME(OBJECT_TYPE_MISMATCH),
3736 NAME(PENDING),
3737 NAME(PIPE_BUSY),
3738 NAME(PIPE_CONNECTED),
3739 NAME(PIPE_DISCONNECTED),
3740 NAME(PIPE_LISTENING),
3741 NAME(PIPE_NOT_AVAILABLE),
3742 NAME(SEMAPHORE_LIMIT_EXCEEDED),
3743 NAME(SHARING_VIOLATION),
3744 NAME(SUSPEND_COUNT_EXCEEDED),
3745 NAME(TIMEOUT),
3746 NAME(USER_APC),
3747 NAME(WAS_LOCKED),
3748 NAME_WIN32(ERROR_INVALID_INDEX),
3749 NAME_WIN32(ERROR_INVALID_THREAD_ID),
3750 NAME_WIN32(ERROR_NEGATIVE_SEEK),
3751 NAME_WIN32(ERROR_SEEK),
3752 { NULL, 0 } /* terminator */
3754 #undef NAME
3756 int i;
3757 static char buffer[10];
3759 if (status)
3761 for (i = 0; status_names[i].name; i++)
3762 if (status_names[i].value == status) return status_names[i].name;
3764 sprintf( buffer, "%x", status );
3765 return buffer;
3768 void trace_request(void)
3770 enum request req = current->req.request_header.req;
3771 if (req < REQ_NB_REQUESTS)
3773 fprintf( stderr, "%04x: %s(", current->id, req_names[req] );
3774 if (req_dumpers[req])
3776 cur_pos = 0;
3777 cur_data = get_req_data();
3778 cur_size = get_req_data_size();
3779 req_dumpers[req]( &current->req );
3781 fprintf( stderr, " )\n" );
3783 else fprintf( stderr, "%04x: %d(?)\n", current->id, req );
3786 void trace_reply( enum request req, const union generic_reply *reply )
3788 if (req < REQ_NB_REQUESTS)
3790 fprintf( stderr, "%04x: %s() = %s",
3791 current->id, req_names[req], get_status_name(current->error) );
3792 if (reply_dumpers[req])
3794 fprintf( stderr, " {" );
3795 cur_pos = 0;
3796 cur_data = current->reply_data;
3797 cur_size = reply->reply_header.reply_size;
3798 reply_dumpers[req]( reply );
3799 fprintf( stderr, " }" );
3801 fputc( '\n', stderr );
3803 else fprintf( stderr, "%04x: %d() = %s\n",
3804 current->id, req, get_status_name(current->error) );