Renamed handle_t to obj_handle_t to avoid conflict with rpcdce.h.
diff --git a/server/console.c b/server/console.c index fac9960..66787f8 100644 --- a/server/console.c +++ b/server/console.c
@@ -328,7 +328,7 @@ * 2/ parent is a renderer which launches process, and process should attach to the console * renderered by parent */ -void inherit_console(struct thread *parent_thread, struct process *process, handle_t hconin) +void inherit_console(struct thread *parent_thread, struct process *process, obj_handle_t hconin) { int done = 0; struct process* parent = parent_thread->process; @@ -360,7 +360,7 @@ } } -static struct console_input* console_input_get( handle_t handle, unsigned access ) +static struct console_input* console_input_get( obj_handle_t handle, unsigned access ) { struct console_input* console = 0; @@ -385,7 +385,7 @@ return console->recnum ? 1 : 0; } -static int get_console_mode( handle_t handle ) +static int get_console_mode( obj_handle_t handle ) { struct object *obj; int ret = 0; @@ -404,7 +404,7 @@ } /* changes the mode of either a console input or a screen buffer */ -static int set_console_mode( handle_t handle, int mode ) +static int set_console_mode( obj_handle_t handle, int mode ) { struct object *obj; int ret = 0; @@ -451,7 +451,7 @@ } /* retrieve a pointer to the console input records */ -static int read_console_input( handle_t handle, int count, int flush ) +static int read_console_input( obj_handle_t handle, int count, int flush ) { struct console_input *console; @@ -1038,7 +1038,7 @@ } /* scroll parts of a screen buffer */ -static void scroll_console_output( handle_t handle, int xsrc, int ysrc, int xdst, int ydst, +static void scroll_console_output( obj_handle_t handle, int xsrc, int ysrc, int xdst, int ydst, int w, int h ) { struct screen_buffer *screen_buffer; @@ -1101,8 +1101,8 @@ /* allocate a console for the renderer */ DECL_HANDLER(alloc_console) { - handle_t in = 0; - handle_t evt = 0; + obj_handle_t in = 0; + obj_handle_t evt = 0; struct process *process; struct process *renderer = current->process; struct console_input *console; @@ -1180,7 +1180,7 @@ obj = grab_object( (struct object*)current->process->console->active ); break; default: - if ((obj = get_handle_obj( current->process, (handle_t)req->from, + if ((obj = get_handle_obj( current->process, (obj_handle_t)req->from, GENERIC_READ|GENERIC_WRITE, &console_input_ops ))) { struct console_input* console = (struct console_input*)obj;
diff --git a/server/console.h b/server/console.h index 69b4c1c..7ac1ea3 100644 --- a/server/console.h +++ b/server/console.h
@@ -45,7 +45,7 @@ /* console functions */ -extern void inherit_console(struct thread *parent_thread, struct process *process, handle_t hconin); +extern void inherit_console(struct thread *parent_thread, struct process *process, obj_handle_t hconin); extern int free_console( struct process *process ); #endif /* __WINE_SERVER_CONSOLE_H */
diff --git a/server/debugger.c b/server/debugger.c index dcf7e0f..409adc3 100644 --- a/server/debugger.c +++ b/server/debugger.c
@@ -115,7 +115,7 @@ { struct process *debugger = event->debugger->process; struct thread *thread = event->sender; - handle_t handle; + obj_handle_t handle; /* documented: THREAD_GET_CONTEXT | THREAD_SET_CONTEXT | THREAD_SUSPEND_RESUME */ if (!(handle = alloc_handle( debugger, thread, THREAD_ALL_ACCESS, FALSE ))) return 0; @@ -130,7 +130,7 @@ struct process *debugger = event->debugger->process; struct thread *thread = event->sender; struct process *process = thread->process; - handle_t handle; + obj_handle_t handle; /* documented: PROCESS_VM_READ | PROCESS_VM_WRITE */ if (!(handle = alloc_handle( debugger, process, PROCESS_ALL_ACCESS, FALSE ))) return 0; @@ -182,7 +182,7 @@ { struct process *debugger = event->debugger->process; struct process_dll *dll = arg; - handle_t handle = 0; + obj_handle_t handle = 0; if (dll->file && !(handle = alloc_handle( debugger, dll->file, GENERIC_READ, FALSE ))) return 0;
diff --git a/server/event.c b/server/event.c index 3450933..020c70c 100644 --- a/server/event.c +++ b/server/event.c
@@ -77,7 +77,7 @@ return event; } -struct event *get_event_obj( struct process *process, handle_t handle, unsigned int access ) +struct event *get_event_obj( struct process *process, obj_handle_t handle, unsigned int access ) { return (struct event *)get_handle_obj( process, handle, access, &event_ops ); }
diff --git a/server/file.c b/server/file.c index cdfb580..d8da517 100644 --- a/server/file.c +++ b/server/file.c
@@ -463,12 +463,12 @@ } } -struct file *get_file_obj( struct process *process, handle_t handle, unsigned int access ) +struct file *get_file_obj( struct process *process, obj_handle_t handle, unsigned int access ) { return (struct file *)get_handle_obj( process, handle, access, &file_ops ); } -static int set_file_pointer( handle_t handle, unsigned int *low, int *high, int whence ) +static int set_file_pointer( obj_handle_t handle, unsigned int *low, int *high, int whence ) { struct file *file; off_t result,xto; @@ -548,7 +548,7 @@ return ret; } -static int set_file_time( handle_t handle, time_t access_time, time_t write_time ) +static int set_file_time( obj_handle_t handle, time_t access_time, time_t write_time ) { struct file *file; struct utimbuf utimbuf;
diff --git a/server/handle.c b/server/handle.c index d419d59..89c92d0 100644 --- a/server/handle.c +++ b/server/handle.c
@@ -65,11 +65,11 @@ /* handle to table index conversion */ /* handles are a multiple of 4 under NT; handle 0 is not used */ -inline static handle_t index_to_handle( int index ) +inline static obj_handle_t index_to_handle( int index ) { - return (handle_t)((index + 1) << 2); + return (obj_handle_t)((index + 1) << 2); } -inline static int handle_to_index( handle_t handle ) +inline static int handle_to_index( obj_handle_t handle ) { return ((unsigned int)handle >> 2) - 1; } @@ -78,18 +78,18 @@ #define HANDLE_OBFUSCATOR 0x544a4def -inline static int handle_is_global( handle_t handle) +inline static int handle_is_global( obj_handle_t handle) { return ((unsigned long)handle ^ HANDLE_OBFUSCATOR) < 0x10000; } -inline static handle_t handle_local_to_global( handle_t handle ) +inline static obj_handle_t handle_local_to_global( obj_handle_t handle ) { if (!handle) return 0; - return (handle_t)((unsigned long)handle ^ HANDLE_OBFUSCATOR); + return (obj_handle_t)((unsigned long)handle ^ HANDLE_OBFUSCATOR); } -inline static handle_t handle_global_to_local( handle_t handle ) +inline static obj_handle_t handle_global_to_local( obj_handle_t handle ) { - return (handle_t)((unsigned long)handle ^ HANDLE_OBFUSCATOR); + return (obj_handle_t)((unsigned long)handle ^ HANDLE_OBFUSCATOR); } @@ -189,7 +189,7 @@ } /* allocate the first free entry in the handle table */ -static handle_t alloc_entry( struct handle_table *table, void *obj, unsigned int access ) +static obj_handle_t alloc_entry( struct handle_table *table, void *obj, unsigned int access ) { struct handle_entry *entry = table->entries + table->free; int i; @@ -211,7 +211,7 @@ /* allocate a handle for an object, incrementing its refcount */ /* return the handle, or 0 on error */ -handle_t alloc_handle( struct process *process, void *obj, unsigned int access, int inherit ) +obj_handle_t alloc_handle( struct process *process, void *obj, unsigned int access, int inherit ) { struct handle_table *table = (struct handle_table *)process->handles; @@ -223,7 +223,7 @@ /* allocate a global handle for an object, incrementing its refcount */ /* return the handle, or 0 on error */ -static handle_t alloc_global_handle( void *obj, unsigned int access ) +static obj_handle_t alloc_global_handle( void *obj, unsigned int access ) { if (!global_table) { @@ -234,7 +234,7 @@ } /* return a handle entry, or NULL if the handle is invalid */ -static struct handle_entry *get_handle( struct process *process, handle_t handle ) +static struct handle_entry *get_handle( struct process *process, obj_handle_t handle ) { struct handle_table *table = (struct handle_table *)process->handles; struct handle_entry *entry; @@ -312,7 +312,7 @@ /* close a handle and decrement the refcount of the associated object */ /* return 1 if OK, 0 on error */ -int close_handle( struct process *process, handle_t handle, int *fd ) +int close_handle( struct process *process, obj_handle_t handle, int *fd ) { struct handle_table *table; struct handle_entry *entry; @@ -347,7 +347,7 @@ } /* retrieve the object corresponding to one of the magic pseudo-handles */ -static inline struct object *get_magic_handle( handle_t handle ) +static inline struct object *get_magic_handle( obj_handle_t handle ) { switch((unsigned long)handle) { @@ -362,7 +362,7 @@ } /* retrieve the object corresponding to a handle, incrementing its refcount */ -struct object *get_handle_obj( struct process *process, handle_t handle, +struct object *get_handle_obj( struct process *process, obj_handle_t handle, unsigned int access, const struct object_ops *ops ) { struct handle_entry *entry; @@ -387,7 +387,7 @@ } /* retrieve the cached fd for a given handle */ -int get_handle_fd( struct process *process, handle_t handle, unsigned int access ) +int get_handle_fd( struct process *process, obj_handle_t handle, unsigned int access ) { struct handle_entry *entry; @@ -402,7 +402,7 @@ /* get/set the handle reserved flags */ /* return the old flags (or -1 on error) */ -static int set_handle_info( struct process *process, handle_t handle, +static int set_handle_info( struct process *process, obj_handle_t handle, int mask, int flags, int *fd ) { struct handle_entry *entry; @@ -426,10 +426,10 @@ } /* duplicate a handle */ -handle_t duplicate_handle( struct process *src, handle_t src_handle, struct process *dst, +obj_handle_t duplicate_handle( struct process *src, obj_handle_t src_handle, struct process *dst, unsigned int access, int inherit, int options ) { - handle_t res; + obj_handle_t res; struct object *obj = get_handle_obj( src, src_handle, 0, NULL ); if (!obj) return 0; @@ -454,10 +454,10 @@ } /* open a new handle to an existing object */ -handle_t open_object( const WCHAR *name, size_t len, const struct object_ops *ops, +obj_handle_t open_object( const WCHAR *name, size_t len, const struct object_ops *ops, unsigned int access, int inherit ) { - handle_t handle = 0; + obj_handle_t handle = 0; struct object *obj = find_object( name, len ); if (obj) {
diff --git a/server/handle.h b/server/handle.h index d63c89b..0dc9fb3 100644 --- a/server/handle.h +++ b/server/handle.h
@@ -32,15 +32,15 @@ /* alloc_handle takes a void *obj for convenience, but you better make sure */ /* that the thing pointed to starts with a struct object... */ -extern handle_t alloc_handle( struct process *process, void *obj, +extern obj_handle_t alloc_handle( struct process *process, void *obj, unsigned int access, int inherit ); -extern int close_handle( struct process *process, handle_t handle, int *fd ); -extern struct object *get_handle_obj( struct process *process, handle_t handle, +extern int close_handle( struct process *process, obj_handle_t handle, int *fd ); +extern struct object *get_handle_obj( struct process *process, obj_handle_t handle, unsigned int access, const struct object_ops *ops ); -extern int get_handle_fd( struct process *process, handle_t handle, unsigned int access ); -extern handle_t duplicate_handle( struct process *src, handle_t src_handle, struct process *dst, +extern int get_handle_fd( struct process *process, obj_handle_t handle, unsigned int access ); +extern obj_handle_t duplicate_handle( struct process *src, obj_handle_t src_handle, struct process *dst, unsigned int access, int inherit, int options ); -extern handle_t open_object( const WCHAR *name, size_t len, const struct object_ops *ops, +extern obj_handle_t open_object( const WCHAR *name, size_t len, const struct object_ops *ops, unsigned int access, int inherit ); extern struct object *alloc_handle_table( struct process *process, int count ); extern struct object *copy_handle_table( struct process *process, struct process *parent );
diff --git a/server/mapping.c b/server/mapping.c index 73cc89c..ef1d4cc 100644 --- a/server/mapping.c +++ b/server/mapping.c
@@ -251,7 +251,7 @@ static struct object *create_mapping( int size_high, int size_low, int protect, - handle_t handle, const WCHAR *name, size_t len ) + obj_handle_t handle, const WCHAR *name, size_t len ) { struct mapping *mapping; int access = 0;
diff --git a/server/named_pipe.c b/server/named_pipe.c index ecad8c1..68c4f20 100644 --- a/server/named_pipe.c +++ b/server/named_pipe.c
@@ -233,7 +233,7 @@ return pipe; } -static struct pipe_user *get_pipe_user_obj( struct process *process, handle_t handle, +static struct pipe_user *get_pipe_user_obj( struct process *process, obj_handle_t handle, unsigned int access ) { return (struct pipe_user *)get_handle_obj( process, handle, access, &pipe_user_ops );
diff --git a/server/object.h b/server/object.h index a904945..ef54807 100644 --- a/server/object.h +++ b/server/object.h
@@ -148,7 +148,7 @@ extern struct event *create_event( const WCHAR *name, size_t len, int manual_reset, int initial_state ); -extern struct event *get_event_obj( struct process *process, handle_t handle, unsigned int access ); +extern struct event *get_event_obj( struct process *process, obj_handle_t handle, unsigned int access ); extern void pulse_event( struct event *event ); extern void set_event( struct event *event ); extern void reset_event( struct event *event ); @@ -159,7 +159,7 @@ /* file functions */ -extern struct file *get_file_obj( struct process *process, handle_t handle, +extern struct file *get_file_obj( struct process *process, obj_handle_t handle, unsigned int access ); extern int is_same_file( struct file *file1, struct file *file2 ); extern int get_file_drive_type( struct file *file );
diff --git a/server/pipe.c b/server/pipe.c index d0f6bf8..d135a22 100644 --- a/server/pipe.c +++ b/server/pipe.c
@@ -170,7 +170,7 @@ DECL_HANDLER(create_pipe) { struct object *obj[2]; - handle_t hread = 0, hwrite = 0; + obj_handle_t hread = 0, hwrite = 0; if (create_pipe( obj )) {
diff --git a/server/process.c b/server/process.c index 8d5fde0..0f89aa3 100644 --- a/server/process.c +++ b/server/process.c
@@ -80,9 +80,9 @@ int inherit_all; /* inherit all handles from parent */ int use_handles; /* use stdio handles */ int create_flags; /* creation flags */ - handle_t hstdin; /* handle for stdin */ - handle_t hstdout; /* handle for stdout */ - handle_t hstderr; /* handle for stderr */ + obj_handle_t hstdin; /* handle for stdin */ + obj_handle_t hstdout; /* handle for stdout */ + obj_handle_t hstderr; /* handle for stderr */ struct file *exe_file; /* file handle for main exe */ struct thread *owner; /* owner thread (the one that created the new process) */ struct process *process; /* created process */ @@ -397,7 +397,7 @@ } /* get a process from a handle (and increment the refcount) */ -struct process *get_process_from_handle( handle_t handle, unsigned int access ) +struct process *get_process_from_handle( obj_handle_t handle, unsigned int access ) { return (struct process *)get_handle_obj( current->process, handle, access, &process_ops );
diff --git a/server/process.h b/server/process.h index 7519fc5..e320491 100644 --- a/server/process.h +++ b/server/process.h
@@ -94,7 +94,7 @@ extern struct thread *create_process( int fd ); extern struct process *get_process_from_id( void *id ); -extern struct process *get_process_from_handle( handle_t handle, unsigned int access ); +extern struct process *get_process_from_handle( obj_handle_t handle, unsigned int access ); extern int process_set_debugger( struct process *process, struct thread *thread ); extern int debugger_detach( struct process* process, struct thread* debugger );
diff --git a/server/protocol.def b/server/protocol.def index 7222b7e..8b68a43 100644 --- a/server/protocol.def +++ b/server/protocol.def
@@ -48,10 +48,7 @@ int pad[16]; /* the max request size is 16 ints */ }; -/* max size of the variable part of a request */ -#define REQUEST_MAX_VAR_SIZE 1024 - -typedef int handle_t; +typedef int obj_handle_t; typedef unsigned short atom_t; typedef unsigned int user_handle_t; @@ -67,35 +64,35 @@ }; struct debug_event_create_thread { - handle_t handle; /* handle to the new thread */ - void *teb; /* thread teb (in debugged process address space) */ - void *start; /* thread startup routine */ + obj_handle_t handle; /* handle to the new thread */ + void *teb; /* thread teb (in debugged process address space) */ + void *start; /* thread startup routine */ }; struct debug_event_create_process { - handle_t file; /* handle to the process exe file */ - handle_t process; /* handle to the new process */ - handle_t thread; /* handle to the new thread */ - void *base; /* base of executable image */ - int dbg_offset; /* offset of debug info in file */ - int dbg_size; /* size of debug info */ - void *teb; /* thread teb (in debugged process address space) */ - void *start; /* thread startup routine */ - void *name; /* image name (optional) */ - int unicode; /* is it Unicode? */ + obj_handle_t file; /* handle to the process exe file */ + obj_handle_t process; /* handle to the new process */ + obj_handle_t thread; /* handle to the new thread */ + void *base; /* base of executable image */ + int dbg_offset; /* offset of debug info in file */ + int dbg_size; /* size of debug info */ + void *teb; /* thread teb (in debugged process address space) */ + void *start; /* thread startup routine */ + void *name; /* image name (optional) */ + int unicode; /* is it Unicode? */ }; struct debug_event_exit { - int exit_code; /* thread or process exit code */ + int exit_code; /* thread or process exit code */ }; struct debug_event_load_dll { - handle_t handle; /* file handle for the dll */ - void *base; /* base address of the dll */ - int dbg_offset; /* offset of debug info in file */ - int dbg_size; /* size of debug info */ - void *name; /* image name (optional) */ - int unicode; /* is it Unicode? */ + obj_handle_t handle; /* file handle for the dll */ + void *base; /* base address of the dll */ + int dbg_offset; /* offset of debug info in file */ + int dbg_size; /* size of debug info */ + void *name; /* image name (optional) */ + int unicode; /* is it Unicode? */ }; struct debug_event_unload_dll { @@ -173,7 +170,7 @@ { atom_t atom; /* property atom */ short string; /* was atom a string originally? */ - handle_t handle; /* handle stored in property */ + obj_handle_t handle; /* handle stored in property */ } property_data_t; /* structure to specify window rectangles */ @@ -200,26 +197,26 @@ int inherit_all; /* inherit all handles from parent */ int use_handles; /* use stdio handles */ int create_flags; /* creation flags */ - handle_t exe_file; /* file handle for main exe */ - handle_t hstdin; /* handle for stdin */ - handle_t hstdout; /* handle for stdout */ - handle_t hstderr; /* handle for stderr */ + obj_handle_t exe_file; /* file handle for main exe */ + obj_handle_t hstdin; /* handle for stdin */ + obj_handle_t hstdout; /* handle for stdout */ + obj_handle_t hstderr; /* handle for stderr */ VARARG(info,startup_info); /* startup information */ @REPLY - handle_t info; /* new process info handle */ + obj_handle_t info; /* new process info handle */ @END /* Retrieve information about a newly started process */ @REQ(get_new_process_info) - handle_t info; /* info handle returned from new_process_request */ + obj_handle_t info; /* info handle returned from new_process_request */ int pinherit; /* process handle inherit flag */ int tinherit; /* thread handle inherit flag */ @REPLY void* pid; /* process id */ - handle_t phandle; /* process handle (in the current process) */ + obj_handle_t phandle; /* process handle (in the current process) */ void* tid; /* thread id */ - handle_t thandle; /* thread handle (in the current process) */ + obj_handle_t thandle; /* thread handle (in the current process) */ int success; /* did the process start successfully? */ @END @@ -231,7 +228,7 @@ int request_fd; /* fd for request pipe */ @REPLY void* tid; /* thread id */ - handle_t handle; /* thread handle (in the current process) */ + obj_handle_t handle; /* thread handle (in the current process) */ @END @@ -249,10 +246,10 @@ int create_flags; /* creation flags */ unsigned int server_start; /* server start time (GetTickCount) */ size_t info_size; /* total size of startup info */ - handle_t exe_file; /* file handle for main exe */ - handle_t hstdin; /* handle for stdin */ - handle_t hstdout; /* handle for stdout */ - handle_t hstderr; /* handle for stderr */ + obj_handle_t exe_file; /* file handle for main exe */ + obj_handle_t hstdin; /* handle for stdin */ + obj_handle_t hstdout; /* handle for stdout */ + obj_handle_t hstderr; /* handle for stderr */ @END @@ -269,7 +266,7 @@ size_t module_size; /* main module size */ void* entry; /* process entry point */ void* name; /* ptr to ptr to name (in process addr space) */ - handle_t exe_file; /* file handle for main exe */ + obj_handle_t exe_file; /* file handle for main exe */ int gui; /* is it a GUI process? */ VARARG(filename,string); /* file name of main exe */ @REPLY @@ -294,7 +291,7 @@ /* Terminate a process */ @REQ(terminate_process) - handle_t handle; /* process handle to terminate */ + obj_handle_t handle; /* process handle to terminate */ int exit_code; /* process exit code */ @REPLY int self; /* suicide? */ @@ -303,7 +300,7 @@ /* Terminate a thread */ @REQ(terminate_thread) - handle_t handle; /* thread handle to terminate */ + obj_handle_t handle; /* thread handle to terminate */ int exit_code; /* thread exit code */ @REPLY int self; /* suicide? */ @@ -313,7 +310,7 @@ /* Retrieve information about a process */ @REQ(get_process_info) - handle_t handle; /* process handle */ + obj_handle_t handle; /* process handle */ @REPLY void* pid; /* server process id */ int debugged; /* debugged? */ @@ -326,7 +323,7 @@ /* Set a process informations */ @REQ(set_process_info) - handle_t handle; /* process handle */ + obj_handle_t handle; /* process handle */ int mask; /* setting mask (see below) */ int priority; /* priority class */ int affinity; /* affinity mask */ @@ -337,7 +334,7 @@ /* Retrieve information about a thread */ @REQ(get_thread_info) - handle_t handle; /* thread handle */ + obj_handle_t handle; /* thread handle */ void* tid_in; /* thread id (optional) */ @REPLY void* tid; /* server thread id */ @@ -349,7 +346,7 @@ /* Set a thread informations */ @REQ(set_thread_info) - handle_t handle; /* thread handle */ + obj_handle_t handle; /* thread handle */ int mask; /* setting mask (see below) */ int priority; /* priority class */ int affinity; /* affinity mask */ @@ -360,7 +357,7 @@ /* Suspend a thread */ @REQ(suspend_thread) - handle_t handle; /* thread handle */ + obj_handle_t handle; /* thread handle */ @REPLY int count; /* new suspend count */ @END @@ -368,7 +365,7 @@ /* Resume a thread */ @REQ(resume_thread) - handle_t handle; /* thread handle */ + obj_handle_t handle; /* thread handle */ @REPLY int count; /* new suspend count */ @END @@ -376,7 +373,7 @@ /* Notify the server that a dll has been loaded */ @REQ(load_dll) - handle_t handle; /* file handle */ + obj_handle_t handle; /* file handle */ void* base; /* base address */ size_t size; /* dll size */ int dbg_offset; /* debug info offset */ @@ -394,7 +391,7 @@ /* Queue an APC for a thread */ @REQ(queue_apc) - handle_t handle; /* thread handle */ + obj_handle_t handle; /* thread handle */ int user; /* user or system apc? */ void* func; /* function to call */ void* param; /* param for function to call */ @@ -414,7 +411,7 @@ /* Close a handle for the current process */ @REQ(close_handle) - handle_t handle; /* handle to close */ + obj_handle_t handle; /* handle to close */ @REPLY int fd; /* associated fd to close */ @END @@ -422,7 +419,7 @@ /* Set a handle information */ @REQ(set_handle_info) - handle_t handle; /* handle we are interested in */ + obj_handle_t handle; /* handle we are interested in */ int flags; /* new handle flags */ int mask; /* mask for flags to set */ int fd; /* file descriptor or -1 */ @@ -434,14 +431,14 @@ /* Duplicate a handle */ @REQ(dup_handle) - handle_t src_process; /* src process handle */ - handle_t src_handle; /* src handle to duplicate */ - handle_t dst_process; /* dst process handle */ + obj_handle_t src_process; /* src process handle */ + obj_handle_t src_handle; /* src handle to duplicate */ + obj_handle_t dst_process; /* dst process handle */ unsigned int access; /* wanted access rights */ int inherit; /* inherit flag */ int options; /* duplicate options (see below) */ @REPLY - handle_t handle; /* duplicated handle in dst process */ + obj_handle_t handle; /* duplicated handle in dst process */ int fd; /* associated fd to close */ @END #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE @@ -455,7 +452,7 @@ unsigned int access; /* wanted access rights */ int inherit; /* inherit flag */ @REPLY - handle_t handle; /* handle to the process */ + obj_handle_t handle; /* handle to the process */ @END @@ -465,7 +462,7 @@ unsigned int access; /* wanted access rights */ int inherit; /* inherit flag */ @REPLY - handle_t handle; /* handle to the thread */ + obj_handle_t handle; /* handle to the thread */ @END @@ -490,12 +487,12 @@ int inherit; /* inherit flag */ VARARG(name,unicode_str); /* object name */ @REPLY - handle_t handle; /* handle to the event */ + obj_handle_t handle; /* handle to the event */ @END /* Event operation */ @REQ(event_op) - handle_t handle; /* handle to event */ + obj_handle_t handle; /* handle to event */ int op; /* event operation (see below) */ @END enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT }; @@ -507,7 +504,7 @@ int inherit; /* inherit flag */ VARARG(name,unicode_str); /* object name */ @REPLY - handle_t handle; /* handle to the event */ + obj_handle_t handle; /* handle to the event */ @END @@ -517,13 +514,13 @@ int inherit; /* inherit flag */ VARARG(name,unicode_str); /* object name */ @REPLY - handle_t handle; /* handle to the mutex */ + obj_handle_t handle; /* handle to the mutex */ @END /* Release a mutex */ @REQ(release_mutex) - handle_t handle; /* handle to the mutex */ + obj_handle_t handle; /* handle to the mutex */ @END @@ -533,7 +530,7 @@ int inherit; /* inherit flag */ VARARG(name,unicode_str); /* object name */ @REPLY - handle_t handle; /* handle to the mutex */ + obj_handle_t handle; /* handle to the mutex */ @END @@ -544,13 +541,13 @@ int inherit; /* inherit flag */ VARARG(name,unicode_str); /* object name */ @REPLY - handle_t handle; /* handle to the semaphore */ + obj_handle_t handle; /* handle to the semaphore */ @END /* Release a semaphore */ @REQ(release_semaphore) - handle_t handle; /* handle to the semaphore */ + obj_handle_t handle; /* handle to the semaphore */ unsigned int count; /* count to add to semaphore */ @REPLY unsigned int prev_count; /* previous semaphore count */ @@ -563,7 +560,7 @@ int inherit; /* inherit flag */ VARARG(name,unicode_str); /* object name */ @REPLY - handle_t handle; /* handle to the semaphore */ + obj_handle_t handle; /* handle to the semaphore */ @END @@ -577,7 +574,7 @@ int drive_type; /* type of drive the file is on */ VARARG(filename,string); /* file name */ @REPLY - handle_t handle; /* handle to the file */ + obj_handle_t handle; /* handle to the file */ @END @@ -587,13 +584,13 @@ int inherit; /* inherit flag */ int fd; /* file descriptor on the client side */ @REPLY - handle_t handle; /* handle to the file */ + obj_handle_t handle; /* handle to the file */ @END /* Get a Unix fd to access a file */ @REQ(get_handle_fd) - handle_t handle; /* handle to the file */ + obj_handle_t handle; /* handle to the file */ unsigned int access; /* wanted access rights */ @REPLY int fd; /* file descriptor */ @@ -615,7 +612,7 @@ /* Set a file current position */ @REQ(set_file_pointer) - handle_t handle; /* handle to the file */ + obj_handle_t handle; /* handle to the file */ int low; /* position low word */ int high; /* position high word */ int whence; /* whence to seek */ @@ -627,13 +624,13 @@ /* Truncate (or extend) a file */ @REQ(truncate_file) - handle_t handle; /* handle to the file */ + obj_handle_t handle; /* handle to the file */ @END /* Set a file access and modification times */ @REQ(set_file_time) - handle_t handle; /* handle to the file */ + obj_handle_t handle; /* handle to the file */ time_t access_time; /* last access time */ time_t write_time; /* last write time */ @END @@ -641,13 +638,13 @@ /* Flush a file buffers */ @REQ(flush_file) - handle_t handle; /* handle to the file */ + obj_handle_t handle; /* handle to the file */ @END /* Get information about a file */ @REQ(get_file_info) - handle_t handle; /* handle to the file */ + obj_handle_t handle; /* handle to the file */ @REPLY int type; /* file type */ int attr; /* file attributes */ @@ -664,7 +661,7 @@ /* Lock a region of a file */ @REQ(lock_file) - handle_t handle; /* handle to the file */ + obj_handle_t handle; /* handle to the file */ unsigned int offset_low; /* offset of start of lock */ unsigned int offset_high; /* offset of start of lock */ unsigned int count_low; /* count of bytes to lock */ @@ -674,7 +671,7 @@ /* Unlock a region of a file */ @REQ(unlock_file) - handle_t handle; /* handle to the file */ + obj_handle_t handle; /* handle to the file */ unsigned int offset_low; /* offset of start of unlock */ unsigned int offset_high; /* offset of start of unlock */ unsigned int count_low; /* count of bytes to unlock */ @@ -686,8 +683,8 @@ @REQ(create_pipe) int inherit; /* inherit flag */ @REPLY - handle_t handle_read; /* handle to the read-side of the pipe */ - handle_t handle_write; /* handle to the write-side of the pipe */ + obj_handle_t handle_read; /* handle to the read-side of the pipe */ + obj_handle_t handle_write; /* handle to the write-side of the pipe */ @END @@ -700,25 +697,25 @@ int protocol; /* protocol, see socket manpage */ unsigned int flags; /* socket flags */ @REPLY - handle_t handle; /* handle to the new socket */ + obj_handle_t handle; /* handle to the new socket */ @END /* Accept a socket */ @REQ(accept_socket) - handle_t lhandle; /* handle to the listening socket */ + obj_handle_t lhandle; /* handle to the listening socket */ unsigned int access; /* wanted access rights */ int inherit; /* inherit flag */ @REPLY - handle_t handle; /* handle to the new socket */ + obj_handle_t handle; /* handle to the new socket */ @END /* Set socket event parameters */ @REQ(set_socket_event) - handle_t handle; /* handle to the socket */ + obj_handle_t handle; /* handle to the socket */ unsigned int mask; /* event mask */ - handle_t event; /* event object */ + obj_handle_t event; /* event object */ user_handle_t window; /* window to send the message to */ unsigned int msg; /* message to send */ @END @@ -726,9 +723,9 @@ /* Get socket event parameters */ @REQ(get_socket_event) - handle_t handle; /* handle to the socket */ + obj_handle_t handle; /* handle to the socket */ int service; /* clear pending? */ - handle_t c_event; /* event to clear */ + obj_handle_t c_event; /* event to clear */ @REPLY unsigned int mask; /* event mask */ unsigned int pmask; /* pending events */ @@ -739,15 +736,15 @@ /* Reenable pending socket events */ @REQ(enable_socket_event) - handle_t handle; /* handle to the socket */ + obj_handle_t handle; /* handle to the socket */ unsigned int mask; /* events to re-enable */ unsigned int sstate; /* status bits to set */ unsigned int cstate; /* status bits to clear */ @END @REQ(set_socket_deferred) - handle_t handle; /* handle to the socket */ - handle_t deferred; /* handle to the socket for which accept() is deferred */ + obj_handle_t handle; /* handle to the socket */ + obj_handle_t deferred; /* handle to the socket for which accept() is deferred */ @END /* Allocate a console (only used by a console renderer) */ @@ -756,8 +753,8 @@ int inherit; /* inherit flag */ void* pid; /* pid of process which shall be attached to the console */ @REPLY - handle_t handle_in; /* handle to console input */ - handle_t event; /* handle to renderer events change notification */ + obj_handle_t handle_in; /* handle to console input */ + obj_handle_t event; /* handle to renderer events change notification */ @END @@ -812,7 +809,7 @@ /* retrieve console events for the renderer */ @REQ(get_console_renderer_events) - handle_t handle; /* handle to console input events */ + obj_handle_t handle; /* handle to console input events */ @REPLY VARARG(data,bytes); /* the various console_renderer_events */ @END @@ -826,13 +823,13 @@ int inherit; /* inherit flag */ int share; /* share mask (only for output handles) */ @REPLY - handle_t handle; /* handle to the console */ + obj_handle_t handle; /* handle to the console */ @END /* Get a console mode (input or output) */ @REQ(get_console_mode) - handle_t handle; /* handle to the console */ + obj_handle_t handle; /* handle to the console */ @REPLY int mode; /* console mode */ @END @@ -840,16 +837,16 @@ /* Set a console mode (input or output) */ @REQ(set_console_mode) - handle_t handle; /* handle to the console */ + obj_handle_t handle; /* handle to the console */ int mode; /* console mode */ @END /* Set info about a console (input only) */ @REQ(set_console_input_info) - handle_t handle; /* handle to console input, or 0 for process' console */ + obj_handle_t handle; /* handle to console input, or 0 for process' console */ int mask; /* setting mask (see below) */ - handle_t active_sb; /* active screen buffer */ + obj_handle_t active_sb; /* active screen buffer */ int history_mode; /* whether we duplicate lines in history */ int history_size; /* number of lines in history */ VARARG(title,unicode_str); /* console title */ @@ -862,7 +859,7 @@ /* Get info about a console (input only) */ @REQ(get_console_input_info) - handle_t handle; /* handle to console input, or 0 for process' console */ + obj_handle_t handle; /* handle to console input, or 0 for process' console */ @REPLY int history_mode; /* whether we duplicate lines in history */ int history_size; /* number of lines in history */ @@ -873,14 +870,14 @@ /* appends a string to console's history */ @REQ(append_console_input_history) - handle_t handle; /* handle to console input, or 0 for process' console */ + obj_handle_t handle; /* handle to console input, or 0 for process' console */ VARARG(line,unicode_str); /* line to add */ @END /* appends a string to console's history */ @REQ(get_console_input_history) - handle_t handle; /* handle to console input, or 0 for process' console */ + obj_handle_t handle; /* handle to console input, or 0 for process' console */ int index; /* index to get line from */ @REPLY int total; /* total length of line in Unicode chars */ @@ -890,18 +887,18 @@ /* creates a new screen buffer on process' console */ @REQ(create_console_output) - handle_t handle_in; /* handle to console input, or 0 for process' console */ + obj_handle_t handle_in; /* handle to console input, or 0 for process' console */ int access; /* wanted access rights */ int share; /* sharing credentials */ int inherit; /* inherit flag */ @REPLY - handle_t handle_out; /* handle to the screen buffer */ + obj_handle_t handle_out; /* handle to the screen buffer */ @END /* Set info about a console (output only) */ @REQ(set_console_output_info) - handle_t handle; /* handle to the console */ + obj_handle_t handle; /* handle to the console */ int mask; /* setting mask (see below) */ short int cursor_size; /* size of cursor (percentage filled) */ short int cursor_visible;/* cursor visibility flag */ @@ -927,7 +924,7 @@ /* Get info about a console (output only) */ @REQ(get_console_output_info) - handle_t handle; /* handle to the console */ + obj_handle_t handle; /* handle to the console */ @REPLY short int cursor_size; /* size of cursor (percentage filled) */ short int cursor_visible;/* cursor visibility flag */ @@ -946,7 +943,7 @@ /* Add input records to a console input queue */ @REQ(write_console_input) - handle_t handle; /* handle to the console input */ + obj_handle_t handle; /* handle to the console input */ VARARG(rec,input_records); /* input records */ @REPLY int written; /* number of records written */ @@ -955,7 +952,7 @@ /* Fetch input records from a console input queue */ @REQ(read_console_input) - handle_t handle; /* handle to the console input */ + obj_handle_t handle; /* handle to the console input */ int flush; /* flush the retrieved records from the queue? */ @REPLY int read; /* number of records read */ @@ -965,7 +962,7 @@ /* write data (chars and/or attributes) in a screen buffer */ @REQ(write_console_output) - handle_t handle; /* handle to the console output */ + obj_handle_t handle; /* handle to the console output */ int x; /* position where to start writing */ int y; int mode; /* char info (see below) */ @@ -987,7 +984,7 @@ /* fill a screen buffer with constant data (chars and/or attributes) */ @REQ(fill_console_output) - handle_t handle; /* handle to the console output */ + obj_handle_t handle; /* handle to the console output */ int x; /* position where to start writing */ int y; int mode; /* char info mode */ @@ -1001,7 +998,7 @@ /* read data (chars and/or attributes) from a screen buffer */ @REQ(read_console_output) - handle_t handle; /* handle to the console output */ + obj_handle_t handle; /* handle to the console output */ int x; /* position (x,y) where to start reading */ int y; int mode; /* char info mode */ @@ -1014,7 +1011,7 @@ /* move a rect (of data) in screen buffer content */ @REQ(move_console_output) - handle_t handle; /* handle to the console output */ + obj_handle_t handle; /* handle to the console output */ short int x_src; /* position (x, y) of rect to start moving from */ short int y_src; short int x_dst; /* position (x, y) of rect to move to */ @@ -1029,7 +1026,7 @@ int subtree; /* watch all the subtree */ int filter; /* notification filter */ @REPLY - handle_t handle; /* handle to the change notification */ + obj_handle_t handle; /* handle to the change notification */ @END @@ -1039,10 +1036,10 @@ int size_low; /* mapping size */ int protect; /* protection flags (see below) */ int inherit; /* inherit flag */ - handle_t file_handle; /* file handle */ + obj_handle_t file_handle; /* file handle */ VARARG(name,unicode_str); /* object name */ @REPLY - handle_t handle; /* handle to the mapping */ + obj_handle_t handle; /* handle to the mapping */ @END /* protection flags */ #define VPROT_READ 0x01 @@ -1061,20 +1058,20 @@ int inherit; /* inherit flag */ VARARG(name,unicode_str); /* object name */ @REPLY - handle_t handle; /* handle to the mapping */ + obj_handle_t handle; /* handle to the mapping */ @END /* Get information about a file mapping */ @REQ(get_mapping_info) - handle_t handle; /* handle to the mapping */ + obj_handle_t handle; /* handle to the mapping */ @REPLY int size_high; /* mapping size */ int size_low; /* mapping size */ int protect; /* protection flags */ int header_size; /* header size (for VPROT_IMAGE mapping) */ void* base; /* default base addr (for VPROT_IMAGE mapping) */ - handle_t shared_file; /* shared mapping file handle */ + obj_handle_t shared_file; /* shared mapping file handle */ int shared_size; /* shared mapping size */ int drive_type; /* type of drive the file is on */ @END @@ -1086,7 +1083,7 @@ int inherit; /* inherit flag */ int id; /* client private id */ @REPLY - handle_t handle; /* handle to the device */ + obj_handle_t handle; /* handle to the device */ @END @@ -1096,13 +1093,13 @@ int flags; /* snapshot flags (TH32CS_*) */ void* pid; /* process id */ @REPLY - handle_t handle; /* handle to the snapshot */ + obj_handle_t handle; /* handle to the snapshot */ @END /* Get the next process from a snapshot */ @REQ(next_process) - handle_t handle; /* handle to the snapshot */ + obj_handle_t handle; /* handle to the snapshot */ int reset; /* reset snapshot position? */ @REPLY int count; /* process usage count */ @@ -1118,7 +1115,7 @@ /* Get the next thread from a snapshot */ @REQ(next_thread) - handle_t handle; /* handle to the snapshot */ + obj_handle_t handle; /* handle to the snapshot */ int reset; /* reset snapshot position? */ @REPLY int count; /* thread usage count */ @@ -1131,7 +1128,7 @@ /* Get the next module from a snapshot */ @REQ(next_module) - handle_t handle; /* handle to the snapshot */ + obj_handle_t handle; /* handle to the snapshot */ int reset; /* reset snapshot position? */ @REPLY void* pid; /* process id */ @@ -1147,7 +1144,7 @@ @REPLY void* pid; /* process id */ void* tid; /* thread id */ - handle_t wait; /* wait handle if no event ready */ + obj_handle_t wait; /* wait handle if no event ready */ VARARG(event,debug_event); /* debug event data */ @END @@ -1157,13 +1154,13 @@ int first; /* first chance exception? */ VARARG(record,exc_event); /* thread context followed by exception record */ @REPLY - handle_t handle; /* handle to the queued event */ + obj_handle_t handle; /* handle to the queued event */ @END /* Retrieve the status of an exception event */ @REQ(get_exception_status) - handle_t handle; /* handle to the queued event */ + obj_handle_t handle; /* handle to the queued event */ @REPLY int status; /* event continuation status */ VARARG(context,context); /* modified thread context */ @@ -1195,7 +1192,7 @@ /* Simulate a breakpoint in a process */ @REQ(debug_break) - handle_t handle; /* process handle */ + obj_handle_t handle; /* process handle */ @REPLY int self; /* was it the caller itself? */ @END @@ -1209,7 +1206,7 @@ /* Read data from a process address space */ @REQ(read_process_memory) - handle_t handle; /* process handle */ + obj_handle_t handle; /* process handle */ void* addr; /* addr to read from */ @REPLY VARARG(data,bytes); /* result data */ @@ -1218,7 +1215,7 @@ /* Write data to a process address space */ @REQ(write_process_memory) - handle_t handle; /* process handle */ + obj_handle_t handle; /* process handle */ void* addr; /* addr to write to (must be int-aligned) */ unsigned int first_mask; /* mask for first word */ unsigned int last_mask; /* mask for last word */ @@ -1228,7 +1225,7 @@ /* Create a registry key */ @REQ(create_key) - handle_t parent; /* handle to the parent key */ + obj_handle_t parent; /* handle to the parent key */ unsigned int access; /* desired access rights */ unsigned int options; /* creation options */ time_t modif; /* last modification time */ @@ -1236,29 +1233,29 @@ VARARG(name,unicode_str,namelen); /* key name */ VARARG(class,unicode_str); /* class name */ @REPLY - handle_t hkey; /* handle to the created key */ + obj_handle_t hkey; /* handle to the created key */ int created; /* has it been newly created? */ @END /* Open a registry key */ @REQ(open_key) - handle_t parent; /* handle to the parent key */ + obj_handle_t parent; /* handle to the parent key */ unsigned int access; /* desired access rights */ VARARG(name,unicode_str); /* key name */ @REPLY - handle_t hkey; /* handle to the open key */ + obj_handle_t hkey; /* handle to the open key */ @END /* Delete a registry key */ @REQ(delete_key) - handle_t hkey; /* handle to the key */ + obj_handle_t hkey; /* handle to the key */ @END /* Enumerate registry subkeys */ @REQ(enum_key) - handle_t hkey; /* handle to registry key */ + obj_handle_t hkey; /* handle to registry key */ int index; /* index of subkey (or -1 for current key) */ int info_class; /* requested information class */ @REPLY @@ -1278,7 +1275,7 @@ /* Set a value of a registry key */ @REQ(set_key_value) - handle_t hkey; /* handle to registry key */ + obj_handle_t hkey; /* handle to registry key */ int type; /* value type */ size_t namelen; /* length of value name in bytes */ VARARG(name,unicode_str,namelen); /* value name */ @@ -1288,7 +1285,7 @@ /* Retrieve the value of a registry key */ @REQ(get_key_value) - handle_t hkey; /* handle to registry key */ + obj_handle_t hkey; /* handle to registry key */ VARARG(name,unicode_str); /* value name */ @REPLY int type; /* value type */ @@ -1299,7 +1296,7 @@ /* Enumerate a value of a registry key */ @REQ(enum_key_value) - handle_t hkey; /* handle to registry key */ + obj_handle_t hkey; /* handle to registry key */ int index; /* value index */ int info_class; /* requested information class */ @REPLY @@ -1313,29 +1310,29 @@ /* Delete a value of a registry key */ @REQ(delete_key_value) - handle_t hkey; /* handle to registry key */ + obj_handle_t hkey; /* handle to registry key */ VARARG(name,unicode_str); /* value name */ @END /* Load a registry branch from a file */ @REQ(load_registry) - handle_t hkey; /* root key to load to */ - handle_t file; /* file to load from */ + obj_handle_t hkey; /* root key to load to */ + obj_handle_t file; /* file to load from */ VARARG(name,unicode_str); /* subkey name */ @END /* Save a registry branch to a file */ @REQ(save_registry) - handle_t hkey; /* key to save */ - handle_t file; /* file to save to */ + obj_handle_t hkey; /* key to save */ + obj_handle_t file; /* file to save to */ @END /* Save a registry branch at server exit */ @REQ(save_registry_atexit) - handle_t hkey; /* key to save */ + obj_handle_t hkey; /* key to save */ VARARG(file,string); /* file to save to */ @END @@ -1354,7 +1351,7 @@ int manual; /* manual reset */ VARARG(name,unicode_str); /* object name */ @REPLY - handle_t handle; /* handle to the timer */ + obj_handle_t handle; /* handle to the timer */ @END @@ -1364,12 +1361,12 @@ int inherit; /* inherit flag */ VARARG(name,unicode_str); /* object name */ @REPLY - handle_t handle; /* handle to the timer */ + obj_handle_t handle; /* handle to the timer */ @END /* Set a waitable timer */ @REQ(set_timer) - handle_t handle; /* handle to the timer */ + obj_handle_t handle; /* handle to the timer */ int sec; /* next expiration absolute time */ int usec; /* next expiration absolute time */ int period; /* timer period in ms */ @@ -1379,13 +1376,13 @@ /* Cancel a waitable timer */ @REQ(cancel_timer) - handle_t handle; /* handle to the timer */ + obj_handle_t handle; /* handle to the timer */ @END /* Retrieve the current context of a thread */ @REQ(get_thread_context) - handle_t handle; /* thread handle */ + obj_handle_t handle; /* thread handle */ unsigned int flags; /* context flags */ @REPLY VARARG(context,context); /* thread context */ @@ -1394,7 +1391,7 @@ /* Set the current context of a thread */ @REQ(set_thread_context) - handle_t handle; /* thread handle */ + obj_handle_t handle; /* thread handle */ unsigned int flags; /* context flags */ VARARG(context,context); /* thread context */ @END @@ -1402,7 +1399,7 @@ /* Fetch a selector entry for a thread */ @REQ(get_selector_entry) - handle_t handle; /* thread handle */ + obj_handle_t handle; /* thread handle */ int entry; /* LDT entry */ @REPLY unsigned int base; /* selector base */ @@ -1455,7 +1452,7 @@ /* Get the message queue of the current thread */ @REQ(get_msg_queue) @REPLY - handle_t handle; /* handle to the queue */ + obj_handle_t handle; /* handle to the queue */ @END @@ -1481,10 +1478,10 @@ /* Wait for a process to start waiting on input */ @REQ(wait_input_idle) - handle_t handle; /* process handle */ + obj_handle_t handle; /* process handle */ int timeout; /* timeout */ @REPLY - handle_t event; /* handle to idle event */ + obj_handle_t event; /* handle to idle event */ @END @@ -1583,13 +1580,13 @@ unsigned int sharing; /* sharing flags */ VARARG(name,string); /* file name */ @REPLY - handle_t handle; /* handle to the port */ + obj_handle_t handle; /* handle to the port */ @END /* Retrieve info about a serial port */ @REQ(get_serial_info) - handle_t handle; /* handle to comm port */ + obj_handle_t handle; /* handle to comm port */ @REPLY unsigned int readinterval; unsigned int readconst; @@ -1603,7 +1600,7 @@ /* Set info about a serial port */ @REQ(set_serial_info) - handle_t handle; /* handle to comm port */ + obj_handle_t handle; /* handle to comm port */ int flags; /* bitmask to set values (see below) */ unsigned int readinterval; unsigned int readconst; @@ -1620,7 +1617,7 @@ /* Create / reschedule an async I/O */ @REQ(register_async) - handle_t handle; /* handle to comm port, socket or file */ + obj_handle_t handle; /* handle to comm port, socket or file */ int type; void* overlapped; int count; @@ -1642,7 +1639,7 @@ unsigned int timeout; VARARG(name,unicode_str); /* pipe name */ @REPLY - handle_t handle; /* handle to the pipe */ + obj_handle_t handle; /* handle to the pipe */ @END @@ -1651,13 +1648,13 @@ unsigned int access; VARARG(name,unicode_str); /* pipe name */ @REPLY - handle_t handle; /* handle to the pipe */ + obj_handle_t handle; /* handle to the pipe */ @END /* Connect to a named pipe */ @REQ(connect_named_pipe) - handle_t handle; + obj_handle_t handle; void* overlapped; void* func; @END @@ -1674,12 +1671,12 @@ /* Disconnect a named pipe */ @REQ(disconnect_named_pipe) - handle_t handle; + obj_handle_t handle; @END @REQ(get_named_pipe_info) - handle_t handle; + obj_handle_t handle; @REPLY unsigned int flags; unsigned int maxinstances; @@ -1695,12 +1692,12 @@ unsigned int file_id; unsigned int dialect; @REPLY - handle_t handle; + obj_handle_t handle; @END @REQ(get_smb_info) - handle_t handle; + obj_handle_t handle; unsigned int flags; unsigned int offset; @REPLY @@ -1870,7 +1867,7 @@ user_handle_t window; /* handle to the window */ atom_t atom; /* property atom (high-word set if it was a string) */ int string; /* was atom a string originally? */ - handle_t handle; /* handle to store */ + obj_handle_t handle; /* handle to store */ @END @@ -1879,7 +1876,7 @@ user_handle_t window; /* handle to the window */ atom_t atom; /* property atom */ @REPLY - handle_t handle; /* handle stored in property */ + obj_handle_t handle; /* handle stored in property */ @END @@ -1888,7 +1885,7 @@ user_handle_t window; /* handle to the window */ atom_t atom; /* property atom */ @REPLY - handle_t handle; /* handle stored in property */ + obj_handle_t handle; /* handle stored in property */ @END
diff --git a/server/registry.c b/server/registry.c index 5ba94cc..1e88867 100644 --- a/server/registry.c +++ b/server/registry.c
@@ -891,7 +891,7 @@ } } -static struct key *create_root_key( handle_t hkey ) +static struct key *create_root_key( obj_handle_t hkey ) { WCHAR keyname[80]; int i, dummy; @@ -902,7 +902,7 @@ i = 0; while (*p) keyname[i++] = *p++; - if (hkey == (handle_t)HKEY_CURRENT_USER) /* this one is special */ + if (hkey == (obj_handle_t)HKEY_CURRENT_USER) /* this one is special */ { /* get the current user name */ char buffer[10]; @@ -927,7 +927,7 @@ } /* get the registry key corresponding to an hkey handle */ -static struct key *get_hkey_obj( handle_t hkey, unsigned int access ) +static struct key *get_hkey_obj( obj_handle_t hkey, unsigned int access ) { struct key *key; @@ -1330,7 +1330,7 @@ } /* load a part of the registry from a file */ -static void load_registry( struct key *key, handle_t handle ) +static void load_registry( struct key *key, obj_handle_t handle ) { struct object *obj; int fd; @@ -1420,7 +1420,7 @@ } /* save a registry branch to a file handle */ -static void save_registry( struct key *key, handle_t handle ) +static void save_registry( struct key *key, obj_handle_t handle ) { struct object *obj; int fd;
diff --git a/server/request.c b/server/request.c index 7ed598f..0414ed1 100644 --- a/server/request.c +++ b/server/request.c
@@ -374,7 +374,7 @@ } /* send an fd to a client */ -int send_client_fd( struct process *process, int fd, handle_t handle ) +int send_client_fd( struct process *process, int fd, obj_handle_t handle ) { int ret;
diff --git a/server/request.h b/server/request.h index f14b26e..94a659d 100644 --- a/server/request.h +++ b/server/request.h
@@ -52,7 +52,7 @@ extern const char *get_config_dir(void); extern void *set_reply_data_size( size_t size ); extern int receive_fd( struct process *process ); -extern int send_client_fd( struct process *process, int fd, handle_t handle ); +extern int send_client_fd( struct process *process, int fd, obj_handle_t handle ); extern void read_request( struct thread *thread ); extern void write_reply( struct thread *thread ); extern unsigned int get_tick_count(void);
diff --git a/server/semaphore.c b/server/semaphore.c index 80f9626..bd1579a 100644 --- a/server/semaphore.c +++ b/server/semaphore.c
@@ -82,7 +82,7 @@ return sem; } -static unsigned int release_semaphore( handle_t handle, unsigned int count ) +static unsigned int release_semaphore( obj_handle_t handle, unsigned int count ) { struct semaphore *sem; unsigned int prev = 0;
diff --git a/server/serial.c b/server/serial.c index dd5f90c..486b5ab 100644 --- a/server/serial.c +++ b/server/serial.c
@@ -174,7 +174,7 @@ fprintf( stderr, "Port fd=%d mask=%x\n", serial->obj.fd, serial->eventmask ); } -struct serial *get_serial_obj( struct process *process, handle_t handle, unsigned int access ) +struct serial *get_serial_obj( struct process *process, obj_handle_t handle, unsigned int access ) { return (struct serial *)get_handle_obj( process, handle, access, &serial_ops ); }
diff --git a/server/smb.c b/server/smb.c index ab0e84d..790f503 100644 --- a/server/smb.c +++ b/server/smb.c
@@ -94,7 +94,7 @@ fprintf( stderr, "smb file with socket fd=%d \n", smb->obj.fd ); } -struct smb *get_smb_obj( struct process *process, handle_t handle, unsigned int access ) +struct smb *get_smb_obj( struct process *process, obj_handle_t handle, unsigned int access ) { return (struct smb *)get_handle_obj( process, handle, access, &smb_ops ); }
diff --git a/server/sock.c b/server/sock.c index f81b5ec..4f79d94 100644 --- a/server/sock.c +++ b/server/sock.c
@@ -540,7 +540,7 @@ } /* accept a socket (creates a new fd) */ -static struct sock *accept_socket( handle_t handle ) +static struct sock *accept_socket( obj_handle_t handle ) { struct sock *acceptsock; struct sock *sock;
diff --git a/server/thread.c b/server/thread.c index 47208f3..ecb9870 100644 --- a/server/thread.c +++ b/server/thread.c
@@ -257,7 +257,7 @@ } /* get a thread from a handle (and increment the refcount) */ -struct thread *get_thread_from_handle( handle_t handle, unsigned int access ) +struct thread *get_thread_from_handle( obj_handle_t handle, unsigned int access ) { return (struct thread *)get_handle_obj( current->process, handle, access, &thread_ops ); @@ -485,7 +485,7 @@ } /* select on a list of handles */ -static void select_on( int count, void *cookie, const handle_t *handles, +static void select_on( int count, void *cookie, const obj_handle_t *handles, int flags, int sec, int usec ) { int ret, i; @@ -872,7 +872,7 @@ DECL_HANDLER(get_thread_info) { struct thread *thread; - handle_t handle = req->handle; + obj_handle_t handle = req->handle; if (!handle) thread = get_thread_from_id( req->tid_in ); else thread = get_thread_from_handle( req->handle, THREAD_QUERY_INFORMATION );
diff --git a/server/thread.h b/server/thread.h index f5d5f01..e502c23 100644 --- a/server/thread.h +++ b/server/thread.h
@@ -105,7 +105,7 @@ extern struct thread *create_thread( int fd, struct process *process ); extern struct thread *get_thread_from_id( void *id ); -extern struct thread *get_thread_from_handle( handle_t handle, unsigned int access ); +extern struct thread *get_thread_from_handle( obj_handle_t handle, unsigned int access ); extern struct thread *get_thread_from_pid( int pid ); extern int suspend_thread( struct thread *thread, int check_limit ); extern int resume_thread( struct thread *thread );
diff --git a/server/trace.c b/server/trace.c index f610d04..b36cfa7 100644 --- a/server/trace.c +++ b/server/trace.c
@@ -117,7 +117,7 @@ static void dump_varargs_handles( size_t size ) { - const handle_t *data = cur_data; + const obj_handle_t *data = cur_data; size_t len = size / sizeof(*data); fputc( '{', stderr );
diff --git a/server/window.c b/server/window.c index b78baf5..c5f836e 100644 --- a/server/window.c +++ b/server/window.c
@@ -39,7 +39,7 @@ { unsigned short type; /* property type (see below) */ atom_t atom; /* property atom */ - handle_t handle; /* property handle (user-defined storage) */ + obj_handle_t handle; /* property handle (user-defined storage) */ }; enum property_type @@ -138,7 +138,7 @@ } /* set a window property */ -static void set_property( struct window *win, atom_t atom, handle_t handle, +static void set_property( struct window *win, atom_t atom, obj_handle_t handle, enum property_type type ) { int i, free = -1; @@ -186,7 +186,7 @@ } /* remove a window property */ -static handle_t remove_property( struct window *win, atom_t atom ) +static obj_handle_t remove_property( struct window *win, atom_t atom ) { int i; @@ -205,7 +205,7 @@ } /* find a window property */ -static handle_t get_property( struct window *win, atom_t atom ) +static obj_handle_t get_property( struct window *win, atom_t atom ) { int i;