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