trace.c 160 KB
Newer Older
1 2 3 4
/*
 * Server request tracing
 *
 * Copyright (C) 1999 Alexandre Julliard
5 6 7 8 9 10 11 12 13 14 15 16 17
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19
 */
Alexandre Julliard's avatar
Alexandre Julliard committed
20

21
#include "config.h"
22
#include "wine/port.h"
23

24
#include <ctype.h>
25
#include <stdarg.h>
Alexandre Julliard's avatar
Alexandre Julliard committed
26
#include <stdio.h>
Alexandre Julliard's avatar
Alexandre Julliard committed
27
#include <sys/types.h>
Steven Edwards's avatar
Steven Edwards committed
28 29

#ifdef HAVE_SYS_UIO_H
Alexandre Julliard's avatar
Alexandre Julliard committed
30
#include <sys/uio.h>
Steven Edwards's avatar
Steven Edwards committed
31 32
#endif

33 34
#include "ntstatus.h"
#define WIN32_NO_STATUS
35
#include "windef.h"
36 37
#include "winbase.h"
#include "wincon.h"
38
#include "winternl.h"
39
#include "winioctl.h"
40
#include "file.h"
41
#include "request.h"
42
#include "unicode.h"
Alexandre Julliard's avatar
Alexandre Julliard committed
43

44
static const void *cur_data;
45
static data_size_t cur_size;
46

47 48
static const char *get_status_name( unsigned int status );

49 50
/* utility functions */

51
static inline void remove_data( data_size_t size )
52
{
53 54
    cur_data = (const char *)cur_data + size;
    cur_size -= size;
55 56
}

57 58 59
static void dump_uints( const int *ptr, int len )
{
    fputc( '{', stderr );
60
    while (len > 0)
61 62 63 64 65 66 67
    {
        fprintf( stderr, "%08x", *ptr++ );
        if (--len) fputc( ',', stderr );
    }
    fputc( '}', stderr );
}

68
static void dump_timeout( const timeout_t *time )
69
{
70
    fprintf( stderr, get_timeout_str(*time) );
71 72
}

73 74 75 76 77
static void dump_file_pos( const file_pos_t *pos )
{
    fprintf( stderr, "%x%08x", (unsigned int)(*pos >> 32), (unsigned int)*pos );
}

78
static void dump_rectangle( const rectangle_t *rect )
79 80 81 82 83
{
    fprintf( stderr, "{%d,%d;%d,%d}",
             rect->left, rect->top, rect->right, rect->bottom );
}

84 85 86 87 88 89 90
static void dump_char_info( const char_info_t *info )
{
    fprintf( stderr, "{'" );
    dump_strW( &info->ch, 1, stderr, "\'\'" );
    fprintf( stderr, "',%04x}", info->attr );
}

91 92 93 94 95 96 97
static void dump_ioctl_code( const ioctl_code_t *code )
{
    switch(*code)
    {
#define CASE(c) case c: fputs( #c, stderr ); break
        CASE(FSCTL_DISMOUNT_VOLUME);
        CASE(FSCTL_PIPE_DISCONNECT);
98
        CASE(FSCTL_PIPE_LISTEN);
99
        CASE(FSCTL_PIPE_WAIT);
100 101 102 103 104
        default: fprintf( stderr, "%08x", *code ); break;
#undef CASE
    }
}

105 106 107 108 109 110 111 112 113 114 115 116 117 118
static void dump_apc_call( const apc_call_t *call )
{
    fputc( '{', stderr );
    switch(call->type)
    {
    case APC_NONE:
        fprintf( stderr, "APC_NONE" );
        break;
    case APC_USER:
        fprintf( stderr, "APC_USER,args={%lx,%lx,%lx}",
                 call->user.args[0], call->user.args[1], call->user.args[2] );
        break;
    case APC_TIMER:
        fprintf( stderr, "APC_TIMER,time=" );
119
        dump_timeout( &call->timer.time );
120 121 122
        fprintf( stderr, ",arg=%p", call->timer.arg );
        break;
    case APC_ASYNC_IO:
123 124 125
        fprintf( stderr, "APC_ASYNC_IO,func=%p,user=%p,sb=%p,status=%s",
                 call->async_io.func, call->async_io.user, call->async_io.sb,
                 get_status_name(call->async_io.status) );
126
        break;
127 128 129 130 131 132 133 134 135 136 137
    case APC_VIRTUAL_ALLOC:
        fprintf( stderr, "APC_VIRTUAL_ALLOC,addr=%p,size=%lu,zero_bits=%u,op_type=%x,prot=%x",
                 call->virtual_alloc.addr, call->virtual_alloc.size,
                 call->virtual_alloc.zero_bits, call->virtual_alloc.op_type,
                 call->virtual_alloc.prot );
        break;
    case APC_VIRTUAL_FREE:
        fprintf( stderr, "APC_VIRTUAL_FREE,addr=%p,size=%lu,op_type=%x",
                 call->virtual_free.addr, call->virtual_free.size,
                 call->virtual_free.op_type );
        break;
138 139 140
    case APC_VIRTUAL_QUERY:
        fprintf( stderr, "APC_VIRTUAL_QUERY,addr=%p", call->virtual_query.addr );
        break;
141 142 143 144 145
    case APC_VIRTUAL_PROTECT:
        fprintf( stderr, "APC_VIRTUAL_PROTECT,addr=%p,size=%lu,prot=%x",
                 call->virtual_protect.addr, call->virtual_protect.size,
                 call->virtual_protect.prot );
        break;
146 147 148 149
    case APC_VIRTUAL_FLUSH:
        fprintf( stderr, "APC_VIRTUAL_FLUSH,addr=%p,size=%lu",
                 call->virtual_flush.addr, call->virtual_flush.size );
        break;
150 151 152 153 154 155 156 157
    case APC_VIRTUAL_LOCK:
        fprintf( stderr, "APC_VIRTUAL_LOCK,addr=%p,size=%lu",
                 call->virtual_lock.addr, call->virtual_lock.size );
        break;
    case APC_VIRTUAL_UNLOCK:
        fprintf( stderr, "APC_VIRTUAL_UNLOCK,addr=%p,size=%lu",
                 call->virtual_unlock.addr, call->virtual_unlock.size );
        break;
158 159 160
    case APC_MAP_VIEW:
        fprintf( stderr, "APC_MAP_VIEW,handle=%p,addr=%p,size=%lu,offset=%x%08x,zero_bits=%u,alloc_type=%x,prot=%x",
                 call->map_view.handle, call->map_view.addr, call->map_view.size,
161 162
                 (unsigned int)(call->map_view.offset >> 32), (unsigned int)call->map_view.offset,
                 call->map_view.zero_bits, call->map_view.alloc_type, call->map_view.prot );
163 164 165 166
        break;
    case APC_UNMAP_VIEW:
        fprintf( stderr, "APC_UNMAP_VIEW,addr=%p", call->unmap_view.addr );
        break;
167 168 169 170 171 172
    case APC_CREATE_THREAD:
        fprintf( stderr, "APC_CREATE_THREAD,func=%p,arg=%p,reserve=%lx,commit=%lx,suspend=%u",
                 call->create_thread.func, call->create_thread.arg,
                 call->create_thread.reserve, call->create_thread.commit,
                 call->create_thread.suspend );
        break;
173 174 175 176 177 178 179
    default:
        fprintf( stderr, "type=%u", call->type );
        break;
    }
    fputc( '}', stderr );
}

180 181 182 183 184 185 186
static void dump_apc_result( const apc_result_t *result )
{
    fputc( '{', stderr );
    switch(result->type)
    {
    case APC_NONE:
        break;
187 188 189 190
    case APC_ASYNC_IO:
        fprintf( stderr, "APC_ASYNC_IO,status=%s",
                 get_status_name( result->async_io.status ) );
        break;
191 192 193 194 195 196 197 198 199 200
    case APC_VIRTUAL_ALLOC:
        fprintf( stderr, "APC_VIRTUAL_ALLOC,status=%s,addr=%p,size=%lu",
                 get_status_name( result->virtual_alloc.status ),
                 result->virtual_alloc.addr, result->virtual_alloc.size );
        break;
    case APC_VIRTUAL_FREE:
        fprintf( stderr, "APC_VIRTUAL_FREE,status=%s,addr=%p,size=%lu",
                 get_status_name( result->virtual_free.status ),
                 result->virtual_free.addr, result->virtual_free.size );
        break;
201 202 203 204 205 206 207 208
    case APC_VIRTUAL_QUERY:
        fprintf( stderr, "APC_VIRTUAL_QUERY,status=%s,base=%p,alloc_base=%p,size=%lu,state=%x,prot=%x,alloc_prot=%x,alloc_type=%x",
                 get_status_name( result->virtual_query.status ),
                 result->virtual_query.base, result->virtual_query.alloc_base,
                 result->virtual_query.size, result->virtual_query.state,
                 result->virtual_query.prot, result->virtual_query.alloc_prot,
                 result->virtual_query.alloc_type );
        break;
209 210 211 212 213 214
    case APC_VIRTUAL_PROTECT:
        fprintf( stderr, "APC_VIRTUAL_PROTECT,status=%s,addr=%p,size=%lu,prot=%x",
                 get_status_name( result->virtual_protect.status ),
                 result->virtual_protect.addr, result->virtual_protect.size,
                 result->virtual_protect.prot );
        break;
215 216 217 218 219
    case APC_VIRTUAL_FLUSH:
        fprintf( stderr, "APC_VIRTUAL_FLUSH,status=%s,addr=%p,size=%lu",
                 get_status_name( result->virtual_flush.status ),
                 result->virtual_flush.addr, result->virtual_flush.size );
        break;
220 221 222 223 224 225 226 227 228 229
    case APC_VIRTUAL_LOCK:
        fprintf( stderr, "APC_VIRTUAL_LOCK,status=%s,addr=%p,size=%lu",
                 get_status_name( result->virtual_lock.status ),
                 result->virtual_lock.addr, result->virtual_lock.size );
        break;
    case APC_VIRTUAL_UNLOCK:
        fprintf( stderr, "APC_VIRTUAL_UNLOCK,status=%s,addr=%p,size=%lu",
                 get_status_name( result->virtual_unlock.status ),
                 result->virtual_unlock.addr, result->virtual_unlock.size );
        break;
230 231 232 233 234 235 236 237 238
    case APC_MAP_VIEW:
        fprintf( stderr, "APC_MAP_VIEW,status=%s,addr=%p,size=%lu",
                 get_status_name( result->map_view.status ),
                 result->map_view.addr, result->map_view.size );
        break;
    case APC_UNMAP_VIEW:
        fprintf( stderr, "APC_UNMAP_VIEW,status=%s",
                 get_status_name( result->unmap_view.status ) );
        break;
239 240 241 242 243
    case APC_CREATE_THREAD:
        fprintf( stderr, "APC_CREATE_THREAD,status=%s,tid=%04x,handle=%p",
                 get_status_name( result->create_thread.status ),
                 result->create_thread.tid, result->create_thread.handle );
        break;
244 245 246 247 248 249 250
    default:
        fprintf( stderr, "type=%u", result->type );
        break;
    }
    fputc( '}', stderr );
}

251 252
static void dump_async_data( const async_data_t *data )
{
253 254
    fprintf( stderr, "{callback=%p,iosb=%p,arg=%p,apc=%p,event=%p}",
             data->callback, data->iosb, data->arg, data->apc, data->event );
255 256
}

257 258 259 260 261
static void dump_luid( const luid_t *luid )
{
    fprintf( stderr, "%d.%u", luid->high_part, luid->low_part );
}

262
static void dump_context( const CONTEXT *context, data_size_t size )
263
{
264 265 266 267
    CONTEXT ctx;

    memset( &ctx, 0, sizeof(ctx) );
    memcpy( &ctx, context, min( size, sizeof(CONTEXT) ));
268
#ifdef __i386__
269 270 271
    fprintf( stderr, "{flags=%08x,eax=%08x,ebx=%08x,ecx=%08x,edx=%08x,esi=%08x,edi=%08x,"
             "ebp=%08x,eip=%08x,esp=%08x,eflags=%08x,cs=%04x,ds=%04x,es=%04x,"
             "fs=%04x,gs=%04x,dr0=%08x,dr1=%08x,dr2=%08x,dr3=%08x,dr6=%08x,dr7=%08x,",
272 273 274 275
             ctx.ContextFlags, ctx.Eax, ctx.Ebx, ctx.Ecx, ctx.Edx,
             ctx.Esi, ctx.Edi, ctx.Ebp, ctx.Eip, ctx.Esp, ctx.EFlags,
             ctx.SegCs, ctx.SegDs, ctx.SegEs, ctx.SegFs, ctx.SegGs,
             ctx.Dr0, ctx.Dr1, ctx.Dr2, ctx.Dr3, ctx.Dr6, ctx.Dr7 );
276
    fprintf( stderr, "float=" );
277 278 279 280 281 282
    dump_uints( (const int *)&ctx.FloatSave, sizeof(ctx.FloatSave) / sizeof(int) );
    if (size > FIELD_OFFSET( CONTEXT, ExtendedRegisters ))
    {
        fprintf( stderr, ",extended=" );
        dump_uints( (const int *)&ctx.ExtendedRegisters, sizeof(ctx.ExtendedRegisters) / sizeof(int) );
    }
283 284
    fprintf( stderr, "}" );
#else
285
    dump_uints( (const int *)&ctx, sizeof(ctx) / sizeof(int) );
286 287 288
#endif
}

289
static void dump_exc_record( const EXCEPTION_RECORD *rec )
290
{
291
    unsigned int i;
292
    fprintf( stderr, "{code=%x,flags=%x,rec=%p,addr=%p,params={",
293 294
             rec->ExceptionCode, rec->ExceptionFlags, rec->ExceptionRecord,
             rec->ExceptionAddress );
295
    for (i = 0; i < min(rec->NumberParameters,EXCEPTION_MAXIMUM_PARAMETERS); i++)
296 297 298 299 300 301 302
    {
        if (i) fputc( ',', stderr );
        fprintf( stderr, "%lx", rec->ExceptionInformation[i] );
    }
    fputc( '}', stderr );
}

303
static void dump_varargs_ints( data_size_t size )
304
{
305
    const int *data = cur_data;
306
    data_size_t len = size / sizeof(*data);
307 308 309 310 311 312 313 314

    fputc( '{', stderr );
    while (len > 0)
    {
        fprintf( stderr, "%d", *data++ );
        if (--len) fputc( ',', stderr );
    }
    fputc( '}', stderr );
315
    remove_data( size );
316 317
}

318 319 320 321 322 323 324 325 326 327 328 329
static void dump_varargs_apc_result( data_size_t size )
{
    const apc_result_t *result = cur_data;

    if (size >= sizeof(*result))
    {
        dump_apc_result( result );
        size = sizeof(*result);
    }
    remove_data( size );
}

330
static void dump_varargs_handles( data_size_t size )
331
{
332
    const obj_handle_t *data = cur_data;
333
    data_size_t len = size / sizeof(*data);
334 335 336 337

    fputc( '{', stderr );
    while (len > 0)
    {
338
        fprintf( stderr, "%p", *data++ );
339 340 341
        if (--len) fputc( ',', stderr );
    }
    fputc( '}', stderr );
342
    remove_data( size );
343 344
}

345
static void dump_varargs_user_handles( data_size_t size )
346
{
347
    const user_handle_t *data = cur_data;
348
    data_size_t len = size / sizeof(*data);
349 350 351 352

    fputc( '{', stderr );
    while (len > 0)
    {
353
        fprintf( stderr, "%p", *data++ );
354 355 356
        if (--len) fputc( ',', stderr );
    }
    fputc( '}', stderr );
357
    remove_data( size );
358 359
}

360
static void dump_varargs_bytes( data_size_t size )
361
{
362
    const unsigned char *data = cur_data;
363
    data_size_t len = size;
364 365 366 367 368 369 370 371

    fputc( '{', stderr );
    while (len > 0)
    {
        fprintf( stderr, "%02x", *data++ );
        if (--len) fputc( ',', stderr );
    }
    fputc( '}', stderr );
372
    remove_data( size );
373 374
}

375
static void dump_varargs_string( data_size_t size )
376
{
377
    fprintf( stderr, "\"%.*s\"", (int)size, (const char *)cur_data );
378
    remove_data( size );
379 380
}

381
static void dump_varargs_unicode_str( data_size_t size )
382
{
383
    fprintf( stderr, "L\"" );
384
    dump_strW( cur_data, size / sizeof(WCHAR), stderr, "\"\"" );
385
    fputc( '\"', stderr );
386
    remove_data( size );
387 388
}

389
static void dump_varargs_context( data_size_t size )
390
{
391 392 393 394 395
    if (!size)
    {
        fprintf( stderr, "{}" );
        return;
    }
396 397
    dump_context( cur_data, size );
    remove_data( min( size, sizeof(CONTEXT) ));
398 399
}

400
static void dump_varargs_exc_event( data_size_t size )
401
{
402
    const CONTEXT *ptr = cur_data;
403 404 405 406 407 408

    if (!size)
    {
        fprintf( stderr, "{}" );
        return;
    }
409
    fprintf( stderr, "{context=" );
410 411 412 413 414 415
    dump_context( ptr, size );
    if (size > sizeof(CONTEXT))
    {
        fprintf( stderr, ",rec=" );
        dump_exc_record( (const EXCEPTION_RECORD *)(ptr + 1) );
    }
416
    fputc( '}', stderr );
417
    remove_data( size );
418 419
}

420
static void dump_varargs_debug_event( data_size_t size )
421
{
422
    const debug_event_t *event = cur_data;
423

424
    if (!size)
425 426
    {
        fprintf( stderr, "{}" );
427
        return;
428
    }
429 430 431
    switch(event->code)
    {
    case EXCEPTION_DEBUG_EVENT:
432
        fprintf( stderr, "{exception," );
433
        dump_exc_record( &event->info.exception.record );
434
        fprintf( stderr, ",first=%d}", event->info.exception.first );
435 436
        break;
    case CREATE_THREAD_DEBUG_EVENT:
437
        fprintf( stderr, "{create_thread,thread=%p,teb=%p,start=%p}",
438 439 440 441
                 event->info.create_thread.handle, event->info.create_thread.teb,
                 event->info.create_thread.start );
        break;
    case CREATE_PROCESS_DEBUG_EVENT:
442
        fprintf( stderr, "{create_process,file=%p,process=%p,thread=%p,base=%p,offset=%d,"
443 444 445 446 447 448 449 450 451 452 453 454 455 456
                         "size=%d,teb=%p,start=%p,name=%p,unicode=%d}",
                 event->info.create_process.file, event->info.create_process.process,
                 event->info.create_process.thread, event->info.create_process.base,
                 event->info.create_process.dbg_offset, event->info.create_process.dbg_size,
                 event->info.create_process.teb, event->info.create_process.start,
                 event->info.create_process.name, event->info.create_process.unicode );
        break;
    case EXIT_THREAD_DEBUG_EVENT:
        fprintf( stderr, "{exit_thread,code=%d}", event->info.exit.exit_code );
        break;
    case EXIT_PROCESS_DEBUG_EVENT:
        fprintf( stderr, "{exit_process,code=%d}", event->info.exit.exit_code );
        break;
    case LOAD_DLL_DEBUG_EVENT:
457
        fprintf( stderr, "{load_dll,file=%p,base=%p,offset=%d,size=%d,name=%p,unicode=%d}",
458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480
                 event->info.load_dll.handle, event->info.load_dll.base,
                 event->info.load_dll.dbg_offset, event->info.load_dll.dbg_size,
                 event->info.load_dll.name, event->info.load_dll.unicode );
        break;
    case UNLOAD_DLL_DEBUG_EVENT:
        fprintf( stderr, "{unload_dll,base=%p}", event->info.unload_dll.base );
        break;
    case OUTPUT_DEBUG_STRING_EVENT:
        fprintf( stderr, "{output_string,data=%p,unicode=%d,len=%d}",
                 event->info.output_string.string, event->info.output_string.unicode,
                 event->info.output_string.length );
        break;
    case RIP_EVENT:
        fprintf( stderr, "{rip,err=%d,type=%d}",
                 event->info.rip_info.error, event->info.rip_info.type );
        break;
    case 0:  /* zero is the code returned on timeouts */
        fprintf( stderr, "{}" );
        break;
    default:
        fprintf( stderr, "{code=??? (%d)}", event->code );
        break;
    }
481
    remove_data( size );
482 483
}

484
/* dump a unicode string contained in a buffer; helper for dump_varargs_startup_info */
485
static void dump_inline_unicode_string( const UNICODE_STRING *str, const void *data, data_size_t size )
486
{
487
    size_t length = str->Length;
488 489 490 491
    size_t offset = (size_t)str->Buffer;

    if (offset >= size) return;
    if (offset + length > size) length = size - offset;
492
    dump_strW( (const WCHAR *)data + offset/sizeof(WCHAR), length/sizeof(WCHAR), stderr, "\"\"" );
493 494
}

495
static void dump_varargs_startup_info( data_size_t size )
496
{
497 498
    const RTL_USER_PROCESS_PARAMETERS *ptr = cur_data;
    RTL_USER_PROCESS_PARAMETERS params;
499

500
    if (size < sizeof(params.Size))
501 502 503 504
    {
        fprintf( stderr, "{}" );
        return;
    }
505 506 507 508
    if (size > ptr->Size) size = ptr->Size;
    memset( &params, 0, sizeof(params) );
    memcpy( &params, ptr, min( size, sizeof(params) ));

509 510 511 512
    fprintf( stderr, "{AllocationSize=%x,", params.AllocationSize );
    fprintf( stderr, "Size=%x,", params.Size );
    fprintf( stderr, "Flags=%x,", params.Flags );
    fprintf( stderr, "DebugFlags=%x,", params.DebugFlags );
513
    fprintf( stderr, "ConsoleHandle=%p,", params.ConsoleHandle );
514
    fprintf( stderr, "ConsoleFlags=%x,", params.ConsoleFlags );
515 516 517
    fprintf( stderr, "hStdInput=%p,", params.hStdInput );
    fprintf( stderr, "hStdOutput=%p,", params.hStdOutput );
    fprintf( stderr, "hStdError=%p,", params.hStdError );
518
    fprintf( stderr, "CurrentDirectory.Handle=%p,", params.CurrentDirectory.Handle );
519 520 521 522 523 524 525 526 527
    fprintf( stderr, "dwX=%d,", params.dwX );
    fprintf( stderr, "dwY=%d,", params.dwY );
    fprintf( stderr, "dwXSize=%d,", params.dwXSize );
    fprintf( stderr, "dwYSize=%d,", params.dwYSize );
    fprintf( stderr, "dwXCountChars=%d,", params.dwXCountChars );
    fprintf( stderr, "dwYCountChars=%d,", params.dwYCountChars );
    fprintf( stderr, "dwFillAttribute=%x,", params.dwFillAttribute );
    fprintf( stderr, "dwFlags=%x,", params.dwFlags );
    fprintf( stderr, "wShowWindow=%x,", params.wShowWindow );
528 529
    fprintf( stderr, "CurrentDirectory.DosPath=L\"" );
    dump_inline_unicode_string( &params.CurrentDirectory.DosPath, cur_data, size );
530 531 532 533 534 535 536 537 538 539 540 541 542 543 544
    fprintf( stderr, "\",DllPath=L\"" );
    dump_inline_unicode_string( &params.DllPath, cur_data, size );
    fprintf( stderr, "\",ImagePathName=L\"" );
    dump_inline_unicode_string( &params.ImagePathName, cur_data, size );
    fprintf( stderr, "\",CommandLine=L\"" );
    dump_inline_unicode_string( &params.CommandLine, cur_data, size );
    fprintf( stderr, "\",WindowTitle=L\"" );
    dump_inline_unicode_string( &params.WindowTitle, cur_data, size );
    fprintf( stderr, "\",Desktop=L\"" );
    dump_inline_unicode_string( &params.Desktop, cur_data, size );
    fprintf( stderr, "\",ShellInfo=L\"" );
    dump_inline_unicode_string( &params.ShellInfo, cur_data, size );
    fprintf( stderr, "\",RuntimeInfo=L\"" );
    dump_inline_unicode_string( &params.RuntimeInfo, cur_data, size );
    fprintf( stderr, "\"}" );
545 546 547
    remove_data( size );
}

548
static void dump_varargs_input_records( data_size_t size )
549
{
550
    const INPUT_RECORD *rec = cur_data;
551
    data_size_t len = size / sizeof(*rec);
552 553 554 555 556 557 558 559 560

    fputc( '{', stderr );
    while (len > 0)
    {
        fprintf( stderr, "{%04x,...}", rec->EventType );
        rec++;
        if (--len) fputc( ',', stderr );
    }
    fputc( '}', stderr );
561
    remove_data( size );
562 563
}

564
static void dump_varargs_rectangles( data_size_t size )
565 566
{
    const rectangle_t *rect = cur_data;
567
    data_size_t len = size / sizeof(*rect);
568 569 570 571 572 573 574 575 576 577 578

    fputc( '{', stderr );
    while (len > 0)
    {
        dump_rectangle( rect++ );
        if (--len) fputc( ',', stderr );
    }
    fputc( '}', stderr );
    remove_data( size );
}

579 580 581 582 583 584
static void dump_varargs_message_data( data_size_t size )
{
    /* FIXME: dump the structured data */
    dump_varargs_bytes( size );
}

585
static void dump_varargs_properties( data_size_t size )
586
{
587
    const property_data_t *prop = cur_data;
588
    data_size_t len = size / sizeof(*prop);
589 590 591 592

    fputc( '{', stderr );
    while (len > 0)
    {
593
        fprintf( stderr, "{atom=%04x,str=%d,handle=%p}",
594 595 596 597 598
                 prop->atom, prop->string, prop->handle );
        prop++;
        if (--len) fputc( ',', stderr );
    }
    fputc( '}', stderr );
599
    remove_data( size );
600 601
}

