2 * Wine server processes
4 * Copyright (C) 1999 Alexandre Julliard
7 #ifndef __WINE_SERVER_PROCESS_H
8 #define __WINE_SERVER_PROCESS_H
10 #ifndef __WINE_SERVER__
11 #error This file can only be used in the Wine server
14 #include "server/object.h"
16 /* process structures */
20 struct process_snapshot
22 struct process *process; /* process ptr */
23 struct process *parent; /* process parent */
24 int threads; /* number of threads */
25 int priority; /* priority class */
28 /* process functions */
30 extern struct process *create_process(void);
31 extern struct process *get_process_from_id( void *id );
32 extern struct process *get_process_from_handle( int handle, unsigned int access );
33 extern void add_process_thread( struct process *process,
34 struct thread *thread );
35 extern void remove_process_thread( struct process *process,
36 struct thread *thread );
37 extern void kill_process( struct process *process, int exit_code );
38 extern void get_process_info( struct process *process,
39 struct get_process_info_reply *reply );
40 extern void set_process_info( struct process *process,
41 struct set_process_info_request *req );
42 extern int alloc_console( struct process *process );
43 extern int free_console( struct process *process );
44 extern struct object *get_console( struct process *process, int output );
45 extern struct process_snapshot *process_snap( int *count );
47 /* handle functions */
49 /* alloc_handle takes a void *obj for convenience, but you better make sure */
50 /* that the thing pointed to starts with a struct object... */
51 extern int alloc_handle( struct process *process, void *obj,
52 unsigned int access, int inherit );
53 extern int close_handle( struct process *process, int handle );
54 extern int set_handle_info( struct process *process, int handle,
55 int mask, int flags );
56 extern struct object *get_handle_obj( struct process *process, int handle,
57 unsigned int access, const struct object_ops *ops );
58 extern int duplicate_handle( struct process *src, int src_handle, struct process *dst,
59 int dst_handle, unsigned int access, int inherit, int options );
60 extern int open_object( const char *name, const struct object_ops *ops,
61 unsigned int access, int inherit );
63 #endif /* __WINE_SERVER_PROCESS_H */