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
11 @HEADER
/* start of C declarations
*/
19 int req
; /* request code
*/
20 unsigned short var_offset
; /* offset of the variable part of the request
*/
21 unsigned short var_size
; /* size of the variable part of the request
*/
22 unsigned int error
; /* error result
*/
27 unsigned int error
; /* error result
*/
28 unsigned short var_offset
; /* offset of the variable part of the request
*/
29 unsigned short var_size
; /* size of the variable part of the request
*/
32 /* placeholder structure for the maximum allowed request size
*/
33 /* this is used to construct the generic_request union
*/
34 struct request_max_size
36 int pad
[16]; /* the max request size is
16 ints
*/
39 /* max size of the variable part of a request
*/
40 #define REQUEST_MAX_VAR_SIZE
1024
43 typedef unsigned int user_handle_t
;
45 /* definitions of the event data depending on the event code
*/
46 struct debug_event_exception
48 EXCEPTION_RECORD record
; /* exception record
*/
49 int first
; /* first chance exception?
*/
51 struct debug_event_create_thread
53 handle_t handle
; /* handle to the new thread
*/
54 void
*teb
; /* thread
teb (in debugged process address space
) */
55 void
*start
; /* thread startup routine
*/
57 struct debug_event_create_process
59 handle_t file
; /* handle to the process exe file
*/
60 handle_t process
; /* handle to the new process
*/
61 handle_t thread
; /* handle to the new thread
*/
62 void
*base
; /* base of executable image
*/
63 int dbg_offset
; /* offset of debug info in file
*/
64 int dbg_size
; /* size of debug info
*/
65 void
*teb
; /* thread
teb (in debugged process address space
) */
66 void
*start
; /* thread startup routine
*/
67 void
*name
; /* image
name (optional
) */
68 int unicode
; /* is it Unicode?
*/
70 struct debug_event_exit
72 int exit_code
; /* thread or process exit code
*/
74 struct debug_event_load_dll
76 handle_t handle
; /* file handle for the dll
*/
77 void
*base
; /* base address of the dll
*/
78 int dbg_offset
; /* offset of debug info in file
*/
79 int dbg_size
; /* size of debug info
*/
80 void
*name
; /* image
name (optional
) */
81 int unicode
; /* is it Unicode?
*/
83 struct debug_event_unload_dll
85 void
*base
; /* base address of the dll
*/
87 struct debug_event_output_string
89 void
*string
; /* string to
display (in debugged process address space
) */
90 int unicode
; /* is it Unicode?
*/
91 int length
; /* string length
*/
93 struct debug_event_rip_info
98 union debug_event_data
100 struct debug_event_exception exception
;
101 struct debug_event_create_thread create_thread
;
102 struct debug_event_create_process create_process
;
103 struct debug_event_exit exit
;
104 struct debug_event_load_dll load_dll
;
105 struct debug_event_unload_dll unload_dll
;
106 struct debug_event_output_string output_string
;
107 struct debug_event_rip_info rip_info
;
110 /* debug event data
*/
113 int code
; /* event code
*/
114 union debug_event_data info
; /* event information
*/
117 /* structure used in sending an fd from client to server
*/
120 void
*tid
; /* thread id
*/
121 int fd
; /* file descriptor on client
-side
*/
124 /* structure sent by the server on the wait fifo
*/
127 void
*cookie
; /* magic cookie that was passed in select_request
*/
128 int signaled
; /* wait result
*/
131 /****************************************************************/
132 /* Request declarations
*/
134 /* Create a new process from the context of the parent
*/
136 int inherit_all
; /* inherit all handles from parent
*/
137 int create_flags
; /* creation flags
*/
138 int start_flags
; /* flags from startup info
*/
139 handle_t exe_file
; /* file handle for main exe
*/
140 handle_t hstdin
; /* handle for stdin
*/
141 handle_t hstdout
; /* handle for stdout
*/
142 handle_t hstderr
; /* handle for stderr
*/
143 int cmd_show
; /* main window show mode
*/
144 VARARG(filename
,string
); /* file name of main exe
*/
146 handle_t info
; /* new process info handle
*/
150 /* Retrieve information about a newly started process
*/
151 @
REQ(get_new_process_info
)
152 handle_t info
; /* info handle returned from new_process_request
*/
153 int pinherit
; /* process handle inherit flag
*/
154 int tinherit
; /* thread handle inherit flag
*/
156 void
* pid
; /* process id
*/
157 handle_t phandle
; /* process
handle (in the current process
) */
158 void
* tid
; /* thread id
*/
159 handle_t thandle
; /* thread
handle (in the current process
) */
160 handle_t event
; /* event handle to signal startup
*/
164 /* Create a new thread from the context of the parent
*/
166 int suspend
; /* new thread should be suspended on creation
*/
167 int inherit
; /* inherit flag
*/
168 int request_fd
; /* fd for request pipe
*/
170 void
* tid
; /* thread id
*/
171 handle_t handle
; /* thread
handle (in the current process
) */
175 /* Signal that we are finished booting on the client side
*/
177 int debug_level
; /* new debug level
*/
181 /* Initialize a process
; called from the new process context
*/
183 void
* ldt_copy
; /* addr of LDT copy
*/
184 int ppid
; /* parent Unix pid
*/
186 int create_flags
; /* creation flags
*/
187 int start_flags
; /* flags from startup info
*/
188 unsigned int server_start
; /* server start
time (GetTickCount
) */
189 handle_t exe_file
; /* file handle for main exe
*/
190 handle_t hstdin
; /* handle for stdin
*/
191 handle_t hstdout
; /* handle for stdout
*/
192 handle_t hstderr
; /* handle for stderr
*/
193 int cmd_show
; /* main window show mode
*/
194 VARARG(filename
,string
); /* file name of main exe
*/
198 /* Signal the end of the process initialization
*/
199 @
REQ(init_process_done
)
200 void
* module
; /* main module base address
*/
201 void
* entry
; /* process entry point
*/
202 void
* name
; /* ptr to ptr to
name (in process addr space
) */
203 handle_t exe_file
; /* file handle for main exe
*/
204 int gui
; /* is it a GUI process?
*/
206 int debugged
; /* being debugged?
*/
210 /* Initialize a thread
; called from the child after
fork()/clone() */
212 int unix_pid
; /* Unix pid of new thread
*/
213 void
* teb
; /* TEB of new
thread (in thread address space
) */
214 void
* entry
; /* thread entry
point (in thread address space
) */
215 int reply_fd
; /* fd for reply pipe
*/
216 int wait_fd
; /* fd for blocking calls pipe
*/
218 void
* pid
; /* process id of the new thread
's process */
219 void* tid; /* thread id of the new thread */
220 int boot; /* is this the boot thread? */
221 int version; /* protocol version */
225 /* Set the shared buffer for a thread */
226 @REQ(set_thread_buffer)
227 int fd; /* fd to mmap as shared buffer */
229 unsigned int offset; /* offset of buffer in file */
230 unsigned int size; /* size of buffer */
234 /* Terminate a process */
235 @REQ(terminate_process)
236 handle_t handle; /* process handle to terminate */
237 int exit_code; /* process exit code */
239 int self; /* suicide? */
243 /* Terminate a thread */
244 @REQ(terminate_thread)
245 handle_t handle; /* thread handle to terminate */
246 int exit_code; /* thread exit code */
248 int self; /* suicide? */
249 int last; /* last thread in this process? */
253 /* Retrieve information about a process */
254 @REQ(get_process_info)
255 handle_t handle; /* process handle */
257 void* pid; /* server process id */
258 int debugged; /* debugged? */
259 int exit_code; /* process exit code */
260 int priority; /* priority class */
261 int process_affinity; /* process affinity mask */
262 int system_affinity; /* system affinity mask */
266 /* Set a process informations */
267 @REQ(set_process_info)
268 handle_t handle; /* process handle */
269 int mask; /* setting mask (see below) */
270 int priority; /* priority class */
271 int affinity; /* affinity mask */
273 #define SET_PROCESS_INFO_PRIORITY 0x01
274 #define SET_PROCESS_INFO_AFFINITY 0x02
277 /* Retrieve information about a thread */
278 @REQ(get_thread_info)
279 handle_t handle; /* thread handle */
280 void* tid_in; /* thread id (optional) */
282 void* tid; /* server thread id */
283 void* teb; /* thread teb pointer */
284 int exit_code; /* thread exit code */
285 int priority; /* thread priority level */
289 /* Set a thread informations */
290 @REQ(set_thread_info)
291 handle_t handle; /* thread handle */
292 int mask; /* setting mask (see below) */
293 int priority; /* priority class */
294 int affinity; /* affinity mask */
296 #define SET_THREAD_INFO_PRIORITY 0x01
297 #define SET_THREAD_INFO_AFFINITY 0x02
300 /* Suspend a thread */
302 handle_t handle; /* thread handle */
304 int count; /* new suspend count */
308 /* Resume a thread */
310 handle_t handle; /* thread handle */
312 int count; /* new suspend count */
316 /* Notify the server that a dll has been loaded */
318 handle_t handle; /* file handle */
319 void* base; /* base address */
320 int dbg_offset; /* debug info offset */
321 int dbg_size; /* debug info size */
322 void* name; /* ptr to ptr to name (in process addr space) */
326 /* Notify the server that a dll is being unloaded */
328 void* base; /* base address */
332 /* Queue an APC for a thread */
334 handle_t handle; /* thread handle */
335 int user; /* user or system apc? */
336 void* func; /* function to call */
337 void* param; /* param for function to call */
341 /* Get next APC to call */
343 int alertable; /* is thread alertable? */
345 void* func; /* function to call */
346 int type; /* function type */
347 VARARG(args,ptrs); /* function arguments */
349 enum apc_type { APC_NONE, APC_USER, APC_TIMER, APC_ASYNC };
352 /* Close a handle for the current process */
354 handle_t handle; /* handle to close */
356 int fd; /* associated fd to close */
360 /* Set a handle information */
361 @REQ(set_handle_info)
362 handle_t handle; /* handle we are interested in */
363 int flags; /* new handle flags */
364 int mask; /* mask for flags to set */
365 int fd; /* file descriptor or -1 */
367 int old_flags; /* old flag value */
368 int cur_fd; /* current file descriptor */
372 /* Duplicate a handle */
374 handle_t src_process; /* src process handle */
375 handle_t src_handle; /* src handle to duplicate */
376 handle_t dst_process; /* dst process handle */
377 unsigned int access; /* wanted access rights */
378 int inherit; /* inherit flag */
379 int options; /* duplicate options (see below) */
381 handle_t handle; /* duplicated handle in dst process */
382 int fd; /* associated fd to close */
384 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
385 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
386 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
389 /* Open a handle to a process */
391 void* pid; /* process id to open */
392 unsigned int access; /* wanted access rights */
393 int inherit; /* inherit flag */
395 handle_t handle; /* handle to the process */
399 /* Wait for handles */
401 int flags; /* wait flags (see below) */
402 void* cookie; /* magic cookie to return to client */
403 int sec; /* absolute timeout */
404 int usec; /* absolute timeout */
405 VARARG(handles,handles); /* handles to select on */
408 #define SELECT_ALERTABLE 2
409 #define SELECT_INTERRUPTIBLE 4
410 #define SELECT_TIMEOUT 8
413 /* Create an event */
415 int manual_reset; /* manual reset event */
416 int initial_state; /* initial state of the event */
417 int inherit; /* inherit flag */
418 VARARG(name,unicode_str); /* object name */
420 handle_t handle; /* handle to the event */
423 /* Event operation */
425 handle_t handle; /* handle to event */
426 int op; /* event operation (see below) */
428 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
433 unsigned int access; /* wanted access rights */
434 int inherit; /* inherit flag */
435 VARARG(name,unicode_str); /* object name */
437 handle_t handle; /* handle to the event */
443 int owned; /* initially owned? */
444 int inherit; /* inherit flag */
445 VARARG(name,unicode_str); /* object name */
447 handle_t handle; /* handle to the mutex */
451 /* Release a mutex */
453 handle_t handle; /* handle to the mutex */
459 unsigned int access; /* wanted access rights */
460 int inherit; /* inherit flag */
461 VARARG(name,unicode_str); /* object name */
463 handle_t handle; /* handle to the mutex */
467 /* Create a semaphore */
468 @REQ(create_semaphore)
469 unsigned int initial; /* initial count */
470 unsigned int max; /* maximum count */
471 int inherit; /* inherit flag */
472 VARARG(name,unicode_str); /* object name */
474 handle_t handle; /* handle to the semaphore */
478 /* Release a semaphore */
479 @REQ(release_semaphore)
480 handle_t handle; /* handle to the semaphore */
481 unsigned int count; /* count to add to semaphore */
483 unsigned int prev_count; /* previous semaphore count */
487 /* Open a semaphore */
489 unsigned int access; /* wanted access rights */
490 int inherit; /* inherit flag */
491 VARARG(name,unicode_str); /* object name */
493 handle_t handle; /* handle to the semaphore */
499 unsigned int access; /* wanted access rights */
500 int inherit; /* inherit flag */
501 unsigned int sharing; /* sharing flags */
502 int create; /* file create action */
503 unsigned int attrs; /* file attributes for creation */
504 VARARG(filename,string); /* file name */
506 handle_t handle; /* handle to the file */
510 /* Allocate a file handle for a Unix fd */
511 @REQ(alloc_file_handle)
512 unsigned int access; /* wanted access rights */
513 int fd; /* file descriptor on the client side */
515 handle_t handle; /* handle to the file */
519 /* Get a Unix fd to access a file */
521 handle_t handle; /* handle to the file */
522 unsigned int access; /* wanted access rights */
524 int fd; /* file descriptor */
528 /* Set a file current position */
529 @REQ(set_file_pointer)
530 handle_t handle; /* handle to the file */
531 int low; /* position low word */
532 int high; /* position high word */
533 int whence; /* whence to seek */
535 int new_low; /* new position low word */
536 int new_high; /* new position high word */
540 /* Truncate (or extend) a file */
542 handle_t handle; /* handle to the file */
546 /* Set a file access and modification times */
548 handle_t handle; /* handle to the file */
549 time_t access_time; /* last access time */
550 time_t write_time; /* last write time */
554 /* Flush a file buffers */
556 handle_t handle; /* handle to the file */
560 /* Get information about a file */
562 handle_t handle; /* handle to the file */
564 int type; /* file type */
565 int attr; /* file attributes */
566 time_t access_time; /* last access time */
567 time_t write_time; /* last write time */
568 int size_high; /* file size */
569 int size_low; /* file size */
570 int links; /* number of links */
571 int index_high; /* unique index */
572 int index_low; /* unique index */
573 unsigned int serial; /* volume serial number */
577 /* Lock a region of a file */
579 handle_t handle; /* handle to the file */
580 unsigned int offset_low; /* offset of start of lock */
581 unsigned int offset_high; /* offset of start of lock */
582 unsigned int count_low; /* count of bytes to lock */
583 unsigned int count_high; /* count of bytes to lock */
587 /* Unlock a region of a file */
589 handle_t handle; /* handle to the file */
590 unsigned int offset_low; /* offset of start of unlock */
591 unsigned int offset_high; /* offset of start of unlock */
592 unsigned int count_low; /* count of bytes to unlock */
593 unsigned int count_high; /* count of bytes to unlock */
597 /* Create an anonymous pipe */
599 int inherit; /* inherit flag */
601 handle_t handle_read; /* handle to the read-side of the pipe */
602 handle_t handle_write; /* handle to the write-side of the pipe */
606 /* Create a socket */
608 unsigned int access; /* wanted access rights */
609 int inherit; /* inherit flag */
610 int family; /* family, see socket manpage */
611 int type; /* type, see socket manpage */
612 int protocol; /* protocol, see socket manpage */
614 handle_t handle; /* handle to the new socket */
618 /* Accept a socket */
620 handle_t lhandle; /* handle to the listening socket */
621 unsigned int access; /* wanted access rights */
622 int inherit; /* inherit flag */
624 handle_t handle; /* handle to the new socket */
628 /* Set socket event parameters */
629 @REQ(set_socket_event)
630 handle_t handle; /* handle to the socket */
631 unsigned int mask; /* event mask */
632 handle_t event; /* event object */
636 /* Get socket event parameters */
637 @REQ(get_socket_event)
638 handle_t handle; /* handle to the socket */
639 int service; /* clear pending? */
640 handle_t s_event; /* "expected" event object */
641 handle_t c_event; /* event to clear */
643 unsigned int mask; /* event mask */
644 unsigned int pmask; /* pending events */
645 unsigned int state; /* status bits */
646 VARARG(errors,ints); /* event errors */
650 /* Reenable pending socket events */
651 @REQ(enable_socket_event)
652 handle_t handle; /* handle to the socket */
653 unsigned int mask; /* events to re-enable */
654 unsigned int sstate; /* status bits to set */
655 unsigned int cstate; /* status bits to clear */
659 /* Allocate a console for the current process */
661 unsigned int access; /* wanted access rights */
662 int inherit; /* inherit flag */
664 handle_t handle_in; /* handle to console input */
665 handle_t handle_out; /* handle to console output */
669 /* Free the console of the current process */
674 /* Open a handle to the process console */
676 int output; /* input or output? */
677 unsigned int access; /* wanted access rights */
678 int inherit; /* inherit flag */
680 handle_t handle; /* handle to the console */
684 /* Set a console file descriptor */
686 handle_t handle; /* handle to the console */
687 int fd_in; /* file descriptor to use as input */
688 int fd_out; /* file descriptor to use as output */
689 int pid; /* pid of xterm (hack) */
693 /* Get a console mode (input or output) */
694 @REQ(get_console_mode)
695 handle_t handle; /* handle to the console */
697 int mode; /* console mode */
701 /* Set a console mode (input or output) */
702 @REQ(set_console_mode)
703 handle_t handle; /* handle to the console */
704 int mode; /* console mode */
708 /* Set info about a console (output only) */
709 @REQ(set_console_info)
710 handle_t handle; /* handle to the console */
711 int mask; /* setting mask (see below) */
712 int cursor_size; /* size of cursor (percentage filled) */
713 int cursor_visible;/* cursor visibility flag */
714 VARARG(title,string); /* console title */
716 #define SET_CONSOLE_INFO_CURSOR 0x01
717 #define SET_CONSOLE_INFO_TITLE 0x02
719 /* Get info about a console (output only) */
720 @REQ(get_console_info)
721 handle_t handle; /* handle to the console */
723 int cursor_size; /* size of cursor (percentage filled) */
724 int cursor_visible;/* cursor visibility flag */
725 int pid; /* pid of xterm (hack) */
726 VARARG(title,string); /* console title */
730 /* Add input records to a console input queue */
731 @REQ(write_console_input)
732 handle_t handle; /* handle to the console input */
733 VARARG(rec,input_records); /* input records */
735 int written; /* number of records written */
738 /* Fetch input records from a console input queue */
739 @REQ(read_console_input)
740 handle_t handle; /* handle to the console input */
741 int flush; /* flush the retrieved records from the queue? */
743 int read; /* number of records read */
744 VARARG(rec,input_records); /* input records */
748 /* Create a change notification */
749 @REQ(create_change_notification)
750 int subtree; /* watch all the subtree */
751 int filter; /* notification filter */
753 handle_t handle; /* handle to the change notification */
757 /* Create a file mapping */
759 int size_high; /* mapping size */
760 int size_low; /* mapping size */
761 int protect; /* protection flags (see below) */
762 int inherit; /* inherit flag */
763 handle_t file_handle; /* file handle */
764 VARARG(name,unicode_str); /* object name */
766 handle_t handle; /* handle to the mapping */
768 /* protection flags */
769 #define VPROT_READ 0x01
770 #define VPROT_WRITE 0x02
771 #define VPROT_EXEC 0x04
772 #define VPROT_WRITECOPY 0x08
773 #define VPROT_GUARD 0x10
774 #define VPROT_NOCACHE 0x20
775 #define VPROT_COMMITTED 0x40
776 #define VPROT_IMAGE 0x80
781 unsigned int access; /* wanted access rights */
782 int inherit; /* inherit flag */
783 VARARG(name,unicode_str); /* object name */
785 handle_t handle; /* handle to the mapping */
789 /* Get information about a file mapping */
790 @REQ(get_mapping_info)
791 handle_t handle; /* handle to the mapping */
793 int size_high; /* mapping size */
794 int size_low; /* mapping size */
795 int protect; /* protection flags */
796 int header_size; /* header size (for VPROT_IMAGE mapping) */
797 void* base; /* default base addr (for VPROT_IMAGE mapping) */
798 handle_t shared_file; /* shared mapping file handle */
799 int shared_size; /* shared mapping size */
803 /* Create a device */
805 unsigned int access; /* wanted access rights */
806 int inherit; /* inherit flag */
807 int id; /* client private id */
809 handle_t handle; /* handle to the device */
813 /* Create a snapshot */
814 @REQ(create_snapshot)
815 int inherit; /* inherit flag */
816 int flags; /* snapshot flags (TH32CS_*) */
817 void* pid; /* process id */
819 handle_t handle; /* handle to the snapshot */
823 /* Get the next process from a snapshot */
825 handle_t handle; /* handle to the snapshot */
826 int reset; /* reset snapshot position? */
828 int count; /* process usage count */
829 void* pid; /* process id */
830 int threads; /* number of threads */
831 int priority; /* process priority */
835 /* Get the next thread from a snapshot */
837 handle_t handle; /* handle to the snapshot */
838 int reset; /* reset snapshot position? */
840 int count; /* thread usage count */
841 void* pid; /* process id */
842 void* tid; /* thread id */
843 int base_pri; /* base priority */
844 int delta_pri; /* delta priority */
848 /* Get the next module from a snapshot */
850 handle_t handle; /* handle to the snapshot */
851 int reset; /* reset snapshot position? */
853 void* pid; /* process id */
854 void* base; /* module base address */
858 /* Wait for a debug event */
859 @REQ(wait_debug_event)
860 int get_handle; /* should we alloc a handle for waiting? */
862 void* pid; /* process id */
863 void* tid; /* thread id */
864 handle_t wait; /* wait handle if no event ready */
865 VARARG(event,debug_event); /* debug event data */
869 /* Queue an exception event */
870 @REQ(queue_exception_event)
871 int first; /* first chance exception? */
872 VARARG(record,exc_event); /* thread context followed by exception record */
874 handle_t handle; /* handle to the queued event */
878 /* Retrieve the status of an exception event */
879 @REQ(get_exception_status)
881 handle_t handle; /* handle to the queued event */
882 int status; /* event continuation status */
883 VARARG(context,context); /* modified thread context */
887 /* Send an output string to the debugger */
888 @REQ(output_debug_string)
889 void* string; /* string to display (in debugged process address space) */
890 int unicode; /* is it Unicode? */
891 int length; /* string length */
895 /* Continue a debug event */
896 @REQ(continue_debug_event)
897 void* pid; /* process id to continue */
898 void* tid; /* thread id to continue */
899 int status; /* continuation status */
903 /* Start debugging an existing process */
905 void* pid; /* id of the process to debug */
909 /* Read data from a process address space */
910 @REQ(read_process_memory)
911 handle_t handle; /* process handle */
912 void* addr; /* addr to read from (must be int-aligned) */
913 int len; /* number of ints to read */
915 VARARG(data,bytes); /* result data */
919 /* Write data to a process address space */
920 @REQ(write_process_memory)
921 handle_t handle; /* process handle */
922 void* addr; /* addr to write to (must be int-aligned) */
923 int len; /* number of ints to write */
924 unsigned int first_mask; /* mask for first word */
925 unsigned int last_mask; /* mask for last word */
926 VARARG(data,bytes); /* result data */
930 /* Create a registry key */
932 handle_t parent; /* handle to the parent key */
933 unsigned int access; /* desired access rights */
934 unsigned int options; /* creation options */
935 time_t modif; /* last modification time */
936 VARARG(name,unicode_len_str); /* key name */
937 VARARG(class,unicode_str); /* class name */
939 handle_t hkey; /* handle to the created key */
940 int created; /* has it been newly created? */
943 /* Open a registry key */
945 handle_t parent; /* handle to the parent key */
946 unsigned int access; /* desired access rights */
947 VARARG(name,unicode_str); /* key name */
949 handle_t hkey; /* handle to the open key */
953 /* Delete a registry key */
955 handle_t hkey; /* handle to the key */
959 /* Enumerate registry subkeys */
961 handle_t hkey; /* handle to registry key */
962 int index; /* index of subkey (or -1 for current key) */
963 int full; /* return the full info? */
965 int subkeys; /* number of subkeys */
966 int max_subkey; /* longest subkey name */
967 int max_class; /* longest class name */
968 int values; /* number of values */
969 int max_value; /* longest value name */
970 int max_data; /* longest value data */
971 time_t modif; /* last modification time */
972 VARARG(name,unicode_len_str); /* key name */
973 VARARG(class,unicode_str); /* class name */
977 /* Set a value of a registry key */
979 handle_t hkey; /* handle to registry key */
980 int type; /* value type */
981 unsigned int total; /* total value len */
982 unsigned int offset; /* offset for setting data */
983 VARARG(name,unicode_len_str); /* value name */
984 VARARG(data,bytes); /* value data */
988 /* Retrieve the value of a registry key */
990 handle_t hkey; /* handle to registry key */
991 unsigned int offset; /* offset for getting data */
992 VARARG(name,unicode_len_str); /* value name */
994 int type; /* value type */
995 int len; /* value data len */
996 VARARG(data,bytes); /* value data */
1000 /* Enumerate a value of a registry key */
1001 @REQ(enum_key_value)
1002 handle_t hkey; /* handle to registry key */
1003 int index; /* value index */
1004 unsigned int offset; /* offset for getting data */
1006 int type; /* value type */
1007 int len; /* value data len */
1008 VARARG(name,unicode_len_str); /* value name */
1009 VARARG(data,bytes); /* value data */
1013 /* Delete a value of a registry key */
1014 @REQ(delete_key_value)
1015 handle_t hkey; /* handle to registry key */
1016 VARARG(name,unicode_str); /* value name */
1020 /* Load a registry branch from a file */
1022 handle_t hkey; /* root key to load to */
1023 handle_t file; /* file to load from */
1024 VARARG(name,unicode_str); /* subkey name */
1028 /* Save a registry branch to a file */
1030 handle_t hkey; /* key to save */
1031 handle_t file; /* file to save to */
1035 /* Save a registry branch at server exit */
1036 @REQ(save_registry_atexit)
1037 handle_t hkey; /* key to save */
1038 VARARG(file,string); /* file to save to */
1042 /* Set the current and saving level for the registry */
1043 @REQ(set_registry_levels)
1044 int current; /* new current level */
1045 int saving; /* new saving level */
1046 int period; /* duration between periodic saves (milliseconds) */
1050 /* Create a waitable timer */
1052 int inherit; /* inherit flag */
1053 int manual; /* manual reset */
1054 VARARG(name,unicode_str); /* object name */
1056 handle_t handle; /* handle to the timer */
1060 /* Open a waitable timer */
1062 unsigned int access; /* wanted access rights */
1063 int inherit; /* inherit flag */
1064 VARARG(name,unicode_str); /* object name */
1066 handle_t handle; /* handle to the timer */
1069 /* Set a waitable timer */
1071 handle_t handle; /* handle to the timer */
1072 int sec; /* next expiration absolute time */
1073 int usec; /* next expiration absolute time */
1074 int period; /* timer period in ms */
1075 void* callback; /* callback function */
1076 void* arg; /* callback argument */
1079 /* Cancel a waitable timer */
1081 handle_t handle; /* handle to the timer */
1085 /* Retrieve the current context of a thread */
1086 @REQ(get_thread_context)
1087 handle_t handle; /* thread handle */
1088 unsigned int flags; /* context flags */
1090 VARARG(context,context); /* thread context */
1094 /* Set the current context of a thread */
1095 @REQ(set_thread_context)
1096 handle_t handle; /* thread handle */
1097 unsigned int flags; /* context flags */
1098 VARARG(context,context); /* thread context */
1102 /* Fetch a selector entry for a thread */
1103 @REQ(get_selector_entry)
1104 handle_t handle; /* thread handle */
1105 int entry; /* LDT entry */
1107 unsigned int base; /* selector base */
1108 unsigned int limit; /* selector limit */
1109 unsigned char flags; /* selector flags */
1115 int local; /* is atom in local process table? */
1116 VARARG(name,unicode_str); /* atom name */
1118 int atom; /* resulting atom */
1122 /* Delete an atom */
1124 int atom; /* atom handle */
1125 int local; /* is atom in local process table? */
1131 int local; /* is atom in local process table? */
1132 VARARG(name,unicode_str); /* atom name */
1134 int atom; /* atom handle */
1138 /* Get an atom name */
1140 int atom; /* atom handle */
1141 int local; /* is atom in local process table? */
1143 int count; /* atom lock count */
1144 VARARG(name,unicode_str); /* atom name */
1148 /* Init the process atom table */
1149 @REQ(init_atom_table)
1150 int entries; /* number of entries */
1154 /* Get the message queue of the current thread */
1157 handle_t handle; /* handle to the queue */
1161 /* Increment the message queue paint count */
1162 @REQ(inc_queue_paint_count)
1163 void* id; /* thread id */
1164 int incr; /* increment (can be negative) */
1168 /* Set the current message queue wakeup mask */
1169 @REQ(set_queue_mask)
1170 unsigned int wake_mask; /* wakeup bits mask */
1171 unsigned int changed_mask; /* changed bits mask */
1172 int skip_wait; /* will we skip waiting if signaled? */
1174 unsigned int wake_bits; /* current wake bits */
1175 unsigned int changed_bits; /* current changed bits */
1179 /* Get the current message queue status */
1180 @REQ(get_queue_status)
1181 int clear; /* should we clear the change bits? */
1183 unsigned int wake_bits; /* wake bits */
1184 unsigned int changed_bits; /* changed bits since last time */
1188 /* Wait for a process to start waiting on input */
1189 @REQ(wait_input_idle)
1190 handle_t handle; /* process handle */
1191 int timeout; /* timeout */
1193 handle_t event; /* handle to idle event */
1197 /* Send a message to a thread queue */
1199 void* id; /* thread id */
1200 int type; /* message type (see below) */
1201 user_handle_t win; /* window handle */
1202 unsigned int msg; /* message code */
1203 unsigned int wparam; /* parameters */
1204 unsigned int lparam; /* parameters */
1205 int x; /* x position */
1206 int y; /* y position */
1207 unsigned int time; /* message time */
1208 unsigned int info; /* extra info */
1209 int timeout; /* timeout for reply */
1210 VARARG(data,bytes); /* message data for sent messages */
1215 MSG_ASCII, /* Ascii message (from SendMessageA) */
1216 MSG_UNICODE, /* Unicode message (from SendMessageW) */
1217 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
1218 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
1219 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
1220 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
1221 MSG_HARDWARE_RAW, /* raw hardware message */
1222 MSG_HARDWARE_COOKED /* cooked hardware message */
1226 /* Get a message from the current queue */
1228 int flags; /* see below */
1229 user_handle_t get_win; /* window handle to get */
1230 unsigned int get_first; /* first message code to get */
1231 unsigned int get_last; /* last message code to get */
1233 int type; /* message type */
1234 user_handle_t win; /* window handle */
1235 unsigned int msg; /* message code */
1236 unsigned int wparam; /* parameters */
1237 unsigned int lparam; /* parameters */
1238 int x; /* x position */
1239 int y; /* y position */
1240 unsigned int time; /* message time */
1241 unsigned int info; /* extra info */
1242 VARARG(data,bytes); /* message data for sent messages */
1244 #define GET_MSG_REMOVE 1 /* remove the message */
1245 #define GET_MSG_SENT_ONLY 2 /* only get sent messages */
1246 #define GET_MSG_REMOVE_LAST 4 /* remove last message returned before checking for a new one */
1248 /* Reply to a sent message */
1250 unsigned int result; /* message result */
1251 int remove; /* should we remove the message? */
1252 VARARG(data,bytes); /* message data for sent messages */
1256 /* Retrieve the reply for the last message sent */
1257 @REQ(get_message_reply)
1258 int cancel; /* cancel message if not ready? */
1260 unsigned int result; /* message result */
1261 VARARG(data,bytes); /* message data for sent messages */
1265 /* Cleanup a queue when a window is deleted */
1266 @REQ(cleanup_window_queue)
1267 user_handle_t win; /* window handle */
1271 /* Set a window timer */
1273 user_handle_t win; /* window handle */
1274 unsigned int msg; /* message to post */
1275 unsigned int id; /* timer id */
1276 unsigned int rate; /* timer rate in ms */
1277 unsigned int lparam; /* message lparam (callback proc) */
1281 /* Kill a window timer */
1282 @REQ(kill_win_timer)
1283 user_handle_t win; /* window handle */
1284 unsigned int msg; /* message to post */
1285 unsigned int id; /* timer id */
1289 /* Open a serial port */
1291 unsigned int access; /* wanted access rights */
1292 int inherit; /* inherit flag */
1293 unsigned int sharing; /* sharing flags */
1294 VARARG(name,string); /* file name */
1296 handle_t handle; /* handle to the port */
1300 /* Retrieve info about a serial port */
1301 @REQ(get_serial_info)
1302 handle_t handle; /* handle to comm port */
1304 unsigned int readinterval;
1305 unsigned int readconst;
1306 unsigned int readmult;
1307 unsigned int writeconst;
1308 unsigned int writemult;
1309 unsigned int eventmask;
1310 unsigned int commerror;
1314 /* Set info about a serial port */
1315 @REQ(set_serial_info)
1316 handle_t handle; /* handle to comm port */
1317 int flags; /* bitmask to set values (see below) */
1318 unsigned int readinterval;
1319 unsigned int readconst;
1320 unsigned int readmult;
1321 unsigned int writeconst;
1322 unsigned int writemult;
1323 unsigned int eventmask;
1324 unsigned int commerror;
1326 #define SERIALINFO_SET_TIMEOUTS 0x01
1327 #define SERIALINFO_SET_MASK 0x02
1328 #define SERIALINFO_SET_ERROR 0x04
1331 /* Create an async I/O */
1333 handle_t file_handle; /* handle to comm port, socket or file */
1339 #define ASYNC_TYPE_READ 0x01
1340 #define ASYNC_TYPE_WRITE 0x02
1341 #define ASYNC_TYPE_WAIT 0x03
1344 /* Create a named pipe */
1345 @REQ(create_named_pipe)
1346 unsigned int openmode;
1347 unsigned int pipemode;
1348 unsigned int maxinstances;
1349 unsigned int outsize;
1350 unsigned int insize;
1351 unsigned int timeout;
1352 VARARG(filename,string); /* pipe name */
1354 handle_t handle; /* handle to the pipe */
1358 /* Open an existing named pipe */
1359 @REQ(open_named_pipe)
1360 unsigned int access;
1361 VARARG(filename,string); /* pipe name */
1363 handle_t handle; /* handle to the pipe */
1367 /* Connect to a named pipe */
1368 @REQ(connect_named_pipe)
1370 handle_t event; /* set this event when it's ready
*/
1374 /* Wait for a named pipe
*/
1375 @
REQ(wait_named_pipe
)
1376 unsigned int timeout
;
1377 handle_t event
; /* set this event when it
's ready */
1378 VARARG(filename,string); /* pipe name */
1382 /* Disconnect a named pipe */
1383 @REQ(disconnect_named_pipe)
1388 @REQ(get_named_pipe_info)
1392 unsigned int maxinstances;
1393 unsigned int outsize;
1394 unsigned int insize;
1398 /* Create the desktop window */
1399 @REQ(create_desktop_window)
1401 user_handle_t handle; /* handle to the window */
1405 /* Create a window */
1408 user_handle_t handle; /* handle to the window */
1412 /* Link a window into the tree */
1414 user_handle_t handle; /* handle to the window */
1415 user_handle_t parent; /* handle to the parent */
1416 user_handle_t previous; /* previous child in Z-order */
1421 /* Destroy a window */
1422 @REQ(destroy_window)
1423 user_handle_t handle; /* handle to the window */
1427 /* Get information from a window handle */
1428 @REQ(get_window_info)
1429 user_handle_t handle; /* handle to the window */
1431 user_handle_t full_handle; /* full 32-bit handle */
1432 void* pid; /* process owning the window */
1433 void* tid; /* thread owning the window */