602
static void dump_varargs_LUID_AND_ATTRIBUTES( data_size_t size )
603 604
{
    const LUID_AND_ATTRIBUTES *lat = cur_data;
605
    data_size_t len = size / sizeof(*lat);
606 607 608 609

    fputc( '{', stderr );
    while (len > 0)
    {
610
        fprintf( stderr, "{luid=%08x%08x,attr=%x}",
611 612 613 614 615 616 617 618
                 lat->Luid.HighPart, lat->Luid.LowPart, lat->Attributes );
        lat++;
        if (--len) fputc( ',', stderr );
    }
    fputc( '}', stderr );
    remove_data( size );
}

619
static void dump_inline_sid( const SID *sid, data_size_t size )
620 621 622 623
{
    DWORD i;

    /* security check */
624 625 626 627
    if ((FIELD_OFFSET(SID, SubAuthority[0]) > size) ||
        (FIELD_OFFSET(SID, SubAuthority[sid->SubAuthorityCount]) > size))
    {
        fprintf( stderr, "<invalid sid>" );
628
        return;
629
    }
630 631

    fputc( '{', stderr );
632
    fprintf( stderr, "S-%u-%u", sid->Revision, MAKELONG(
633 634 635 636 637
        MAKEWORD( sid->IdentifierAuthority.Value[5],
                  sid->IdentifierAuthority.Value[4] ),
        MAKEWORD( sid->IdentifierAuthority.Value[3],
                  sid->IdentifierAuthority.Value[2] ) ) );
    for (i = 0; i < sid->SubAuthorityCount; i++)
638
        fprintf( stderr, "-%u", sid->SubAuthority[i] );
639 640 641
    fputc( '}', stderr );
}

642
static void dump_varargs_SID( data_size_t size )
643 644 645 646 647 648
{
    const SID *sid = cur_data;
    dump_inline_sid( sid, size );
    remove_data( size );
}

649
static void dump_inline_acl( const ACL *acl, data_size_t size )
650 651 652 653 654 655 656 657
{
    const ACE_HEADER *ace;
    ULONG i;
    fputc( '{', stderr );

    if (size)
    {
        if (size < sizeof(ACL))
658 659
        {
            fprintf( stderr, "<invalid acl>}\n" );
660
            return;
661
        }
662 663 664 665 666
        size -= sizeof(ACL);
        ace = (const ACE_HEADER *)(acl + 1);
        for (i = 0; i < acl->AceCount; i++)
        {
            const SID *sid = NULL;
667
            data_size_t sid_size = 0;
668

669 670 671 672 673
            if (size < sizeof(ACE_HEADER))
                return;
            if (size < ace->AceSize)
                return;
            size -= ace->AceSize;
674
            if (i != 0) fputc( ',', stderr );
675 676 677 678 679
            fprintf( stderr, "{AceType=" );
            switch (ace->AceType)
            {
            case ACCESS_DENIED_ACE_TYPE:
                sid = (const SID *)&((const ACCESS_DENIED_ACE *)ace)->SidStart;
680
                sid_size = ace->AceSize - FIELD_OFFSET(ACCESS_DENIED_ACE, SidStart);
681
                fprintf( stderr, "ACCESS_DENIED_ACE_TYPE,Mask=%x",
682
                         ((const ACCESS_DENIED_ACE *)ace)->Mask );
683 684 685
                break;
            case ACCESS_ALLOWED_ACE_TYPE:
                sid = (const SID *)&((const ACCESS_ALLOWED_ACE *)ace)->SidStart;
686
                sid_size = ace->AceSize - FIELD_OFFSET(ACCESS_ALLOWED_ACE, SidStart);
687
                fprintf( stderr, "ACCESS_ALLOWED_ACE_TYPE,Mask=%x",
688
                         ((const ACCESS_ALLOWED_ACE *)ace)->Mask );
689 690 691
                break;
            case SYSTEM_AUDIT_ACE_TYPE:
                sid = (const SID *)&((const SYSTEM_AUDIT_ACE *)ace)->SidStart;
692
                sid_size = ace->AceSize - FIELD_OFFSET(SYSTEM_AUDIT_ACE, SidStart);
693
                fprintf( stderr, "SYSTEM_AUDIT_ACE_TYPE,Mask=%x",
694
                         ((const SYSTEM_AUDIT_ACE *)ace)->Mask );
695 696 697
                break;
            case SYSTEM_ALARM_ACE_TYPE:
                sid = (const SID *)&((const SYSTEM_ALARM_ACE *)ace)->SidStart;
698
                sid_size = ace->AceSize - FIELD_OFFSET(SYSTEM_ALARM_ACE, SidStart);
699
                fprintf( stderr, "SYSTEM_ALARM_ACE_TYPE,Mask=%x",
700
                         ((const SYSTEM_ALARM_ACE *)ace)->Mask );
701 702 703 704 705 706 707
                break;
            default:
                fprintf( stderr, "unknown<%d>", ace->AceType );
                break;
            }
            fprintf( stderr, ",AceFlags=%x,Sid=", ace->AceFlags );
            if (sid)
708
                dump_inline_sid( sid, sid_size );
709 710 711 712 713 714 715
            ace = (const ACE_HEADER *)((const char *)ace + ace->AceSize);
            fputc( '}', stderr );
        }
    }
    fputc( '}', stderr );
}

716
static void dump_inline_security_descriptor( const struct security_descriptor *sd, data_size_t size )
717 718 719 720 721 722 723 724 725
{
    fputc( '{', stderr );
    if (size >= sizeof(struct security_descriptor))
    {
        size_t offset = sizeof(struct security_descriptor);
        fprintf( stderr, "control=%08x", sd->control );
        fprintf( stderr, ",owner=" );
        if ((sd->owner_len > FIELD_OFFSET(SID, SubAuthority[255])) || (offset + sd->owner_len > size))
            return;
726 727 728 729
        if (sd->owner_len)
            dump_inline_sid( (const SID *)((const char *)sd + offset), sd->owner_len );
        else
            fprintf( stderr, "<not present>" );
730 731 732 733
        offset += sd->owner_len;
        fprintf( stderr, ",group=" );
        if ((sd->group_len > FIELD_OFFSET(SID, SubAuthority[255])) || (offset + sd->group_len > size))
            return;
734 735 736 737
        if (sd->group_len)
            dump_inline_sid( (const SID *)((const char *)sd + offset), sd->group_len );
        else
            fprintf( stderr, "<not present>" );
738 739 740 741 742 743 744 745 746 747 748 749 750 751 752
        offset += sd->group_len;
        fprintf( stderr, ",sacl=" );
        if ((sd->sacl_len >= MAX_ACL_LEN) || (offset + sd->sacl_len > size))
            return;
        dump_inline_acl( (const ACL *)((const char *)sd + offset), sd->sacl_len );
        offset += sd->sacl_len;
        fprintf( stderr, ",dacl=" );
        if ((sd->dacl_len >= MAX_ACL_LEN) || (offset + sd->dacl_len > size))
            return;
        dump_inline_acl( (const ACL *)((const char *)sd + offset), sd->dacl_len );
        offset += sd->dacl_len;
    }
    fputc( '}', stderr );
}

753
static void dump_varargs_security_descriptor( data_size_t size )
754 755 756 757 758 759
{
    const struct security_descriptor *sd = cur_data;
    dump_inline_security_descriptor( sd, size );
    remove_data( size );
}

760
static void dump_varargs_token_groups( data_size_t size )
761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796
{
    const struct token_groups *tg = cur_data;
    fputc( '{', stderr );
    if (size >= sizeof(struct token_groups))
    {
        size_t offset = sizeof(*tg);
        fprintf( stderr, "count=%08x,", tg->count );
        if (tg->count * sizeof(unsigned int) <= size)
        {
            unsigned int i;
            const unsigned int *attr = (const unsigned int *)(tg + 1);

            offset += tg->count * sizeof(unsigned int);

            fputc( '[', stderr );
            for (i = 0; i < tg->count; i++)
            {
                const SID *sid = (const SID *)((const char *)cur_data + offset);
                if (i != 0)
                    fputc( ',', stderr );
                fputc( '{', stderr );
                fprintf( stderr, "attributes=%08x", attr[i] );
                fprintf( stderr, ",sid=" );
                dump_inline_sid( sid, size - offset );
                if ((offset + FIELD_OFFSET(SID, SubAuthority[0]) > size) ||
                    (offset + FIELD_OFFSET(SID, SubAuthority[sid->SubAuthorityCount]) > size))
                    break;
                offset += FIELD_OFFSET(SID, SubAuthority[sid->SubAuthorityCount]);
                fputc( '}', stderr );
            }
            fputc( ']', stderr );
        }
    }
    fputc( '}', stderr );
}

797 798 799 800 801 802 803 804
static void dump_varargs_object_attributes( data_size_t size )
{
    const struct object_attributes *objattr = cur_data;
    fputc( '{', stderr );
    if (size >= sizeof(struct object_attributes))
    {
        const WCHAR *str;
        fprintf( stderr, "rootdir=%p,sd=", objattr->rootdir );
805 806 807
        if (objattr->sd_len > size - sizeof(*objattr) ||
            objattr->name_len > size - sizeof(*objattr) - objattr->sd_len)
            return;
808
        dump_inline_security_descriptor( (const struct security_descriptor *)(objattr + 1), objattr->sd_len );
809
        str = (const WCHAR *)objattr + (sizeof(*objattr) + objattr->sd_len) / sizeof(WCHAR);
810
        fprintf( stderr, ",name=L\"" );
811
        dump_strW( str, objattr->name_len / sizeof(WCHAR), stderr, "\"\"" );
812
        fputc( '\"', stderr );
813 814
        remove_data( ((sizeof(*objattr) + objattr->sd_len) / sizeof(WCHAR)) * sizeof(WCHAR) +
                     objattr->name_len );
815 816 817 818
    }
    fputc( '}', stderr );
}

819
typedef void (*dump_func)( const void *req );
820 821 822 823

/* Everything below this line is generated automatically by tools/make_requests */
/* ### make_requests begin ### */

824
static void dump_new_process_request( const struct new_process_request *req )
825 826
{
    fprintf( stderr, " inherit_all=%d,", req->inherit_all );
827
    fprintf( stderr, " create_flags=%08x,", req->create_flags );
828
    fprintf( stderr, " socket_fd=%d,", req->socket_fd );
829 830 831 832
    fprintf( stderr, " exe_file=%p,", req->exe_file );
    fprintf( stderr, " hstdin=%p,", req->hstdin );
    fprintf( stderr, " hstdout=%p,", req->hstdout );
    fprintf( stderr, " hstderr=%p,", req->hstderr );
833 834 835 836
    fprintf( stderr, " process_access=%08x,", req->process_access );
    fprintf( stderr, " process_attr=%08x,", req->process_attr );
    fprintf( stderr, " thread_access=%08x,", req->thread_access );
    fprintf( stderr, " thread_attr=%08x,", req->thread_attr );
837 838
    fprintf( stderr, " info=" );
    dump_varargs_startup_info( cur_size );
839 840 841
    fputc( ',', stderr );
    fprintf( stderr, " env=" );
    dump_varargs_unicode_str( cur_size );
842 843
}

844
static void dump_new_process_reply( const struct new_process_reply *req )
845
{
846 847 848 849 850
    fprintf( stderr, " info=%p,", req->info );
    fprintf( stderr, " pid=%04x,", req->pid );
    fprintf( stderr, " phandle=%p,", req->phandle );
    fprintf( stderr, " tid=%04x,", req->tid );
    fprintf( stderr, " thandle=%p", req->thandle );
851 852 853 854
}

static void dump_get_new_process_info_request( const struct get_new_process_info_request *req )
{
855
    fprintf( stderr, " info=%p", req->info );
856 857
}

858
static void dump_get_new_process_info_reply( const struct get_new_process_info_reply *req )
859
{
860 861
    fprintf( stderr, " success=%d,", req->success );
    fprintf( stderr, " exit_code=%d", req->exit_code );
862 863
}

864
static void dump_new_thread_request( const struct new_thread_request *req )
Alexandre Julliard's avatar
Alexandre Julliard committed
865
{
866 867
    fprintf( stderr, " access=%08x,", req->access );
    fprintf( stderr, " attributes=%08x,", req->attributes );
868
    fprintf( stderr, " suspend=%d,", req->suspend );
869
    fprintf( stderr, " request_fd=%d", req->request_fd );
Alexandre Julliard's avatar
Alexandre Julliard committed
870 871
}

872
static void dump_new_thread_reply( const struct new_thread_reply *req )
Alexandre Julliard's avatar
Alexandre Julliard committed
873
{
874
    fprintf( stderr, " tid=%04x,", req->tid );
875
    fprintf( stderr, " handle=%p", req->handle );
Alexandre Julliard's avatar
Alexandre Julliard committed
876 877
}

878 879 880 881 882 883
static void dump_get_startup_info_request( const struct get_startup_info_request *req )
{
}

static void dump_get_startup_info_reply( const struct get_startup_info_reply *req )
{
884 885 886 887
    fprintf( stderr, " exe_file=%p,", req->exe_file );
    fprintf( stderr, " hstdin=%p,", req->hstdin );
    fprintf( stderr, " hstdout=%p,", req->hstdout );
    fprintf( stderr, " hstderr=%p,", req->hstderr );
888 889
    fprintf( stderr, " info=" );
    dump_varargs_startup_info( cur_size );
890 891 892
    fputc( ',', stderr );
    fprintf( stderr, " env=" );
    dump_varargs_unicode_str( cur_size );
893 894
}

895
static void dump_init_process_done_request( const struct init_process_done_request *req )
896
{
897
    fprintf( stderr, " module=%p,", req->module );
898
    fprintf( stderr, " entry=%p,", req->entry );
899
    fprintf( stderr, " gui=%d", req->gui );
900 901
}

902
static void dump_init_thread_request( const struct init_thread_request *req )
903
{
904
    fprintf( stderr, " unix_pid=%d,", req->unix_pid );
905
    fprintf( stderr, " unix_tid=%d,", req->unix_tid );
906
    fprintf( stderr, " debug_level=%d,", req->debug_level );
907
    fprintf( stderr, " teb=%p,", req->teb );
908
    fprintf( stderr, " peb=%p,", req->peb );
909
    fprintf( stderr, " entry=%p,", req->entry );
910
    fprintf( stderr, " ldt_copy=%p,", req->ldt_copy );
911
    fprintf( stderr, " reply_fd=%d,", req->reply_fd );
912
    fprintf( stderr, " wait_fd=%d", req->wait_fd );
913 914
}

915
static void dump_init_thread_reply( const struct init_thread_reply *req )
916
{
917 918
    fprintf( stderr, " pid=%04x,", req->pid );
    fprintf( stderr, " tid=%04x,", req->tid );
919
    fprintf( stderr, " info_size=%u,", req->info_size );
920
    fprintf( stderr, " server_start=" );
921
    dump_timeout( &req->server_start );
922
    fprintf( stderr, "," );
923
    fprintf( stderr, " version=%d", req->version );
924 925
}

926
static void dump_terminate_process_request( const struct terminate_process_request *req )
Alexandre Julliard's avatar
Alexandre Julliard committed
927
{
928
    fprintf( stderr, " handle=%p,", req->handle );
929
    fprintf( stderr, " exit_code=%d", req->exit_code );
Alexandre Julliard's avatar
Alexandre Julliard committed
930 931
}

932
static void dump_terminate_process_reply( const struct terminate_process_reply *req )
933 934 935 936
{
    fprintf( stderr, " self=%d", req->self );
}

937
static void dump_terminate_thread_request( const struct terminate_thread_request *req )
Alexandre Julliard's avatar
Alexandre Julliard committed
938
{
939
    fprintf( stderr, " handle=%p,", req->handle );
940
    fprintf( stderr, " exit_code=%d", req->exit_code );
Alexandre Julliard's avatar
Alexandre Julliard committed
941 942
}

943
static void dump_terminate_thread_reply( const struct terminate_thread_reply *req )
944 945 946 947 948
{
    fprintf( stderr, " self=%d,", req->self );
    fprintf( stderr, " last=%d", req->last );
}

949
static void dump_get_process_info_request( const struct get_process_info_request *req )
Alexandre Julliard's avatar
Alexandre Julliard committed
950
{
951
    fprintf( stderr, " handle=%p", req->handle );
Alexandre Julliard's avatar
Alexandre Julliard committed
952 953
}

954
static void dump_get_process_info_reply( const struct get_process_info_reply *req )
Alexandre Julliard's avatar
Alexandre Julliard committed
955
{
956
    fprintf( stderr, " pid=%04x,", req->pid );
957
    fprintf( stderr, " ppid=%04x,", req->ppid );
958 959
    fprintf( stderr, " exit_code=%d,", req->exit_code );
    fprintf( stderr, " priority=%d,", req->priority );
960
    fprintf( stderr, " affinity=%08x,", req->affinity );
961 962
    fprintf( stderr, " peb=%p,", req->peb );
    fprintf( stderr, " start_time=" );
963
    dump_timeout( &req->start_time );
964 965
    fprintf( stderr, "," );
    fprintf( stderr, " end_time=" );
966
    dump_timeout( &req->end_time );
967 968
}

969
static void dump_set_process_info_request( const struct set_process_info_request *req )
970
{
971
    fprintf( stderr, " handle=%p,", req->handle );
972 973
    fprintf( stderr, " mask=%d,", req->mask );
    fprintf( stderr, " priority=%d,", req->priority );
974
    fprintf( stderr, " affinity=%08x", req->affinity );
Alexandre Julliard's avatar
Alexandre Julliard committed
975 976
}

977
static void dump_get_thread_info_request( const struct get_thread_info_request *req )
Alexandre Julliard's avatar
Alexandre Julliard committed
978
{
979
    fprintf( stderr, " handle=%p,", req->handle );
980
    fprintf( stderr, " tid_in=%04x", req->tid_in );
Alexandre Julliard's avatar
Alexandre Julliard committed
981 982
}

983
static void dump_get_thread_info_reply( const struct get_thread_info_reply *req )
Alexandre Julliard's avatar
Alexandre Julliard committed
984
{
985
    fprintf( stderr, " pid=%04x,", req->pid );
986
    fprintf( stderr, " tid=%04x,", req->tid );
987
    fprintf( stderr, " teb=%p,", req->teb );
988
    fprintf( stderr, " exit_code=%d,", req->exit_code );
989
    fprintf( stderr, " priority=%d,", req->priority );
990
    fprintf( stderr, " affinity=%08x,", req->affinity );
991
    fprintf( stderr, " creation_time=" );
992
    dump_timeout( &req->creation_time );
993 994
    fprintf( stderr, "," );
    fprintf( stderr, " exit_time=" );
995
    dump_timeout( &req->exit_time );
996 997
    fprintf( stderr, "," );
    fprintf( stderr, " last=%d", req->last );
998 999
}

1000
static void dump_set_thread_info_request( const struct set_thread_info_request *req )
1001
{
1002
    fprintf( stderr, " handle=%p,", req->handle );
1003 1004
    fprintf( stderr, " mask=%d,", req->mask );
    fprintf( stderr, " priority=%d,", req->priority );
1005
    fprintf( stderr, " affinity=%08x,", req->affinity );
1006
    fprintf( stderr, " token=%p", req->token );
1007 1008
}

1009 1010 1011 1012 1013 1014 1015 1016
static void dump_get_dll_info_request( const struct get_dll_info_request *req )
{
    fprintf( stderr, " handle=%p,", req->handle );
    fprintf( stderr, " base_address=%p", req->base_address );
}

static void dump_get_dll_info_reply( const struct get_dll_info_reply *req )
{
1017
    fprintf( stderr, " size=%lu,", (unsigned long)req->size );
1018
    fprintf( stderr, " entry_point=%p,", req->entry_point );
1019
    fprintf( stderr, " filename_len=%u,", req->filename_len );
1020
    fprintf( stderr, " filename=" );
1021
    dump_varargs_unicode_str( cur_size );
1022 1023
}

1024
static void dump_suspend_thread_request( const struct suspend_thread_request *req )
1025
{
1026
    fprintf( stderr, " handle=%p", req->handle );
1027 1028
}

1029
static void dump_suspend_thread_reply( const struct suspend_thread_reply *req )
1030 1031 1032 1033
{
    fprintf( stderr, " count=%d", req->count );
}

1034
static void dump_resume_thread_request( const struct resume_thread_request *req )
1035
{
1036
    fprintf( stderr, " handle=%p", req->handle );
1037 1038
}

1039
static void dump_resume_thread_reply( const struct resume_thread_reply *req )
1040 1041 1042 1043
{
    fprintf( stderr, " count=%d", req->count );
}

1044
static void dump_load_dll_request( const struct load_dll_request *req )
1045
{
1046
    fprintf( stderr, " handle=%p,", req->handle );
1047
    fprintf( stderr, " base=%p,", req->base );
1048
    fprintf( stderr, " size=%lu,", (unsigned long)req->size );
1049 1050
    fprintf( stderr, " dbg_offset=%d,", req->dbg_offset );
    fprintf( stderr, " dbg_size=%d,", req->dbg_size );
1051 1052
    fprintf( stderr, " name=%p,", req->name );
    fprintf( stderr, " filename=" );
1053
    dump_varargs_unicode_str( cur_size );
1054 1055 1056 1057 1058
}

static void dump_unload_dll_request( const struct unload_dll_request *req )
{
    fprintf( stderr, " base=%p", req->base );
1059 1060
}

1061
static void dump_queue_apc_request( const struct queue_apc_request *req )
1062
{
1063 1064
    fprintf( stderr, " thread=%p,", req->thread );
    fprintf( stderr, " process=%p,", req->process );
1065 1066
    fprintf( stderr, " call=" );
    dump_apc_call( &req->call );
Alexandre Julliard's avatar
Alexandre Julliard committed
1067 1068
}

1069 1070
static void dump_queue_apc_reply( const struct queue_apc_reply *req )
{
1071 1072
    fprintf( stderr, " handle=%p,", req->handle );
    fprintf( stderr, " self=%d", req->self );
1073 1074
}

1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085
static void dump_get_apc_result_request( const struct get_apc_result_request *req )
{
    fprintf( stderr, " handle=%p", req->handle );
}

static void dump_get_apc_result_reply( const struct get_apc_result_reply *req )
{
    fprintf( stderr, " result=" );
    dump_apc_result( &req->result );
}

1086
static void dump_close_handle_request( const struct close_handle_request *req )
Alexandre Julliard's avatar
Alexandre Julliard committed
1087
{
1088
    fprintf( stderr, " handle=%p", req->handle );
Alexandre Julliard's avatar
Alexandre Julliard committed
1089 1090
}

1091
static void dump_set_handle_info_request( const struct set_handle_info_request *req )
1092
{
1093
    fprintf( stderr, " handle=%p,", req->handle );
1094
    fprintf( stderr, " flags=%d,", req->flags );
1095
    fprintf( stderr, " mask=%d", req->mask );
1096 1097
}

1098
static void dump_set_handle_info_reply( const struct set_handle_info_reply *req )
1099
{
1100 1101 1102
    fprintf( stderr, " old_flags=%d", req->old_flags );
}

1103
static void dump_dup_handle_request( const struct dup_handle_request *req )
Alexandre Julliard's avatar
Alexandre Julliard committed
1104
{
1105 1106 1107
    fprintf( stderr, " src_process=%p,", req->src_process );
    fprintf( stderr, " src_handle=%p,", req->src_handle );
    fprintf( stderr, " dst_process=%p,", req->dst_process );
1108
    fprintf( stderr, " access=%08x,", req->access );
1109 1110
    fprintf( stderr, " attributes=%08x,", req->attributes );
    fprintf( stderr, " options=%08x", req->options );
Alexandre Julliard's avatar
Alexandre Julliard committed
1111 1112
}

1113
static void dump_dup_handle_reply( const struct dup_handle_reply *req )
Alexandre Julliard's avatar
Alexandre Julliard committed
1114
{
1115
    fprintf( stderr, " handle=%p,", req->handle );
1116
    fprintf( stderr, " self=%d,", req->self );
1117
    fprintf( stderr, " closed=%d", req->closed );
Alexandre Julliard's avatar
Alexandre Julliard committed
1118 1119
}

1120
static void dump_open_process_request( const struct open_process_request *req )
Alexandre Julliard's avatar
Alexandre Julliard committed
1121
{
1122
    fprintf( stderr, " pid=%04x,", req->pid );
1123
    fprintf( stderr, " access=%08x,", req->access );
1124
    fprintf( stderr, " attributes=%08x", req->attributes );
Alexandre Julliard's avatar
Alexandre Julliard committed
1125 1126
}

1127
static void dump_open_process_reply( const struct open_process_reply *req )
Alexandre Julliard's avatar
Alexandre Julliard committed
1128
{
1129
    fprintf( stderr, " handle=%p", req->handle );
Alexandre Julliard's avatar
Alexandre Julliard committed
1130 1131
}

1132 1133
static void dump_open_thread_request( const struct open_thread_request *req )
{
1134
    fprintf( stderr, " tid=%04x,", req->tid );
1135
    fprintf( stderr, " access=%08x,", req->access );
1136
    fprintf( stderr, " attributes=%08x", req->attributes );
1137 1138 1139 1140
}

static void dump_open_thread_reply( const struct open_thread_reply *req )
{
1141
    fprintf( stderr, " handle=%p", req->handle );
1142 1143
}

1144
static void dump_select_request( const struct select_request *req )
Alexandre Julliard's avatar
Alexandre Julliard committed
1145
{
1146
    fprintf( stderr, " flags=%d,", req->flags );
1147
    fprintf( stderr, " cookie=%p,", req->cookie );
1148
    fprintf( stderr, " signal=%p,", req->signal );
1149
    fprintf( stderr, " prev_apc=%p,", req->prev_apc );
1150
    fprintf( stderr, " timeout=" );
1151
    dump_timeout( &req->timeout );
1152
    fprintf( stderr, "," );
1153 1154 1155
    fprintf( stderr, " result=" );
    dump_varargs_apc_result( cur_size );
    fputc( ',', stderr );
1156
    fprintf( stderr, " handles=" );
1157
    dump_varargs_handles( cur_size );
Alexandre Julliard's avatar
Alexandre Julliard committed
1158 1159
}

