~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Wine Cross Reference
wine/server/protocol.def

Version: ~ [ wine-1.1.33 ] ~ [ wine-1.1.32 ] ~ [ wine-1.1.31 ] ~ [ wine-1.1.30 ] ~ [ wine-1.1.29 ] ~ [ wine-1.1.28 ] ~ [ wine-1.1.27 ] ~ [ wine-1.1.26 ] ~ [ wine-1.1.25 ] ~ [ wine-1.1.24 ] ~ [ wine-1.1.23 ] ~ [ wine-1.1.22 ] ~ [ wine-1.1.21 ] ~ [ wine-1.1.20 ] ~ [ wine-1.1.19 ] ~ [ wine-1.1.18 ] ~ [ wine-1.1.17 ] ~ [ wine-1.1.16 ] ~ [ wine-1.1.15 ] ~ [ wine-1.1.14 ] ~ [ wine-1.1.13 ] ~ [ wine-1.1.12 ] ~ [ wine-1.1.11 ] ~ [ wine-1.1.10 ] ~ [ wine-1.1.9 ] ~ [ wine-1.1.8 ] ~ [ wine-1.1.7 ] ~ [ wine-1.0.1 ] ~ [ wine-1.1.6 ] ~ [ wine-1.1.5 ] ~ [ wine-1.1.4 ] ~ [ wine-1.1.3 ] ~ [ wine-1.1.2 ] ~ [ wine-1.1.1 ] ~ [ wine-1.1.0 ] ~ [ wine-1.0 ] ~

  1 /* -*- C -*-
  2  *
  3  * Wine server protocol definition
  4  *
  5  * Copyright (C) 2001 Alexandre Julliard
  6  *
  7  * This file is used by tools/make_requests to build the
  8  * protocol structures in include/wine/server_protocol.h
  9  *
 10  * This library is free software; you can redistribute it and/or
 11  * modify it under the terms of the GNU Lesser General Public
 12  * License as published by the Free Software Foundation; either
 13  * version 2.1 of the License, or (at your option) any later version.
 14  *
 15  * This library is distributed in the hope that it will be useful,
 16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
 17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 18  * Lesser General Public License for more details.
 19  *
 20  * You should have received a copy of the GNU Lesser General Public
 21  * License along with this library; if not, write to the Free Software
 22  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
 23  */
 24 
 25 @HEADER  /* start of C declarations */
 26 
 27 #include <stdarg.h>
 28 #include <stdlib.h>
 29 #include <time.h>
 30 
 31 #include <windef.h>
 32 #include <winbase.h>
 33 
 34 typedef unsigned int obj_handle_t;
 35 typedef unsigned int user_handle_t;
 36 typedef unsigned int atom_t;
 37 typedef unsigned int process_id_t;
 38 typedef unsigned int thread_id_t;
 39 typedef unsigned int data_size_t;
 40 typedef unsigned int ioctl_code_t;
 41 typedef unsigned __int64 lparam_t;
 42 typedef unsigned __int64 apc_param_t;
 43 typedef unsigned __int64 mem_size_t;
 44 typedef unsigned __int64 file_pos_t;
 45 typedef unsigned __int64 client_ptr_t;
 46 typedef unsigned __int64 affinity_t;
 47 typedef client_ptr_t mod_handle_t;
 48 
 49 struct request_header
 50 {
 51     int          req;          /* request code */
 52     data_size_t  request_size; /* request variable part size */
 53     data_size_t  reply_size;   /* reply variable part maximum size */
 54 };
 55 
 56 struct reply_header
 57 {
 58     unsigned int error;        /* error result */
 59     data_size_t  reply_size;   /* reply variable part size */
 60 };
 61 
 62 /* placeholder structure for the maximum allowed request size */
 63 /* this is used to construct the generic_request union */
 64 struct request_max_size
 65 {
 66     int pad[16]; /* the max request size is 16 ints */
 67 };
 68 
 69 #define FIRST_USER_HANDLE 0x0020  /* first possible value for low word of user handle */
 70 #define LAST_USER_HANDLE  0xffef  /* last possible value for low word of user handle */
 71 
 72 
 73 /* debug event data */
 74 typedef union
 75 {
 76     int code;   /* event code */
 77     struct
 78     {
 79         int              code;       /* EXCEPTION_DEBUG_EVENT */
 80         int              first;      /* first chance exception? */
 81         unsigned int     exc_code;   /* exception code */
 82         unsigned int     flags;      /* exception flags */
 83         client_ptr_t     record;     /* exception record */
 84         client_ptr_t     address;    /* exception address */
 85         int              nb_params;  /* number of parameters */
 86         int              __pad;
 87         client_ptr_t     params[15]; /* parameters */
 88     } exception;
 89     struct
 90     {
 91         int          code;       /* CREATE_THREAD_DEBUG_EVENT */
 92         obj_handle_t handle;     /* handle to the new thread */
 93         client_ptr_t teb;        /* thread teb (in debugged process address space) */
 94         client_ptr_t start;      /* thread startup routine */
 95     } create_thread;
 96     struct
 97     {
 98         int          code;       /* CREATE_PROCESS_DEBUG_EVENT */
 99         obj_handle_t file;       /* handle to the process exe file */
100         obj_handle_t process;    /* handle to the new process */
101         obj_handle_t thread;     /* handle to the new thread */
102         mod_handle_t base;       /* base of executable image */
103         int          dbg_offset; /* offset of debug info in file */
104         int          dbg_size;   /* size of debug info */
105         client_ptr_t teb;        /* thread teb (in debugged process address space) */
106         client_ptr_t start;      /* thread startup routine */
107         client_ptr_t name;       /* image name (optional) */
108         int          unicode;    /* is it Unicode? */
109     } create_process;
110     struct
111     {
112         int          code;       /* EXIT_THREAD_DEBUG_EVENT/EXIT_PROCESS_DEBUG_EVENT */
113         int          exit_code;  /* thread or process exit code */
114     } exit;
115     struct
116     {
117         int          code;       /* LOAD_DLL_DEBUG_EVENT */
118         obj_handle_t handle;     /* file handle for the dll */
119         mod_handle_t base;       /* base address of the dll */
120         int          dbg_offset; /* offset of debug info in file */
121         int          dbg_size;   /* size of debug info */
122         client_ptr_t name;       /* image name (optional) */
123         int          unicode;    /* is it Unicode? */
124     } load_dll;
125     struct
126     {
127         int          code;       /* UNLOAD_DLL_DEBUG_EVENT */
128         int          __pad;
129         mod_handle_t base;       /* base address of the dll */
130     } unload_dll;
131     struct
132     {
133         int          code;       /* OUTPUT_DEBUG_STRING_EVENT */
134         int          unicode;    /* is it Unicode? */
135         client_ptr_t string;     /* string to display (in debugged process address space) */
136         data_size_t  length;     /* string length */
137     } output_string;
138     struct
139     {
140         int          code;       /* RIP_EVENT */
141         int          error;      /* ??? */
142         int          type;       /* ??? */
143     } rip_info;
144 } debug_event_t;
145 
146 /* supported CPU types */
147 enum cpu_type
148 {
149     CPU_x86, CPU_x86_64, CPU_ALPHA, CPU_POWERPC, CPU_SPARC
150 };
151 typedef int cpu_type_t;
152 
153 /* context data */
154 typedef struct
155 {
156     cpu_type_t       cpu;        /* cpu type */
157     unsigned int     flags;      /* SERVER_CTX_* flags */
158     union
159     {
160         struct { unsigned int eip, ebp, esp, eflags, cs, ss; } i386_regs;
161         struct { unsigned __int64 rip, rbp, rsp;
162                  unsigned int cs, ss, flags, mxcsr; } x86_64_regs;
163         struct { unsigned __int64 fir;
164                  unsigned int psr; } alpha_regs;
165         struct { unsigned int iar, msr, ctr, lr, dar, dsisr, trap; } powerpc_regs;
166         struct { unsigned int psr, pc, npc, y, wim, tbr; } sparc_regs;
167     } ctl;  /* selected by SERVER_CTX_CONTROL */
168     union
169     {
170         struct { unsigned int eax, ebx, ecx, edx, esi, edi; } i386_regs;
171         struct { unsigned __int64 rax,rbx, rcx, rdx, rsi, rdi,
172                                   r8, r9, r10, r11, r12, r13, r14, r15; } x86_64_regs;
173         struct { unsigned __int64 v0, t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12,
174                                   s0, s1, s2, s3, s4, s5, s6, a0, a1, a2, a3, a4, a5, at; } alpha_regs;
175         struct { unsigned int gpr[32], cr, xer; } powerpc_regs;
176         struct { unsigned int g[8], o[8], l[8], i[8]; } sparc_regs;
177     } integer;  /* selected by SERVER_CTX_INTEGER */
178     union
179     {
180         struct { unsigned int ds, es, fs, gs; } i386_regs;
181         struct { unsigned int ds, es, fs, gs; } x86_64_regs;
182     } seg;  /* selected by SERVER_CTX_SEGMENTS */
183     union
184     {
185         struct { unsigned int ctrl, status, tag, err_off, err_sel, data_off, data_sel, cr0npx;
186                  unsigned char regs[80]; } i386_regs;
187         struct { struct { unsigned __int64 low, high; } fpregs[32]; } x86_64_regs;
188         struct { unsigned __int64 f[32], fpcr, softfpcr; } alpha_regs;
189         struct { double fpr[32], fpscr; } powerpc_regs;
190     } fp;  /* selected by SERVER_CTX_FLOATING_POINT */
191     union
192     {
193         struct { unsigned int dr0, dr1, dr2, dr3, dr6, dr7; } i386_regs;
194         struct { unsigned __int64 dr0, dr1, dr2, dr3, dr6, dr7; } x86_64_regs;
195         struct { unsigned int dr[8]; } powerpc_regs;
196     } debug;  /* selected by SERVER_CTX_DEBUG_REGISTERS */
197     union
198     {
199         unsigned char i386_regs[512];
200     } ext;                       /* selected by SERVER_CTX_EXTENDED_REGISTERS */
201 } context_t;
202 
203 #define SERVER_CTX_CONTROL            0x01
204 #define SERVER_CTX_INTEGER            0x02
205 #define SERVER_CTX_SEGMENTS           0x04
206 #define SERVER_CTX_FLOATING_POINT     0x08
207 #define SERVER_CTX_DEBUG_REGISTERS    0x10
208 #define SERVER_CTX_EXTENDED_REGISTERS 0x20
209 
210 /* structure used in sending an fd from client to server */
211 struct send_fd
212 {
213     thread_id_t tid;  /* thread id */
214     int         fd;   /* file descriptor on client-side */
215 };
216 
217 /* structure sent by the server on the wait fifo */
218 struct wake_up_reply
219 {
220     client_ptr_t cookie;    /* magic cookie that was passed in select_request */
221     int          signaled;  /* wait result */
222     int          __pad;
223 };
224 
225 /* NT-style timeout, in 100ns units, negative means relative timeout */
226 typedef __int64 timeout_t;
227 #define TIMEOUT_INFINITE (((timeout_t)0x7fffffff) << 32 | 0xffffffff)
228 
229 /* structure returned in the list of window properties */
230 typedef struct
231 {
232     atom_t         atom;     /* property atom */
233     int            string;   /* was atom a string originally? */
234     lparam_t       data;     /* data stored in property */
235 } property_data_t;
236 
237 /* structure to specify window rectangles */
238 typedef struct
239 {
240     int  left;
241     int  top;
242     int  right;
243     int  bottom;
244 } rectangle_t;
245 
246 /* structure for parameters of async I/O calls */
247 typedef struct
248 {
249     obj_handle_t    handle;        /* object to perform I/O on */
250     obj_handle_t    event;         /* event to signal when done */
251     client_ptr_t    callback;      /* client-side callback to call upon end of async */
252     client_ptr_t    iosb;          /* I/O status block in client addr space */
253     client_ptr_t    arg;           /* opaque user data to pass to callback */
254     apc_param_t     cvalue;        /* completion value to use for completion events */
255 } async_data_t;
256 
257 /* structures for extra message data */
258 
259 struct hardware_msg_data
260 {
261     lparam_t        info;      /* extra info */
262     int             x;         /* x position */
263     int             y;         /* y position */
264     unsigned int    hw_id;     /* unique id */
265     int             __pad;
266 };
267 
268 struct callback_msg_data
269 {
270     client_ptr_t    callback;   /* callback function */
271     lparam_t        data;       /* user data for callback */
272     lparam_t        result;     /* message result */
273 };
274 
275 struct winevent_msg_data
276 {
277     user_handle_t   hook;       /* hook handle */
278     thread_id_t     tid;        /* thread id */
279     client_ptr_t    hook_proc;  /* hook proc address */
280     /* followed by module name if any */
281 };
282 
283 typedef union
284 {
285     unsigned char            bytes[1];   /* raw data for sent messages */
286     struct hardware_msg_data hardware;
287     struct callback_msg_data callback;
288     struct winevent_msg_data winevent;
289 } message_data_t;
290 
291 /* structure for console char/attribute info */
292 typedef struct
293 {
294     WCHAR          ch;
295     unsigned short attr;
296 } char_info_t;
297 
298 typedef struct
299 {
300     unsigned int low_part;
301     int          high_part;
302 } luid_t;
303 
304 #define MAX_ACL_LEN 65535
305 
306 struct security_descriptor
307 {
308     unsigned int control;       /* SE_ flags */
309     data_size_t  owner_len;
310     data_size_t  group_len;
311     data_size_t  sacl_len;
312     data_size_t  dacl_len;
313     /* VARARG(owner,SID); */
314     /* VARARG(group,SID); */
315     /* VARARG(sacl,ACL); */
316     /* VARARG(dacl,ACL); */
317 };
318 
319 struct object_attributes
320 {
321     obj_handle_t rootdir; /* root directory */
322     data_size_t sd_len;   /* length of security_descriptor data. may be 0 */
323     data_size_t name_len; /* length of the name string. may be 0 */
324     /* VARARG(sd,security_descriptor); */
325     /* VARARG(name,unicode_str); */
326 };
327 
328 struct token_groups
329 {
330     unsigned int count;
331     /* unsigned int attributes[count]; */
332     /* VARARG(sids,SID); */
333 };
334 
335 enum apc_type
336 {
337     APC_NONE,
338     APC_USER,
339     APC_TIMER,
340     APC_ASYNC_IO,
341     APC_VIRTUAL_ALLOC,
342     APC_VIRTUAL_FREE,
343     APC_VIRTUAL_QUERY,
344     APC_VIRTUAL_PROTECT,
345     APC_VIRTUAL_FLUSH,
346     APC_VIRTUAL_LOCK,
347     APC_VIRTUAL_UNLOCK,
348     APC_MAP_VIEW,
349     APC_UNMAP_VIEW,
350     APC_CREATE_THREAD
351 };
352 
353 typedef union
354 {
355     enum apc_type type;
356     struct
357     {
358         enum apc_type    type;     /* APC_USER */
359         int              __pad;
360         client_ptr_t     func;     /* void (__stdcall *func)(ULONG_PTR,ULONG_PTR,ULONG_PTR); */
361         apc_param_t      args[3];  /* arguments for user function */
362     } user;
363     struct
364     {
365         enum apc_type    type;     /* APC_TIMER */
366         int              __pad;
367         client_ptr_t     func;     /* void (__stdcall *func)(void*, unsigned int, unsigned int); */
368         timeout_t        time;     /* absolute time of expiration */
369         client_ptr_t     arg;      /* user argument */
370     } timer;
371     struct
372     {
373         enum apc_type    type;     /* APC_ASYNC_IO */
374         unsigned int     status;   /* I/O status */
375         client_ptr_t     func;     /* unsigned int (*func)(void*, void*, unsigned int, void **); */
376         client_ptr_t     user;     /* user pointer */
377         client_ptr_t     sb;       /* status block */
378     } async_io;
379     struct
380     {
381         enum apc_type    type;      /* APC_VIRTUAL_ALLOC */
382         unsigned int     op_type;   /* type of operation */
383         client_ptr_t     addr;      /* requested address */
384         mem_size_t       size;      /* allocation size */
385         unsigned int     zero_bits; /* allocation alignment */
386         unsigned int     prot;      /* memory protection flags */
387     } virtual_alloc;
388     struct
389     {
390         enum apc_type    type;      /* APC_VIRTUAL_FREE */
391         unsigned int     op_type;   /* type of operation */
392         client_ptr_t     addr;      /* requested address */
393         mem_size_t       size;      /* allocation size */
394     } virtual_free;
395     struct
396     {
397         enum apc_type    type;      /* APC_VIRTUAL_QUERY */
398         int              __pad;
399         client_ptr_t     addr;      /* requested address */
400     } virtual_query;
401     struct
402     {
403         enum apc_type    type;      /* APC_VIRTUAL_PROTECT */
404         unsigned int     prot;      /* new protection flags */
405         client_ptr_t     addr;      /* requested address */
406         mem_size_t       size;      /* requested size */
407     } virtual_protect;
408     struct
409     {
410         enum apc_type    type;      /* APC_VIRTUAL_FLUSH */
411         int              __pad;
412         client_ptr_t     addr;      /* requested address */
413         mem_size_t       size;      /* requested size */
414     } virtual_flush;
415     struct
416     {
417         enum apc_type    type;      /* APC_VIRTUAL_LOCK */
418         int              __pad;
419         client_ptr_t     addr;      /* requested address */
420         mem_size_t       size;      /* requested size */
421     } virtual_lock;
422     struct
423     {
424         enum apc_type    type;      /* APC_VIRTUAL_UNLOCK */
425         int              __pad;
426         client_ptr_t     addr;      /* requested address */
427         mem_size_t       size;      /* requested size */
428     } virtual_unlock;
429     struct
430     {
431         enum apc_type    type;      /* APC_MAP_VIEW */
432         obj_handle_t     handle;    /* mapping handle */
433         client_ptr_t     addr;      /* requested address */
434         mem_size_t       size;      /* allocation size */
435         file_pos_t       offset;    /* file offset */
436         unsigned int     alloc_type;/* allocation type */
437         unsigned short   zero_bits; /* allocation alignment */
438         unsigned short   prot;      /* memory protection flags */
439     } map_view;
440     struct
441     {
442         enum apc_type    type;      /* APC_UNMAP_VIEW */
443         int              __pad;
444         client_ptr_t     addr;      /* view address */
445     } unmap_view;
446     struct
447     {
448         enum apc_type    type;      /* APC_CREATE_THREAD */
449         int              suspend;   /* suspended thread? */
450         client_ptr_t     func;      /* void (__stdcall *func)(void*);  start function */
451         client_ptr_t     arg;       /* argument for start function */
452         mem_size_t       reserve;   /* reserve size for thread stack */
453         mem_size_t       commit;    /* commit size for thread stack */
454     } create_thread;
455 } apc_call_t;
456 
457 typedef union
458 {
459     enum apc_type type;
460     struct
461     {
462         enum apc_type    type;      /* APC_ASYNC_IO */
463         unsigned int     status;    /* new status of async operation */
464         client_ptr_t     apc;       /* user APC to call */
465         unsigned int     total;     /* bytes transferred */
466     } async_io;
467     struct
468     {
469         enum apc_type    type;      /* APC_VIRTUAL_ALLOC */
470         unsigned int     status;    /* status returned by call */
471         client_ptr_t     addr;      /* resulting address */
472         mem_size_t       size;      /* resulting size */
473     } virtual_alloc;
474     struct
475     {
476         enum apc_type    type;      /* APC_VIRTUAL_FREE */
477         unsigned int     status;    /* status returned by call */
478         client_ptr_t     addr;      /* resulting address */
479         mem_size_t       size;      /* resulting size */
480     } virtual_free;
481     struct
482     {
483         enum apc_type    type;      /* APC_VIRTUAL_QUERY */
484         unsigned int     status;    /* status returned by call */
485         client_ptr_t     base;      /* resulting base address */
486         client_ptr_t     alloc_base;/* resulting allocation base */
487         mem_size_t       size;      /* resulting region size */
488         unsigned short   state;     /* resulting region state */
489         unsigned short   prot;      /* resulting region protection */
490         unsigned short   alloc_prot;/* resulting allocation protection */
491         unsigned short   alloc_type;/* resulting region allocation type */
492     } virtual_query;
493     struct
494     {
495         enum apc_type    type;      /* APC_VIRTUAL_PROTECT */
496         unsigned int     status;    /* status returned by call */
497         client_ptr_t     addr;      /* resulting address */
498         mem_size_t       size;      /* resulting size */
499         unsigned int     prot;      /* old protection flags */
500     } virtual_protect;
501     struct
502     {
503         enum apc_type    type;      /* APC_VIRTUAL_FLUSH */
504         unsigned int     status;    /* status returned by call */
505         client_ptr_t     addr;      /* resulting address */
506         mem_size_t       size;      /* resulting size */
507     } virtual_flush;
508     struct
509     {
510         enum apc_type    type;      /* APC_VIRTUAL_LOCK */
511         unsigned int     status;    /* status returned by call */
512         client_ptr_t     addr;      /* resulting address */
513         mem_size_t       size;      /* resulting size */
514     } virtual_lock;
515     struct
516     {
517         enum apc_type    type;      /* APC_VIRTUAL_UNLOCK */
518         unsigned int     status;    /* status returned by call */
519         client_ptr_t     addr;      /* resulting address */
520         mem_size_t       size;      /* resulting size */
521     } virtual_unlock;
522     struct
523     {
524         enum apc_type    type;      /* APC_MAP_VIEW */
525         unsigned int     status;    /* status returned by call */
526         client_ptr_t     addr;      /* resulting address */
527         mem_size_t       size;      /* resulting size */
528     } map_view;
529     struct
530     {
531         enum apc_type    type;      /* APC_MAP_VIEW */
532         unsigned int     status;    /* status returned by call */
533     } unmap_view;
534     struct
535     {
536         enum apc_type    type;      /* APC_CREATE_THREAD */
537         unsigned int     status;    /* status returned by call */
538         thread_id_t      tid;       /* thread id */
539         obj_handle_t     handle;    /* handle to new thread */
540     } create_thread;
541 } apc_result_t;
542 
543 /****************************************************************/
544 /* Request declarations */
545 
546 /* Create a new process from the context of the parent */
547 @REQ(new_process)
548     int          inherit_all;    /* inherit all handles from parent */
549     unsigned int create_flags;   /* creation flags */
550     int          socket_fd;      /* file descriptor for process socket */
551     obj_handle_t exe_file;       /* file handle for main exe */
552     obj_handle_t hstdin;         /* handle for stdin */
553     obj_handle_t hstdout;        /* handle for stdout */
554     obj_handle_t hstderr;        /* handle for stderr */
555     unsigned int process_access; /* access rights for process object */
556     unsigned int process_attr;   /* attributes for process object */
557     unsigned int thread_access;  /* access rights for thread object */
558     unsigned int thread_attr;    /* attributes for thread object */
559     VARARG(info,startup_info);   /* startup information */
560     VARARG(env,unicode_str);     /* environment for new process */
561 @REPLY
562     obj_handle_t info;           /* new process info handle */
563     process_id_t pid;            /* process id */
564     obj_handle_t phandle;        /* process handle (in the current process) */
565     thread_id_t  tid;            /* thread id */
566     obj_handle_t thandle;        /* thread handle (in the current process) */
567 @END
568 
569 
570 /* Retrieve information about a newly started process */
571 @REQ(get_new_process_info)
572     obj_handle_t info;           /* info handle returned from new_process_request */
573 @REPLY
574     int          success;      /* did the process start successfully? */
575     int          exit_code;    /* process exit code if failed */
576 @END
577 
578 
579 /* Create a new thread from the context of the parent */
580 @REQ(new_thread)
581     unsigned int access;       /* wanted access rights */
582     unsigned int attributes;   /* object attributes */
583     int          suspend;      /* new thread should be suspended on creation */
584     int          request_fd;   /* fd for request pipe */
585 @REPLY
586     thread_id_t  tid;          /* thread id */
587     obj_handle_t handle;       /* thread handle (in the current process) */
588 @END
589 
590 
591 /* Retrieve the new process startup info */
592 @REQ(get_startup_info)
593 @REPLY
594     obj_handle_t exe_file;     /* file handle for main exe */
595     obj_handle_t hstdin;       /* handle for stdin */
596     obj_handle_t hstdout;      /* handle for stdout */
597     obj_handle_t hstderr;      /* handle for stderr */
598     VARARG(info,startup_info); /* startup information */
599     VARARG(env,unicode_str);   /* environment */
600 @END
601 
602 
603 /* Signal the end of the process initialization */
604 @REQ(init_process_done)
605     int          gui;          /* is it a GUI process? */
606     mod_handle_t module;       /* main module base address */
607     client_ptr_t ldt_copy;     /* address of LDT copy (in thread address space) */
608     client_ptr_t entry;        /* process entry point */
609 @END
610 
611 
612 /* Initialize a thread; called from the child after fork()/clone() */
613 @REQ(init_thread)
614     int          unix_pid;     /* Unix pid of new thread */
615     int          unix_tid;     /* Unix tid of new thread */
616     int          debug_level;  /* new debug level */
617     client_ptr_t teb;          /* TEB of new thread (in thread address space) */
618     client_ptr_t entry;        /* entry point or PEB if initial thread (in thread address space) */
619     int          reply_fd;     /* fd for reply pipe */
620     int          wait_fd;      /* fd for blocking calls pipe */
621     cpu_type_t   cpu;          /* CPU that this thread is running on */
622 @REPLY
623     process_id_t pid;          /* process id of the new thread's process */
624     thread_id_t  tid;          /* thread id of the new thread */
625     timeout_t    server_start; /* server start time */
626     data_size_t  info_size;    /* total size of startup info */
627     int          version;      /* protocol version */
628     unsigned int all_cpus;     /* bitset of supported CPUs */
629 @END
630 
631 
632 /* Terminate a process */
633 @REQ(terminate_process)
634     obj_handle_t handle;       /* process handle to terminate */
635     int          exit_code;    /* process exit code */
636 @REPLY
637     int          self;         /* suicide? */
638 @END
639 
640 
641 /* Terminate a thread */
642 @REQ(terminate_thread)
643     obj_handle_t handle;       /* thread handle to terminate */
644     int          exit_code;    /* thread exit code */
645 @REPLY
646     int          self;         /* suicide? */
647     int          last;         /* last thread in this process? */
648 @END
649 
650 
651 /* Retrieve information about a process */
652 @REQ(get_process_info)
653     obj_handle_t handle;           /* process handle */
654 @REPLY
655     process_id_t pid;              /* server process id */
656     process_id_t ppid;             /* server process id of parent */
657     affinity_t   affinity;         /* process affinity mask */
658     client_ptr_t peb;              /* PEB address in process address space */
659     timeout_t    start_time;       /* process start time */
660     timeout_t    end_time;         /* process end time */
661     int          exit_code;        /* process exit code */
662     int          priority;         /* priority class */
663     cpu_type_t   cpu;              /* CPU that this process is running on */
664 @END
665 
666 
667 /* Set a process informations */
668 @REQ(set_process_info)
669     obj_handle_t handle;       /* process handle */
670     int          mask;         /* setting mask (see below) */
671     int          priority;     /* priority class */
672     affinity_t   affinity;     /* affinity mask */
673 @END
674 #define SET_PROCESS_INFO_PRIORITY 0x01
675 #define SET_PROCESS_INFO_AFFINITY 0x02
676 
677 
678 /* Retrieve information about a thread */
679 @REQ(get_thread_info)
680     obj_handle_t handle;        /* thread handle */
681     thread_id_t  tid_in;        /* thread id (optional) */
682 @REPLY
683     process_id_t pid;           /* server process id */
684     thread_id_t  tid;           /* server thread id */
685     client_ptr_t teb;           /* thread teb pointer */
686     affinity_t   affinity;      /* thread affinity mask */
687     timeout_t    creation_time; /* thread creation time */
688     timeout_t    exit_time;     /* thread exit time */
689     int          exit_code;     /* thread exit code */
690     int          priority;      /* thread priority level */
691     int          last;          /* last thread in process */
692 @END
693 
694 
695 /* Set a thread informations */
696 @REQ(set_thread_info)
697     obj_handle_t handle;       /* thread handle */
698     int          mask;         /* setting mask (see below) */
699     int          priority;     /* priority class */
700     affinity_t   affinity;     /* affinity mask */
701     obj_handle_t token;        /* impersonation token */
702 @END
703 #define SET_THREAD_INFO_PRIORITY 0x01
704 #define SET_THREAD_INFO_AFFINITY 0x02
705 #define SET_THREAD_INFO_TOKEN    0x04
706 
707 
708 /* Retrieve information about a module */
709 @REQ(get_dll_info)
710     obj_handle_t handle;       /* process handle */
711     mod_handle_t base_address; /* base address of module */
712 @REPLY
713     client_ptr_t entry_point;
714     data_size_t  size;            /* module size */
715     data_size_t  filename_len;    /* buffer len in bytes required to store filename */
716     VARARG(filename,unicode_str); /* file name of module */
717 @END
718 
719 
720 /* Suspend a thread */
721 @REQ(suspend_thread)
722     obj_handle_t handle;       /* thread handle */
723 @REPLY
724     int          count;        /* new suspend count */
725 @END
726 
727 
728 /* Resume a thread */
729 @REQ(resume_thread)
730     obj_handle_t handle;       /* thread handle */
731 @REPLY
732     int          count;        /* new suspend count */
733 @END
734 
735 
736 /* Notify the server that a dll has been loaded */
737 @REQ(load_dll)
738     obj_handle_t handle;       /* file handle */
739     mod_handle_t base;         /* base address */
740     client_ptr_t name;         /* ptr to ptr to name (in process addr space) */
741     data_size_t  size;         /* dll size */
742     int          dbg_offset;   /* debug info offset */
743     int          dbg_size;     /* debug info size */
744     VARARG(filename,unicode_str); /* file name of dll */
745 @END
746 
747 
748 /* Notify the server that a dll is being unloaded */
749 @REQ(unload_dll)
750     mod_handle_t base;         /* base address */
751 @END
752 
753 
754 /* Queue an APC for a thread or process */
755 @REQ(queue_apc)
756     obj_handle_t handle;       /* thread or process handle */
757     apc_call_t   call;         /* call arguments */
758 @REPLY
759     obj_handle_t handle;       /* APC handle */
760     int          self;         /* run APC in caller itself? */
761 @END
762 
763 
764 /* Get the result of an APC call */
765 @REQ(get_apc_result)
766     obj_handle_t handle;       /* handle to the APC */
767 @REPLY
768     apc_result_t result;       /* result of the APC */
769 @END
770 
771 
772 /* Close a handle for the current process */
773 @REQ(close_handle)
774     obj_handle_t handle;       /* handle to close */
775 @END
776 
777 
778 /* Set a handle information */
779 @REQ(set_handle_info)
780     obj_handle_t handle;       /* handle we are interested in */
781     int          flags;        /* new handle flags */
782     int          mask;         /* mask for flags to set */
783 @REPLY
784     int          old_flags;    /* old flag value */
785 @END
786 
787 
788 /* Duplicate a handle */
789 @REQ(dup_handle)
790     obj_handle_t src_process;  /* src process handle */
791     obj_handle_t src_handle;   /* src handle to duplicate */
792     obj_handle_t dst_process;  /* dst process handle */
793     unsigned int access;       /* wanted access rights */
794     unsigned int attributes;   /* object attributes */
795     unsigned int options;      /* duplicate options (see below) */
796 @REPLY
797     obj_handle_t handle;       /* duplicated handle in dst process */
798     int          self;         /* is the source the current process? */
799     int          closed;       /* whether the source handle has been closed */
800 @END
801 #define DUP_HANDLE_CLOSE_SOURCE  DUPLICATE_CLOSE_SOURCE
802 #define DUP_HANDLE_SAME_ACCESS   DUPLICATE_SAME_ACCESS
803 #define DUP_HANDLE_MAKE_GLOBAL   0x80000000  /* Not a Windows flag */
804 
805 
806 /* Open a handle to a process */
807 @REQ(open_process)
808     process_id_t pid;          /* process id to open */
809     unsigned int access;       /* wanted access rights */
810     unsigned int attributes;   /* object attributes */
811 @REPLY
812     obj_handle_t handle;       /* handle to the process */
813 @END
814 
815 
816 /* Open a handle to a thread */
817 @REQ(open_thread)
818     thread_id_t  tid;          /* thread id to open */
819     unsigned int access;       /* wanted access rights */
820     unsigned int attributes;   /* object attributes */
821 @REPLY
822     obj_handle_t handle;       /* handle to the thread */
823 @END
824 
825 
826 /* Wait for handles */
827 @REQ(select)
828     int          flags;        /* wait flags (see below) */
829     client_ptr_t cookie;       /* magic cookie to return to client */
830     obj_handle_t signal;       /* object to signal (0 if none) */
831     obj_handle_t prev_apc;     /* handle to previous APC */
832     timeout_t    timeout;      /* timeout */
833     VARARG(result,apc_result); /* result of previous APC */
834     VARARG(handles,handles);   /* handles to select on */
835 @REPLY
836     timeout_t    timeout;      /* timeout converted to absolute */
837     apc_call_t   call;         /* APC call arguments */
838     obj_handle_t apc_handle;   /* handle to next APC */
839 @END
840 #define SELECT_ALL           1
841 #define SELECT_ALERTABLE     2
842 #define SELECT_INTERRUPTIBLE 4
843 
844 
845 /* Create an event */
846 @REQ(create_event)
847     unsigned int access;        /* wanted access rights */
848     unsigned int attributes;    /* object attributes */
849     int          manual_reset;  /* manual reset event */
850     int          initial_state; /* initial state of the event */
851     VARARG(objattr,object_attributes); /* object attributes */
852 @REPLY
853     obj_handle_t handle;        /* handle to the event */
854 @END
855 
856 /* Event operation */
857 @REQ(event_op)
858     obj_handle_t  handle;       /* handle to event */
859     int           op;           /* event operation (see below) */
860 @END
861 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
862 
863 
864 /* Open an event */
865 @REQ(open_event)
866     unsigned int access;        /* wanted access rights */
867     unsigned int attributes;    /* object attributes */
868     obj_handle_t rootdir;       /* root directory */
869     VARARG(name,unicode_str);   /* object name */
870 @REPLY
871     obj_handle_t handle;        /* handle to the event */
872 @END
873 
874 
875 /* Create a mutex */
876 @REQ(create_mutex)
877     unsigned int access;        /* wanted access rights */
878     unsigned int attributes;    /* object attributes */
879     int          owned;         /* initially owned? */
880     VARARG(objattr,object_attributes); /* object attributes */
881 @REPLY
882     obj_handle_t handle;        /* handle to the mutex */
883 @END
884 
885 
886 /* Release a mutex */
887 @REQ(release_mutex)
888     obj_handle_t handle;        /* handle to the mutex */
889 @REPLY
890     unsigned int prev_count;    /* value of internal counter, before release */
891 @END
892 
893 
894 /* Open a mutex */
895 @REQ(open_mutex)
896     unsigned int access;        /* wanted access rights */
897     unsigned int attributes;    /* object attributes */
898     obj_handle_t rootdir;       /* root directory */
899     VARARG(name,unicode_str);   /* object name */
900 @REPLY
901     obj_handle_t handle;        /* handle to the mutex */
902 @END
903 
904 
905 /* Create a semaphore */
906 @REQ(create_semaphore)
907     unsigned int access;        /* wanted access rights */
908     unsigned int attributes;    /* object attributes */
909     unsigned int initial;       /* initial count */
910     unsigned int max;           /* maximum count */
911     VARARG(objattr,object_attributes); /* object attributes */
912 @REPLY
913     obj_handle_t handle;        /* handle to the semaphore */
914 @END
915 
916 
917 /* Release a semaphore */
918 @REQ(release_semaphore)
919     obj_handle_t handle;        /* handle to the semaphore */
920     unsigned int count;         /* count to add to semaphore */
921 @REPLY
922     unsigned int prev_count;    /* previous semaphore count */
923 @END
924 
925 
926 /* Open a semaphore */
927 @REQ(open_semaphore)
928     unsigned int access;        /* wanted access rights */
929     unsigned int attributes;    /* object attributes */
930     obj_handle_t rootdir;       /* root directory */
931     VARARG(name,unicode_str);   /* object name */
932 @REPLY
933     obj_handle_t handle;        /* handle to the semaphore */
934 @END
935 
936 
937 /* Create a file */
938 @REQ(create_file)
939     unsigned int access;        /* wanted access rights */
940     unsigned int attributes;    /* object attributes */
941     unsigned int sharing;       /* sharing flags */
942     int          create;        /* file create action */
943     unsigned int options;       /* file options */
944     unsigned int attrs;         /* file attributes for creation */
945     VARARG(objattr,object_attributes); /* object attributes */
946     VARARG(filename,string);    /* file name */
947 @REPLY
948     obj_handle_t handle;        /* handle to the file */
949 @END
950 
951 
952 /* Open a file object */
953 @REQ(open_file_object)
954     unsigned int access;        /* wanted access rights */
955     unsigned int attributes;    /* open attributes */
956     obj_handle_t rootdir;       /* root directory */
957     unsigned int sharing;       /* sharing flags */
958     unsigned int options;       /* file options */
959     VARARG(filename,unicode_str); /* file name */
960 @REPLY
961     obj_handle_t handle;        /* handle to the file */
962 @END
963 
964 
965 /* Allocate a file handle for a Unix fd */
966 @REQ(alloc_file_handle)
967     unsigned int access;        /* wanted access rights */
968     unsigned int attributes;    /* object attributes */
969     int          fd;            /* file descriptor on the client side */
970 @REPLY
971     obj_handle_t handle;        /* handle to the file */
972 @END
973 
974 
975 /* Get a Unix fd to access a file */
976 @REQ(get_handle_fd)
977     obj_handle_t handle;        /* handle to the file */
978 @REPLY
979     int          type;          /* file type (see below) */
980     int          removable;     /* is file removable? */
981     unsigned int access;        /* file access rights */
982     unsigned int options;       /* file open options */
983 @END
984 enum server_fd_type
985 {
986     FD_TYPE_INVALID,  /* invalid file (no associated fd) */
987     FD_TYPE_FILE,     /* regular file */
988     FD_TYPE_DIR,      /* directory */
989     FD_TYPE_SOCKET,   /* socket */
990     FD_TYPE_SERIAL,   /* serial port */
991     FD_TYPE_PIPE,     /* named pipe */
992     FD_TYPE_MAILSLOT, /* mailslot */
993     FD_TYPE_CHAR,     /* unspecified char device */
994     FD_TYPE_DEVICE,   /* Windows device file */
995     FD_TYPE_NB_TYPES
996 };
997 
998 
999 /* Flush a file buffers */
1000 @REQ(flush_file)
1001     obj_handle_t handle;        /* handle to the file */
1002 @REPLY
1003     obj_handle_t event;         /* event set when finished */
1004 @END
1005 
1006 
1007 /* Lock a region of a file */
1008 @REQ(lock_file)
1009     obj_handle_t handle;        /* handle to the file */
1010     file_pos_t   offset;        /* offset of start of lock */
1011     file_pos_t   count;         /* count of bytes to lock */
1012     int          shared;        /* shared or exclusive lock? */
1013     int          wait;          /* do we want to wait? */
1014 @REPLY
1015     obj_handle_t handle;        /* handle to wait on */
1016     int          overlapped;    /* is it an overlapped I/O handle? */
1017 @END
1018 
1019 
1020 /* Unlock a region of a file */
1021 @REQ(unlock_file)
1022     obj_handle_t handle;        /* handle to the file */
1023     file_pos_t   offset;        /* offset of start of unlock */
1024     file_pos_t   count;         /* count of bytes to unlock */
1025 @END
1026 
1027 
1028 /* Create a socket */
1029 @REQ(create_socket)
1030     unsigned int access;        /* wanted access rights */
1031     unsigned int attributes;    /* object attributes */
1032     int          family;        /* family, see socket manpage */
1033     int          type;          /* type, see socket manpage */
1034     int          protocol;      /* protocol, see socket manpage */
1035     unsigned int flags;         /* socket flags */
1036 @REPLY
1037     obj_handle_t handle;        /* handle to the new socket */
1038 @END
1039 
1040 
1041 /* Accept a socket */
1042 @REQ(accept_socket)
1043     obj_handle_t lhandle;       /* handle to the listening socket */
1044     unsigned int access;        /* wanted access rights */
1045     unsigned int attributes;    /* object attributes */
1046 @REPLY
1047     obj_handle_t handle;        /* handle to the new socket */
1048 @END
1049 
1050 
1051 /* Set socket event parameters */
1052 @REQ(set_socket_event)
1053     obj_handle_t  handle;        /* handle to the socket */
1054     unsigned int  mask;          /* event mask */
1055     obj_handle_t  event;         /* event object */
1056     user_handle_t window;        /* window to send the message to */
1057     unsigned int  msg;           /* message to send */
1058 @END
1059 
1060 
1061 /* Get socket event parameters */
1062 @REQ(get_socket_event)
1063     obj_handle_t handle;        /* handle to the socket */
1064     int          service;       /* clear pending? */
1065     obj_handle_t c_event;       /* event to clear */
1066 @REPLY
1067     unsigned int mask;          /* event mask */
1068     unsigned int pmask;         /* pending events */
1069     unsigned int state;         /* status bits */
1070     VARARG(errors,ints);        /* event errors */
1071 @END
1072 
1073 
1074 /* Reenable pending socket events */
1075 @REQ(enable_socket_event)
1076     obj_handle_t handle;        /* handle to the socket */
1077     unsigned int mask;          /* events to re-enable */
1078     unsigned int sstate;        /* status bits to set */
1079     unsigned int cstate;        /* status bits to clear */
1080 @END
1081 
1082 @REQ(set_socket_deferred)
1083     obj_handle_t handle;        /* handle to the socket */
1084     obj_handle_t deferred;      /* handle to the socket for which accept() is deferred */
1085 @END
1086 
1087 /* Allocate a console (only used by a console renderer) */
1088 @REQ(alloc_console)
1089     unsigned int access;        /* wanted access rights */
1090     unsigned int attributes;    /* object attributes */
1091     process_id_t pid;           /* pid of process which shall be attached to the console */
1092 @REPLY
1093     obj_handle_t handle_in;     /* handle to console input */
1094     obj_handle_t event;         /* handle to renderer events change notification */
1095 @END
1096 
1097 
1098 /* Free the console of the current process */
1099 @REQ(free_console)
1100 @END
1101 
1102 
1103 #define CONSOLE_RENDERER_NONE_EVENT        0x00
1104 #define CONSOLE_RENDERER_TITLE_EVENT       0x01
1105 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT   0x02
1106 #define CONSOLE_RENDERER_SB_RESIZE_EVENT   0x03
1107 #define CONSOLE_RENDERER_UPDATE_EVENT      0x04
1108 #define CONSOLE_RENDERER_CURSOR_POS_EVENT  0x05
1109 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
1110 #define CONSOLE_RENDERER_DISPLAY_EVENT     0x07
1111 #define CONSOLE_RENDERER_EXIT_EVENT        0x08
1112 struct console_renderer_event
1113 {
1114     short event;
1115     union
1116     {
1117         struct update
1118         {
1119             short top;
1120             short bottom;
1121         } update;
1122         struct resize
1123         {
1124             short width;
1125             short height;
1126         } resize;
1127         struct cursor_pos
1128         {
1129             short x;
1130             short y;
1131         } cursor_pos;
1132         struct cursor_geom
1133         {
1134             short visible;
1135             short size;
1136         } cursor_geom;
1137         struct display
1138         {
1139             short left;
1140             short top;
1141             short width;
1142             short height;
1143         } display;
1144     } u;
1145 };
1146 
1147 /* retrieve console events for the renderer */
1148 @REQ(get_console_renderer_events)
1149     obj_handle_t handle;        /* handle to console input events */
1150 @REPLY
1151     VARARG(data,bytes);         /* the various console_renderer_events */
1152 @END
1153 
1154 
1155 /* Open a handle to the process console */
1156 @REQ(open_console)
1157     obj_handle_t from;          /* 0 (resp 1) input (resp output) of current process console */
1158                                 /* otherwise console_in handle to get active screen buffer? */
1159     unsigned int access;        /* wanted access rights */
1160     unsigned int attributes;    /* object attributes */
1161     int          share;         /* share mask (only for output handles) */
1162 @REPLY
1163     obj_handle_t handle;        /* handle to the console */
1164 @END
1165 
1166 
1167 /* Get the input queue wait event */
1168 @REQ(get_console_wait_event)
1169 @REPLY
1170     obj_handle_t handle;
1171 @END
1172 
1173 /* Get a console mode (input or output) */
1174 @REQ(get_console_mode)
1175     obj_handle_t handle;        /* handle to the console */
1176 @REPLY
1177     int          mode;          /* console mode */
1178 @END
1179 
1180 
1181 /* Set a console mode (input or output) */
1182 @REQ(set_console_mode)
1183     obj_handle_t handle;        /* handle to the console */
1184     int          mode;          /* console mode */
1185 @END
1186 
1187 
1188 /* Set info about a console (input only) */
1189 @REQ(set_console_input_info)
1190     obj_handle_t  handle;        /* handle to console input, or 0 for process' console */
1191     int           mask;          /* setting mask (see below) */
1192     obj_handle_t  active_sb;     /* active screen buffer */
1193     int           history_mode;  /* whether we duplicate lines in history */
1194     int           history_size;  /* number of lines in history */
1195     int           edition_mode;  /* index to the edition mode flavors */
1196     int           input_cp;      /* console input codepage */
1197     int           output_cp;     /* console output codepage */
1198     user_handle_t win;           /* console window if backend supports it */
1199     VARARG(title,unicode_str);   /* console title */
1200 @END
1201 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB        0x01
1202 #define SET_CONSOLE_INPUT_INFO_TITLE            0x02
1203 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE     0x04
1204 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE     0x08
1205 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE     0x10
1206 #define SET_CONSOLE_INPUT_INFO_INPUT_CODEPAGE   0x20
1207 #define SET_CONSOLE_INPUT_INFO_OUTPUT_CODEPAGE  0x40
1208 #define SET_CONSOLE_INPUT_INFO_WIN              0x80
1209 
1210 
1211 /* Get info about a console (input only) */
1212 @REQ(get_console_input_info)
1213     obj_handle_t  handle;         /* handle to console input, or 0 for process' console */
1214 @REPLY
1215     int           history_mode;   /* whether we duplicate lines in history */
1216     int           history_size;   /* number of lines in history */
1217     int           history_index;  /* number of used lines in history */
1218     int           edition_mode;   /* index to the edition mode flavors */
1219     int           input_cp;       /* console input codepage */
1220     int           output_cp;      /* console output codepage */
1221     user_handle_t win;            /* console window if backend supports it */
1222     VARARG(title,unicode_str);    /* console title */
1223 @END
1224 
1225 
1226 /* appends a string to console's history */
1227 @REQ(append_console_input_history)
1228     obj_handle_t handle;        /* handle to console input, or 0 for process' console */
1229     VARARG(line,unicode_str);   /* line to add */
1230 @END
1231 
1232 
1233 /* appends a string to console's history */
1234 @REQ(get_console_input_history)
1235     obj_handle_t handle;        /* handle to console input, or 0 for process' console */
1236     int          index;         /* index to get line from */
1237 @REPLY
1238     int          total;         /* total length of line in Unicode chars */
1239     VARARG(line,unicode_str);   /* line to add */
1240 @END
1241 
1242 
1243 /* creates a new screen buffer on process' console */
1244 @REQ(create_console_output)
1245     obj_handle_t handle_in;     /* handle to console input, or 0 for process' console */
1246     unsigned int access;        /* wanted access rights */
1247     unsigned int attributes;    /* object attributes */
1248     unsigned int share;         /* sharing credentials */
1249 @REPLY
1250     obj_handle_t handle_out;    /* handle to the screen buffer */
1251 @END
1252 
1253 
1254 /* Set info about a console (output only) */
1255 @REQ(set_console_output_info)
1256     obj_handle_t handle;        /* handle to the console */
1257     int          mask;          /* setting mask (see below) */
1258     short int    cursor_size;   /* size of cursor (percentage filled) */
1259     short int    cursor_visible;/* cursor visibility flag */
1260     short int    cursor_x;      /* position of cursor (x, y) */
1261     short int    cursor_y;
1262     short int    width;         /* width of the screen buffer */
1263     short int    height;        /* height of the screen buffer */
1264     short int    attr;          /* default attribute */
1265     short int    win_left;      /* window actually displayed by renderer */
1266     short int    win_top;       /* the rect area is expressed withing the */
1267     short int    win_right;     /* boundaries of the screen buffer */
1268     short int    win_bottom;
1269     short int    max_width;     /* maximum size (width x height) for the window */
1270     short int    max_height;
1271 @END
1272 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM     0x01
1273 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS      0x02
1274 #define SET_CONSOLE_OUTPUT_INFO_SIZE            0x04
1275 #define SET_CONSOLE_OUTPUT_INFO_ATTR            0x08
1276 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW  0x10
1277 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE        0x20
1278 
1279 
1280 /* Get info about a console (output only) */
1281 @REQ(get_console_output_info)
1282     obj_handle_t handle;        /* handle to the console */
1283 @REPLY
1284     short int    cursor_size;   /* size of cursor (percentage filled) */
1285     short int    cursor_visible;/* cursor visibility flag */
1286     short int    cursor_x;      /* position of cursor (x, y) */
1287     short int    cursor_y;
1288     short int    width;         /* width of the screen buffer */
1289     short int    height;        /* height of the screen buffer */
1290     short int    attr;          /* default attribute */
1291     short int    win_left;      /* window actually displayed by renderer */
1292     short int    win_top;       /* the rect area is expressed withing the */
1293     short int    win_right;     /* boundaries of the screen buffer */
1294     short int    win_bottom;
1295     short int    max_width;     /* maximum size (width x height) for the window */
1296     short int    max_height;
1297 @END
1298 
1299 /* Add input records to a console input queue */
1300 @REQ(write_console_input)
1301     obj_handle_t handle;        /* handle to the console input */
1302     VARARG(rec,input_records);  /* input records */
1303 @REPLY
1304     int          written;       /* number of records written */
1305 @END
1306 
1307 
1308 /* Fetch input records from a console input queue */
1309 @REQ(read_console_input)
1310     obj_handle_t handle;        /* handle to the console input */
1311     int          flush;         /* flush the retrieved records from the queue? */
1312 @REPLY
1313     int          read;          /* number of records read */
1314     VARARG(rec,input_records);  /* input records */
1315 @END
1316 
1317 
1318 /* write data (chars and/or attributes) in a screen buffer */
1319 @REQ(write_console_output)
1320     obj_handle_t handle;        /* handle to the console output */
1321     int          x;             /* position where to start writing */
1322     int          y;
1323     int          mode;          /* char info (see below) */
1324     int          wrap;          /* wrap around at end of line? */
1325     VARARG(data,bytes);         /* info to write */
1326 @REPLY
1327     int          written;       /* number of char infos actually written */
1328     int          width;         /* width of screen buffer */
1329     int          height;        /* height of screen buffer */
1330 @END
1331 enum char_info_mode
1332 {
1333     CHAR_INFO_MODE_TEXT,        /* characters only */
1334     CHAR_INFO_MODE_ATTR,        /* attributes only */
1335     CHAR_INFO_MODE_TEXTATTR,    /* both characters and attributes */
1336     CHAR_INFO_MODE_TEXTSTDATTR  /* characters but use standard attributes */
1337 };
1338 
1339 
1340 /* fill a screen buffer with constant data (chars and/or attributes) */
1341 @REQ(fill_console_output)
1342     obj_handle_t handle;        /* handle to the console output */
1343     int          x;             /* position where to start writing */
1344     int          y;
1345     int          mode;          /* char info mode */
1346     int          count;         /* number to write */
1347     int          wrap;          /* wrap around at end of line? */
1348     char_info_t  data;          /* data to write */
1349 @REPLY
1350     int          written;       /* number of char infos actually written */
1351 @END
1352 
1353 
1354 /* read data (chars and/or attributes) from a screen buffer */
1355 @REQ(read_console_output)
1356     obj_handle_t handle;        /* handle to the console output */
1357     int          x;             /* position (x,y) where to start reading */
1358     int          y;
1359     int          mode;          /* char info mode */
1360     int          wrap;          /* wrap around at end of line? */
1361 @REPLY
1362     int          width;         /* width of screen buffer */
1363     int          height;        /* height of screen buffer */
1364     VARARG(data,bytes);
1365 @END
1366 
1367 
1368 /* move a rect (of data) in screen buffer content */
1369 @REQ(move_console_output)
1370     obj_handle_t handle;        /* handle to the console output */
1371     short int    x_src;         /* position (x, y) of rect to start moving from */
1372     short int    y_src;
1373     short int    x_dst;         /* position (x, y) of rect to move to */
1374     short int    y_dst;
1375     short int    w;             /* size of the rect (width, height) to move */
1376     short int    h;
1377 @END
1378 
1379 
1380 /* Sends a signal to a process group */
1381 @REQ(send_console_signal)
1382     int          signal;        /* the signal to send */
1383     process_id_t group_id;      /* the group to send the signal to */
1384 @END
1385 
1386 
1387 /* enable directory change notifications */
1388 @REQ(read_directory_changes)
1389     unsigned int filter;        /* notification filter */
1390     int          subtree;       /* watch the subtree? */
1391     int          want_data;     /* flag indicating whether change data should be collected */
1392     async_data_t async;         /* async I/O parameters */
1393 @END
1394 
1395 
1396 @REQ(read_change)
1397     obj_handle_t handle;
1398 @REPLY
1399     int          action;        /* type of change */
1400     VARARG(name,string);        /* name of directory entry that changed */
1401 @END
1402 
1403 
1404 /* Create a file mapping */
1405 @REQ(create_mapping)
1406     unsigned int access;        /* wanted access rights */
1407     unsigned int attributes;    /* object attributes */
1408     unsigned int protect;       /* protection flags (see below) */
1409     mem_size_t   size;          /* mapping size */
1410     obj_handle_t file_handle;   /* file handle */
1411     VARARG(objattr,object_attributes); /* object attributes */
1412 @REPLY
1413     obj_handle_t handle;        /* handle to the mapping */
1414 @END
1415 /* per-page protection flags */
1416 #define VPROT_READ       0x01
1417 #define VPROT_WRITE      0x02
1418 #define VPROT_EXEC       0x04
1419 #define VPROT_WRITECOPY  0x08
1420 #define VPROT_GUARD      0x10
1421 #define VPROT_NOCACHE    0x20
1422 #define VPROT_COMMITTED  0x40
1423 #define VPROT_WRITEWATCH 0x80
1424 /* per-mapping protection flags */
1425 #define VPROT_IMAGE      0x0100  /* mapping for an exe image */
1426 #define VPROT_SYSTEM     0x0200  /* system view (underlying mmap not under our control) */
1427 #define VPROT_VALLOC     0x0400  /* allocated by VirtualAlloc */
1428 #define VPROT_NOEXEC     0x0800  /* don't force exec permission */
1429 
1430 
1431 /* Open a mapping */
1432 @REQ(open_mapping)
1433     unsigned int access;        /* wanted access rights */
1434     unsigned int attributes;    /* object attributes */
1435     obj_handle_t rootdir;       /* root directory */
1436     VARARG(name,unicode_str);   /* object name */
1437 @REPLY
1438     obj_handle_t handle;        /* handle to the mapping */
1439 @END
1440 
1441 
1442 /* Get information about a file mapping */
1443 @REQ(get_mapping_info)
1444     obj_handle_t handle;        /* handle to the mapping */
1445     unsigned int access;        /* wanted access rights */
1446 @REPLY
1447     mem_size_t   size;          /* mapping size */
1448     int          protect;       /* protection flags */
1449     int          header_size;   /* header size (for VPROT_IMAGE mapping) */
1450     client_ptr_t base;          /* default base addr (for VPROT_IMAGE mapping) */
1451     obj_handle_t mapping;       /* duplicate mapping handle unless removable */
1452     obj_handle_t shared_file;   /* shared mapping file handle */
1453 @END
1454 
1455 
1456 /* Get a range of committed pages in a file mapping */
1457 @REQ(get_mapping_committed_range)
1458     obj_handle_t handle;        /* handle to the mapping */
1459     file_pos_t   offset;        /* starting offset (page-aligned, in bytes) */
1460 @REPLY
1461     mem_size_t   size;          /* size of range starting at offset (page-aligned, in bytes) */
1462     int          committed;     /* whether it is a committed range */
1463 @END
1464 
1465 
1466 /* Add a range to the committed pages in a file mapping */
1467 @REQ(add_mapping_committed_range)
1468     obj_handle_t handle;        /* handle to the mapping */
1469     file_pos_t   offset;        /* starting offset (page-aligned, in bytes) */
1470     mem_size_t   size;          /* size to set (page-aligned, in bytes) or 0 if only retrieving */
1471 @END
1472 
1473 
1474 #define SNAP_PROCESS    0x00000001
1475 #define SNAP_THREAD     0x00000002
1476 /* Create a snapshot */
1477 @REQ(create_snapshot)
1478     unsigned int attributes;    /* object attributes */
1479     unsigned int flags;         /* snapshot flags (SNAP_*) */
1480 @REPLY
1481     obj_handle_t handle;        /* handle to the snapshot */
1482 @END
1483 
1484 
1485 /* Get the next process from a snapshot */
1486 @REQ(next_process)
1487     obj_handle_t handle;        /* handle to the snapshot */
1488     int          reset;         /* reset snapshot position? */
1489 @REPLY
1490     int          count;         /* process usage count */
1491     process_id_t pid;           /* process id */
1492     process_id_t ppid;          /* parent process id */
1493     int          threads;       /* number of threads */
1494     int          priority;      /* process priority */
1495     int          handles;       /* number of handles */
1496     VARARG(filename,unicode_str); /* file name of main exe */
1497 @END
1498 
1499 
1500 /* Get the next thread from a snapshot */
1501 @REQ(next_thread)
1502     obj_handle_t handle;        /* handle to the snapshot */
1503     int          reset;         /* reset snapshot position? */
1504 @REPLY
1505     int          count;         /* thread usage count */
1506     process_id_t pid;           /* process id */
1507     thread_id_t  tid;           /* thread id */
1508     int          base_pri;      /* base priority */
1509     int          delta_pri;     /* delta priority */
1510 @END
1511 
1512 
1513 /* Wait for a debug event */
1514 @REQ(wait_debug_event)
1515     int           get_handle;  /* should we alloc a handle for waiting? */
1516 @REPLY
1517     process_id_t  pid;         /* process id */
1518     thread_id_t   tid;         /* thread id */
1519     obj_handle_t  wait;        /* wait handle if no event ready */
1520     VARARG(event,debug_event); /* debug event data */
1521 @END
1522 
1523 
1524 /* Queue an exception event */
1525 @REQ(queue_exception_event)
1526     int           first;       /* first chance exception? */
1527     unsigned int  code;        /* exception code */
1528     unsigned int  flags;       /* exception flags */
1529     client_ptr_t  record;      /* exception record */
1530     client_ptr_t  address;     /* exception address */
1531     data_size_t   len;         /* size of parameters */
1532     VARARG(params,uints64,len);/* exception parameters */
1533     VARARG(context,context);   /* thread context */
1534 @REPLY
1535     obj_handle_t     handle;   /* handle to the queued event */
1536 @END
1537 
1538 
1539 /* Retrieve the status of an exception event */
1540 @REQ(get_exception_status)
1541     obj_handle_t     handle;   /* handle to the queued event */
1542 @REPLY
1543     VARARG(context,context);   /* modified thread context */
1544 @END
1545 
1546 
1547 /* Send an output string to the debugger */
1548 @REQ(output_debug_string)
1549     data_size_t   length;      /* string length */
1550     client_ptr_t  string;      /* string to display (in debugged process address space) */
1551     int           unicode;     /* is it Unicode? */
1552 @END
1553 
1554 
1555 /* Continue a debug event */
1556 @REQ(continue_debug_event)
1557     process_id_t pid;          /* process id to continue */
1558     thread_id_t  tid;          /* thread id to continue */
1559     int          status;       /* continuation status */
1560 @END
1561 
1562 
1563 /* Start/stop debugging an existing process */
1564 @REQ(debug_process)
1565     process_id_t pid;          /* id of the process to debug */
1566     int          attach;       /* 1=attaching / 0=detaching from the process */
1567 @END
1568 
1569 
1570 /* Simulate a breakpoint in a process */
1571 @REQ(debug_break)
1572     obj_handle_t handle;       /* process handle */
1573 @REPLY
1574     int          self;         /* was it the caller itself? */
1575 @END
1576 
1577 
1578 /* Set debugger kill on exit flag */
1579 @REQ(set_debugger_kill_on_exit)
1580     int          kill_on_exit;  /* 0=detach/1=kill debuggee when debugger dies */
1581 @END
1582 
1583 
1584 /* Read data from a process address space */
1585 @REQ(read_process_memory)
1586     obj_handle_t handle;       /* process handle */
1587     client_ptr_t addr;         /* addr to read from */
1588 @REPLY
1589     VARARG(data,bytes);        /* result data */
1590 @END
1591 
1592 
1593 /* Write data to a process address space */
1594 @REQ(write_process_memory)
1595     obj_handle_t handle;       /* process handle */
1596     client_ptr_t addr;         /* addr to write to */
1597     VARARG(data,bytes);        /* data to write */
1598 @END
1599 
1600 
1601 /* Create a registry key */
1602 @REQ(create_key)
1603     obj_handle_t parent;       /* handle to the parent key */
1604     unsigned int access;       /* desired access rights */
1605     unsigned int attributes;   /* object attributes */
1606     unsigned int options;      /* creation options */
1607     data_size_t  namelen;      /* length of key name in bytes */
1608     VARARG(name,unicode_str,namelen);  /* key name */
1609     VARARG(class,unicode_str);         /* class name */
1610 @REPLY
1611     obj_handle_t hkey;         /* handle to the created key */
1612     int          created;      /* has it been newly created? */
1613 @END
1614 
1615 /* Open a registry key */
1616 @REQ(open_key)
1617     obj_handle_t parent;       /* handle to the parent key */
1618     unsigned int access;       /* desired access rights */
1619     unsigned int attributes;   /* object attributes */
1620     VARARG(name,unicode_str);  /* key name */
1621 @REPLY
1622     obj_handle_t hkey;         /* handle to the open key */
1623 @END
1624 
1625 
1626 /* Delete a registry key */
1627 @REQ(delete_key)
1628     obj_handle_t hkey;         /* handle to the key */
1629 @END
1630 
1631 
1632 /* Flush a registry key */
1633 @REQ(flush_key)
1634     obj_handle_t hkey;         /* handle to the key */
1635 @END
1636 
1637 
1638 /* Enumerate registry subkeys */
1639 @REQ(enum_key)
1640     obj_handle_t hkey;         /* handle to registry key */
1641     int          index;        /* index of subkey (or -1 for current key) */
1642     int          info_class;   /* requested information class */
1643 @REPLY
1644     int          subkeys;      /* number of subkeys */
1645     int          max_subkey;   /* longest subkey name */
1646     int          max_class;    /* longest class name */
1647     int          values;       /* number of values */
1648     int          max_value;    /* longest value name */
1649     int          max_data;     /* longest value data */
1650     timeout_t    modif;        /* last modification time */
1651     data_size_t  total;        /* total length needed for full name and class */
1652     data_size_t  namelen;      /* length of key name in bytes */
1653     VARARG(name,unicode_str,namelen);  /* key name */
1654     VARARG(class,unicode_str);         /* class name */
1655 @END
1656 
1657 
1658 /* Set a value of a registry key */
1659 @REQ(set_key_value)
1660     obj_handle_t hkey;         /* handle to registry key */
1661     int          type;         /* value type */
1662     data_size_t  namelen;      /* length of value name in bytes */
1663     VARARG(name,unicode_str,namelen);  /* value name */
1664     VARARG(data,bytes);                /* value data */
1665 @END
1666 
1667 
1668 /* Retrieve the value of a registry key */
1669 @REQ(get_key_value)
1670     obj_handle_t hkey;         /* handle to registry key */
1671     VARARG(name,unicode_str);  /* value name */
1672 @REPLY
1673     int          type;         /* value type */
1674     data_size_t  total;        /* total length needed for data */
1675     VARARG(data,bytes);        /* value data */
1676 @END
1677 
1678 
1679 /* Enumerate a value of a registry key */
1680 @REQ(enum_key_value)
1681     obj_handle_t hkey;         /* handle to registry key */
1682     int          index;        /* value index */
1683     int          info_class;   /* requested information class */
1684 @REPLY
1685     int          type;         /* value type */
1686     data_size_t  total;        /* total length needed for full name and data */
1687     data_size_t  namelen;      /* length of value name in bytes */
1688     VARARG(name,unicode_str,namelen);  /* value name */
1689     VARARG(data,bytes);                /* value data */
1690 @END
1691 
1692 
1693 /* Delete a value of a registry key */
1694 @REQ(delete_key_value)
1695     obj_handle_t hkey;         /* handle to registry key */
1696     VARARG(name,unicode_str);  /* value name */
1697 @END
1698 
1699 
1700 /* Load a registry branch from a file */
1701 @REQ(load_registry)
1702     obj_handle_t hkey;         /* root key to load to */
1703     obj_handle_t file;         /* file to load from */
1704     VARARG(name,unicode_str);  /* subkey name */
1705 @END
1706 
1707 
1708 /* UnLoad a registry branch from a file */
1709 @REQ(unload_registry)
1710     obj_handle_t hkey;         /* root key to unload to */
1711 @END
1712 
1713 
1714 /* Save a registry branch to a file */
1715 @REQ(save_registry)
1716     obj_handle_t hkey;         /* key to save */
1717     obj_handle_t file;         /* file to save to */
1718 @END
1719 
1720 
1721 /* Add a registry key change notification */
1722 @REQ(set_registry_notification)
1723     obj_handle_t hkey;         /* key to watch for changes */
1724     obj_handle_t event;        /* event to set */
1725     int          subtree;      /* should we watch the whole subtree? */
1726     unsigned int filter;       /* things to watch */
1727 @END
1728 
1729 
1730 /* Create a waitable timer */
1731 @REQ(create_timer)
1732     unsigned int access;        /* wanted access rights */
1733     unsigned int attributes;    /* object attributes */
1734     obj_handle_t rootdir;       /* root directory */
1735     int          manual;        /* manual reset */
1736     VARARG(name,unicode_str);   /* object name */
1737 @REPLY
1738     obj_handle_t handle;        /* handle to the timer */
1739 @END
1740 
1741 
1742 /* Open a waitable timer */
1743 @REQ(open_timer)
1744     unsigned int access;        /* wanted access rights */
1745     unsigned int attributes;    /* object attributes */
1746     obj_handle_t rootdir;       /* root directory */
1747     VARARG(name,unicode_str);   /* object name */
1748 @REPLY
1749     obj_handle_t handle;        /* handle to the timer */
1750 @END
1751 
1752 /* Set a waitable timer */
1753 @REQ(set_timer)
1754     obj_handle_t handle;        /* handle to the timer */
1755     timeout_t    expire;        /* next expiration absolute time */
1756     client_ptr_t callback;      /* callback function */
1757     client_ptr_t arg;           /* callback argument */
1758     int          period;        /* timer period in ms */
1759 @REPLY
1760     int          signaled;      /* was the timer signaled before this call ? */
1761 @END
1762 
1763 /* Cancel a waitable timer */
1764 @REQ(cancel_timer)
1765     obj_handle_t handle;        /* handle to the timer */
1766 @REPLY
1767      int         signaled;      /* was the timer signaled before this calltime ? */
1768 @END
1769 
1770 /* Get information on a waitable timer */
1771 @REQ(get_timer_info)
1772     obj_handle_t handle;        /* handle to the timer */
1773 @REPLY
1774     timeout_t    when;          /* absolute time when the timer next expires */
1775     int          signaled;      /* is the timer signaled? */
1776 @END
1777 
1778 
1779 /* Retrieve the current context of a thread */
1780 @REQ(get_thread_context)
1781     obj_handle_t handle;       /* thread handle */
1782     unsigned int flags;        /* context flags */
1783     int          suspend;      /* if getting context during suspend */
1784 @REPLY
1785     int          self;         /* was it a handle to the current thread? */
1786     VARARG(context,context);   /* thread context */
1787 @END
1788 
1789 
1790 /* Set the current context of a thread */
1791 @REQ(set_thread_context)
1792     obj_handle_t handle;       /* thread handle */
1793     int          suspend;      /* if setting context during suspend */
1794     VARARG(context,context);   /* thread context */
1795 @REPLY
1796     int          self;         /* was it a handle to the current thread? */
1797 @END
1798 
1799 
1800 /* Fetch a selector entry for a thread */
1801 @REQ(get_selector_entry)
1802     obj_handle_t  handle;      /* thread handle */
1803     int           entry;       /* LDT entry */
1804 @REPLY
1805     unsigned int  base;        /* selector base */
1806     unsigned int  limit;       /* selector limit */
1807     unsigned char flags;       /* selector flags */
1808 @END
1809 
1810 
1811 /* Add an atom */
1812 @REQ(add_atom)
1813     obj_handle_t  table;       /* which table to add atom to */
1814     VARARG(name,unicode_str);  /* atom name */
1815 @REPLY
1816     atom_t        atom;        /* resulting atom */
1817 @END
1818 
1819 
1820 /* Delete an atom */
1821 @REQ(delete_atom)
1822     obj_handle_t  table;       /* which table to delete atom from */
1823     atom_t        atom;        /* atom handle */
1824 @END
1825 
1826 
1827 /* Find an atom */
1828 @REQ(find_atom)
1829     obj_handle_t table;        /* which table to find atom from */
1830     VARARG(name,unicode_str);  /* atom name */
1831 @REPLY
1832     atom_t       atom;         /* atom handle */
1833 @END
1834 
1835 
1836 /* Get information about an atom */
1837 @REQ(get_atom_information)
1838     obj_handle_t table;        /* which table to find atom from */
1839     atom_t       atom;         /* atom handle */
1840 @REPLY
1841     int          count;        /* atom lock count */
1842     int          pinned;       /* whether the atom has been pinned */
1843     data_size_t  total;        /* actual length of atom name */
1844     VARARG(name,unicode_str);  /* atom name */
1845 @END
1846 
1847 
1848 /* Set information about an atom */
1849 @REQ(set_atom_information)
1850     obj_handle_t table;        /* which table to find atom from */
1851     atom_t       atom;         /* atom handle */
1852     int          pinned;       /* whether to bump atom information */
1853 @END
1854 
1855 
1856 /* Empty an atom table */
1857 @REQ(empty_atom_table)
1858     obj_handle_t table;        /* which table to find atom from */
1859     int          if_pinned;    /* whether to delete pinned atoms */
1860 @END
1861 
1862 
1863 /* Init an atom table */
1864 @REQ(init_atom_table)
1865     int          entries;      /* number of entries (only for local) */
1866 @REPLY
1867     obj_handle_t table;        /* handle to the atom table */
1868 @END
1869 
1870 
1871 /* Get the message queue of the current thread */
1872 @REQ(get_msg_queue)
1873 @REPLY
1874     obj_handle_t handle;       /* handle to the queue */
1875 @END
1876 
1877 
1878 /* Set the file descriptor associated to the current thread queue */
1879 @REQ(set_queue_fd)
1880     obj_handle_t handle;       /* handle to the file descriptor */
1881 @END
1882 
1883 
1884 /* Set the current message queue wakeup mask */
1885 @REQ(set_queue_mask)
1886     unsigned int wake_mask;    /* wakeup bits mask */
1887     unsigned int changed_mask; /* changed bits mask */
1888     int          skip_wait;    /* will we skip waiting if signaled? */
1889 @REPLY
1890     unsigned int wake_bits;    /* current wake bits */
1891     unsigned int changed_bits; /* current changed bits */
1892 @END
1893 
1894 
1895 /* Get the current message queue status */
1896 @REQ(get_queue_status)
1897     int          clear;        /* should we clear the change bits? */
1898 @REPLY
1899     unsigned int wake_bits;    /* wake bits */
1900     unsigned int changed_bits; /* changed bits since last time */
1901 @END
1902 
1903 
1904 /* Retrieve the process idle event */
1905 @REQ(get_process_idle_event)
1906     obj_handle_t handle;       /* process handle */
1907 @REPLY
1908     obj_handle_t event;        /* handle to idle event */
1909 @END
1910 
1911 
1912 /* Send a message to a thread queue */
1913 @REQ(send_message)
1914     thread_id_t     id;        /* thread id */
1915     int             type;      /* message type (see below) */
1916     int             flags;     /* message flags (see below) */
1917     user_handle_t   win;       /* window handle */
1918     unsigned int    msg;       /* message code */
1919     lparam_t        wparam;    /* parameters */
1920     lparam_t        lparam;    /* parameters */
1921     timeout_t       timeout;   /* timeout for reply */
1922     VARARG(data,message_data); /* message data for sent messages */
1923 @END
1924 
1925 @REQ(post_quit_message)
1926     int             exit_code; /* exit code to return */
1927 @END
1928 
1929 enum message_type
1930 {
1931     MSG_ASCII,          /* Ascii message (from SendMessageA) */
1932     MSG_UNICODE,        /* Unicode message (from SendMessageW) */
1933     MSG_NOTIFY,         /* notify message (from SendNotifyMessageW), always Unicode */
1934     MSG_CALLBACK,       /* callback message (from SendMessageCallbackW), always Unicode */
1935     MSG_CALLBACK_RESULT,/* result of a callback message */
1936     MSG_OTHER_PROCESS,  /* sent from other process, may include vararg data, always Unicode */
1937     MSG_POSTED,         /* posted message (from PostMessageW), always Unicode */
1938     MSG_HARDWARE,       /* hardware message */
1939     MSG_WINEVENT        /* winevent message */
1940 };
1941 #define SEND_MSG_ABORT_IF_HUNG  0x01
1942 
1943 
1944 /* Send a hardware message to a thread queue */
1945 @REQ(send_hardware_message)
1946     thread_id_t     id;        /* thread id */
1947     user_handle_t   win;       /* window handle */
1948     unsigned int    msg;       /* message code */
1949     lparam_t        wparam;    /* parameters */
1950     lparam_t        lparam;    /* parameters */
1951     lparam_t        info;      /* extra info */
1952     int             x;         /* x position */
1953     int             y;         /* y position */
1954     unsigned int    time;      /* message time */
1955 @END
1956 
1957 
1958 /* Get a message from the current queue */
1959 @REQ(get_message)
1960     unsigned int    flags;     /* PM_* flags */
1961     user_handle_t   get_win;   /* window handle to get */
1962     unsigned int    get_first; /* first message code to get */
1963     unsigned int    get_last;  /* last message code to get */
1964     unsigned int    hw_id;     /* id of the previous hardware message (or 0) */
1965     unsigned int    wake_mask; /* wakeup bits mask */
1966     unsigned int    changed_mask; /* changed bits mask */
1967 @REPLY
1968     user_handle_t   win;       /* window handle */
1969     unsigned int    msg;       /* message code */
1970     lparam_t        wparam;    /* parameters */
1971     lparam_t        lparam;    /* parameters */
1972     int             type;      /* message type */
1973     unsigned int    time;      /* message time */
1974     unsigned int    active_hooks; /* active hooks bitmap */
1975     data_size_t     total;     /* total size of extra data */
1976     VARARG(data,message_data); /* message data for sent messages */
1977 @END
1978 
1979 
1980 /* Reply to a sent message */
1981 @REQ(reply_message)
1982     int             remove;    /* should we remove the message? */
1983     lparam_t        result;    /* message result */
1984     VARARG(data,bytes);        /* message data for sent messages */
1985 @END
1986 
1987 
1988 /* Accept the current hardware message */
1989 @REQ(accept_hardware_message)
1990     unsigned int    hw_id;     /* id of the hardware message */
1991     int             remove;    /* should we remove the message? */
1992     user_handle_t   new_win;   /* new destination window for current message */
1993 @END
1994 
1995 
1996 /* Retrieve the reply for the last message sent */
1997 @REQ(get_message_reply)
1998     int             cancel;    /* cancel message if not ready? */
1999 @REPLY
2000     lparam_t        result;    /* message result */
2001     VARARG(data,bytes);        /* message data for sent messages */
2002 @END
2003 
2004 
2005 /* Set a window timer */
2006 @REQ(set_win_timer)
2007     user_handle_t   win;       /* window handle */
2008     unsigned int    msg;       /* message to post */
2009     unsigned int    rate;      /* timer rate in ms */
2010     lparam_t        id;        /* timer id */
2011     lparam_t        lparam;    /* message lparam (callback proc) */
2012 @REPLY
2013     lparam_t        id;        /* timer id */
2014 @END
2015 
2016 
2017 /* Kill a window timer */
2018 @REQ(kill_win_timer)
2019     user_handle_t   win;       /* window handle */
2020     lparam_t        id;        /* timer id */
2021     unsigned int    msg;       /* message to post */
2022 @END
2023 
2024 
2025 /* check if the thread owning the window is hung */
2026 @REQ(is_window_hung)
2027     user_handle_t   win;       /* window handle */
2028 @REPLY
2029     int is_hung;
2030 @END
2031 
2032 
2033 /* Retrieve info about a serial port */
2034 @REQ(get_serial_info)
2035     obj_handle_t handle;       /* handle to comm port */
2036 @REPLY
2037     unsigned int readinterval;
2038     unsigned int readconst;
2039     unsigned int readmult;
2040     unsigned int writeconst;
2041     unsigned int writemult;
2042     unsigned int eventmask;
2043 @END
2044 
2045 
2046 /* Set info about a serial port */
2047 @REQ(set_serial_info)
2048     obj_handle_t handle;       /* handle to comm port */
2049     int          flags;        /* bitmask to set values (see below) */
2050     unsigned int readinterval;
2051     unsigned int readconst;
2052     unsigned int readmult;
2053     unsigned int writeconst;
2054     unsigned int writemult;
2055     unsigned int eventmask;
2056 @END
2057 #define SERIALINFO_SET_TIMEOUTS  0x01
2058 #define SERIALINFO_SET_MASK      0x02
2059 
2060 
2061 /* Create an async I/O */
2062 @REQ(register_async)
2063     int          type;          /* type of queue to look after */
2064     async_data_t async;         /* async I/O parameters */
2065     int          count;         /* count - usually # of bytes to be read/written */
2066 @END
2067 #define ASYNC_TYPE_READ  0x01
2068 #define ASYNC_TYPE_WRITE 0x02
2069 #define ASYNC_TYPE_WAIT  0x03
2070 
2071 
2072 /* Cancel all async op on a fd */
2073 @REQ(cancel_async)
2074     obj_handle_t handle;        /* handle to comm port, socket or file */
2075     client_ptr_t iosb;          /* I/O status block (NULL=all) */
2076     int          only_thread;   /* cancel matching this thread */
2077 @END
2078 
2079 
2080 /* Perform an ioctl on a file */
2081 @REQ(ioctl)
2082     ioctl_code_t   code;          /* ioctl code */
2083     async_data_t   async;         /* async I/O parameters */
2084     int            blocking;      /* whether it's a blocking ioctl */
2085     VARARG(in_data,bytes);        /* ioctl input data */
2086 @REPLY
2087     obj_handle_t   wait;          /* handle to wait on for blocking ioctl */
2088     unsigned int   options;       /* device open options */
2089     VARARG(out_data,bytes);       /* ioctl output data */
2090 @END
2091 
2092 
2093 /* Retrieve results of an async ioctl */
2094 @REQ(get_ioctl_result)
2095     obj_handle_t   handle;        /* handle to the device */
2096     client_ptr_t   user_arg;      /* user arg used to identify the request */
2097 @REPLY
2098     VARARG(out_data,bytes);       /* ioctl output data */
2099 @END
2100 
2101 
2102 /* Create a named pipe */
2103 @REQ(create_named_pipe)
2104     unsigned int   access;
2105     unsigned int   attributes;   /* object attributes */
2106     obj_handle_t   rootdir;      /* root directory */
2107     unsigned int   options;
2108     unsigned int   maxinstances;
2109     unsigned int   outsize;
2110     unsigned int   insize;
2111     timeout_t      timeout;
2112     unsigned int   flags;
2113     VARARG(name,unicode_str);    /* pipe name */
2114 @REPLY
2115     obj_handle_t   handle;       /* handle to the pipe */
2116 @END
2117 
2118 /* flags in create_named_pipe and get_named_pipe_info */
2119 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2120 #define NAMED_PIPE_MESSAGE_STREAM_READ  0x0002
2121 #define NAMED_PIPE_NONBLOCKING_MODE     0x0004
2122 #define NAMED_PIPE_SERVER_END           0x8000
2123 
2124 
2125 @REQ(get_named_pipe_info)
2126     obj_handle_t   handle;
2127 @REPLY
2128     unsigned int   flags;
2129     unsigned int   maxinstances;
2130     unsigned int   instances;
2131     unsigned int   outsize;
2132     unsigned int   insize;
2133 @END
2134 
2135 
2136 /* Create a window */
2137 @REQ(create_window)
2138     user_handle_t  parent;      /* parent window */
2139     user_handle_t  owner;       /* owner window */
2140     atom_t         atom;        /* class atom */
2141     mod_handle_t   instance;    /* module instance */
2142     VARARG(class,unicode_str);  /* class name */
2143 @REPLY
2144     user_handle_t  handle;      /* created window */
2145     user_handle_t  parent;      /* full handle of parent */
2146     user_handle_t  owner;       /* full handle of owner */
2147     int            extra;       /* number of extra bytes */
2148     client_ptr_t   class_ptr;   /* pointer to class in client address space */
2149 @END
2150 
2151 
2152 /* Destroy a window */
2153 @REQ(destroy_window)
2154     user_handle_t  handle;      /* handle to the window */
2155 @END
2156 
2157 
2158 /* Retrieve the desktop window for the current thread */
2159 @REQ(get_desktop_window)
2160     int            force;       /* force creation if it doesn't exist */
2161 @REPLY
2162     user_handle_t  top_window;  /* handle to the desktop window */
2163     user_handle_t  msg_window;  /* handle to the top-level HWND_MESSAGE parent */
2164 @END
2165 
2166 
2167 /* Set a window owner */
2168 @REQ(set_window_owner)
2169     user_handle_t  handle;      /* handle to the window */
2170     user_handle_t  owner;       /* new owner */
2171 @REPLY
2172     user_handle_t  full_owner;  /* full handle of new owner */
2173     user_handle_t  prev_owner;  /* full handle of previous owner */
2174 @END
2175 
2176 
2177 /* Get information from a window handle */
2178 @REQ(get_window_info)
2179     user_handle_t  handle;      /* handle to the window */
2180 @REPLY
2181     user_handle_t  full_handle; /* full 32-bit handle */
2182     user_handle_t  last_active; /* last active popup */
2183     process_id_t   pid;         /* process owning the window */
2184     thread_id_t    tid;         /* thread owning the window */
2185     atom_t         atom;        /* class atom */
2186     int            is_unicode;  /* ANSI or unicode */
2187 @END
2188 
2189 
2190 /* Set some information in a window */
2191 @REQ(set_window_info)
2192     unsigned short flags;         /* flags for fields to set (see below) */
2193     short int      is_unicode;    /* ANSI or unicode */
2194     user_handle_t  handle;        /* handle to the window */
2195     unsigned int   style;         /* window style */
2196     unsigned int   ex_style;      /* window extended style */
2197     unsigned int   id;            /* window id */
2198     mod_handle_t   instance;      /* creator instance */
2199     lparam_t       user_data;     /* user-specific data */
2200     int            extra_offset;  /* offset to set in extra bytes */
2201     data_size_t    extra_size;    /* size to set in extra bytes */
2202     lparam_t       extra_value;   /* value to set in extra bytes */
2203 @REPLY
2204     unsigned int   old_style;     /* old window style */
2205     unsigned int   old_ex_style;  /* old window extended style */
2206     mod_handle_t   old_instance;  /* old creator instance */
2207     lparam_t       old_user_data; /* old user-specific data */
2208     lparam_t       old_extra_value; /* old value in extra bytes */
2209     unsigned int   old_id;        /* old window id */
2210 @END
2211 #define SET_WIN_STYLE     0x01
2212 #define SET_WIN_EXSTYLE   0x02
2213 #define SET_WIN_ID        0x04
2214 #define SET_WIN_INSTANCE  0x08
2215 #define SET_WIN_USERDATA  0x10
2216 #define SET_WIN_EXTRA     0x20
2217 #define SET_WIN_UNICODE   0x40
2218 
2219 
2220 /* Set the parent of a window */
2221 @REQ(set_parent)
2222     user_handle_t  handle;      /* handle to the window */
2223     user_handle_t  parent;      /* handle to the parent */
2224 @REPLY
2225     user_handle_t  old_parent;  /* old parent window */
2226     user_handle_t  full_parent; /* full handle of new parent */
2227 @END
2228 
2229 
2230 /* Get a list of the window parents, up to the root of the tree */
2231 @REQ(get_window_parents)
2232     user_handle_t  handle;        /* handle to the window */
2233 @REPLY
2234     int            count;         /* total count of parents */
2235     VARARG(parents,user_handles); /* parent handles */
2236 @END
2237 
2238 
2239 /* Get a list of the window children */
2240 @REQ(get_window_children)
2241     obj_handle_t   desktop;       /* handle to desktop */
2242     user_handle_t  parent;        /* parent window */
2243     atom_t         atom;          /* class atom for the listed children */
2244     thread_id_t    tid;           /* thread owning the listed children */
2245     VARARG(class,unicode_str);    /* class name */
2246 @REPLY
2247     int            count;         /* total count of children */
2248     VARARG(children,user_handles); /* children handles */
2249 @END
2250 
2251 
2252 /* Get a list of the window children that contain a given point */
2253 @REQ(get_window_children_from_point)
2254     user_handle_t  parent;        /* parent window */
2255     int            x;             /* point in parent coordinates */
2256     int            y;
2257 @REPLY
2258     int            count;         /* total count of children */
2259     VARARG(children,user_handles); /* children handles */
2260 @END
2261 
2262 
2263 /* Get window tree information from a window handle */
2264 @REQ(get_window_tree)
2265     user_handle_t  handle;        /* handle to the window */
2266 @REPLY
2267     user_handle_t  parent;        /* parent window */
2268     user_handle_t  owner;         /* owner window */
2269     user_handle_t  next_sibling;  /* next sibling in Z-order */
2270     user_handle_t  prev_sibling;  /* prev sibling in Z-order */
2271     user_handle_t  first_sibling; /* first sibling in Z-order */
2272     user_handle_t  last_sibling;  /* last sibling in Z-order */
2273     user_handle_t  first_child;   /* first child */
2274     user_handle_t  last_child;    /* last child */
2275 @END
2276 
2277 /* Set the position and Z order of a window */
2278 @REQ(set_window_pos)
2279     unsigned int   flags;         /* SWP_* flags */
2280     user_handle_t  handle;        /* handle to the window */
2281     user_handle_t  previous;      /* previous window in Z order */
2282     rectangle_t    window;        /* window rectangle */
2283     rectangle_t    client;        /* client rectangle */
2284     VARARG(valid,rectangles);     /* valid rectangles from WM_NCCALCSIZE */
2285 @REPLY
2286     unsigned int   new_style;     /* new window style */
2287     unsigned int   new_ex_style;  /* new window extended style */
2288 @END
2289 
2290 
2291 /* Get the window and client rectangles of a window */
2292 @REQ(get_window_rectangles)
2293     user_handle_t  handle;        /* handle to the window */
2294 @REPLY
2295     rectangle_t    window;        /* window rectangle */
2296     rectangle_t    visible;       /* visible part of the window rectangle */
2297     rectangle_t    client;        /* client rectangle */
2298 @END
2299 
2300 
2301 /* Get the window text */
2302 @REQ(get_window_text)
2303     user_handle_t  handle;        /* handle to the window */
2304 @REPLY
2305     VARARG(text,unicode_str);     /* window text */
2306 @END
2307 
2308 
2309 /* Set the window text */
2310 @REQ(set_window_text)
2311     user_handle_t  handle;        /* handle to the window */
2312     VARARG(text,unicode_str);     /* window text */
2313 @END
2314 
2315 
2316 /* Get the coordinates offset between two windows */
2317 @REQ(get_windows_offset)
2318     user_handle_t  from;          /* handle to the first window */
2319     user_handle_t  to;            /* handle to the second window */
2320 @REPLY
2321     int            x;             /* x coordinate offset */
2322     int            y;             /* y coordinate offset */
2323 @END
2324 
2325 
2326 /* Get the visible region of a window */
2327 @REQ(get_visible_region)
2328     user_handle_t  window;        /* handle to the window */
2329     unsigned int   flags;         /* DCX flags */
2330 @REPLY
2331     user_handle_t  top_win;       /* top window to clip against */
2332     rectangle_t    top_rect;      /* top window visible rect with screen coords */
2333     rectangle_t    win_rect;      /* window rect in screen coords */
2334     data_size_t    total_size;    /* total size of the resulting region */
2335     VARARG(region,rectangles);    /* list of rectangles for the region (in screen coords) */
2336 @END
2337 
2338 
2339 /* Get the window region */
2340 @REQ(get_window_region)
2341     user_handle_t  window;        /* handle to the window */
2342 @REPLY
2343     data_size_t    total_size;    /* total size of the resulting region */
2344     VARARG(region,rectangles);    /* list of rectangles for the region */
2345 @END
2346 
2347 
2348 /* Set the window region */
2349 @REQ(set_window_region)
2350     user_handle_t  window;        /* handle to the window */
2351     int            redraw;        /* redraw the window? */
2352     VARARG(region,rectangles);    /* list of rectangles for the region */
2353 @END
2354 
2355 
2356 /* Get the window update region */
2357 @REQ(get_update_region)
2358     user_handle_t  window;        /* handle to the window */
2359     user_handle_t  from_child;    /* child to start searching from */
2360     unsigned int   flags;         /* update flags (see below) */
2361 @REPLY
2362     user_handle_t  child;         /* child to repaint (or window itself) */
2363     unsigned int   flags;         /* resulting update flags (see below) */
2364     data_size_t    total_size;    /* total size of the resulting region */
2365     VARARG(region,rectangles);    /* list of rectangles for the region */
2366 @END
2367 #define UPDATE_NONCLIENT       0x01  /* get region for repainting non-client area */
2368 #define UPDATE_ERASE           0x02  /* get region for erasing client area */
2369 #define UPDATE_PAINT           0x04  /* get region for painting client area */
2370 #define UPDATE_INTERNALPAINT   0x08  /* get region if internal paint is pending */
2371 #define UPDATE_ALLCHILDREN     0x10  /* force repaint of all children */
2372 #define UPDATE_NOCHILDREN      0x20  /* don't try to repaint any children */
2373 #define UPDATE_NOREGION        0x40  /* don't return a region, only the flags */
2374 #define UPDATE_DELAYED_ERASE   0x80  /* still needs erase after BeginPaint */
2375 
2376 
2377 /* Update the z order of a window so that a given rectangle is fully visible */
2378 @REQ(update_window_zorder)
2379     user_handle_t  window;        /* handle to the window */
2380     rectangle_t    rect;          /* rectangle that must be visible */
2381 @END
2382 
2383 
2384 /* Mark parts of a window as needing a redraw */
2385 @REQ(redraw_window)
2386     user_handle_t  window;        /* handle to the window */
2387     unsigned int   flags;         /* RDW_* flags */
2388     VARARG(region,rectangles);    /* list of rectangles for the region */
2389 @END
2390 
2391 
2392 /* Set a window property */
2393 @REQ(set_window_property)
2394     user_handle_t  window;        /* handle to the window */
2395     lparam_t       data;          /* data to store */
2396     atom_t         atom;          /* property atom (if no name specified) */
2397     VARARG(name,unicode_str);     /* property name */
2398 @END
2399 
2400 
2401 /* Remove a window property */
2402 @REQ(remove_window_property)
2403     user_handle_t  window;        /* handle to the window */
2404     atom_t         atom;          /* property atom (if no name specified) */
2405     VARARG(name,unicode_str);     /* property name */
2406 @REPLY
2407     lparam_t       data;          /* data stored in property */
2408 @END
2409 
2410 
2411 /* Get a window property */
2412 @REQ(get_window_property)
2413     user_handle_t  window;        /* handle to the window */
2414     atom_t         atom;          /* property atom (if no name specified) */
2415     VARARG(name,unicode_str);     /* property name */
2416 @REPLY
2417     lparam_t       data;          /* data stored in property */
2418 @END
2419 
2420 
2421 /* Get the list of properties of a window */
2422 @REQ(get_window_properties)
2423     user_handle_t  window;        /* handle to the window */
2424 @REPLY
2425     int            total;         /* total number of properties */
2426     VARARG(props,properties);     /* list of properties */
2427 @END
2428 
2429 
2430 /* Create a window station */
2431 @REQ(create_winstation)
2432     unsigned int flags;           /* window station flags */
2433     unsigned int access;          /* wanted access rights */
2434     unsigned int attributes;      /* object attributes */
2435     VARARG(name,unicode_str);     /* object name */
2436 @REPLY
2437     obj_handle_t handle;          /* handle to the window station */
2438 @END
2439 
2440 
2441 /* Open a handle to a window station */
2442 @REQ(open_winstation)
2443     unsigned int access;          /* wanted access rights */
2444     unsigned int attributes;      /* object attributes */
2445     VARARG(name,unicode_str);     /* object name */
2446 @REPLY
2447     obj_handle_t handle;          /* handle to the window station */
2448 @END
2449 
2450 
2451 /* Close a window station */
2452 @REQ(close_winstation)
2453     obj_handle_t handle;          /* handle to the window station */
2454 @END
2455 
2456 
2457 /* Get the process current window station */
2458 @REQ(get_process_winstation)
2459 @REPLY
2460     obj_handle_t handle;          /* handle to the window station */
2461 @END
2462 
2463 
2464 /* Set the process current window station */
2465 @REQ(set_process_winstation)
2466     obj_handle_t handle;          /* handle to the window station */
2467 @END
2468 
2469 
2470 /* Enumerate window stations */
2471 @REQ(enum_winstation)
2472     unsigned int index;           /* current index */
2473 @REPLY
2474     unsigned int next;            /* next index */
2475     VARARG(name,unicode_str);     /* window station name */
2476 @END
2477 
2478 
2479 /* Create a desktop */
2480 @REQ(create_desktop)
2481     unsigned int flags;           /* desktop flags */
2482     unsigned int access;          /* wanted access rights */
2483     unsigned int attributes;      /* object attributes */
2484     VARARG(name,unicode_str);     /* object name */
2485 @REPLY
2486     obj_handle_t handle;          /* handle to the desktop */
2487 @END
2488 
2489 
2490 /* Open a handle to a desktop */
2491 @REQ(open_desktop)
2492     obj_handle_t winsta;          /* window station to open (null allowed) */
2493     unsigned int flags;           /* desktop flags */
2494     unsigned int access;          /* wanted access rights */
2495     unsigned int attributes;      /* object attributes */
2496     VARARG(name,unicode_str);     /* object name */
2497 @REPLY
2498     obj_handle_t handle;          /* handle to the desktop */
2499 @END
2500 
2501 
2502 /* Close a desktop */
2503 @REQ(close_desktop)
2504     obj_handle_t handle;          /* handle to the desktop */
2505 @END
2506 
2507 
2508 /* Get the thread current desktop */
2509 @REQ(get_thread_desktop)
2510     thread_id_t  tid;             /* thread id */
2511 @REPLY
2512     obj_handle_t handle;          /* handle to the desktop */
2513 @END
2514 
2515 
2516 /* Set the thread current desktop */
2517 @REQ(set_thread_desktop)
2518     obj_handle_t handle;          /* handle to the desktop */
2519 @END
2520 
2521 
2522 /* Enumerate desktops */
2523 @REQ(enum_desktop)
2524     obj_handle_t winstation;      /* handle to the window station */
2525     unsigned int index;           /* current index */
2526 @REPLY
2527     unsigned int next;            /* next index */
2528     VARARG(name,unicode_str);     /* window station name */
2529 @END
2530 
2531 
2532 /* Get/set information about a user object (window station or desktop) */
2533 @REQ(set_user_object_info)
2534     obj_handle_t handle;          /* handle to the object */
2535     unsigned int flags;           /* information to set */
2536     unsigned int obj_flags;       /* new object flags */
2537 @REPLY
2538     int          is_desktop;      /* is object a desktop? */
2539     unsigned int old_obj_flags;   /* old object flags */
2540     VARARG(name,unicode_str);     /* object name */
2541 @END
2542 #define SET_USER_OBJECT_FLAGS 1
2543 
2544 
2545 /* Attach (or detach) thread inputs */
2546 @REQ(attach_thread_input)
2547     thread_id_t    tid_from;       /* thread to be attached */
2548     thread_id_t    tid_to;         /* thread to which tid_from should be attached */
2549     int            attach;         /* is it an attach? */
2550 @END
2551 
2552 
2553 /* Get input data for a given thread */
2554 @REQ(get_thread_input)
2555     thread_id_t    tid;           /* id of thread */
2556 @REPLY
2557     user_handle_t  focus;         /* handle to the focus window */
2558     user_handle_t  capture;       /* handle to the capture window */
2559     user_handle_t  active;        /* handle to the active window */
2560     user_handle_t  foreground;    /* handle to the global foreground window */
2561     user_handle_t  menu_owner;    /* handle to the menu owner */
2562     user_handle_t  move_size;     /* handle to the moving/resizing window */
2563     user_handle_t  caret;         /* handle to the caret window */
2564     rectangle_t    rect;          /* caret rectangle */
2565 @END
2566 
2567 
2568 /* Get the time of the last input event */
2569 @REQ(get_last_input_time)
2570 @REPLY
2571     unsigned int time;
2572 @END
2573 
2574 
2575 /* Retrieve queue keyboard state for a given thread */
2576 @REQ(get_key_state)
2577     thread_id_t    tid;           /* id of thread */
2578     int            key;           /* optional key code or -1 */
2579 @REPLY
2580     unsigned char  state;         /* state of specified key */
2581     VARARG(keystate,bytes);       /* state array for all the keys */
2582 @END
2583 
2584 /* Set queue keyboard state for a given thread */
2585 @REQ(set_key_state)
2586     thread_id_t    tid;           /* id of thread */
2587     VARARG(keystate,bytes);       /* state array for all the keys */
2588 @END
2589 
2590 /* Set the system foreground window */
2591 @REQ(set_foreground_window)
2592     user_handle_t  handle;        /* handle to the foreground window */
2593 @REPLY
2594     user_handle_t  previous;      /* handle to the previous foreground window */
2595     int            send_msg_old;  /* whether we have to send a msg to the old window */
2596     int            send_msg_new;  /* whether we have to send a msg to the new window */
2597 @END
2598 
2599 /* Set the current thread focus window */
2600 @REQ(set_focus_window)
2601     user_handle_t  handle;        /* handle to the focus window */
2602 @REPLY
2603     user_handle_t  previous;      /* handle to the previous focus window */
2604 @END
2605 
2606 /* Set the current thread active window */
2607 @REQ(set_active_window)
2608     user_handle_t  handle;        /* handle to the active window */
2609 @REPLY
2610     user_handle_t  previous;      /* handle to the previous active window */
2611 @END
2612 
2613 /* Set the current thread capture window */
2614 @REQ(set_capture_window)
2615     user_handle_t  handle;        /* handle to the capture window */
2616     unsigned int   flags;         /* capture flags (see below) */
2617 @REPLY
2618     user_handle_t  previous;      /* handle to the previous capture window */
2619     user_handle_t  full_handle;   /* full 32-bit handle of new capture window */
2620 @END
2621 #define CAPTURE_MENU     0x01  /* capture is for a menu */
2622 #define CAPTURE_MOVESIZE 0x02  /* capture is for moving/resizing */
2623 
2624 
2625 /* Set the current thread caret window */
2626 @REQ(set_caret_window)
2627     user_handle_t  handle;        /* handle to the caret window */
2628     int            width;         /* caret width */
2629     int            height;        /* caret height */
2630 @REPLY
2631     user_handle_t  previous;      /* handle to the previous caret window */
2632     rectangle_t    old_rect;      /* previous caret rectangle */
2633     int            old_hide;      /* previous hide count */
2634     int            old_state;     /* previous caret state (1=on, 0=off) */
2635 @END
2636 
2637 
2638 /* Set the current thread caret information */
2639 @REQ(set_caret_info)
2640     unsigned int   flags;         /* caret flags (see below) */
2641     user_handle_t  handle;        /* handle to the caret window */
2642     int            x;             /* caret x position */
2643     int            y;             /* caret y position */
2644     int            hide;          /* increment for hide count (can be negative to show it) */
2645     int            state;         /* caret state (1=on, 0=off, -1=toggle current state) */
2646 @REPLY
2647     user_handle_t  full_handle;   /* handle to the current caret window */
2648     rectangle_t    old_rect;      /* previous caret rectangle */
2649     int            old_hide;      /* previous hide count */
2650     int            old_state;     /* previous caret state (1=on, 0=off) */
2651 @END
2652 #define SET_CARET_POS        0x01  /* set the caret position from x,y */
2653 #define SET_CARET_HIDE       0x02  /* increment the caret hide count */
2654 #define SET_CARET_STATE      0x04  /* set the caret on/off state */
2655 
2656 
2657 /* Set a window hook */
2658 @REQ(set_hook)
2659     int            id;             /* id of the hook */
2660     process_id_t   pid;            /* id of process to set the hook into */
2661     thread_id_t    tid;            /* id of thread to set the hook into */
2662     int            event_min;
2663     int            event_max;
2664     client_ptr_t   proc;           /* hook procedure */
2665     int            flags;
2666     int            unicode;        /* is it a unicode hook? */
2667     VARARG(module,unicode_str);    /* module name */
2668 @REPLY
2669     user_handle_t  handle;         /* handle to the hook */
2670     unsigned int   active_hooks;   /* active hooks bitmap */
2671 @END
2672 
2673 
2674 /* Remove a window hook */
2675 @REQ(remove_hook)
2676     user_handle_t  handle;         /* handle to the hook */
2677     client_ptr_t   proc;           /* hook procedure if handle is 0 */
2678     int            id;             /* id of the hook if handle is 0 */
2679 @REPLY
2680     unsigned int   active_hooks;   /* active hooks bitmap */
2681 @END
2682 
2683 
2684 /* Start calling a hook chain */
2685 @REQ(start_hook_chain)
2686     int            id;             /* id of the hook */
2687     int            event;          /* signalled event */
2688     user_handle_t  window;         /* handle to the event window */
2689     int            object_id;      /* object id for out of context winevent */
2690     int            child_id;       /* child id for out of context winevent */
2691 @REPLY
2692     user_handle_t  handle;         /* handle to the next hook */
2693     process_id_t   pid;            /* process id for low-level keyboard/mouse hooks */
2694     thread_id_t    tid;            /* thread id for low-level keyboard/mouse hooks */
2695     int            unicode;        /* is it a unicode hook? */
2696     client_ptr_t   proc;           /* hook procedure */
2697     unsigned int   active_hooks;   /* active hooks bitmap */
2698     VARARG(module,unicode_str);    /* module name */
2699 @END
2700 
2701 
2702 /* Finished calling a hook chain */
2703 @REQ(finish_hook_chain)
2704     int            id;             /* id of the hook */
2705 @END
2706 
2707 
2708 /* Get the hook information */
2709 @REQ(get_hook_info)
2710     user_handle_t  handle;         /* handle to the current hook */
2711     int            get_next;       /* do we want info about current or next hook? */
2712     int            event;          /* signalled event */
2713     user_handle_t  window;         /* handle to the event window */
2714     int            object_id;      /* object id for out of context winevent */
2715     int            child_id;       /* child id for out of context winevent */
2716 @REPLY
2717     user_handle_t  handle;         /* handle to the hook */
2718     int            id;             /* id of the hook */
2719     process_id_t   pid;            /* process id for low-level keyboard/mouse hooks */
2720     thread_id_t    tid;            /* thread id for low-level keyboard/mouse hooks */
2721     client_ptr_t   proc;           /* hook procedure */
2722     int            unicode;        /* is it a unicode hook? */
2723     VARARG(module,unicode_str);    /* module name */
2724 @END
2725 
2726 
2727 /* Create a window class */
2728 @REQ(create_class)
2729     int            local;          /* is it a local class? */
2730     atom_t         atom;           /* class atom */
2731     unsigned int   style;          /* class style */
2732     mod_handle_t   instance;       /* module instance */
2733     int            extra;          /* number of extra class bytes */
2734     int            win_extra;      /* number of window extra bytes */
2735     client_ptr_t   client_ptr;     /* pointer to class in client address space */
2736     VARARG(name,unicode_str);      /* class name */
2737 @REPLY
2738     atom_t         atom;           /* resulting class atom */
2739 @END
2740 
2741 
2742 /* Destroy a window class */
2743 @REQ(destroy_class)
2744     atom_t         atom;           /* class atom */
2745     mod_handle_t   instance;       /* module instance */
2746     VARARG(name,unicode_str);      /* class name */
2747 @REPLY
2748     client_ptr_t   client_ptr;     /* pointer to class in client address space */
2749 @END
2750 
2751 
2752 /* Set some information in a class */
2753 @REQ(set_class_info)
2754     user_handle_t  window;         /* handle to the window */
2755     unsigned int   flags;          /* flags for info to set (see below) */
2756     atom_t         atom;           /* class atom */
2757     unsigned int   style;          /* class style */
2758     int            win_extra;      /* number of window extra bytes */
2759     mod_handle_t   instance;       /* module instance */
2760     int            extra_offset;   /* offset to set in extra bytes */
2761     data_size_t    extra_size;     /* size to set in extra bytes */
2762     lparam_t       extra_value;    /* value to set in extra bytes */
2763 @REPLY
2764     atom_t         old_atom;       /* previous class atom */
2765     unsigned int   old_style;      /* previous class style */
2766     int            old_extra;      /* previous number of class extra bytes */
2767     int            old_win_extra;  /* previous number of window extra bytes */
2768     mod_handle_t   old_instance;   /* previous module instance */
2769     lparam_t       old_extra_value; /* old value in extra bytes */
2770 @END
2771 #define SET_CLASS_ATOM      0x0001
2772 #define SET_CLASS_STYLE     0x0002
2773 #define SET_CLASS_WINEXTRA  0x0004
2774 #define SET_CLASS_INSTANCE  0x0008
2775 #define SET_CLASS_EXTRA     0x0010
2776 
2777 
2778 /* Set/get clipboard information */
2779 @REQ(set_clipboard_info)
2780     unsigned int   flags;       /* flags for fields to set (see below) */
2781     user_handle_t  clipboard;   /* clipboard window */
2782     user_handle_t  owner;       /* clipboard owner */
2783     user_handle_t  viewer;      /* first clipboard viewer */
2784     unsigned int   seqno;       /* change sequence number */
2785 @REPLY
2786     unsigned int   flags;           /* status flags (see below) */
2787     user_handle_t  old_clipboard;   /* old clipboard window */
2788     user_handle_t  old_owner;       /* old clipboard owner */
2789     user_handle_t  old_viewer;      /* old clipboard viewer */
2790     unsigned int   seqno;           /* current sequence number */
2791 @END
2792 
2793 #define SET_CB_OPEN      0x001
2794 #define SET_CB_OWNER     0x002
2795 #define SET_CB_VIEWER    0x004
2796 #define SET_CB_SEQNO     0x008
2797 #define SET_CB_RELOWNER  0x010
2798 #define SET_CB_CLOSE     0x020
2799 #define CB_OPEN          0x040
2800 #define CB_OWNER         0x080
2801 #define CB_PROCESS       0x100
2802 
2803 
2804 /* Open a security token */
2805 @REQ(open_token)
2806     obj_handle_t   handle;    /* handle to the thread or process */
2807     unsigned int   access;    /* access rights to the new token */
2808     unsigned int   attributes;/* object attributes */
2809     unsigned int   flags;     /* flags (see below) */
2810 @REPLY
2811     obj_handle_t   token;    /* handle to the token */
2812 @END
2813 #define OPEN_TOKEN_THREAD   1
2814 #define OPEN_TOKEN_AS_SELF  2
2815 
2816 
2817 /* Set/get the global windows */
2818 @REQ(set_global_windows)
2819     unsigned int   flags;               /* flags for fields to set (see below) */
2820     user_handle_t  shell_window;        /* handle to the new shell window */
2821     user_handle_t  shell_listview;      /* handle to the new shell listview window */
2822     user_handle_t  progman_window;      /* handle to the new program manager window */
2823     user_handle_t  taskman_window;      /* handle to the new task manager window */
2824 @REPLY
2825     user_handle_t  old_shell_window;    /* handle to the shell window */
2826     user_handle_t  old_shell_listview;  /* handle to the shell listview window */
2827     user_handle_t  old_progman_window;  /* handle to the new program manager window */
2828     user_handle_t  old_taskman_window;  /* handle to the new task manager window */
2829 @END
2830 #define SET_GLOBAL_SHELL_WINDOWS   0x01  /* set both main shell and listview windows */
2831 #define SET_GLOBAL_PROGMAN_WINDOW  0x02
2832 #define SET_GLOBAL_TASKMAN_WINDOW  0x04
2833 
2834 /* Adjust the privileges held by a token */
2835 @REQ(adjust_token_privileges)
2836     obj_handle_t  handle; /* handle to the token */
2837     int           disable_all; /* disable all privileges? */
2838     int           get_modified_state; /* get modified privileges? */
2839     VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
2840 @REPLY
2841     unsigned int  len; /* total length in bytes required to store token privileges */
2842     VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
2843 @END
2844 
2845 /* Retrieves the set of privileges held by or available to a token */
2846 @REQ(get_token_privileges)
2847     obj_handle_t  handle; /* handle to the token */
2848 @REPLY
2849     unsigned int  len; /* total length in bytes required to store token privileges */
2850     VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2851 @END
2852 
2853 /* Check the token has the required privileges */
2854 @REQ(check_token_privileges)
2855     obj_handle_t  handle; /* handle to the token */
2856     int           all_required; /* are all the privileges required for the check to succeed? */
2857     VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
2858 @REPLY
2859     int           has_privileges; /* does the token have the required privileges? */
2860     VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2861 @END
2862 
2863 @REQ(duplicate_token)
2864     obj_handle_t  handle;        /* handle to the token to duplicate */
2865     unsigned int  access;        /* access rights to the new token */
2866     unsigned int  attributes;    /* object attributes */
2867     int           primary;       /* is the new token to be a primary one? */
2868     int           impersonation_level; /* impersonation level of the new token */
2869 @REPLY
2870     obj_handle_t  new_handle; /* duplicated handle */
2871 @END
2872 
2873 @REQ(access_check)
2874     obj_handle_t    handle; /* handle to the token */
2875     unsigned int    desired_access; /* desired access to the object */
2876     unsigned int    mapping_read; /* mapping from generic read to specific rights */
2877     unsigned int    mapping_write; /* mapping from generic write to specific rights */
2878     unsigned int    mapping_execute; /* mapping from generic execute to specific rights */
2879     unsigned int    mapping_all; /* mapping from generic all to specific rights */
2880     VARARG(sd,security_descriptor); /* security descriptor to check */
2881 @REPLY
2882     unsigned int    access_granted; /* access rights actually granted */
2883     unsigned int    access_status; /* was access granted? */
2884     unsigned int    privileges_len; /* length needed to store privileges */
2885     VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
2886 @END
2887 
2888 @REQ(get_token_user)
2889     obj_handle_t    handle;       /* handle to the token */
2890 @REPLY
2891     data_size_t     user_len;     /* length needed to store user */
2892     VARARG(user,SID);             /* sid of the user the token represents */
2893 @END
2894 
2895 @REQ(get_token_groups)
2896     obj_handle_t    handle;       /* handle to the token */
2897 @REPLY
2898     data_size_t     user_len;     /* length needed to store user */
2899     VARARG(user,token_groups); /* groups the token's user belongs to */
2900 @END
2901 
2902 @REQ(get_token_default_dacl)
2903     obj_handle_t    handle;     /* handle to the token */
2904 @REPLY
2905     data_size_t     acl_len;    /* length needed to store access control list */
2906     VARARG(acl,ACL);            /* access control list */
2907 @END
2908 
2909 @REQ(set_token_default_dacl)
2910     obj_handle_t    handle;     /* handle to the token */
2911     VARARG(acl,ACL);            /* default dacl to set */
2912 @END
2913 
2914 @REQ(set_security_object)
2915     obj_handle_t    handle;       /* handle to the object */
2916     unsigned int    security_info; /* which parts of security descriptor to set */
2917     VARARG(sd,security_descriptor); /* security descriptor to set */
2918 @END
2919 
2920 @REQ(get_security_object)
2921     obj_handle_t    handle;       /* handle to the object */
2922     unsigned int    security_info; /* which parts of security descriptor to get */
2923 @REPLY
2924     unsigned int    sd_len;         /* buffer size needed for sd */
2925     VARARG(sd,security_descriptor); /* retrieved security descriptor */
2926 @END
2927 
2928 /* Create a mailslot */
2929 @REQ(create_mailslot)
2930     unsigned int   access;        /* wanted access rights */
2931     unsigned int   attributes;    /* object attributes */
2932     obj_handle_t   rootdir;       /* root directory */
2933     timeout_t      read_timeout;
2934     unsigned int   max_msgsize;
2935     VARARG(name,unicode_str);     /* mailslot name */
2936 @REPLY
2937     obj_handle_t   handle;        /* handle to the mailslot */
2938 @END
2939 
2940 
2941 /* Set mailslot information */
2942 @REQ(set_mailslot_info)
2943     obj_handle_t   handle;        /* handle to the mailslot */
2944     timeout_t      read_timeout;
2945     unsigned int   flags;
2946 @REPLY
2947     timeout_t      read_timeout;
2948     unsigned int   max_msgsize;
2949 @END
2950 #define MAILSLOT_SET_READ_TIMEOUT  1
2951 
2952 
2953 /* Create a directory object */
2954 @REQ(create_directory)
2955     unsigned int   access;        /* access flags */
2956     unsigned int   attributes;    /* object attributes */
2957     obj_handle_t   rootdir;       /* root directory */
2958     VARARG(directory_name,unicode_str); /* Directory name */
2959 @REPLY
2960     obj_handle_t   handle;        /* handle to the directory */
2961 @END
2962 
2963 
2964 /* Open a directory object */
2965 @REQ(open_directory)
2966     unsigned int   access;        /* access flags */
2967     unsigned int   attributes;    /* object attributes */
2968     obj_handle_t   rootdir;       /* root directory */
2969     VARARG(directory_name,unicode_str); /* Directory name */
2970 @REPLY
2971     obj_handle_t   handle;        /* handle to the directory */
2972 @END
2973 
2974 
2975 /* Get a directory entry by index */
2976 @REQ(get_directory_entry)
2977     obj_handle_t   handle;             /* handle to the directory */
2978     unsigned int   index;              /* entry index */
2979 @REPLY
2980     data_size_t    name_len;           /* length of the entry name in bytes */
2981     VARARG(name,unicode_str,name_len); /* entry name */
2982     VARARG(type,unicode_str);          /* entry type */
2983 @END
2984 
2985 
2986 /* Create a symbolic link object */
2987 @REQ(create_symlink)
2988     unsigned int   access;        /* access flags */
2989     unsigned int   attributes;    /* object attributes */
2990     obj_handle_t   rootdir;       /* root directory */
2991     data_size_t    name_len;      /* length of the symlink name in bytes */
2992     VARARG(name,unicode_str,name_len); /* symlink name */
2993     VARARG(target_name,unicode_str);   /* target name */
2994 @REPLY
2995     obj_handle_t   handle;        /* handle to the symlink */
2996 @END
2997 
2998 
2999 /* Open a symbolic link object */
3000 @REQ(open_symlink)
3001     unsigned int   access;        /* access flags */
3002     unsigned int   attributes;    /* object attributes */
3003     obj_handle_t   rootdir;       /* root directory */
3004     VARARG(name,unicode_str);     /* symlink name */
3005 @REPLY
3006     obj_handle_t   handle;        /* handle to the symlink */
3007 @END
3008 
3009 
3010 /* Query a symbolic link object */
3011 @REQ(query_symlink)
3012     obj_handle_t   handle;        /* handle to the symlink */
3013 @REPLY
3014     VARARG(target_name,unicode_str); /* target name */
3015 @END
3016 
3017 
3018 /* Query basic object information */
3019 @REQ(get_object_info)
3020     obj_handle_t   handle;        /* handle to the object */
3021 @REPLY
3022     unsigned int   access;        /* granted access mask */
3023     unsigned int   ref_count;     /* object ref count */
3024 @END
3025 
3026 
3027 /* Unlink a named object */
3028 @REQ(unlink_object)
3029     obj_handle_t   handle;        /* handle to the object */
3030 @END
3031 
3032 
3033 /* Query the impersonation level of an impersonation token */
3034 @REQ(get_token_impersonation_level)
3035     obj_handle_t   handle;        /* handle to the object */
3036 @REPLY
3037     int            impersonation_level; /* impersonation level of the impersonation token */
3038 @END
3039 
3040 /* Allocate a locally-unique identifier */
3041 @REQ(allocate_locally_unique_id)
3042 @REPLY
3043     luid_t         luid;
3044 @END
3045 
3046 
3047 /* Create a device manager */
3048 @REQ(create_device_manager)
3049     unsigned int access;          /* wanted access rights */
3050     unsigned int attributes;      /* object attributes */
3051 @REPLY
3052     obj_handle_t handle;          /* handle to the device */
3053 @END
3054 
3055 
3056 /* Create a device */
3057 @REQ(create_device)
3058     unsigned int access;          /* wanted access rights */
3059     unsigned int attributes;      /* object attributes */
3060     obj_handle_t rootdir;         /* root directory */
3061     client_ptr_t user_ptr;        /* opaque ptr for use by client */
3062     obj_handle_t manager;         /* device manager */
3063     VARARG(name,unicode_str);     /* object name */
3064 @REPLY
3065     obj_handle_t handle;          /* handle to the device */
3066 @END
3067 
3068 
3069 /* Delete a device */
3070 @REQ(delete_device)
3071     obj_handle_t handle;          /* handle to the device */
3072 @END
3073 
3074 
3075 /* Retrieve the next pending device ioctl request */
3076 @REQ(get_next_device_request)
3077     obj_handle_t manager;         /* handle to the device manager */
3078     obj_handle_t prev;            /* handle to the previous ioctl */
3079     unsigned int status;          /* status of the previous ioctl */
3080     VARARG(prev_data,bytes);      /* output data of the previous ioctl */
3081 @REPLY
3082     obj_handle_t next;            /* handle to the next ioctl */
3083     ioctl_code_t code;            /* ioctl code */
3084     client_ptr_t user_ptr;        /* opaque ptr for the device */
3085     data_size_t  in_size;         /* total needed input size */
3086     data_size_t  out_size;        /* needed output size */
3087     VARARG(next_data,bytes);      /* input data of the next ioctl */
3088 @END
3089 
3090 
3091 /* Make the current process a system process */
3092 @REQ(make_process_system)
3093 @REPLY
3094     obj_handle_t event;           /* event signaled when all user processes have exited */
3095 @END
3096 
3097 
3098 /* Get detailed fixed-size information about a token */
3099 @REQ(get_token_statistics)
3100     obj_handle_t   handle;        /* handle to the object */
3101 @REPLY
3102     luid_t         token_id;      /* locally-unique identifier of the token */
3103     luid_t         modified_id;   /* locally-unique identifier of the modified version of the token */
3104     int            primary;       /* is the token primary or impersonation? */
3105     int            impersonation_level; /* level of impersonation */
3106     int            group_count;   /* the number of groups the token is a member of */
3107     int            privilege_count; /* the number of privileges the token has */
3108 @END
3109 
3110 
3111 /* Create I/O completion port */
3112 @REQ(create_completion)
3113     unsigned int access;          /* desired access to a port */
3114     unsigned int attributes;      /* object attributes */
3115     unsigned int concurrent;      /* max number of concurrent active threads */
3116     obj_handle_t rootdir;         /* root directory */
3117     VARARG(filename,string);      /* port name */
3118 @REPLY
3119     obj_handle_t handle;          /* port handle */
3120 @END
3121 
3122 
3123 /* Open I/O completion port */
3124 @REQ(open_completion)
3125     unsigned int access;          /* desired access to a port */
3126     unsigned int attributes;      /* object attributes */
3127     obj_handle_t rootdir;         /* root directory */
3128     VARARG(filename,string);      /* port name */
3129 @REPLY
3130     obj_handle_t handle;          /* port handle */
3131 @END
3132 
3133 
3134 /* add completion to completion port */
3135 @REQ(add_completion)
3136     obj_handle_t  handle;         /* port handle */
3137     apc_param_t   ckey;           /* completion key */
3138     apc_param_t   cvalue;         /* completion value */
3139     unsigned int  information;    /* IO_STATUS_BLOCK Information */
3140     unsigned int  status;         /* completion result */
3141 @END
3142 
3143 
3144 /* get completion from completion port queue */
3145 @REQ(remove_completion)
3146     obj_handle_t handle;          /* port handle */
3147 @REPLY
3148     apc_param_t   ckey;           /* completion key */
3149     apc_param_t   cvalue;         /* completion value */
3150     unsigned int  information;    /* IO_STATUS_BLOCK Information */
3151     unsigned int  status;         /* completion result */
3152 @END
3153 
3154 
3155 /* get completion queue depth */
3156 @REQ(query_completion)
3157     obj_handle_t  handle;         /* port handle */
3158 @REPLY
3159     unsigned int  depth;          /* completion queue depth */
3160 @END
3161 
3162 
3163 /* associate object with completion port */
3164 @REQ(set_completion_info)
3165     obj_handle_t  handle;         /* object handle */
3166     apc_param_t   ckey;           /* completion key */
3167     obj_handle_t  chandle;        /* port handle */
3168 @END
3169 
3170 
3171 /* check for associated completion and push msg */
3172 @REQ(add_fd_completion)
3173     obj_handle_t   handle;        /* async' object */
3174     apc_param_t    cvalue;        /* completion value */
3175     unsigned int   status;        /* completion status */
3176     unsigned int   information;   /* IO_STATUS_BLOCK Information */
3177 @END
3178 
3179 
3180 /* Retrieve layered info for a window */
3181 @REQ(get_window_layered_info)
3182     user_handle_t  handle;        /* handle to the window */
3183 @REPLY
3184     unsigned int   color_key;     /* color key */
3185     unsigned int   alpha;         /* alpha (0..255) */
3186     unsigned int   flags;         /* LWA_* flags */
3187 @END
3188 
3189 
3190 /* Set layered info for a window */
3191 @REQ(set_window_layered_info)
3192     user_handle_t  handle;        /* handle to the window */
3193     unsigned int   color_key;     /* color key */
3194     unsigned int   alpha;         /* alpha (0..255) */
3195     unsigned int   flags;         /* LWA_* flags */
3196 @END

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.