comctl32: rebar tests: Support different window border width.
[wine/wine-kai.git] / server / protocol.def
blob69daab37ba7eb9b419b96758a66c11eb4e950e2b
1 /* -*- C -*-
3 * Wine server protocol definition
5 * Copyright (C) 2001 Alexandre Julliard
7 * This file is used by tools/make_requests to build the
8 * protocol structures in include/wine/server_protocol.h
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation; either
13 * version 2.1 of the License, or (at your option) any later version.
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
25 @HEADER /* start of C declarations */
27 #include <stdarg.h>
28 #include <stdlib.h>
29 #include <time.h>
31 #include <windef.h>
32 #include <winbase.h>
34 typedef 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;
41 struct request_header
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 */
48 struct reply_header
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
115 int error; /* ??? */
116 int type; /* ??? */
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 */
131 typedef struct
133 int code; /* event code */
134 union debug_event_data info; /* event information */
135 } debug_event_t;
137 /* structure used in sending an fd from client to server */
138 struct send_fd
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 */
145 struct wake_up_reply
147 void *cookie; /* magic cookie that was passed in select_request */
148 int signaled; /* wait result */
151 /* structure for absolute timeouts */
152 typedef struct
154 int sec; /* seconds since Unix epoch */
155 int usec; /* microseconds */
156 } abs_time_t;
158 /* structure returned in the list of window properties */
159 typedef struct
161 atom_t atom; /* property atom */
162 short string; /* was atom a string originally? */
163 obj_handle_t handle; /* handle stored in property */
164 } property_data_t;
166 /* structure to specify window rectangles */
167 typedef struct
169 int left;
170 int top;
171 int right;
172 int bottom;
173 } rectangle_t;
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 */
192 typedef union
194 unsigned char bytes[1]; /* raw data for sent messages */
195 struct callback_msg_data callback;
196 struct winevent_msg_data winevent;
197 } message_data_t;
199 /* structure for console char/attribute info */
200 typedef struct
202 WCHAR ch;
203 unsigned short attr;
204 } char_info_t;
206 #define MAX_ACL_LEN 65535
208 struct security_descriptor
210 unsigned int control; /* SE_ flags */
211 data_size_t owner_len;
212 data_size_t group_len;
213 data_size_t sacl_len;
214 data_size_t dacl_len;
215 /* VARARGS(owner,SID); */
216 /* VARARGS(group,SID); */
217 /* VARARGS(sacl,ACL); */
218 /* VARARGS(dacl,ACL); */
221 struct token_groups
223 unsigned int count;
224 /* unsigned int attributes[count]; */
225 /* VARARGS(sids,SID); */
228 enum apc_type
230 APC_NONE,
231 APC_USER,
232 APC_TIMER,
233 APC_ASYNC_IO,
234 APC_VIRTUAL_ALLOC,
235 APC_VIRTUAL_FREE,
236 APC_VIRTUAL_QUERY,
237 APC_VIRTUAL_PROTECT,
238 APC_VIRTUAL_FLUSH,
239 APC_VIRTUAL_LOCK,
240 APC_VIRTUAL_UNLOCK,
241 APC_MAP_VIEW,
242 APC_UNMAP_VIEW,
243 APC_CREATE_THREAD
246 typedef union
248 enum apc_type type;
249 struct
251 enum apc_type type; /* APC_USER */
252 void (__stdcall *func)(unsigned long,unsigned long,unsigned long);
253 unsigned long args[3]; /* arguments for user function */
254 } user;
255 struct
257 enum apc_type type; /* APC_TIMER */
258 void (__stdcall *func)(void*, unsigned int, unsigned int);
259 abs_time_t time; /* absolute time of expiration */
260 void *arg; /* user argument */
261 } timer;
262 struct
264 enum apc_type type; /* APC_ASYNC_IO */
265 void (__stdcall *func)(void*, void*, unsigned int);
266 void *user; /* user pointer */
267 void *sb; /* status block */
268 unsigned int status; /* I/O status */
269 } async_io;
270 struct
272 enum apc_type type; /* APC_VIRTUAL_ALLOC */
273 void *addr; /* requested address */
274 unsigned long size; /* allocation size */
275 unsigned int zero_bits; /* allocation alignment */
276 unsigned int op_type; /* type of operation */
277 unsigned int prot; /* memory protection flags */
278 } virtual_alloc;
279 struct
281 enum apc_type type; /* APC_VIRTUAL_FREE */
282 void *addr; /* requested address */
283 unsigned long size; /* allocation size */
284 unsigned int op_type; /* type of operation */
285 } virtual_free;
286 struct
288 enum apc_type type; /* APC_VIRTUAL_QUERY */
289 const void *addr; /* requested address */
290 } virtual_query;
291 struct
293 enum apc_type type; /* APC_VIRTUAL_PROTECT */
294 void *addr; /* requested address */
295 unsigned long size; /* requested address */
296 unsigned int prot; /* new protection flags */
297 } virtual_protect;
298 struct
300 enum apc_type type; /* APC_VIRTUAL_FLUSH */
301 const void *addr; /* requested address */
302 unsigned long size; /* requested address */
303 } virtual_flush;
304 struct
306 enum apc_type type; /* APC_VIRTUAL_LOCK */
307 void *addr; /* requested address */
308 unsigned long size; /* requested address */
309 } virtual_lock;
310 struct
312 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
313 void *addr; /* requested address */
314 unsigned long size; /* requested address */
315 } virtual_unlock;
316 struct
318 enum apc_type type; /* APC_MAP_VIEW */
319 obj_handle_t handle; /* mapping handle */
320 void *addr; /* requested address */
321 unsigned long size; /* allocation size */
322 unsigned int offset_low;/* file offset */
323 unsigned int offset_high;
324 unsigned int zero_bits; /* allocation alignment */
325 unsigned int alloc_type;/* allocation type */
326 unsigned int prot; /* memory protection flags */
327 } map_view;
328 struct
330 enum apc_type type; /* APC_UNMAP_VIEW */
331 void *addr; /* view address */
332 } unmap_view;
333 struct
335 enum apc_type type; /* APC_CREATE_THREAD */
336 void (__stdcall *func)(void*); /* start function */
337 void *arg; /* argument for start function */
338 unsigned long reserve; /* reserve size for thread stack */
339 unsigned long commit; /* commit size for thread stack */
340 int suspend; /* suspended thread? */
341 } create_thread;
342 } apc_call_t;
344 typedef union
346 enum apc_type type;
347 struct
349 enum apc_type type; /* APC_VIRTUAL_ALLOC */
350 unsigned int status; /* status returned by call */
351 void *addr; /* resulting address */
352 unsigned long size; /* resulting size */
353 } virtual_alloc;
354 struct
356 enum apc_type type; /* APC_VIRTUAL_FREE */
357 unsigned int status; /* status returned by call */
358 void *addr; /* resulting address */
359 unsigned long size; /* resulting size */
360 } virtual_free;
361 struct
363 enum apc_type type; /* APC_VIRTUAL_QUERY */
364 unsigned int status; /* status returned by call */
365 void *base; /* resulting base address */
366 void *alloc_base;/* resulting allocation base */
367 unsigned long size; /* resulting region size */
368 unsigned int state; /* resulting region state */
369 unsigned int prot; /* resulting region protection */
370 unsigned int alloc_prot;/* resulting allocation protection */
371 unsigned int alloc_type;/* resulting region allocation type */
372 } virtual_query;
373 struct
375 enum apc_type type; /* APC_VIRTUAL_PROTECT */
376 unsigned int status; /* status returned by call */
377 void *addr; /* resulting address */
378 unsigned long size; /* resulting size */
379 unsigned int prot; /* old protection flags */
380 } virtual_protect;
381 struct
383 enum apc_type type; /* APC_VIRTUAL_FLUSH */
384 unsigned int status; /* status returned by call */
385 const void *addr; /* resulting address */
386 unsigned long size; /* resulting size */
387 } virtual_flush;
388 struct
390 enum apc_type type; /* APC_VIRTUAL_LOCK */
391 unsigned int status; /* status returned by call */
392 void *addr; /* resulting address */
393 unsigned long size; /* resulting size */
394 } virtual_lock;
395 struct
397 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
398 unsigned int status; /* status returned by call */
399 void *addr; /* resulting address */
400 unsigned long size; /* resulting size */
401 } virtual_unlock;
402 struct
404 enum apc_type type; /* APC_MAP_VIEW */
405 unsigned int status; /* status returned by call */
406 void *addr; /* resulting address */
407 unsigned long size; /* resulting size */
408 } map_view;
409 struct
411 enum apc_type type; /* APC_MAP_VIEW */
412 unsigned int status; /* status returned by call */
413 } unmap_view;
414 struct
416 enum apc_type type; /* APC_CREATE_THREAD */
417 unsigned int status; /* status returned by call */
418 thread_id_t tid; /* thread id */
419 obj_handle_t handle; /* handle to new thread */
420 } create_thread;
421 } apc_result_t;
423 /****************************************************************/
424 /* Request declarations */
426 /* Create a new process from the context of the parent */
427 @REQ(new_process)
428 int inherit_all; /* inherit all handles from parent */
429 unsigned int create_flags; /* creation flags */
430 int socket_fd; /* file descriptor for process socket */
431 obj_handle_t exe_file; /* file handle for main exe */
432 obj_handle_t hstdin; /* handle for stdin */
433 obj_handle_t hstdout; /* handle for stdout */
434 obj_handle_t hstderr; /* handle for stderr */
435 unsigned int process_access; /* access rights for process object */
436 unsigned int process_attr; /* attributes for process object */
437 unsigned int thread_access; /* access rights for thread object */
438 unsigned int thread_attr; /* attributes for thread object */
439 VARARG(info,startup_info); /* startup information */
440 VARARG(env,unicode_str); /* environment for new process */
441 @REPLY
442 obj_handle_t info; /* new process info handle */
443 process_id_t pid; /* process id */
444 obj_handle_t phandle; /* process handle (in the current process) */
445 thread_id_t tid; /* thread id */
446 obj_handle_t thandle; /* thread handle (in the current process) */
447 @END
450 /* Retrieve information about a newly started process */
451 @REQ(get_new_process_info)
452 obj_handle_t info; /* info handle returned from new_process_request */
453 @REPLY
454 int success; /* did the process start successfully? */
455 int exit_code; /* process exit code if failed */
456 @END
459 /* Create a new thread from the context of the parent */
460 @REQ(new_thread)
461 unsigned int access; /* wanted access rights */
462 unsigned int attributes; /* object attributes */
463 int suspend; /* new thread should be suspended on creation */
464 int request_fd; /* fd for request pipe */
465 @REPLY
466 thread_id_t tid; /* thread id */
467 obj_handle_t handle; /* thread handle (in the current process) */
468 @END
471 /* Retrieve the new process startup info */
472 @REQ(get_startup_info)
473 @REPLY
474 obj_handle_t exe_file; /* file handle for main exe */
475 obj_handle_t hstdin; /* handle for stdin */
476 obj_handle_t hstdout; /* handle for stdout */
477 obj_handle_t hstderr; /* handle for stderr */
478 VARARG(info,startup_info); /* startup information */
479 VARARG(env,unicode_str); /* environment */
480 @END
483 /* Signal the end of the process initialization */
484 @REQ(init_process_done)
485 void* module; /* main module base address */
486 void* entry; /* process entry point */
487 int gui; /* is it a GUI process? */
488 @END
491 /* Initialize a thread; called from the child after fork()/clone() */
492 @REQ(init_thread)
493 int unix_pid; /* Unix pid of new thread */
494 int unix_tid; /* Unix tid of new thread */
495 int debug_level; /* new debug level */
496 void* teb; /* TEB of new thread (in thread address space) */
497 void* peb; /* address of PEB (in thread address space) */
498 void* entry; /* thread entry point (in thread address space) */
499 void* ldt_copy; /* address of LDT copy (in thread address space) */
500 int reply_fd; /* fd for reply pipe */
501 int wait_fd; /* fd for blocking calls pipe */
502 @REPLY
503 process_id_t pid; /* process id of the new thread's process */
504 thread_id_t tid; /* thread id of the new thread */
505 data_size_t info_size; /* total size of startup info */
506 abs_time_t server_start; /* server start time */
507 int version; /* protocol version */
508 @END
511 /* Terminate a process */
512 @REQ(terminate_process)
513 obj_handle_t handle; /* process handle to terminate */
514 int exit_code; /* process exit code */
515 @REPLY
516 int self; /* suicide? */
517 @END
520 /* Terminate a thread */
521 @REQ(terminate_thread)
522 obj_handle_t handle; /* thread handle to terminate */
523 int exit_code; /* thread exit code */
524 @REPLY
525 int self; /* suicide? */
526 int last; /* last thread in this process? */
527 @END
530 /* Retrieve information about a process */
531 @REQ(get_process_info)
532 obj_handle_t handle; /* process handle */
533 @REPLY
534 process_id_t pid; /* server process id */
535 process_id_t ppid; /* server process id of parent */
536 int exit_code; /* process exit code */
537 int priority; /* priority class */
538 int affinity; /* process affinity mask */
539 void* peb; /* PEB address in process address space */
540 abs_time_t start_time; /* process start time */
541 abs_time_t end_time; /* process end time */
542 @END
545 /* Set a process informations */
546 @REQ(set_process_info)
547 obj_handle_t handle; /* process handle */
548 int mask; /* setting mask (see below) */
549 int priority; /* priority class */
550 int affinity; /* affinity mask */
551 @END
552 #define SET_PROCESS_INFO_PRIORITY 0x01
553 #define SET_PROCESS_INFO_AFFINITY 0x02
556 /* Retrieve information about a thread */
557 @REQ(get_thread_info)
558 obj_handle_t handle; /* thread handle */
559 thread_id_t tid_in; /* thread id (optional) */
560 @REPLY
561 process_id_t pid; /* server process id */
562 thread_id_t tid; /* server thread id */
563 void* teb; /* thread teb pointer */
564 int exit_code; /* thread exit code */
565 int priority; /* thread priority level */
566 int affinity; /* thread affinity mask */
567 abs_time_t creation_time; /* thread creation time */
568 abs_time_t exit_time; /* thread exit time */
569 int last; /* last thread in process */
570 @END
573 /* Set a thread informations */
574 @REQ(set_thread_info)
575 obj_handle_t handle; /* thread handle */
576 int mask; /* setting mask (see below) */
577 int priority; /* priority class */
578 int affinity; /* affinity mask */
579 obj_handle_t token; /* impersonation token */
580 @END
581 #define SET_THREAD_INFO_PRIORITY 0x01
582 #define SET_THREAD_INFO_AFFINITY 0x02
583 #define SET_THREAD_INFO_TOKEN 0x04
586 /* Retrieve information about a module */
587 @REQ(get_dll_info)
588 obj_handle_t handle; /* process handle */
589 void* base_address; /* base address of module */
590 @REPLY
591 size_t size; /* module size */
592 void* entry_point;
593 VARARG(filename,unicode_str); /* file name of module */
594 @END
597 /* Suspend a thread */
598 @REQ(suspend_thread)
599 obj_handle_t handle; /* thread handle */
600 @REPLY
601 int count; /* new suspend count */
602 @END
605 /* Resume a thread */
606 @REQ(resume_thread)
607 obj_handle_t handle; /* thread handle */
608 @REPLY
609 int count; /* new suspend count */
610 @END
613 /* Notify the server that a dll has been loaded */
614 @REQ(load_dll)
615 obj_handle_t handle; /* file handle */
616 void* base; /* base address */
617 size_t size; /* dll size */
618 int dbg_offset; /* debug info offset */
619 int dbg_size; /* debug info size */
620 void* name; /* ptr to ptr to name (in process addr space) */
621 VARARG(filename,unicode_str); /* file name of dll */
622 @END
625 /* Notify the server that a dll is being unloaded */
626 @REQ(unload_dll)
627 void* base; /* base address */
628 @END
631 /* Queue an APC for a thread or process */
632 @REQ(queue_apc)
633 obj_handle_t thread; /* thread handle */
634 obj_handle_t process; /* process handle */
635 apc_call_t call; /* call arguments */
636 @REPLY
637 obj_handle_t handle; /* APC handle */
638 int self; /* run APC in caller itself? */
639 @END
642 /* Get next APC to call */
643 @REQ(get_apc)
644 int alertable; /* is thread alertable? */
645 obj_handle_t prev; /* handle to previous APC */
646 apc_result_t result; /* result of previous APC */
647 @REPLY
648 obj_handle_t handle; /* handle to APC */
649 apc_call_t call; /* call arguments */
650 @END
653 /* Get the result of an APC call */
654 @REQ(get_apc_result)
655 obj_handle_t handle; /* handle to the APC */
656 @REPLY
657 apc_result_t result; /* result of the APC */
658 @END
661 /* Close a handle for the current process */
662 @REQ(close_handle)
663 obj_handle_t handle; /* handle to close */
664 @END
667 /* Set a handle information */
668 @REQ(set_handle_info)
669 obj_handle_t handle; /* handle we are interested in */
670 int flags; /* new handle flags */
671 int mask; /* mask for flags to set */
672 @REPLY
673 int old_flags; /* old flag value */
674 @END
677 /* Duplicate a handle */
678 @REQ(dup_handle)
679 obj_handle_t src_process; /* src process handle */
680 obj_handle_t src_handle; /* src handle to duplicate */
681 obj_handle_t dst_process; /* dst process handle */
682 unsigned int access; /* wanted access rights */
683 unsigned int attributes; /* object attributes */
684 unsigned int options; /* duplicate options (see below) */
685 @REPLY
686 obj_handle_t handle; /* duplicated handle in dst process */
687 int self; /* is the source the current process? */
688 int closed; /* whether the source handle has been closed */
689 @END
690 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
691 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
692 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
695 /* Open a handle to a process */
696 @REQ(open_process)
697 process_id_t pid; /* process id to open */
698 unsigned int access; /* wanted access rights */
699 unsigned int attributes; /* object attributes */
700 @REPLY
701 obj_handle_t handle; /* handle to the process */
702 @END
705 /* Open a handle to a thread */
706 @REQ(open_thread)
707 thread_id_t tid; /* thread id to open */
708 unsigned int access; /* wanted access rights */
709 unsigned int attributes; /* object attributes */
710 @REPLY
711 obj_handle_t handle; /* handle to the thread */
712 @END
715 /* Wait for handles */
716 @REQ(select)
717 int flags; /* wait flags (see below) */
718 void* cookie; /* magic cookie to return to client */
719 obj_handle_t signal; /* object to signal (0 if none) */
720 abs_time_t timeout; /* absolute timeout */
721 VARARG(handles,handles); /* handles to select on */
722 @END
723 #define SELECT_ALL 1
724 #define SELECT_ALERTABLE 2
725 #define SELECT_INTERRUPTIBLE 4
726 #define SELECT_TIMEOUT 8
729 /* Create an event */
730 @REQ(create_event)
731 unsigned int access; /* wanted access rights */
732 unsigned int attributes; /* object attributes */
733 obj_handle_t rootdir; /* root directory */
734 int manual_reset; /* manual reset event */
735 int initial_state; /* initial state of the event */
736 VARARG(name,unicode_str); /* object name */
737 @REPLY
738 obj_handle_t handle; /* handle to the event */
739 @END
741 /* Event operation */
742 @REQ(event_op)
743 obj_handle_t handle; /* handle to event */
744 int op; /* event operation (see below) */
745 @END
746 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
749 /* Open an event */
750 @REQ(open_event)
751 unsigned int access; /* wanted access rights */
752 unsigned int attributes; /* object attributes */
753 obj_handle_t rootdir; /* root directory */
754 VARARG(name,unicode_str); /* object name */
755 @REPLY
756 obj_handle_t handle; /* handle to the event */
757 @END
760 /* Create a mutex */
761 @REQ(create_mutex)
762 unsigned int access; /* wanted access rights */
763 unsigned int attributes; /* object attributes */
764 obj_handle_t rootdir; /* root directory */
765 int owned; /* initially owned? */
766 VARARG(name,unicode_str); /* object name */
767 @REPLY
768 obj_handle_t handle; /* handle to the mutex */
769 @END
772 /* Release a mutex */
773 @REQ(release_mutex)
774 obj_handle_t handle; /* handle to the mutex */
775 @REPLY
776 unsigned int prev_count; /* value of internal counter, before release */
777 @END
780 /* Open a mutex */
781 @REQ(open_mutex)
782 unsigned int access; /* wanted access rights */
783 unsigned int attributes; /* object attributes */
784 obj_handle_t rootdir; /* root directory */
785 VARARG(name,unicode_str); /* object name */
786 @REPLY
787 obj_handle_t handle; /* handle to the mutex */
788 @END
791 /* Create a semaphore */
792 @REQ(create_semaphore)
793 unsigned int access; /* wanted access rights */
794 unsigned int attributes; /* object attributes */
795 obj_handle_t rootdir; /* root directory */
796 unsigned int initial; /* initial count */
797 unsigned int max; /* maximum count */
798 VARARG(name,unicode_str); /* object name */
799 @REPLY
800 obj_handle_t handle; /* handle to the semaphore */
801 @END
804 /* Release a semaphore */
805 @REQ(release_semaphore)
806 obj_handle_t handle; /* handle to the semaphore */
807 unsigned int count; /* count to add to semaphore */
808 @REPLY
809 unsigned int prev_count; /* previous semaphore count */
810 @END
813 /* Open a semaphore */
814 @REQ(open_semaphore)
815 unsigned int access; /* wanted access rights */
816 unsigned int attributes; /* object attributes */
817 obj_handle_t rootdir; /* root directory */
818 VARARG(name,unicode_str); /* object name */
819 @REPLY
820 obj_handle_t handle; /* handle to the semaphore */
821 @END
824 /* Create a file */
825 @REQ(create_file)
826 unsigned int access; /* wanted access rights */
827 unsigned int attributes; /* object attributes */
828 unsigned int sharing; /* sharing flags */
829 int create; /* file create action */
830 unsigned int options; /* file options */
831 unsigned int attrs; /* file attributes for creation */
832 VARARG(filename,string); /* file name */
833 @REPLY
834 obj_handle_t handle; /* handle to the file */
835 @END
838 /* Open a file object */
839 @REQ(open_file_object)
840 unsigned int access; /* wanted access rights */
841 unsigned int attributes; /* open attributes */
842 obj_handle_t rootdir; /* root directory */
843 unsigned int sharing; /* sharing flags */
844 VARARG(filename,unicode_str); /* file name */
845 @REPLY
846 obj_handle_t handle; /* handle to the file */
847 @END
850 /* Allocate a file handle for a Unix fd */
851 @REQ(alloc_file_handle)
852 unsigned int access; /* wanted access rights */
853 unsigned int attributes; /* object attributes */
854 int fd; /* file descriptor on the client side */
855 @REPLY
856 obj_handle_t handle; /* handle to the file */
857 @END
860 /* Get a Unix fd to access a file */
861 @REQ(get_handle_fd)
862 obj_handle_t handle; /* handle to the file */
863 unsigned int access; /* wanted access rights */
864 int cached; /* is it cached on the client already? */
865 @REPLY
866 int type; /* file type (see below) */
867 int flags; /* file read/write flags (see below) */
868 @END
869 enum server_fd_type
871 FD_TYPE_INVALID, /* invalid file (no associated fd) */
872 FD_TYPE_FILE, /* regular file */
873 FD_TYPE_DIR, /* directory */
874 FD_TYPE_SOCKET, /* socket */
875 FD_TYPE_SERIAL, /* serial port */
876 FD_TYPE_PIPE, /* named pipe */
877 FD_TYPE_MAILSLOT, /* mailslot */
878 FD_TYPE_DEVICE, /* Windows device file */
879 FD_TYPE_NB_TYPES
881 #define FD_FLAG_OVERLAPPED 0x01 /* fd opened in overlapped mode */
882 #define FD_FLAG_TIMEOUT 0x02 /* read/write is synchronous */
883 #define FD_FLAG_RECV_SHUTDOWN 0x04
884 #define FD_FLAG_SEND_SHUTDOWN 0x08
885 #define FD_FLAG_AVAILABLE 0x10 /* in overlap read/write operation,
886 * only handle available data (don't wait) */
887 #define FD_FLAG_REMOVABLE 0x20 /* is it on a removable device? */
889 /* Flush a file buffers */
890 @REQ(flush_file)
891 obj_handle_t handle; /* handle to the file */
892 @REPLY
893 obj_handle_t event; /* event set when finished */
894 @END
897 /* Lock a region of a file */
898 @REQ(lock_file)
899 obj_handle_t handle; /* handle to the file */
900 unsigned int offset_low; /* offset of start of lock */
901 unsigned int offset_high; /* offset of start of lock */
902 unsigned int count_low; /* count of bytes to lock */
903 unsigned int count_high; /* count of bytes to lock */
904 int shared; /* shared or exclusive lock? */
905 int wait; /* do we want to wait? */
906 @REPLY
907 obj_handle_t handle; /* handle to wait on */
908 int overlapped; /* is it an overlapped I/O handle? */
909 @END
912 /* Unlock a region of a file */
913 @REQ(unlock_file)
914 obj_handle_t handle; /* handle to the file */
915 unsigned int offset_low; /* offset of start of unlock */
916 unsigned int offset_high; /* offset of start of unlock */
917 unsigned int count_low; /* count of bytes to unlock */
918 unsigned int count_high; /* count of bytes to unlock */
919 @END
922 /* Get ready to unmount a Unix device */
923 @REQ(unmount_device)
924 obj_handle_t handle; /* handle to a file on the device */
925 @END
928 /* Create a socket */
929 @REQ(create_socket)
930 unsigned int access; /* wanted access rights */
931 unsigned int attributes; /* object attributes */
932 int family; /* family, see socket manpage */
933 int type; /* type, see socket manpage */
934 int protocol; /* protocol, see socket manpage */
935 unsigned int flags; /* socket flags */
936 @REPLY
937 obj_handle_t handle; /* handle to the new socket */
938 @END
941 /* Accept a socket */
942 @REQ(accept_socket)
943 obj_handle_t lhandle; /* handle to the listening socket */
944 unsigned int access; /* wanted access rights */
945 unsigned int attributes; /* object attributes */
946 @REPLY
947 obj_handle_t handle; /* handle to the new socket */
948 @END
951 /* Set socket event parameters */
952 @REQ(set_socket_event)
953 obj_handle_t handle; /* handle to the socket */
954 unsigned int mask; /* event mask */
955 obj_handle_t event; /* event object */
956 user_handle_t window; /* window to send the message to */
957 unsigned int msg; /* message to send */
958 @END
961 /* Get socket event parameters */
962 @REQ(get_socket_event)
963 obj_handle_t handle; /* handle to the socket */
964 int service; /* clear pending? */
965 obj_handle_t c_event; /* event to clear */
966 @REPLY
967 unsigned int mask; /* event mask */
968 unsigned int pmask; /* pending events */
969 unsigned int state; /* status bits */
970 VARARG(errors,ints); /* event errors */
971 @END
974 /* Reenable pending socket events */
975 @REQ(enable_socket_event)
976 obj_handle_t handle; /* handle to the socket */
977 unsigned int mask; /* events to re-enable */
978 unsigned int sstate; /* status bits to set */
979 unsigned int cstate; /* status bits to clear */
980 @END
982 @REQ(set_socket_deferred)
983 obj_handle_t handle; /* handle to the socket */
984 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
985 @END
987 /* Allocate a console (only used by a console renderer) */
988 @REQ(alloc_console)
989 unsigned int access; /* wanted access rights */
990 unsigned int attributes; /* object attributes */
991 process_id_t pid; /* pid of process which shall be attached to the console */
992 @REPLY
993 obj_handle_t handle_in; /* handle to console input */
994 obj_handle_t event; /* handle to renderer events change notification */
995 @END
998 /* Free the console of the current process */
999 @REQ(free_console)
1000 @END
1003 #define CONSOLE_RENDERER_NONE_EVENT 0x00
1004 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
1005 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
1006 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
1007 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
1008 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
1009 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
1010 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
1011 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
1012 struct console_renderer_event
1014 short event;
1015 union
1017 struct update
1019 short top;
1020 short bottom;
1021 } update;
1022 struct resize
1024 short width;
1025 short height;
1026 } resize;
1027 struct cursor_pos
1029 short x;
1030 short y;
1031 } cursor_pos;
1032 struct cursor_geom
1034 short visible;
1035 short size;
1036 } cursor_geom;
1037 struct display
1039 short left;
1040 short top;
1041 short width;
1042 short height;
1043 } display;
1044 } u;
1047 /* retrieve console events for the renderer */
1048 @REQ(get_console_renderer_events)
1049 obj_handle_t handle; /* handle to console input events */
1050 @REPLY
1051 VARARG(data,bytes); /* the various console_renderer_events */
1052 @END
1055 /* Open a handle to the process console */
1056 @REQ(open_console)
1057 obj_handle_t from; /* 0 (resp 1) input (resp output) of current process console */
1058 /* otherwise console_in handle to get active screen buffer? */
1059 unsigned int access; /* wanted access rights */
1060 unsigned int attributes; /* object attributes */
1061 int share; /* share mask (only for output handles) */
1062 @REPLY
1063 obj_handle_t handle; /* handle to the console */
1064 @END
1067 /* Get the input queue wait event */
1068 @REQ(get_console_wait_event)
1069 @REPLY
1070 obj_handle_t handle;
1071 @END
1073 /* Get a console mode (input or output) */
1074 @REQ(get_console_mode)
1075 obj_handle_t handle; /* handle to the console */
1076 @REPLY
1077 int mode; /* console mode */
1078 @END
1081 /* Set a console mode (input or output) */
1082 @REQ(set_console_mode)
1083 obj_handle_t handle; /* handle to the console */
1084 int mode; /* console mode */
1085 @END
1088 /* Set info about a console (input only) */
1089 @REQ(set_console_input_info)
1090 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1091 int mask; /* setting mask (see below) */
1092 obj_handle_t active_sb; /* active screen buffer */
1093 int history_mode; /* whether we duplicate lines in history */
1094 int history_size; /* number of lines in history */
1095 int edition_mode; /* index to the edition mode flavors */
1096 VARARG(title,unicode_str); /* console title */
1097 @END
1098 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
1099 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
1100 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
1101 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
1102 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
1105 /* Get info about a console (input only) */
1106 @REQ(get_console_input_info)
1107 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1108 @REPLY
1109 int history_mode; /* whether we duplicate lines in history */
1110 int history_size; /* number of lines in history */
1111 int history_index; /* number of used lines in history */
1112 int edition_mode; /* index to the edition mode flavors */
1113 VARARG(title,unicode_str); /* console title */
1114 @END
1117 /* appends a string to console's history */
1118 @REQ(append_console_input_history)
1119 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1120 VARARG(line,unicode_str); /* line to add */
1121 @END
1124 /* appends a string to console's history */
1125 @REQ(get_console_input_history)
1126 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1127 int index; /* index to get line from */
1128 @REPLY
1129 int total; /* total length of line in Unicode chars */
1130 VARARG(line,unicode_str); /* line to add */
1131 @END
1134 /* creates a new screen buffer on process' console */
1135 @REQ(create_console_output)
1136 obj_handle_t handle_in; /* handle to console input, or 0 for process' console */
1137 unsigned int access; /* wanted access rights */
1138 unsigned int attributes; /* object attributes */
1139 unsigned int share; /* sharing credentials */
1140 @REPLY
1141 obj_handle_t handle_out; /* handle to the screen buffer */
1142 @END
1145 /* Set info about a console (output only) */
1146 @REQ(set_console_output_info)
1147 obj_handle_t handle; /* handle to the console */
1148 int mask; /* setting mask (see below) */
1149 short int cursor_size; /* size of cursor (percentage filled) */
1150 short int cursor_visible;/* cursor visibility flag */
1151 short int cursor_x; /* position of cursor (x, y) */
1152 short int cursor_y;
1153 short int width; /* width of the screen buffer */
1154 short int height; /* height of the screen buffer */
1155 short int attr; /* default attribute */
1156 short int win_left; /* window actually displayed by renderer */
1157 short int win_top; /* the rect area is expressed withing the */
1158 short int win_right; /* boundaries of the screen buffer */
1159 short int win_bottom;
1160 short int max_width; /* maximum size (width x height) for the window */
1161 short int max_height;
1162 @END
1163 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01
1164 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02
1165 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x04
1166 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08
1167 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10
1168 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20
1171 /* Get info about a console (output only) */
1172 @REQ(get_console_output_info)
1173 obj_handle_t handle; /* handle to the console */
1174 @REPLY
1175 short int cursor_size; /* size of cursor (percentage filled) */
1176 short int cursor_visible;/* cursor visibility flag */
1177 short int cursor_x; /* position of cursor (x, y) */
1178 short int cursor_y;
1179 short int width; /* width of the screen buffer */
1180 short int height; /* height of the screen buffer */
1181 short int attr; /* default attribute */
1182 short int win_left; /* window actually displayed by renderer */
1183 short int win_top; /* the rect area is expressed withing the */
1184 short int win_right; /* boundaries of the screen buffer */
1185 short int win_bottom;
1186 short int max_width; /* maximum size (width x height) for the window */
1187 short int max_height;
1188 @END
1190 /* Add input records to a console input queue */
1191 @REQ(write_console_input)
1192 obj_handle_t handle; /* handle to the console input */
1193 VARARG(rec,input_records); /* input records */
1194 @REPLY
1195 int written; /* number of records written */
1196 @END
1199 /* Fetch input records from a console input queue */
1200 @REQ(read_console_input)
1201 obj_handle_t handle; /* handle to the console input */
1202 int flush; /* flush the retrieved records from the queue? */
1203 @REPLY
1204 int read; /* number of records read */
1205 VARARG(rec,input_records); /* input records */
1206 @END
1209 /* write data (chars and/or attributes) in a screen buffer */
1210 @REQ(write_console_output)
1211 obj_handle_t handle; /* handle to the console output */
1212 int x; /* position where to start writing */
1213 int y;
1214 int mode; /* char info (see below) */
1215 int wrap; /* wrap around at end of line? */
1216 VARARG(data,bytes); /* info to write */
1217 @REPLY
1218 int written; /* number of char infos actually written */
1219 int width; /* width of screen buffer */
1220 int height; /* height of screen buffer */
1221 @END
1222 enum char_info_mode
1224 CHAR_INFO_MODE_TEXT, /* characters only */
1225 CHAR_INFO_MODE_ATTR, /* attributes only */
1226 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
1227 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
1231 /* fill a screen buffer with constant data (chars and/or attributes) */
1232 @REQ(fill_console_output)
1233 obj_handle_t handle; /* handle to the console output */
1234 int x; /* position where to start writing */
1235 int y;
1236 int mode; /* char info mode */
1237 int count; /* number to write */
1238 int wrap; /* wrap around at end of line? */
1239 char_info_t data; /* data to write */
1240 @REPLY
1241 int written; /* number of char infos actually written */
1242 @END
1245 /* read data (chars and/or attributes) from a screen buffer */
1246 @REQ(read_console_output)
1247 obj_handle_t handle; /* handle to the console output */
1248 int x; /* position (x,y) where to start reading */
1249 int y;
1250 int mode; /* char info mode */
1251 int wrap; /* wrap around at end of line? */
1252 @REPLY
1253 int width; /* width of screen buffer */
1254 int height; /* height of screen buffer */
1255 VARARG(data,bytes);
1256 @END
1259 /* move a rect (of data) in screen buffer content */
1260 @REQ(move_console_output)
1261 obj_handle_t handle; /* handle to the console output */
1262 short int x_src; /* position (x, y) of rect to start moving from */
1263 short int y_src;
1264 short int x_dst; /* position (x, y) of rect to move to */
1265 short int y_dst;
1266 short int w; /* size of the rect (width, height) to move */
1267 short int h;
1268 @END
1271 /* Sends a signal to a process group */
1272 @REQ(send_console_signal)
1273 int signal; /* the signal to send */
1274 process_id_t group_id; /* the group to send the signal to */
1275 @END
1278 /* enable directory change notifications */
1279 @REQ(read_directory_changes)
1280 unsigned int filter; /* notification filter */
1281 obj_handle_t handle; /* handle to the directory */
1282 obj_handle_t event; /* handle to the event */
1283 int subtree; /* watch the subtree? */
1284 int want_data; /* flag indicating whether change data should be collected */
1285 void* io_apc; /* APC routine to queue upon end of async */
1286 void* io_sb; /* I/O status block (unique across all async on this handle) */
1287 void* io_user; /* data to pass back to caller */
1288 @END
1291 @REQ(read_change)
1292 obj_handle_t handle;
1293 @REPLY
1294 int action; /* type of change */
1295 VARARG(name,string); /* name of directory entry that changed */
1296 @END
1299 /* Create a file mapping */
1300 @REQ(create_mapping)
1301 unsigned int access; /* wanted access rights */
1302 unsigned int attributes; /* object attributes */
1303 obj_handle_t rootdir; /* root directory */
1304 int size_high; /* mapping size */
1305 int size_low; /* mapping size */
1306 int protect; /* protection flags (see below) */
1307 obj_handle_t file_handle; /* file handle */
1308 VARARG(name,unicode_str); /* object name */
1309 @REPLY
1310 obj_handle_t handle; /* handle to the mapping */
1311 @END
1312 /* protection flags */
1313 #define VPROT_READ 0x01
1314 #define VPROT_WRITE 0x02
1315 #define VPROT_EXEC 0x04
1316 #define VPROT_WRITECOPY 0x08
1317 #define VPROT_GUARD 0x10
1318 #define VPROT_NOCACHE 0x20
1319 #define VPROT_COMMITTED 0x40
1320 #define VPROT_IMAGE 0x80
1323 /* Open a mapping */
1324 @REQ(open_mapping)
1325 unsigned int access; /* wanted access rights */
1326 unsigned int attributes; /* object attributes */
1327 obj_handle_t rootdir; /* root directory */
1328 VARARG(name,unicode_str); /* object name */
1329 @REPLY
1330 obj_handle_t handle; /* handle to the mapping */
1331 @END
1334 /* Get information about a file mapping */
1335 @REQ(get_mapping_info)
1336 obj_handle_t handle; /* handle to the mapping */
1337 @REPLY
1338 int size_high; /* mapping size */
1339 int size_low; /* mapping size */
1340 int protect; /* protection flags */
1341 int header_size; /* header size (for VPROT_IMAGE mapping) */
1342 void* base; /* default base addr (for VPROT_IMAGE mapping) */
1343 obj_handle_t mapping; /* duplicate mapping handle unless removable */
1344 obj_handle_t shared_file; /* shared mapping file handle */
1345 int shared_size; /* shared mapping size */
1346 @END
1349 #define SNAP_HEAPLIST 0x00000001
1350 #define SNAP_PROCESS 0x00000002
1351 #define SNAP_THREAD 0x00000004
1352 #define SNAP_MODULE 0x00000008
1353 /* Create a snapshot */
1354 @REQ(create_snapshot)
1355 unsigned int attributes; /* object attributes */
1356 int flags; /* snapshot flags (SNAP_*) */
1357 process_id_t pid; /* process id */
1358 @REPLY
1359 obj_handle_t handle; /* handle to the snapshot */
1360 @END
1363 /* Get the next process from a snapshot */
1364 @REQ(next_process)
1365 obj_handle_t handle; /* handle to the snapshot */
1366 int reset; /* reset snapshot position? */
1367 @REPLY
1368 int count; /* process usage count */
1369 process_id_t pid; /* process id */
1370 process_id_t ppid; /* parent process id */
1371 void* heap; /* heap base */
1372 void* module; /* main module */
1373 int threads; /* number of threads */
1374 int priority; /* process priority */
1375 int handles; /* number of handles */
1376 VARARG(filename,unicode_str); /* file name of main exe */
1377 @END
1380 /* Get the next thread from a snapshot */
1381 @REQ(next_thread)
1382 obj_handle_t handle; /* handle to the snapshot */
1383 int reset; /* reset snapshot position? */
1384 @REPLY
1385 int count; /* thread usage count */
1386 process_id_t pid; /* process id */
1387 thread_id_t tid; /* thread id */
1388 int base_pri; /* base priority */
1389 int delta_pri; /* delta priority */
1390 @END
1393 /* Get the next module from a snapshot */
1394 @REQ(next_module)
1395 obj_handle_t handle; /* handle to the snapshot */
1396 int reset; /* reset snapshot position? */
1397 @REPLY
1398 process_id_t pid; /* process id */
1399 void* base; /* module base address */
1400 size_t size; /* module size */
1401 VARARG(filename,unicode_str); /* file name of module */
1402 @END
1405 /* Wait for a debug event */
1406 @REQ(wait_debug_event)
1407 int get_handle; /* should we alloc a handle for waiting? */
1408 @REPLY
1409 process_id_t pid; /* process id */
1410 thread_id_t tid; /* thread id */
1411 obj_handle_t wait; /* wait handle if no event ready */
1412 VARARG(event,debug_event); /* debug event data */
1413 @END
1416 /* Queue an exception event */
1417 @REQ(queue_exception_event)
1418 int first; /* first chance exception? */
1419 VARARG(record,exc_event); /* thread context followed by exception record */
1420 @REPLY
1421 obj_handle_t handle; /* handle to the queued event */
1422 @END
1425 /* Retrieve the status of an exception event */
1426 @REQ(get_exception_status)
1427 obj_handle_t handle; /* handle to the queued event */
1428 @REPLY
1429 VARARG(context,context); /* modified thread context */
1430 @END
1433 /* Send an output string to the debugger */
1434 @REQ(output_debug_string)
1435 void* string; /* string to display (in debugged process address space) */
1436 int unicode; /* is it Unicode? */
1437 int length; /* string length */
1438 @END
1441 /* Continue a debug event */
1442 @REQ(continue_debug_event)
1443 process_id_t pid; /* process id to continue */
1444 thread_id_t tid; /* thread id to continue */
1445 int status; /* continuation status */
1446 @END
1449 /* Start/stop debugging an existing process */
1450 @REQ(debug_process)
1451 process_id_t pid; /* id of the process to debug */
1452 int attach; /* 1=attaching / 0=detaching from the process */
1453 @END
1456 /* Simulate a breakpoint in a process */
1457 @REQ(debug_break)
1458 obj_handle_t handle; /* process handle */
1459 @REPLY
1460 int self; /* was it the caller itself? */
1461 @END
1464 /* Set debugger kill on exit flag */
1465 @REQ(set_debugger_kill_on_exit)
1466 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1467 @END
1470 /* Read data from a process address space */
1471 @REQ(read_process_memory)
1472 obj_handle_t handle; /* process handle */
1473 void* addr; /* addr to read from */
1474 @REPLY
1475 VARARG(data,bytes); /* result data */
1476 @END
1479 /* Write data to a process address space */
1480 @REQ(write_process_memory)
1481 obj_handle_t handle; /* process handle */
1482 void* addr; /* addr to write to */
1483 VARARG(data,bytes); /* data to write */
1484 @END
1487 /* Create a registry key */
1488 @REQ(create_key)
1489 obj_handle_t parent; /* handle to the parent key */
1490 unsigned int access; /* desired access rights */
1491 unsigned int attributes; /* object attributes */
1492 unsigned int options; /* creation options */
1493 time_t modif; /* last modification time */
1494 data_size_t namelen; /* length of key name in bytes */
1495 VARARG(name,unicode_str,namelen); /* key name */
1496 VARARG(class,unicode_str); /* class name */
1497 @REPLY
1498 obj_handle_t hkey; /* handle to the created key */
1499 int created; /* has it been newly created? */
1500 @END
1502 /* Open a registry key */
1503 @REQ(open_key)
1504 obj_handle_t parent; /* handle to the parent key */
1505 unsigned int access; /* desired access rights */
1506 unsigned int attributes; /* object attributes */
1507 VARARG(name,unicode_str); /* key name */
1508 @REPLY
1509 obj_handle_t hkey; /* handle to the open key */
1510 @END
1513 /* Delete a registry key */
1514 @REQ(delete_key)
1515 obj_handle_t hkey; /* handle to the key */
1516 @END
1519 /* Flush a registry key */
1520 @REQ(flush_key)
1521 obj_handle_t hkey; /* handle to the key */
1522 @END
1525 /* Enumerate registry subkeys */
1526 @REQ(enum_key)
1527 obj_handle_t hkey; /* handle to registry key */
1528 int index; /* index of subkey (or -1 for current key) */
1529 int info_class; /* requested information class */
1530 @REPLY
1531 int subkeys; /* number of subkeys */
1532 int max_subkey; /* longest subkey name */
1533 int max_class; /* longest class name */
1534 int values; /* number of values */
1535 int max_value; /* longest value name */
1536 int max_data; /* longest value data */
1537 time_t modif; /* last modification time */
1538 data_size_t total; /* total length needed for full name and class */
1539 data_size_t namelen; /* length of key name in bytes */
1540 VARARG(name,unicode_str,namelen); /* key name */
1541 VARARG(class,unicode_str); /* class name */
1542 @END
1545 /* Set a value of a registry key */
1546 @REQ(set_key_value)
1547 obj_handle_t hkey; /* handle to registry key */
1548 int type; /* value type */
1549 data_size_t namelen; /* length of value name in bytes */
1550 VARARG(name,unicode_str,namelen); /* value name */
1551 VARARG(data,bytes); /* value data */
1552 @END
1555 /* Retrieve the value of a registry key */
1556 @REQ(get_key_value)
1557 obj_handle_t hkey; /* handle to registry key */
1558 VARARG(name,unicode_str); /* value name */
1559 @REPLY
1560 int type; /* value type */
1561 data_size_t total; /* total length needed for data */
1562 VARARG(data,bytes); /* value data */
1563 @END
1566 /* Enumerate a value of a registry key */
1567 @REQ(enum_key_value)
1568 obj_handle_t hkey; /* handle to registry key */
1569 int index; /* value index */
1570 int info_class; /* requested information class */
1571 @REPLY
1572 int type; /* value type */
1573 data_size_t total; /* total length needed for full name and data */
1574 data_size_t namelen; /* length of value name in bytes */
1575 VARARG(name,unicode_str,namelen); /* value name */
1576 VARARG(data,bytes); /* value data */
1577 @END
1580 /* Delete a value of a registry key */
1581 @REQ(delete_key_value)
1582 obj_handle_t hkey; /* handle to registry key */
1583 VARARG(name,unicode_str); /* value name */
1584 @END
1587 /* Load a registry branch from a file */
1588 @REQ(load_registry)
1589 obj_handle_t hkey; /* root key to load to */
1590 obj_handle_t file; /* file to load from */
1591 VARARG(name,unicode_str); /* subkey name */
1592 @END
1595 /* UnLoad a registry branch from a file */
1596 @REQ(unload_registry)
1597 obj_handle_t hkey; /* root key to unload to */
1598 @END
1601 /* Save a registry branch to a file */
1602 @REQ(save_registry)
1603 obj_handle_t hkey; /* key to save */
1604 obj_handle_t file; /* file to save to */
1605 @END
1608 /* Add a registry key change notification */
1609 @REQ(set_registry_notification)
1610 obj_handle_t hkey; /* key to watch for changes */
1611 obj_handle_t event; /* event to set */
1612 int subtree; /* should we watch the whole subtree? */
1613 unsigned int filter; /* things to watch */
1614 @END
1617 /* Create a waitable timer */
1618 @REQ(create_timer)
1619 unsigned int access; /* wanted access rights */
1620 unsigned int attributes; /* object attributes */
1621 obj_handle_t rootdir; /* root directory */
1622 int manual; /* manual reset */
1623 VARARG(name,unicode_str); /* object name */
1624 @REPLY
1625 obj_handle_t handle; /* handle to the timer */
1626 @END
1629 /* Open a waitable timer */
1630 @REQ(open_timer)
1631 unsigned int access; /* wanted access rights */
1632 unsigned int attributes; /* object attributes */
1633 obj_handle_t rootdir; /* root directory */
1634 VARARG(name,unicode_str); /* object name */
1635 @REPLY
1636 obj_handle_t handle; /* handle to the timer */
1637 @END
1639 /* Set a waitable timer */
1640 @REQ(set_timer)
1641 obj_handle_t handle; /* handle to the timer */
1642 abs_time_t expire; /* next expiration absolute time */
1643 int period; /* timer period in ms */
1644 void* callback; /* callback function */
1645 void* arg; /* callback argument */
1646 @REPLY
1647 int signaled; /* was the timer signaled before this call ? */
1648 @END
1650 /* Cancel a waitable timer */
1651 @REQ(cancel_timer)
1652 obj_handle_t handle; /* handle to the timer */
1653 @REPLY
1654 int signaled; /* was the timer signaled before this calltime ? */
1655 @END
1657 /* Get information on a waitable timer */
1658 @REQ(get_timer_info)
1659 obj_handle_t handle; /* handle to the timer */
1660 @REPLY
1661 abs_time_t when; /* absolute time when the timer next expires */
1662 int signaled; /* is the timer signaled? */
1663 @END
1666 /* Retrieve the current context of a thread */
1667 @REQ(get_thread_context)
1668 obj_handle_t handle; /* thread handle */
1669 unsigned int flags; /* context flags */
1670 int suspend; /* if getting context during suspend */
1671 @REPLY
1672 int self; /* was it a handle to the current thread? */
1673 VARARG(context,context); /* thread context */
1674 @END
1677 /* Set the current context of a thread */
1678 @REQ(set_thread_context)
1679 obj_handle_t handle; /* thread handle */
1680 unsigned int flags; /* context flags */
1681 int suspend; /* if setting context during suspend */
1682 VARARG(context,context); /* thread context */
1683 @REPLY
1684 int self; /* was it a handle to the current thread? */
1685 @END
1688 /* Fetch a selector entry for a thread */
1689 @REQ(get_selector_entry)
1690 obj_handle_t handle; /* thread handle */
1691 int entry; /* LDT entry */
1692 @REPLY
1693 unsigned int base; /* selector base */
1694 unsigned int limit; /* selector limit */
1695 unsigned char flags; /* selector flags */
1696 @END
1699 /* Add an atom */
1700 @REQ(add_atom)
1701 obj_handle_t table; /* which table to add atom to */
1702 VARARG(name,unicode_str); /* atom name */
1703 @REPLY
1704 atom_t atom; /* resulting atom */
1705 @END
1708 /* Delete an atom */
1709 @REQ(delete_atom)
1710 obj_handle_t table; /* which table to delete atom from */
1711 atom_t atom; /* atom handle */
1712 @END
1715 /* Find an atom */
1716 @REQ(find_atom)
1717 obj_handle_t table; /* which table to find atom from */
1718 VARARG(name,unicode_str); /* atom name */
1719 @REPLY
1720 atom_t atom; /* atom handle */
1721 @END
1724 /* Get information about an atom */
1725 @REQ(get_atom_information)
1726 obj_handle_t table; /* which table to find atom from */
1727 atom_t atom; /* atom handle */
1728 @REPLY
1729 int count; /* atom lock count */
1730 int pinned; /* whether the atom has been pinned */
1731 data_size_t total; /* actual length of atom name */
1732 VARARG(name,unicode_str); /* atom name */
1733 @END
1736 /* Set information about an atom */
1737 @REQ(set_atom_information)
1738 obj_handle_t table; /* which table to find atom from */
1739 atom_t atom; /* atom handle */
1740 int pinned; /* whether to bump atom information */
1741 @END
1744 /* Empty an atom table */
1745 @REQ(empty_atom_table)
1746 obj_handle_t table; /* which table to find atom from */
1747 int if_pinned; /* whether to delete pinned atoms */
1748 @END
1751 /* Init an atom table */
1752 @REQ(init_atom_table)
1753 int entries; /* number of entries (only for local) */
1754 @REPLY
1755 obj_handle_t table; /* handle to the atom table */
1756 @END
1759 /* Get the message queue of the current thread */
1760 @REQ(get_msg_queue)
1761 @REPLY
1762 obj_handle_t handle; /* handle to the queue */
1763 @END
1766 /* Set the current message queue wakeup mask */
1767 @REQ(set_queue_mask)
1768 unsigned int wake_mask; /* wakeup bits mask */
1769 unsigned int changed_mask; /* changed bits mask */
1770 int skip_wait; /* will we skip waiting if signaled? */
1771 @REPLY
1772 unsigned int wake_bits; /* current wake bits */
1773 unsigned int changed_bits; /* current changed bits */
1774 @END
1777 /* Get the current message queue status */
1778 @REQ(get_queue_status)
1779 int clear; /* should we clear the change bits? */
1780 @REPLY
1781 unsigned int wake_bits; /* wake bits */
1782 unsigned int changed_bits; /* changed bits since last time */
1783 @END
1786 /* Retrieve the process idle event */
1787 @REQ(get_process_idle_event)
1788 obj_handle_t handle; /* process handle */
1789 @REPLY
1790 obj_handle_t event; /* handle to idle event */
1791 @END
1794 /* Send a message to a thread queue */
1795 @REQ(send_message)
1796 thread_id_t id; /* thread id */
1797 int type; /* message type (see below) */
1798 int flags; /* message flags (see below) */
1799 user_handle_t win; /* window handle */
1800 unsigned int msg; /* message code */
1801 unsigned long wparam; /* parameters */
1802 unsigned long lparam; /* parameters */
1803 int timeout; /* timeout for reply */
1804 VARARG(data,message_data); /* message data for sent messages */
1805 @END
1807 @REQ(post_quit_message)
1808 int exit_code; /* exit code to return */
1809 @END
1811 enum message_type
1813 MSG_ASCII, /* Ascii message (from SendMessageA) */
1814 MSG_UNICODE, /* Unicode message (from SendMessageW) */
1815 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
1816 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
1817 MSG_CALLBACK_RESULT,/* result of a callback message */
1818 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
1819 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
1820 MSG_HARDWARE, /* hardware message */
1821 MSG_WINEVENT /* winevent message */
1823 #define SEND_MSG_ABORT_IF_HUNG 0x01
1826 /* Send a hardware message to a thread queue */
1827 @REQ(send_hardware_message)
1828 thread_id_t id; /* thread id */
1829 user_handle_t win; /* window handle */
1830 unsigned int msg; /* message code */
1831 unsigned int time; /* message time */
1832 unsigned long wparam; /* parameters */
1833 unsigned long lparam; /* parameters */
1834 unsigned long info; /* extra info */
1835 int x; /* x position */
1836 int y; /* y position */
1837 @END
1840 /* Get a message from the current queue */
1841 @REQ(get_message)
1842 unsigned int flags; /* PM_* flags */
1843 user_handle_t get_win; /* window handle to get */
1844 unsigned int get_first; /* first message code to get */
1845 unsigned int get_last; /* last message code to get */
1846 unsigned int hw_id; /* id of the previous hardware message (or 0) */
1847 @REPLY
1848 user_handle_t win; /* window handle */
1849 int type; /* message type */
1850 unsigned int msg; /* message code */
1851 unsigned long wparam; /* parameters */
1852 unsigned long lparam; /* parameters */
1853 unsigned long info; /* extra info */
1854 int x; /* x position */
1855 int y; /* y position */
1856 unsigned int time; /* message time */
1857 unsigned int hw_id; /* id if hardware message */
1858 unsigned int active_hooks; /* active hooks bitmap */
1859 data_size_t total; /* total size of extra data */
1860 VARARG(data,message_data); /* message data for sent messages */
1861 @END
1864 /* Reply to a sent message */
1865 @REQ(reply_message)
1866 unsigned int result; /* message result */
1867 int remove; /* should we remove the message? */
1868 VARARG(data,bytes); /* message data for sent messages */
1869 @END
1872 /* Accept the current hardware message */
1873 @REQ(accept_hardware_message)
1874 unsigned int hw_id; /* id of the hardware message */
1875 int remove; /* should we remove the message? */
1876 user_handle_t new_win; /* new destination window for current message */
1877 @END
1880 /* Retrieve the reply for the last message sent */
1881 @REQ(get_message_reply)
1882 int cancel; /* cancel message if not ready? */
1883 @REPLY
1884 unsigned int result; /* message result */
1885 VARARG(data,bytes); /* message data for sent messages */
1886 @END
1889 /* Set a window timer */
1890 @REQ(set_win_timer)
1891 user_handle_t win; /* window handle */
1892 unsigned int msg; /* message to post */
1893 unsigned int rate; /* timer rate in ms */
1894 unsigned long id; /* timer id */
1895 unsigned long lparam; /* message lparam (callback proc) */
1896 @REPLY
1897 unsigned long id; /* timer id */
1898 @END
1901 /* Kill a window timer */
1902 @REQ(kill_win_timer)
1903 user_handle_t win; /* window handle */
1904 unsigned int msg; /* message to post */
1905 unsigned long id; /* timer id */
1906 @END
1909 /* Retrieve info about a serial port */
1910 @REQ(get_serial_info)
1911 obj_handle_t handle; /* handle to comm port */
1912 @REPLY
1913 unsigned int readinterval;
1914 unsigned int readconst;
1915 unsigned int readmult;
1916 unsigned int writeconst;
1917 unsigned int writemult;
1918 unsigned int eventmask;
1919 @END
1922 /* Set info about a serial port */
1923 @REQ(set_serial_info)
1924 obj_handle_t handle; /* handle to comm port */
1925 int flags; /* bitmask to set values (see below) */
1926 unsigned int readinterval;
1927 unsigned int readconst;
1928 unsigned int readmult;
1929 unsigned int writeconst;
1930 unsigned int writemult;
1931 unsigned int eventmask;
1932 @END
1933 #define SERIALINFO_SET_TIMEOUTS 0x01
1934 #define SERIALINFO_SET_MASK 0x02
1937 /* Create an async I/O */
1938 @REQ(register_async)
1939 obj_handle_t handle; /* handle to comm port, socket or file */
1940 int type; /* type of queue to look after */
1941 void* io_apc; /* APC routine to queue upon end of async */
1942 void* io_sb; /* I/O status block (unique across all async on this handle) */
1943 void* io_user; /* data to pass back to caller */
1944 int count; /* count - usually # of bytes to be read/written */
1945 @END
1946 #define ASYNC_TYPE_READ 0x01
1947 #define ASYNC_TYPE_WRITE 0x02
1948 #define ASYNC_TYPE_WAIT 0x03
1951 /* Cancel all async op on a fd */
1952 @REQ(cancel_async)
1953 obj_handle_t handle; /* handle to comm port, socket or file */
1954 @END
1957 /* Create a named pipe */
1958 @REQ(create_named_pipe)
1959 unsigned int access;
1960 unsigned int attributes; /* object attributes */
1961 obj_handle_t rootdir; /* root directory */
1962 unsigned int options;
1963 unsigned int flags;
1964 unsigned int maxinstances;
1965 unsigned int outsize;
1966 unsigned int insize;
1967 unsigned int timeout;
1968 VARARG(name,unicode_str); /* pipe name */
1969 @REPLY
1970 obj_handle_t handle; /* handle to the pipe */
1971 @END
1973 /* flags in create_named_pipe and get_named_pipe_info */
1974 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
1975 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
1976 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
1977 #define NAMED_PIPE_SERVER_END 0x8000
1979 /* Open an existing named pipe */
1980 @REQ(open_named_pipe)
1981 unsigned int access;
1982 unsigned int attributes; /* object attributes */
1983 obj_handle_t rootdir; /* root directory */
1984 unsigned int flags; /* file flags */
1985 VARARG(name,unicode_str); /* pipe name */
1986 @REPLY
1987 obj_handle_t handle; /* handle to the pipe */
1988 @END
1991 /* Connect to a named pipe */
1992 @REQ(connect_named_pipe)
1993 obj_handle_t handle;
1994 obj_handle_t event;
1995 void* func;
1996 @END
1999 /* Wait for a named pipe */
2000 @REQ(wait_named_pipe)
2001 obj_handle_t handle;
2002 unsigned int timeout;
2003 obj_handle_t event;
2004 void* func;
2005 VARARG(name,unicode_str); /* pipe name */
2006 @END
2009 /* Disconnect a named pipe */
2010 @REQ(disconnect_named_pipe)
2011 obj_handle_t handle;
2012 @END
2015 @REQ(get_named_pipe_info)
2016 obj_handle_t handle;
2017 @REPLY
2018 unsigned int flags;
2019 unsigned int maxinstances;
2020 unsigned int instances;
2021 unsigned int outsize;
2022 unsigned int insize;
2023 @END
2026 /* Create a window */
2027 @REQ(create_window)
2028 user_handle_t parent; /* parent window */
2029 user_handle_t owner; /* owner window */
2030 atom_t atom; /* class atom */
2031 void* instance; /* module instance */
2032 @REPLY
2033 user_handle_t handle; /* created window */
2034 user_handle_t parent; /* full handle of parent */
2035 user_handle_t owner; /* full handle of owner */
2036 int extra; /* number of extra bytes */
2037 void* class_ptr; /* pointer to class in client address space */
2038 @END
2041 /* Destroy a window */
2042 @REQ(destroy_window)
2043 user_handle_t handle; /* handle to the window */
2044 @END
2047 /* Retrieve the desktop window for the current thread */
2048 @REQ(get_desktop_window)
2049 int force; /* force creation if it doesn't exist */
2050 @REPLY
2051 user_handle_t handle; /* handle to the desktop window */
2052 @END
2055 /* Set a window owner */
2056 @REQ(set_window_owner)
2057 user_handle_t handle; /* handle to the window */
2058 user_handle_t owner; /* new owner */
2059 @REPLY
2060 user_handle_t full_owner; /* full handle of new owner */
2061 user_handle_t prev_owner; /* full handle of previous owner */
2062 @END
2065 /* Get information from a window handle */
2066 @REQ(get_window_info)
2067 user_handle_t handle; /* handle to the window */
2068 @REPLY
2069 user_handle_t full_handle; /* full 32-bit handle */
2070 user_handle_t last_active; /* last active popup */
2071 process_id_t pid; /* process owning the window */
2072 thread_id_t tid; /* thread owning the window */
2073 atom_t atom; /* class atom */
2074 int is_unicode; /* ANSI or unicode */
2075 @END
2078 /* Set some information in a window */
2079 @REQ(set_window_info)
2080 unsigned int flags; /* flags for fields to set (see below) */
2081 user_handle_t handle; /* handle to the window */
2082 unsigned int style; /* window style */
2083 unsigned int ex_style; /* window extended style */
2084 unsigned int id; /* window id */
2085 int is_unicode; /* ANSI or unicode */
2086 void* instance; /* creator instance */
2087 unsigned long user_data; /* user-specific data */
2088 int extra_offset; /* offset to set in extra bytes */
2089 data_size_t extra_size; /* size to set in extra bytes */
2090 unsigned long extra_value; /* value to set in extra bytes */
2091 @REPLY
2092 unsigned int old_style; /* old window style */
2093 unsigned int old_ex_style; /* old window extended style */
2094 unsigned int old_id; /* old window id */
2095 void* old_instance; /* old creator instance */
2096 unsigned long old_user_data; /* old user-specific data */
2097 unsigned long old_extra_value; /* old value in extra bytes */
2098 @END
2099 #define SET_WIN_STYLE 0x01
2100 #define SET_WIN_EXSTYLE 0x02
2101 #define SET_WIN_ID 0x04
2102 #define SET_WIN_INSTANCE 0x08
2103 #define SET_WIN_USERDATA 0x10
2104 #define SET_WIN_EXTRA 0x20
2105 #define SET_WIN_UNICODE 0x40
2108 /* Set the parent of a window */
2109 @REQ(set_parent)
2110 user_handle_t handle; /* handle to the window */
2111 user_handle_t parent; /* handle to the parent */
2112 @REPLY
2113 user_handle_t old_parent; /* old parent window */
2114 user_handle_t full_parent; /* full handle of new parent */
2115 @END
2118 /* Get a list of the window parents, up to the root of the tree */
2119 @REQ(get_window_parents)
2120 user_handle_t handle; /* handle to the window */
2121 @REPLY
2122 int count; /* total count of parents */
2123 VARARG(parents,user_handles); /* parent handles */
2124 @END
2127 /* Get a list of the window children */
2128 @REQ(get_window_children)
2129 user_handle_t parent; /* parent window */
2130 atom_t atom; /* class atom for the listed children */
2131 thread_id_t tid; /* thread owning the listed children */
2132 @REPLY
2133 int count; /* total count of children */
2134 VARARG(children,user_handles); /* children handles */
2135 @END
2138 /* Get a list of the window children that contain a given point */
2139 @REQ(get_window_children_from_point)
2140 user_handle_t parent; /* parent window */
2141 int x; /* point in parent coordinates */
2142 int y;
2143 @REPLY
2144 int count; /* total count of children */
2145 VARARG(children,user_handles); /* children handles */
2146 @END
2149 /* Get window tree information from a window handle */
2150 @REQ(get_window_tree)
2151 user_handle_t handle; /* handle to the window */
2152 @REPLY
2153 user_handle_t parent; /* parent window */
2154 user_handle_t owner; /* owner window */
2155 user_handle_t next_sibling; /* next sibling in Z-order */
2156 user_handle_t prev_sibling; /* prev sibling in Z-order */
2157 user_handle_t first_sibling; /* first sibling in Z-order */
2158 user_handle_t last_sibling; /* last sibling in Z-order */
2159 user_handle_t first_child; /* first child */
2160 user_handle_t last_child; /* last child */
2161 @END
2163 /* Set the position and Z order of a window */
2164 @REQ(set_window_pos)
2165 unsigned int flags; /* SWP_* flags */
2166 user_handle_t handle; /* handle to the window */
2167 user_handle_t previous; /* previous window in Z order */
2168 rectangle_t window; /* window rectangle */
2169 rectangle_t client; /* client rectangle */
2170 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE */
2171 @REPLY
2172 unsigned int new_style; /* new window style */
2173 @END
2176 /* Get the window and client rectangles of a window */
2177 @REQ(get_window_rectangles)
2178 user_handle_t handle; /* handle to the window */
2179 @REPLY
2180 rectangle_t window; /* window rectangle */
2181 rectangle_t visible; /* visible part of the window rectangle */
2182 rectangle_t client; /* client rectangle */
2183 @END
2186 /* Get the window text */
2187 @REQ(get_window_text)
2188 user_handle_t handle; /* handle to the window */
2189 @REPLY
2190 VARARG(text,unicode_str); /* window text */
2191 @END
2194 /* Set the window text */
2195 @REQ(set_window_text)
2196 user_handle_t handle; /* handle to the window */
2197 VARARG(text,unicode_str); /* window text */
2198 @END
2201 /* Get the coordinates offset between two windows */
2202 @REQ(get_windows_offset)
2203 user_handle_t from; /* handle to the first window */
2204 user_handle_t to; /* handle to the second window */
2205 @REPLY
2206 int x; /* x coordinate offset */
2207 int y; /* y coordinate offset */
2208 @END
2211 /* Get the visible region of a window */
2212 @REQ(get_visible_region)
2213 user_handle_t window; /* handle to the window */
2214 unsigned int flags; /* DCX flags */
2215 @REPLY
2216 user_handle_t top_win; /* top window to clip against */
2217 rectangle_t top_rect; /* top window visible rect with screen coords */
2218 rectangle_t win_rect; /* window rect in screen coords */
2219 data_size_t total_size; /* total size of the resulting region */
2220 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2221 @END
2224 /* Get the window region */
2225 @REQ(get_window_region)
2226 user_handle_t window; /* handle to the window */
2227 @REPLY
2228 data_size_t total_size; /* total size of the resulting region */
2229 VARARG(region,rectangles); /* list of rectangles for the region */
2230 @END
2233 /* Set the window region */
2234 @REQ(set_window_region)
2235 user_handle_t window; /* handle to the window */
2236 VARARG(region,rectangles); /* list of rectangles for the region */
2237 @END
2240 /* Get the window update region */
2241 @REQ(get_update_region)
2242 user_handle_t window; /* handle to the window */
2243 user_handle_t from_child; /* child to start searching from */
2244 unsigned int flags; /* update flags (see below) */
2245 @REPLY
2246 user_handle_t child; /* child to repaint (or window itself) */
2247 unsigned int flags; /* resulting update flags (see below) */
2248 data_size_t total_size; /* total size of the resulting region */
2249 VARARG(region,rectangles); /* list of rectangles for the region */
2250 @END
2251 #define UPDATE_NONCLIENT 0x01 /* get region for repainting non-client area */
2252 #define UPDATE_ERASE 0x02 /* get region for erasing client area */
2253 #define UPDATE_PAINT 0x04 /* get region for painting client area */
2254 #define UPDATE_INTERNALPAINT 0x08 /* get region if internal paint is pending */
2255 #define UPDATE_ALLCHILDREN 0x10 /* force repaint of all children */
2256 #define UPDATE_NOCHILDREN 0x20 /* don't try to repaint any children */
2257 #define UPDATE_NOREGION 0x40 /* don't return a region, only the flags */
2260 /* Update the z order of a window so that a given rectangle is fully visible */
2261 @REQ(update_window_zorder)
2262 user_handle_t window; /* handle to the window */
2263 rectangle_t rect; /* rectangle that must be visible */
2264 @END
2267 /* Mark parts of a window as needing a redraw */
2268 @REQ(redraw_window)
2269 user_handle_t window; /* handle to the window */
2270 unsigned int flags; /* RDW_* flags */
2271 VARARG(region,rectangles); /* list of rectangles for the region */
2272 @END
2275 /* Set a window property */
2276 @REQ(set_window_property)
2277 user_handle_t window; /* handle to the window */
2278 atom_t atom; /* property atom (if no name specified) */
2279 obj_handle_t handle; /* handle to store */
2280 VARARG(name,unicode_str); /* property name */
2281 @END
2284 /* Remove a window property */
2285 @REQ(remove_window_property)
2286 user_handle_t window; /* handle to the window */
2287 atom_t atom; /* property atom (if no name specified) */
2288 VARARG(name,unicode_str); /* property name */
2289 @REPLY
2290 obj_handle_t handle; /* handle stored in property */
2291 @END
2294 /* Get a window property */
2295 @REQ(get_window_property)
2296 user_handle_t window; /* handle to the window */
2297 atom_t atom; /* property atom (if no name specified) */
2298 VARARG(name,unicode_str); /* property name */
2299 @REPLY
2300 obj_handle_t handle; /* handle stored in property */
2301 @END
2304 /* Get the list of properties of a window */
2305 @REQ(get_window_properties)
2306 user_handle_t window; /* handle to the window */
2307 @REPLY
2308 int total; /* total number of properties */
2309 VARARG(props,properties); /* list of properties */
2310 @END
2313 /* Create a window station */
2314 @REQ(create_winstation)
2315 unsigned int flags; /* window station flags */
2316 unsigned int access; /* wanted access rights */
2317 unsigned int attributes; /* object attributes */
2318 VARARG(name,unicode_str); /* object name */
2319 @REPLY
2320 obj_handle_t handle; /* handle to the window station */
2321 @END
2324 /* Open a handle to a window station */
2325 @REQ(open_winstation)
2326 unsigned int access; /* wanted access rights */
2327 unsigned int attributes; /* object attributes */
2328 VARARG(name,unicode_str); /* object name */
2329 @REPLY
2330 obj_handle_t handle; /* handle to the window station */
2331 @END
2334 /* Close a window station */
2335 @REQ(close_winstation)
2336 obj_handle_t handle; /* handle to the window station */
2337 @END
2340 /* Get the process current window station */
2341 @REQ(get_process_winstation)
2342 @REPLY
2343 obj_handle_t handle; /* handle to the window station */
2344 @END
2347 /* Set the process current window station */
2348 @REQ(set_process_winstation)
2349 obj_handle_t handle; /* handle to the window station */
2350 @END
2353 /* Create a desktop */
2354 @REQ(create_desktop)
2355 unsigned int flags; /* desktop flags */
2356 unsigned int access; /* wanted access rights */
2357 unsigned int attributes; /* object attributes */
2358 VARARG(name,unicode_str); /* object name */
2359 @REPLY
2360 obj_handle_t handle; /* handle to the desktop */
2361 @END
2364 /* Open a handle to a desktop */
2365 @REQ(open_desktop)
2366 unsigned int flags; /* desktop flags */
2367 unsigned int access; /* wanted access rights */
2368 unsigned int attributes; /* object attributes */
2369 VARARG(name,unicode_str); /* object name */
2370 @REPLY
2371 obj_handle_t handle; /* handle to the desktop */
2372 @END
2375 /* Close a desktop */
2376 @REQ(close_desktop)
2377 obj_handle_t handle; /* handle to the desktop */
2378 @END
2381 /* Get the thread current desktop */
2382 @REQ(get_thread_desktop)
2383 thread_id_t tid; /* thread id */
2384 @REPLY
2385 obj_handle_t handle; /* handle to the desktop */
2386 @END
2389 /* Set the thread current desktop */
2390 @REQ(set_thread_desktop)
2391 obj_handle_t handle; /* handle to the desktop */
2392 @END
2395 /* Get/set information about a user object (window station or desktop) */
2396 @REQ(set_user_object_info)
2397 obj_handle_t handle; /* handle to the object */
2398 unsigned int flags; /* information to set */
2399 unsigned int obj_flags; /* new object flags */
2400 @REPLY
2401 int is_desktop; /* is object a desktop? */
2402 unsigned int old_obj_flags; /* old object flags */
2403 VARARG(name,unicode_str); /* object name */
2404 @END
2405 #define SET_USER_OBJECT_FLAGS 1
2408 /* Attach (or detach) thread inputs */
2409 @REQ(attach_thread_input)
2410 thread_id_t tid_from; /* thread to be attached */
2411 thread_id_t tid_to; /* thread to which tid_from should be attached */
2412 int attach; /* is it an attach? */
2413 @END
2416 /* Get input data for a given thread */
2417 @REQ(get_thread_input)
2418 thread_id_t tid; /* id of thread */
2419 @REPLY
2420 user_handle_t focus; /* handle to the focus window */
2421 user_handle_t capture; /* handle to the capture window */
2422 user_handle_t active; /* handle to the active window */
2423 user_handle_t foreground; /* handle to the global foreground window */
2424 user_handle_t menu_owner; /* handle to the menu owner */
2425 user_handle_t move_size; /* handle to the moving/resizing window */
2426 user_handle_t caret; /* handle to the caret window */
2427 rectangle_t rect; /* caret rectangle */
2428 @END
2431 /* Get the time of the last input event */
2432 @REQ(get_last_input_time)
2433 @REPLY
2434 unsigned int time;
2435 @END
2438 /* Retrieve queue keyboard state for a given thread */
2439 @REQ(get_key_state)
2440 thread_id_t tid; /* id of thread */
2441 int key; /* optional key code or -1 */
2442 @REPLY
2443 unsigned char state; /* state of specified key */
2444 VARARG(keystate,bytes); /* state array for all the keys */
2445 @END
2447 /* Set queue keyboard state for a given thread */
2448 @REQ(set_key_state)
2449 thread_id_t tid; /* id of thread */
2450 VARARG(keystate,bytes); /* state array for all the keys */
2451 @END
2453 /* Set the system foreground window */
2454 @REQ(set_foreground_window)
2455 user_handle_t handle; /* handle to the foreground window */
2456 @REPLY
2457 user_handle_t previous; /* handle to the previous foreground window */
2458 int send_msg_old; /* whether we have to send a msg to the old window */
2459 int send_msg_new; /* whether we have to send a msg to the new window */
2460 @END
2462 /* Set the current thread focus window */
2463 @REQ(set_focus_window)
2464 user_handle_t handle; /* handle to the focus window */
2465 @REPLY
2466 user_handle_t previous; /* handle to the previous focus window */
2467 @END
2469 /* Set the current thread active window */
2470 @REQ(set_active_window)
2471 user_handle_t handle; /* handle to the active window */
2472 @REPLY
2473 user_handle_t previous; /* handle to the previous active window */
2474 @END
2476 /* Set the current thread capture window */
2477 @REQ(set_capture_window)
2478 user_handle_t handle; /* handle to the capture window */
2479 unsigned int flags; /* capture flags (see below) */
2480 @REPLY
2481 user_handle_t previous; /* handle to the previous capture window */
2482 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2483 @END
2484 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2485 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2488 /* Set the current thread caret window */
2489 @REQ(set_caret_window)
2490 user_handle_t handle; /* handle to the caret window */
2491 int width; /* caret width */
2492 int height; /* caret height */
2493 @REPLY
2494 user_handle_t previous; /* handle to the previous caret window */
2495 rectangle_t old_rect; /* previous caret rectangle */
2496 int old_hide; /* previous hide count */
2497 int old_state; /* previous caret state (1=on, 0=off) */
2498 @END
2501 /* Set the current thread caret information */
2502 @REQ(set_caret_info)
2503 unsigned int flags; /* caret flags (see below) */
2504 user_handle_t handle; /* handle to the caret window */
2505 int x; /* caret x position */
2506 int y; /* caret y position */
2507 int hide; /* increment for hide count (can be negative to show it) */
2508 int state; /* caret state (1=on, 0=off, -1=toggle current state) */
2509 @REPLY
2510 user_handle_t full_handle; /* handle to the current caret window */
2511 rectangle_t old_rect; /* previous caret rectangle */
2512 int old_hide; /* previous hide count */
2513 int old_state; /* previous caret state (1=on, 0=off) */
2514 @END
2515 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2516 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2517 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2520 /* Set a window hook */
2521 @REQ(set_hook)
2522 int id; /* id of the hook */
2523 process_id_t pid; /* id of process to set the hook into */
2524 thread_id_t tid; /* id of thread to set the hook into */
2525 int event_min;
2526 int event_max;
2527 int flags;
2528 void* proc; /* hook procedure */
2529 int unicode; /* is it a unicode hook? */
2530 VARARG(module,unicode_str); /* module name */
2531 @REPLY
2532 user_handle_t handle; /* handle to the hook */
2533 unsigned int active_hooks; /* active hooks bitmap */
2534 @END
2537 /* Remove a window hook */
2538 @REQ(remove_hook)
2539 user_handle_t handle; /* handle to the hook */
2540 int id; /* id of the hook if handle is 0 */
2541 void* proc; /* hook procedure if handle is 0 */
2542 @REPLY
2543 unsigned int active_hooks; /* active hooks bitmap */
2544 @END
2547 /* Start calling a hook chain */
2548 @REQ(start_hook_chain)
2549 int id; /* id of the hook */
2550 int event; /* signalled event */
2551 user_handle_t window; /* handle to the event window */
2552 int object_id; /* object id for out of context winevent */
2553 int child_id; /* child id for out of context winevent */
2554 @REPLY
2555 user_handle_t handle; /* handle to the next hook */
2556 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2557 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2558 void* proc; /* hook procedure */
2559 int unicode; /* is it a unicode hook? */
2560 unsigned int active_hooks; /* active hooks bitmap */
2561 VARARG(module,unicode_str); /* module name */
2562 @END
2565 /* Finished calling a hook chain */
2566 @REQ(finish_hook_chain)
2567 int id; /* id of the hook */
2568 @END
2571 /* Get the hook information */
2572 @REQ(get_hook_info)
2573 user_handle_t handle; /* handle to the current hook */
2574 int get_next; /* do we want info about current or next hook? */
2575 int event; /* signalled event */
2576 user_handle_t window; /* handle to the event window */
2577 int object_id; /* object id for out of context winevent */
2578 int child_id; /* child id for out of context winevent */
2579 @REPLY
2580 user_handle_t handle; /* handle to the hook */
2581 int id; /* id of the hook */
2582 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2583 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2584 void* proc; /* hook procedure */
2585 int unicode; /* is it a unicode hook? */
2586 VARARG(module,unicode_str); /* module name */
2587 @END
2590 /* Create a window class */
2591 @REQ(create_class)
2592 int local; /* is it a local class? */
2593 atom_t atom; /* class atom */
2594 unsigned int style; /* class style */
2595 void* instance; /* module instance */
2596 int extra; /* number of extra class bytes */
2597 int win_extra; /* number of window extra bytes */
2598 void* client_ptr; /* pointer to class in client address space */
2599 @END
2602 /* Destroy a window class */
2603 @REQ(destroy_class)
2604 atom_t atom; /* class atom */
2605 void* instance; /* module instance */
2606 @REPLY
2607 void* client_ptr; /* pointer to class in client address space */
2608 @END
2611 /* Set some information in a class */
2612 @REQ(set_class_info)
2613 user_handle_t window; /* handle to the window */
2614 unsigned int flags; /* flags for info to set (see below) */
2615 atom_t atom; /* class atom */
2616 unsigned int style; /* class style */
2617 int win_extra; /* number of window extra bytes */
2618 void* instance; /* module instance */
2619 int extra_offset; /* offset to set in extra bytes */
2620 data_size_t extra_size; /* size to set in extra bytes */
2621 unsigned long extra_value; /* value to set in extra bytes */
2622 @REPLY
2623 atom_t old_atom; /* previous class atom */
2624 unsigned int old_style; /* previous class style */
2625 int old_extra; /* previous number of class extra bytes */
2626 int old_win_extra; /* previous number of window extra bytes */
2627 void* old_instance; /* previous module instance */
2628 unsigned long old_extra_value; /* old value in extra bytes */
2629 @END
2630 #define SET_CLASS_ATOM 0x0001
2631 #define SET_CLASS_STYLE 0x0002
2632 #define SET_CLASS_WINEXTRA 0x0004
2633 #define SET_CLASS_INSTANCE 0x0008
2634 #define SET_CLASS_EXTRA 0x0010
2637 /* Set/get clipboard information */
2638 @REQ(set_clipboard_info)
2639 unsigned int flags; /* flags for fields to set (see below) */
2640 user_handle_t clipboard; /* clipboard window */
2641 user_handle_t owner; /* clipboard owner */
2642 user_handle_t viewer; /* first clipboard viewer */
2643 unsigned int seqno; /* change sequence number */
2644 @REPLY
2645 unsigned int flags; /* status flags (see below) */
2646 user_handle_t old_clipboard; /* old clipboard window */
2647 user_handle_t old_owner; /* old clipboard owner */
2648 user_handle_t old_viewer; /* old clipboard viewer */
2649 unsigned int seqno; /* current sequence number */
2650 @END
2652 #define SET_CB_OPEN 0x001
2653 #define SET_CB_OWNER 0x002
2654 #define SET_CB_VIEWER 0x004
2655 #define SET_CB_SEQNO 0x008
2656 #define SET_CB_RELOWNER 0x010
2657 #define SET_CB_CLOSE 0x020
2658 #define CB_OPEN 0x040
2659 #define CB_OWNER 0x080
2660 #define CB_PROCESS 0x100
2663 /* Open a security token */
2664 @REQ(open_token)
2665 obj_handle_t handle; /* handle to the thread or process */
2666 unsigned int access; /* access rights to the new token */
2667 unsigned int attributes;/* object attributes */
2668 unsigned int flags; /* flags (see below) */
2669 @REPLY
2670 obj_handle_t token; /* handle to the token */
2671 @END
2672 #define OPEN_TOKEN_THREAD 1
2673 #define OPEN_TOKEN_AS_SELF 2
2676 /* Set/get the global windows */
2677 @REQ(set_global_windows)
2678 unsigned int flags; /* flags for fields to set (see below) */
2679 user_handle_t shell_window; /* handle to the new shell window */
2680 user_handle_t shell_listview; /* handle to the new shell listview window */
2681 user_handle_t progman_window; /* handle to the new program manager window */
2682 user_handle_t taskman_window; /* handle to the new task manager window */
2683 @REPLY
2684 user_handle_t old_shell_window; /* handle to the shell window */
2685 user_handle_t old_shell_listview; /* handle to the shell listview window */
2686 user_handle_t old_progman_window; /* handle to the new program manager window */
2687 user_handle_t old_taskman_window; /* handle to the new task manager window */
2688 @END
2689 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
2690 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
2691 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
2693 /* Adjust the privileges held by a token */
2694 @REQ(adjust_token_privileges)
2695 obj_handle_t handle; /* handle to the token */
2696 int disable_all; /* disable all privileges? */
2697 int get_modified_state; /* get modified privileges? */
2698 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
2699 @REPLY
2700 unsigned int len; /* total length in bytes required to store token privileges */
2701 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
2702 @END
2704 /* Retrieves the set of privileges held by or available to a token */
2705 @REQ(get_token_privileges)
2706 obj_handle_t handle; /* handle to the token */
2707 @REPLY
2708 unsigned int len; /* total length in bytes required to store token privileges */
2709 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2710 @END
2712 /* Check the token has the required privileges */
2713 @REQ(check_token_privileges)
2714 obj_handle_t handle; /* handle to the token */
2715 int all_required; /* are all the privileges required for the check to succeed? */
2716 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
2717 @REPLY
2718 int has_privileges; /* does the token have the required privileges? */
2719 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2720 @END
2722 @REQ(duplicate_token)
2723 obj_handle_t handle; /* handle to the token to duplicate */
2724 unsigned int access; /* access rights to the new token */
2725 unsigned int attributes; /* object attributes */
2726 int primary; /* is the new token to be a primary one? */
2727 int impersonation_level; /* impersonation level of the new token */
2728 @REPLY
2729 obj_handle_t new_handle; /* duplicated handle */
2730 @END
2732 @REQ(access_check)
2733 obj_handle_t handle; /* handle to the token */
2734 unsigned int desired_access; /* desired access to the object */
2735 unsigned int mapping_read; /* mapping from generic read to specific rights */
2736 unsigned int mapping_write; /* mapping from generic write to specific rights */
2737 unsigned int mapping_execute; /* mapping from generic execute to specific rights */
2738 unsigned int mapping_all; /* mapping from generic all to specific rights */
2739 VARARG(sd,security_descriptor); /* security descriptor to check */
2740 @REPLY
2741 unsigned int access_granted; /* access rights actually granted */
2742 unsigned int access_status; /* was access granted? */
2743 unsigned int privileges_len; /* length needed to store privileges */
2744 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
2745 @END
2747 @REQ(get_token_user)
2748 obj_handle_t handle; /* handle to the token */
2749 @REPLY
2750 data_size_t user_len; /* length needed to store user */
2751 VARARG(user,SID); /* sid of the user the token represents */
2752 @END
2754 @REQ(get_token_groups)
2755 obj_handle_t handle; /* handle to the token */
2756 @REPLY
2757 data_size_t user_len; /* length needed to store user */
2758 VARARG(user,token_groups); /* groups the token's user belongs to */
2759 @END
2761 @REQ(set_security_object)
2762 obj_handle_t handle; /* handle to the object */
2763 unsigned int security_info; /* which parts of security descriptor to set */
2764 VARARG(sd,security_descriptor); /* security descriptor to set */
2765 @END
2767 /* Create a mailslot */
2768 @REQ(create_mailslot)
2769 unsigned int access; /* wanted access rights */
2770 unsigned int attributes; /* object attributes */
2771 obj_handle_t rootdir; /* root directory */
2772 unsigned int max_msgsize;
2773 int read_timeout;
2774 VARARG(name,unicode_str); /* mailslot name */
2775 @REPLY
2776 obj_handle_t handle; /* handle to the mailslot */
2777 @END
2780 /* Open an existing mailslot */
2781 @REQ(open_mailslot)
2782 unsigned int access;
2783 unsigned int attributes; /* object attributes */
2784 obj_handle_t rootdir; /* root directory */
2785 unsigned int sharing; /* sharing mode */
2786 VARARG(name,unicode_str); /* mailslot name */
2787 @REPLY
2788 obj_handle_t handle; /* handle to the mailslot */
2789 @END
2792 /* Set mailslot information */
2793 @REQ(set_mailslot_info)
2794 obj_handle_t handle; /* handle to the mailslot */
2795 unsigned int flags;
2796 int read_timeout;
2797 @REPLY
2798 unsigned int max_msgsize;
2799 int read_timeout;
2800 @END
2801 #define MAILSLOT_SET_READ_TIMEOUT 1
2804 /* Create a directory object */
2805 @REQ(create_directory)
2806 unsigned int access; /* access flags */
2807 unsigned int attributes; /* object attributes */
2808 obj_handle_t rootdir; /* root directory */
2809 VARARG(directory_name,unicode_str); /* Directory name */
2810 @REPLY
2811 obj_handle_t handle; /* handle to the directory */
2812 @END
2815 /* Open a directory object */
2816 @REQ(open_directory)
2817 unsigned int access; /* access flags */
2818 unsigned int attributes; /* object attributes */
2819 obj_handle_t rootdir; /* root directory */
2820 VARARG(directory_name,unicode_str); /* Directory name */
2821 @REPLY
2822 obj_handle_t handle; /* handle to the directory */
2823 @END
2826 /* Create a symbolic link object */
2827 @REQ(create_symlink)
2828 unsigned int access; /* access flags */
2829 unsigned int attributes; /* object attributes */
2830 obj_handle_t rootdir; /* root directory */
2831 data_size_t name_len; /* length of the symlink name in bytes */
2832 VARARG(name,unicode_str,name_len); /* symlink name */
2833 VARARG(target_name,unicode_str); /* target name */
2834 @REPLY
2835 obj_handle_t handle; /* handle to the symlink */
2836 @END
2839 /* Open a symbolic link object */
2840 @REQ(open_symlink)
2841 unsigned int access; /* access flags */
2842 unsigned int attributes; /* object attributes */
2843 obj_handle_t rootdir; /* root directory */
2844 VARARG(name,unicode_str); /* symlink name */
2845 @REPLY
2846 obj_handle_t handle; /* handle to the symlink */
2847 @END
2850 /* Query a symbolic link object */
2851 @REQ(query_symlink)
2852 obj_handle_t handle; /* handle to the symlink */
2853 @REPLY
2854 VARARG(target_name,unicode_str); /* target name */
2855 @END
2858 /* Query basic object information */
2859 @REQ(get_object_info)
2860 obj_handle_t handle; /* handle to the object */
2861 @REPLY
2862 unsigned int access; /* granted access mask */
2863 unsigned int ref_count; /* object ref count */
2864 @END
2866 /* Query the impersonation level of an impersonation token */
2867 @REQ(get_token_impersonation_level)
2868 obj_handle_t handle; /* handle to the object */
2869 @REPLY
2870 int impersonation_level; /* impersonation level of the impersonation token */
2871 @END