1160 1161
static void dump_select_reply( const struct select_reply *req )
{
1162
    fprintf( stderr, " apc_handle=%p,", req->apc_handle );
1163 1164
    fprintf( stderr, " timeout=" );
    dump_timeout( &req->timeout );
1165 1166 1167
    fprintf( stderr, "," );
    fprintf( stderr, " call=" );
    dump_apc_call( &req->call );
1168 1169
}

1170
static void dump_create_event_request( const struct create_event_request *req )
Alexandre Julliard's avatar
Alexandre Julliard committed
1171
{
1172
    fprintf( stderr, " access=%08x,", req->access );
1173
    fprintf( stderr, " attributes=%08x,", req->attributes );
1174 1175
    fprintf( stderr, " manual_reset=%d,", req->manual_reset );
    fprintf( stderr, " initial_state=%d,", req->initial_state );
1176 1177
    fprintf( stderr, " objattr=" );
    dump_varargs_object_attributes( cur_size );
Alexandre Julliard's avatar
Alexandre Julliard committed
1178 1179
}

1180
static void dump_create_event_reply( const struct create_event_reply *req )
Alexandre Julliard's avatar
Alexandre Julliard committed
1181
{
1182
    fprintf( stderr, " handle=%p", req->handle );
Alexandre Julliard's avatar
Alexandre Julliard committed
1183 1184
}

1185
static void dump_event_op_request( const struct event_op_request *req )
Alexandre Julliard's avatar
Alexandre Julliard committed
1186
{
1187
    fprintf( stderr, " handle=%p,", req->handle );
1188
    fprintf( stderr, " op=%d", req->op );
Alexandre Julliard's avatar
Alexandre Julliard committed
1189 1190
}

1191
static void dump_open_event_request( const struct open_event_request *req )
1192 1193
{
    fprintf( stderr, " access=%08x,", req->access );
1194
    fprintf( stderr, " attributes=%08x,", req->attributes );
1195
    fprintf( stderr, " rootdir=%p,", req->rootdir );
1196
    fprintf( stderr, " name=" );
1197
    dump_varargs_unicode_str( cur_size );
1198 1199
}

1200
static void dump_open_event_reply( const struct open_event_reply *req )
1201
{
1202
    fprintf( stderr, " handle=%p", req->handle );
1203 1204
}

1205
static void dump_create_mutex_request( const struct create_mutex_request *req )
Alexandre Julliard's avatar
Alexandre Julliard committed
1206
{
1207
    fprintf( stderr, " access=%08x,", req->access );
1208
    fprintf( stderr, " attributes=%08x,", req->attributes );
1209
    fprintf( stderr, " owned=%d,", req->owned );
1210 1211
    fprintf( stderr, " objattr=" );
    dump_varargs_object_attributes( cur_size );
Alexandre Julliard's avatar
Alexandre Julliard committed
1212 1213
}

1214
static void dump_create_mutex_reply( const struct create_mutex_reply *req )
Alexandre Julliard's avatar
Alexandre Julliard committed
1215
{
1216
    fprintf( stderr, " handle=%p", req->handle );
Alexandre Julliard's avatar
Alexandre Julliard committed
1217 1218
}

1219
static void dump_release_mutex_request( const struct release_mutex_request *req )
Alexandre Julliard's avatar
Alexandre Julliard committed
1220
{
1221
    fprintf( stderr, " handle=%p", req->handle );
Alexandre Julliard's avatar
Alexandre Julliard committed
1222 1223
}

1224 1225 1226 1227 1228
static void dump_release_mutex_reply( const struct release_mutex_reply *req )
{
    fprintf( stderr, " prev_count=%08x", req->prev_count );
}

1229
static void dump_open_mutex_request( const struct open_mutex_request *req )
1230 1231
{
    fprintf( stderr, " access=%08x,", req->access );
1232
    fprintf( stderr, " attributes=%08x,", req->attributes );
1233
    fprintf( stderr, " rootdir=%p,", req->rootdir );
1234
    fprintf( stderr, " name=" );
1235
    dump_varargs_unicode_str( cur_size );
1236 1237
}

1238
static void dump_open_mutex_reply( const struct open_mutex_reply *req )
1239
{
1240
    fprintf( stderr, " handle=%p", req->handle );
1241 1242
}

1243
static void dump_create_semaphore_request( const struct create_semaphore_request *req )
Alexandre Julliard's avatar
Alexandre Julliard committed
1244
{
1245
    fprintf( stderr, " access=%08x,", req->access );
1246
    fprintf( stderr, " attributes=%08x,", req->attributes );
1247 1248
    fprintf( stderr, " initial=%08x,", req->initial );
    fprintf( stderr, " max=%08x,", req->max );
1249 1250
    fprintf( stderr, " objattr=" );
    dump_varargs_object_attributes( cur_size );
Alexandre Julliard's avatar
Alexandre Julliard committed
1251 1252
}

1253
static void dump_create_semaphore_reply( const struct create_semaphore_reply *req )
Alexandre Julliard's avatar
Alexandre Julliard committed
1254
{
1255
    fprintf( stderr, " handle=%p", req->handle );
Alexandre Julliard's avatar
Alexandre Julliard committed
1256 1257
}

1258
static void dump_release_semaphore_request( const struct release_semaphore_request *req )
Alexandre Julliard's avatar
Alexandre Julliard committed
1259
{
1260
    fprintf( stderr, " handle=%p,", req->handle );
1261
    fprintf( stderr, " count=%08x", req->count );
Alexandre Julliard's avatar
Alexandre Julliard committed
1262 1263
}

1264
static void dump_release_semaphore_reply( const struct release_semaphore_reply *req )
Alexandre Julliard's avatar
Alexandre Julliard committed
1265
{
1266
    fprintf( stderr, " prev_count=%08x", req->prev_count );
Alexandre Julliard's avatar
Alexandre Julliard committed
1267 1268
}

1269
static void dump_open_semaphore_request( const struct open_semaphore_request *req )
Alexandre Julliard's avatar
Alexandre Julliard committed
1270
{
1271
    fprintf( stderr, " access=%08x,", req->access );
1272
    fprintf( stderr, " attributes=%08x,", req->attributes );
1273
    fprintf( stderr, " rootdir=%p,", req->rootdir );
1274
    fprintf( stderr, " name=" );
1275
    dump_varargs_unicode_str( cur_size );
1276 1277
}

1278
static void dump_open_semaphore_reply( const struct open_semaphore_reply *req )
1279
{
1280
    fprintf( stderr, " handle=%p", req->handle );
1281 1282
}

1283
static void dump_create_file_request( const struct create_file_request *req )
1284
{
1285
    fprintf( stderr, " access=%08x,", req->access );
1286
    fprintf( stderr, " attributes=%08x,", req->attributes );
1287 1288
    fprintf( stderr, " sharing=%08x,", req->sharing );
    fprintf( stderr, " create=%d,", req->create );
1289
    fprintf( stderr, " options=%08x,", req->options );
1290
    fprintf( stderr, " attrs=%08x,", req->attrs );
1291 1292 1293
    fprintf( stderr, " objattr=" );
    dump_varargs_object_attributes( cur_size );
    fputc( ',', stderr );
1294
    fprintf( stderr, " filename=" );
1295
    dump_varargs_string( cur_size );
1296 1297
}

1298
static void dump_create_file_reply( const struct create_file_reply *req )
1299
{
1300
    fprintf( stderr, " handle=%p", req->handle );
1301 1302
}

1303 1304 1305 1306 1307 1308
static void dump_open_file_object_request( const struct open_file_object_request *req )
{
    fprintf( stderr, " access=%08x,", req->access );
    fprintf( stderr, " attributes=%08x,", req->attributes );
    fprintf( stderr, " rootdir=%p,", req->rootdir );
    fprintf( stderr, " sharing=%08x,", req->sharing );
1309
    fprintf( stderr, " options=%08x,", req->options );
1310 1311 1312 1313 1314 1315 1316 1317 1318
    fprintf( stderr, " filename=" );
    dump_varargs_unicode_str( cur_size );
}

static void dump_open_file_object_reply( const struct open_file_object_reply *req )
{
    fprintf( stderr, " handle=%p", req->handle );
}

1319
static void dump_alloc_file_handle_request( const struct alloc_file_handle_request *req )
1320
{
1321
    fprintf( stderr, " access=%08x,", req->access );
1322
    fprintf( stderr, " attributes=%08x,", req->attributes );
1323
    fprintf( stderr, " fd=%d", req->fd );
Alexandre Julliard's avatar
Alexandre Julliard committed
1324 1325
}

1326
static void dump_alloc_file_handle_reply( const struct alloc_file_handle_reply *req )
Alexandre Julliard's avatar
Alexandre Julliard committed
1327
{
1328
    fprintf( stderr, " handle=%p", req->handle );
1329 1330
}

1331
static void dump_get_handle_fd_request( const struct get_handle_fd_request *req )
1332
{
1333
    fprintf( stderr, " handle=%p", req->handle );
1334 1335
}

1336
static void dump_get_handle_fd_reply( const struct get_handle_fd_reply *req )
1337
{
1338
    fprintf( stderr, " type=%d,", req->type );
1339 1340 1341
    fprintf( stderr, " removable=%d,", req->removable );
    fprintf( stderr, " access=%08x,", req->access );
    fprintf( stderr, " options=%08x", req->options );
1342 1343
}

1344
static void dump_flush_file_request( const struct flush_file_request *req )
1345
{
1346
    fprintf( stderr, " handle=%p", req->handle );
1347 1348
}

1349 1350 1351 1352 1353
static void dump_flush_file_reply( const struct flush_file_reply *req )
{
    fprintf( stderr, " event=%p", req->event );
}

1354
static void dump_lock_file_request( const struct lock_file_request *req )
1355
{
1356
    fprintf( stderr, " handle=%p,", req->handle );
1357 1358 1359 1360 1361 1362
    fprintf( stderr, " offset=" );
    dump_file_pos( &req->offset );
    fprintf( stderr, "," );
    fprintf( stderr, " count=" );
    dump_file_pos( &req->count );
    fprintf( stderr, "," );
1363 1364 1365 1366 1367 1368 1369 1370
    fprintf( stderr, " shared=%d,", req->shared );
    fprintf( stderr, " wait=%d", req->wait );
}

static void dump_lock_file_reply( const struct lock_file_reply *req )
{
    fprintf( stderr, " handle=%p,", req->handle );
    fprintf( stderr, " overlapped=%d", req->overlapped );
1371 1372
}

1373
static void dump_unlock_file_request( const struct unlock_file_request *req )
1374
{
1375
    fprintf( stderr, " handle=%p,", req->handle );
1376 1377 1378 1379 1380
    fprintf( stderr, " offset=" );
    dump_file_pos( &req->offset );
    fprintf( stderr, "," );
    fprintf( stderr, " count=" );
    dump_file_pos( &req->count );
1381 1382
}

1383
static void dump_create_socket_request( const struct create_socket_request *req )
1384 1385
{
    fprintf( stderr, " access=%08x,", req->access );
1386
    fprintf( stderr, " attributes=%08x,", req->attributes );
1387 1388
    fprintf( stderr, " family=%d,", req->family );
    fprintf( stderr, " type=%d,", req->type );
1389 1390
    fprintf( stderr, " protocol=%d,", req->protocol );
    fprintf( stderr, " flags=%08x", req->flags );
1391 1392
}

1393
static void dump_create_socket_reply( const struct create_socket_reply *req )
1394
{
1395
    fprintf( stderr, " handle=%p", req->handle );
1396 1397
}

1398
static void dump_accept_socket_request( const struct accept_socket_request *req )
1399
{
1400
    fprintf( stderr, " lhandle=%p,", req->lhandle );
1401
    fprintf( stderr, " access=%08x,", req->access );
1402
    fprintf( stderr, " attributes=%08x", req->attributes );
1403 1404
}

1405
static void dump_accept_socket_reply( const struct accept_socket_reply *req )
1406
{
1407
    fprintf( stderr, " handle=%p", req->handle );
1408 1409
}

1410
static void dump_set_socket_event_request( const struct set_socket_event_request *req )
1411
{
1412
    fprintf( stderr, " handle=%p,", req->handle );
1413
    fprintf( stderr, " mask=%08x,", req->mask );
1414 1415
    fprintf( stderr, " event=%p,", req->event );
    fprintf( stderr, " window=%p,", req->window );
1416
    fprintf( stderr, " msg=%08x", req->msg );
1417 1418
}

1419
static void dump_get_socket_event_request( const struct get_socket_event_request *req )
1420
{
1421
    fprintf( stderr, " handle=%p,", req->handle );
1422
    fprintf( stderr, " service=%d,", req->service );
1423
    fprintf( stderr, " c_event=%p", req->c_event );
1424 1425
}

1426
static void dump_get_socket_event_reply( const struct get_socket_event_reply *req )
1427 1428 1429 1430 1431
{
    fprintf( stderr, " mask=%08x,", req->mask );
    fprintf( stderr, " pmask=%08x,", req->pmask );
    fprintf( stderr, " state=%08x,", req->state );
    fprintf( stderr, " errors=" );
1432
    dump_varargs_ints( cur_size );
1433 1434
}

1435
static void dump_enable_socket_event_request( const struct enable_socket_event_request *req )
1436
{
1437
    fprintf( stderr, " handle=%p,", req->handle );
1438 1439 1440 1441 1442
    fprintf( stderr, " mask=%08x,", req->mask );
    fprintf( stderr, " sstate=%08x,", req->sstate );
    fprintf( stderr, " cstate=%08x", req->cstate );
}

1443 1444
static void dump_set_socket_deferred_request( const struct set_socket_deferred_request *req )
{
1445 1446
    fprintf( stderr, " handle=%p,", req->handle );
    fprintf( stderr, " deferred=%p", req->deferred );
1447 1448
}

1449
static void dump_alloc_console_request( const struct alloc_console_request *req )
1450
{
1451
    fprintf( stderr, " access=%08x,", req->access );
1452
    fprintf( stderr, " attributes=%08x,", req->attributes );
1453
    fprintf( stderr, " pid=%04x", req->pid );
1454 1455
}

1456
static void dump_alloc_console_reply( const struct alloc_console_reply *req )
1457
{
1458 1459
    fprintf( stderr, " handle_in=%p,", req->handle_in );
    fprintf( stderr, " event=%p", req->event );
1460 1461
}

1462
static void dump_free_console_request( const struct free_console_request *req )
1463 1464 1465
{
}

1466 1467
static void dump_get_console_renderer_events_request( const struct get_console_renderer_events_request *req )
{
1468
    fprintf( stderr, " handle=%p", req->handle );
1469 1470
}

1471
static void dump_get_console_renderer_events_reply( const struct get_console_renderer_events_reply *req )
1472 1473
{
    fprintf( stderr, " data=" );
1474
    dump_varargs_bytes( cur_size );
1475 1476
}

1477
static void dump_open_console_request( const struct open_console_request *req )
1478
{
1479
    fprintf( stderr, " from=%p,", req->from );
1480
    fprintf( stderr, " access=%08x,", req->access );
1481
    fprintf( stderr, " attributes=%08x,", req->attributes );
1482
    fprintf( stderr, " share=%d", req->share );
1483 1484
}

1485
static void dump_open_console_reply( const struct open_console_reply *req )
1486
{
1487
    fprintf( stderr, " handle=%p", req->handle );
1488 1489
}

1490 1491 1492 1493 1494 1495 1496 1497 1498
static void dump_get_console_wait_event_request( const struct get_console_wait_event_request *req )
{
}

static void dump_get_console_wait_event_reply( const struct get_console_wait_event_reply *req )
{
    fprintf( stderr, " handle=%p", req->handle );
}

1499
static void dump_get_console_mode_request( const struct get_console_mode_request *req )
1500
{
1501
    fprintf( stderr, " handle=%p", req->handle );
1502 1503
}

1504
static void dump_get_console_mode_reply( const struct get_console_mode_reply *req )
1505 1506 1507 1508
{
    fprintf( stderr, " mode=%d", req->mode );
}

1509
static void dump_set_console_mode_request( const struct set_console_mode_request *req )
1510
{
1511
    fprintf( stderr, " handle=%p,", req->handle );
1512 1513 1514
    fprintf( stderr, " mode=%d", req->mode );
}

1515 1516
static void dump_set_console_input_info_request( const struct set_console_input_info_request *req )
{
1517
    fprintf( stderr, " handle=%p,", req->handle );
1518
    fprintf( stderr, " mask=%d,", req->mask );
1519
    fprintf( stderr, " active_sb=%p,", req->active_sb );
1520 1521
    fprintf( stderr, " history_mode=%d,", req->history_mode );
    fprintf( stderr, " history_size=%d,", req->history_size );
1522
    fprintf( stderr, " edition_mode=%d,", req->edition_mode );
1523 1524
    fprintf( stderr, " input_cp=%d,", req->input_cp );
    fprintf( stderr, " output_cp=%d,", req->output_cp );
1525
    fprintf( stderr, " win=%p,", req->win );
1526
    fprintf( stderr, " title=" );
1527
    dump_varargs_unicode_str( cur_size );
1528 1529 1530 1531
}

static void dump_get_console_input_info_request( const struct get_console_input_info_request *req )
{
1532
    fprintf( stderr, " handle=%p", req->handle );
1533 1534
}

1535
static void dump_get_console_input_info_reply( const struct get_console_input_info_reply *req )
1536 1537 1538 1539
{
    fprintf( stderr, " history_mode=%d,", req->history_mode );
    fprintf( stderr, " history_size=%d,", req->history_size );
    fprintf( stderr, " history_index=%d,", req->history_index );
1540
    fprintf( stderr, " edition_mode=%d,", req->edition_mode );
1541 1542
    fprintf( stderr, " input_cp=%d,", req->input_cp );
    fprintf( stderr, " output_cp=%d,", req->output_cp );
1543
    fprintf( stderr, " win=%p,", req->win );
1544
    fprintf( stderr, " title=" );
1545
    dump_varargs_unicode_str( cur_size );
1546 1547 1548 1549
}

static void dump_append_console_input_history_request( const struct append_console_input_history_request *req )
{
1550
    fprintf( stderr, " handle=%p,", req->handle );
1551
    fprintf( stderr, " line=" );
1552
    dump_varargs_unicode_str( cur_size );
1553 1554 1555 1556
}

static void dump_get_console_input_history_request( const struct get_console_input_history_request *req )
{
1557
    fprintf( stderr, " handle=%p,", req->handle );
1558 1559 1560
    fprintf( stderr, " index=%d", req->index );
}

1561
static void dump_get_console_input_history_reply( const struct get_console_input_history_reply *req )
1562
{
1563
    fprintf( stderr, " total=%d,", req->total );
1564
    fprintf( stderr, " line=" );
1565
    dump_varargs_unicode_str( cur_size );
1566 1567 1568 1569
}

static void dump_create_console_output_request( const struct create_console_output_request *req )
{
1570
    fprintf( stderr, " handle_in=%p,", req->handle_in );
1571 1572 1573
    fprintf( stderr, " access=%08x,", req->access );
    fprintf( stderr, " attributes=%08x,", req->attributes );
    fprintf( stderr, " share=%08x", req->share );
1574 1575
}

1576
static void dump_create_console_output_reply( const struct create_console_output_reply *req )
1577
{
1578
    fprintf( stderr, " handle_out=%p", req->handle_out );
1579 1580 1581
}

static void dump_set_console_output_info_request( const struct set_console_output_info_request *req )
1582
{
1583
    fprintf( stderr, " handle=%p,", req->handle );
1584 1585 1586
    fprintf( stderr, " mask=%d,", req->mask );
    fprintf( stderr, " cursor_size=%d,", req->cursor_size );
    fprintf( stderr, " cursor_visible=%d,", req->cursor_visible );
1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597
    fprintf( stderr, " cursor_x=%d,", req->cursor_x );
    fprintf( stderr, " cursor_y=%d,", req->cursor_y );
    fprintf( stderr, " width=%d,", req->width );
    fprintf( stderr, " height=%d,", req->height );
    fprintf( stderr, " attr=%d,", req->attr );
    fprintf( stderr, " win_left=%d,", req->win_left );
    fprintf( stderr, " win_top=%d,", req->win_top );
    fprintf( stderr, " win_right=%d,", req->win_right );
    fprintf( stderr, " win_bottom=%d,", req->win_bottom );
    fprintf( stderr, " max_width=%d,", req->max_width );
    fprintf( stderr, " max_height=%d", req->max_height );
1598 1599
}

1600
static void dump_get_console_output_info_request( const struct get_console_output_info_request *req )
1601
{
1602
    fprintf( stderr, " handle=%p", req->handle );
1603 1604
}

1605
static void dump_get_console_output_info_reply( const struct get_console_output_info_reply *req )
1606 1607 1608
{
    fprintf( stderr, " cursor_size=%d,", req->cursor_size );
    fprintf( stderr, " cursor_visible=%d,", req->cursor_visible );
1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619
    fprintf( stderr, " cursor_x=%d,", req->cursor_x );
    fprintf( stderr, " cursor_y=%d,", req->cursor_y );
    fprintf( stderr, " width=%d,", req->width );
    fprintf( stderr, " height=%d,", req->height );
    fprintf( stderr, " attr=%d,", req->attr );
    fprintf( stderr, " win_left=%d,", req->win_left );
    fprintf( stderr, " win_top=%d,", req->win_top );
    fprintf( stderr, " win_right=%d,", req->win_right );
    fprintf( stderr, " win_bottom=%d,", req->win_bottom );
    fprintf( stderr, " max_width=%d,", req->max_width );
    fprintf( stderr, " max_height=%d", req->max_height );
1620 1621
}

1622
static void dump_write_console_input_request( const struct write_console_input_request *req )
1623
{
1624
    fprintf( stderr, " handle=%p,", req->handle );
1625
    fprintf( stderr, " rec=" );
1626
    dump_varargs_input_records( cur_size );
1627 1628
}

1629
static void dump_write_console_input_reply( const struct write_console_input_reply *req )
1630 1631 1632 1633
{
    fprintf( stderr, " written=%d", req->written );
}

1634
static void dump_read_console_input_request( const struct read_console_input_request *req )
1635
{
1636
    fprintf( stderr, " handle=%p,", req->handle );
1637 1638 1639
    fprintf( stderr, " flush=%d", req->flush );
}

1640
static void dump_read_console_input_reply( const struct read_console_input_reply *req )
1641
{
1642 1643
    fprintf( stderr, " read=%d,", req->read );
    fprintf( stderr, " rec=" );
1644
    dump_varargs_input_records( cur_size );
1645 1646
}

1647 1648
static void dump_write_console_output_request( const struct write_console_output_request *req )
{
1649
    fprintf( stderr, " handle=%p,", req->handle );
1650 1651
    fprintf( stderr, " x=%d,", req->x );
    fprintf( stderr, " y=%d,", req->y );
1652
    fprintf( stderr, " mode=%d,", req->mode );
1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666
    fprintf( stderr, " wrap=%d,", req->wrap );
    fprintf( stderr, " data=" );
    dump_varargs_bytes( cur_size );
}

static void dump_write_console_output_reply( const struct write_console_output_reply *req )
{
    fprintf( stderr, " written=%d,", req->written );
    fprintf( stderr, " width=%d,", req->width );
    fprintf( stderr, " height=%d", req->height );
}

static void dump_fill_console_output_request( const struct fill_console_output_request *req )
{
1667
    fprintf( stderr, " handle=%p,", req->handle );
1668 1669
    fprintf( stderr, " x=%d,", req->x );
    fprintf( stderr, " y=%d,", req->y );
1670 1671 1672
    fprintf( stderr, " mode=%d,", req->mode );
    fprintf( stderr, " count=%d,", req->count );
    fprintf( stderr, " wrap=%d,", req->wrap );
1673
    fprintf( stderr, " data=" );
1674
    dump_char_info( &req->data );
1675 1676
}

1677
static void dump_fill_console_output_reply( const struct fill_console_output_reply *req )
1678 1679 1680 1681 1682 1683
{
    fprintf( stderr, " written=%d", req->written );
}

static void dump_read_console_output_request( const struct read_console_output_request *req )
{
1684
    fprintf( stderr, " handle=%p,", req->handle );
1685 1686
    fprintf( stderr, " x=%d,", req->x );
    fprintf( stderr, " y=%d,", req->y );
1687 1688
    fprintf( stderr, " mode=%d,", req->mode );
    fprintf( stderr, " wrap=%d", req->wrap );
1689 1690
}

1691
static void dump_read_console_output_reply( const struct read_console_output_reply *req )
1692
{
1693 1694
    fprintf( stderr, " width=%d,", req->width );
    fprintf( stderr, " height=%d,", req->height );
1695
    fprintf( stderr, " data=" );
1696
    dump_varargs_bytes( cur_size );
1697 1698 1699 1700
}

static void dump_move_console_output_request( const struct move_console_output_request *req )
{
1701
    fprintf( stderr, " handle=%p,", req->handle );
1702 1703 1704 1705 1706 1707 1708 1709
    fprintf( stderr, " x_src=%d,", req->x_src );
    fprintf( stderr, " y_src=%d,", req->y_src );
    fprintf( stderr, " x_dst=%d,", req->x_dst );
    fprintf( stderr, " y_dst=%d,", req->y_dst );
    fprintf( stderr, " w=%d,", req->w );
    fprintf( stderr, " h=%d", req->h );
}

1710 1711 1712
static void dump_send_console_signal_request( const struct send_console_signal_request *req )
{
    fprintf( stderr, " signal=%d,", req->signal );
1713
    fprintf( stderr, " group_id=%04x", req->group_id );
1714 1715
}

1716
static void dump_read_directory_changes_request( const struct read_directory_changes_request *req )
1717
{
1718
    fprintf( stderr, " filter=%08x,", req->filter );
1719
    fprintf( stderr, " handle=%p,", req->handle );
1720
    fprintf( stderr, " subtree=%d,", req->subtree );
1721
    fprintf( stderr, " want_data=%d,", req->want_data );
1722 1723
    fprintf( stderr, " async=" );
    dump_async_data( &req->async );
1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735
}

static void dump_read_change_request( const struct read_change_request *req )
{
    fprintf( stderr, " handle=%p", req->handle );
}

static void dump_read_change_reply( const struct read_change_reply *req )
{
    fprintf( stderr, " action=%d,", req->action );
    fprintf( stderr, " name=" );
    dump_varargs_string( cur_size );
1736 1737
}

