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