- New implementation of SendMessage, ReceiveMessage, ReplyMessage functions
[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_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 );
46
47 /* handle functions */
48
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 );
62
63 #endif  /* __WINE_SERVER_PROCESS_H */