1738
static void dump_create_mapping_request( const struct create_mapping_request *req )
1739
{
1740 1741
    fprintf( stderr, " access=%08x,", req->access );
    fprintf( stderr, " attributes=%08x,", req->attributes );
1742 1743 1744
    fprintf( stderr, " size=" );
    dump_file_pos( &req->size );
    fprintf( stderr, "," );
1745
    fprintf( stderr, " protect=%d,", req->protect );
1746
    fprintf( stderr, " file_handle=%p,", req->file_handle );
1747 1748
    fprintf( stderr, " objattr=" );
    dump_varargs_object_attributes( cur_size );
1749 1750
}

1751
static void dump_create_mapping_reply( const struct create_mapping_reply *req )
1752
{
1753
    fprintf( stderr, " handle=%p", req->handle );
1754 1755
}

1756
static void dump_open_mapping_request( const struct open_mapping_request *req )
1757 1758
{
    fprintf( stderr, " access=%08x,", req->access );
1759
    fprintf( stderr, " attributes=%08x,", req->attributes );
1760
    fprintf( stderr, " rootdir=%p,", req->rootdir );
1761
    fprintf( stderr, " name=" );
1762
    dump_varargs_unicode_str( cur_size );
1763 1764
}

1765
static void dump_open_mapping_reply( const struct open_mapping_reply *req )
1766
{
1767
    fprintf( stderr, " handle=%p", req->handle );
1768 1769
}

1770
static void dump_get_mapping_info_request( const struct get_mapping_info_request *req )
1771
{
1772
    fprintf( stderr, " handle=%p", req->handle );
1773 1774
}

1775
static void dump_get_mapping_info_reply( const struct get_mapping_info_reply *req )
1776
{
1777 1778 1779
    fprintf( stderr, " size=" );
    dump_file_pos( &req->size );
    fprintf( stderr, "," );
1780 1781 1782
    fprintf( stderr, " protect=%d,", req->protect );
    fprintf( stderr, " header_size=%d,", req->header_size );
    fprintf( stderr, " base=%p,", req->base );
1783
    fprintf( stderr, " mapping=%p,", req->mapping );
1784
    fprintf( stderr, " shared_file=%p", req->shared_file );
1785 1786
}

1787
static void dump_create_snapshot_request( const struct create_snapshot_request *req )
1788
{
1789
    fprintf( stderr, " attributes=%08x,", req->attributes );
1790
    fprintf( stderr, " flags=%d,", req->flags );
1791
    fprintf( stderr, " pid=%04x", req->pid );
1792 1793
}

1794
static void dump_create_snapshot_reply( const struct create_snapshot_reply *req )
1795
{
1796
    fprintf( stderr, " handle=%p", req->handle );
1797 1798
}

1799
static void dump_next_process_request( const struct next_process_request *req )
1800
{
1801
    fprintf( stderr, " handle=%p,", req->handle );
1802 1803 1804
    fprintf( stderr, " reset=%d", req->reset );
}

1805
static void dump_next_process_reply( const struct next_process_reply *req )
1806
{
1807
    fprintf( stderr, " count=%d,", req->count );
1808 1809
    fprintf( stderr, " pid=%04x,", req->pid );
    fprintf( stderr, " ppid=%04x,", req->ppid );
1810 1811
    fprintf( stderr, " heap=%p,", req->heap );
    fprintf( stderr, " module=%p,", req->module );
1812
    fprintf( stderr, " threads=%d,", req->threads );
1813
    fprintf( stderr, " priority=%d,", req->priority );
1814
    fprintf( stderr, " handles=%d,", req->handles );
1815
    fprintf( stderr, " filename=" );
1816
    dump_varargs_unicode_str( cur_size );
1817 1818
}

1819 1820
static void dump_next_thread_request( const struct next_thread_request *req )
{
1821
    fprintf( stderr, " handle=%p,", req->handle );
1822 1823 1824
    fprintf( stderr, " reset=%d", req->reset );
}

1825
static void dump_next_thread_reply( const struct next_thread_reply *req )
1826 1827
{
    fprintf( stderr, " count=%d,", req->count );
1828 1829
    fprintf( stderr, " pid=%04x,", req->pid );
    fprintf( stderr, " tid=%04x,", req->tid );
1830 1831 1832 1833 1834 1835
    fprintf( stderr, " base_pri=%d,", req->base_pri );
    fprintf( stderr, " delta_pri=%d", req->delta_pri );
}

static void dump_next_module_request( const struct next_module_request *req )
{
1836
    fprintf( stderr, " handle=%p,", req->handle );
1837 1838 1839
    fprintf( stderr, " reset=%d", req->reset );
}

1840
static void dump_next_module_reply( const struct next_module_reply *req )
1841
{
1842
    fprintf( stderr, " pid=%04x,", req->pid );
1843
    fprintf( stderr, " base=%p,", req->base );
1844
    fprintf( stderr, " size=%lu,", (unsigned long)req->size );
1845
    fprintf( stderr, " filename=" );
1846
    dump_varargs_unicode_str( cur_size );
1847 1848
}

1849
static void dump_wait_debug_event_request( const struct wait_debug_event_request *req )
1850
{
1851
    fprintf( stderr, " get_handle=%d", req->get_handle );
1852 1853
}

1854
static void dump_wait_debug_event_reply( const struct wait_debug_event_reply *req )
1855
{
1856 1857
    fprintf( stderr, " pid=%04x,", req->pid );
    fprintf( stderr, " tid=%04x,", req->tid );
1858
    fprintf( stderr, " wait=%p,", req->wait );
1859
    fprintf( stderr, " event=" );
1860
    dump_varargs_debug_event( cur_size );
1861 1862
}

1863
static void dump_queue_exception_event_request( const struct queue_exception_event_request *req )
1864
{
1865
    fprintf( stderr, " first=%d,", req->first );
1866
    fprintf( stderr, " record=" );
1867
    dump_varargs_exc_event( cur_size );
1868 1869
}

1870
static void dump_queue_exception_event_reply( const struct queue_exception_event_reply *req )
1871
{
1872
    fprintf( stderr, " handle=%p", req->handle );
1873 1874 1875 1876
}

static void dump_get_exception_status_request( const struct get_exception_status_request *req )
{
1877
    fprintf( stderr, " handle=%p", req->handle );
1878 1879
}

1880
static void dump_get_exception_status_reply( const struct get_exception_status_reply *req )
1881
{
1882
    fprintf( stderr, " context=" );
1883
    dump_varargs_context( cur_size );
1884 1885
}

1886 1887 1888 1889 1890 1891 1892
static void dump_output_debug_string_request( const struct output_debug_string_request *req )
{
    fprintf( stderr, " string=%p,", req->string );
    fprintf( stderr, " unicode=%d,", req->unicode );
    fprintf( stderr, " length=%d", req->length );
}

1893
static void dump_continue_debug_event_request( const struct continue_debug_event_request *req )
1894
{
1895 1896
    fprintf( stderr, " pid=%04x,", req->pid );
    fprintf( stderr, " tid=%04x,", req->tid );
1897 1898 1899
    fprintf( stderr, " status=%d", req->status );
}

1900
static void dump_debug_process_request( const struct debug_process_request *req )
1901
{
1902
    fprintf( stderr, " pid=%04x,", req->pid );
1903 1904 1905
    fprintf( stderr, " attach=%d", req->attach );
}

1906 1907
static void dump_debug_break_request( const struct debug_break_request *req )
{
1908
    fprintf( stderr, " handle=%p", req->handle );
1909 1910 1911 1912 1913 1914 1915
}

static void dump_debug_break_reply( const struct debug_break_reply *req )
{
    fprintf( stderr, " self=%d", req->self );
}

1916 1917 1918
static void dump_set_debugger_kill_on_exit_request( const struct set_debugger_kill_on_exit_request *req )
{
    fprintf( stderr, " kill_on_exit=%d", req->kill_on_exit );
1919
}
1920

1921
static void dump_read_process_memory_request( const struct read_process_memory_request *req )
1922
{
1923
    fprintf( stderr, " handle=%p,", req->handle );
1924
    fprintf( stderr, " addr=%p", req->addr );
1925 1926
}

1927
static void dump_read_process_memory_reply( const struct read_process_memory_reply *req )
1928 1929
{
    fprintf( stderr, " data=" );
1930
    dump_varargs_bytes( cur_size );
1931 1932
}

1933
static void dump_write_process_memory_request( const struct write_process_memory_request *req )
1934
{
1935
    fprintf( stderr, " handle=%p,", req->handle );
1936 1937
    fprintf( stderr, " addr=%p,", req->addr );
    fprintf( stderr, " data=" );
1938
    dump_varargs_bytes( cur_size );
1939 1940
}

1941
static void dump_create_key_request( const struct create_key_request *req )
1942
{
1943
    fprintf( stderr, " parent=%p,", req->parent );
1944
    fprintf( stderr, " access=%08x,", req->access );
1945
    fprintf( stderr, " attributes=%08x,", req->attributes );
1946
    fprintf( stderr, " options=%08x,", req->options );
1947
    fprintf( stderr, " modif=%ld,", (long)req->modif );
1948
    fprintf( stderr, " namelen=%u,", req->namelen );
1949
    fprintf( stderr, " name=" );
1950
    dump_varargs_unicode_str( min(cur_size,req->namelen) );
1951
    fputc( ',', stderr );
1952
    fprintf( stderr, " class=" );
1953
    dump_varargs_unicode_str( cur_size );
1954 1955
}

1956
static void dump_create_key_reply( const struct create_key_reply *req )
1957
{
1958
    fprintf( stderr, " hkey=%p,", req->hkey );
1959 1960 1961
    fprintf( stderr, " created=%d", req->created );
}

1962
static void dump_open_key_request( const struct open_key_request *req )
1963
{
1964
    fprintf( stderr, " parent=%p,", req->parent );
1965
    fprintf( stderr, " access=%08x,", req->access );
1966
    fprintf( stderr, " attributes=%08x,", req->attributes );
1967
    fprintf( stderr, " name=" );
1968
    dump_varargs_unicode_str( cur_size );
1969 1970
}

1971
static void dump_open_key_reply( const struct open_key_reply *req )
1972
{
1973
    fprintf( stderr, " hkey=%p", req->hkey );
1974 1975
}

1976
static void dump_delete_key_request( const struct delete_key_request *req )
1977
{
1978
    fprintf( stderr, " hkey=%p", req->hkey );
1979 1980
}

1981 1982 1983 1984 1985
static void dump_flush_key_request( const struct flush_key_request *req )
{
    fprintf( stderr, " hkey=%p", req->hkey );
}

1986
static void dump_enum_key_request( const struct enum_key_request *req )
1987
{
1988
    fprintf( stderr, " hkey=%p,", req->hkey );
1989
    fprintf( stderr, " index=%d,", req->index );
1990
    fprintf( stderr, " info_class=%d", req->info_class );
1991 1992
}

1993
static void dump_enum_key_reply( const struct enum_key_reply *req )
1994 1995 1996 1997 1998 1999 2000
{
    fprintf( stderr, " subkeys=%d,", req->subkeys );
    fprintf( stderr, " max_subkey=%d,", req->max_subkey );
    fprintf( stderr, " max_class=%d,", req->max_class );
    fprintf( stderr, " values=%d,", req->values );
    fprintf( stderr, " max_value=%d,", req->max_value );
    fprintf( stderr, " max_data=%d,", req->max_data );
2001
    fprintf( stderr, " modif=%ld,", (long)req->modif );
2002 2003
    fprintf( stderr, " total=%u,", req->total );
    fprintf( stderr, " namelen=%u,", req->namelen );
2004
    fprintf( stderr, " name=" );
2005
    dump_varargs_unicode_str( min(cur_size,req->namelen) );
2006
    fputc( ',', stderr );
2007
    fprintf( stderr, " class=" );
2008
    dump_varargs_unicode_str( cur_size );
2009 2010
}

2011
static void dump_set_key_value_request( const struct set_key_value_request *req )
2012
{
2013
    fprintf( stderr, " hkey=%p,", req->hkey );
2014
    fprintf( stderr, " type=%d,", req->type );
2015
    fprintf( stderr, " namelen=%u,", req->namelen );
2016
    fprintf( stderr, " name=" );
2017
    dump_varargs_unicode_str( min(cur_size,req->namelen) );
2018
    fputc( ',', stderr );
2019
    fprintf( stderr, " data=" );
2020
    dump_varargs_bytes( cur_size );
2021 2022
}

2023
static void dump_get_key_value_request( const struct get_key_value_request *req )
2024
{
2025
    fprintf( stderr, " hkey=%p,", req->hkey );
2026
    fprintf( stderr, " name=" );
2027
    dump_varargs_unicode_str( cur_size );
2028 2029
}

2030
static void dump_get_key_value_reply( const struct get_key_value_reply *req )
2031 2032
{
    fprintf( stderr, " type=%d,", req->type );
2033
    fprintf( stderr, " total=%u,", req->total );
2034
    fprintf( stderr, " data=" );
2035
    dump_varargs_bytes( cur_size );
2036 2037
}

2038
static void dump_enum_key_value_request( const struct enum_key_value_request *req )
2039
{
2040
    fprintf( stderr, " hkey=%p,", req->hkey );
2041
    fprintf( stderr, " index=%d,", req->index );
2042
    fprintf( stderr, " info_class=%d", req->info_class );
2043 2044
}

2045
static void dump_enum_key_value_reply( const struct enum_key_value_reply *req )
2046 2047
{
    fprintf( stderr, " type=%d,", req->type );
2048 2049
    fprintf( stderr, " total=%u,", req->total );
    fprintf( stderr, " namelen=%u,", req->namelen );
2050
    fprintf( stderr, " name=" );
2051
    dump_varargs_unicode_str( min(cur_size,req->namelen) );
2052
    fputc( ',', stderr );
2053
    fprintf( stderr, " data=" );
2054
    dump_varargs_bytes( cur_size );
2055 2056
}

2057
static void dump_delete_key_value_request( const struct delete_key_value_request *req )
2058
{
2059
    fprintf( stderr, " hkey=%p,", req->hkey );
2060
    fprintf( stderr, " name=" );
2061
    dump_varargs_unicode_str( cur_size );
2062 2063
}

2064
static void dump_load_registry_request( const struct load_registry_request *req )
2065
{
2066 2067
    fprintf( stderr, " hkey=%p,", req->hkey );
    fprintf( stderr, " file=%p,", req->file );
2068
    fprintf( stderr, " name=" );
2069
    dump_varargs_unicode_str( cur_size );
2070 2071
}

2072 2073 2074 2075 2076
static void dump_unload_registry_request( const struct unload_registry_request *req )
{
    fprintf( stderr, " hkey=%p", req->hkey );
}

2077
static void dump_save_registry_request( const struct save_registry_request *req )
2078
{
2079 2080
    fprintf( stderr, " hkey=%p,", req->hkey );
    fprintf( stderr, " file=%p", req->file );
2081 2082
}

2083 2084 2085 2086 2087 2088 2089 2090
static void dump_set_registry_notification_request( const struct set_registry_notification_request *req )
{
    fprintf( stderr, " hkey=%p,", req->hkey );
    fprintf( stderr, " event=%p,", req->event );
    fprintf( stderr, " subtree=%d,", req->subtree );
    fprintf( stderr, " filter=%08x", req->filter );
}

2091
static void dump_create_timer_request( const struct create_timer_request *req )
2092
{
2093
    fprintf( stderr, " access=%08x,", req->access );
2094
    fprintf( stderr, " attributes=%08x,", req->attributes );
2095
    fprintf( stderr, " rootdir=%p,", req->rootdir );
2096 2097
    fprintf( stderr, " manual=%d,", req->manual );
    fprintf( stderr, " name=" );
2098
    dump_varargs_unicode_str( cur_size );
2099 2100
}

2101
static void dump_create_timer_reply( const struct create_timer_reply *req )
2102
{
2103
    fprintf( stderr, " handle=%p", req->handle );
2104 2105
}

2106
static void dump_open_timer_request( const struct open_timer_request *req )
2107 2108
{
    fprintf( stderr, " access=%08x,", req->access );
2109
    fprintf( stderr, " attributes=%08x,", req->attributes );
2110
    fprintf( stderr, " rootdir=%p,", req->rootdir );
2111
    fprintf( stderr, " name=" );
2112
    dump_varargs_unicode_str( cur_size );
2113 2114
}

2115
static void dump_open_timer_reply( const struct open_timer_reply *req )
2116
{
2117
    fprintf( stderr, " handle=%p", req->handle );
2118 2119
}

2120
static void dump_set_timer_request( const struct set_timer_request *req )
2121
{
2122
    fprintf( stderr, " handle=%p,", req->handle );
2123
    fprintf( stderr, " expire=" );
2124
    dump_timeout( &req->expire );
2125
    fprintf( stderr, "," );
2126 2127 2128 2129 2130
    fprintf( stderr, " period=%d,", req->period );
    fprintf( stderr, " callback=%p,", req->callback );
    fprintf( stderr, " arg=%p", req->arg );
}

2131 2132 2133 2134 2135
static void dump_set_timer_reply( const struct set_timer_reply *req )
{
    fprintf( stderr, " signaled=%d", req->signaled );
}

2136
static void dump_cancel_timer_request( const struct cancel_timer_request *req )
2137
{
2138
    fprintf( stderr, " handle=%p", req->handle );
2139 2140
}

2141 2142 2143 2144 2145
static void dump_cancel_timer_reply( const struct cancel_timer_reply *req )
{
    fprintf( stderr, " signaled=%d", req->signaled );
}

2146 2147 2148 2149 2150 2151 2152 2153
static void dump_get_timer_info_request( const struct get_timer_info_request *req )
{
    fprintf( stderr, " handle=%p", req->handle );
}

static void dump_get_timer_info_reply( const struct get_timer_info_reply *req )
{
    fprintf( stderr, " when=" );
2154
    dump_timeout( &req->when );
2155 2156 2157 2158
    fprintf( stderr, "," );
    fprintf( stderr, " signaled=%d", req->signaled );
}

2159 2160
static void dump_get_thread_context_request( const struct get_thread_context_request *req )
{
2161
    fprintf( stderr, " handle=%p,", req->handle );
2162 2163
    fprintf( stderr, " flags=%08x,", req->flags );
    fprintf( stderr, " suspend=%d", req->suspend );
2164 2165
}

2166
static void dump_get_thread_context_reply( const struct get_thread_context_reply *req )
2167
{
2168
    fprintf( stderr, " self=%d,", req->self );
2169
    fprintf( stderr, " context=" );
2170
    dump_varargs_context( cur_size );
2171 2172 2173 2174
}

static void dump_set_thread_context_request( const struct set_thread_context_request *req )
{
2175
    fprintf( stderr, " handle=%p,", req->handle );
2176
    fprintf( stderr, " flags=%08x,", req->flags );
2177
    fprintf( stderr, " suspend=%d,", req->suspend );
2178
    fprintf( stderr, " context=" );
2179
    dump_varargs_context( cur_size );
2180 2181
}

2182 2183 2184 2185 2186
static void dump_set_thread_context_reply( const struct set_thread_context_reply *req )
{
    fprintf( stderr, " self=%d", req->self );
}

2187 2188
static void dump_get_selector_entry_request( const struct get_selector_entry_request *req )
{
2189
    fprintf( stderr, " handle=%p,", req->handle );
2190 2191 2192
    fprintf( stderr, " entry=%d", req->entry );
}

2193
static void dump_get_selector_entry_reply( const struct get_selector_entry_reply *req )
2194 2195 2196 2197 2198 2199
{
    fprintf( stderr, " base=%08x,", req->base );
    fprintf( stderr, " limit=%08x,", req->limit );
    fprintf( stderr, " flags=%02x", req->flags );
}

2200 2201
static void dump_add_atom_request( const struct add_atom_request *req )
{
2202
    fprintf( stderr, " table=%p,", req->table );
2203
    fprintf( stderr, " name=" );
2204
    dump_varargs_unicode_str( cur_size );
2205 2206
}

2207
static void dump_add_atom_reply( const struct add_atom_reply *req )
2208
{
2209
    fprintf( stderr, " atom=%04x", req->atom );
2210 2211 2212 2213
}

static void dump_delete_atom_request( const struct delete_atom_request *req )
{
2214 2215
    fprintf( stderr, " table=%p,", req->table );
    fprintf( stderr, " atom=%04x", req->atom );
2216 2217 2218 2219
}

static void dump_find_atom_request( const struct find_atom_request *req )
{
2220
    fprintf( stderr, " table=%p,", req->table );
2221
    fprintf( stderr, " name=" );
2222
    dump_varargs_unicode_str( cur_size );
2223 2224
}

2225
static void dump_find_atom_reply( const struct find_atom_reply *req )
2226
{
2227
    fprintf( stderr, " atom=%04x", req->atom );
2228 2229
}

2230
static void dump_get_atom_information_request( const struct get_atom_information_request *req )
2231
{
2232 2233
    fprintf( stderr, " table=%p,", req->table );
    fprintf( stderr, " atom=%04x", req->atom );
2234 2235
}

2236
static void dump_get_atom_information_reply( const struct get_atom_information_reply *req )
2237 2238
{
    fprintf( stderr, " count=%d,", req->count );
2239
    fprintf( stderr, " pinned=%d,", req->pinned );
2240
    fprintf( stderr, " total=%u,", req->total );
2241
    fprintf( stderr, " name=" );
2242
    dump_varargs_unicode_str( cur_size );
2243 2244
}

2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257
static void dump_set_atom_information_request( const struct set_atom_information_request *req )
{
    fprintf( stderr, " table=%p,", req->table );
    fprintf( stderr, " atom=%04x,", req->atom );
    fprintf( stderr, " pinned=%d", req->pinned );
}

static void dump_empty_atom_table_request( const struct empty_atom_table_request *req )
{
    fprintf( stderr, " table=%p,", req->table );
    fprintf( stderr, " if_pinned=%d", req->if_pinned );
}

2258 2259 2260 2261 2262
static void dump_init_atom_table_request( const struct init_atom_table_request *req )
{
    fprintf( stderr, " entries=%d", req->entries );
}

2263 2264 2265 2266 2267
static void dump_init_atom_table_reply( const struct init_atom_table_reply *req )
{
    fprintf( stderr, " table=%p", req->table );
}

2268 2269 2270 2271
static void dump_get_msg_queue_request( const struct get_msg_queue_request *req )
{
}

2272
static void dump_get_msg_queue_reply( const struct get_msg_queue_reply *req )
2273
{
2274
    fprintf( stderr, " handle=%p", req->handle );
2275 2276
}

2277 2278 2279 2280 2281
static void dump_set_queue_fd_request( const struct set_queue_fd_request *req )
{
    fprintf( stderr, " handle=%p", req->handle );
}

2282 2283 2284 2285 2286 2287 2288
static void dump_set_queue_mask_request( const struct set_queue_mask_request *req )
{
    fprintf( stderr, " wake_mask=%08x,", req->wake_mask );
    fprintf( stderr, " changed_mask=%08x,", req->changed_mask );
    fprintf( stderr, " skip_wait=%d", req->skip_wait );
}

2289
static void dump_set_queue_mask_reply( const struct set_queue_mask_reply *req )
2290 2291 2292 2293 2294 2295 2296 2297 2298 2299
{
    fprintf( stderr, " wake_bits=%08x,", req->wake_bits );
    fprintf( stderr, " changed_bits=%08x", req->changed_bits );
}

static void dump_get_queue_status_request( const struct get_queue_status_request *req )
{
    fprintf( stderr, " clear=%d", req->clear );
}

2300
static void dump_get_queue_status_reply( const struct get_queue_status_reply *req )
2301 2302 2303
{
    fprintf( stderr, " wake_bits=%08x,", req->wake_bits );
    fprintf( stderr, " changed_bits=%08x", req->changed_bits );
2304 2305
}

2306
static void dump_get_process_idle_event_request( const struct get_process_idle_event_request *req )
2307
{
2308
    fprintf( stderr, " handle=%p", req->handle );
2309 2310
}

2311
static void dump_get_process_idle_event_reply( const struct get_process_idle_event_reply *req )
2312
{
2313
    fprintf( stderr, " event=%p", req->event );
2314 2315
}

2316 2317
static void dump_send_message_request( const struct send_message_request *req )
{
2318
    fprintf( stderr, " id=%04x,", req->id );
2319
    fprintf( stderr, " type=%d,", req->type );
2320
    fprintf( stderr, " flags=%d,", req->flags );
2321
    fprintf( stderr, " win=%p,", req->win );
2322
    fprintf( stderr, " msg=%08x,", req->msg );
2323 2324
    fprintf( stderr, " wparam=%lx,", req->wparam );
    fprintf( stderr, " lparam=%lx,", req->lparam );
2325 2326 2327
    fprintf( stderr, " timeout=" );
    dump_timeout( &req->timeout );
    fprintf( stderr, "," );
2328
    fprintf( stderr, " data=" );
2329
    dump_varargs_message_data( cur_size );
2330 2331
}

2332 2333 2334 2335 2336
static void dump_post_quit_message_request( const struct post_quit_message_request *req )
{
    fprintf( stderr, " exit_code=%d", req->exit_code );
}

2337 2338 2339 2340 2341
static void dump_send_hardware_message_request( const struct send_hardware_message_request *req )
{
    fprintf( stderr, " id=%04x,", req->id );
    fprintf( stderr, " win=%p,", req->win );
    fprintf( stderr, " msg=%08x,", req->msg );
2342
    fprintf( stderr, " time=%08x,", req->time );
2343 2344
    fprintf( stderr, " wparam=%lx,", req->wparam );
    fprintf( stderr, " lparam=%lx,", req->lparam );
2345
    fprintf( stderr, " info=%lx,", req->info );
2346
    fprintf( stderr, " x=%d,", req->x );
2347
    fprintf( stderr, " y=%d", req->y );
2348 2349
}

