server: Store data for hardware messages in the message extra data.
[wine/wine64.git] / server / protocol.def
blob5cf8b0403cdba4d196f0ff88ef028cb0e35013c2
1 /* -*- C -*-
3 * Wine server protocol definition
5 * Copyright (C) 2001 Alexandre Julliard
7 * This file is used by tools/make_requests to build the
8 * protocol structures in include/wine/server_protocol.h
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation; either
13 * version 2.1 of the License, or (at your option) any later version.
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
25 @HEADER /* start of C declarations */
27 #include <stdarg.h>
28 #include <stdlib.h>
29 #include <time.h>
31 #include <windef.h>
32 #include <winbase.h>
34 typedef unsigned int obj_handle_t;
35 typedef unsigned int user_handle_t;
36 typedef unsigned short atom_t;
37 typedef unsigned int process_id_t;
38 typedef unsigned int thread_id_t;
39 typedef unsigned int data_size_t;
40 typedef unsigned int ioctl_code_t;
41 typedef unsigned long lparam_t;
42 typedef unsigned __int64 apc_param_t;
43 typedef unsigned __int64 mem_size_t;
44 typedef unsigned __int64 file_pos_t;
46 struct request_header
48 int req; /* request code */
49 data_size_t request_size; /* request variable part size */
50 data_size_t reply_size; /* reply variable part maximum size */
53 struct reply_header
55 unsigned int error; /* error result */
56 data_size_t reply_size; /* reply variable part size */
59 /* placeholder structure for the maximum allowed request size */
60 /* this is used to construct the generic_request union */
61 struct request_max_size
63 int pad[16]; /* the max request size is 16 ints */
66 #define FIRST_USER_HANDLE 0x0020 /* first possible value for low word of user handle */
67 #define LAST_USER_HANDLE 0xffef /* last possible value for low word of user handle */
70 /* definitions of the event data depending on the event code */
71 struct debug_event_exception
73 EXCEPTION_RECORD record; /* exception record */
74 int first; /* first chance exception? */
76 struct debug_event_create_thread
78 obj_handle_t handle; /* handle to the new thread */
79 void *teb; /* thread teb (in debugged process address space) */
80 void *start; /* thread startup routine */
82 struct debug_event_create_process
84 obj_handle_t file; /* handle to the process exe file */
85 obj_handle_t process; /* handle to the new process */
86 obj_handle_t thread; /* handle to the new thread */
87 void *base; /* base of executable image */
88 int dbg_offset; /* offset of debug info in file */
89 int dbg_size; /* size of debug info */
90 void *teb; /* thread teb (in debugged process address space) */
91 void *start; /* thread startup routine */
92 void *name; /* image name (optional) */
93 int unicode; /* is it Unicode? */
95 struct debug_event_exit
97 int exit_code; /* thread or process exit code */
99 struct debug_event_load_dll
101 obj_handle_t handle; /* file handle for the dll */
102 void *base; /* base address of the dll */
103 int dbg_offset; /* offset of debug info in file */
104 int dbg_size; /* size of debug info */
105 void *name; /* image name (optional) */
106 int unicode; /* is it Unicode? */
108 struct debug_event_unload_dll
110 void *base; /* base address of the dll */
112 struct debug_event_output_string
114 void *string; /* string to display (in debugged process address space) */
115 int unicode; /* is it Unicode? */
116 int length; /* string length */
118 struct debug_event_rip_info
120 int error; /* ??? */
121 int type; /* ??? */
123 union debug_event_data
125 struct debug_event_exception exception;
126 struct debug_event_create_thread create_thread;
127 struct debug_event_create_process create_process;
128 struct debug_event_exit exit;
129 struct debug_event_load_dll load_dll;
130 struct debug_event_unload_dll unload_dll;
131 struct debug_event_output_string output_string;
132 struct debug_event_rip_info rip_info;
135 /* debug event data */
136 typedef struct
138 int code; /* event code */
139 union debug_event_data info; /* event information */
140 } debug_event_t;
142 /* structure used in sending an fd from client to server */
143 struct send_fd
145 thread_id_t tid; /* thread id */
146 int fd; /* file descriptor on client-side */
149 /* structure sent by the server on the wait fifo */
150 struct wake_up_reply
152 void *cookie; /* magic cookie that was passed in select_request */
153 int signaled; /* wait result */
156 /* NT-style timeout, in 100ns units, negative means relative timeout */
157 typedef __int64 timeout_t;
158 #define TIMEOUT_INFINITE (((timeout_t)0x7fffffff) << 32 | 0xffffffff)
160 /* structure returned in the list of window properties */
161 typedef struct
163 atom_t atom; /* property atom */
164 short string; /* was atom a string originally? */
165 lparam_t data; /* data stored in property */
166 } property_data_t;
168 /* structure to specify window rectangles */
169 typedef struct
171 int left;
172 int top;
173 int right;
174 int bottom;
175 } rectangle_t;
177 /* structure for parameters of async I/O calls */
178 typedef struct
180 void *callback; /* client-side callback to call upon end of async */
181 void *iosb; /* I/O status block in client addr space */
182 void *arg; /* opaque user data to pass to callback */
183 void *apc; /* user apc to call */
184 obj_handle_t event; /* event to signal when done */
185 apc_param_t cvalue; /* completion value to use for completion events */
186 } async_data_t;
188 /* structures for extra message data */
190 struct hardware_msg_data
192 lparam_t info; /* extra info */
193 int x; /* x position */
194 int y; /* y position */
195 unsigned int hw_id; /* unique id */
198 struct callback_msg_data
200 void *callback; /* callback function */
201 lparam_t data; /* user data for callback */
202 lparam_t result; /* message result */
205 struct winevent_msg_data
207 user_handle_t hook; /* hook handle */
208 thread_id_t tid; /* thread id */
209 void *hook_proc; /* hook proc address */
210 /* followed by module name if any */
213 typedef union
215 unsigned char bytes[1]; /* raw data for sent messages */
216 struct callback_msg_data callback;
217 struct winevent_msg_data winevent;
218 } message_data_t;
220 /* structure for console char/attribute info */
221 typedef struct
223 WCHAR ch;
224 unsigned short attr;
225 } char_info_t;
227 typedef struct
229 unsigned int low_part;
230 int high_part;
231 } luid_t;
233 #define MAX_ACL_LEN 65535
235 struct security_descriptor
237 unsigned int control; /* SE_ flags */
238 data_size_t owner_len;
239 data_size_t group_len;
240 data_size_t sacl_len;
241 data_size_t dacl_len;
242 /* VARARG(owner,SID); */
243 /* VARARG(group,SID); */
244 /* VARARG(sacl,ACL); */
245 /* VARARG(dacl,ACL); */
248 struct object_attributes
250 obj_handle_t rootdir; /* root directory */
251 data_size_t sd_len; /* length of security_descriptor data. may be 0 */
252 data_size_t name_len; /* length of the name string. may be 0 */
253 /* VARARG(sd,security_descriptor); */
254 /* VARARG(name,unicode_str); */
257 struct token_groups
259 unsigned int count;
260 /* unsigned int attributes[count]; */
261 /* VARARG(sids,SID); */
264 enum apc_type
266 APC_NONE,
267 APC_USER,
268 APC_TIMER,
269 APC_ASYNC_IO,
270 APC_VIRTUAL_ALLOC,
271 APC_VIRTUAL_FREE,
272 APC_VIRTUAL_QUERY,
273 APC_VIRTUAL_PROTECT,
274 APC_VIRTUAL_FLUSH,
275 APC_VIRTUAL_LOCK,
276 APC_VIRTUAL_UNLOCK,
277 APC_MAP_VIEW,
278 APC_UNMAP_VIEW,
279 APC_CREATE_THREAD
282 typedef union
284 enum apc_type type;
285 struct
287 enum apc_type type; /* APC_USER */
288 void (__stdcall *func)(unsigned long,unsigned long,unsigned long);
289 apc_param_t args[3]; /* arguments for user function */
290 } user;
291 struct
293 enum apc_type type; /* APC_TIMER */
294 void (__stdcall *func)(void*, unsigned int, unsigned int);
295 timeout_t time; /* absolute time of expiration */
296 void *arg; /* user argument */
297 } timer;
298 struct
300 enum apc_type type; /* APC_ASYNC_IO */
301 unsigned int (*func)(void*, void*, unsigned int, unsigned int *);
302 void *user; /* user pointer */
303 void *sb; /* status block */
304 unsigned int status; /* I/O status */
305 } async_io;
306 struct
308 enum apc_type type; /* APC_VIRTUAL_ALLOC */
309 void *addr; /* requested address */
310 mem_size_t size; /* allocation size */
311 unsigned int zero_bits; /* allocation alignment */
312 unsigned int op_type; /* type of operation */
313 unsigned int prot; /* memory protection flags */
314 } virtual_alloc;
315 struct
317 enum apc_type type; /* APC_VIRTUAL_FREE */
318 void *addr; /* requested address */
319 mem_size_t size; /* allocation size */
320 unsigned int op_type; /* type of operation */
321 } virtual_free;
322 struct
324 enum apc_type type; /* APC_VIRTUAL_QUERY */
325 const void *addr; /* requested address */
326 } virtual_query;
327 struct
329 enum apc_type type; /* APC_VIRTUAL_PROTECT */
330 void *addr; /* requested address */
331 mem_size_t size; /* requested size */
332 unsigned int prot; /* new protection flags */
333 } virtual_protect;
334 struct
336 enum apc_type type; /* APC_VIRTUAL_FLUSH */
337 const void *addr; /* requested address */
338 mem_size_t size; /* requested size */
339 } virtual_flush;
340 struct
342 enum apc_type type; /* APC_VIRTUAL_LOCK */
343 void *addr; /* requested address */
344 mem_size_t size; /* requested size */
345 } virtual_lock;
346 struct
348 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
349 void *addr; /* requested address */
350 mem_size_t size; /* requested size */
351 } virtual_unlock;
352 struct
354 enum apc_type type; /* APC_MAP_VIEW */
355 obj_handle_t handle; /* mapping handle */
356 void *addr; /* requested address */
357 mem_size_t size; /* allocation size */
358 file_pos_t offset; /* file offset */
359 unsigned int zero_bits; /* allocation alignment */
360 unsigned int alloc_type;/* allocation type */
361 unsigned int prot; /* memory protection flags */
362 } map_view;
363 struct
365 enum apc_type type; /* APC_UNMAP_VIEW */
366 void *addr; /* view address */
367 } unmap_view;
368 struct
370 enum apc_type type; /* APC_CREATE_THREAD */
371 void (__stdcall *func)(void*); /* start function */
372 void *arg; /* argument for start function */
373 mem_size_t reserve; /* reserve size for thread stack */
374 mem_size_t commit; /* commit size for thread stack */
375 int suspend; /* suspended thread? */
376 } create_thread;
377 } apc_call_t;
379 typedef union
381 enum apc_type type;
382 struct
384 enum apc_type type; /* APC_ASYNC_IO */
385 unsigned int status; /* new status of async operation */
386 unsigned int total; /* bytes transferred */
387 } async_io;
388 struct
390 enum apc_type type; /* APC_VIRTUAL_ALLOC */
391 unsigned int status; /* status returned by call */
392 void *addr; /* resulting address */
393 mem_size_t size; /* resulting size */
394 } virtual_alloc;
395 struct
397 enum apc_type type; /* APC_VIRTUAL_FREE */
398 unsigned int status; /* status returned by call */
399 void *addr; /* resulting address */
400 mem_size_t size; /* resulting size */
401 } virtual_free;
402 struct
404 enum apc_type type; /* APC_VIRTUAL_QUERY */
405 unsigned int status; /* status returned by call */
406 void *base; /* resulting base address */
407 void *alloc_base;/* resulting allocation base */
408 mem_size_t size; /* resulting region size */
409 unsigned int state; /* resulting region state */
410 unsigned int prot; /* resulting region protection */
411 unsigned int alloc_prot;/* resulting allocation protection */
412 unsigned int alloc_type;/* resulting region allocation type */
413 } virtual_query;
414 struct
416 enum apc_type type; /* APC_VIRTUAL_PROTECT */
417 unsigned int status; /* status returned by call */
418 void *addr; /* resulting address */
419 mem_size_t size; /* resulting size */
420 unsigned int prot; /* old protection flags */
421 } virtual_protect;
422 struct
424 enum apc_type type; /* APC_VIRTUAL_FLUSH */
425 unsigned int status; /* status returned by call */
426 const void *addr; /* resulting address */
427 mem_size_t size; /* resulting size */
428 } virtual_flush;
429 struct
431 enum apc_type type; /* APC_VIRTUAL_LOCK */
432 unsigned int status; /* status returned by call */
433 void *addr; /* resulting address */
434 mem_size_t size; /* resulting size */
435 } virtual_lock;
436 struct
438 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
439 unsigned int status; /* status returned by call */
440 void *addr; /* resulting address */
441 mem_size_t size; /* resulting size */
442 } virtual_unlock;
443 struct
445 enum apc_type type; /* APC_MAP_VIEW */
446 unsigned int status; /* status returned by call */
447 void *addr; /* resulting address */
448 mem_size_t size; /* resulting size */
449 } map_view;
450 struct
452 enum apc_type type; /* APC_MAP_VIEW */
453 unsigned int status; /* status returned by call */
454 } unmap_view;
455 struct
457 enum apc_type type; /* APC_CREATE_THREAD */
458 unsigned int status; /* status returned by call */
459 thread_id_t tid; /* thread id */
460 obj_handle_t handle; /* handle to new thread */
461 } create_thread;
462 } apc_result_t;
464 /****************************************************************/
465 /* Request declarations */
467 /* Create a new process from the context of the parent */
468 @REQ(new_process)
469 int inherit_all; /* inherit all handles from parent */
470 unsigned int create_flags; /* creation flags */
471 int socket_fd; /* file descriptor for process socket */
472 obj_handle_t exe_file; /* file handle for main exe */
473 obj_handle_t hstdin; /* handle for stdin */
474 obj_handle_t hstdout; /* handle for stdout */
475 obj_handle_t hstderr; /* handle for stderr */
476 unsigned int process_access; /* access rights for process object */
477 unsigned int process_attr; /* attributes for process object */
478 unsigned int thread_access; /* access rights for thread object */
479 unsigned int thread_attr; /* attributes for thread object */
480 VARARG(info,startup_info); /* startup information */
481 VARARG(env,unicode_str); /* environment for new process */
482 @REPLY
483 obj_handle_t info; /* new process info handle */
484 process_id_t pid; /* process id */
485 obj_handle_t phandle; /* process handle (in the current process) */
486 thread_id_t tid; /* thread id */
487 obj_handle_t thandle; /* thread handle (in the current process) */
488 @END
491 /* Retrieve information about a newly started process */
492 @REQ(get_new_process_info)
493 obj_handle_t info; /* info handle returned from new_process_request */
494 @REPLY
495 int success; /* did the process start successfully? */
496 int exit_code; /* process exit code if failed */
497 @END
500 /* Create a new thread from the context of the parent */
501 @REQ(new_thread)
502 unsigned int access; /* wanted access rights */
503 unsigned int attributes; /* object attributes */
504 int suspend; /* new thread should be suspended on creation */
505 int request_fd; /* fd for request pipe */
506 @REPLY
507 thread_id_t tid; /* thread id */
508 obj_handle_t handle; /* thread handle (in the current process) */
509 @END
512 /* Retrieve the new process startup info */
513 @REQ(get_startup_info)
514 @REPLY
515 obj_handle_t exe_file; /* file handle for main exe */
516 obj_handle_t hstdin; /* handle for stdin */
517 obj_handle_t hstdout; /* handle for stdout */
518 obj_handle_t hstderr; /* handle for stderr */
519 VARARG(info,startup_info); /* startup information */
520 VARARG(env,unicode_str); /* environment */
521 @END
524 /* Signal the end of the process initialization */
525 @REQ(init_process_done)
526 void* module; /* main module base address */
527 void* entry; /* process entry point */
528 int gui; /* is it a GUI process? */
529 @END
532 /* Initialize a thread; called from the child after fork()/clone() */
533 @REQ(init_thread)
534 int unix_pid; /* Unix pid of new thread */
535 int unix_tid; /* Unix tid of new thread */
536 int debug_level; /* new debug level */
537 void* teb; /* TEB of new thread (in thread address space) */
538 void* peb; /* address of PEB (in thread address space) */
539 void* entry; /* thread entry point (in thread address space) */
540 void* ldt_copy; /* address of LDT copy (in thread address space) */
541 int reply_fd; /* fd for reply pipe */
542 int wait_fd; /* fd for blocking calls pipe */
543 @REPLY
544 process_id_t pid; /* process id of the new thread's process */
545 thread_id_t tid; /* thread id of the new thread */
546 data_size_t info_size; /* total size of startup info */
547 timeout_t server_start; /* server start time */
548 int version; /* protocol version */
549 @END
552 /* Terminate a process */
553 @REQ(terminate_process)
554 obj_handle_t handle; /* process handle to terminate */
555 int exit_code; /* process exit code */
556 @REPLY
557 int self; /* suicide? */
558 @END
561 /* Terminate a thread */
562 @REQ(terminate_thread)
563 obj_handle_t handle; /* thread handle to terminate */
564 int exit_code; /* thread exit code */
565 @REPLY
566 int self; /* suicide? */
567 int last; /* last thread in this process? */
568 @END
571 /* Retrieve information about a process */
572 @REQ(get_process_info)
573 obj_handle_t handle; /* process handle */
574 @REPLY
575 process_id_t pid; /* server process id */
576 process_id_t ppid; /* server process id of parent */
577 int exit_code; /* process exit code */
578 int priority; /* priority class */
579 unsigned int affinity; /* process affinity mask */
580 void* peb; /* PEB address in process address space */
581 timeout_t start_time; /* process start time */
582 timeout_t end_time; /* process end time */
583 @END
586 /* Set a process informations */
587 @REQ(set_process_info)
588 obj_handle_t handle; /* process handle */
589 int mask; /* setting mask (see below) */
590 int priority; /* priority class */
591 unsigned int affinity; /* affinity mask */
592 @END
593 #define SET_PROCESS_INFO_PRIORITY 0x01
594 #define SET_PROCESS_INFO_AFFINITY 0x02
597 /* Retrieve information about a thread */
598 @REQ(get_thread_info)
599 obj_handle_t handle; /* thread handle */
600 thread_id_t tid_in; /* thread id (optional) */
601 @REPLY
602 process_id_t pid; /* server process id */
603 thread_id_t tid; /* server thread id */
604 void* teb; /* thread teb pointer */
605 int exit_code; /* thread exit code */
606 int priority; /* thread priority level */
607 unsigned int affinity; /* thread affinity mask */
608 timeout_t creation_time; /* thread creation time */
609 timeout_t exit_time; /* thread exit time */
610 int last; /* last thread in process */
611 @END
614 /* Set a thread informations */
615 @REQ(set_thread_info)
616 obj_handle_t handle; /* thread handle */
617 int mask; /* setting mask (see below) */
618 int priority; /* priority class */
619 unsigned int affinity; /* affinity mask */
620 obj_handle_t token; /* impersonation token */
621 @END
622 #define SET_THREAD_INFO_PRIORITY 0x01
623 #define SET_THREAD_INFO_AFFINITY 0x02
624 #define SET_THREAD_INFO_TOKEN 0x04
627 /* Retrieve information about a module */
628 @REQ(get_dll_info)
629 obj_handle_t handle; /* process handle */
630 void* base_address; /* base address of module */
631 @REPLY
632 void* entry_point;
633 data_size_t size; /* module size */
634 data_size_t filename_len; /* buffer len in bytes required to store filename */
635 VARARG(filename,unicode_str); /* file name of module */
636 @END
639 /* Suspend a thread */
640 @REQ(suspend_thread)
641 obj_handle_t handle; /* thread handle */
642 @REPLY
643 int count; /* new suspend count */
644 @END
647 /* Resume a thread */
648 @REQ(resume_thread)
649 obj_handle_t handle; /* thread handle */
650 @REPLY
651 int count; /* new suspend count */
652 @END
655 /* Notify the server that a dll has been loaded */
656 @REQ(load_dll)
657 obj_handle_t handle; /* file handle */
658 void* base; /* base address */
659 void* name; /* ptr to ptr to name (in process addr space) */
660 data_size_t size; /* dll size */
661 int dbg_offset; /* debug info offset */
662 int dbg_size; /* debug info size */
663 VARARG(filename,unicode_str); /* file name of dll */
664 @END
667 /* Notify the server that a dll is being unloaded */
668 @REQ(unload_dll)
669 void* base; /* base address */
670 @END
673 /* Queue an APC for a thread or process */
674 @REQ(queue_apc)
675 obj_handle_t thread; /* thread handle */
676 obj_handle_t process; /* process handle */
677 apc_call_t call; /* call arguments */
678 @REPLY
679 obj_handle_t handle; /* APC handle */
680 int self; /* run APC in caller itself? */
681 @END
684 /* Get the result of an APC call */
685 @REQ(get_apc_result)
686 obj_handle_t handle; /* handle to the APC */
687 @REPLY
688 apc_result_t result; /* result of the APC */
689 @END
692 /* Close a handle for the current process */
693 @REQ(close_handle)
694 obj_handle_t handle; /* handle to close */
695 @END
698 /* Set a handle information */
699 @REQ(set_handle_info)
700 obj_handle_t handle; /* handle we are interested in */
701 int flags; /* new handle flags */
702 int mask; /* mask for flags to set */
703 @REPLY
704 int old_flags; /* old flag value */
705 @END
708 /* Duplicate a handle */
709 @REQ(dup_handle)
710 obj_handle_t src_process; /* src process handle */
711 obj_handle_t src_handle; /* src handle to duplicate */
712 obj_handle_t dst_process; /* dst process handle */
713 unsigned int access; /* wanted access rights */
714 unsigned int attributes; /* object attributes */
715 unsigned int options; /* duplicate options (see below) */
716 @REPLY
717 obj_handle_t handle; /* duplicated handle in dst process */
718 int self; /* is the source the current process? */
719 int closed; /* whether the source handle has been closed */
720 @END
721 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
722 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
723 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
726 /* Open a handle to a process */
727 @REQ(open_process)
728 process_id_t pid; /* process id to open */
729 unsigned int access; /* wanted access rights */
730 unsigned int attributes; /* object attributes */
731 @REPLY
732 obj_handle_t handle; /* handle to the process */
733 @END
736 /* Open a handle to a thread */
737 @REQ(open_thread)
738 thread_id_t tid; /* thread id to open */
739 unsigned int access; /* wanted access rights */
740 unsigned int attributes; /* object attributes */
741 @REPLY
742 obj_handle_t handle; /* handle to the thread */
743 @END
746 /* Wait for handles */
747 @REQ(select)
748 int flags; /* wait flags (see below) */
749 void* cookie; /* magic cookie to return to client */
750 obj_handle_t signal; /* object to signal (0 if none) */
751 obj_handle_t prev_apc; /* handle to previous APC */
752 timeout_t timeout; /* timeout */
753 VARARG(result,apc_result); /* result of previous APC */
754 VARARG(handles,handles); /* handles to select on */
755 @REPLY
756 obj_handle_t apc_handle; /* handle to next APC */
757 timeout_t timeout; /* timeout converted to absolute */
758 apc_call_t call; /* APC call arguments */
759 @END
760 #define SELECT_ALL 1
761 #define SELECT_ALERTABLE 2
762 #define SELECT_INTERRUPTIBLE 4
765 /* Create an event */
766 @REQ(create_event)
767 unsigned int access; /* wanted access rights */
768 unsigned int attributes; /* object attributes */
769 int manual_reset; /* manual reset event */
770 int initial_state; /* initial state of the event */
771 VARARG(objattr,object_attributes); /* object attributes */
772 @REPLY
773 obj_handle_t handle; /* handle to the event */
774 @END
776 /* Event operation */
777 @REQ(event_op)
778 obj_handle_t handle; /* handle to event */
779 int op; /* event operation (see below) */
780 @END
781 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
784 /* Open an event */
785 @REQ(open_event)
786 unsigned int access; /* wanted access rights */
787 unsigned int attributes; /* object attributes */
788 obj_handle_t rootdir; /* root directory */
789 VARARG(name,unicode_str); /* object name */
790 @REPLY
791 obj_handle_t handle; /* handle to the event */
792 @END
795 /* Create a mutex */
796 @REQ(create_mutex)
797 unsigned int access; /* wanted access rights */
798 unsigned int attributes; /* object attributes */
799 int owned; /* initially owned? */
800 VARARG(objattr,object_attributes); /* object attributes */
801 @REPLY
802 obj_handle_t handle; /* handle to the mutex */
803 @END
806 /* Release a mutex */
807 @REQ(release_mutex)
808 obj_handle_t handle; /* handle to the mutex */
809 @REPLY
810 unsigned int prev_count; /* value of internal counter, before release */
811 @END
814 /* Open a mutex */
815 @REQ(open_mutex)
816 unsigned int access; /* wanted access rights */
817 unsigned int attributes; /* object attributes */
818 obj_handle_t rootdir; /* root directory */
819 VARARG(name,unicode_str); /* object name */
820 @REPLY
821 obj_handle_t handle; /* handle to the mutex */
822 @END
825 /* Create a semaphore */
826 @REQ(create_semaphore)
827 unsigned int access; /* wanted access rights */
828 unsigned int attributes; /* object attributes */
829 unsigned int initial; /* initial count */
830 unsigned int max; /* maximum count */
831 VARARG(objattr,object_attributes); /* object attributes */
832 @REPLY
833 obj_handle_t handle; /* handle to the semaphore */
834 @END
837 /* Release a semaphore */
838 @REQ(release_semaphore)
839 obj_handle_t handle; /* handle to the semaphore */
840 unsigned int count; /* count to add to semaphore */
841 @REPLY
842 unsigned int prev_count; /* previous semaphore count */
843 @END
846 /* Open a semaphore */
847 @REQ(open_semaphore)
848 unsigned int access; /* wanted access rights */
849 unsigned int attributes; /* object attributes */
850 obj_handle_t rootdir; /* root directory */
851 VARARG(name,unicode_str); /* object name */
852 @REPLY
853 obj_handle_t handle; /* handle to the semaphore */
854 @END
857 /* Create a file */
858 @REQ(create_file)
859 unsigned int access; /* wanted access rights */
860 unsigned int attributes; /* object attributes */
861 unsigned int sharing; /* sharing flags */
862 int create; /* file create action */
863 unsigned int options; /* file options */
864 unsigned int attrs; /* file attributes for creation */
865 VARARG(objattr,object_attributes); /* object attributes */
866 VARARG(filename,string); /* file name */
867 @REPLY
868 obj_handle_t handle; /* handle to the file */
869 @END
872 /* Open a file object */
873 @REQ(open_file_object)
874 unsigned int access; /* wanted access rights */
875 unsigned int attributes; /* open attributes */
876 obj_handle_t rootdir; /* root directory */
877 unsigned int sharing; /* sharing flags */
878 unsigned int options; /* file options */
879 VARARG(filename,unicode_str); /* file name */
880 @REPLY
881 obj_handle_t handle; /* handle to the file */
882 @END
885 /* Allocate a file handle for a Unix fd */
886 @REQ(alloc_file_handle)
887 unsigned int access; /* wanted access rights */
888 unsigned int attributes; /* object attributes */
889 int fd; /* file descriptor on the client side */
890 @REPLY
891 obj_handle_t handle; /* handle to the file */
892 @END
895 /* Get a Unix fd to access a file */
896 @REQ(get_handle_fd)
897 obj_handle_t handle; /* handle to the file */
898 @REPLY
899 int type; /* file type (see below) */
900 int removable; /* is file removable? */
901 unsigned int access; /* file access rights */
902 unsigned int options; /* file open options */
903 @END
904 enum server_fd_type
906 FD_TYPE_INVALID, /* invalid file (no associated fd) */
907 FD_TYPE_FILE, /* regular file */
908 FD_TYPE_DIR, /* directory */
909 FD_TYPE_SOCKET, /* socket */
910 FD_TYPE_SERIAL, /* serial port */
911 FD_TYPE_PIPE, /* named pipe */
912 FD_TYPE_MAILSLOT, /* mailslot */
913 FD_TYPE_CHAR, /* unspecified char device */
914 FD_TYPE_DEVICE, /* Windows device file */
915 FD_TYPE_NB_TYPES
919 /* Flush a file buffers */
920 @REQ(flush_file)
921 obj_handle_t handle; /* handle to the file */
922 @REPLY
923 obj_handle_t event; /* event set when finished */
924 @END
927 /* Lock a region of a file */
928 @REQ(lock_file)
929 obj_handle_t handle; /* handle to the file */
930 file_pos_t offset; /* offset of start of lock */
931 file_pos_t count; /* count of bytes to lock */
932 int shared; /* shared or exclusive lock? */
933 int wait; /* do we want to wait? */
934 @REPLY
935 obj_handle_t handle; /* handle to wait on */
936 int overlapped; /* is it an overlapped I/O handle? */
937 @END
940 /* Unlock a region of a file */
941 @REQ(unlock_file)
942 obj_handle_t handle; /* handle to the file */
943 file_pos_t offset; /* offset of start of unlock */
944 file_pos_t count; /* count of bytes to unlock */
945 @END
948 /* Create a socket */
949 @REQ(create_socket)
950 unsigned int access; /* wanted access rights */
951 unsigned int attributes; /* object attributes */
952 int family; /* family, see socket manpage */
953 int type; /* type, see socket manpage */
954 int protocol; /* protocol, see socket manpage */
955 unsigned int flags; /* socket flags */
956 @REPLY
957 obj_handle_t handle; /* handle to the new socket */
958 @END
961 /* Accept a socket */
962 @REQ(accept_socket)
963 obj_handle_t lhandle; /* handle to the listening socket */
964 unsigned int access; /* wanted access rights */
965 unsigned int attributes; /* object attributes */
966 @REPLY
967 obj_handle_t handle; /* handle to the new socket */
968 @END
971 /* Set socket event parameters */
972 @REQ(set_socket_event)
973 obj_handle_t handle; /* handle to the socket */
974 unsigned int mask; /* event mask */
975 obj_handle_t event; /* event object */
976 user_handle_t window; /* window to send the message to */
977 unsigned int msg; /* message to send */
978 @END
981 /* Get socket event parameters */
982 @REQ(get_socket_event)
983 obj_handle_t handle; /* handle to the socket */
984 int service; /* clear pending? */
985 obj_handle_t c_event; /* event to clear */
986 @REPLY
987 unsigned int mask; /* event mask */
988 unsigned int pmask; /* pending events */
989 unsigned int state; /* status bits */
990 VARARG(errors,ints); /* event errors */
991 @END
994 /* Reenable pending socket events */
995 @REQ(enable_socket_event)
996 obj_handle_t handle; /* handle to the socket */
997 unsigned int mask; /* events to re-enable */
998 unsigned int sstate; /* status bits to set */
999 unsigned int cstate; /* status bits to clear */
1000 @END
1002 @REQ(set_socket_deferred)
1003 obj_handle_t handle; /* handle to the socket */
1004 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
1005 @END
1007 /* Allocate a console (only used by a console renderer) */
1008 @REQ(alloc_console)
1009 unsigned int access; /* wanted access rights */
1010 unsigned int attributes; /* object attributes */
1011 process_id_t pid; /* pid of process which shall be attached to the console */
1012 @REPLY
1013 obj_handle_t handle_in; /* handle to console input */
1014 obj_handle_t event; /* handle to renderer events change notification */
1015 @END
1018 /* Free the console of the current process */
1019 @REQ(free_console)
1020 @END
1023 #define CONSOLE_RENDERER_NONE_EVENT 0x00
1024 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
1025 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
1026 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
1027 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
1028 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
1029 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
1030 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
1031 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
1032 struct console_renderer_event
1034 short event;
1035 union
1037 struct update
1039 short top;
1040 short bottom;
1041 } update;
1042 struct resize
1044 short width;
1045 short height;
1046 } resize;
1047 struct cursor_pos
1049 short x;
1050 short y;
1051 } cursor_pos;
1052 struct cursor_geom
1054 short visible;
1055 short size;
1056 } cursor_geom;
1057 struct display
1059 short left;
1060 short top;
1061 short width;
1062 short height;
1063 } display;
1064 } u;
1067 /* retrieve console events for the renderer */
1068 @REQ(get_console_renderer_events)
1069 obj_handle_t handle; /* handle to console input events */
1070 @REPLY
1071 VARARG(data,bytes); /* the various console_renderer_events */
1072 @END
1075 /* Open a handle to the process console */
1076 @REQ(open_console)
1077 obj_handle_t from; /* 0 (resp 1) input (resp output) of current process console */
1078 /* otherwise console_in handle to get active screen buffer? */
1079 unsigned int access; /* wanted access rights */
1080 unsigned int attributes; /* object attributes */
1081 int share; /* share mask (only for output handles) */
1082 @REPLY
1083 obj_handle_t handle; /* handle to the console */
1084 @END
1087 /* Get the input queue wait event */
1088 @REQ(get_console_wait_event)
1089 @REPLY
1090 obj_handle_t handle;
1091 @END
1093 /* Get a console mode (input or output) */
1094 @REQ(get_console_mode)
1095 obj_handle_t handle; /* handle to the console */
1096 @REPLY
1097 int mode; /* console mode */
1098 @END
1101 /* Set a console mode (input or output) */
1102 @REQ(set_console_mode)
1103 obj_handle_t handle; /* handle to the console */
1104 int mode; /* console mode */
1105 @END
1108 /* Set info about a console (input only) */
1109 @REQ(set_console_input_info)
1110 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1111 int mask; /* setting mask (see below) */
1112 obj_handle_t active_sb; /* active screen buffer */
1113 int history_mode; /* whether we duplicate lines in history */
1114 int history_size; /* number of lines in history */
1115 int edition_mode; /* index to the edition mode flavors */
1116 int input_cp; /* console input codepage */
1117 int output_cp; /* console output codepage */
1118 user_handle_t win; /* console window if backend supports it */
1119 VARARG(title,unicode_str); /* console title */
1120 @END
1121 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
1122 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
1123 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
1124 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
1125 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
1126 #define SET_CONSOLE_INPUT_INFO_INPUT_CODEPAGE 0x20
1127 #define SET_CONSOLE_INPUT_INFO_OUTPUT_CODEPAGE 0x40
1128 #define SET_CONSOLE_INPUT_INFO_WIN 0x80
1131 /* Get info about a console (input only) */
1132 @REQ(get_console_input_info)
1133 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1134 @REPLY
1135 int history_mode; /* whether we duplicate lines in history */
1136 int history_size; /* number of lines in history */
1137 int history_index; /* number of used lines in history */
1138 int edition_mode; /* index to the edition mode flavors */
1139 int input_cp; /* console input codepage */
1140 int output_cp; /* console output codepage */
1141 user_handle_t win; /* console window if backend supports it */
1142 VARARG(title,unicode_str); /* console title */
1143 @END
1146 /* appends a string to console's history */
1147 @REQ(append_console_input_history)
1148 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1149 VARARG(line,unicode_str); /* line to add */
1150 @END
1153 /* appends a string to console's history */
1154 @REQ(get_console_input_history)
1155 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1156 int index; /* index to get line from */
1157 @REPLY
1158 int total; /* total length of line in Unicode chars */
1159 VARARG(line,unicode_str); /* line to add */
1160 @END
1163 /* creates a new screen buffer on process' console */
1164 @REQ(create_console_output)
1165 obj_handle_t handle_in; /* handle to console input, or 0 for process' console */
1166 unsigned int access; /* wanted access rights */
1167 unsigned int attributes; /* object attributes */
1168 unsigned int share; /* sharing credentials */
1169 @REPLY
1170 obj_handle_t handle_out; /* handle to the screen buffer */
1171 @END
1174 /* Set info about a console (output only) */
1175 @REQ(set_console_output_info)
1176 obj_handle_t handle; /* handle to the console */
1177 int mask; /* setting mask (see below) */
1178 short int cursor_size; /* size of cursor (percentage filled) */
1179 short int cursor_visible;/* cursor visibility flag */
1180 short int cursor_x; /* position of cursor (x, y) */
1181 short int cursor_y;
1182 short int width; /* width of the screen buffer */
1183 short int height; /* height of the screen buffer */
1184 short int attr; /* default attribute */
1185 short int win_left; /* window actually displayed by renderer */
1186 short int win_top; /* the rect area is expressed withing the */
1187 short int win_right; /* boundaries of the screen buffer */
1188 short int win_bottom;
1189 short int max_width; /* maximum size (width x height) for the window */
1190 short int max_height;
1191 @END
1192 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01
1193 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02
1194 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x04
1195 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08
1196 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10
1197 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20
1200 /* Get info about a console (output only) */
1201 @REQ(get_console_output_info)
1202 obj_handle_t handle; /* handle to the console */
1203 @REPLY
1204 short int cursor_size; /* size of cursor (percentage filled) */
1205 short int cursor_visible;/* cursor visibility flag */
1206 short int cursor_x; /* position of cursor (x, y) */
1207 short int cursor_y;
1208 short int width; /* width of the screen buffer */
1209 short int height; /* height of the screen buffer */
1210 short int attr; /* default attribute */
1211 short int win_left; /* window actually displayed by renderer */
1212 short int win_top; /* the rect area is expressed withing the */
1213 short int win_right; /* boundaries of the screen buffer */
1214 short int win_bottom;
1215 short int max_width; /* maximum size (width x height) for the window */
1216 short int max_height;
1217 @END
1219 /* Add input records to a console input queue */
1220 @REQ(write_console_input)
1221 obj_handle_t handle; /* handle to the console input */
1222 VARARG(rec,input_records); /* input records */
1223 @REPLY
1224 int written; /* number of records written */
1225 @END
1228 /* Fetch input records from a console input queue */
1229 @REQ(read_console_input)
1230 obj_handle_t handle; /* handle to the console input */
1231 int flush; /* flush the retrieved records from the queue? */
1232 @REPLY
1233 int read; /* number of records read */
1234 VARARG(rec,input_records); /* input records */
1235 @END
1238 /* write data (chars and/or attributes) in a screen buffer */
1239 @REQ(write_console_output)
1240 obj_handle_t handle; /* handle to the console output */
1241 int x; /* position where to start writing */
1242 int y;
1243 int mode; /* char info (see below) */
1244 int wrap; /* wrap around at end of line? */
1245 VARARG(data,bytes); /* info to write */
1246 @REPLY
1247 int written; /* number of char infos actually written */
1248 int width; /* width of screen buffer */
1249 int height; /* height of screen buffer */
1250 @END
1251 enum char_info_mode
1253 CHAR_INFO_MODE_TEXT, /* characters only */
1254 CHAR_INFO_MODE_ATTR, /* attributes only */
1255 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
1256 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
1260 /* fill a screen buffer with constant data (chars and/or attributes) */
1261 @REQ(fill_console_output)
1262 obj_handle_t handle; /* handle to the console output */
1263 int x; /* position where to start writing */
1264 int y;
1265 int mode; /* char info mode */
1266 int count; /* number to write */
1267 int wrap; /* wrap around at end of line? */
1268 char_info_t data; /* data to write */
1269 @REPLY
1270 int written; /* number of char infos actually written */
1271 @END
1274 /* read data (chars and/or attributes) from a screen buffer */
1275 @REQ(read_console_output)
1276 obj_handle_t handle; /* handle to the console output */
1277 int x; /* position (x,y) where to start reading */
1278 int y;
1279 int mode; /* char info mode */
1280 int wrap; /* wrap around at end of line? */
1281 @REPLY
1282 int width; /* width of screen buffer */
1283 int height; /* height of screen buffer */
1284 VARARG(data,bytes);
1285 @END
1288 /* move a rect (of data) in screen buffer content */
1289 @REQ(move_console_output)
1290 obj_handle_t handle; /* handle to the console output */
1291 short int x_src; /* position (x, y) of rect to start moving from */
1292 short int y_src;
1293 short int x_dst; /* position (x, y) of rect to move to */
1294 short int y_dst;
1295 short int w; /* size of the rect (width, height) to move */
1296 short int h;
1297 @END
1300 /* Sends a signal to a process group */
1301 @REQ(send_console_signal)
1302 int signal; /* the signal to send */
1303 process_id_t group_id; /* the group to send the signal to */
1304 @END
1307 /* enable directory change notifications */
1308 @REQ(read_directory_changes)
1309 unsigned int filter; /* notification filter */
1310 obj_handle_t handle; /* handle to the directory */
1311 int subtree; /* watch the subtree? */
1312 int want_data; /* flag indicating whether change data should be collected */
1313 async_data_t async; /* async I/O parameters */
1314 @END
1317 @REQ(read_change)
1318 obj_handle_t handle;
1319 @REPLY
1320 int action; /* type of change */
1321 VARARG(name,string); /* name of directory entry that changed */
1322 @END
1325 /* Create a file mapping */
1326 @REQ(create_mapping)
1327 unsigned int access; /* wanted access rights */
1328 unsigned int attributes; /* object attributes */
1329 mem_size_t size; /* mapping size */
1330 unsigned int protect; /* protection flags (see below) */
1331 obj_handle_t file_handle; /* file handle */
1332 VARARG(objattr,object_attributes); /* object attributes */
1333 @REPLY
1334 obj_handle_t handle; /* handle to the mapping */
1335 @END
1336 /* per-page protection flags */
1337 #define VPROT_READ 0x01
1338 #define VPROT_WRITE 0x02
1339 #define VPROT_EXEC 0x04
1340 #define VPROT_WRITECOPY 0x08
1341 #define VPROT_GUARD 0x10
1342 #define VPROT_NOCACHE 0x20
1343 #define VPROT_COMMITTED 0x40
1344 #define VPROT_WRITEWATCH 0x80
1345 /* per-mapping protection flags */
1346 #define VPROT_IMAGE 0x0100 /* mapping for an exe image */
1347 #define VPROT_SYSTEM 0x0200 /* system view (underlying mmap not under our control) */
1348 #define VPROT_VALLOC 0x0400 /* allocated by VirtualAlloc */
1349 #define VPROT_NOEXEC 0x0800 /* don't force exec permission */
1352 /* Open a mapping */
1353 @REQ(open_mapping)
1354 unsigned int access; /* wanted access rights */
1355 unsigned int attributes; /* object attributes */
1356 obj_handle_t rootdir; /* root directory */
1357 VARARG(name,unicode_str); /* object name */
1358 @REPLY
1359 obj_handle_t handle; /* handle to the mapping */
1360 @END
1363 /* Get information about a file mapping */
1364 @REQ(get_mapping_info)
1365 obj_handle_t handle; /* handle to the mapping */
1366 unsigned int access; /* wanted access rights */
1367 @REPLY
1368 mem_size_t size; /* mapping size */
1369 int protect; /* protection flags */
1370 int header_size; /* header size (for VPROT_IMAGE mapping) */
1371 void* base; /* default base addr (for VPROT_IMAGE mapping) */
1372 obj_handle_t mapping; /* duplicate mapping handle unless removable */
1373 obj_handle_t shared_file; /* shared mapping file handle */
1374 @END
1377 /* Get a range of committed pages in a file mapping */
1378 @REQ(get_mapping_committed_range)
1379 obj_handle_t handle; /* handle to the mapping */
1380 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1381 @REPLY
1382 mem_size_t size; /* size of range starting at offset (page-aligned, in bytes) */
1383 int committed; /* whether it is a committed range */
1384 @END
1387 /* Add a range to the committed pages in a file mapping */
1388 @REQ(add_mapping_committed_range)
1389 obj_handle_t handle; /* handle to the mapping */
1390 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1391 mem_size_t size; /* size to set (page-aligned, in bytes) or 0 if only retrieving */
1392 @END
1395 #define SNAP_PROCESS 0x00000001
1396 #define SNAP_THREAD 0x00000002
1397 /* Create a snapshot */
1398 @REQ(create_snapshot)
1399 unsigned int attributes; /* object attributes */
1400 unsigned int flags; /* snapshot flags (SNAP_*) */
1401 @REPLY
1402 obj_handle_t handle; /* handle to the snapshot */
1403 @END
1406 /* Get the next process from a snapshot */
1407 @REQ(next_process)
1408 obj_handle_t handle; /* handle to the snapshot */
1409 int reset; /* reset snapshot position? */
1410 @REPLY
1411 int count; /* process usage count */
1412 process_id_t pid; /* process id */
1413 process_id_t ppid; /* parent process id */
1414 int threads; /* number of threads */
1415 int priority; /* process priority */
1416 int handles; /* number of handles */
1417 VARARG(filename,unicode_str); /* file name of main exe */
1418 @END
1421 /* Get the next thread from a snapshot */
1422 @REQ(next_thread)
1423 obj_handle_t handle; /* handle to the snapshot */
1424 int reset; /* reset snapshot position? */
1425 @REPLY
1426 int count; /* thread usage count */
1427 process_id_t pid; /* process id */
1428 thread_id_t tid; /* thread id */
1429 int base_pri; /* base priority */
1430 int delta_pri; /* delta priority */
1431 @END
1434 /* Wait for a debug event */
1435 @REQ(wait_debug_event)
1436 int get_handle; /* should we alloc a handle for waiting? */
1437 @REPLY
1438 process_id_t pid; /* process id */
1439 thread_id_t tid; /* thread id */
1440 obj_handle_t wait; /* wait handle if no event ready */
1441 VARARG(event,debug_event); /* debug event data */
1442 @END
1445 /* Queue an exception event */
1446 @REQ(queue_exception_event)
1447 int first; /* first chance exception? */
1448 VARARG(record,exc_event); /* thread context followed by exception record */
1449 @REPLY
1450 obj_handle_t handle; /* handle to the queued event */
1451 @END
1454 /* Retrieve the status of an exception event */
1455 @REQ(get_exception_status)
1456 obj_handle_t handle; /* handle to the queued event */
1457 @REPLY
1458 VARARG(context,context); /* modified thread context */
1459 @END
1462 /* Send an output string to the debugger */
1463 @REQ(output_debug_string)
1464 void* string; /* string to display (in debugged process address space) */
1465 int unicode; /* is it Unicode? */
1466 int length; /* string length */
1467 @END
1470 /* Continue a debug event */
1471 @REQ(continue_debug_event)
1472 process_id_t pid; /* process id to continue */
1473 thread_id_t tid; /* thread id to continue */
1474 int status; /* continuation status */
1475 @END
1478 /* Start/stop debugging an existing process */
1479 @REQ(debug_process)
1480 process_id_t pid; /* id of the process to debug */
1481 int attach; /* 1=attaching / 0=detaching from the process */
1482 @END
1485 /* Simulate a breakpoint in a process */
1486 @REQ(debug_break)
1487 obj_handle_t handle; /* process handle */
1488 @REPLY
1489 int self; /* was it the caller itself? */
1490 @END
1493 /* Set debugger kill on exit flag */
1494 @REQ(set_debugger_kill_on_exit)
1495 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1496 @END
1499 /* Read data from a process address space */
1500 @REQ(read_process_memory)
1501 obj_handle_t handle; /* process handle */
1502 void* addr; /* addr to read from */
1503 @REPLY
1504 VARARG(data,bytes); /* result data */
1505 @END
1508 /* Write data to a process address space */
1509 @REQ(write_process_memory)
1510 obj_handle_t handle; /* process handle */
1511 void* addr; /* addr to write to */
1512 VARARG(data,bytes); /* data to write */
1513 @END
1516 /* Create a registry key */
1517 @REQ(create_key)
1518 obj_handle_t parent; /* handle to the parent key */
1519 unsigned int access; /* desired access rights */
1520 unsigned int attributes; /* object attributes */
1521 unsigned int options; /* creation options */
1522 data_size_t namelen; /* length of key name in bytes */
1523 VARARG(name,unicode_str,namelen); /* key name */
1524 VARARG(class,unicode_str); /* class name */
1525 @REPLY
1526 obj_handle_t hkey; /* handle to the created key */
1527 int created; /* has it been newly created? */
1528 @END
1530 /* Open a registry key */
1531 @REQ(open_key)
1532 obj_handle_t parent; /* handle to the parent key */
1533 unsigned int access; /* desired access rights */
1534 unsigned int attributes; /* object attributes */
1535 VARARG(name,unicode_str); /* key name */
1536 @REPLY
1537 obj_handle_t hkey; /* handle to the open key */
1538 @END
1541 /* Delete a registry key */
1542 @REQ(delete_key)
1543 obj_handle_t hkey; /* handle to the key */
1544 @END
1547 /* Flush a registry key */
1548 @REQ(flush_key)
1549 obj_handle_t hkey; /* handle to the key */
1550 @END
1553 /* Enumerate registry subkeys */
1554 @REQ(enum_key)
1555 obj_handle_t hkey; /* handle to registry key */
1556 int index; /* index of subkey (or -1 for current key) */
1557 int info_class; /* requested information class */
1558 @REPLY
1559 int subkeys; /* number of subkeys */
1560 int max_subkey; /* longest subkey name */
1561 int max_class; /* longest class name */
1562 int values; /* number of values */
1563 int max_value; /* longest value name */
1564 int max_data; /* longest value data */
1565 timeout_t modif; /* last modification time */
1566 data_size_t total; /* total length needed for full name and class */
1567 data_size_t namelen; /* length of key name in bytes */
1568 VARARG(name,unicode_str,namelen); /* key name */
1569 VARARG(class,unicode_str); /* class name */
1570 @END
1573 /* Set a value of a registry key */
1574 @REQ(set_key_value)
1575 obj_handle_t hkey; /* handle to registry key */
1576 int type; /* value type */
1577 data_size_t namelen; /* length of value name in bytes */
1578 VARARG(name,unicode_str,namelen); /* value name */
1579 VARARG(data,bytes); /* value data */
1580 @END
1583 /* Retrieve the value of a registry key */
1584 @REQ(get_key_value)
1585 obj_handle_t hkey; /* handle to registry key */
1586 VARARG(name,unicode_str); /* value name */
1587 @REPLY
1588 int type; /* value type */
1589 data_size_t total; /* total length needed for data */
1590 VARARG(data,bytes); /* value data */
1591 @END
1594 /* Enumerate a value of a registry key */
1595 @REQ(enum_key_value)
1596 obj_handle_t hkey; /* handle to registry key */
1597 int index; /* value index */
1598 int info_class; /* requested information class */
1599 @REPLY
1600 int type; /* value type */
1601 data_size_t total; /* total length needed for full name and data */
1602 data_size_t namelen; /* length of value name in bytes */
1603 VARARG(name,unicode_str,namelen); /* value name */
1604 VARARG(data,bytes); /* value data */
1605 @END
1608 /* Delete a value of a registry key */
1609 @REQ(delete_key_value)
1610 obj_handle_t hkey; /* handle to registry key */
1611 VARARG(name,unicode_str); /* value name */
1612 @END
1615 /* Load a registry branch from a file */
1616 @REQ(load_registry)
1617 obj_handle_t hkey; /* root key to load to */
1618 obj_handle_t file; /* file to load from */
1619 VARARG(name,unicode_str); /* subkey name */
1620 @END
1623 /* UnLoad a registry branch from a file */
1624 @REQ(unload_registry)
1625 obj_handle_t hkey; /* root key to unload to */
1626 @END
1629 /* Save a registry branch to a file */
1630 @REQ(save_registry)
1631 obj_handle_t hkey; /* key to save */
1632 obj_handle_t file; /* file to save to */
1633 @END
1636 /* Add a registry key change notification */
1637 @REQ(set_registry_notification)
1638 obj_handle_t hkey; /* key to watch for changes */
1639 obj_handle_t event; /* event to set */
1640 int subtree; /* should we watch the whole subtree? */
1641 unsigned int filter; /* things to watch */
1642 @END
1645 /* Create a waitable timer */
1646 @REQ(create_timer)
1647 unsigned int access; /* wanted access rights */
1648 unsigned int attributes; /* object attributes */
1649 obj_handle_t rootdir; /* root directory */
1650 int manual; /* manual reset */
1651 VARARG(name,unicode_str); /* object name */
1652 @REPLY
1653 obj_handle_t handle; /* handle to the timer */
1654 @END
1657 /* Open a waitable timer */
1658 @REQ(open_timer)
1659 unsigned int access; /* wanted access rights */
1660 unsigned int attributes; /* object attributes */
1661 obj_handle_t rootdir; /* root directory */
1662 VARARG(name,unicode_str); /* object name */
1663 @REPLY
1664 obj_handle_t handle; /* handle to the timer */
1665 @END
1667 /* Set a waitable timer */
1668 @REQ(set_timer)
1669 obj_handle_t handle; /* handle to the timer */
1670 timeout_t expire; /* next expiration absolute time */
1671 int period; /* timer period in ms */
1672 void* callback; /* callback function */
1673 void* arg; /* callback argument */
1674 @REPLY
1675 int signaled; /* was the timer signaled before this call ? */
1676 @END
1678 /* Cancel a waitable timer */
1679 @REQ(cancel_timer)
1680 obj_handle_t handle; /* handle to the timer */
1681 @REPLY
1682 int signaled; /* was the timer signaled before this calltime ? */
1683 @END
1685 /* Get information on a waitable timer */
1686 @REQ(get_timer_info)
1687 obj_handle_t handle; /* handle to the timer */
1688 @REPLY
1689 timeout_t when; /* absolute time when the timer next expires */
1690 int signaled; /* is the timer signaled? */
1691 @END
1694 /* Retrieve the current context of a thread */
1695 @REQ(get_thread_context)
1696 obj_handle_t handle; /* thread handle */
1697 unsigned int flags; /* context flags */
1698 int suspend; /* if getting context during suspend */
1699 @REPLY
1700 int self; /* was it a handle to the current thread? */
1701 VARARG(context,context); /* thread context */
1702 @END
1705 /* Set the current context of a thread */
1706 @REQ(set_thread_context)
1707 obj_handle_t handle; /* thread handle */
1708 unsigned int flags; /* context flags */
1709 int suspend; /* if setting context during suspend */
1710 VARARG(context,context); /* thread context */
1711 @REPLY
1712 int self; /* was it a handle to the current thread? */
1713 @END
1716 /* Fetch a selector entry for a thread */
1717 @REQ(get_selector_entry)
1718 obj_handle_t handle; /* thread handle */
1719 int entry; /* LDT entry */
1720 @REPLY
1721 unsigned int base; /* selector base */
1722 unsigned int limit; /* selector limit */
1723 unsigned char flags; /* selector flags */
1724 @END
1727 /* Add an atom */
1728 @REQ(add_atom)
1729 obj_handle_t table; /* which table to add atom to */
1730 VARARG(name,unicode_str); /* atom name */
1731 @REPLY
1732 atom_t atom; /* resulting atom */
1733 @END
1736 /* Delete an atom */
1737 @REQ(delete_atom)
1738 obj_handle_t table; /* which table to delete atom from */
1739 atom_t atom; /* atom handle */
1740 @END
1743 /* Find an atom */
1744 @REQ(find_atom)
1745 obj_handle_t table; /* which table to find atom from */
1746 VARARG(name,unicode_str); /* atom name */
1747 @REPLY
1748 atom_t atom; /* atom handle */
1749 @END
1752 /* Get information about an atom */
1753 @REQ(get_atom_information)
1754 obj_handle_t table; /* which table to find atom from */
1755 atom_t atom; /* atom handle */
1756 @REPLY
1757 int count; /* atom lock count */
1758 int pinned; /* whether the atom has been pinned */
1759 data_size_t total; /* actual length of atom name */
1760 VARARG(name,unicode_str); /* atom name */
1761 @END
1764 /* Set information about an atom */
1765 @REQ(set_atom_information)
1766 obj_handle_t table; /* which table to find atom from */
1767 atom_t atom; /* atom handle */
1768 int pinned; /* whether to bump atom information */
1769 @END
1772 /* Empty an atom table */
1773 @REQ(empty_atom_table)
1774 obj_handle_t table; /* which table to find atom from */
1775 int if_pinned; /* whether to delete pinned atoms */
1776 @END
1779 /* Init an atom table */
1780 @REQ(init_atom_table)
1781 int entries; /* number of entries (only for local) */
1782 @REPLY
1783 obj_handle_t table; /* handle to the atom table */
1784 @END
1787 /* Get the message queue of the current thread */
1788 @REQ(get_msg_queue)
1789 @REPLY
1790 obj_handle_t handle; /* handle to the queue */
1791 @END
1794 /* Set the file descriptor associated to the current thread queue */
1795 @REQ(set_queue_fd)
1796 obj_handle_t handle; /* handle to the file descriptor */
1797 @END
1800 /* Set the current message queue wakeup mask */
1801 @REQ(set_queue_mask)
1802 unsigned int wake_mask; /* wakeup bits mask */
1803 unsigned int changed_mask; /* changed bits mask */
1804 int skip_wait; /* will we skip waiting if signaled? */
1805 @REPLY
1806 unsigned int wake_bits; /* current wake bits */
1807 unsigned int changed_bits; /* current changed bits */
1808 @END
1811 /* Get the current message queue status */
1812 @REQ(get_queue_status)
1813 int clear; /* should we clear the change bits? */
1814 @REPLY
1815 unsigned int wake_bits; /* wake bits */
1816 unsigned int changed_bits; /* changed bits since last time */
1817 @END
1820 /* Retrieve the process idle event */
1821 @REQ(get_process_idle_event)
1822 obj_handle_t handle; /* process handle */
1823 @REPLY
1824 obj_handle_t event; /* handle to idle event */
1825 @END
1828 /* Send a message to a thread queue */
1829 @REQ(send_message)
1830 thread_id_t id; /* thread id */
1831 int type; /* message type (see below) */
1832 int flags; /* message flags (see below) */
1833 user_handle_t win; /* window handle */
1834 unsigned int msg; /* message code */
1835 lparam_t wparam; /* parameters */
1836 lparam_t lparam; /* parameters */
1837 timeout_t timeout; /* timeout for reply */
1838 VARARG(data,message_data); /* message data for sent messages */
1839 @END
1841 @REQ(post_quit_message)
1842 int exit_code; /* exit code to return */
1843 @END
1845 enum message_type
1847 MSG_ASCII, /* Ascii message (from SendMessageA) */
1848 MSG_UNICODE, /* Unicode message (from SendMessageW) */
1849 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
1850 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
1851 MSG_CALLBACK_RESULT,/* result of a callback message */
1852 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
1853 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
1854 MSG_HARDWARE, /* hardware message */
1855 MSG_WINEVENT /* winevent message */
1857 #define SEND_MSG_ABORT_IF_HUNG 0x01
1860 /* Send a hardware message to a thread queue */
1861 @REQ(send_hardware_message)
1862 thread_id_t id; /* thread id */
1863 user_handle_t win; /* window handle */
1864 unsigned int msg; /* message code */
1865 unsigned int time; /* message time */
1866 lparam_t wparam; /* parameters */
1867 lparam_t lparam; /* parameters */
1868 lparam_t info; /* extra info */
1869 int x; /* x position */
1870 int y; /* y position */
1871 @END
1874 /* Get a message from the current queue */
1875 @REQ(get_message)
1876 unsigned int flags; /* PM_* flags */
1877 user_handle_t get_win; /* window handle to get */
1878 unsigned int get_first; /* first message code to get */
1879 unsigned int get_last; /* last message code to get */
1880 unsigned int hw_id; /* id of the previous hardware message (or 0) */
1881 unsigned int wake_mask; /* wakeup bits mask */
1882 unsigned int changed_mask; /* changed bits mask */
1883 @REPLY
1884 user_handle_t win; /* window handle */
1885 unsigned int msg; /* message code */
1886 lparam_t wparam; /* parameters */
1887 lparam_t lparam; /* parameters */
1888 int type; /* message type */
1889 unsigned int time; /* message time */
1890 unsigned int active_hooks; /* active hooks bitmap */
1891 data_size_t total; /* total size of extra data */
1892 VARARG(data,message_data); /* message data for sent messages */
1893 @END
1896 /* Reply to a sent message */
1897 @REQ(reply_message)
1898 lparam_t result; /* message result */
1899 int remove; /* should we remove the message? */
1900 VARARG(data,bytes); /* message data for sent messages */
1901 @END
1904 /* Accept the current hardware message */
1905 @REQ(accept_hardware_message)
1906 unsigned int hw_id; /* id of the hardware message */
1907 int remove; /* should we remove the message? */
1908 user_handle_t new_win; /* new destination window for current message */
1909 @END
1912 /* Retrieve the reply for the last message sent */
1913 @REQ(get_message_reply)
1914 int cancel; /* cancel message if not ready? */
1915 @REPLY
1916 lparam_t result; /* message result */
1917 VARARG(data,bytes); /* message data for sent messages */
1918 @END
1921 /* Set a window timer */
1922 @REQ(set_win_timer)
1923 user_handle_t win; /* window handle */
1924 unsigned int msg; /* message to post */
1925 unsigned int rate; /* timer rate in ms */
1926 lparam_t id; /* timer id */
1927 lparam_t lparam; /* message lparam (callback proc) */
1928 @REPLY
1929 lparam_t id; /* timer id */
1930 @END
1933 /* Kill a window timer */
1934 @REQ(kill_win_timer)
1935 user_handle_t win; /* window handle */
1936 unsigned int msg; /* message to post */
1937 lparam_t id; /* timer id */
1938 @END
1941 /* check if the thread owning the window is hung */
1942 @REQ(is_window_hung)
1943 user_handle_t win; /* window handle */
1944 @REPLY
1945 int is_hung;
1946 @END
1949 /* Retrieve info about a serial port */
1950 @REQ(get_serial_info)
1951 obj_handle_t handle; /* handle to comm port */
1952 @REPLY
1953 unsigned int readinterval;
1954 unsigned int readconst;
1955 unsigned int readmult;
1956 unsigned int writeconst;
1957 unsigned int writemult;
1958 unsigned int eventmask;
1959 @END
1962 /* Set info about a serial port */
1963 @REQ(set_serial_info)
1964 obj_handle_t handle; /* handle to comm port */
1965 int flags; /* bitmask to set values (see below) */
1966 unsigned int readinterval;
1967 unsigned int readconst;
1968 unsigned int readmult;
1969 unsigned int writeconst;
1970 unsigned int writemult;
1971 unsigned int eventmask;
1972 @END
1973 #define SERIALINFO_SET_TIMEOUTS 0x01
1974 #define SERIALINFO_SET_MASK 0x02
1977 /* Create an async I/O */
1978 @REQ(register_async)
1979 obj_handle_t handle; /* handle to comm port, socket or file */
1980 int type; /* type of queue to look after */
1981 int count; /* count - usually # of bytes to be read/written */
1982 async_data_t async; /* async I/O parameters */
1983 @END
1984 #define ASYNC_TYPE_READ 0x01
1985 #define ASYNC_TYPE_WRITE 0x02
1986 #define ASYNC_TYPE_WAIT 0x03
1989 /* Cancel all async op on a fd */
1990 @REQ(cancel_async)
1991 obj_handle_t handle; /* handle to comm port, socket or file */
1992 @END
1995 /* Perform an ioctl on a file */
1996 @REQ(ioctl)
1997 obj_handle_t handle; /* handle to the device */
1998 ioctl_code_t code; /* ioctl code */
1999 async_data_t async; /* async I/O parameters */
2000 VARARG(in_data,bytes); /* ioctl input data */
2001 @REPLY
2002 obj_handle_t wait; /* handle to wait on for blocking ioctl */
2003 unsigned int options; /* device open options */
2004 VARARG(out_data,bytes); /* ioctl output data */
2005 @END
2008 /* Retrieve results of an async ioctl */
2009 @REQ(get_ioctl_result)
2010 obj_handle_t handle; /* handle to the device */
2011 void* user_arg; /* user arg used to identify the request */
2012 @REPLY
2013 VARARG(out_data,bytes); /* ioctl output data */
2014 @END
2017 /* Create a named pipe */
2018 @REQ(create_named_pipe)
2019 unsigned int access;
2020 unsigned int attributes; /* object attributes */
2021 obj_handle_t rootdir; /* root directory */
2022 unsigned int options;
2023 unsigned int flags;
2024 unsigned int maxinstances;
2025 unsigned int outsize;
2026 unsigned int insize;
2027 timeout_t timeout;
2028 VARARG(name,unicode_str); /* pipe name */
2029 @REPLY
2030 obj_handle_t handle; /* handle to the pipe */
2031 @END
2033 /* flags in create_named_pipe and get_named_pipe_info */
2034 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2035 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2036 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2037 #define NAMED_PIPE_SERVER_END 0x8000
2040 @REQ(get_named_pipe_info)
2041 obj_handle_t handle;
2042 @REPLY
2043 unsigned int flags;
2044 unsigned int maxinstances;
2045 unsigned int instances;
2046 unsigned int outsize;
2047 unsigned int insize;
2048 @END
2051 /* Create a window */
2052 @REQ(create_window)
2053 user_handle_t parent; /* parent window */
2054 user_handle_t owner; /* owner window */
2055 atom_t atom; /* class atom */
2056 void* instance; /* module instance */
2057 VARARG(class,unicode_str); /* class name */
2058 @REPLY
2059 user_handle_t handle; /* created window */
2060 user_handle_t parent; /* full handle of parent */
2061 user_handle_t owner; /* full handle of owner */
2062 int extra; /* number of extra bytes */
2063 void* class_ptr; /* pointer to class in client address space */
2064 @END
2067 /* Destroy a window */
2068 @REQ(destroy_window)
2069 user_handle_t handle; /* handle to the window */
2070 @END
2073 /* Retrieve the desktop window for the current thread */
2074 @REQ(get_desktop_window)
2075 int force; /* force creation if it doesn't exist */
2076 @REPLY
2077 user_handle_t top_window; /* handle to the desktop window */
2078 user_handle_t msg_window; /* handle to the top-level HWND_MESSAGE parent */
2079 @END
2082 /* Set a window owner */
2083 @REQ(set_window_owner)
2084 user_handle_t handle; /* handle to the window */
2085 user_handle_t owner; /* new owner */
2086 @REPLY
2087 user_handle_t full_owner; /* full handle of new owner */
2088 user_handle_t prev_owner; /* full handle of previous owner */
2089 @END
2092 /* Get information from a window handle */
2093 @REQ(get_window_info)
2094 user_handle_t handle; /* handle to the window */
2095 @REPLY
2096 user_handle_t full_handle; /* full 32-bit handle */
2097 user_handle_t last_active; /* last active popup */
2098 process_id_t pid; /* process owning the window */
2099 thread_id_t tid; /* thread owning the window */
2100 atom_t atom; /* class atom */
2101 int is_unicode; /* ANSI or unicode */
2102 @END
2105 /* Set some information in a window */
2106 @REQ(set_window_info)
2107 unsigned int flags; /* flags for fields to set (see below) */
2108 user_handle_t handle; /* handle to the window */
2109 unsigned int style; /* window style */
2110 unsigned int ex_style; /* window extended style */
2111 unsigned int id; /* window id */
2112 int is_unicode; /* ANSI or unicode */
2113 void* instance; /* creator instance */
2114 lparam_t user_data; /* user-specific data */
2115 int extra_offset; /* offset to set in extra bytes */
2116 data_size_t extra_size; /* size to set in extra bytes */
2117 lparam_t extra_value; /* value to set in extra bytes */
2118 @REPLY
2119 unsigned int old_style; /* old window style */
2120 unsigned int old_ex_style; /* old window extended style */
2121 unsigned int old_id; /* old window id */
2122 void* old_instance; /* old creator instance */
2123 lparam_t old_user_data; /* old user-specific data */
2124 lparam_t old_extra_value; /* old value in extra bytes */
2125 @END
2126 #define SET_WIN_STYLE 0x01
2127 #define SET_WIN_EXSTYLE 0x02
2128 #define SET_WIN_ID 0x04
2129 #define SET_WIN_INSTANCE 0x08
2130 #define SET_WIN_USERDATA 0x10
2131 #define SET_WIN_EXTRA 0x20
2132 #define SET_WIN_UNICODE 0x40
2135 /* Set the parent of a window */
2136 @REQ(set_parent)
2137 user_handle_t handle; /* handle to the window */
2138 user_handle_t parent; /* handle to the parent */
2139 @REPLY
2140 user_handle_t old_parent; /* old parent window */
2141 user_handle_t full_parent; /* full handle of new parent */
2142 @END
2145 /* Get a list of the window parents, up to the root of the tree */
2146 @REQ(get_window_parents)
2147 user_handle_t handle; /* handle to the window */
2148 @REPLY
2149 int count; /* total count of parents */
2150 VARARG(parents,user_handles); /* parent handles */
2151 @END
2154 /* Get a list of the window children */
2155 @REQ(get_window_children)
2156 obj_handle_t desktop; /* handle to desktop */
2157 user_handle_t parent; /* parent window */
2158 atom_t atom; /* class atom for the listed children */
2159 thread_id_t tid; /* thread owning the listed children */
2160 VARARG(class,unicode_str); /* class name */
2161 @REPLY
2162 int count; /* total count of children */
2163 VARARG(children,user_handles); /* children handles */
2164 @END
2167 /* Get a list of the window children that contain a given point */
2168 @REQ(get_window_children_from_point)
2169 user_handle_t parent; /* parent window */
2170 int x; /* point in parent coordinates */
2171 int y;
2172 @REPLY
2173 int count; /* total count of children */
2174 VARARG(children,user_handles); /* children handles */
2175 @END
2178 /* Get window tree information from a window handle */
2179 @REQ(get_window_tree)
2180 user_handle_t handle; /* handle to the window */
2181 @REPLY
2182 user_handle_t parent; /* parent window */
2183 user_handle_t owner; /* owner window */
2184 user_handle_t next_sibling; /* next sibling in Z-order */
2185 user_handle_t prev_sibling; /* prev sibling in Z-order */
2186 user_handle_t first_sibling; /* first sibling in Z-order */
2187 user_handle_t last_sibling; /* last sibling in Z-order */
2188 user_handle_t first_child; /* first child */
2189 user_handle_t last_child; /* last child */
2190 @END
2192 /* Set the position and Z order of a window */
2193 @REQ(set_window_pos)
2194 unsigned int flags; /* SWP_* flags */
2195 user_handle_t handle; /* handle to the window */
2196 user_handle_t previous; /* previous window in Z order */
2197 rectangle_t window; /* window rectangle */
2198 rectangle_t client; /* client rectangle */
2199 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE */
2200 @REPLY
2201 unsigned int new_style; /* new window style */
2202 unsigned int new_ex_style; /* new window extended style */
2203 @END
2206 /* Get the window and client rectangles of a window */
2207 @REQ(get_window_rectangles)
2208 user_handle_t handle; /* handle to the window */
2209 @REPLY
2210 rectangle_t window; /* window rectangle */
2211 rectangle_t visible; /* visible part of the window rectangle */
2212 rectangle_t client; /* client rectangle */
2213 @END
2216 /* Get the window text */
2217 @REQ(get_window_text)
2218 user_handle_t handle; /* handle to the window */
2219 @REPLY
2220 VARARG(text,unicode_str); /* window text */
2221 @END
2224 /* Set the window text */
2225 @REQ(set_window_text)
2226 user_handle_t handle; /* handle to the window */
2227 VARARG(text,unicode_str); /* window text */
2228 @END
2231 /* Get the coordinates offset between two windows */
2232 @REQ(get_windows_offset)
2233 user_handle_t from; /* handle to the first window */
2234 user_handle_t to; /* handle to the second window */
2235 @REPLY
2236 int x; /* x coordinate offset */
2237 int y; /* y coordinate offset */
2238 @END
2241 /* Get the visible region of a window */
2242 @REQ(get_visible_region)
2243 user_handle_t window; /* handle to the window */
2244 unsigned int flags; /* DCX flags */
2245 @REPLY
2246 user_handle_t top_win; /* top window to clip against */
2247 rectangle_t top_rect; /* top window visible rect with screen coords */
2248 rectangle_t win_rect; /* window rect in screen coords */
2249 data_size_t total_size; /* total size of the resulting region */
2250 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2251 @END
2254 /* Get the window region */
2255 @REQ(get_window_region)
2256 user_handle_t window; /* handle to the window */
2257 @REPLY
2258 data_size_t total_size; /* total size of the resulting region */
2259 VARARG(region,rectangles); /* list of rectangles for the region */
2260 @END
2263 /* Set the window region */
2264 @REQ(set_window_region)
2265 user_handle_t window; /* handle to the window */
2266 int redraw; /* redraw the window? */
2267 VARARG(region,rectangles); /* list of rectangles for the region */
2268 @END
2271 /* Get the window update region */
2272 @REQ(get_update_region)
2273 user_handle_t window; /* handle to the window */
2274 user_handle_t from_child; /* child to start searching from */
2275 unsigned int flags; /* update flags (see below) */
2276 @REPLY
2277 user_handle_t child; /* child to repaint (or window itself) */
2278 unsigned int flags; /* resulting update flags (see below) */
2279 data_size_t total_size; /* total size of the resulting region */
2280 VARARG(region,rectangles); /* list of rectangles for the region */
2281 @END
2282 #define UPDATE_NONCLIENT 0x01 /* get region for repainting non-client area */
2283 #define UPDATE_ERASE 0x02 /* get region for erasing client area */
2284 #define UPDATE_PAINT 0x04 /* get region for painting client area */
2285 #define UPDATE_INTERNALPAINT 0x08 /* get region if internal paint is pending */
2286 #define UPDATE_ALLCHILDREN 0x10 /* force repaint of all children */
2287 #define UPDATE_NOCHILDREN 0x20 /* don't try to repaint any children */
2288 #define UPDATE_NOREGION 0x40 /* don't return a region, only the flags */
2289 #define UPDATE_DELAYED_ERASE 0x80 /* still needs erase after BeginPaint */
2292 /* Update the z order of a window so that a given rectangle is fully visible */
2293 @REQ(update_window_zorder)
2294 user_handle_t window; /* handle to the window */
2295 rectangle_t rect; /* rectangle that must be visible */
2296 @END
2299 /* Mark parts of a window as needing a redraw */
2300 @REQ(redraw_window)
2301 user_handle_t window; /* handle to the window */
2302 unsigned int flags; /* RDW_* flags */
2303 VARARG(region,rectangles); /* list of rectangles for the region */
2304 @END
2307 /* Set a window property */
2308 @REQ(set_window_property)
2309 user_handle_t window; /* handle to the window */
2310 atom_t atom; /* property atom (if no name specified) */
2311 lparam_t data; /* data to store */
2312 VARARG(name,unicode_str); /* property name */
2313 @END
2316 /* Remove a window property */
2317 @REQ(remove_window_property)
2318 user_handle_t window; /* handle to the window */
2319 atom_t atom; /* property atom (if no name specified) */
2320 VARARG(name,unicode_str); /* property name */
2321 @REPLY
2322 lparam_t data; /* data stored in property */
2323 @END
2326 /* Get a window property */
2327 @REQ(get_window_property)
2328 user_handle_t window; /* handle to the window */
2329 atom_t atom; /* property atom (if no name specified) */
2330 VARARG(name,unicode_str); /* property name */
2331 @REPLY
2332 lparam_t data; /* data stored in property */
2333 @END
2336 /* Get the list of properties of a window */
2337 @REQ(get_window_properties)
2338 user_handle_t window; /* handle to the window */
2339 @REPLY
2340 int total; /* total number of properties */
2341 VARARG(props,properties); /* list of properties */
2342 @END
2345 /* Create a window station */
2346 @REQ(create_winstation)
2347 unsigned int flags; /* window station flags */
2348 unsigned int access; /* wanted access rights */
2349 unsigned int attributes; /* object attributes */
2350 VARARG(name,unicode_str); /* object name */
2351 @REPLY
2352 obj_handle_t handle; /* handle to the window station */
2353 @END
2356 /* Open a handle to a window station */
2357 @REQ(open_winstation)
2358 unsigned int access; /* wanted access rights */
2359 unsigned int attributes; /* object attributes */
2360 VARARG(name,unicode_str); /* object name */
2361 @REPLY
2362 obj_handle_t handle; /* handle to the window station */
2363 @END
2366 /* Close a window station */
2367 @REQ(close_winstation)
2368 obj_handle_t handle; /* handle to the window station */
2369 @END
2372 /* Get the process current window station */
2373 @REQ(get_process_winstation)
2374 @REPLY
2375 obj_handle_t handle; /* handle to the window station */
2376 @END
2379 /* Set the process current window station */
2380 @REQ(set_process_winstation)
2381 obj_handle_t handle; /* handle to the window station */
2382 @END
2385 /* Enumerate window stations */
2386 @REQ(enum_winstation)
2387 unsigned int index; /* current index */
2388 @REPLY
2389 unsigned int next; /* next index */
2390 VARARG(name,unicode_str); /* window station name */
2391 @END
2394 /* Create a desktop */
2395 @REQ(create_desktop)
2396 unsigned int flags; /* desktop flags */
2397 unsigned int access; /* wanted access rights */
2398 unsigned int attributes; /* object attributes */
2399 VARARG(name,unicode_str); /* object name */
2400 @REPLY
2401 obj_handle_t handle; /* handle to the desktop */
2402 @END
2405 /* Open a handle to a desktop */
2406 @REQ(open_desktop)
2407 obj_handle_t winsta; /* window station to open (null allowed) */
2408 unsigned int flags; /* desktop flags */
2409 unsigned int access; /* wanted access rights */
2410 unsigned int attributes; /* object attributes */
2411 VARARG(name,unicode_str); /* object name */
2412 @REPLY
2413 obj_handle_t handle; /* handle to the desktop */
2414 @END
2417 /* Close a desktop */
2418 @REQ(close_desktop)
2419 obj_handle_t handle; /* handle to the desktop */
2420 @END
2423 /* Get the thread current desktop */
2424 @REQ(get_thread_desktop)
2425 thread_id_t tid; /* thread id */
2426 @REPLY
2427 obj_handle_t handle; /* handle to the desktop */
2428 @END
2431 /* Set the thread current desktop */
2432 @REQ(set_thread_desktop)
2433 obj_handle_t handle; /* handle to the desktop */
2434 @END
2437 /* Enumerate desktops */
2438 @REQ(enum_desktop)
2439 obj_handle_t winstation; /* handle to the window station */
2440 unsigned int index; /* current index */
2441 @REPLY
2442 unsigned int next; /* next index */
2443 VARARG(name,unicode_str); /* window station name */
2444 @END
2447 /* Get/set information about a user object (window station or desktop) */
2448 @REQ(set_user_object_info)
2449 obj_handle_t handle; /* handle to the object */
2450 unsigned int flags; /* information to set */
2451 unsigned int obj_flags; /* new object flags */
2452 @REPLY
2453 int is_desktop; /* is object a desktop? */
2454 unsigned int old_obj_flags; /* old object flags */
2455 VARARG(name,unicode_str); /* object name */
2456 @END
2457 #define SET_USER_OBJECT_FLAGS 1
2460 /* Attach (or detach) thread inputs */
2461 @REQ(attach_thread_input)
2462 thread_id_t tid_from; /* thread to be attached */
2463 thread_id_t tid_to; /* thread to which tid_from should be attached */
2464 int attach; /* is it an attach? */
2465 @END
2468 /* Get input data for a given thread */
2469 @REQ(get_thread_input)
2470 thread_id_t tid; /* id of thread */
2471 @REPLY
2472 user_handle_t focus; /* handle to the focus window */
2473 user_handle_t capture; /* handle to the capture window */
2474 user_handle_t active; /* handle to the active window */
2475 user_handle_t foreground; /* handle to the global foreground window */
2476 user_handle_t menu_owner; /* handle to the menu owner */
2477 user_handle_t move_size; /* handle to the moving/resizing window */
2478 user_handle_t caret; /* handle to the caret window */
2479 rectangle_t rect; /* caret rectangle */
2480 @END
2483 /* Get the time of the last input event */
2484 @REQ(get_last_input_time)
2485 @REPLY
2486 unsigned int time;
2487 @END
2490 /* Retrieve queue keyboard state for a given thread */
2491 @REQ(get_key_state)
2492 thread_id_t tid; /* id of thread */
2493 int key; /* optional key code or -1 */
2494 @REPLY
2495 unsigned char state; /* state of specified key */
2496 VARARG(keystate,bytes); /* state array for all the keys */
2497 @END
2499 /* Set queue keyboard state for a given thread */
2500 @REQ(set_key_state)
2501 thread_id_t tid; /* id of thread */
2502 VARARG(keystate,bytes); /* state array for all the keys */
2503 @END
2505 /* Set the system foreground window */
2506 @REQ(set_foreground_window)
2507 user_handle_t handle; /* handle to the foreground window */
2508 @REPLY
2509 user_handle_t previous; /* handle to the previous foreground window */
2510 int send_msg_old; /* whether we have to send a msg to the old window */
2511 int send_msg_new; /* whether we have to send a msg to the new window */
2512 @END
2514 /* Set the current thread focus window */
2515 @REQ(set_focus_window)
2516 user_handle_t handle; /* handle to the focus window */
2517 @REPLY
2518 user_handle_t previous; /* handle to the previous focus window */
2519 @END
2521 /* Set the current thread active window */
2522 @REQ(set_active_window)
2523 user_handle_t handle; /* handle to the active window */
2524 @REPLY
2525 user_handle_t previous; /* handle to the previous active window */
2526 @END
2528 /* Set the current thread capture window */
2529 @REQ(set_capture_window)
2530 user_handle_t handle; /* handle to the capture window */
2531 unsigned int flags; /* capture flags (see below) */
2532 @REPLY
2533 user_handle_t previous; /* handle to the previous capture window */
2534 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2535 @END
2536 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2537 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2540 /* Set the current thread caret window */
2541 @REQ(set_caret_window)
2542 user_handle_t handle; /* handle to the caret window */
2543 int width; /* caret width */
2544 int height; /* caret height */
2545 @REPLY
2546 user_handle_t previous; /* handle to the previous caret window */
2547 rectangle_t old_rect; /* previous caret rectangle */
2548 int old_hide; /* previous hide count */
2549 int old_state; /* previous caret state (1=on, 0=off) */
2550 @END
2553 /* Set the current thread caret information */
2554 @REQ(set_caret_info)
2555 unsigned int flags; /* caret flags (see below) */
2556 user_handle_t handle; /* handle to the caret window */
2557 int x; /* caret x position */
2558 int y; /* caret y position */
2559 int hide; /* increment for hide count (can be negative to show it) */
2560 int state; /* caret state (1=on, 0=off, -1=toggle current state) */
2561 @REPLY
2562 user_handle_t full_handle; /* handle to the current caret window */
2563 rectangle_t old_rect; /* previous caret rectangle */
2564 int old_hide; /* previous hide count */
2565 int old_state; /* previous caret state (1=on, 0=off) */
2566 @END
2567 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2568 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2569 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2572 /* Set a window hook */
2573 @REQ(set_hook)
2574 int id; /* id of the hook */
2575 process_id_t pid; /* id of process to set the hook into */
2576 thread_id_t tid; /* id of thread to set the hook into */
2577 int event_min;
2578 int event_max;
2579 int flags;
2580 void* proc; /* hook procedure */
2581 int unicode; /* is it a unicode hook? */
2582 VARARG(module,unicode_str); /* module name */
2583 @REPLY
2584 user_handle_t handle; /* handle to the hook */
2585 unsigned int active_hooks; /* active hooks bitmap */
2586 @END
2589 /* Remove a window hook */
2590 @REQ(remove_hook)
2591 user_handle_t handle; /* handle to the hook */
2592 int id; /* id of the hook if handle is 0 */
2593 void* proc; /* hook procedure if handle is 0 */
2594 @REPLY
2595 unsigned int active_hooks; /* active hooks bitmap */
2596 @END
2599 /* Start calling a hook chain */
2600 @REQ(start_hook_chain)
2601 int id; /* id of the hook */
2602 int event; /* signalled event */
2603 user_handle_t window; /* handle to the event window */
2604 int object_id; /* object id for out of context winevent */
2605 int child_id; /* child id for out of context winevent */
2606 @REPLY
2607 user_handle_t handle; /* handle to the next hook */
2608 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2609 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2610 void* proc; /* hook procedure */
2611 int unicode; /* is it a unicode hook? */
2612 unsigned int active_hooks; /* active hooks bitmap */
2613 VARARG(module,unicode_str); /* module name */
2614 @END
2617 /* Finished calling a hook chain */
2618 @REQ(finish_hook_chain)
2619 int id; /* id of the hook */
2620 @END
2623 /* Get the hook information */
2624 @REQ(get_hook_info)
2625 user_handle_t handle; /* handle to the current hook */
2626 int get_next; /* do we want info about current or next hook? */
2627 int event; /* signalled event */
2628 user_handle_t window; /* handle to the event window */
2629 int object_id; /* object id for out of context winevent */
2630 int child_id; /* child id for out of context winevent */
2631 @REPLY
2632 user_handle_t handle; /* handle to the hook */
2633 int id; /* id of the hook */
2634 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2635 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2636 void* proc; /* hook procedure */
2637 int unicode; /* is it a unicode hook? */
2638 VARARG(module,unicode_str); /* module name */
2639 @END
2642 /* Create a window class */
2643 @REQ(create_class)
2644 int local; /* is it a local class? */
2645 atom_t atom; /* class atom */
2646 unsigned int style; /* class style */
2647 void* instance; /* module instance */
2648 int extra; /* number of extra class bytes */
2649 int win_extra; /* number of window extra bytes */
2650 void* client_ptr; /* pointer to class in client address space */
2651 VARARG(name,unicode_str); /* class name */
2652 @REPLY
2653 atom_t atom; /* resulting class atom */
2654 @END
2657 /* Destroy a window class */
2658 @REQ(destroy_class)
2659 atom_t atom; /* class atom */
2660 void* instance; /* module instance */
2661 VARARG(name,unicode_str); /* class name */
2662 @REPLY
2663 void* client_ptr; /* pointer to class in client address space */
2664 @END
2667 /* Set some information in a class */
2668 @REQ(set_class_info)
2669 user_handle_t window; /* handle to the window */
2670 unsigned int flags; /* flags for info to set (see below) */
2671 atom_t atom; /* class atom */
2672 unsigned int style; /* class style */
2673 int win_extra; /* number of window extra bytes */
2674 void* instance; /* module instance */
2675 int extra_offset; /* offset to set in extra bytes */
2676 data_size_t extra_size; /* size to set in extra bytes */
2677 lparam_t extra_value; /* value to set in extra bytes */
2678 @REPLY
2679 atom_t old_atom; /* previous class atom */
2680 unsigned int old_style; /* previous class style */
2681 int old_extra; /* previous number of class extra bytes */
2682 int old_win_extra; /* previous number of window extra bytes */
2683 void* old_instance; /* previous module instance */
2684 lparam_t old_extra_value; /* old value in extra bytes */
2685 @END
2686 #define SET_CLASS_ATOM 0x0001
2687 #define SET_CLASS_STYLE 0x0002
2688 #define SET_CLASS_WINEXTRA 0x0004
2689 #define SET_CLASS_INSTANCE 0x0008
2690 #define SET_CLASS_EXTRA 0x0010
2693 /* Set/get clipboard information */
2694 @REQ(set_clipboard_info)
2695 unsigned int flags; /* flags for fields to set (see below) */
2696 user_handle_t clipboard; /* clipboard window */
2697 user_handle_t owner; /* clipboard owner */
2698 user_handle_t viewer; /* first clipboard viewer */
2699 unsigned int seqno; /* change sequence number */
2700 @REPLY
2701 unsigned int flags; /* status flags (see below) */
2702 user_handle_t old_clipboard; /* old clipboard window */
2703 user_handle_t old_owner; /* old clipboard owner */
2704 user_handle_t old_viewer; /* old clipboard viewer */
2705 unsigned int seqno; /* current sequence number */
2706 @END
2708 #define SET_CB_OPEN 0x001
2709 #define SET_CB_OWNER 0x002
2710 #define SET_CB_VIEWER 0x004
2711 #define SET_CB_SEQNO 0x008
2712 #define SET_CB_RELOWNER 0x010
2713 #define SET_CB_CLOSE 0x020
2714 #define CB_OPEN 0x040
2715 #define CB_OWNER 0x080
2716 #define CB_PROCESS 0x100
2719 /* Open a security token */
2720 @REQ(open_token)
2721 obj_handle_t handle; /* handle to the thread or process */
2722 unsigned int access; /* access rights to the new token */
2723 unsigned int attributes;/* object attributes */
2724 unsigned int flags; /* flags (see below) */
2725 @REPLY
2726 obj_handle_t token; /* handle to the token */
2727 @END
2728 #define OPEN_TOKEN_THREAD 1
2729 #define OPEN_TOKEN_AS_SELF 2
2732 /* Set/get the global windows */
2733 @REQ(set_global_windows)
2734 unsigned int flags; /* flags for fields to set (see below) */
2735 user_handle_t shell_window; /* handle to the new shell window */
2736 user_handle_t shell_listview; /* handle to the new shell listview window */
2737 user_handle_t progman_window; /* handle to the new program manager window */
2738 user_handle_t taskman_window; /* handle to the new task manager window */
2739 @REPLY
2740 user_handle_t old_shell_window; /* handle to the shell window */
2741 user_handle_t old_shell_listview; /* handle to the shell listview window */
2742 user_handle_t old_progman_window; /* handle to the new program manager window */
2743 user_handle_t old_taskman_window; /* handle to the new task manager window */
2744 @END
2745 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
2746 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
2747 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
2749 /* Adjust the privileges held by a token */
2750 @REQ(adjust_token_privileges)
2751 obj_handle_t handle; /* handle to the token */
2752 int disable_all; /* disable all privileges? */
2753 int get_modified_state; /* get modified privileges? */
2754 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
2755 @REPLY
2756 unsigned int len; /* total length in bytes required to store token privileges */
2757 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
2758 @END
2760 /* Retrieves the set of privileges held by or available to a token */
2761 @REQ(get_token_privileges)
2762 obj_handle_t handle; /* handle to the token */
2763 @REPLY
2764 unsigned int len; /* total length in bytes required to store token privileges */
2765 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2766 @END
2768 /* Check the token has the required privileges */
2769 @REQ(check_token_privileges)
2770 obj_handle_t handle; /* handle to the token */
2771 int all_required; /* are all the privileges required for the check to succeed? */
2772 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
2773 @REPLY
2774 int has_privileges; /* does the token have the required privileges? */
2775 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2776 @END
2778 @REQ(duplicate_token)
2779 obj_handle_t handle; /* handle to the token to duplicate */
2780 unsigned int access; /* access rights to the new token */
2781 unsigned int attributes; /* object attributes */
2782 int primary; /* is the new token to be a primary one? */
2783 int impersonation_level; /* impersonation level of the new token */
2784 @REPLY
2785 obj_handle_t new_handle; /* duplicated handle */
2786 @END
2788 @REQ(access_check)
2789 obj_handle_t handle; /* handle to the token */
2790 unsigned int desired_access; /* desired access to the object */
2791 unsigned int mapping_read; /* mapping from generic read to specific rights */
2792 unsigned int mapping_write; /* mapping from generic write to specific rights */
2793 unsigned int mapping_execute; /* mapping from generic execute to specific rights */
2794 unsigned int mapping_all; /* mapping from generic all to specific rights */
2795 VARARG(sd,security_descriptor); /* security descriptor to check */
2796 @REPLY
2797 unsigned int access_granted; /* access rights actually granted */
2798 unsigned int access_status; /* was access granted? */
2799 unsigned int privileges_len; /* length needed to store privileges */
2800 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
2801 @END
2803 @REQ(get_token_user)
2804 obj_handle_t handle; /* handle to the token */
2805 @REPLY
2806 data_size_t user_len; /* length needed to store user */
2807 VARARG(user,SID); /* sid of the user the token represents */
2808 @END
2810 @REQ(get_token_groups)
2811 obj_handle_t handle; /* handle to the token */
2812 @REPLY
2813 data_size_t user_len; /* length needed to store user */
2814 VARARG(user,token_groups); /* groups the token's user belongs to */
2815 @END
2817 @REQ(set_security_object)
2818 obj_handle_t handle; /* handle to the object */
2819 unsigned int security_info; /* which parts of security descriptor to set */
2820 VARARG(sd,security_descriptor); /* security descriptor to set */
2821 @END
2823 @REQ(get_security_object)
2824 obj_handle_t handle; /* handle to the object */
2825 unsigned int security_info; /* which parts of security descriptor to get */
2826 @REPLY
2827 unsigned int sd_len; /* buffer size needed for sd */
2828 VARARG(sd,security_descriptor); /* retrieved security descriptor */
2829 @END
2831 /* Create a mailslot */
2832 @REQ(create_mailslot)
2833 unsigned int access; /* wanted access rights */
2834 unsigned int attributes; /* object attributes */
2835 obj_handle_t rootdir; /* root directory */
2836 unsigned int max_msgsize;
2837 timeout_t read_timeout;
2838 VARARG(name,unicode_str); /* mailslot name */
2839 @REPLY
2840 obj_handle_t handle; /* handle to the mailslot */
2841 @END
2844 /* Set mailslot information */
2845 @REQ(set_mailslot_info)
2846 obj_handle_t handle; /* handle to the mailslot */
2847 unsigned int flags;
2848 timeout_t read_timeout;
2849 @REPLY
2850 unsigned int max_msgsize;
2851 timeout_t read_timeout;
2852 @END
2853 #define MAILSLOT_SET_READ_TIMEOUT 1
2856 /* Create a directory object */
2857 @REQ(create_directory)
2858 unsigned int access; /* access flags */
2859 unsigned int attributes; /* object attributes */
2860 obj_handle_t rootdir; /* root directory */
2861 VARARG(directory_name,unicode_str); /* Directory name */
2862 @REPLY
2863 obj_handle_t handle; /* handle to the directory */
2864 @END
2867 /* Open a directory object */
2868 @REQ(open_directory)
2869 unsigned int access; /* access flags */
2870 unsigned int attributes; /* object attributes */
2871 obj_handle_t rootdir; /* root directory */
2872 VARARG(directory_name,unicode_str); /* Directory name */
2873 @REPLY
2874 obj_handle_t handle; /* handle to the directory */
2875 @END
2878 /* Get a directory entry by index */
2879 @REQ(get_directory_entry)
2880 obj_handle_t handle; /* handle to the directory */
2881 unsigned int index; /* entry index */
2882 @REPLY
2883 data_size_t name_len; /* length of the entry name in bytes */
2884 VARARG(name,unicode_str,name_len); /* entry name */
2885 VARARG(type,unicode_str); /* entry type */
2886 @END
2889 /* Create a symbolic link object */
2890 @REQ(create_symlink)
2891 unsigned int access; /* access flags */
2892 unsigned int attributes; /* object attributes */
2893 obj_handle_t rootdir; /* root directory */
2894 data_size_t name_len; /* length of the symlink name in bytes */
2895 VARARG(name,unicode_str,name_len); /* symlink name */
2896 VARARG(target_name,unicode_str); /* target name */
2897 @REPLY
2898 obj_handle_t handle; /* handle to the symlink */
2899 @END
2902 /* Open a symbolic link object */
2903 @REQ(open_symlink)
2904 unsigned int access; /* access flags */
2905 unsigned int attributes; /* object attributes */
2906 obj_handle_t rootdir; /* root directory */
2907 VARARG(name,unicode_str); /* symlink name */
2908 @REPLY
2909 obj_handle_t handle; /* handle to the symlink */
2910 @END
2913 /* Query a symbolic link object */
2914 @REQ(query_symlink)
2915 obj_handle_t handle; /* handle to the symlink */
2916 @REPLY
2917 VARARG(target_name,unicode_str); /* target name */
2918 @END
2921 /* Query basic object information */
2922 @REQ(get_object_info)
2923 obj_handle_t handle; /* handle to the object */
2924 @REPLY
2925 unsigned int access; /* granted access mask */
2926 unsigned int ref_count; /* object ref count */
2927 @END
2930 /* Unlink a named object */
2931 @REQ(unlink_object)
2932 obj_handle_t handle; /* handle to the object */
2933 @END
2936 /* Query the impersonation level of an impersonation token */
2937 @REQ(get_token_impersonation_level)
2938 obj_handle_t handle; /* handle to the object */
2939 @REPLY
2940 int impersonation_level; /* impersonation level of the impersonation token */
2941 @END
2943 /* Allocate a locally-unique identifier */
2944 @REQ(allocate_locally_unique_id)
2945 @REPLY
2946 luid_t luid;
2947 @END
2950 /* Create a device manager */
2951 @REQ(create_device_manager)
2952 unsigned int access; /* wanted access rights */
2953 unsigned int attributes; /* object attributes */
2954 @REPLY
2955 obj_handle_t handle; /* handle to the device */
2956 @END
2959 /* Create a device */
2960 @REQ(create_device)
2961 unsigned int access; /* wanted access rights */
2962 unsigned int attributes; /* object attributes */
2963 obj_handle_t rootdir; /* root directory */
2964 obj_handle_t manager; /* device manager */
2965 void* user_ptr; /* opaque ptr for use by client */
2966 VARARG(name,unicode_str); /* object name */
2967 @REPLY
2968 obj_handle_t handle; /* handle to the device */
2969 @END
2972 /* Delete a device */
2973 @REQ(delete_device)
2974 obj_handle_t handle; /* handle to the device */
2975 @END
2978 /* Retrieve the next pending device ioctl request */
2979 @REQ(get_next_device_request)
2980 obj_handle_t manager; /* handle to the device manager */
2981 obj_handle_t prev; /* handle to the previous ioctl */
2982 unsigned int status; /* status of the previous ioctl */
2983 VARARG(prev_data,bytes); /* output data of the previous ioctl */
2984 @REPLY
2985 obj_handle_t next; /* handle to the next ioctl */
2986 ioctl_code_t code; /* ioctl code */
2987 void* user_ptr; /* opaque ptr for the device */
2988 data_size_t in_size; /* total needed input size */
2989 data_size_t out_size; /* needed output size */
2990 VARARG(next_data,bytes); /* input data of the next ioctl */
2991 @END
2994 /* Make the current process a system process */
2995 @REQ(make_process_system)
2996 @REPLY
2997 obj_handle_t event; /* event signaled when all user processes have exited */
2998 @END
3001 /* Get detailed fixed-size information about a token */
3002 @REQ(get_token_statistics)
3003 obj_handle_t handle; /* handle to the object */
3004 @REPLY
3005 luid_t token_id; /* locally-unique identifier of the token */
3006 luid_t modified_id; /* locally-unique identifier of the modified version of the token */
3007 int primary; /* is the token primary or impersonation? */
3008 int impersonation_level; /* level of impersonation */
3009 int group_count; /* the number of groups the token is a member of */
3010 int privilege_count; /* the number of privileges the token has */
3011 @END
3014 /* Create I/O completion port */
3015 @REQ(create_completion)
3016 unsigned int access; /* desired access to a port */
3017 unsigned int attributes; /* object attributes */
3018 unsigned int concurrent; /* max number of concurrent active threads */
3019 obj_handle_t rootdir; /* root directory */
3020 VARARG(filename,string); /* port name */
3021 @REPLY
3022 obj_handle_t handle; /* port handle */
3023 @END
3026 /* Open I/O completion port */
3027 @REQ(open_completion)
3028 unsigned int access; /* desired access to a port */
3029 unsigned int attributes; /* object attributes */
3030 obj_handle_t rootdir; /* root directory */
3031 VARARG(filename,string); /* port name */
3032 @REPLY
3033 obj_handle_t handle; /* port handle */
3034 @END
3037 /* add completion to completion port */
3038 @REQ(add_completion)
3039 obj_handle_t handle; /* port handle */
3040 apc_param_t ckey; /* completion key */
3041 apc_param_t cvalue; /* completion value */
3042 unsigned int information; /* IO_STATUS_BLOCK Information */
3043 unsigned int status; /* completion result */
3044 @END
3047 /* get completion from completion port queue */
3048 @REQ(remove_completion)
3049 obj_handle_t handle; /* port handle */
3050 @REPLY
3051 apc_param_t ckey; /* completion key */
3052 apc_param_t cvalue; /* completion value */
3053 unsigned int information; /* IO_STATUS_BLOCK Information */
3054 unsigned int status; /* completion result */
3055 @END
3058 /* get completion queue depth */
3059 @REQ(query_completion)
3060 obj_handle_t handle; /* port handle */
3061 @REPLY
3062 unsigned int depth; /* completion queue depth */
3063 @END
3066 /* associate object with completion port */
3067 @REQ(set_completion_info)
3068 obj_handle_t handle; /* object handle */
3069 obj_handle_t chandle; /* port handle */
3070 apc_param_t ckey; /* completion key */
3071 @END
3074 /* check for associated completion and push msg */
3075 @REQ(add_fd_completion)
3076 obj_handle_t handle; /* async' object */
3077 apc_param_t cvalue; /* completion value */
3078 unsigned int status; /* completion status */
3079 unsigned int information; /* IO_STATUS_BLOCK Information */
3080 @END
3083 /* Retrieve layered info for a window */
3084 @REQ(get_window_layered_info)
3085 user_handle_t handle; /* handle to the window */
3086 @REPLY
3087 unsigned int color_key; /* color key */
3088 unsigned int alpha; /* alpha (0..255) */
3089 unsigned int flags; /* LWA_* flags */
3090 @END
3093 /* Set layered info for a window */
3094 @REQ(set_window_layered_info)
3095 user_handle_t handle; /* handle to the window */
3096 unsigned int color_key; /* color key */
3097 unsigned int alpha; /* alpha (0..255) */
3098 unsigned int flags; /* LWA_* flags */
3099 @END