Added TEB in init_thread request.
[wine/multimedia.git] / server / handle.h
blobcb991e8113918e2ef53a4964000163a0ad7e1636
1 /*
2 * Server-side handle definitions
4 * Copyright (C) 1999 Alexandre Julliard
5 */
7 #ifndef __WINE_SERVER_HANDLE_H
8 #define __WINE_SERVER_HANDLE_H
10 #ifndef __WINE_SERVER__
11 #error This file can only be used in the Wine server
12 #endif
14 struct process;
15 struct object_ops;
16 struct handle_entry;
18 /* handle structures */
20 struct handle_table
22 int count;
23 int last;
24 struct handle_entry *entries;
27 /* handle functions */
29 /* alloc_handle takes a void *obj for convenience, but you better make sure */
30 /* that the thing pointed to starts with a struct object... */
31 extern int alloc_handle( struct process *process, void *obj,
32 unsigned int access, int inherit );
33 extern int close_handle( struct process *process, int handle );
34 extern struct object *get_handle_obj( struct process *process, int handle,
35 unsigned int access, const struct object_ops *ops );
36 extern int duplicate_handle( struct process *src, int src_handle, struct process *dst,
37 unsigned int access, int inherit, int options );
38 extern int open_object( const char *name, const struct object_ops *ops,
39 unsigned int access, int inherit );
40 extern int copy_handle_table( struct process *process, struct process *parent );
41 extern void free_handles( struct process *process );
43 #endif /* __WINE_SERVER_HANDLE_H */