2350 2351
static void dump_get_message_request( const struct get_message_request *req )
{
2352
    fprintf( stderr, " flags=%08x,", req->flags );
2353
    fprintf( stderr, " get_win=%p,", req->get_win );
2354
    fprintf( stderr, " get_first=%08x,", req->get_first );
2355
    fprintf( stderr, " get_last=%08x,", req->get_last );
2356 2357 2358
    fprintf( stderr, " hw_id=%08x,", req->hw_id );
    fprintf( stderr, " wake_mask=%08x,", req->wake_mask );
    fprintf( stderr, " changed_mask=%08x", req->changed_mask );
2359 2360
}

2361
static void dump_get_message_reply( const struct get_message_reply *req )
2362
{
2363
    fprintf( stderr, " win=%p,", req->win );
2364
    fprintf( stderr, " type=%d,", req->type );
2365
    fprintf( stderr, " msg=%08x,", req->msg );
2366 2367
    fprintf( stderr, " wparam=%lx,", req->wparam );
    fprintf( stderr, " lparam=%lx,", req->lparam );
2368
    fprintf( stderr, " info=%lx,", req->info );
2369 2370
    fprintf( stderr, " x=%d,", req->x );
    fprintf( stderr, " y=%d,", req->y );
2371
    fprintf( stderr, " time=%08x,", req->time );
2372
    fprintf( stderr, " hw_id=%08x,", req->hw_id );
2373
    fprintf( stderr, " active_hooks=%08x,", req->active_hooks );
2374
    fprintf( stderr, " total=%u,", req->total );
2375
    fprintf( stderr, " data=" );
2376
    dump_varargs_message_data( cur_size );
2377 2378 2379 2380
}

static void dump_reply_message_request( const struct reply_message_request *req )
{
2381
    fprintf( stderr, " result=%lx,", req->result );
2382 2383
    fprintf( stderr, " remove=%d,", req->remove );
    fprintf( stderr, " data=" );
2384
    dump_varargs_bytes( cur_size );
2385 2386
}

2387 2388
static void dump_accept_hardware_message_request( const struct accept_hardware_message_request *req )
{
2389
    fprintf( stderr, " hw_id=%08x,", req->hw_id );
2390 2391 2392 2393
    fprintf( stderr, " remove=%d,", req->remove );
    fprintf( stderr, " new_win=%p", req->new_win );
}

2394 2395 2396 2397 2398
static void dump_get_message_reply_request( const struct get_message_reply_request *req )
{
    fprintf( stderr, " cancel=%d", req->cancel );
}

2399
static void dump_get_message_reply_reply( const struct get_message_reply_reply *req )
2400
{
2401
    fprintf( stderr, " result=%lx,", req->result );
2402
    fprintf( stderr, " data=" );
2403
    dump_varargs_bytes( cur_size );
2404 2405 2406 2407
}

static void dump_set_win_timer_request( const struct set_win_timer_request *req )
{
2408
    fprintf( stderr, " win=%p,", req->win );
2409 2410
    fprintf( stderr, " msg=%08x,", req->msg );
    fprintf( stderr, " rate=%08x,", req->rate );
2411
    fprintf( stderr, " id=%lx,", req->id );
2412
    fprintf( stderr, " lparam=%lx", req->lparam );
2413 2414
}

2415 2416
static void dump_set_win_timer_reply( const struct set_win_timer_reply *req )
{
2417
    fprintf( stderr, " id=%lx", req->id );
2418 2419
}

2420 2421
static void dump_kill_win_timer_request( const struct kill_win_timer_request *req )
{
2422
    fprintf( stderr, " win=%p,", req->win );
2423
    fprintf( stderr, " msg=%08x,", req->msg );
2424
    fprintf( stderr, " id=%lx", req->id );
2425 2426
}

2427 2428 2429 2430 2431 2432 2433 2434 2435 2436
static void dump_is_window_hung_request( const struct is_window_hung_request *req )
{
    fprintf( stderr, " win=%p", req->win );
}

static void dump_is_window_hung_reply( const struct is_window_hung_reply *req )
{
    fprintf( stderr, " is_hung=%d", req->is_hung );
}

2437 2438
static void dump_get_serial_info_request( const struct get_serial_info_request *req )
{
2439
    fprintf( stderr, " handle=%p", req->handle );
2440 2441
}

2442
static void dump_get_serial_info_reply( const struct get_serial_info_reply *req )
2443 2444 2445 2446 2447 2448
{
    fprintf( stderr, " readinterval=%08x,", req->readinterval );
    fprintf( stderr, " readconst=%08x,", req->readconst );
    fprintf( stderr, " readmult=%08x,", req->readmult );
    fprintf( stderr, " writeconst=%08x,", req->writeconst );
    fprintf( stderr, " writemult=%08x,", req->writemult );
Eric Pouech's avatar
Eric Pouech committed
2449
    fprintf( stderr, " eventmask=%08x", req->eventmask );
2450 2451 2452 2453
}

static void dump_set_serial_info_request( const struct set_serial_info_request *req )
{
2454
    fprintf( stderr, " handle=%p,", req->handle );
2455 2456 2457 2458 2459 2460
    fprintf( stderr, " flags=%d,", req->flags );
    fprintf( stderr, " readinterval=%08x,", req->readinterval );
    fprintf( stderr, " readconst=%08x,", req->readconst );
    fprintf( stderr, " readmult=%08x,", req->readmult );
    fprintf( stderr, " writeconst=%08x,", req->writeconst );
    fprintf( stderr, " writemult=%08x,", req->writemult );
Eric Pouech's avatar
Eric Pouech committed
2461
    fprintf( stderr, " eventmask=%08x", req->eventmask );
2462 2463
}

2464
static void dump_register_async_request( const struct register_async_request *req )
2465
{
2466
    fprintf( stderr, " handle=%p,", req->handle );
2467
    fprintf( stderr, " type=%d,", req->type );
2468 2469 2470
    fprintf( stderr, " count=%d,", req->count );
    fprintf( stderr, " async=" );
    dump_async_data( &req->async );
2471 2472 2473 2474 2475
}

static void dump_cancel_async_request( const struct cancel_async_request *req )
{
    fprintf( stderr, " handle=%p", req->handle );
2476 2477
}

2478 2479 2480
static void dump_ioctl_request( const struct ioctl_request *req )
{
    fprintf( stderr, " handle=%p,", req->handle );
2481 2482 2483
    fprintf( stderr, " code=" );
    dump_ioctl_code( &req->code );
    fprintf( stderr, "," );
2484 2485 2486 2487 2488 2489 2490 2491 2492
    fprintf( stderr, " async=" );
    dump_async_data( &req->async );
    fprintf( stderr, "," );
    fprintf( stderr, " in_data=" );
    dump_varargs_bytes( cur_size );
}

static void dump_ioctl_reply( const struct ioctl_reply *req )
{
2493 2494
    fprintf( stderr, " wait=%p,", req->wait );
    fprintf( stderr, " options=%08x,", req->options );
2495 2496 2497 2498
    fprintf( stderr, " out_data=" );
    dump_varargs_bytes( cur_size );
}

2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510
static void dump_get_ioctl_result_request( const struct get_ioctl_result_request *req )
{
    fprintf( stderr, " handle=%p,", req->handle );
    fprintf( stderr, " user_arg=%p", req->user_arg );
}

static void dump_get_ioctl_result_reply( const struct get_ioctl_result_reply *req )
{
    fprintf( stderr, " out_data=" );
    dump_varargs_bytes( cur_size );
}

2511 2512
static void dump_create_named_pipe_request( const struct create_named_pipe_request *req )
{
2513
    fprintf( stderr, " access=%08x,", req->access );
2514
    fprintf( stderr, " attributes=%08x,", req->attributes );
2515
    fprintf( stderr, " rootdir=%p,", req->rootdir );
2516 2517
    fprintf( stderr, " options=%08x,", req->options );
    fprintf( stderr, " flags=%08x,", req->flags );
2518 2519 2520
    fprintf( stderr, " maxinstances=%08x,", req->maxinstances );
    fprintf( stderr, " outsize=%08x,", req->outsize );
    fprintf( stderr, " insize=%08x,", req->insize );
2521 2522 2523
    fprintf( stderr, " timeout=" );
    dump_timeout( &req->timeout );
    fprintf( stderr, "," );
2524 2525
    fprintf( stderr, " name=" );
    dump_varargs_unicode_str( cur_size );
2526 2527
}

2528
static void dump_create_named_pipe_reply( const struct create_named_pipe_reply *req )
2529
{
2530
    fprintf( stderr, " handle=%p", req->handle );
2531 2532
}

2533 2534
static void dump_get_named_pipe_info_request( const struct get_named_pipe_info_request *req )
{
2535
    fprintf( stderr, " handle=%p", req->handle );
2536 2537
}

2538
static void dump_get_named_pipe_info_reply( const struct get_named_pipe_info_reply *req )
2539 2540 2541
{
    fprintf( stderr, " flags=%08x,", req->flags );
    fprintf( stderr, " maxinstances=%08x,", req->maxinstances );
2542
    fprintf( stderr, " instances=%08x,", req->instances );
2543 2544 2545 2546
    fprintf( stderr, " outsize=%08x,", req->outsize );
    fprintf( stderr, " insize=%08x", req->insize );
}

2547 2548
static void dump_create_window_request( const struct create_window_request *req )
{
2549 2550
    fprintf( stderr, " parent=%p,", req->parent );
    fprintf( stderr, " owner=%p,", req->owner );
2551
    fprintf( stderr, " atom=%04x,", req->atom );
2552 2553 2554
    fprintf( stderr, " instance=%p,", req->instance );
    fprintf( stderr, " class=" );
    dump_varargs_unicode_str( cur_size );
2555 2556
}

2557
static void dump_create_window_reply( const struct create_window_reply *req )
2558
{
2559
    fprintf( stderr, " handle=%p,", req->handle );
2560 2561
    fprintf( stderr, " parent=%p,", req->parent );
    fprintf( stderr, " owner=%p,", req->owner );
2562 2563
    fprintf( stderr, " extra=%d,", req->extra );
    fprintf( stderr, " class_ptr=%p", req->class_ptr );
2564 2565 2566 2567
}

static void dump_destroy_window_request( const struct destroy_window_request *req )
{
2568
    fprintf( stderr, " handle=%p", req->handle );
2569 2570
}

2571 2572
static void dump_get_desktop_window_request( const struct get_desktop_window_request *req )
{
2573
    fprintf( stderr, " force=%d", req->force );
2574 2575 2576 2577
}

static void dump_get_desktop_window_reply( const struct get_desktop_window_reply *req )
{
2578 2579
    fprintf( stderr, " top_window=%p,", req->top_window );
    fprintf( stderr, " msg_window=%p", req->msg_window );
2580 2581
}

2582 2583
static void dump_set_window_owner_request( const struct set_window_owner_request *req )
{
2584 2585
    fprintf( stderr, " handle=%p,", req->handle );
    fprintf( stderr, " owner=%p", req->owner );
2586 2587
}

2588
static void dump_set_window_owner_reply( const struct set_window_owner_reply *req )
2589
{
2590 2591
    fprintf( stderr, " full_owner=%p,", req->full_owner );
    fprintf( stderr, " prev_owner=%p", req->prev_owner );
2592 2593
}

2594 2595
static void dump_get_window_info_request( const struct get_window_info_request *req )
{
2596
    fprintf( stderr, " handle=%p", req->handle );
2597 2598
}

2599
static void dump_get_window_info_reply( const struct get_window_info_reply *req )
2600
{
2601 2602
    fprintf( stderr, " full_handle=%p,", req->full_handle );
    fprintf( stderr, " last_active=%p,", req->last_active );
2603 2604
    fprintf( stderr, " pid=%04x,", req->pid );
    fprintf( stderr, " tid=%04x,", req->tid );
2605 2606
    fprintf( stderr, " atom=%04x,", req->atom );
    fprintf( stderr, " is_unicode=%d", req->is_unicode );
2607 2608 2609 2610 2611
}

static void dump_set_window_info_request( const struct set_window_info_request *req )
{
    fprintf( stderr, " flags=%08x,", req->flags );
2612
    fprintf( stderr, " handle=%p,", req->handle );
2613 2614 2615
    fprintf( stderr, " style=%08x,", req->style );
    fprintf( stderr, " ex_style=%08x,", req->ex_style );
    fprintf( stderr, " id=%08x,", req->id );
2616
    fprintf( stderr, " is_unicode=%d,", req->is_unicode );
2617
    fprintf( stderr, " instance=%p,", req->instance );
2618
    fprintf( stderr, " user_data=%lx,", req->user_data );
2619
    fprintf( stderr, " extra_offset=%d,", req->extra_offset );
2620
    fprintf( stderr, " extra_size=%u,", req->extra_size );
2621
    fprintf( stderr, " extra_value=%lx", req->extra_value );
2622 2623
}

2624
static void dump_set_window_info_reply( const struct set_window_info_reply *req )
2625 2626 2627 2628 2629
{
    fprintf( stderr, " old_style=%08x,", req->old_style );
    fprintf( stderr, " old_ex_style=%08x,", req->old_ex_style );
    fprintf( stderr, " old_id=%08x,", req->old_id );
    fprintf( stderr, " old_instance=%p,", req->old_instance );
2630
    fprintf( stderr, " old_user_data=%lx,", req->old_user_data );
2631
    fprintf( stderr, " old_extra_value=%lx", req->old_extra_value );
2632 2633
}

2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645
static void dump_set_parent_request( const struct set_parent_request *req )
{
    fprintf( stderr, " handle=%p,", req->handle );
    fprintf( stderr, " parent=%p", req->parent );
}

static void dump_set_parent_reply( const struct set_parent_reply *req )
{
    fprintf( stderr, " old_parent=%p,", req->old_parent );
    fprintf( stderr, " full_parent=%p", req->full_parent );
}

2646 2647
static void dump_get_window_parents_request( const struct get_window_parents_request *req )
{
2648
    fprintf( stderr, " handle=%p", req->handle );
2649 2650
}

2651
static void dump_get_window_parents_reply( const struct get_window_parents_reply *req )
2652 2653 2654
{
    fprintf( stderr, " count=%d,", req->count );
    fprintf( stderr, " parents=" );
2655
    dump_varargs_user_handles( cur_size );
2656 2657 2658 2659
}

static void dump_get_window_children_request( const struct get_window_children_request *req )
{
2660
    fprintf( stderr, " desktop=%p,", req->desktop );
2661
    fprintf( stderr, " parent=%p,", req->parent );
2662
    fprintf( stderr, " atom=%04x,", req->atom );
2663 2664 2665
    fprintf( stderr, " tid=%04x,", req->tid );
    fprintf( stderr, " class=" );
    dump_varargs_unicode_str( cur_size );
2666 2667
}

2668
static void dump_get_window_children_reply( const struct get_window_children_reply *req )
2669 2670
{
    fprintf( stderr, " count=%d,", req->count );
2671
    fprintf( stderr, " children=" );
2672
    dump_varargs_user_handles( cur_size );
2673 2674
}

2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688
static void dump_get_window_children_from_point_request( const struct get_window_children_from_point_request *req )
{
    fprintf( stderr, " parent=%p,", req->parent );
    fprintf( stderr, " x=%d,", req->x );
    fprintf( stderr, " y=%d", req->y );
}

static void dump_get_window_children_from_point_reply( const struct get_window_children_from_point_reply *req )
{
    fprintf( stderr, " count=%d,", req->count );
    fprintf( stderr, " children=" );
    dump_varargs_user_handles( cur_size );
}

2689 2690
static void dump_get_window_tree_request( const struct get_window_tree_request *req )
{
2691
    fprintf( stderr, " handle=%p", req->handle );
2692 2693
}

2694
static void dump_get_window_tree_reply( const struct get_window_tree_reply *req )
2695
{
2696 2697 2698 2699 2700 2701 2702 2703
    fprintf( stderr, " parent=%p,", req->parent );
    fprintf( stderr, " owner=%p,", req->owner );
    fprintf( stderr, " next_sibling=%p,", req->next_sibling );
    fprintf( stderr, " prev_sibling=%p,", req->prev_sibling );
    fprintf( stderr, " first_sibling=%p,", req->first_sibling );
    fprintf( stderr, " last_sibling=%p,", req->last_sibling );
    fprintf( stderr, " first_child=%p,", req->first_child );
    fprintf( stderr, " last_child=%p", req->last_child );
2704 2705
}

2706
static void dump_set_window_pos_request( const struct set_window_pos_request *req )
2707
{
2708
    fprintf( stderr, " flags=%08x,", req->flags );
2709
    fprintf( stderr, " handle=%p,", req->handle );
2710
    fprintf( stderr, " previous=%p,", req->previous );
2711
    fprintf( stderr, " window=" );
2712
    dump_rectangle( &req->window );
2713 2714
    fprintf( stderr, "," );
    fprintf( stderr, " client=" );
2715
    dump_rectangle( &req->client );
2716 2717 2718
    fprintf( stderr, "," );
    fprintf( stderr, " valid=" );
    dump_varargs_rectangles( cur_size );
2719 2720
}

2721 2722
static void dump_set_window_pos_reply( const struct set_window_pos_reply *req )
{
2723
    fprintf( stderr, " new_style=%08x,", req->new_style );
2724
    fprintf( stderr, " new_ex_style=%08x", req->new_ex_style );
2725 2726
}

2727 2728
static void dump_get_window_rectangles_request( const struct get_window_rectangles_request *req )
{
2729
    fprintf( stderr, " handle=%p", req->handle );
2730 2731
}

2732
static void dump_get_window_rectangles_reply( const struct get_window_rectangles_reply *req )
2733 2734
{
    fprintf( stderr, " window=" );
2735
    dump_rectangle( &req->window );
2736
    fprintf( stderr, "," );
2737 2738 2739
    fprintf( stderr, " visible=" );
    dump_rectangle( &req->visible );
    fprintf( stderr, "," );
2740
    fprintf( stderr, " client=" );
2741
    dump_rectangle( &req->client );
2742 2743
}

2744 2745
static void dump_get_window_text_request( const struct get_window_text_request *req )
{
2746
    fprintf( stderr, " handle=%p", req->handle );
2747 2748
}

2749
static void dump_get_window_text_reply( const struct get_window_text_reply *req )
2750 2751
{
    fprintf( stderr, " text=" );
2752
    dump_varargs_unicode_str( cur_size );
2753 2754 2755 2756
}

static void dump_set_window_text_request( const struct set_window_text_request *req )
{
2757
    fprintf( stderr, " handle=%p,", req->handle );
2758
    fprintf( stderr, " text=" );
2759
    dump_varargs_unicode_str( cur_size );
2760 2761
}

2762 2763
static void dump_get_windows_offset_request( const struct get_windows_offset_request *req )
{
2764 2765
    fprintf( stderr, " from=%p,", req->from );
    fprintf( stderr, " to=%p", req->to );
2766 2767
}

2768
static void dump_get_windows_offset_reply( const struct get_windows_offset_reply *req )
2769 2770 2771 2772 2773
{
    fprintf( stderr, " x=%d,", req->x );
    fprintf( stderr, " y=%d", req->y );
}

2774 2775 2776 2777 2778 2779 2780 2781
static void dump_get_visible_region_request( const struct get_visible_region_request *req )
{
    fprintf( stderr, " window=%p,", req->window );
    fprintf( stderr, " flags=%08x", req->flags );
}

static void dump_get_visible_region_reply( const struct get_visible_region_reply *req )
{
2782
    fprintf( stderr, " top_win=%p,", req->top_win );
2783 2784 2785 2786 2787 2788
    fprintf( stderr, " top_rect=" );
    dump_rectangle( &req->top_rect );
    fprintf( stderr, "," );
    fprintf( stderr, " win_rect=" );
    dump_rectangle( &req->win_rect );
    fprintf( stderr, "," );
2789
    fprintf( stderr, " total_size=%u,", req->total_size );
2790 2791 2792 2793
    fprintf( stderr, " region=" );
    dump_varargs_rectangles( cur_size );
}

2794 2795 2796 2797 2798 2799 2800
static void dump_get_window_region_request( const struct get_window_region_request *req )
{
    fprintf( stderr, " window=%p", req->window );
}

static void dump_get_window_region_reply( const struct get_window_region_reply *req )
{
2801
    fprintf( stderr, " total_size=%u,", req->total_size );
2802 2803 2804 2805 2806 2807 2808
    fprintf( stderr, " region=" );
    dump_varargs_rectangles( cur_size );
}

static void dump_set_window_region_request( const struct set_window_region_request *req )
{
    fprintf( stderr, " window=%p,", req->window );
2809
    fprintf( stderr, " redraw=%d,", req->redraw );
2810 2811 2812 2813
    fprintf( stderr, " region=" );
    dump_varargs_rectangles( cur_size );
}

2814 2815 2816
static void dump_get_update_region_request( const struct get_update_region_request *req )
{
    fprintf( stderr, " window=%p,", req->window );
2817
    fprintf( stderr, " from_child=%p,", req->from_child );
2818 2819 2820 2821 2822 2823 2824
    fprintf( stderr, " flags=%08x", req->flags );
}

static void dump_get_update_region_reply( const struct get_update_region_reply *req )
{
    fprintf( stderr, " child=%p,", req->child );
    fprintf( stderr, " flags=%08x,", req->flags );
2825
    fprintf( stderr, " total_size=%u,", req->total_size );
2826 2827 2828 2829
    fprintf( stderr, " region=" );
    dump_varargs_rectangles( cur_size );
}

2830 2831 2832 2833 2834 2835 2836
static void dump_update_window_zorder_request( const struct update_window_zorder_request *req )
{
    fprintf( stderr, " window=%p,", req->window );
    fprintf( stderr, " rect=" );
    dump_rectangle( &req->rect );
}

2837 2838 2839 2840 2841 2842 2843 2844
static void dump_redraw_window_request( const struct redraw_window_request *req )
{
    fprintf( stderr, " window=%p,", req->window );
    fprintf( stderr, " flags=%08x,", req->flags );
    fprintf( stderr, " region=" );
    dump_varargs_rectangles( cur_size );
}

2845 2846
static void dump_set_window_property_request( const struct set_window_property_request *req )
{
2847
    fprintf( stderr, " window=%p,", req->window );
2848
    fprintf( stderr, " atom=%04x,", req->atom );
2849 2850 2851
    fprintf( stderr, " handle=%p,", req->handle );
    fprintf( stderr, " name=" );
    dump_varargs_unicode_str( cur_size );
2852 2853 2854 2855
}

static void dump_remove_window_property_request( const struct remove_window_property_request *req )
{
2856
    fprintf( stderr, " window=%p,", req->window );
2857 2858 2859
    fprintf( stderr, " atom=%04x,", req->atom );
    fprintf( stderr, " name=" );
    dump_varargs_unicode_str( cur_size );
2860 2861
}

2862
static void dump_remove_window_property_reply( const struct remove_window_property_reply *req )
2863
{
2864
    fprintf( stderr, " handle=%p", req->handle );
2865 2866 2867 2868
}

static void dump_get_window_property_request( const struct get_window_property_request *req )
{
2869
    fprintf( stderr, " window=%p,", req->window );
2870 2871 2872
    fprintf( stderr, " atom=%04x,", req->atom );
    fprintf( stderr, " name=" );
    dump_varargs_unicode_str( cur_size );
2873 2874
}

2875
static void dump_get_window_property_reply( const struct get_window_property_reply *req )
2876
{
2877
    fprintf( stderr, " handle=%p", req->handle );
2878 2879 2880 2881
}

static void dump_get_window_properties_request( const struct get_window_properties_request *req )
{
2882
    fprintf( stderr, " window=%p", req->window );
2883 2884
}

2885
static void dump_get_window_properties_reply( const struct get_window_properties_reply *req )
2886
{
2887
    fprintf( stderr, " total=%d,", req->total );
2888
    fprintf( stderr, " props=" );
2889
    dump_varargs_properties( cur_size );
2890 2891
}

2892 2893 2894 2895
static void dump_create_winstation_request( const struct create_winstation_request *req )
{
    fprintf( stderr, " flags=%08x,", req->flags );
    fprintf( stderr, " access=%08x,", req->access );
2896
    fprintf( stderr, " attributes=%08x,", req->attributes );
2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908
    fprintf( stderr, " name=" );
    dump_varargs_unicode_str( cur_size );
}

static void dump_create_winstation_reply( const struct create_winstation_reply *req )
{
    fprintf( stderr, " handle=%p", req->handle );
}

static void dump_open_winstation_request( const struct open_winstation_request *req )
{
    fprintf( stderr, " access=%08x,", req->access );
2909
    fprintf( stderr, " attributes=%08x,", req->attributes );
2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937
    fprintf( stderr, " name=" );
    dump_varargs_unicode_str( cur_size );
}

static void dump_open_winstation_reply( const struct open_winstation_reply *req )
{
    fprintf( stderr, " handle=%p", req->handle );
}

static void dump_close_winstation_request( const struct close_winstation_request *req )
{
    fprintf( stderr, " handle=%p", req->handle );
}

static void dump_get_process_winstation_request( const struct get_process_winstation_request *req )
{
}

static void dump_get_process_winstation_reply( const struct get_process_winstation_reply *req )
{
    fprintf( stderr, " handle=%p", req->handle );
}

static void dump_set_process_winstation_request( const struct set_process_winstation_request *req )
{
    fprintf( stderr, " handle=%p", req->handle );
}

2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949
static void dump_enum_winstation_request( const struct enum_winstation_request *req )
{
    fprintf( stderr, " index=%08x", req->index );
}

static void dump_enum_winstation_reply( const struct enum_winstation_reply *req )
{
    fprintf( stderr, " next=%08x,", req->next );
    fprintf( stderr, " name=" );
    dump_varargs_unicode_str( cur_size );
}

2950 2951 2952 2953
static void dump_create_desktop_request( const struct create_desktop_request *req )
{
    fprintf( stderr, " flags=%08x,", req->flags );
    fprintf( stderr, " access=%08x,", req->access );
2954
    fprintf( stderr, " attributes=%08x,", req->attributes );
2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965
    fprintf( stderr, " name=" );
    dump_varargs_unicode_str( cur_size );
}

static void dump_create_desktop_reply( const struct create_desktop_reply *req )
{
    fprintf( stderr, " handle=%p", req->handle );
}

