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_initial_process(void);
31 extern struct process *create_process( struct new_process_request *req );
32 extern struct process *get_process_from_id( void *id );
33 extern struct process *get_process_from_handle( int handle, unsigned int access );
34 extern int get_process_init_info( struct process *process, struct init_process_reply *reply );
35 extern void add_process_thread( struct process *process,
36 struct thread *thread );
37 extern void remove_process_thread( struct process *process,
38 struct thread *thread );
39 extern void kill_process( struct process *process, int exit_code );
40 extern void get_process_info( struct process *process,
41 struct get_process_info_reply *reply );
42 extern void set_process_info( struct process *process,
43 struct set_process_info_request *req );
44 extern int alloc_console( struct process *process );
45 extern int free_console( struct process *process );
46 extern struct object *get_console( struct process *process, int output );
47 extern struct process_snapshot *process_snap( int *count );
49 /* handle functions */
51 /* alloc_handle takes a void *obj for convenience, but you better make sure */
52 /* that the thing pointed to starts with a struct object... */
53 extern int alloc_handle( struct process *process, void *obj,
54 unsigned int access, int inherit );
55 extern int close_handle( struct process *process, int handle );
56 extern int set_handle_info( struct process *process, int handle,
57 int mask, int flags );
58 extern struct object *get_handle_obj( struct process *process, int handle,
59 unsigned int access, const struct object_ops *ops );
60 extern int duplicate_handle( struct process *src, int src_handle, struct process *dst,
61 unsigned int access, int inherit, int options );
62 extern int open_object( const char *name, const struct object_ops *ops,
63 unsigned int access, int inherit );
65 #endif /* __WINE_SERVER_PROCESS_H */