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 */
34 typedef void *obj_handle_t;
35 typedef void *user_handle_t;
36 typedef unsigned short atom_t;
37 typedef unsigned int process_id_t;
38 typedef unsigned int thread_id_t;
39 typedef unsigned int data_size_t;
43 int req; /* request code */
44 data_size_t request_size; /* request variable part size */
45 data_size_t reply_size; /* reply variable part maximum size */
50 unsigned int error; /* error result */
51 data_size_t reply_size; /* reply variable part size */
54 /* placeholder structure for the maximum allowed request size */
55 /* this is used to construct the generic_request union */
56 struct request_max_size
58 int pad[16]; /* the max request size is 16 ints */
61 #define FIRST_USER_HANDLE 0x0020 /* first possible value for low word of user handle */
62 #define LAST_USER_HANDLE 0xffef /* last possible value for low word of user handle */
65 /* definitions of the event data depending on the event code */
66 struct debug_event_exception
68 EXCEPTION_RECORD record; /* exception record */
69 int first; /* first chance exception? */
71 struct debug_event_create_thread
73 obj_handle_t handle; /* handle to the new thread */
74 void *teb; /* thread teb (in debugged process address space) */
75 void *start; /* thread startup routine */
77 struct debug_event_create_process
79 obj_handle_t file; /* handle to the process exe file */
80 obj_handle_t process; /* handle to the new process */
81 obj_handle_t thread; /* handle to the new thread */
82 void *base; /* base of executable image */
83 int dbg_offset; /* offset of debug info in file */
84 int dbg_size; /* size of debug info */
85 void *teb; /* thread teb (in debugged process address space) */
86 void *start; /* thread startup routine */
87 void *name; /* image name (optional) */
88 int unicode; /* is it Unicode? */
90 struct debug_event_exit
92 int exit_code; /* thread or process exit code */
94 struct debug_event_load_dll
96 obj_handle_t handle; /* file handle for the dll */
97 void *base; /* base address of the dll */
98 int dbg_offset; /* offset of debug info in file */
99 int dbg_size; /* size of debug info */
100 void *name; /* image name (optional) */
101 int unicode; /* is it Unicode? */
103 struct debug_event_unload_dll
105 void *base; /* base address of the dll */
107 struct debug_event_output_string
109 void *string; /* string to display (in debugged process address space) */
110 int unicode; /* is it Unicode? */
111 int length; /* string length */
113 struct debug_event_rip_info
118 union debug_event_data
120 struct debug_event_exception exception;
121 struct debug_event_create_thread create_thread;
122 struct debug_event_create_process create_process;
123 struct debug_event_exit exit;
124 struct debug_event_load_dll load_dll;
125 struct debug_event_unload_dll unload_dll;
126 struct debug_event_output_string output_string;
127 struct debug_event_rip_info rip_info;
130 /* debug event data */
133 int code; /* event code */
134 union debug_event_data info; /* event information */
137 /* structure used in sending an fd from client to server */
140 thread_id_t tid; /* thread id */
141 int fd; /* file descriptor on client-side */
144 /* structure sent by the server on the wait fifo */
147 void *cookie; /* magic cookie that was passed in select_request */
148 int signaled; /* wait result */
151 /* structure for absolute timeouts */
154 int sec; /* seconds since Unix epoch */
155 int usec; /* microseconds */
158 /* structure returned in the list of window properties */
161 atom_t atom; /* property atom */
162 short string; /* was atom a string originally? */
163 obj_handle_t handle; /* handle stored in property */
166 /* structure to specify window rectangles */
175 /* structures for extra message data */
177 struct callback_msg_data
179 void *callback; /* callback function */
180 unsigned long data; /* user data for callback */
181 unsigned long result; /* message result */
184 struct winevent_msg_data
186 user_handle_t hook; /* hook handle */
187 thread_id_t tid; /* thread id */
188 void *hook_proc; /* hook proc address */
189 /* followed by module name if any */
194 unsigned char bytes[1]; /* raw data for sent messages */
195 struct callback_msg_data callback;
196 struct winevent_msg_data winevent;
199 /* structure for console char/attribute info */
208 unsigned int low_part;
212 #define MAX_ACL_LEN 65535
214 struct security_descriptor
216 unsigned int control; /* SE_ flags */
217 data_size_t owner_len;
218 data_size_t group_len;
219 data_size_t sacl_len;
220 data_size_t dacl_len;
221 /* VARARGS(owner,SID); */
222 /* VARARGS(group,SID); */
223 /* VARARGS(sacl,ACL); */
224 /* VARARGS(dacl,ACL); */
230 /* unsigned int attributes[count]; */
231 /* VARARGS(sids,SID); */
257 enum apc_type type; /* APC_USER */
258 void (__stdcall *func)(unsigned long,unsigned long,unsigned long);
259 unsigned long args[3]; /* arguments for user function */
263 enum apc_type type; /* APC_TIMER */
264 void (__stdcall *func)(void*, unsigned int, unsigned int);
265 abs_time_t time; /* absolute time of expiration */
266 void *arg; /* user argument */
270 enum apc_type type; /* APC_ASYNC_IO */
271 void (__stdcall *func)(void*, void*, unsigned int);
272 void *user; /* user pointer */
273 void *sb; /* status block */
274 unsigned int status; /* I/O status */
278 enum apc_type type; /* APC_VIRTUAL_ALLOC */
279 void *addr; /* requested address */
280 unsigned long size; /* allocation size */
281 unsigned int zero_bits; /* allocation alignment */
282 unsigned int op_type; /* type of operation */
283 unsigned int prot; /* memory protection flags */
287 enum apc_type type; /* APC_VIRTUAL_FREE */
288 void *addr; /* requested address */
289 unsigned long size; /* allocation size */
290 unsigned int op_type; /* type of operation */
294 enum apc_type type; /* APC_VIRTUAL_QUERY */
295 const void *addr; /* requested address */
299 enum apc_type type; /* APC_VIRTUAL_PROTECT */
300 void *addr; /* requested address */
301 unsigned long size; /* requested address */
302 unsigned int prot; /* new protection flags */
306 enum apc_type type; /* APC_VIRTUAL_FLUSH */
307 const void *addr; /* requested address */
308 unsigned long size; /* requested address */
312 enum apc_type type; /* APC_VIRTUAL_LOCK */
313 void *addr; /* requested address */
314 unsigned long size; /* requested address */
318 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
319 void *addr; /* requested address */
320 unsigned long size; /* requested address */
324 enum apc_type type; /* APC_MAP_VIEW */
325 obj_handle_t handle; /* mapping handle */
326 void *addr; /* requested address */
327 unsigned long size; /* allocation size */
328 unsigned int offset_low;/* file offset */
329 unsigned int offset_high;
330 unsigned int zero_bits; /* allocation alignment */
331 unsigned int alloc_type;/* allocation type */
332 unsigned int prot; /* memory protection flags */
336 enum apc_type type; /* APC_UNMAP_VIEW */
337 void *addr; /* view address */
341 enum apc_type type; /* APC_CREATE_THREAD */
342 void (__stdcall *func)(void*); /* start function */
343 void *arg; /* argument for start function */
344 unsigned long reserve; /* reserve size for thread stack */
345 unsigned long commit; /* commit size for thread stack */
346 int suspend; /* suspended thread? */
355 enum apc_type type; /* APC_ASYNC_IO */
356 unsigned int status; /* new status of async operation */
360 enum apc_type type; /* APC_VIRTUAL_ALLOC */
361 unsigned int status; /* status returned by call */
362 void *addr; /* resulting address */
363 unsigned long size; /* resulting size */
367 enum apc_type type; /* APC_VIRTUAL_FREE */
368 unsigned int status; /* status returned by call */
369 void *addr; /* resulting address */
370 unsigned long size; /* resulting size */
374 enum apc_type type; /* APC_VIRTUAL_QUERY */
375 unsigned int status; /* status returned by call */
376 void *base; /* resulting base address */
377 void *alloc_base;/* resulting allocation base */
378 unsigned long size; /* resulting region size */
379 unsigned int state; /* resulting region state */
380 unsigned int prot; /* resulting region protection */
381 unsigned int alloc_prot;/* resulting allocation protection */
382 unsigned int alloc_type;/* resulting region allocation type */
386 enum apc_type type; /* APC_VIRTUAL_PROTECT */
387 unsigned int status; /* status returned by call */
388 void *addr; /* resulting address */
389 unsigned long size; /* resulting size */
390 unsigned int prot; /* old protection flags */
394 enum apc_type type; /* APC_VIRTUAL_FLUSH */
395 unsigned int status; /* status returned by call */
396 const void *addr; /* resulting address */
397 unsigned long size; /* resulting size */
401 enum apc_type type; /* APC_VIRTUAL_LOCK */
402 unsigned int status; /* status returned by call */
403 void *addr; /* resulting address */
404 unsigned long size; /* resulting size */
408 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
409 unsigned int status; /* status returned by call */
410 void *addr; /* resulting address */
411 unsigned long size; /* resulting size */
415 enum apc_type type; /* APC_MAP_VIEW */
416 unsigned int status; /* status returned by call */
417 void *addr; /* resulting address */
418 unsigned long size; /* resulting size */
422 enum apc_type type; /* APC_MAP_VIEW */
423 unsigned int status; /* status returned by call */
427 enum apc_type type; /* APC_CREATE_THREAD */
428 unsigned int status; /* status returned by call */
429 thread_id_t tid; /* thread id */
430 obj_handle_t handle; /* handle to new thread */
434 /****************************************************************/
435 /* Request declarations */
437 /* Create a new process from the context of the parent */
439 int inherit_all; /* inherit all handles from parent */
440 unsigned int create_flags; /* creation flags */
441 int socket_fd; /* file descriptor for process socket */
442 obj_handle_t exe_file; /* file handle for main exe */
443 obj_handle_t hstdin; /* handle for stdin */
444 obj_handle_t hstdout; /* handle for stdout */
445 obj_handle_t hstderr; /* handle for stderr */
446 unsigned int process_access; /* access rights for process object */
447 unsigned int process_attr; /* attributes for process object */
448 unsigned int thread_access; /* access rights for thread object */
449 unsigned int thread_attr; /* attributes for thread object */
450 VARARG(info,startup_info); /* startup information */
451 VARARG(env,unicode_str); /* environment for new process */
453 obj_handle_t info; /* new process info handle */
454 process_id_t pid; /* process id */
455 obj_handle_t phandle; /* process handle (in the current process) */
456 thread_id_t tid; /* thread id */
457 obj_handle_t thandle; /* thread handle (in the current process) */
461 /* Retrieve information about a newly started process */
462 @REQ(get_new_process_info)
463 obj_handle_t info; /* info handle returned from new_process_request */
465 int success; /* did the process start successfully? */
466 int exit_code; /* process exit code if failed */
470 /* Create a new thread from the context of the parent */
472 unsigned int access; /* wanted access rights */
473 unsigned int attributes; /* object attributes */
474 int suspend; /* new thread should be suspended on creation */
475 int request_fd; /* fd for request pipe */
477 thread_id_t tid; /* thread id */
478 obj_handle_t handle; /* thread handle (in the current process) */
482 /* Retrieve the new process startup info */
483 @REQ(get_startup_info)
485 obj_handle_t exe_file; /* file handle for main exe */
486 obj_handle_t hstdin; /* handle for stdin */
487 obj_handle_t hstdout; /* handle for stdout */
488 obj_handle_t hstderr; /* handle for stderr */
489 VARARG(info,startup_info); /* startup information */
490 VARARG(env,unicode_str); /* environment */
494 /* Signal the end of the process initialization */
495 @REQ(init_process_done)
496 void* module; /* main module base address */
497 void* entry; /* process entry point */
498 int gui; /* is it a GUI process? */
502 /* Initialize a thread; called from the child after fork()/clone() */
504 int unix_pid; /* Unix pid of new thread */
505 int unix_tid; /* Unix tid of new thread */
506 int debug_level; /* new debug level */
507 void* teb; /* TEB of new thread (in thread address space) */
508 void* peb; /* address of PEB (in thread address space) */
509 void* entry; /* thread entry point (in thread address space) */
510 void* ldt_copy; /* address of LDT copy (in thread address space) */
511 int reply_fd; /* fd for reply pipe */
512 int wait_fd; /* fd for blocking calls pipe */
514 process_id_t pid; /* process id of the new thread's process */
515 thread_id_t tid; /* thread id of the new thread */
516 data_size_t info_size; /* total size of startup info */
517 abs_time_t server_start; /* server start time */
518 int version; /* protocol version */
522 /* Terminate a process */
523 @REQ(terminate_process)
524 obj_handle_t handle; /* process handle to terminate */
525 int exit_code; /* process exit code */
527 int self; /* suicide? */
531 /* Terminate a thread */
532 @REQ(terminate_thread)
533 obj_handle_t handle; /* thread handle to terminate */
534 int exit_code; /* thread exit code */
536 int self; /* suicide? */
537 int last; /* last thread in this process? */
541 /* Retrieve information about a process */
542 @REQ(get_process_info)
543 obj_handle_t handle; /* process handle */
545 process_id_t pid; /* server process id */
546 process_id_t ppid; /* server process id of parent */
547 int exit_code; /* process exit code */
548 int priority; /* priority class */
549 int affinity; /* process affinity mask */
550 void* peb; /* PEB address in process address space */
551 abs_time_t start_time; /* process start time */
552 abs_time_t end_time; /* process end time */
556 /* Set a process informations */
557 @REQ(set_process_info)
558 obj_handle_t handle; /* process handle */
559 int mask; /* setting mask (see below) */
560 int priority; /* priority class */
561 int affinity; /* affinity mask */
563 #define SET_PROCESS_INFO_PRIORITY 0x01
564 #define SET_PROCESS_INFO_AFFINITY 0x02
567 /* Retrieve information about a thread */
568 @REQ(get_thread_info)
569 obj_handle_t handle; /* thread handle */
570 thread_id_t tid_in; /* thread id (optional) */
572 process_id_t pid; /* server process id */
573 thread_id_t tid; /* server thread id */
574 void* teb; /* thread teb pointer */
575 int exit_code; /* thread exit code */
576 int priority; /* thread priority level */
577 int affinity; /* thread affinity mask */
578 abs_time_t creation_time; /* thread creation time */
579 abs_time_t exit_time; /* thread exit time */
580 int last; /* last thread in process */
584 /* Set a thread informations */
585 @REQ(set_thread_info)
586 obj_handle_t handle; /* thread handle */
587 int mask; /* setting mask (see below) */
588 int priority; /* priority class */
589 int affinity; /* affinity mask */
590 obj_handle_t token; /* impersonation token */
592 #define SET_THREAD_INFO_PRIORITY 0x01
593 #define SET_THREAD_INFO_AFFINITY 0x02
594 #define SET_THREAD_INFO_TOKEN 0x04
597 /* Retrieve information about a module */
599 obj_handle_t handle; /* process handle */
600 void* base_address; /* base address of module */
602 size_t size; /* module size */
604 VARARG(filename,unicode_str); /* file name of module */
608 /* Suspend a thread */
610 obj_handle_t handle; /* thread handle */
612 int count; /* new suspend count */
616 /* Resume a thread */
618 obj_handle_t handle; /* thread handle */
620 int count; /* new suspend count */
624 /* Notify the server that a dll has been loaded */
626 obj_handle_t handle; /* file handle */
627 void* base; /* base address */
628 size_t size; /* dll size */
629 int dbg_offset; /* debug info offset */
630 int dbg_size; /* debug info size */
631 void* name; /* ptr to ptr to name (in process addr space) */
632 VARARG(filename,unicode_str); /* file name of dll */
636 /* Notify the server that a dll is being unloaded */
638 void* base; /* base address */
642 /* Queue an APC for a thread or process */
644 obj_handle_t thread; /* thread handle */
645 obj_handle_t process; /* process handle */
646 apc_call_t call; /* call arguments */
648 obj_handle_t handle; /* APC handle */
649 int self; /* run APC in caller itself? */
653 /* Get next APC to call */
655 int alertable; /* is thread alertable? */
656 obj_handle_t prev; /* handle to previous APC */
657 apc_result_t result; /* result of previous APC */
659 obj_handle_t handle; /* handle to APC */
660 apc_call_t call; /* call arguments */
664 /* Get the result of an APC call */
666 obj_handle_t handle; /* handle to the APC */
668 apc_result_t result; /* result of the APC */
672 /* Close a handle for the current process */
674 obj_handle_t handle; /* handle to close */
678 /* Set a handle information */
679 @REQ(set_handle_info)
680 obj_handle_t handle; /* handle we are interested in */
681 int flags; /* new handle flags */
682 int mask; /* mask for flags to set */
684 int old_flags; /* old flag value */
688 /* Duplicate a handle */
690 obj_handle_t src_process; /* src process handle */
691 obj_handle_t src_handle; /* src handle to duplicate */
692 obj_handle_t dst_process; /* dst process handle */
693 unsigned int access; /* wanted access rights */
694 unsigned int attributes; /* object attributes */
695 unsigned int options; /* duplicate options (see below) */
697 obj_handle_t handle; /* duplicated handle in dst process */
698 int self; /* is the source the current process? */
699 int closed; /* whether the source handle has been closed */
701 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
702 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
703 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
706 /* Open a handle to a process */
708 process_id_t pid; /* process id to open */
709 unsigned int access; /* wanted access rights */
710 unsigned int attributes; /* object attributes */
712 obj_handle_t handle; /* handle to the process */
716 /* Open a handle to a thread */
718 thread_id_t tid; /* thread id to open */
719 unsigned int access; /* wanted access rights */
720 unsigned int attributes; /* object attributes */
722 obj_handle_t handle; /* handle to the thread */
726 /* Wait for handles */
728 int flags; /* wait flags (see below) */
729 void* cookie; /* magic cookie to return to client */
730 obj_handle_t signal; /* object to signal (0 if none) */
731 abs_time_t timeout; /* absolute timeout */
732 VARARG(handles,handles); /* handles to select on */
735 #define SELECT_ALERTABLE 2
736 #define SELECT_INTERRUPTIBLE 4
737 #define SELECT_TIMEOUT 8
740 /* Create an event */
742 unsigned int access; /* wanted access rights */
743 unsigned int attributes; /* object attributes */
744 obj_handle_t rootdir; /* root directory */
745 int manual_reset; /* manual reset event */
746 int initial_state; /* initial state of the event */
747 VARARG(name,unicode_str); /* object name */
749 obj_handle_t handle; /* handle to the event */
752 /* Event operation */
754 obj_handle_t handle; /* handle to event */
755 int op; /* event operation (see below) */
757 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
762 unsigned int access; /* wanted access rights */
763 unsigned int attributes; /* object attributes */
764 obj_handle_t rootdir; /* root directory */
765 VARARG(name,unicode_str); /* object name */
767 obj_handle_t handle; /* handle to the event */
773 unsigned int access; /* wanted access rights */
774 unsigned int attributes; /* object attributes */
775 obj_handle_t rootdir; /* root directory */
776 int owned; /* initially owned? */
777 VARARG(name,unicode_str); /* object name */
779 obj_handle_t handle; /* handle to the mutex */
783 /* Release a mutex */
785 obj_handle_t handle; /* handle to the mutex */
787 unsigned int prev_count; /* value of internal counter, before release */
793 unsigned int access; /* wanted access rights */
794 unsigned int attributes; /* object attributes */
795 obj_handle_t rootdir; /* root directory */
796 VARARG(name,unicode_str); /* object name */
798 obj_handle_t handle; /* handle to the mutex */
802 /* Create a semaphore */
803 @REQ(create_semaphore)
804 unsigned int access; /* wanted access rights */
805 unsigned int attributes; /* object attributes */
806 obj_handle_t rootdir; /* root directory */
807 unsigned int initial; /* initial count */
808 unsigned int max; /* maximum count */
809 VARARG(name,unicode_str); /* object name */
811 obj_handle_t handle; /* handle to the semaphore */
815 /* Release a semaphore */
816 @REQ(release_semaphore)
817 obj_handle_t handle; /* handle to the semaphore */
818 unsigned int count; /* count to add to semaphore */
820 unsigned int prev_count; /* previous semaphore count */
824 /* Open a semaphore */
826 unsigned int access; /* wanted access rights */
827 unsigned int attributes; /* object attributes */
828 obj_handle_t rootdir; /* root directory */
829 VARARG(name,unicode_str); /* object name */
831 obj_handle_t handle; /* handle to the semaphore */
837 unsigned int access; /* wanted access rights */
838 unsigned int attributes; /* object attributes */
839 unsigned int sharing; /* sharing flags */
840 int create; /* file create action */
841 unsigned int options; /* file options */
842 unsigned int attrs; /* file attributes for creation */
843 VARARG(filename,string); /* file name */
845 obj_handle_t handle; /* handle to the file */
849 /* Open a file object */
850 @REQ(open_file_object)
851 unsigned int access; /* wanted access rights */
852 unsigned int attributes; /* open attributes */
853 obj_handle_t rootdir; /* root directory */
854 unsigned int sharing; /* sharing flags */
855 VARARG(filename,unicode_str); /* file name */
857 obj_handle_t handle; /* handle to the file */
861 /* Allocate a file handle for a Unix fd */
862 @REQ(alloc_file_handle)
863 unsigned int access; /* wanted access rights */
864 unsigned int attributes; /* object attributes */
865 int fd; /* file descriptor on the client side */
867 obj_handle_t handle; /* handle to the file */
871 /* Get a Unix fd to access a file */
873 obj_handle_t handle; /* handle to the file */
874 unsigned int access; /* wanted access rights */
875 int cached; /* is it cached on the client already? */
877 int type; /* file type (see below) */
878 int flags; /* file read/write flags (see below) */
882 FD_TYPE_INVALID, /* invalid file (no associated fd) */
883 FD_TYPE_FILE, /* regular file */
884 FD_TYPE_DIR, /* directory */
885 FD_TYPE_SOCKET, /* socket */
886 FD_TYPE_SERIAL, /* serial port */
887 FD_TYPE_PIPE, /* named pipe */
888 FD_TYPE_MAILSLOT, /* mailslot */
889 FD_TYPE_DEVICE, /* Windows device file */
892 #define FD_FLAG_OVERLAPPED 0x01 /* fd opened in overlapped mode */
893 #define FD_FLAG_TIMEOUT 0x02 /* read/write is synchronous */
894 #define FD_FLAG_RECV_SHUTDOWN 0x04
895 #define FD_FLAG_SEND_SHUTDOWN 0x08
896 #define FD_FLAG_AVAILABLE 0x10 /* in overlap read/write operation,
897 * only handle available data (don't wait) */
898 #define FD_FLAG_REMOVABLE 0x20 /* is it on a removable device? */
900 /* Flush a file buffers */
902 obj_handle_t handle; /* handle to the file */
904 obj_handle_t event; /* event set when finished */
908 /* Lock a region of a file */
910 obj_handle_t handle; /* handle to the file */
911 unsigned int offset_low; /* offset of start of lock */
912 unsigned int offset_high; /* offset of start of lock */
913 unsigned int count_low; /* count of bytes to lock */
914 unsigned int count_high; /* count of bytes to lock */
915 int shared; /* shared or exclusive lock? */
916 int wait; /* do we want to wait? */
918 obj_handle_t handle; /* handle to wait on */
919 int overlapped; /* is it an overlapped I/O handle? */
923 /* Unlock a region of a file */
925 obj_handle_t handle; /* handle to the file */
926 unsigned int offset_low; /* offset of start of unlock */
927 unsigned int offset_high; /* offset of start of unlock */
928 unsigned int count_low; /* count of bytes to unlock */
929 unsigned int count_high; /* count of bytes to unlock */
933 /* Get ready to unmount a Unix device */
935 obj_handle_t handle; /* handle to a file on the device */
939 /* Create a socket */
941 unsigned int access; /* wanted access rights */
942 unsigned int attributes; /* object attributes */
943 int family; /* family, see socket manpage */
944 int type; /* type, see socket manpage */
945 int protocol; /* protocol, see socket manpage */
946 unsigned int flags; /* socket flags */
948 obj_handle_t handle; /* handle to the new socket */
952 /* Accept a socket */
954 obj_handle_t lhandle; /* handle to the listening socket */
955 unsigned int access; /* wanted access rights */
956 unsigned int attributes; /* object attributes */
958 obj_handle_t handle; /* handle to the new socket */
962 /* Set socket event parameters */
963 @REQ(set_socket_event)
964 obj_handle_t handle; /* handle to the socket */
965 unsigned int mask; /* event mask */
966 obj_handle_t event; /* event object */
967 user_handle_t window; /* window to send the message to */
968 unsigned int msg; /* message to send */
972 /* Get socket event parameters */
973 @REQ(get_socket_event)
974 obj_handle_t handle; /* handle to the socket */
975 int service; /* clear pending? */
976 obj_handle_t c_event; /* event to clear */
978 unsigned int mask; /* event mask */
979 unsigned int pmask; /* pending events */
980 unsigned int state; /* status bits */
981 VARARG(errors,ints); /* event errors */
985 /* Reenable pending socket events */
986 @REQ(enable_socket_event)
987 obj_handle_t handle; /* handle to the socket */
988 unsigned int mask; /* events to re-enable */
989 unsigned int sstate; /* status bits to set */
990 unsigned int cstate; /* status bits to clear */
993 @REQ(set_socket_deferred)
994 obj_handle_t handle; /* handle to the socket */
995 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
998 /* Allocate a console (only used by a console renderer) */
1000 unsigned int access; /* wanted access rights */
1001 unsigned int attributes; /* object attributes */
1002 process_id_t pid; /* pid of process which shall be attached to the console */
1004 obj_handle_t handle_in; /* handle to console input */
1005 obj_handle_t event; /* handle to renderer events change notification */
1009 /* Free the console of the current process */
1014 #define CONSOLE_RENDERER_NONE_EVENT 0x00
1015 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
1016 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
1017 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
1018 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
1019 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
1020 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
1021 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
1022 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
1023 struct console_renderer_event
1058 /* retrieve console events for the renderer */
1059 @REQ(get_console_renderer_events)
1060 obj_handle_t handle; /* handle to console input events */
1062 VARARG(data,bytes); /* the various console_renderer_events */
1066 /* Open a handle to the process console */
1068 obj_handle_t from; /* 0 (resp 1) input (resp output) of current process console */
1069 /* otherwise console_in handle to get active screen buffer? */
1070 unsigned int access; /* wanted access rights */
1071 unsigned int attributes; /* object attributes */
1072 int share; /* share mask (only for output handles) */
1074 obj_handle_t handle; /* handle to the console */
1078 /* Get the input queue wait event */
1079 @REQ(get_console_wait_event)
1081 obj_handle_t handle;
1084 /* Get a console mode (input or output) */
1085 @REQ(get_console_mode)
1086 obj_handle_t handle; /* handle to the console */
1088 int mode; /* console mode */
1092 /* Set a console mode (input or output) */
1093 @REQ(set_console_mode)
1094 obj_handle_t handle; /* handle to the console */
1095 int mode; /* console mode */
1099 /* Set info about a console (input only) */
1100 @REQ(set_console_input_info)
1101 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1102 int mask; /* setting mask (see below) */
1103 obj_handle_t active_sb; /* active screen buffer */
1104 int history_mode; /* whether we duplicate lines in history */
1105 int history_size; /* number of lines in history */
1106 int edition_mode; /* index to the edition mode flavors */
1107 VARARG(title,unicode_str); /* console title */
1109 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
1110 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
1111 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
1112 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
1113 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
1116 /* Get info about a console (input only) */
1117 @REQ(get_console_input_info)
1118 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1120 int history_mode; /* whether we duplicate lines in history */
1121 int history_size; /* number of lines in history */
1122 int history_index; /* number of used lines in history */
1123 int edition_mode; /* index to the edition mode flavors */
1124 VARARG(title,unicode_str); /* console title */
1128 /* appends a string to console's history */
1129 @REQ(append_console_input_history)
1130 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1131 VARARG(line,unicode_str); /* line to add */
1135 /* appends a string to console's history */
1136 @REQ(get_console_input_history)
1137 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1138 int index; /* index to get line from */
1140 int total; /* total length of line in Unicode chars */
1141 VARARG(line,unicode_str); /* line to add */
1145 /* creates a new screen buffer on process' console */
1146 @REQ(create_console_output)
1147 obj_handle_t handle_in; /* handle to console input, or 0 for process' console */
1148 unsigned int access; /* wanted access rights */
1149 unsigned int attributes; /* object attributes */
1150 unsigned int share; /* sharing credentials */
1152 obj_handle_t handle_out; /* handle to the screen buffer */
1156 /* Set info about a console (output only) */
1157 @REQ(set_console_output_info)
1158 obj_handle_t handle; /* handle to the console */
1159 int mask; /* setting mask (see below) */
1160 short int cursor_size; /* size of cursor (percentage filled) */
1161 short int cursor_visible;/* cursor visibility flag */
1162 short int cursor_x; /* position of cursor (x, y) */
1164 short int width; /* width of the screen buffer */
1165 short int height; /* height of the screen buffer */
1166 short int attr; /* default attribute */
1167 short int win_left; /* window actually displayed by renderer */
1168 short int win_top; /* the rect area is expressed withing the */
1169 short int win_right; /* boundaries of the screen buffer */
1170 short int win_bottom;
1171 short int max_width; /* maximum size (width x height) for the window */
1172 short int max_height;
1174 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01
1175 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02
1176 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x04
1177 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08
1178 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10
1179 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20
1182 /* Get info about a console (output only) */
1183 @REQ(get_console_output_info)
1184 obj_handle_t handle; /* handle to the console */
1186 short int cursor_size; /* size of cursor (percentage filled) */
1187 short int cursor_visible;/* cursor visibility flag */
1188 short int cursor_x; /* position of cursor (x, y) */
1190 short int width; /* width of the screen buffer */
1191 short int height; /* height of the screen buffer */
1192 short int attr; /* default attribute */
1193 short int win_left; /* window actually displayed by renderer */
1194 short int win_top; /* the rect area is expressed withing the */
1195 short int win_right; /* boundaries of the screen buffer */
1196 short int win_bottom;
1197 short int max_width; /* maximum size (width x height) for the window */
1198 short int max_height;
1201 /* Add input records to a console input queue */
1202 @REQ(write_console_input)
1203 obj_handle_t handle; /* handle to the console input */
1204 VARARG(rec,input_records); /* input records */
1206 int written; /* number of records written */
1210 /* Fetch input records from a console input queue */
1211 @REQ(read_console_input)
1212 obj_handle_t handle; /* handle to the console input */
1213 int flush; /* flush the retrieved records from the queue? */
1215 int read; /* number of records read */
1216 VARARG(rec,input_records); /* input records */
1220 /* write data (chars and/or attributes) in a screen buffer */
1221 @REQ(write_console_output)
1222 obj_handle_t handle; /* handle to the console output */
1223 int x; /* position where to start writing */
1225 int mode; /* char info (see below) */
1226 int wrap; /* wrap around at end of line? */
1227 VARARG(data,bytes); /* info to write */
1229 int written; /* number of char infos actually written */
1230 int width; /* width of screen buffer */
1231 int height; /* height of screen buffer */
1235 CHAR_INFO_MODE_TEXT, /* characters only */
1236 CHAR_INFO_MODE_ATTR, /* attributes only */
1237 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
1238 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
1242 /* fill a screen buffer with constant data (chars and/or attributes) */
1243 @REQ(fill_console_output)
1244 obj_handle_t handle; /* handle to the console output */
1245 int x; /* position where to start writing */
1247 int mode; /* char info mode */
1248 int count; /* number to write */
1249 int wrap; /* wrap around at end of line? */
1250 char_info_t data; /* data to write */
1252 int written; /* number of char infos actually written */
1256 /* read data (chars and/or attributes) from a screen buffer */
1257 @REQ(read_console_output)
1258 obj_handle_t handle; /* handle to the console output */
1259 int x; /* position (x,y) where to start reading */
1261 int mode; /* char info mode */
1262 int wrap; /* wrap around at end of line? */
1264 int width; /* width of screen buffer */
1265 int height; /* height of screen buffer */
1270 /* move a rect (of data) in screen buffer content */
1271 @REQ(move_console_output)
1272 obj_handle_t handle; /* handle to the console output */
1273 short int x_src; /* position (x, y) of rect to start moving from */
1275 short int x_dst; /* position (x, y) of rect to move to */
1277 short int w; /* size of the rect (width, height) to move */
1282 /* Sends a signal to a process group */
1283 @REQ(send_console_signal)
1284 int signal; /* the signal to send */
1285 process_id_t group_id; /* the group to send the signal to */
1289 /* enable directory change notifications */
1290 @REQ(read_directory_changes)
1291 unsigned int filter; /* notification filter */
1292 obj_handle_t handle; /* handle to the directory */
1293 obj_handle_t event; /* handle to the event */
1294 int subtree; /* watch the subtree? */
1295 int want_data; /* flag indicating whether change data should be collected */
1296 void* io_apc; /* APC routine to queue upon end of async */
1297 void* io_sb; /* I/O status block (unique across all async on this handle) */
1298 void* io_user; /* data to pass back to caller */
1303 obj_handle_t handle;
1305 int action; /* type of change */
1306 VARARG(name,string); /* name of directory entry that changed */
1310 /* Create a file mapping */
1311 @REQ(create_mapping)
1312 unsigned int access; /* wanted access rights */
1313 unsigned int attributes; /* object attributes */
1314 obj_handle_t rootdir; /* root directory */
1315 int size_high; /* mapping size */
1316 int size_low; /* mapping size */
1317 int protect; /* protection flags (see below) */
1318 obj_handle_t file_handle; /* file handle */
1319 VARARG(name,unicode_str); /* object name */
1321 obj_handle_t handle; /* handle to the mapping */
1323 /* protection flags */
1324 #define VPROT_READ 0x01
1325 #define VPROT_WRITE 0x02
1326 #define VPROT_EXEC 0x04
1327 #define VPROT_WRITECOPY 0x08
1328 #define VPROT_GUARD 0x10
1329 #define VPROT_NOCACHE 0x20
1330 #define VPROT_COMMITTED 0x40
1331 #define VPROT_IMAGE 0x80
1334 /* Open a mapping */
1336 unsigned int access; /* wanted access rights */
1337 unsigned int attributes; /* object attributes */
1338 obj_handle_t rootdir; /* root directory */
1339 VARARG(name,unicode_str); /* object name */
1341 obj_handle_t handle; /* handle to the mapping */
1345 /* Get information about a file mapping */
1346 @REQ(get_mapping_info)
1347 obj_handle_t handle; /* handle to the mapping */
1349 int size_high; /* mapping size */
1350 int size_low; /* mapping size */
1351 int protect; /* protection flags */
1352 int header_size; /* header size (for VPROT_IMAGE mapping) */
1353 void* base; /* default base addr (for VPROT_IMAGE mapping) */
1354 obj_handle_t mapping; /* duplicate mapping handle unless removable */
1355 obj_handle_t shared_file; /* shared mapping file handle */
1356 int shared_size; /* shared mapping size */
1360 #define SNAP_HEAPLIST 0x00000001
1361 #define SNAP_PROCESS 0x00000002
1362 #define SNAP_THREAD 0x00000004
1363 #define SNAP_MODULE 0x00000008
1364 /* Create a snapshot */
1365 @REQ(create_snapshot)
1366 unsigned int attributes; /* object attributes */
1367 int flags; /* snapshot flags (SNAP_*) */
1368 process_id_t pid; /* process id */
1370 obj_handle_t handle; /* handle to the snapshot */
1374 /* Get the next process from a snapshot */
1376 obj_handle_t handle; /* handle to the snapshot */
1377 int reset; /* reset snapshot position? */
1379 int count; /* process usage count */
1380 process_id_t pid; /* process id */
1381 process_id_t ppid; /* parent process id */
1382 void* heap; /* heap base */
1383 void* module; /* main module */
1384 int threads; /* number of threads */
1385 int priority; /* process priority */
1386 int handles; /* number of handles */
1387 VARARG(filename,unicode_str); /* file name of main exe */
1391 /* Get the next thread from a snapshot */
1393 obj_handle_t handle; /* handle to the snapshot */
1394 int reset; /* reset snapshot position? */
1396 int count; /* thread usage count */
1397 process_id_t pid; /* process id */
1398 thread_id_t tid; /* thread id */
1399 int base_pri; /* base priority */
1400 int delta_pri; /* delta priority */
1404 /* Get the next module from a snapshot */
1406 obj_handle_t handle; /* handle to the snapshot */
1407 int reset; /* reset snapshot position? */
1409 process_id_t pid; /* process id */
1410 void* base; /* module base address */
1411 size_t size; /* module size */
1412 VARARG(filename,unicode_str); /* file name of module */
1416 /* Wait for a debug event */
1417 @REQ(wait_debug_event)
1418 int get_handle; /* should we alloc a handle for waiting? */
1420 process_id_t pid; /* process id */
1421 thread_id_t tid; /* thread id */
1422 obj_handle_t wait; /* wait handle if no event ready */
1423 VARARG(event,debug_event); /* debug event data */
1427 /* Queue an exception event */
1428 @REQ(queue_exception_event)
1429 int first; /* first chance exception? */
1430 VARARG(record,exc_event); /* thread context followed by exception record */
1432 obj_handle_t handle; /* handle to the queued event */
1436 /* Retrieve the status of an exception event */
1437 @REQ(get_exception_status)
1438 obj_handle_t handle; /* handle to the queued event */
1440 VARARG(context,context); /* modified thread context */
1444 /* Send an output string to the debugger */
1445 @REQ(output_debug_string)
1446 void* string; /* string to display (in debugged process address space) */
1447 int unicode; /* is it Unicode? */
1448 int length; /* string length */
1452 /* Continue a debug event */
1453 @REQ(continue_debug_event)
1454 process_id_t pid; /* process id to continue */
1455 thread_id_t tid; /* thread id to continue */
1456 int status; /* continuation status */
1460 /* Start/stop debugging an existing process */
1462 process_id_t pid; /* id of the process to debug */
1463 int attach; /* 1=attaching / 0=detaching from the process */
1467 /* Simulate a breakpoint in a process */
1469 obj_handle_t handle; /* process handle */
1471 int self; /* was it the caller itself? */
1475 /* Set debugger kill on exit flag */
1476 @REQ(set_debugger_kill_on_exit)
1477 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1481 /* Read data from a process address space */
1482 @REQ(read_process_memory)
1483 obj_handle_t handle; /* process handle */
1484 void* addr; /* addr to read from */
1486 VARARG(data,bytes); /* result data */
1490 /* Write data to a process address space */
1491 @REQ(write_process_memory)
1492 obj_handle_t handle; /* process handle */
1493 void* addr; /* addr to write to */
1494 VARARG(data,bytes); /* data to write */
1498 /* Create a registry key */
1500 obj_handle_t parent; /* handle to the parent key */
1501 unsigned int access; /* desired access rights */
1502 unsigned int attributes; /* object attributes */
1503 unsigned int options; /* creation options */
1504 time_t modif; /* last modification time */
1505 data_size_t namelen; /* length of key name in bytes */
1506 VARARG(name,unicode_str,namelen); /* key name */
1507 VARARG(class,unicode_str); /* class name */
1509 obj_handle_t hkey; /* handle to the created key */
1510 int created; /* has it been newly created? */
1513 /* Open a registry key */
1515 obj_handle_t parent; /* handle to the parent key */
1516 unsigned int access; /* desired access rights */
1517 unsigned int attributes; /* object attributes */
1518 VARARG(name,unicode_str); /* key name */
1520 obj_handle_t hkey; /* handle to the open key */
1524 /* Delete a registry key */
1526 obj_handle_t hkey; /* handle to the key */
1530 /* Flush a registry key */
1532 obj_handle_t hkey; /* handle to the key */
1536 /* Enumerate registry subkeys */
1538 obj_handle_t hkey; /* handle to registry key */
1539 int index; /* index of subkey (or -1 for current key) */
1540 int info_class; /* requested information class */
1542 int subkeys; /* number of subkeys */
1543 int max_subkey; /* longest subkey name */
1544 int max_class; /* longest class name */
1545 int values; /* number of values */
1546 int max_value; /* longest value name */
1547 int max_data; /* longest value data */
1548 time_t modif; /* last modification time */
1549 data_size_t total; /* total length needed for full name and class */
1550 data_size_t namelen; /* length of key name in bytes */
1551 VARARG(name,unicode_str,namelen); /* key name */
1552 VARARG(class,unicode_str); /* class name */
1556 /* Set a value of a registry key */
1558 obj_handle_t hkey; /* handle to registry key */
1559 int type; /* value type */
1560 data_size_t namelen; /* length of value name in bytes */
1561 VARARG(name,unicode_str,namelen); /* value name */
1562 VARARG(data,bytes); /* value data */
1566 /* Retrieve the value of a registry key */
1568 obj_handle_t hkey; /* handle to registry key */
1569 VARARG(name,unicode_str); /* value name */
1571 int type; /* value type */
1572 data_size_t total; /* total length needed for data */
1573 VARARG(data,bytes); /* value data */
1577 /* Enumerate a value of a registry key */
1578 @REQ(enum_key_value)
1579 obj_handle_t hkey; /* handle to registry key */
1580 int index; /* value index */
1581 int info_class; /* requested information class */
1583 int type; /* value type */
1584 data_size_t total; /* total length needed for full name and data */
1585 data_size_t namelen; /* length of value name in bytes */
1586 VARARG(name,unicode_str,namelen); /* value name */
1587 VARARG(data,bytes); /* value data */
1591 /* Delete a value of a registry key */
1592 @REQ(delete_key_value)
1593 obj_handle_t hkey; /* handle to registry key */
1594 VARARG(name,unicode_str); /* value name */
1598 /* Load a registry branch from a file */
1600 obj_handle_t hkey; /* root key to load to */
1601 obj_handle_t file; /* file to load from */
1602 VARARG(name,unicode_str); /* subkey name */
1606 /* UnLoad a registry branch from a file */
1607 @REQ(unload_registry)
1608 obj_handle_t hkey; /* root key to unload to */
1612 /* Save a registry branch to a file */
1614 obj_handle_t hkey; /* key to save */
1615 obj_handle_t file; /* file to save to */
1619 /* Add a registry key change notification */
1620 @REQ(set_registry_notification)
1621 obj_handle_t hkey; /* key to watch for changes */
1622 obj_handle_t event; /* event to set */
1623 int subtree; /* should we watch the whole subtree? */
1624 unsigned int filter; /* things to watch */
1628 /* Create a waitable timer */
1630 unsigned int access; /* wanted access rights */
1631 unsigned int attributes; /* object attributes */
1632 obj_handle_t rootdir; /* root directory */
1633 int manual; /* manual reset */
1634 VARARG(name,unicode_str); /* object name */
1636 obj_handle_t handle; /* handle to the timer */
1640 /* Open a waitable timer */
1642 unsigned int access; /* wanted access rights */
1643 unsigned int attributes; /* object attributes */
1644 obj_handle_t rootdir; /* root directory */
1645 VARARG(name,unicode_str); /* object name */
1647 obj_handle_t handle; /* handle to the timer */
1650 /* Set a waitable timer */
1652 obj_handle_t handle; /* handle to the timer */
1653 abs_time_t expire; /* next expiration absolute time */
1654 int period; /* timer period in ms */
1655 void* callback; /* callback function */
1656 void* arg; /* callback argument */
1658 int signaled; /* was the timer signaled before this call ? */
1661 /* Cancel a waitable timer */
1663 obj_handle_t handle; /* handle to the timer */
1665 int signaled; /* was the timer signaled before this calltime ? */
1668 /* Get information on a waitable timer */
1669 @REQ(get_timer_info)
1670 obj_handle_t handle; /* handle to the timer */
1672 abs_time_t when; /* absolute time when the timer next expires */
1673 int signaled; /* is the timer signaled? */
1677 /* Retrieve the current context of a thread */
1678 @REQ(get_thread_context)
1679 obj_handle_t handle; /* thread handle */
1680 unsigned int flags; /* context flags */
1681 int suspend; /* if getting context during suspend */
1683 int self; /* was it a handle to the current thread? */
1684 VARARG(context,context); /* thread context */
1688 /* Set the current context of a thread */
1689 @REQ(set_thread_context)
1690 obj_handle_t handle; /* thread handle */
1691 unsigned int flags; /* context flags */
1692 int suspend; /* if setting context during suspend */
1693 VARARG(context,context); /* thread context */
1695 int self; /* was it a handle to the current thread? */
1699 /* Fetch a selector entry for a thread */
1700 @REQ(get_selector_entry)
1701 obj_handle_t handle; /* thread handle */
1702 int entry; /* LDT entry */
1704 unsigned int base; /* selector base */
1705 unsigned int limit; /* selector limit */
1706 unsigned char flags; /* selector flags */
1712 obj_handle_t table; /* which table to add atom to */
1713 VARARG(name,unicode_str); /* atom name */
1715 atom_t atom; /* resulting atom */
1719 /* Delete an atom */
1721 obj_handle_t table; /* which table to delete atom from */
1722 atom_t atom; /* atom handle */
1728 obj_handle_t table; /* which table to find atom from */
1729 VARARG(name,unicode_str); /* atom name */
1731 atom_t atom; /* atom handle */
1735 /* Get information about an atom */
1736 @REQ(get_atom_information)
1737 obj_handle_t table; /* which table to find atom from */
1738 atom_t atom; /* atom handle */
1740 int count; /* atom lock count */
1741 int pinned; /* whether the atom has been pinned */
1742 data_size_t total; /* actual length of atom name */
1743 VARARG(name,unicode_str); /* atom name */
1747 /* Set information about an atom */
1748 @REQ(set_atom_information)
1749 obj_handle_t table; /* which table to find atom from */
1750 atom_t atom; /* atom handle */
1751 int pinned; /* whether to bump atom information */
1755 /* Empty an atom table */
1756 @REQ(empty_atom_table)
1757 obj_handle_t table; /* which table to find atom from */
1758 int if_pinned; /* whether to delete pinned atoms */
1762 /* Init an atom table */
1763 @REQ(init_atom_table)
1764 int entries; /* number of entries (only for local) */
1766 obj_handle_t table; /* handle to the atom table */
1770 /* Get the message queue of the current thread */
1773 obj_handle_t handle; /* handle to the queue */
1777 /* Set the current message queue wakeup mask */
1778 @REQ(set_queue_mask)
1779 unsigned int wake_mask; /* wakeup bits mask */
1780 unsigned int changed_mask; /* changed bits mask */
1781 int skip_wait; /* will we skip waiting if signaled? */
1783 unsigned int wake_bits; /* current wake bits */
1784 unsigned int changed_bits; /* current changed bits */
1788 /* Get the current message queue status */
1789 @REQ(get_queue_status)
1790 int clear; /* should we clear the change bits? */
1792 unsigned int wake_bits; /* wake bits */
1793 unsigned int changed_bits; /* changed bits since last time */
1797 /* Retrieve the process idle event */
1798 @REQ(get_process_idle_event)
1799 obj_handle_t handle; /* process handle */
1801 obj_handle_t event; /* handle to idle event */
1805 /* Send a message to a thread queue */
1807 thread_id_t id; /* thread id */
1808 int type; /* message type (see below) */
1809 int flags; /* message flags (see below) */
1810 user_handle_t win; /* window handle */
1811 unsigned int msg; /* message code */
1812 unsigned long wparam; /* parameters */
1813 unsigned long lparam; /* parameters */
1814 int timeout; /* timeout for reply */
1815 VARARG(data,message_data); /* message data for sent messages */
1818 @REQ(post_quit_message)
1819 int exit_code; /* exit code to return */
1824 MSG_ASCII, /* Ascii message (from SendMessageA) */
1825 MSG_UNICODE, /* Unicode message (from SendMessageW) */
1826 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
1827 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
1828 MSG_CALLBACK_RESULT,/* result of a callback message */
1829 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
1830 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
1831 MSG_HARDWARE, /* hardware message */
1832 MSG_WINEVENT /* winevent message */
1834 #define SEND_MSG_ABORT_IF_HUNG 0x01
1837 /* Send a hardware message to a thread queue */
1838 @REQ(send_hardware_message)
1839 thread_id_t id; /* thread id */
1840 user_handle_t win; /* window handle */
1841 unsigned int msg; /* message code */
1842 unsigned int time; /* message time */
1843 unsigned long wparam; /* parameters */
1844 unsigned long lparam; /* parameters */
1845 unsigned long info; /* extra info */
1846 int x; /* x position */
1847 int y; /* y position */
1851 /* Get a message from the current queue */
1853 unsigned int flags; /* PM_* flags */
1854 user_handle_t get_win; /* window handle to get */
1855 unsigned int get_first; /* first message code to get */
1856 unsigned int get_last; /* last message code to get */
1857 unsigned int hw_id; /* id of the previous hardware message (or 0) */
1859 user_handle_t win; /* window handle */
1860 int type; /* message type */
1861 unsigned int msg; /* message code */
1862 unsigned long wparam; /* parameters */
1863 unsigned long lparam; /* parameters */
1864 unsigned long info; /* extra info */
1865 int x; /* x position */
1866 int y; /* y position */
1867 unsigned int time; /* message time */
1868 unsigned int hw_id; /* id if hardware message */
1869 unsigned int active_hooks; /* active hooks bitmap */
1870 data_size_t total; /* total size of extra data */
1871 VARARG(data,message_data); /* message data for sent messages */
1875 /* Reply to a sent message */
1877 unsigned int result; /* message result */
1878 int remove; /* should we remove the message? */
1879 VARARG(data,bytes); /* message data for sent messages */
1883 /* Accept the current hardware message */
1884 @REQ(accept_hardware_message)
1885 unsigned int hw_id; /* id of the hardware message */
1886 int remove; /* should we remove the message? */
1887 user_handle_t new_win; /* new destination window for current message */
1891 /* Retrieve the reply for the last message sent */
1892 @REQ(get_message_reply)
1893 int cancel; /* cancel message if not ready? */
1895 unsigned int result; /* message result */
1896 VARARG(data,bytes); /* message data for sent messages */
1900 /* Set a window timer */
1902 user_handle_t win; /* window handle */
1903 unsigned int msg; /* message to post */
1904 unsigned int rate; /* timer rate in ms */
1905 unsigned long id; /* timer id */
1906 unsigned long lparam; /* message lparam (callback proc) */
1908 unsigned long id; /* timer id */
1912 /* Kill a window timer */
1913 @REQ(kill_win_timer)
1914 user_handle_t win; /* window handle */
1915 unsigned int msg; /* message to post */
1916 unsigned long id; /* timer id */
1920 /* Retrieve info about a serial port */
1921 @REQ(get_serial_info)
1922 obj_handle_t handle; /* handle to comm port */
1924 unsigned int readinterval;
1925 unsigned int readconst;
1926 unsigned int readmult;
1927 unsigned int writeconst;
1928 unsigned int writemult;
1929 unsigned int eventmask;
1933 /* Set info about a serial port */
1934 @REQ(set_serial_info)
1935 obj_handle_t handle; /* handle to comm port */
1936 int flags; /* bitmask to set values (see below) */
1937 unsigned int readinterval;
1938 unsigned int readconst;
1939 unsigned int readmult;
1940 unsigned int writeconst;
1941 unsigned int writemult;
1942 unsigned int eventmask;
1944 #define SERIALINFO_SET_TIMEOUTS 0x01
1945 #define SERIALINFO_SET_MASK 0x02
1948 /* Create an async I/O */
1949 @REQ(register_async)
1950 obj_handle_t handle; /* handle to comm port, socket or file */
1951 int type; /* type of queue to look after */
1952 void* io_apc; /* APC routine to queue upon end of async */
1953 void* io_sb; /* I/O status block (unique across all async on this handle) */
1954 void* io_user; /* data to pass back to caller */
1955 int count; /* count - usually # of bytes to be read/written */
1957 #define ASYNC_TYPE_READ 0x01
1958 #define ASYNC_TYPE_WRITE 0x02
1959 #define ASYNC_TYPE_WAIT 0x03
1962 /* Cancel all async op on a fd */
1964 obj_handle_t handle; /* handle to comm port, socket or file */
1968 /* Create a named pipe */
1969 @REQ(create_named_pipe)
1970 unsigned int access;
1971 unsigned int attributes; /* object attributes */
1972 obj_handle_t rootdir; /* root directory */
1973 unsigned int options;
1975 unsigned int maxinstances;
1976 unsigned int outsize;
1977 unsigned int insize;
1978 unsigned int timeout;
1979 VARARG(name,unicode_str); /* pipe name */
1981 obj_handle_t handle; /* handle to the pipe */
1984 /* flags in create_named_pipe and get_named_pipe_info */
1985 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
1986 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
1987 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
1988 #define NAMED_PIPE_SERVER_END 0x8000
1990 /* Open an existing named pipe */
1991 @REQ(open_named_pipe)
1992 unsigned int access;
1993 unsigned int attributes; /* object attributes */
1994 obj_handle_t rootdir; /* root directory */
1995 unsigned int flags; /* file flags */
1996 VARARG(name,unicode_str); /* pipe name */
1998 obj_handle_t handle; /* handle to the pipe */
2002 /* Connect to a named pipe */
2003 @REQ(connect_named_pipe)
2004 obj_handle_t handle;
2005 void* io_apc; /* APC routine to queue upon end of async */
2006 void* io_sb; /* I/O status block */
2007 void* io_user; /* data to pass back to caller */
2011 /* Wait for a named pipe */
2012 @REQ(wait_named_pipe)
2013 obj_handle_t handle;
2014 unsigned int timeout;
2015 void* io_apc; /* APC routine to queue upon end of async */
2016 void* io_sb; /* I/O status block */
2017 void* io_user; /* data to pass back to caller */
2018 VARARG(name,unicode_str); /* pipe name */
2022 /* Disconnect a named pipe */
2023 @REQ(disconnect_named_pipe)
2024 obj_handle_t handle;
2028 @REQ(get_named_pipe_info)
2029 obj_handle_t handle;
2032 unsigned int maxinstances;
2033 unsigned int instances;
2034 unsigned int outsize;
2035 unsigned int insize;
2039 /* Create a window */
2041 user_handle_t parent; /* parent window */
2042 user_handle_t owner; /* owner window */
2043 atom_t atom; /* class atom */
2044 void* instance; /* module instance */
2046 user_handle_t handle; /* created window */
2047 user_handle_t parent; /* full handle of parent */
2048 user_handle_t owner; /* full handle of owner */
2049 int extra; /* number of extra bytes */
2050 void* class_ptr; /* pointer to class in client address space */
2054 /* Destroy a window */
2055 @REQ(destroy_window)
2056 user_handle_t handle; /* handle to the window */
2060 /* Retrieve the desktop window for the current thread */
2061 @REQ(get_desktop_window)
2062 int force; /* force creation if it doesn't exist */
2064 user_handle_t handle; /* handle to the desktop window */
2068 /* Set a window owner */
2069 @REQ(set_window_owner)
2070 user_handle_t handle; /* handle to the window */
2071 user_handle_t owner; /* new owner */
2073 user_handle_t full_owner; /* full handle of new owner */
2074 user_handle_t prev_owner; /* full handle of previous owner */
2078 /* Get information from a window handle */
2079 @REQ(get_window_info)
2080 user_handle_t handle; /* handle to the window */
2082 user_handle_t full_handle; /* full 32-bit handle */
2083 user_handle_t last_active; /* last active popup */
2084 process_id_t pid; /* process owning the window */
2085 thread_id_t tid; /* thread owning the window */
2086 atom_t atom; /* class atom */
2087 int is_unicode; /* ANSI or unicode */
2091 /* Set some information in a window */
2092 @REQ(set_window_info)
2093 unsigned int flags; /* flags for fields to set (see below) */
2094 user_handle_t handle; /* handle to the window */
2095 unsigned int style; /* window style */
2096 unsigned int ex_style; /* window extended style */
2097 unsigned int id; /* window id */
2098 int is_unicode; /* ANSI or unicode */
2099 void* instance; /* creator instance */
2100 unsigned long user_data; /* user-specific data */
2101 int extra_offset; /* offset to set in extra bytes */
2102 data_size_t extra_size; /* size to set in extra bytes */
2103 unsigned long extra_value; /* value to set in extra bytes */
2105 unsigned int old_style; /* old window style */
2106 unsigned int old_ex_style; /* old window extended style */
2107 unsigned int old_id; /* old window id */
2108 void* old_instance; /* old creator instance */
2109 unsigned long old_user_data; /* old user-specific data */
2110 unsigned long old_extra_value; /* old value in extra bytes */
2112 #define SET_WIN_STYLE 0x01
2113 #define SET_WIN_EXSTYLE 0x02
2114 #define SET_WIN_ID 0x04
2115 #define SET_WIN_INSTANCE 0x08
2116 #define SET_WIN_USERDATA 0x10
2117 #define SET_WIN_EXTRA 0x20
2118 #define SET_WIN_UNICODE 0x40
2121 /* Set the parent of a window */
2123 user_handle_t handle; /* handle to the window */
2124 user_handle_t parent; /* handle to the parent */
2126 user_handle_t old_parent; /* old parent window */
2127 user_handle_t full_parent; /* full handle of new parent */
2131 /* Get a list of the window parents, up to the root of the tree */
2132 @REQ(get_window_parents)
2133 user_handle_t handle; /* handle to the window */
2135 int count; /* total count of parents */
2136 VARARG(parents,user_handles); /* parent handles */
2140 /* Get a list of the window children */
2141 @REQ(get_window_children)
2142 user_handle_t parent; /* parent window */
2143 atom_t atom; /* class atom for the listed children */
2144 thread_id_t tid; /* thread owning the listed children */
2146 int count; /* total count of children */
2147 VARARG(children,user_handles); /* children handles */
2151 /* Get a list of the window children that contain a given point */
2152 @REQ(get_window_children_from_point)
2153 user_handle_t parent; /* parent window */
2154 int x; /* point in parent coordinates */
2157 int count; /* total count of children */
2158 VARARG(children,user_handles); /* children handles */
2162 /* Get window tree information from a window handle */
2163 @REQ(get_window_tree)
2164 user_handle_t handle; /* handle to the window */
2166 user_handle_t parent; /* parent window */
2167 user_handle_t owner; /* owner window */
2168 user_handle_t next_sibling; /* next sibling in Z-order */
2169 user_handle_t prev_sibling; /* prev sibling in Z-order */
2170 user_handle_t first_sibling; /* first sibling in Z-order */
2171 user_handle_t last_sibling; /* last sibling in Z-order */
2172 user_handle_t first_child; /* first child */
2173 user_handle_t last_child; /* last child */
2176 /* Set the position and Z order of a window */
2177 @REQ(set_window_pos)
2178 unsigned int flags; /* SWP_* flags */
2179 user_handle_t handle; /* handle to the window */
2180 user_handle_t previous; /* previous window in Z order */
2181 rectangle_t window; /* window rectangle */
2182 rectangle_t client; /* client rectangle */
2183 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE */
2185 unsigned int new_style; /* new window style */
2189 /* Get the window and client rectangles of a window */
2190 @REQ(get_window_rectangles)
2191 user_handle_t handle; /* handle to the window */
2193 rectangle_t window; /* window rectangle */
2194 rectangle_t visible; /* visible part of the window rectangle */
2195 rectangle_t client; /* client rectangle */
2199 /* Get the window text */
2200 @REQ(get_window_text)
2201 user_handle_t handle; /* handle to the window */
2203 VARARG(text,unicode_str); /* window text */
2207 /* Set the window text */
2208 @REQ(set_window_text)
2209 user_handle_t handle; /* handle to the window */
2210 VARARG(text,unicode_str); /* window text */
2214 /* Get the coordinates offset between two windows */
2215 @REQ(get_windows_offset)
2216 user_handle_t from; /* handle to the first window */
2217 user_handle_t to; /* handle to the second window */
2219 int x; /* x coordinate offset */
2220 int y; /* y coordinate offset */
2224 /* Get the visible region of a window */
2225 @REQ(get_visible_region)
2226 user_handle_t window; /* handle to the window */
2227 unsigned int flags; /* DCX flags */
2229 user_handle_t top_win; /* top window to clip against */
2230 rectangle_t top_rect; /* top window visible rect with screen coords */
2231 rectangle_t win_rect; /* window rect in screen coords */
2232 data_size_t total_size; /* total size of the resulting region */
2233 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2237 /* Get the window region */
2238 @REQ(get_window_region)
2239 user_handle_t window; /* handle to the window */
2241 data_size_t total_size; /* total size of the resulting region */
2242 VARARG(region,rectangles); /* list of rectangles for the region */
2246 /* Set the window region */
2247 @REQ(set_window_region)
2248 user_handle_t window; /* handle to the window */
2249 int redraw; /* redraw the window? */
2250 VARARG(region,rectangles); /* list of rectangles for the region */
2254 /* Get the window update region */
2255 @REQ(get_update_region)
2256 user_handle_t window; /* handle to the window */
2257 user_handle_t from_child; /* child to start searching from */
2258 unsigned int flags; /* update flags (see below) */
2260 user_handle_t child; /* child to repaint (or window itself) */
2261 unsigned int flags; /* resulting update flags (see below) */
2262 data_size_t total_size; /* total size of the resulting region */
2263 VARARG(region,rectangles); /* list of rectangles for the region */
2265 #define UPDATE_NONCLIENT 0x01 /* get region for repainting non-client area */
2266 #define UPDATE_ERASE 0x02 /* get region for erasing client area */
2267 #define UPDATE_PAINT 0x04 /* get region for painting client area */
2268 #define UPDATE_INTERNALPAINT 0x08 /* get region if internal paint is pending */
2269 #define UPDATE_ALLCHILDREN 0x10 /* force repaint of all children */
2270 #define UPDATE_NOCHILDREN 0x20 /* don't try to repaint any children */
2271 #define UPDATE_NOREGION 0x40 /* don't return a region, only the flags */
2274 /* Update the z order of a window so that a given rectangle is fully visible */
2275 @REQ(update_window_zorder)
2276 user_handle_t window; /* handle to the window */
2277 rectangle_t rect; /* rectangle that must be visible */
2281 /* Mark parts of a window as needing a redraw */
2283 user_handle_t window; /* handle to the window */
2284 unsigned int flags; /* RDW_* flags */
2285 VARARG(region,rectangles); /* list of rectangles for the region */
2289 /* Set a window property */
2290 @REQ(set_window_property)
2291 user_handle_t window; /* handle to the window */
2292 atom_t atom; /* property atom (if no name specified) */
2293 obj_handle_t handle; /* handle to store */
2294 VARARG(name,unicode_str); /* property name */
2298 /* Remove a window property */
2299 @REQ(remove_window_property)
2300 user_handle_t window; /* handle to the window */
2301 atom_t atom; /* property atom (if no name specified) */
2302 VARARG(name,unicode_str); /* property name */
2304 obj_handle_t handle; /* handle stored in property */
2308 /* Get a window property */
2309 @REQ(get_window_property)
2310 user_handle_t window; /* handle to the window */
2311 atom_t atom; /* property atom (if no name specified) */
2312 VARARG(name,unicode_str); /* property name */
2314 obj_handle_t handle; /* handle stored in property */
2318 /* Get the list of properties of a window */
2319 @REQ(get_window_properties)
2320 user_handle_t window; /* handle to the window */
2322 int total; /* total number of properties */
2323 VARARG(props,properties); /* list of properties */
2327 /* Create a window station */
2328 @REQ(create_winstation)
2329 unsigned int flags; /* window station flags */
2330 unsigned int access; /* wanted access rights */
2331 unsigned int attributes; /* object attributes */
2332 VARARG(name,unicode_str); /* object name */
2334 obj_handle_t handle; /* handle to the window station */
2338 /* Open a handle to a window station */
2339 @REQ(open_winstation)
2340 unsigned int access; /* wanted access rights */
2341 unsigned int attributes; /* object attributes */
2342 VARARG(name,unicode_str); /* object name */
2344 obj_handle_t handle; /* handle to the window station */
2348 /* Close a window station */
2349 @REQ(close_winstation)
2350 obj_handle_t handle; /* handle to the window station */
2354 /* Get the process current window station */
2355 @REQ(get_process_winstation)
2357 obj_handle_t handle; /* handle to the window station */
2361 /* Set the process current window station */
2362 @REQ(set_process_winstation)
2363 obj_handle_t handle; /* handle to the window station */
2367 /* Create a desktop */
2368 @REQ(create_desktop)
2369 unsigned int flags; /* desktop flags */
2370 unsigned int access; /* wanted access rights */
2371 unsigned int attributes; /* object attributes */
2372 VARARG(name,unicode_str); /* object name */
2374 obj_handle_t handle; /* handle to the desktop */
2378 /* Open a handle to a desktop */
2380 unsigned int flags; /* desktop flags */
2381 unsigned int access; /* wanted access rights */
2382 unsigned int attributes; /* object attributes */
2383 VARARG(name,unicode_str); /* object name */
2385 obj_handle_t handle; /* handle to the desktop */
2389 /* Close a desktop */
2391 obj_handle_t handle; /* handle to the desktop */
2395 /* Get the thread current desktop */
2396 @REQ(get_thread_desktop)
2397 thread_id_t tid; /* thread id */
2399 obj_handle_t handle; /* handle to the desktop */
2403 /* Set the thread current desktop */
2404 @REQ(set_thread_desktop)
2405 obj_handle_t handle; /* handle to the desktop */
2409 /* Get/set information about a user object (window station or desktop) */
2410 @REQ(set_user_object_info)
2411 obj_handle_t handle; /* handle to the object */
2412 unsigned int flags; /* information to set */
2413 unsigned int obj_flags; /* new object flags */
2415 int is_desktop; /* is object a desktop? */
2416 unsigned int old_obj_flags; /* old object flags */
2417 VARARG(name,unicode_str); /* object name */
2419 #define SET_USER_OBJECT_FLAGS 1
2422 /* Attach (or detach) thread inputs */
2423 @REQ(attach_thread_input)
2424 thread_id_t tid_from; /* thread to be attached */
2425 thread_id_t tid_to; /* thread to which tid_from should be attached */
2426 int attach; /* is it an attach? */
2430 /* Get input data for a given thread */
2431 @REQ(get_thread_input)
2432 thread_id_t tid; /* id of thread */
2434 user_handle_t focus; /* handle to the focus window */
2435 user_handle_t capture; /* handle to the capture window */
2436 user_handle_t active; /* handle to the active window */
2437 user_handle_t foreground; /* handle to the global foreground window */
2438 user_handle_t menu_owner; /* handle to the menu owner */
2439 user_handle_t move_size; /* handle to the moving/resizing window */
2440 user_handle_t caret; /* handle to the caret window */
2441 rectangle_t rect; /* caret rectangle */
2445 /* Get the time of the last input event */
2446 @REQ(get_last_input_time)
2452 /* Retrieve queue keyboard state for a given thread */
2454 thread_id_t tid; /* id of thread */
2455 int key; /* optional key code or -1 */
2457 unsigned char state; /* state of specified key */
2458 VARARG(keystate,bytes); /* state array for all the keys */
2461 /* Set queue keyboard state for a given thread */
2463 thread_id_t tid; /* id of thread */
2464 VARARG(keystate,bytes); /* state array for all the keys */
2467 /* Set the system foreground window */
2468 @REQ(set_foreground_window)
2469 user_handle_t handle; /* handle to the foreground window */
2471 user_handle_t previous; /* handle to the previous foreground window */
2472 int send_msg_old; /* whether we have to send a msg to the old window */
2473 int send_msg_new; /* whether we have to send a msg to the new window */
2476 /* Set the current thread focus window */
2477 @REQ(set_focus_window)
2478 user_handle_t handle; /* handle to the focus window */
2480 user_handle_t previous; /* handle to the previous focus window */
2483 /* Set the current thread active window */
2484 @REQ(set_active_window)
2485 user_handle_t handle; /* handle to the active window */
2487 user_handle_t previous; /* handle to the previous active window */
2490 /* Set the current thread capture window */
2491 @REQ(set_capture_window)
2492 user_handle_t handle; /* handle to the capture window */
2493 unsigned int flags; /* capture flags (see below) */
2495 user_handle_t previous; /* handle to the previous capture window */
2496 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2498 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2499 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2502 /* Set the current thread caret window */
2503 @REQ(set_caret_window)
2504 user_handle_t handle; /* handle to the caret window */
2505 int width; /* caret width */
2506 int height; /* caret height */
2508 user_handle_t previous; /* handle to the previous caret window */
2509 rectangle_t old_rect; /* previous caret rectangle */
2510 int old_hide; /* previous hide count */
2511 int old_state; /* previous caret state (1=on, 0=off) */
2515 /* Set the current thread caret information */
2516 @REQ(set_caret_info)
2517 unsigned int flags; /* caret flags (see below) */
2518 user_handle_t handle; /* handle to the caret window */
2519 int x; /* caret x position */
2520 int y; /* caret y position */
2521 int hide; /* increment for hide count (can be negative to show it) */
2522 int state; /* caret state (1=on, 0=off, -1=toggle current state) */
2524 user_handle_t full_handle; /* handle to the current caret window */
2525 rectangle_t old_rect; /* previous caret rectangle */
2526 int old_hide; /* previous hide count */
2527 int old_state; /* previous caret state (1=on, 0=off) */
2529 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2530 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2531 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2534 /* Set a window hook */
2536 int id; /* id of the hook */
2537 process_id_t pid; /* id of process to set the hook into */
2538 thread_id_t tid; /* id of thread to set the hook into */
2542 void* proc; /* hook procedure */
2543 int unicode; /* is it a unicode hook? */
2544 VARARG(module,unicode_str); /* module name */
2546 user_handle_t handle; /* handle to the hook */
2547 unsigned int active_hooks; /* active hooks bitmap */
2551 /* Remove a window hook */
2553 user_handle_t handle; /* handle to the hook */
2554 int id; /* id of the hook if handle is 0 */
2555 void* proc; /* hook procedure if handle is 0 */
2557 unsigned int active_hooks; /* active hooks bitmap */
2561 /* Start calling a hook chain */
2562 @REQ(start_hook_chain)
2563 int id; /* id of the hook */
2564 int event; /* signalled event */
2565 user_handle_t window; /* handle to the event window */
2566 int object_id; /* object id for out of context winevent */
2567 int child_id; /* child id for out of context winevent */
2569 user_handle_t handle; /* handle to the next hook */
2570 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2571 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2572 void* proc; /* hook procedure */
2573 int unicode; /* is it a unicode hook? */
2574 unsigned int active_hooks; /* active hooks bitmap */
2575 VARARG(module,unicode_str); /* module name */
2579 /* Finished calling a hook chain */
2580 @REQ(finish_hook_chain)
2581 int id; /* id of the hook */
2585 /* Get the hook information */
2587 user_handle_t handle; /* handle to the current hook */
2588 int get_next; /* do we want info about current or next hook? */
2589 int event; /* signalled event */
2590 user_handle_t window; /* handle to the event window */
2591 int object_id; /* object id for out of context winevent */
2592 int child_id; /* child id for out of context winevent */
2594 user_handle_t handle; /* handle to the hook */
2595 int id; /* id of the hook */
2596 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2597 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2598 void* proc; /* hook procedure */
2599 int unicode; /* is it a unicode hook? */
2600 VARARG(module,unicode_str); /* module name */
2604 /* Create a window class */
2606 int local; /* is it a local class? */
2607 atom_t atom; /* class atom */
2608 unsigned int style; /* class style */
2609 void* instance; /* module instance */
2610 int extra; /* number of extra class bytes */
2611 int win_extra; /* number of window extra bytes */
2612 void* client_ptr; /* pointer to class in client address space */
2616 /* Destroy a window class */
2618 atom_t atom; /* class atom */
2619 void* instance; /* module instance */
2621 void* client_ptr; /* pointer to class in client address space */
2625 /* Set some information in a class */
2626 @REQ(set_class_info)
2627 user_handle_t window; /* handle to the window */
2628 unsigned int flags; /* flags for info to set (see below) */
2629 atom_t atom; /* class atom */
2630 unsigned int style; /* class style */
2631 int win_extra; /* number of window extra bytes */
2632 void* instance; /* module instance */
2633 int extra_offset; /* offset to set in extra bytes */
2634 data_size_t extra_size; /* size to set in extra bytes */
2635 unsigned long extra_value; /* value to set in extra bytes */
2637 atom_t old_atom; /* previous class atom */
2638 unsigned int old_style; /* previous class style */
2639 int old_extra; /* previous number of class extra bytes */
2640 int old_win_extra; /* previous number of window extra bytes */
2641 void* old_instance; /* previous module instance */
2642 unsigned long old_extra_value; /* old value in extra bytes */
2644 #define SET_CLASS_ATOM 0x0001
2645 #define SET_CLASS_STYLE 0x0002
2646 #define SET_CLASS_WINEXTRA 0x0004
2647 #define SET_CLASS_INSTANCE 0x0008
2648 #define SET_CLASS_EXTRA 0x0010
2651 /* Set/get clipboard information */
2652 @REQ(set_clipboard_info)
2653 unsigned int flags; /* flags for fields to set (see below) */
2654 user_handle_t clipboard; /* clipboard window */
2655 user_handle_t owner; /* clipboard owner */
2656 user_handle_t viewer; /* first clipboard viewer */
2657 unsigned int seqno; /* change sequence number */
2659 unsigned int flags; /* status flags (see below) */
2660 user_handle_t old_clipboard; /* old clipboard window */
2661 user_handle_t old_owner; /* old clipboard owner */
2662 user_handle_t old_viewer; /* old clipboard viewer */
2663 unsigned int seqno; /* current sequence number */
2666 #define SET_CB_OPEN 0x001
2667 #define SET_CB_OWNER 0x002
2668 #define SET_CB_VIEWER 0x004
2669 #define SET_CB_SEQNO 0x008
2670 #define SET_CB_RELOWNER 0x010
2671 #define SET_CB_CLOSE 0x020
2672 #define CB_OPEN 0x040
2673 #define CB_OWNER 0x080
2674 #define CB_PROCESS 0x100
2677 /* Open a security token */
2679 obj_handle_t handle; /* handle to the thread or process */
2680 unsigned int access; /* access rights to the new token */
2681 unsigned int attributes;/* object attributes */
2682 unsigned int flags; /* flags (see below) */
2684 obj_handle_t token; /* handle to the token */
2686 #define OPEN_TOKEN_THREAD 1
2687 #define OPEN_TOKEN_AS_SELF 2
2690 /* Set/get the global windows */
2691 @REQ(set_global_windows)
2692 unsigned int flags; /* flags for fields to set (see below) */
2693 user_handle_t shell_window; /* handle to the new shell window */
2694 user_handle_t shell_listview; /* handle to the new shell listview window */
2695 user_handle_t progman_window; /* handle to the new program manager window */
2696 user_handle_t taskman_window; /* handle to the new task manager window */
2698 user_handle_t old_shell_window; /* handle to the shell window */
2699 user_handle_t old_shell_listview; /* handle to the shell listview window */
2700 user_handle_t old_progman_window; /* handle to the new program manager window */
2701 user_handle_t old_taskman_window; /* handle to the new task manager window */
2703 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
2704 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
2705 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
2707 /* Adjust the privileges held by a token */
2708 @REQ(adjust_token_privileges)
2709 obj_handle_t handle; /* handle to the token */
2710 int disable_all; /* disable all privileges? */
2711 int get_modified_state; /* get modified privileges? */
2712 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
2714 unsigned int len; /* total length in bytes required to store token privileges */
2715 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
2718 /* Retrieves the set of privileges held by or available to a token */
2719 @REQ(get_token_privileges)
2720 obj_handle_t handle; /* handle to the token */
2722 unsigned int len; /* total length in bytes required to store token privileges */
2723 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2726 /* Check the token has the required privileges */
2727 @REQ(check_token_privileges)
2728 obj_handle_t handle; /* handle to the token */
2729 int all_required; /* are all the privileges required for the check to succeed? */
2730 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
2732 int has_privileges; /* does the token have the required privileges? */
2733 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2736 @REQ(duplicate_token)
2737 obj_handle_t handle; /* handle to the token to duplicate */
2738 unsigned int access; /* access rights to the new token */
2739 unsigned int attributes; /* object attributes */
2740 int primary; /* is the new token to be a primary one? */
2741 int impersonation_level; /* impersonation level of the new token */
2743 obj_handle_t new_handle; /* duplicated handle */
2747 obj_handle_t handle; /* handle to the token */
2748 unsigned int desired_access; /* desired access to the object */
2749 unsigned int mapping_read; /* mapping from generic read to specific rights */
2750 unsigned int mapping_write; /* mapping from generic write to specific rights */
2751 unsigned int mapping_execute; /* mapping from generic execute to specific rights */
2752 unsigned int mapping_all; /* mapping from generic all to specific rights */
2753 VARARG(sd,security_descriptor); /* security descriptor to check */
2755 unsigned int access_granted; /* access rights actually granted */
2756 unsigned int access_status; /* was access granted? */
2757 unsigned int privileges_len; /* length needed to store privileges */
2758 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
2761 @REQ(get_token_user)
2762 obj_handle_t handle; /* handle to the token */
2764 data_size_t user_len; /* length needed to store user */
2765 VARARG(user,SID); /* sid of the user the token represents */
2768 @REQ(get_token_groups)
2769 obj_handle_t handle; /* handle to the token */
2771 data_size_t user_len; /* length needed to store user */
2772 VARARG(user,token_groups); /* groups the token's user belongs to */
2775 @REQ(set_security_object)
2776 obj_handle_t handle; /* handle to the object */
2777 unsigned int security_info; /* which parts of security descriptor to set */
2778 VARARG(sd,security_descriptor); /* security descriptor to set */
2781 /* Create a mailslot */
2782 @REQ(create_mailslot)
2783 unsigned int access; /* wanted access rights */
2784 unsigned int attributes; /* object attributes */
2785 obj_handle_t rootdir; /* root directory */
2786 unsigned int max_msgsize;
2788 VARARG(name,unicode_str); /* mailslot name */
2790 obj_handle_t handle; /* handle to the mailslot */
2794 /* Open an existing mailslot */
2796 unsigned int access;
2797 unsigned int attributes; /* object attributes */
2798 obj_handle_t rootdir; /* root directory */
2799 unsigned int sharing; /* sharing mode */
2800 VARARG(name,unicode_str); /* mailslot name */
2802 obj_handle_t handle; /* handle to the mailslot */
2806 /* Set mailslot information */
2807 @REQ(set_mailslot_info)
2808 obj_handle_t handle; /* handle to the mailslot */
2812 unsigned int max_msgsize;
2815 #define MAILSLOT_SET_READ_TIMEOUT 1
2818 /* Create a directory object */
2819 @REQ(create_directory)
2820 unsigned int access; /* access flags */
2821 unsigned int attributes; /* object attributes */
2822 obj_handle_t rootdir; /* root directory */
2823 VARARG(directory_name,unicode_str); /* Directory name */
2825 obj_handle_t handle; /* handle to the directory */
2829 /* Open a directory object */
2830 @REQ(open_directory)
2831 unsigned int access; /* access flags */
2832 unsigned int attributes; /* object attributes */
2833 obj_handle_t rootdir; /* root directory */
2834 VARARG(directory_name,unicode_str); /* Directory name */
2836 obj_handle_t handle; /* handle to the directory */
2840 /* Create a symbolic link object */
2841 @REQ(create_symlink)
2842 unsigned int access; /* access flags */
2843 unsigned int attributes; /* object attributes */
2844 obj_handle_t rootdir; /* root directory */
2845 data_size_t name_len; /* length of the symlink name in bytes */
2846 VARARG(name,unicode_str,name_len); /* symlink name */
2847 VARARG(target_name,unicode_str); /* target name */
2849 obj_handle_t handle; /* handle to the symlink */
2853 /* Open a symbolic link object */
2855 unsigned int access; /* access flags */
2856 unsigned int attributes; /* object attributes */
2857 obj_handle_t rootdir; /* root directory */
2858 VARARG(name,unicode_str); /* symlink name */
2860 obj_handle_t handle; /* handle to the symlink */
2864 /* Query a symbolic link object */
2866 obj_handle_t handle; /* handle to the symlink */
2868 VARARG(target_name,unicode_str); /* target name */
2872 /* Query basic object information */
2873 @REQ(get_object_info)
2874 obj_handle_t handle; /* handle to the object */
2876 unsigned int access; /* granted access mask */
2877 unsigned int ref_count; /* object ref count */
2880 /* Query the impersonation level of an impersonation token */
2881 @REQ(get_token_impersonation_level)
2882 obj_handle_t handle; /* handle to the object */
2884 int impersonation_level; /* impersonation level of the impersonation token */
2887 /* Allocate a locally-unique identifier */
2888 @REQ(allocate_locally_unique_id)