static void dump_open_desktop_request( const struct open_desktop_request *req )
{
2966
    fprintf( stderr, " winsta=%p,", req->winsta );
2967 2968
    fprintf( stderr, " flags=%08x,", req->flags );
    fprintf( stderr, " access=%08x,", req->access );
2969
    fprintf( stderr, " attributes=%08x,", req->attributes );
2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998
    fprintf( stderr, " name=" );
    dump_varargs_unicode_str( cur_size );
}

static void dump_open_desktop_reply( const struct open_desktop_reply *req )
{
    fprintf( stderr, " handle=%p", req->handle );
}

static void dump_close_desktop_request( const struct close_desktop_request *req )
{
    fprintf( stderr, " handle=%p", req->handle );
}

static void dump_get_thread_desktop_request( const struct get_thread_desktop_request *req )
{
    fprintf( stderr, " tid=%04x", req->tid );
}

static void dump_get_thread_desktop_reply( const struct get_thread_desktop_reply *req )
{
    fprintf( stderr, " handle=%p", req->handle );
}

static void dump_set_thread_desktop_request( const struct set_thread_desktop_request *req )
{
    fprintf( stderr, " handle=%p", req->handle );
}

2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011
static void dump_enum_desktop_request( const struct enum_desktop_request *req )
{
    fprintf( stderr, " winstation=%p,", req->winstation );
    fprintf( stderr, " index=%08x", req->index );
}

static void dump_enum_desktop_reply( const struct enum_desktop_reply *req )
{
    fprintf( stderr, " next=%08x,", req->next );
    fprintf( stderr, " name=" );
    dump_varargs_unicode_str( cur_size );
}

3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026
static void dump_set_user_object_info_request( const struct set_user_object_info_request *req )
{
    fprintf( stderr, " handle=%p,", req->handle );
    fprintf( stderr, " flags=%08x,", req->flags );
    fprintf( stderr, " obj_flags=%08x", req->obj_flags );
}

static void dump_set_user_object_info_reply( const struct set_user_object_info_reply *req )
{
    fprintf( stderr, " is_desktop=%d,", req->is_desktop );
    fprintf( stderr, " old_obj_flags=%08x,", req->old_obj_flags );
    fprintf( stderr, " name=" );
    dump_varargs_unicode_str( cur_size );
}

3027 3028
static void dump_attach_thread_input_request( const struct attach_thread_input_request *req )
{
3029 3030
    fprintf( stderr, " tid_from=%04x,", req->tid_from );
    fprintf( stderr, " tid_to=%04x,", req->tid_to );
3031 3032 3033 3034 3035
    fprintf( stderr, " attach=%d", req->attach );
}

static void dump_get_thread_input_request( const struct get_thread_input_request *req )
{
3036
    fprintf( stderr, " tid=%04x", req->tid );
3037 3038 3039 3040
}

static void dump_get_thread_input_reply( const struct get_thread_input_reply *req )
{
3041 3042 3043 3044 3045 3046 3047
    fprintf( stderr, " focus=%p,", req->focus );
    fprintf( stderr, " capture=%p,", req->capture );
    fprintf( stderr, " active=%p,", req->active );
    fprintf( stderr, " foreground=%p,", req->foreground );
    fprintf( stderr, " menu_owner=%p,", req->menu_owner );
    fprintf( stderr, " move_size=%p,", req->move_size );
    fprintf( stderr, " caret=%p,", req->caret );
3048 3049 3050 3051
    fprintf( stderr, " rect=" );
    dump_rectangle( &req->rect );
}

3052 3053 3054 3055 3056 3057 3058 3059 3060
static void dump_get_last_input_time_request( const struct get_last_input_time_request *req )
{
}

static void dump_get_last_input_time_reply( const struct get_last_input_time_reply *req )
{
    fprintf( stderr, " time=%08x", req->time );
}

3061 3062
static void dump_get_key_state_request( const struct get_key_state_request *req )
{
3063
    fprintf( stderr, " tid=%04x,", req->tid );
3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075
    fprintf( stderr, " key=%d", req->key );
}

static void dump_get_key_state_reply( const struct get_key_state_reply *req )
{
    fprintf( stderr, " state=%02x,", req->state );
    fprintf( stderr, " keystate=" );
    dump_varargs_bytes( cur_size );
}

static void dump_set_key_state_request( const struct set_key_state_request *req )
{
3076
    fprintf( stderr, " tid=%04x,", req->tid );
3077 3078 3079 3080
    fprintf( stderr, " keystate=" );
    dump_varargs_bytes( cur_size );
}

3081 3082
static void dump_set_foreground_window_request( const struct set_foreground_window_request *req )
{
3083
    fprintf( stderr, " handle=%p", req->handle );
3084 3085 3086 3087
}

static void dump_set_foreground_window_reply( const struct set_foreground_window_reply *req )
{
3088
    fprintf( stderr, " previous=%p,", req->previous );
3089 3090 3091 3092 3093 3094
    fprintf( stderr, " send_msg_old=%d,", req->send_msg_old );
    fprintf( stderr, " send_msg_new=%d", req->send_msg_new );
}

static void dump_set_focus_window_request( const struct set_focus_window_request *req )
{
3095
    fprintf( stderr, " handle=%p", req->handle );
3096 3097 3098 3099
}

static void dump_set_focus_window_reply( const struct set_focus_window_reply *req )
{
3100
    fprintf( stderr, " previous=%p", req->previous );
3101 3102 3103 3104
}

static void dump_set_active_window_request( const struct set_active_window_request *req )
{
3105
    fprintf( stderr, " handle=%p", req->handle );
3106 3107 3108 3109
}

static void dump_set_active_window_reply( const struct set_active_window_reply *req )
{
3110
    fprintf( stderr, " previous=%p", req->previous );
3111 3112
}

3113 3114
static void dump_set_capture_window_request( const struct set_capture_window_request *req )
{
3115
    fprintf( stderr, " handle=%p,", req->handle );
3116 3117 3118 3119 3120
    fprintf( stderr, " flags=%08x", req->flags );
}

static void dump_set_capture_window_reply( const struct set_capture_window_reply *req )
{
3121 3122
    fprintf( stderr, " previous=%p,", req->previous );
    fprintf( stderr, " full_handle=%p", req->full_handle );
3123 3124
}

3125 3126
static void dump_set_caret_window_request( const struct set_caret_window_request *req )
{
3127
    fprintf( stderr, " handle=%p,", req->handle );
3128 3129 3130 3131 3132 3133
    fprintf( stderr, " width=%d,", req->width );
    fprintf( stderr, " height=%d", req->height );
}

static void dump_set_caret_window_reply( const struct set_caret_window_reply *req )
{
3134
    fprintf( stderr, " previous=%p,", req->previous );
3135 3136 3137 3138 3139 3140 3141 3142 3143 3144
    fprintf( stderr, " old_rect=" );
    dump_rectangle( &req->old_rect );
    fprintf( stderr, "," );
    fprintf( stderr, " old_hide=%d,", req->old_hide );
    fprintf( stderr, " old_state=%d", req->old_state );
}

static void dump_set_caret_info_request( const struct set_caret_info_request *req )
{
    fprintf( stderr, " flags=%08x,", req->flags );
3145
    fprintf( stderr, " handle=%p,", req->handle );
3146 3147 3148 3149 3150 3151 3152 3153
    fprintf( stderr, " x=%d,", req->x );
    fprintf( stderr, " y=%d,", req->y );
    fprintf( stderr, " hide=%d,", req->hide );
    fprintf( stderr, " state=%d", req->state );
}

static void dump_set_caret_info_reply( const struct set_caret_info_reply *req )
{
3154
    fprintf( stderr, " full_handle=%p,", req->full_handle );
3155 3156 3157 3158 3159 3160 3161
    fprintf( stderr, " old_rect=" );
    dump_rectangle( &req->old_rect );
    fprintf( stderr, "," );
    fprintf( stderr, " old_hide=%d,", req->old_hide );
    fprintf( stderr, " old_state=%d", req->old_state );
}

3162 3163 3164
static void dump_set_hook_request( const struct set_hook_request *req )
{
    fprintf( stderr, " id=%d,", req->id );
3165
    fprintf( stderr, " pid=%04x,", req->pid );
3166
    fprintf( stderr, " tid=%04x,", req->tid );
3167 3168 3169
    fprintf( stderr, " event_min=%d,", req->event_min );
    fprintf( stderr, " event_max=%d,", req->event_max );
    fprintf( stderr, " flags=%d,", req->flags );
3170
    fprintf( stderr, " proc=%p,", req->proc );
3171 3172 3173
    fprintf( stderr, " unicode=%d,", req->unicode );
    fprintf( stderr, " module=" );
    dump_varargs_unicode_str( cur_size );
3174 3175 3176 3177
}

static void dump_set_hook_reply( const struct set_hook_reply *req )
{
3178 3179
    fprintf( stderr, " handle=%p,", req->handle );
    fprintf( stderr, " active_hooks=%08x", req->active_hooks );
3180 3181 3182 3183 3184 3185 3186 3187 3188
}

static void dump_remove_hook_request( const struct remove_hook_request *req )
{
    fprintf( stderr, " handle=%p,", req->handle );
    fprintf( stderr, " id=%d,", req->id );
    fprintf( stderr, " proc=%p", req->proc );
}

3189 3190 3191 3192 3193
static void dump_remove_hook_reply( const struct remove_hook_reply *req )
{
    fprintf( stderr, " active_hooks=%08x", req->active_hooks );
}

3194 3195
static void dump_start_hook_chain_request( const struct start_hook_chain_request *req )
{
3196 3197 3198 3199 3200
    fprintf( stderr, " id=%d,", req->id );
    fprintf( stderr, " event=%d,", req->event );
    fprintf( stderr, " window=%p,", req->window );
    fprintf( stderr, " object_id=%d,", req->object_id );
    fprintf( stderr, " child_id=%d", req->child_id );
3201 3202 3203 3204 3205
}

static void dump_start_hook_chain_reply( const struct start_hook_chain_reply *req )
{
    fprintf( stderr, " handle=%p,", req->handle );
3206 3207
    fprintf( stderr, " pid=%04x,", req->pid );
    fprintf( stderr, " tid=%04x,", req->tid );
3208
    fprintf( stderr, " proc=%p,", req->proc );
3209
    fprintf( stderr, " unicode=%d,", req->unicode );
3210
    fprintf( stderr, " active_hooks=%08x,", req->active_hooks );
3211 3212
    fprintf( stderr, " module=" );
    dump_varargs_unicode_str( cur_size );
3213 3214 3215 3216 3217 3218 3219
}

static void dump_finish_hook_chain_request( const struct finish_hook_chain_request *req )
{
    fprintf( stderr, " id=%d", req->id );
}

3220
static void dump_get_hook_info_request( const struct get_hook_info_request *req )
3221
{
3222
    fprintf( stderr, " handle=%p,", req->handle );
3223
    fprintf( stderr, " get_next=%d,", req->get_next );
3224 3225 3226 3227
    fprintf( stderr, " event=%d,", req->event );
    fprintf( stderr, " window=%p,", req->window );
    fprintf( stderr, " object_id=%d,", req->object_id );
    fprintf( stderr, " child_id=%d", req->child_id );
3228 3229
}

3230
static void dump_get_hook_info_reply( const struct get_hook_info_reply *req )
3231
{
3232
    fprintf( stderr, " handle=%p,", req->handle );
3233
    fprintf( stderr, " id=%d,", req->id );
3234 3235
    fprintf( stderr, " pid=%04x,", req->pid );
    fprintf( stderr, " tid=%04x,", req->tid );
3236
    fprintf( stderr, " proc=%p,", req->proc );
3237
    fprintf( stderr, " unicode=%d,", req->unicode );
3238 3239
    fprintf( stderr, " module=" );
    dump_varargs_unicode_str( cur_size );
3240 3241
}

3242 3243 3244 3245 3246 3247 3248
static void dump_create_class_request( const struct create_class_request *req )
{
    fprintf( stderr, " local=%d,", req->local );
    fprintf( stderr, " atom=%04x,", req->atom );
    fprintf( stderr, " style=%08x,", req->style );
    fprintf( stderr, " instance=%p,", req->instance );
    fprintf( stderr, " extra=%d,", req->extra );
3249
    fprintf( stderr, " win_extra=%d,", req->win_extra );
3250 3251 3252 3253 3254 3255 3256 3257
    fprintf( stderr, " client_ptr=%p,", req->client_ptr );
    fprintf( stderr, " name=" );
    dump_varargs_unicode_str( cur_size );
}

static void dump_create_class_reply( const struct create_class_reply *req )
{
    fprintf( stderr, " atom=%04x", req->atom );
3258 3259 3260 3261 3262
}

static void dump_destroy_class_request( const struct destroy_class_request *req )
{
    fprintf( stderr, " atom=%04x,", req->atom );
3263 3264 3265
    fprintf( stderr, " instance=%p,", req->instance );
    fprintf( stderr, " name=" );
    dump_varargs_unicode_str( cur_size );
3266 3267
}

3268 3269 3270 3271 3272
static void dump_destroy_class_reply( const struct destroy_class_reply *req )
{
    fprintf( stderr, " client_ptr=%p", req->client_ptr );
}

3273 3274 3275 3276 3277 3278 3279 3280 3281
static void dump_set_class_info_request( const struct set_class_info_request *req )
{
    fprintf( stderr, " window=%p,", req->window );
    fprintf( stderr, " flags=%08x,", req->flags );
    fprintf( stderr, " atom=%04x,", req->atom );
    fprintf( stderr, " style=%08x,", req->style );
    fprintf( stderr, " win_extra=%d,", req->win_extra );
    fprintf( stderr, " instance=%p,", req->instance );
    fprintf( stderr, " extra_offset=%d,", req->extra_offset );
3282
    fprintf( stderr, " extra_size=%u,", req->extra_size );
3283
    fprintf( stderr, " extra_value=%lx", req->extra_value );
3284 3285 3286 3287 3288 3289 3290 3291 3292
}

static void dump_set_class_info_reply( const struct set_class_info_reply *req )
{
    fprintf( stderr, " old_atom=%04x,", req->old_atom );
    fprintf( stderr, " old_style=%08x,", req->old_style );
    fprintf( stderr, " old_extra=%d,", req->old_extra );
    fprintf( stderr, " old_win_extra=%d,", req->old_win_extra );
    fprintf( stderr, " old_instance=%p,", req->old_instance );
3293
    fprintf( stderr, " old_extra_value=%lx", req->old_extra_value );
3294 3295
}

3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313
static void dump_set_clipboard_info_request( const struct set_clipboard_info_request *req )
{
    fprintf( stderr, " flags=%08x,", req->flags );
    fprintf( stderr, " clipboard=%p,", req->clipboard );
    fprintf( stderr, " owner=%p,", req->owner );
    fprintf( stderr, " viewer=%p,", req->viewer );
    fprintf( stderr, " seqno=%08x", req->seqno );
}

static void dump_set_clipboard_info_reply( const struct set_clipboard_info_reply *req )
{
    fprintf( stderr, " flags=%08x,", req->flags );
    fprintf( stderr, " old_clipboard=%p,", req->old_clipboard );
    fprintf( stderr, " old_owner=%p,", req->old_owner );
    fprintf( stderr, " old_viewer=%p,", req->old_viewer );
    fprintf( stderr, " seqno=%08x", req->seqno );
}

3314 3315 3316
static void dump_open_token_request( const struct open_token_request *req )
{
    fprintf( stderr, " handle=%p,", req->handle );
3317 3318
    fprintf( stderr, " access=%08x,", req->access );
    fprintf( stderr, " attributes=%08x,", req->attributes );
3319 3320 3321 3322 3323 3324 3325 3326
    fprintf( stderr, " flags=%08x", req->flags );
}

static void dump_open_token_reply( const struct open_token_reply *req )
{
    fprintf( stderr, " token=%p", req->token );
}

3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343
static void dump_set_global_windows_request( const struct set_global_windows_request *req )
{
    fprintf( stderr, " flags=%08x,", req->flags );
    fprintf( stderr, " shell_window=%p,", req->shell_window );
    fprintf( stderr, " shell_listview=%p,", req->shell_listview );
    fprintf( stderr, " progman_window=%p,", req->progman_window );
    fprintf( stderr, " taskman_window=%p", req->taskman_window );
}

static void dump_set_global_windows_reply( const struct set_global_windows_reply *req )
{
    fprintf( stderr, " old_shell_window=%p,", req->old_shell_window );
    fprintf( stderr, " old_shell_listview=%p,", req->old_shell_listview );
    fprintf( stderr, " old_progman_window=%p,", req->old_progman_window );
    fprintf( stderr, " old_taskman_window=%p", req->old_taskman_window );
}

3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371
static void dump_adjust_token_privileges_request( const struct adjust_token_privileges_request *req )
{
    fprintf( stderr, " handle=%p,", req->handle );
    fprintf( stderr, " disable_all=%d,", req->disable_all );
    fprintf( stderr, " get_modified_state=%d,", req->get_modified_state );
    fprintf( stderr, " privileges=" );
    dump_varargs_LUID_AND_ATTRIBUTES( cur_size );
}

static void dump_adjust_token_privileges_reply( const struct adjust_token_privileges_reply *req )
{
    fprintf( stderr, " len=%08x,", req->len );
    fprintf( stderr, " privileges=" );
    dump_varargs_LUID_AND_ATTRIBUTES( cur_size );
}

static void dump_get_token_privileges_request( const struct get_token_privileges_request *req )
{
    fprintf( stderr, " handle=%p", req->handle );
}

static void dump_get_token_privileges_reply( const struct get_token_privileges_reply *req )
{
    fprintf( stderr, " len=%08x,", req->len );
    fprintf( stderr, " privileges=" );
    dump_varargs_LUID_AND_ATTRIBUTES( cur_size );
}

3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386
static void dump_check_token_privileges_request( const struct check_token_privileges_request *req )
{
    fprintf( stderr, " handle=%p,", req->handle );
    fprintf( stderr, " all_required=%d,", req->all_required );
    fprintf( stderr, " privileges=" );
    dump_varargs_LUID_AND_ATTRIBUTES( cur_size );
}

static void dump_check_token_privileges_reply( const struct check_token_privileges_reply *req )
{
    fprintf( stderr, " has_privileges=%d,", req->has_privileges );
    fprintf( stderr, " privileges=" );
    dump_varargs_LUID_AND_ATTRIBUTES( cur_size );
}

3387 3388 3389 3390
static void dump_duplicate_token_request( const struct duplicate_token_request *req )
{
    fprintf( stderr, " handle=%p,", req->handle );
    fprintf( stderr, " access=%08x,", req->access );
3391
    fprintf( stderr, " attributes=%08x,", req->attributes );
3392 3393 3394 3395 3396 3397 3398 3399 3400
    fprintf( stderr, " primary=%d,", req->primary );
    fprintf( stderr, " impersonation_level=%d", req->impersonation_level );
}

static void dump_duplicate_token_reply( const struct duplicate_token_reply *req )
{
    fprintf( stderr, " new_handle=%p", req->new_handle );
}

3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421
static void dump_access_check_request( const struct access_check_request *req )
{
    fprintf( stderr, " handle=%p,", req->handle );
    fprintf( stderr, " desired_access=%08x,", req->desired_access );
    fprintf( stderr, " mapping_read=%08x,", req->mapping_read );
    fprintf( stderr, " mapping_write=%08x,", req->mapping_write );
    fprintf( stderr, " mapping_execute=%08x,", req->mapping_execute );
    fprintf( stderr, " mapping_all=%08x,", req->mapping_all );
    fprintf( stderr, " sd=" );
    dump_varargs_security_descriptor( cur_size );
}

static void dump_access_check_reply( const struct access_check_reply *req )
{
    fprintf( stderr, " access_granted=%08x,", req->access_granted );
    fprintf( stderr, " access_status=%08x,", req->access_status );
    fprintf( stderr, " privileges_len=%08x,", req->privileges_len );
    fprintf( stderr, " privileges=" );
    dump_varargs_LUID_AND_ATTRIBUTES( cur_size );
}

3422 3423 3424 3425 3426 3427 3428
static void dump_get_token_user_request( const struct get_token_user_request *req )
{
    fprintf( stderr, " handle=%p", req->handle );
}

static void dump_get_token_user_reply( const struct get_token_user_reply *req )
{
3429
    fprintf( stderr, " user_len=%u,", req->user_len );
3430 3431 3432 3433
    fprintf( stderr, " user=" );
    dump_varargs_SID( cur_size );
}

3434 3435 3436 3437 3438 3439 3440
static void dump_get_token_groups_request( const struct get_token_groups_request *req )
{
    fprintf( stderr, " handle=%p", req->handle );
}

static void dump_get_token_groups_reply( const struct get_token_groups_reply *req )
{
3441
    fprintf( stderr, " user_len=%u,", req->user_len );
3442 3443 3444 3445
    fprintf( stderr, " user=" );
    dump_varargs_token_groups( cur_size );
}

3446 3447 3448 3449 3450 3451 3452 3453
static void dump_set_security_object_request( const struct set_security_object_request *req )
{
    fprintf( stderr, " handle=%p,", req->handle );
    fprintf( stderr, " security_info=%08x,", req->security_info );
    fprintf( stderr, " sd=" );
    dump_varargs_security_descriptor( cur_size );
}

3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466
static void dump_get_security_object_request( const struct get_security_object_request *req )
{
    fprintf( stderr, " handle=%p,", req->handle );
    fprintf( stderr, " security_info=%08x", req->security_info );
}

static void dump_get_security_object_reply( const struct get_security_object_reply *req )
{
    fprintf( stderr, " sd_len=%08x,", req->sd_len );
    fprintf( stderr, " sd=" );
    dump_varargs_security_descriptor( cur_size );
}

Mike McCormack's avatar
Mike McCormack committed
3467 3468
static void dump_create_mailslot_request( const struct create_mailslot_request *req )
{
3469 3470
    fprintf( stderr, " access=%08x,", req->access );
    fprintf( stderr, " attributes=%08x,", req->attributes );
3471
    fprintf( stderr, " rootdir=%p,", req->rootdir );
Mike McCormack's avatar
Mike McCormack committed
3472
    fprintf( stderr, " max_msgsize=%08x,", req->max_msgsize );
3473 3474 3475
    fprintf( stderr, " read_timeout=" );
    dump_timeout( &req->read_timeout );
    fprintf( stderr, "," );
Mike McCormack's avatar
Mike McCormack committed
3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488
    fprintf( stderr, " name=" );
    dump_varargs_unicode_str( cur_size );
}

static void dump_create_mailslot_reply( const struct create_mailslot_reply *req )
{
    fprintf( stderr, " handle=%p", req->handle );
}

static void dump_set_mailslot_info_request( const struct set_mailslot_info_request *req )
{
    fprintf( stderr, " handle=%p,", req->handle );
    fprintf( stderr, " flags=%08x,", req->flags );
3489 3490
    fprintf( stderr, " read_timeout=" );
    dump_timeout( &req->read_timeout );
Mike McCormack's avatar
Mike McCormack committed
3491 3492 3493 3494 3495
}

static void dump_set_mailslot_info_reply( const struct set_mailslot_info_reply *req )
{
    fprintf( stderr, " max_msgsize=%08x,", req->max_msgsize );
3496 3497
    fprintf( stderr, " read_timeout=" );
    dump_timeout( &req->read_timeout );
Mike McCormack's avatar
Mike McCormack committed
3498 3499
}

3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527
static void dump_create_directory_request( const struct create_directory_request *req )
{
    fprintf( stderr, " access=%08x,", req->access );
    fprintf( stderr, " attributes=%08x,", req->attributes );
    fprintf( stderr, " rootdir=%p,", req->rootdir );
    fprintf( stderr, " directory_name=" );
    dump_varargs_unicode_str( cur_size );
}

static void dump_create_directory_reply( const struct create_directory_reply *req )
{
    fprintf( stderr, " handle=%p", req->handle );
}

static void dump_open_directory_request( const struct open_directory_request *req )
{
    fprintf( stderr, " access=%08x,", req->access );
    fprintf( stderr, " attributes=%08x,", req->attributes );
    fprintf( stderr, " rootdir=%p,", req->rootdir );
    fprintf( stderr, " directory_name=" );
    dump_varargs_unicode_str( cur_size );
}

static void dump_open_directory_reply( const struct open_directory_reply *req )
{
    fprintf( stderr, " handle=%p", req->handle );
}

3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543
static void dump_get_directory_entry_request( const struct get_directory_entry_request *req )
{
    fprintf( stderr, " handle=%p,", req->handle );
    fprintf( stderr, " index=%08x", req->index );
}

static void dump_get_directory_entry_reply( const struct get_directory_entry_reply *req )
{
    fprintf( stderr, " name_len=%lu,", (unsigned long)req->name_len );
    fprintf( stderr, " name=" );
    dump_varargs_unicode_str( min(cur_size,req->name_len) );
    fputc( ',', stderr );
    fprintf( stderr, " type=" );
    dump_varargs_unicode_str( cur_size );
}

3544 3545 3546 3547 3548
static void dump_create_symlink_request( const struct create_symlink_request *req )
{
    fprintf( stderr, " access=%08x,", req->access );
    fprintf( stderr, " attributes=%08x,", req->attributes );
    fprintf( stderr, " rootdir=%p,", req->rootdir );
3549
    fprintf( stderr, " name_len=%u,", req->name_len );
3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586
    fprintf( stderr, " name=" );
    dump_varargs_unicode_str( min(cur_size,req->name_len) );
    fputc( ',', stderr );
    fprintf( stderr, " target_name=" );
    dump_varargs_unicode_str( cur_size );
}

static void dump_create_symlink_reply( const struct create_symlink_reply *req )
{
    fprintf( stderr, " handle=%p", req->handle );
}

static void dump_open_symlink_request( const struct open_symlink_request *req )
{
    fprintf( stderr, " access=%08x,", req->access );
    fprintf( stderr, " attributes=%08x,", req->attributes );
    fprintf( stderr, " rootdir=%p,", req->rootdir );
    fprintf( stderr, " name=" );
    dump_varargs_unicode_str( cur_size );
}

static void dump_open_symlink_reply( const struct open_symlink_reply *req )
{
    fprintf( stderr, " handle=%p", req->handle );
}

