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