Use the new header for COM definitions.
[wine] / include / server / process.h
1 /*
2  * Wine server processes
3  *
4  * Copyright (C) 1999 Alexandre Julliard
5  */
6
7 #ifndef __WINE_SERVER_PROCESS_H
8 #define __WINE_SERVER_PROCESS_H
9
10 #ifndef __WINE_SERVER__
11 #error This file can only be used in the Wine server
12 #endif
13
14 #include "server/object.h"
15
16 /* process structures */
17
18 struct process;
19
20 struct process_snapshot
21 {
22     struct process *process;  /* process ptr */
23     struct process *parent;   /* process parent */
24     int             threads;  /* number of threads */
25     int             priority; /* priority class */
26 };
27
28 /* process functions */
29
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 );
48
49 /* handle functions */
50
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 );
64
65 #endif  /* __WINE_SERVER_PROCESS_H */