static void dump_query_symlink_request( const struct query_symlink_request *req )
{
    fprintf( stderr, " handle=%p", req->handle );
}

static void dump_query_symlink_reply( const struct query_symlink_reply *req )
{
    fprintf( stderr, " target_name=" );
    dump_varargs_unicode_str( cur_size );
}

3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597
static void dump_get_object_info_request( const struct get_object_info_request *req )
{
    fprintf( stderr, " handle=%p", req->handle );
}

static void dump_get_object_info_reply( const struct get_object_info_reply *req )
{
    fprintf( stderr, " access=%08x,", req->access );
    fprintf( stderr, " ref_count=%08x", req->ref_count );
}

3598 3599 3600 3601 3602 3603 3604 3605 3606 3607
static void dump_get_token_impersonation_level_request( const struct get_token_impersonation_level_request *req )
{
    fprintf( stderr, " handle=%p", req->handle );
}

static void dump_get_token_impersonation_level_reply( const struct get_token_impersonation_level_reply *req )
{
    fprintf( stderr, " impersonation_level=%d", req->impersonation_level );
}

3608 3609 3610 3611 3612 3613 3614 3615 3616 3617
static void dump_allocate_locally_unique_id_request( const struct allocate_locally_unique_id_request *req )
{
}

static void dump_allocate_locally_unique_id_reply( const struct allocate_locally_unique_id_reply *req )
{
    fprintf( stderr, " luid=" );
    dump_luid( &req->luid );
}

3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649
static void dump_create_device_manager_request( const struct create_device_manager_request *req )
{
    fprintf( stderr, " access=%08x,", req->access );
    fprintf( stderr, " attributes=%08x", req->attributes );
}

static void dump_create_device_manager_reply( const struct create_device_manager_reply *req )
{
    fprintf( stderr, " handle=%p", req->handle );
}

static void dump_create_device_request( const struct create_device_request *req )
{
    fprintf( stderr, " access=%08x,", req->access );
    fprintf( stderr, " attributes=%08x,", req->attributes );
    fprintf( stderr, " rootdir=%p,", req->rootdir );
    fprintf( stderr, " manager=%p,", req->manager );
    fprintf( stderr, " user_ptr=%p,", req->user_ptr );
    fprintf( stderr, " name=" );
    dump_varargs_unicode_str( cur_size );
}

static void dump_create_device_reply( const struct create_device_reply *req )
{
    fprintf( stderr, " handle=%p", req->handle );
}

static void dump_delete_device_request( const struct delete_device_request *req )
{
    fprintf( stderr, " handle=%p", req->handle );
}

3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671
static void dump_get_next_device_request_request( const struct get_next_device_request_request *req )
{
    fprintf( stderr, " manager=%p,", req->manager );
    fprintf( stderr, " prev=%p,", req->prev );
    fprintf( stderr, " status=%08x,", req->status );
    fprintf( stderr, " prev_data=" );
    dump_varargs_bytes( cur_size );
}

static void dump_get_next_device_request_reply( const struct get_next_device_request_reply *req )
{
    fprintf( stderr, " next=%p,", req->next );
    fprintf( stderr, " code=" );
    dump_ioctl_code( &req->code );
    fprintf( stderr, "," );
    fprintf( stderr, " user_ptr=%p,", req->user_ptr );
    fprintf( stderr, " in_size=%u,", req->in_size );
    fprintf( stderr, " out_size=%u,", req->out_size );
    fprintf( stderr, " next_data=" );
    dump_varargs_bytes( cur_size );
}

3672 3673 3674 3675 3676 3677 3678 3679 3680
static void dump_make_process_system_request( const struct make_process_system_request *req )
{
}

static void dump_make_process_system_reply( const struct make_process_system_reply *req )
{
    fprintf( stderr, " event=%p", req->event );
}

3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699
static void dump_get_token_statistics_request( const struct get_token_statistics_request *req )
{
    fprintf( stderr, " handle=%p", req->handle );
}

static void dump_get_token_statistics_reply( const struct get_token_statistics_reply *req )
{
    fprintf( stderr, " token_id=" );
    dump_luid( &req->token_id );
    fprintf( stderr, "," );
    fprintf( stderr, " modified_id=" );
    dump_luid( &req->modified_id );
    fprintf( stderr, "," );
    fprintf( stderr, " primary=%d,", req->primary );
    fprintf( stderr, " impersonation_level=%d,", req->impersonation_level );
    fprintf( stderr, " group_count=%d,", req->group_count );
    fprintf( stderr, " privilege_count=%d", req->privilege_count );
}

3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760
static void dump_create_completion_request( const struct create_completion_request *req )
{
    fprintf( stderr, " access=%08x,", req->access );
    fprintf( stderr, " attributes=%08x,", req->attributes );
    fprintf( stderr, " concurrent=%08x,", req->concurrent );
    fprintf( stderr, " rootdir=%p,", req->rootdir );
    fprintf( stderr, " filename=" );
    dump_varargs_string( cur_size );
}

static void dump_create_completion_reply( const struct create_completion_reply *req )
{
    fprintf( stderr, " handle=%p", req->handle );
}

static void dump_open_completion_request( const struct open_completion_request *req )
{
    fprintf( stderr, " access=%08x,", req->access );
    fprintf( stderr, " attributes=%08x,", req->attributes );
    fprintf( stderr, " rootdir=%p,", req->rootdir );
    fprintf( stderr, " filename=" );
    dump_varargs_string( cur_size );
}

static void dump_open_completion_reply( const struct open_completion_reply *req )
{
    fprintf( stderr, " handle=%p", req->handle );
}

static void dump_add_completion_request( const struct add_completion_request *req )
{
    fprintf( stderr, " handle=%p,", req->handle );
    fprintf( stderr, " ckey=%lx,", req->ckey );
    fprintf( stderr, " cvalue=%lx,", req->cvalue );
    fprintf( stderr, " information=%lx,", req->information );
    fprintf( stderr, " status=%08x", req->status );
}

static void dump_remove_completion_request( const struct remove_completion_request *req )
{
    fprintf( stderr, " handle=%p", req->handle );
}

static void dump_remove_completion_reply( const struct remove_completion_reply *req )
{
    fprintf( stderr, " ckey=%lx,", req->ckey );
    fprintf( stderr, " cvalue=%lx,", req->cvalue );
    fprintf( stderr, " information=%lx,", req->information );
    fprintf( stderr, " status=%08x", req->status );
}

static void dump_query_completion_request( const struct query_completion_request *req )
{
    fprintf( stderr, " handle=%p", req->handle );
}

static void dump_query_completion_reply( const struct query_completion_reply *req )
{
    fprintf( stderr, " depth=%08x", req->depth );
}

3761 3762 3763 3764 3765 3766 3767
static void dump_set_completion_info_request( const struct set_completion_info_request *req )
{
    fprintf( stderr, " handle=%p,", req->handle );
    fprintf( stderr, " chandle=%p,", req->chandle );
    fprintf( stderr, " ckey=%lx", req->ckey );
}

3768 3769 3770 3771 3772 3773 3774 3775
static void dump_add_fd_completion_request( const struct add_fd_completion_request *req )
{
    fprintf( stderr, " handle=%p,", req->handle );
    fprintf( stderr, " cvalue=%lx,", req->cvalue );
    fprintf( stderr, " status=%08x,", req->status );
    fprintf( stderr, " information=%lx", req->information );
}

3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795
static void dump_get_window_layered_info_request( const struct get_window_layered_info_request *req )
{
    fprintf( stderr, " handle=%p", req->handle );
}

static void dump_get_window_layered_info_reply( const struct get_window_layered_info_reply *req )
{
    fprintf( stderr, " color_key=%08x,", req->color_key );
    fprintf( stderr, " alpha=%08x,", req->alpha );
    fprintf( stderr, " flags=%08x", req->flags );
}

static void dump_set_window_layered_info_request( const struct set_window_layered_info_request *req )
{
    fprintf( stderr, " handle=%p,", req->handle );
    fprintf( stderr, " color_key=%08x,", req->color_key );
    fprintf( stderr, " alpha=%08x,", req->alpha );
    fprintf( stderr, " flags=%08x", req->flags );
}

3796 3797
static const dump_func req_dumpers[REQ_NB_REQUESTS] = {
    (dump_func)dump_new_process_request,
3798
    (dump_func)dump_get_new_process_info_request,
3799
    (dump_func)dump_new_thread_request,
3800
    (dump_func)dump_get_startup_info_request,
3801
    (dump_func)dump_init_process_done_request,
3802 3803 3804 3805 3806 3807 3808
    (dump_func)dump_init_thread_request,
    (dump_func)dump_terminate_process_request,
    (dump_func)dump_terminate_thread_request,
    (dump_func)dump_get_process_info_request,
    (dump_func)dump_set_process_info_request,
    (dump_func)dump_get_thread_info_request,
    (dump_func)dump_set_thread_info_request,
3809
    (dump_func)dump_get_dll_info_request,
3810 3811
    (dump_func)dump_suspend_thread_request,
    (dump_func)dump_resume_thread_request,
3812 3813
    (dump_func)dump_load_dll_request,
    (dump_func)dump_unload_dll_request,
3814
    (dump_func)dump_queue_apc_request,
3815
    (dump_func)dump_get_apc_result_request,
3816 3817 3818 3819
    (dump_func)dump_close_handle_request,
    (dump_func)dump_set_handle_info_request,
    (dump_func)dump_dup_handle_request,
    (dump_func)dump_open_process_request,
3820
    (dump_func)dump_open_thread_request,
3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831
    (dump_func)dump_select_request,
    (dump_func)dump_create_event_request,
    (dump_func)dump_event_op_request,
    (dump_func)dump_open_event_request,
    (dump_func)dump_create_mutex_request,
    (dump_func)dump_release_mutex_request,
    (dump_func)dump_open_mutex_request,
    (dump_func)dump_create_semaphore_request,
    (dump_func)dump_release_semaphore_request,
    (dump_func)dump_open_semaphore_request,
    (dump_func)dump_create_file_request,
3832
    (dump_func)dump_open_file_object_request,
3833
    (dump_func)dump_alloc_file_handle_request,
3834
    (dump_func)dump_get_handle_fd_request,
3835 3836 3837
    (dump_func)dump_flush_file_request,
    (dump_func)dump_lock_file_request,
    (dump_func)dump_unlock_file_request,
3838 3839 3840 3841 3842
    (dump_func)dump_create_socket_request,
    (dump_func)dump_accept_socket_request,
    (dump_func)dump_set_socket_event_request,
    (dump_func)dump_get_socket_event_request,
    (dump_func)dump_enable_socket_event_request,
3843
    (dump_func)dump_set_socket_deferred_request,
3844 3845
    (dump_func)dump_alloc_console_request,
    (dump_func)dump_free_console_request,
3846
    (dump_func)dump_get_console_renderer_events_request,
3847
    (dump_func)dump_open_console_request,
3848
    (dump_func)dump_get_console_wait_event_request,
3849 3850
    (dump_func)dump_get_console_mode_request,
    (dump_func)dump_set_console_mode_request,
3851 3852 3853 3854 3855 3856 3857
    (dump_func)dump_set_console_input_info_request,
    (dump_func)dump_get_console_input_info_request,
    (dump_func)dump_append_console_input_history_request,
    (dump_func)dump_get_console_input_history_request,
    (dump_func)dump_create_console_output_request,
    (dump_func)dump_set_console_output_info_request,
    (dump_func)dump_get_console_output_info_request,
3858 3859
    (dump_func)dump_write_console_input_request,
    (dump_func)dump_read_console_input_request,
3860
    (dump_func)dump_write_console_output_request,
3861
    (dump_func)dump_fill_console_output_request,
3862 3863
    (dump_func)dump_read_console_output_request,
    (dump_func)dump_move_console_output_request,
3864
    (dump_func)dump_send_console_signal_request,
3865
    (dump_func)dump_read_directory_changes_request,
3866
    (dump_func)dump_read_change_request,
3867 3868 3869 3870 3871
    (dump_func)dump_create_mapping_request,
    (dump_func)dump_open_mapping_request,
    (dump_func)dump_get_mapping_info_request,
    (dump_func)dump_create_snapshot_request,
    (dump_func)dump_next_process_request,
3872 3873
    (dump_func)dump_next_thread_request,
    (dump_func)dump_next_module_request,
3874
    (dump_func)dump_wait_debug_event_request,
3875 3876
    (dump_func)dump_queue_exception_event_request,
    (dump_func)dump_get_exception_status_request,
3877
    (dump_func)dump_output_debug_string_request,
3878 3879
    (dump_func)dump_continue_debug_event_request,
    (dump_func)dump_debug_process_request,
3880
    (dump_func)dump_debug_break_request,
3881
    (dump_func)dump_set_debugger_kill_on_exit_request,
3882
    (dump_func)dump_read_process_memory_request,
3883
    (dump_func)dump_write_process_memory_request,
3884 3885 3886
    (dump_func)dump_create_key_request,
    (dump_func)dump_open_key_request,
    (dump_func)dump_delete_key_request,
3887
    (dump_func)dump_flush_key_request,
3888 3889 3890 3891 3892 3893
    (dump_func)dump_enum_key_request,
    (dump_func)dump_set_key_value_request,
    (dump_func)dump_get_key_value_request,
    (dump_func)dump_enum_key_value_request,
    (dump_func)dump_delete_key_value_request,
    (dump_func)dump_load_registry_request,
3894
    (dump_func)dump_unload_registry_request,
3895
    (dump_func)dump_save_registry_request,
3896
    (dump_func)dump_set_registry_notification_request,
3897 3898 3899 3900
    (dump_func)dump_create_timer_request,
    (dump_func)dump_open_timer_request,
    (dump_func)dump_set_timer_request,
    (dump_func)dump_cancel_timer_request,
3901
    (dump_func)dump_get_timer_info_request,
3902 3903
    (dump_func)dump_get_thread_context_request,
    (dump_func)dump_set_thread_context_request,
3904
    (dump_func)dump_get_selector_entry_request,
3905 3906 3907
    (dump_func)dump_add_atom_request,
    (dump_func)dump_delete_atom_request,
    (dump_func)dump_find_atom_request,
3908 3909 3910
    (dump_func)dump_get_atom_information_request,
    (dump_func)dump_set_atom_information_request,
    (dump_func)dump_empty_atom_table_request,
3911
    (dump_func)dump_init_atom_table_request,
3912
    (dump_func)dump_get_msg_queue_request,
3913
    (dump_func)dump_set_queue_fd_request,
3914 3915
    (dump_func)dump_set_queue_mask_request,
    (dump_func)dump_get_queue_status_request,
3916
    (dump_func)dump_get_process_idle_event_request,
3917
    (dump_func)dump_send_message_request,
3918
    (dump_func)dump_post_quit_message_request,
3919
    (dump_func)dump_send_hardware_message_request,
3920 3921
    (dump_func)dump_get_message_request,
    (dump_func)dump_reply_message_request,
3922
    (dump_func)dump_accept_hardware_message_request,
3923 3924 3925
    (dump_func)dump_get_message_reply_request,
    (dump_func)dump_set_win_timer_request,
    (dump_func)dump_kill_win_timer_request,
3926
    (dump_func)dump_is_window_hung_request,
3927 3928
    (dump_func)dump_get_serial_info_request,
    (dump_func)dump_set_serial_info_request,
3929
    (dump_func)dump_register_async_request,
3930
    (dump_func)dump_cancel_async_request,
3931
    (dump_func)dump_ioctl_request,
3932
    (dump_func)dump_get_ioctl_result_request,
3933
    (dump_func)dump_create_named_pipe_request,
3934
    (dump_func)dump_get_named_pipe_info_request,
3935 3936
    (dump_func)dump_create_window_request,
    (dump_func)dump_destroy_window_request,
3937
    (dump_func)dump_get_desktop_window_request,
3938
    (dump_func)dump_set_window_owner_request,
3939
    (dump_func)dump_get_window_info_request,
3940
    (dump_func)dump_set_window_info_request,
3941
    (dump_func)dump_set_parent_request,
3942 3943
    (dump_func)dump_get_window_parents_request,
    (dump_func)dump_get_window_children_request,
3944
    (dump_func)dump_get_window_children_from_point_request,
3945
    (dump_func)dump_get_window_tree_request,
3946
    (dump_func)dump_set_window_pos_request,
3947
    (dump_func)dump_get_window_rectangles_request,
3948 3949
    (dump_func)dump_get_window_text_request,
    (dump_func)dump_set_window_text_request,
3950
    (dump_func)dump_get_windows_offset_request,
3951
    (dump_func)dump_get_visible_region_request,
3952 3953
    (dump_func)dump_get_window_region_request,
    (dump_func)dump_set_window_region_request,
3954
    (dump_func)dump_get_update_region_request,
3955
    (dump_func)dump_update_window_zorder_request,
3956
    (dump_func)dump_redraw_window_request,
3957 3958 3959 3960
    (dump_func)dump_set_window_property_request,
    (dump_func)dump_remove_window_property_request,
    (dump_func)dump_get_window_property_request,
    (dump_func)dump_get_window_properties_request,
3961 3962 3963 3964 3965
    (dump_func)dump_create_winstation_request,
    (dump_func)dump_open_winstation_request,
    (dump_func)dump_close_winstation_request,
    (dump_func)dump_get_process_winstation_request,
    (dump_func)dump_set_process_winstation_request,
3966
    (dump_func)dump_enum_winstation_request,
3967 3968 3969 3970 3971
    (dump_func)dump_create_desktop_request,
    (dump_func)dump_open_desktop_request,
    (dump_func)dump_close_desktop_request,
    (dump_func)dump_get_thread_desktop_request,
    (dump_func)dump_set_thread_desktop_request,
3972
    (dump_func)dump_enum_desktop_request,
3973
    (dump_func)dump_set_user_object_info_request,
3974 3975
    (dump_func)dump_attach_thread_input_request,
    (dump_func)dump_get_thread_input_request,
3976
    (dump_func)dump_get_last_input_time_request,
3977 3978
    (dump_func)dump_get_key_state_request,
    (dump_func)dump_set_key_state_request,
3979 3980 3981
    (dump_func)dump_set_foreground_window_request,
    (dump_func)dump_set_focus_window_request,
    (dump_func)dump_set_active_window_request,
3982
    (dump_func)dump_set_capture_window_request,
3983 3984
    (dump_func)dump_set_caret_window_request,
    (dump_func)dump_set_caret_info_request,
3985 3986 3987 3988
    (dump_func)dump_set_hook_request,
    (dump_func)dump_remove_hook_request,
    (dump_func)dump_start_hook_chain_request,
    (dump_func)dump_finish_hook_chain_request,
3989
    (dump_func)dump_get_hook_info_request,
3990 3991 3992
    (dump_func)dump_create_class_request,
    (dump_func)dump_destroy_class_request,
    (dump_func)dump_set_class_info_request,
3993
    (dump_func)dump_set_clipboard_info_request,
3994
    (dump_func)dump_open_token_request,
3995
    (dump_func)dump_set_global_windows_request,
3996 3997
    (dump_func)dump_adjust_token_privileges_request,
    (dump_func)dump_get_token_privileges_request,
3998
    (dump_func)dump_check_token_privileges_request,
3999
    (dump_func)dump_duplicate_token_request,
4000
    (dump_func)dump_access_check_request,
4001
    (dump_func)dump_get_token_user_request,
4002
    (dump_func)dump_get_token_groups_request,
4003
    (dump_func)dump_set_security_object_request,
4004
    (dump_func)dump_get_security_object_request,
Mike McCormack's avatar
Mike McCormack committed
4005 4006
    (dump_func)dump_create_mailslot_request,
    (dump_func)dump_set_mailslot_info_request,
4007 4008
    (dump_func)dump_create_directory_request,
    (dump_func)dump_open_directory_request,
4009
    (dump_func)dump_get_directory_entry_request,
4010 4011 4012
    (dump_func)dump_create_symlink_request,
    (dump_func)dump_open_symlink_request,
    (dump_func)dump_query_symlink_request,
4013
    (dump_func)dump_get_object_info_request,
4014
    (dump_func)dump_get_token_impersonation_level_request,
4015
    (dump_func)dump_allocate_locally_unique_id_request,
4016 4017 4018
    (dump_func)dump_create_device_manager_request,
    (dump_func)dump_create_device_request,
    (dump_func)dump_delete_device_request,
4019
    (dump_func)dump_get_next_device_request_request,
4020
    (dump_func)dump_make_process_system_request,
4021
    (dump_func)dump_get_token_statistics_request,
4022 4023 4024 4025 4026
    (dump_func)dump_create_completion_request,
    (dump_func)dump_open_completion_request,
    (dump_func)dump_add_completion_request,
    (dump_func)dump_remove_completion_request,
    (dump_func)dump_query_completion_request,
4027
    (dump_func)dump_set_completion_info_request,
4028
    (dump_func)dump_add_fd_completion_request,
4029 4030
    (dump_func)dump_get_window_layered_info_request,
    (dump_func)dump_set_window_layered_info_request,
Alexandre Julliard's avatar
Alexandre Julliard committed
4031 4032
};

