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