4033
static const dump_func reply_dumpers[REQ_NB_REQUESTS] = {
4034 4035
    (dump_func)dump_new_process_reply,
    (dump_func)dump_get_new_process_info_reply,
4036
    (dump_func)dump_new_thread_reply,
4037
    (dump_func)dump_get_startup_info_reply,
4038
    (dump_func)0,
4039
    (dump_func)dump_init_thread_reply,
4040 4041
    (dump_func)dump_terminate_process_reply,
    (dump_func)dump_terminate_thread_reply,
4042 4043 4044 4045
    (dump_func)dump_get_process_info_reply,
    (dump_func)0,
    (dump_func)dump_get_thread_info_reply,
    (dump_func)0,
4046
    (dump_func)dump_get_dll_info_reply,
4047 4048 4049 4050
    (dump_func)dump_suspend_thread_reply,
    (dump_func)dump_resume_thread_reply,
    (dump_func)0,
    (dump_func)0,
4051
    (dump_func)dump_queue_apc_reply,
4052
    (dump_func)dump_get_apc_result_reply,
4053
    (dump_func)0,
4054
    (dump_func)dump_set_handle_info_reply,
4055 4056
    (dump_func)dump_dup_handle_reply,
    (dump_func)dump_open_process_reply,
4057
    (dump_func)dump_open_thread_reply,
4058
    (dump_func)dump_select_reply,
4059 4060 4061 4062
    (dump_func)dump_create_event_reply,
    (dump_func)0,
    (dump_func)dump_open_event_reply,
    (dump_func)dump_create_mutex_reply,
4063
    (dump_func)dump_release_mutex_reply,
4064 4065 4066 4067 4068
    (dump_func)dump_open_mutex_reply,
    (dump_func)dump_create_semaphore_reply,
    (dump_func)dump_release_semaphore_reply,
    (dump_func)dump_open_semaphore_reply,
    (dump_func)dump_create_file_reply,
4069
    (dump_func)dump_open_file_object_reply,
4070
    (dump_func)dump_alloc_file_handle_reply,
4071
    (dump_func)dump_get_handle_fd_reply,
4072
    (dump_func)dump_flush_file_reply,
4073
    (dump_func)dump_lock_file_reply,
4074
    (dump_func)0,
4075 4076 4077 4078 4079
    (dump_func)dump_create_socket_reply,
    (dump_func)dump_accept_socket_reply,
    (dump_func)0,
    (dump_func)dump_get_socket_event_reply,
    (dump_func)0,
4080
    (dump_func)0,
4081
    (dump_func)dump_alloc_console_reply,
4082
    (dump_func)0,
4083
    (dump_func)dump_get_console_renderer_events_reply,
4084
    (dump_func)dump_open_console_reply,
4085
    (dump_func)dump_get_console_wait_event_reply,
4086 4087 4088
    (dump_func)dump_get_console_mode_reply,
    (dump_func)0,
    (dump_func)0,
4089 4090 4091 4092 4093 4094
    (dump_func)dump_get_console_input_info_reply,
    (dump_func)0,
    (dump_func)dump_get_console_input_history_reply,
    (dump_func)dump_create_console_output_reply,
    (dump_func)0,
    (dump_func)dump_get_console_output_info_reply,
4095 4096
    (dump_func)dump_write_console_input_reply,
    (dump_func)dump_read_console_input_reply,
4097
    (dump_func)dump_write_console_output_reply,
4098
    (dump_func)dump_fill_console_output_reply,
4099 4100
    (dump_func)dump_read_console_output_reply,
    (dump_func)0,
4101
    (dump_func)0,
4102
    (dump_func)0,
4103
    (dump_func)dump_read_change_reply,
4104 4105 4106 4107 4108
    (dump_func)dump_create_mapping_reply,
    (dump_func)dump_open_mapping_reply,
    (dump_func)dump_get_mapping_info_reply,
    (dump_func)dump_create_snapshot_reply,
    (dump_func)dump_next_process_reply,
4109 4110
    (dump_func)dump_next_thread_reply,
    (dump_func)dump_next_module_reply,
4111
    (dump_func)dump_wait_debug_event_reply,
4112 4113
    (dump_func)dump_queue_exception_event_reply,
    (dump_func)dump_get_exception_status_reply,
4114
    (dump_func)0,
4115 4116
    (dump_func)0,
    (dump_func)0,
4117
    (dump_func)dump_debug_break_reply,
4118
    (dump_func)0,
4119
    (dump_func)dump_read_process_memory_reply,
4120
    (dump_func)0,
4121 4122 4123
    (dump_func)dump_create_key_reply,
    (dump_func)dump_open_key_reply,
    (dump_func)0,
4124
    (dump_func)0,
4125 4126 4127 4128 4129 4130 4131 4132
    (dump_func)dump_enum_key_reply,
    (dump_func)0,
    (dump_func)dump_get_key_value_reply,
    (dump_func)dump_enum_key_value_reply,
    (dump_func)0,
    (dump_func)0,
    (dump_func)0,
    (dump_func)0,
4133
    (dump_func)0,
4134 4135
    (dump_func)dump_create_timer_reply,
    (dump_func)dump_open_timer_reply,
4136 4137
    (dump_func)dump_set_timer_reply,
    (dump_func)dump_cancel_timer_reply,
4138
    (dump_func)dump_get_timer_info_reply,
4139
    (dump_func)dump_get_thread_context_reply,
4140
    (dump_func)dump_set_thread_context_reply,
4141
    (dump_func)dump_get_selector_entry_reply,
4142 4143 4144
    (dump_func)dump_add_atom_reply,
    (dump_func)0,
    (dump_func)dump_find_atom_reply,
4145 4146
    (dump_func)dump_get_atom_information_reply,
    (dump_func)0,
4147
    (dump_func)0,
4148
    (dump_func)dump_init_atom_table_reply,
4149
    (dump_func)dump_get_msg_queue_reply,
4150
    (dump_func)0,
4151 4152
    (dump_func)dump_set_queue_mask_reply,
    (dump_func)dump_get_queue_status_reply,
4153
    (dump_func)dump_get_process_idle_event_reply,
4154
    (dump_func)0,
4155
    (dump_func)0,
4156
    (dump_func)0,
4157 4158
    (dump_func)dump_get_message_reply,
    (dump_func)0,
4159
    (dump_func)0,
4160
    (dump_func)dump_get_message_reply_reply,
4161
    (dump_func)dump_set_win_timer_reply,
4162
    (dump_func)0,
4163
    (dump_func)dump_is_window_hung_reply,
4164 4165
    (dump_func)dump_get_serial_info_reply,
    (dump_func)0,
4166
    (dump_func)0,
4167
    (dump_func)0,
4168
    (dump_func)dump_ioctl_reply,
4169
    (dump_func)dump_get_ioctl_result_reply,
4170
    (dump_func)dump_create_named_pipe_reply,
4171
    (dump_func)dump_get_named_pipe_info_reply,
4172 4173
    (dump_func)dump_create_window_reply,
    (dump_func)0,
4174
    (dump_func)dump_get_desktop_window_reply,
4175
    (dump_func)dump_set_window_owner_reply,
4176
    (dump_func)dump_get_window_info_reply,
4177
    (dump_func)dump_set_window_info_reply,
4178
    (dump_func)dump_set_parent_reply,
4179 4180
    (dump_func)dump_get_window_parents_reply,
    (dump_func)dump_get_window_children_reply,
4181
    (dump_func)dump_get_window_children_from_point_reply,
4182
    (dump_func)dump_get_window_tree_reply,
4183
    (dump_func)dump_set_window_pos_reply,
4184
    (dump_func)dump_get_window_rectangles_reply,
4185 4186
    (dump_func)dump_get_window_text_reply,
    (dump_func)0,
4187
    (dump_func)dump_get_windows_offset_reply,
4188
    (dump_func)dump_get_visible_region_reply,
4189 4190
    (dump_func)dump_get_window_region_reply,
    (dump_func)0,
4191 4192
    (dump_func)dump_get_update_region_reply,
    (dump_func)0,
4193
    (dump_func)0,
4194
    (dump_func)0,
4195 4196 4197
    (dump_func)dump_remove_window_property_reply,
    (dump_func)dump_get_window_property_reply,
    (dump_func)dump_get_window_properties_reply,
4198 4199 4200 4201 4202
    (dump_func)dump_create_winstation_reply,
    (dump_func)dump_open_winstation_reply,
    (dump_func)0,
    (dump_func)dump_get_process_winstation_reply,
    (dump_func)0,
4203
    (dump_func)dump_enum_winstation_reply,
4204 4205 4206 4207 4208
    (dump_func)dump_create_desktop_reply,
    (dump_func)dump_open_desktop_reply,
    (dump_func)0,
    (dump_func)dump_get_thread_desktop_reply,
    (dump_func)0,
4209
    (dump_func)dump_enum_desktop_reply,
4210
    (dump_func)dump_set_user_object_info_reply,
4211 4212
    (dump_func)0,
    (dump_func)dump_get_thread_input_reply,
4213
    (dump_func)dump_get_last_input_time_reply,
4214 4215
    (dump_func)dump_get_key_state_reply,
    (dump_func)0,
4216 4217 4218
    (dump_func)dump_set_foreground_window_reply,
    (dump_func)dump_set_focus_window_reply,
    (dump_func)dump_set_active_window_reply,
4219
    (dump_func)dump_set_capture_window_reply,
4220 4221
    (dump_func)dump_set_caret_window_reply,
    (dump_func)dump_set_caret_info_reply,
4222
    (dump_func)dump_set_hook_reply,
4223
    (dump_func)dump_remove_hook_reply,
4224 4225
    (dump_func)dump_start_hook_chain_reply,
    (dump_func)0,
4226
    (dump_func)dump_get_hook_info_reply,
4227
    (dump_func)dump_create_class_reply,
4228
    (dump_func)dump_destroy_class_reply,
4229
    (dump_func)dump_set_class_info_reply,
4230
    (dump_func)dump_set_clipboard_info_reply,
4231
    (dump_func)dump_open_token_reply,
4232
    (dump_func)dump_set_global_windows_reply,
4233 4234
    (dump_func)dump_adjust_token_privileges_reply,
    (dump_func)dump_get_token_privileges_reply,
4235
    (dump_func)dump_check_token_privileges_reply,
4236
    (dump_func)dump_duplicate_token_reply,
4237
    (dump_func)dump_access_check_reply,
4238
    (dump_func)dump_get_token_user_reply,
4239
    (dump_func)dump_get_token_groups_reply,
4240
    (dump_func)0,
4241
    (dump_func)dump_get_security_object_reply,
Mike McCormack's avatar
Mike McCormack committed
4242 4243
    (dump_func)dump_create_mailslot_reply,
    (dump_func)dump_set_mailslot_info_reply,
4244 4245
    (dump_func)dump_create_directory_reply,
    (dump_func)dump_open_directory_reply,
4246
    (dump_func)dump_get_directory_entry_reply,
4247 4248 4249
    (dump_func)dump_create_symlink_reply,
    (dump_func)dump_open_symlink_reply,
    (dump_func)dump_query_symlink_reply,
4250
    (dump_func)dump_get_object_info_reply,
4251
    (dump_func)dump_get_token_impersonation_level_reply,
4252
    (dump_func)dump_allocate_locally_unique_id_reply,
4253 4254 4255
    (dump_func)dump_create_device_manager_reply,
    (dump_func)dump_create_device_reply,
    (dump_func)0,
4256
    (dump_func)dump_get_next_device_request_reply,
4257
    (dump_func)dump_make_process_system_reply,
4258
    (dump_func)dump_get_token_statistics_reply,
4259 4260 4261 4262 4263
    (dump_func)dump_create_completion_reply,
    (dump_func)dump_open_completion_reply,
    (dump_func)0,
    (dump_func)dump_remove_completion_reply,
    (dump_func)dump_query_completion_reply,
4264
    (dump_func)0,
4265
    (dump_func)0,
4266 4267
    (dump_func)dump_get_window_layered_info_reply,
    (dump_func)0,
Alexandre Julliard's avatar
Alexandre Julliard committed
4268 4269
};

4270
static const char * const req_names[REQ_NB_REQUESTS] = {
4271
    "new_process",
4272
    "get_new_process_info",
Alexandre Julliard's avatar
Alexandre Julliard committed
4273
    "new_thread",
4274
    "get_startup_info",
4275
    "init_process_done",
Alexandre Julliard's avatar
Alexandre Julliard committed
4276 4277 4278 4279
    "init_thread",
    "terminate_process",
    "terminate_thread",
    "get_process_info",
4280
    "set_process_info",
Alexandre Julliard's avatar
Alexandre Julliard committed
4281
    "get_thread_info",
4282
    "set_thread_info",
4283
    "get_dll_info",
4284 4285
    "suspend_thread",
    "resume_thread",
4286 4287
    "load_dll",
    "unload_dll",
4288
    "queue_apc",
4289
    "get_apc_result",
Alexandre Julliard's avatar
Alexandre Julliard committed
4290
    "close_handle",
4291
    "set_handle_info",
Alexandre Julliard's avatar
Alexandre Julliard committed
4292 4293
    "dup_handle",
    "open_process",
4294
    "open_thread",
Alexandre Julliard's avatar
Alexandre Julliard committed
4295
    "select",
Alexandre Julliard's avatar
Alexandre Julliard committed
4296 4297
    "create_event",
    "event_op",
4298
    "open_event",
Alexandre Julliard's avatar
Alexandre Julliard committed
4299 4300
    "create_mutex",
    "release_mutex",
4301
    "open_mutex",
Alexandre Julliard's avatar
Alexandre Julliard committed
4302 4303
    "create_semaphore",
    "release_semaphore",
4304
    "open_semaphore",
4305
    "create_file",
4306
    "open_file_object",
4307
    "alloc_file_handle",
4308
    "get_handle_fd",
4309
    "flush_file",
4310 4311
    "lock_file",
    "unlock_file",
4312 4313 4314 4315 4316
    "create_socket",
    "accept_socket",
    "set_socket_event",
    "get_socket_event",
    "enable_socket_event",
4317
    "set_socket_deferred",
4318 4319
    "alloc_console",
    "free_console",
4320
    "get_console_renderer_events",
4321
    "open_console",
4322
    "get_console_wait_event",
4323 4324
    "get_console_mode",
    "set_console_mode",
4325 4326 4327 4328 4329 4330 4331
    "set_console_input_info",
    "get_console_input_info",
    "append_console_input_history",
    "get_console_input_history",
    "create_console_output",
    "set_console_output_info",
    "get_console_output_info",
4332 4333
    "write_console_input",
    "read_console_input",
4334
    "write_console_output",
4335
    "fill_console_output",
4336 4337
    "read_console_output",
    "move_console_output",
4338
    "send_console_signal",
4339
    "read_directory_changes",
4340
    "read_change",
4341
    "create_mapping",
4342
    "open_mapping",
4343
    "get_mapping_info",
4344 4345
    "create_snapshot",
    "next_process",
4346 4347
    "next_thread",
    "next_module",
4348
    "wait_debug_event",
4349 4350
    "queue_exception_event",
    "get_exception_status",
4351
    "output_debug_string",
4352 4353
    "continue_debug_event",
    "debug_process",
4354
    "debug_break",
4355
    "set_debugger_kill_on_exit",
4356
    "read_process_memory",
4357
    "write_process_memory",
4358 4359 4360
    "create_key",
    "open_key",
    "delete_key",
4361
    "flush_key",
4362 4363 4364 4365 4366 4367
    "enum_key",
    "set_key_value",
    "get_key_value",
    "enum_key_value",
    "delete_key_value",
    "load_registry",
4368
    "unload_registry",
4369
    "save_registry",
4370
    "set_registry_notification",
4371 4372 4373 4374
    "create_timer",
    "open_timer",
    "set_timer",
    "cancel_timer",
4375
    "get_timer_info",
4376 4377
    "get_thread_context",
    "set_thread_context",
4378
    "get_selector_entry",
4379 4380 4381
    "add_atom",
    "delete_atom",
    "find_atom",
4382 4383 4384
    "get_atom_information",
    "set_atom_information",
    "empty_atom_table",
4385
    "init_atom_table",
4386
    "get_msg_queue",
4387
    "set_queue_fd",
4388 4389
    "set_queue_mask",
    "get_queue_status",
4390
    "get_process_idle_event",
4391
    "send_message",
4392
    "post_quit_message",
4393
    "send_hardware_message",
4394 4395
    "get_message",
    "reply_message",
4396
    "accept_hardware_message",
4397 4398 4399
    "get_message_reply",
    "set_win_timer",
    "kill_win_timer",
4400
    "is_window_hung",
4401 4402
    "get_serial_info",
    "set_serial_info",
4403
    "register_async",
4404
    "cancel_async",
4405
    "ioctl",
4406
    "get_ioctl_result",
4407
    "create_named_pipe",
4408
    "get_named_pipe_info",
4409 4410
    "create_window",
    "destroy_window",
4411
    "get_desktop_window",
4412
    "set_window_owner",
4413
    "get_window_info",
4414
    "set_window_info",
4415
    "set_parent",
4416 4417
    "get_window_parents",
    "get_window_children",
4418
    "get_window_children_from_point",
4419
    "get_window_tree",
4420
    "set_window_pos",
4421
    "get_window_rectangles",
4422 4423
    "get_window_text",
    "set_window_text",
4424
    "get_windows_offset",
4425
    "get_visible_region",
4426 4427
    "get_window_region",
    "set_window_region",
4428
    "get_update_region",
4429
    "update_window_zorder",
4430
    "redraw_window",
4431 4432 4433 4434
    "set_window_property",
    "remove_window_property",
    "get_window_property",
    "get_window_properties",
4435 4436 4437 4438 4439
    "create_winstation",
    "open_winstation",
    "close_winstation",
    "get_process_winstation",
    "set_process_winstation",
4440
    "enum_winstation",
4441 4442 4443 4444 4445
    "create_desktop",
    "open_desktop",
    "close_desktop",
    "get_thread_desktop",
    "set_thread_desktop",
4446
    "enum_desktop",
4447
    "set_user_object_info",
4448 4449
    "attach_thread_input",
    "get_thread_input",
4450
    "get_last_input_time",
4451 4452
    "get_key_state",
    "set_key_state",
4453 4454 4455
    "set_foreground_window",
    "set_focus_window",
    "set_active_window",
4456
    "set_capture_window",
4457 4458
    "set_caret_window",
    "set_caret_info",
4459 4460 4461 4462
    "set_hook",
    "remove_hook",
    "start_hook_chain",
    "finish_hook_chain",
4463
    "get_hook_info",
4464 4465 4466
    "create_class",
    "destroy_class",
    "set_class_info",
4467
    "set_clipboard_info",
4468
    "open_token",
4469
    "set_global_windows",
4470 4471
    "adjust_token_privileges",
    "get_token_privileges",
4472
    "check_token_privileges",
4473
    "duplicate_token",
4474
    "access_check",
4475
    "get_token_user",
4476
    "get_token_groups",
4477
    "set_security_object",
4478
    "get_security_object",
Mike McCormack's avatar
Mike McCormack committed
4479 4480
    "create_mailslot",
    "set_mailslot_info",
4481 4482
    "create_directory",
    "open_directory",
4483
    "get_directory_entry",
4484 4485 4486
    "create_symlink",
    "open_symlink",
    "query_symlink",
4487
    "get_object_info",
4488
    "get_token_impersonation_level",
4489
    "allocate_locally_unique_id",
4490 4491 4492
    "create_device_manager",
    "create_device",
    "delete_device",
4493
    "get_next_device_request",
4494
    "make_process_system",
4495
    "get_token_statistics",
4496 4497 4498 4499 4500
    "create_completion",
    "open_completion",
    "add_completion",
    "remove_completion",
    "query_completion",
4501
    "set_completion_info",
4502
    "add_fd_completion",
4503 4504
    "get_window_layered_info",
    "set_window_layered_info",
Alexandre Julliard's avatar
Alexandre Julliard committed
4505 4506
};

4507 4508 4509 4510 4511 4512
static const struct
{
    const char  *name;
    unsigned int value;
} status_names[] =
{
4513
    { "ABANDONED_WAIT_0",            STATUS_ABANDONED_WAIT_0 },
4514 4515
    { "ACCESS_DENIED",               STATUS_ACCESS_DENIED },
    { "ACCESS_VIOLATION",            STATUS_ACCESS_VIOLATION },
4516
    { "ALERTED",                     STATUS_ALERTED },
4517
    { "ALIAS_EXISTS",                STATUS_ALIAS_EXISTS },
4518
    { "BAD_DEVICE_TYPE",             STATUS_BAD_DEVICE_TYPE },
4519
    { "BAD_IMPERSONATION_LEVEL",     STATUS_BAD_IMPERSONATION_LEVEL },
4520
    { "BREAKPOINT",                  STATUS_BREAKPOINT },
4521 4522
    { "BUFFER_OVERFLOW",             STATUS_BUFFER_OVERFLOW },
    { "BUFFER_TOO_SMALL",            STATUS_BUFFER_TOO_SMALL },
4523
    { "CANCELLED",                   STATUS_CANCELLED },
4524
    { "CANT_OPEN_ANONYMOUS",         STATUS_CANT_OPEN_ANONYMOUS },
4525
    { "CHILD_MUST_BE_VOLATILE",      STATUS_CHILD_MUST_BE_VOLATILE },
4526
    { "DEBUGGER_INACTIVE",           STATUS_DEBUGGER_INACTIVE },
4527 4528 4529 4530 4531 4532 4533 4534 4535
    { "DEVICE_BUSY",                 STATUS_DEVICE_BUSY },
    { "DIRECTORY_NOT_EMPTY",         STATUS_DIRECTORY_NOT_EMPTY },
    { "DISK_FULL",                   STATUS_DISK_FULL },
    { "DLL_NOT_FOUND",               STATUS_DLL_NOT_FOUND },
    { "ERROR_CLASS_ALREADY_EXISTS",  0xc0010000 | ERROR_CLASS_ALREADY_EXISTS },
    { "ERROR_CLASS_DOES_NOT_EXIST",  0xc0010000 | ERROR_CLASS_DOES_NOT_EXIST },
    { "ERROR_CLASS_HAS_WINDOWS",     0xc0010000 | ERROR_CLASS_HAS_WINDOWS },
    { "ERROR_CLIPBOARD_NOT_OPEN",    0xc0010000 | ERROR_CLIPBOARD_NOT_OPEN },
    { "ERROR_INVALID_INDEX",         0xc0010000 | ERROR_INVALID_INDEX },
4536
    { "ERROR_INVALID_WINDOW_HANDLE", 0xc0010000 | ERROR_INVALID_WINDOW_HANDLE },
4537
    { "FILE_DELETED",                STATUS_FILE_DELETED },
4538 4539
    { "FILE_IS_A_DIRECTORY",         STATUS_FILE_IS_A_DIRECTORY },
    { "FILE_LOCK_CONFLICT",          STATUS_FILE_LOCK_CONFLICT },
4540
    { "GENERIC_NOT_MAPPED",          STATUS_GENERIC_NOT_MAPPED },
4541
    { "HANDLES_CLOSED",              STATUS_HANDLES_CLOSED },
4542
    { "HANDLE_NOT_CLOSABLE",         STATUS_HANDLE_NOT_CLOSABLE },
4543
    { "ILLEGAL_FUNCTION",            STATUS_ILLEGAL_FUNCTION },
4544
    { "INSTANCE_NOT_AVAILABLE",      STATUS_INSTANCE_NOT_AVAILABLE },
4545
    { "INVALID_CID",                 STATUS_INVALID_CID },
4546
    { "INVALID_DEVICE_REQUEST",      STATUS_INVALID_DEVICE_REQUEST },
4547 4548 4549
    { "INVALID_FILE_FOR_SECTION",    STATUS_INVALID_FILE_FOR_SECTION },
    { "INVALID_HANDLE",              STATUS_INVALID_HANDLE },
    { "INVALID_PARAMETER",           STATUS_INVALID_PARAMETER },
4550
    { "INVALID_SECURITY_DESCR",      STATUS_INVALID_SECURITY_DESCR },
4551 4552
    { "IO_TIMEOUT",                  STATUS_IO_TIMEOUT },
    { "KEY_DELETED",                 STATUS_KEY_DELETED },
4553
    { "MAPPED_FILE_SIZE_ZERO",       STATUS_MAPPED_FILE_SIZE_ZERO },
4554 4555
    { "MEDIA_WRITE_PROTECTED",       STATUS_MEDIA_WRITE_PROTECTED },
    { "MUTANT_NOT_OWNED",            STATUS_MUTANT_NOT_OWNED },
4556
    { "NAME_TOO_LONG",               STATUS_NAME_TOO_LONG },
4557
    { "NOTIFY_ENUM_DIR",             STATUS_NOTIFY_ENUM_DIR },
4558 4559 4560 4561
    { "NOT_ALL_ASSIGNED",            STATUS_NOT_ALL_ASSIGNED },
    { "NOT_A_DIRECTORY",             STATUS_NOT_A_DIRECTORY },
    { "NOT_IMPLEMENTED",             STATUS_NOT_IMPLEMENTED },
    { "NOT_REGISTRY_FILE",           STATUS_NOT_REGISTRY_FILE },
4562
    { "NOT_SUPPORTED",               STATUS_NOT_SUPPORTED },
4563 4564 4565 4566 4567 4568 4569 4570 4571
    { "NO_DATA_DETECTED",            STATUS_NO_DATA_DETECTED },
    { "NO_IMPERSONATION_TOKEN",      STATUS_NO_IMPERSONATION_TOKEN },
    { "NO_MEMORY",                   STATUS_NO_MEMORY },
    { "NO_MORE_ENTRIES",             STATUS_NO_MORE_ENTRIES },
    { "NO_MORE_FILES",               STATUS_NO_MORE_FILES },
    { "NO_SUCH_DEVICE",              STATUS_NO_SUCH_DEVICE },
    { "NO_SUCH_FILE",                STATUS_NO_SUCH_FILE },
    { "NO_TOKEN",                    STATUS_NO_TOKEN },
    { "OBJECT_NAME_COLLISION",       STATUS_OBJECT_NAME_COLLISION },
4572
    { "OBJECT_NAME_EXISTS",          STATUS_OBJECT_NAME_EXISTS },
4573 4574 4575
    { "OBJECT_NAME_INVALID",         STATUS_OBJECT_NAME_INVALID },
    { "OBJECT_NAME_NOT_FOUND",       STATUS_OBJECT_NAME_NOT_FOUND },
    { "OBJECT_PATH_INVALID",         STATUS_OBJECT_PATH_INVALID },
4576 4577
    { "OBJECT_PATH_NOT_FOUND",       STATUS_OBJECT_PATH_NOT_FOUND },
    { "OBJECT_PATH_SYNTAX_BAD",      STATUS_OBJECT_PATH_SYNTAX_BAD },
4578 4579 4580 4581 4582 4583 4584 4585
    { "OBJECT_TYPE_MISMATCH",        STATUS_OBJECT_TYPE_MISMATCH },
    { "PENDING",                     STATUS_PENDING },
    { "PIPE_BUSY",                   STATUS_PIPE_BUSY },
    { "PIPE_CONNECTED",              STATUS_PIPE_CONNECTED },
    { "PIPE_DISCONNECTED",           STATUS_PIPE_DISCONNECTED },
    { "PIPE_LISTENING",              STATUS_PIPE_LISTENING },
    { "PIPE_NOT_AVAILABLE",          STATUS_PIPE_NOT_AVAILABLE },
    { "PRIVILEGE_NOT_HELD",          STATUS_PRIVILEGE_NOT_HELD },
4586
    { "PROCESS_IS_TERMINATING",      STATUS_PROCESS_IS_TERMINATING },
4587 4588 4589
    { "SECTION_TOO_BIG",             STATUS_SECTION_TOO_BIG },
    { "SEMAPHORE_LIMIT_EXCEEDED",    STATUS_SEMAPHORE_LIMIT_EXCEEDED },
    { "SHARING_VIOLATION",           STATUS_SHARING_VIOLATION },
4590
    { "SHUTDOWN_IN_PROGRESS",        STATUS_SHUTDOWN_IN_PROGRESS },
4591
    { "SUSPEND_COUNT_EXCEEDED",      STATUS_SUSPEND_COUNT_EXCEEDED },
4592
    { "THREAD_IS_TERMINATING",       STATUS_THREAD_IS_TERMINATING },
4593
    { "TIMEOUT",                     STATUS_TIMEOUT },
4594
    { "TOO_MANY_OPENED_FILES",       STATUS_TOO_MANY_OPENED_FILES },
4595
    { "UNSUCCESSFUL",                STATUS_UNSUCCESSFUL },
4596
    { "USER_APC",                    STATUS_USER_APC },
4597
    { "VOLUME_DISMOUNTED",           STATUS_VOLUME_DISMOUNTED },
4598 4599 4600 4601
    { "WAS_LOCKED",                  STATUS_WAS_LOCKED },
    { NULL, 0 }
};

4602 4603 4604
/* ### make_requests end ### */
/* Everything above this line is generated automatically by tools/make_requests */

4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618
static const char *get_status_name( unsigned int status )
{
    int i;
    static char buffer[10];

    if (status)
    {
        for (i = 0; status_names[i].name; i++)
            if (status_names[i].value == status) return status_names[i].name;
    }
    sprintf( buffer, "%x", status );
    return buffer;
}

4619
void trace_request(void)
Alexandre Julliard's avatar
Alexandre Julliard committed
4620
{
4621
    enum request req = current->req.request_header.req;
4622
    if (req < REQ_NB_REQUESTS)
Alexandre Julliard's avatar
Alexandre Julliard committed
4623
    {
4624
        fprintf( stderr, "%04x: %s(", current->id, req_names[req] );
4625 4626 4627 4628 4629 4630
        if (req_dumpers[req])
        {
            cur_data = get_req_data();
            cur_size = get_req_data_size();
            req_dumpers[req]( &current->req );
        }
4631
        fprintf( stderr, " )\n" );
Alexandre Julliard's avatar
Alexandre Julliard committed
4632
    }
4633
    else fprintf( stderr, "%04x: %d(?)\n", current->id, req );
Alexandre Julliard's avatar
Alexandre Julliard committed
4634 4635
}

4636
void trace_reply( enum request req, const union generic_reply *reply )
Alexandre Julliard's avatar
Alexandre Julliard committed
4637
{
4638
    if (req < REQ_NB_REQUESTS)
Alexandre Julliard's avatar
Alexandre Julliard committed
4639
    {
4640 4641
        fprintf( stderr, "%04x: %s() = %s",
                 current->id, req_names[req], get_status_name(current->error) );
4642 4643 4644
        if (reply_dumpers[req])
        {
            fprintf( stderr, " {" );
4645 4646 4647
            cur_data = current->reply_data;
            cur_size = reply->reply_header.reply_size;
            reply_dumpers[req]( reply );
4648 4649 4650
            fprintf( stderr, " }" );
        }
        fputc( '\n', stderr );
Alexandre Julliard's avatar
Alexandre Julliard committed
4651
    }
4652 4653
    else fprintf( stderr, "%04x: %d() = %s\n",
                  current->id, req, get_status_name(current->error) );
Alexandre Julliard's avatar
Alexandre Julliard committed
4654
}