Alexandre Julliard | 642d313 | 1998-07-12 19:29:36 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Wine server definitions |
| 3 | * |
| 4 | * Copyright (C) 1998 Alexandre Julliard |
| 5 | */ |
| 6 | |
| 7 | #ifndef __WINE_SERVER_H |
| 8 | #define __WINE_SERVER_H |
| 9 | |
Alexandre Julliard | 338e757 | 1998-12-27 15:28:54 +0000 | [diff] [blame] | 10 | #include <stdlib.h> |
| 11 | #include <time.h> |
| 12 | |
Alexandre Julliard | 767e6f6 | 1998-08-09 12:47:43 +0000 | [diff] [blame] | 13 | /* Request structures */ |
Alexandre Julliard | 642d313 | 1998-07-12 19:29:36 +0000 | [diff] [blame] | 14 | |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 15 | /* Following are the definitions of all the client<->server */ |
| 16 | /* communication format; if you make any change in this file, */ |
| 17 | /* you must run tools/make_requests again. */ |
| 18 | |
| 19 | |
| 20 | /* These empty macros are used by tools/make_requests */ |
| 21 | /* to generate the request/reply tracing functions */ |
| 22 | #define IN /*nothing*/ |
| 23 | #define OUT /*nothing*/ |
Alexandre Julliard | 642d313 | 1998-07-12 19:29:36 +0000 | [diff] [blame] | 24 | |
Alexandre Julliard | 767e6f6 | 1998-08-09 12:47:43 +0000 | [diff] [blame] | 25 | |
Alexandre Julliard | f692d44 | 1999-03-21 19:23:54 +0000 | [diff] [blame] | 26 | /* Create a new process from the context of the parent */ |
| 27 | struct new_process_request |
| 28 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 29 | IN int inherit; /* inherit flag */ |
| 30 | IN int inherit_all; /* inherit all handles from parent */ |
| 31 | IN int create_flags; /* creation flags */ |
| 32 | IN int start_flags; /* flags from startup info */ |
| 33 | IN int hstdin; /* handle for stdin */ |
| 34 | IN int hstdout; /* handle for stdout */ |
| 35 | IN int hstderr; /* handle for stderr */ |
| 36 | IN int cmd_show; /* main window show mode */ |
| 37 | IN void* env_ptr; /* pointer to environment (FIXME: hack) */ |
| 38 | OUT void* pid; /* process id */ |
| 39 | OUT int handle; /* process handle (in the current process) */ |
| 40 | IN char cmdline[1]; /* command line */ |
Alexandre Julliard | f692d44 | 1999-03-21 19:23:54 +0000 | [diff] [blame] | 41 | }; |
| 42 | |
| 43 | |
Alexandre Julliard | 767e6f6 | 1998-08-09 12:47:43 +0000 | [diff] [blame] | 44 | /* Create a new thread from the context of the parent */ |
Alexandre Julliard | 642d313 | 1998-07-12 19:29:36 +0000 | [diff] [blame] | 45 | struct new_thread_request |
| 46 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 47 | IN void* pid; /* process id for the new thread */ |
| 48 | IN int suspend; /* new thread should be suspended on creation */ |
| 49 | IN int inherit; /* inherit flag */ |
| 50 | OUT void* tid; /* thread id */ |
| 51 | OUT int handle; /* thread handle (in the current process) */ |
Alexandre Julliard | 642d313 | 1998-07-12 19:29:36 +0000 | [diff] [blame] | 52 | }; |
| 53 | |
Alexandre Julliard | 767e6f6 | 1998-08-09 12:47:43 +0000 | [diff] [blame] | 54 | |
Alexandre Julliard | 338e757 | 1998-12-27 15:28:54 +0000 | [diff] [blame] | 55 | /* Set the server debug level */ |
| 56 | struct set_debug_request |
| 57 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 58 | IN int level; /* New debug level */ |
Alexandre Julliard | 338e757 | 1998-12-27 15:28:54 +0000 | [diff] [blame] | 59 | }; |
| 60 | |
| 61 | |
Alexandre Julliard | f692d44 | 1999-03-21 19:23:54 +0000 | [diff] [blame] | 62 | /* Initialize a process; called from the new process context */ |
| 63 | struct init_process_request |
| 64 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 65 | OUT int start_flags; /* flags from startup info */ |
| 66 | OUT int hstdin; /* handle for stdin */ |
| 67 | OUT int hstdout; /* handle for stdout */ |
| 68 | OUT int hstderr; /* handle for stderr */ |
| 69 | OUT int cmd_show; /* main window show mode */ |
| 70 | OUT void* env_ptr; /* pointer to environment (FIXME: hack) */ |
| 71 | OUT char cmdline[1]; /* command line */ |
Alexandre Julliard | f692d44 | 1999-03-21 19:23:54 +0000 | [diff] [blame] | 72 | }; |
| 73 | |
| 74 | |
Alexandre Julliard | 767e6f6 | 1998-08-09 12:47:43 +0000 | [diff] [blame] | 75 | /* Initialize a thread; called from the child after fork()/clone() */ |
Alexandre Julliard | 642d313 | 1998-07-12 19:29:36 +0000 | [diff] [blame] | 76 | struct init_thread_request |
| 77 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 78 | IN int unix_pid; /* Unix pid of new thread */ |
| 79 | IN void* teb; /* TEB of new thread (in thread address space) */ |
| 80 | OUT void* pid; /* process id of the new thread's process */ |
| 81 | OUT void* tid; /* thread id of the new thread */ |
Alexandre Julliard | 642d313 | 1998-07-12 19:29:36 +0000 | [diff] [blame] | 82 | }; |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 83 | |
| 84 | |
| 85 | /* Retrieve the thread buffer file descriptor */ |
| 86 | /* The reply to this request is the first thing a newly */ |
| 87 | /* created thread gets (without having to request it) */ |
| 88 | struct get_thread_buffer_request |
Alexandre Julliard | 875c4b3 | 1999-03-23 14:09:41 +0000 | [diff] [blame] | 89 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 90 | IN int dummy; |
Alexandre Julliard | 875c4b3 | 1999-03-23 14:09:41 +0000 | [diff] [blame] | 91 | }; |
Alexandre Julliard | 642d313 | 1998-07-12 19:29:36 +0000 | [diff] [blame] | 92 | |
Alexandre Julliard | 642d313 | 1998-07-12 19:29:36 +0000 | [diff] [blame] | 93 | |
Alexandre Julliard | 767e6f6 | 1998-08-09 12:47:43 +0000 | [diff] [blame] | 94 | /* Terminate a process */ |
| 95 | struct terminate_process_request |
| 96 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 97 | IN int handle; /* process handle to terminate */ |
| 98 | IN int exit_code; /* process exit code */ |
Alexandre Julliard | 767e6f6 | 1998-08-09 12:47:43 +0000 | [diff] [blame] | 99 | }; |
| 100 | |
| 101 | |
| 102 | /* Terminate a thread */ |
| 103 | struct terminate_thread_request |
| 104 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 105 | IN int handle; /* thread handle to terminate */ |
| 106 | IN int exit_code; /* thread exit code */ |
Alexandre Julliard | 767e6f6 | 1998-08-09 12:47:43 +0000 | [diff] [blame] | 107 | }; |
| 108 | |
| 109 | |
| 110 | /* Retrieve information about a process */ |
| 111 | struct get_process_info_request |
| 112 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 113 | IN int handle; /* process handle */ |
| 114 | OUT void* pid; /* server process id */ |
| 115 | OUT int exit_code; /* process exit code */ |
| 116 | OUT int priority; /* priority class */ |
| 117 | OUT int process_affinity; /* process affinity mask */ |
| 118 | OUT int system_affinity; /* system affinity mask */ |
Alexandre Julliard | 767e6f6 | 1998-08-09 12:47:43 +0000 | [diff] [blame] | 119 | }; |
| 120 | |
| 121 | |
Alexandre Julliard | 62a8b43 | 1999-01-19 17:48:23 +0000 | [diff] [blame] | 122 | /* Set a process informations */ |
| 123 | struct set_process_info_request |
| 124 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 125 | IN int handle; /* process handle */ |
| 126 | IN int mask; /* setting mask (see below) */ |
| 127 | IN int priority; /* priority class */ |
| 128 | IN int affinity; /* affinity mask */ |
Alexandre Julliard | 62a8b43 | 1999-01-19 17:48:23 +0000 | [diff] [blame] | 129 | }; |
| 130 | #define SET_PROCESS_INFO_PRIORITY 0x01 |
| 131 | #define SET_PROCESS_INFO_AFFINITY 0x02 |
| 132 | |
| 133 | |
Alexandre Julliard | 85ed45e | 1998-08-22 19:03:56 +0000 | [diff] [blame] | 134 | /* Retrieve information about a thread */ |
| 135 | struct get_thread_info_request |
| 136 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 137 | IN int handle; /* thread handle */ |
| 138 | OUT void* tid; /* server thread id */ |
| 139 | OUT int exit_code; /* thread exit code */ |
| 140 | OUT int priority; /* thread priority level */ |
Alexandre Julliard | 62a8b43 | 1999-01-19 17:48:23 +0000 | [diff] [blame] | 141 | }; |
| 142 | |
| 143 | |
| 144 | /* Set a thread informations */ |
| 145 | struct set_thread_info_request |
| 146 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 147 | IN int handle; /* thread handle */ |
| 148 | IN int mask; /* setting mask (see below) */ |
| 149 | IN int priority; /* priority class */ |
| 150 | IN int affinity; /* affinity mask */ |
Alexandre Julliard | 62a8b43 | 1999-01-19 17:48:23 +0000 | [diff] [blame] | 151 | }; |
| 152 | #define SET_THREAD_INFO_PRIORITY 0x01 |
| 153 | #define SET_THREAD_INFO_AFFINITY 0x02 |
| 154 | |
| 155 | |
| 156 | /* Suspend a thread */ |
| 157 | struct suspend_thread_request |
| 158 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 159 | IN int handle; /* thread handle */ |
| 160 | OUT int count; /* new suspend count */ |
Alexandre Julliard | 62a8b43 | 1999-01-19 17:48:23 +0000 | [diff] [blame] | 161 | }; |
| 162 | |
| 163 | |
| 164 | /* Resume a thread */ |
| 165 | struct resume_thread_request |
| 166 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 167 | IN int handle; /* thread handle */ |
| 168 | OUT int count; /* new suspend count */ |
Alexandre Julliard | 62a8b43 | 1999-01-19 17:48:23 +0000 | [diff] [blame] | 169 | }; |
| 170 | |
| 171 | |
Ulrich Weigand | 371fd75 | 1999-04-11 17:13:03 +0000 | [diff] [blame] | 172 | /* Debugger support: freeze / unfreeze */ |
| 173 | struct debugger_request |
| 174 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 175 | IN int op; /* operation type */ |
Ulrich Weigand | 371fd75 | 1999-04-11 17:13:03 +0000 | [diff] [blame] | 176 | }; |
| 177 | |
| 178 | enum debugger_op { DEBUGGER_FREEZE_ALL, DEBUGGER_UNFREEZE_ALL }; |
| 179 | |
| 180 | |
Alexandre Julliard | 62a8b43 | 1999-01-19 17:48:23 +0000 | [diff] [blame] | 181 | /* Queue an APC for a thread */ |
| 182 | struct queue_apc_request |
| 183 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 184 | IN int handle; /* thread handle */ |
| 185 | IN void* func; /* function to call */ |
| 186 | IN void* param; /* param for function to call */ |
| 187 | }; |
| 188 | |
| 189 | |
| 190 | /* Get list of APC to call */ |
| 191 | struct get_apcs_request |
| 192 | { |
| 193 | OUT int count; /* number of apcs */ |
| 194 | OUT void* apcs[1]; /* async procedures to call */ |
Alexandre Julliard | 85ed45e | 1998-08-22 19:03:56 +0000 | [diff] [blame] | 195 | }; |
| 196 | |
| 197 | |
Alexandre Julliard | 767e6f6 | 1998-08-09 12:47:43 +0000 | [diff] [blame] | 198 | /* Close a handle for the current process */ |
| 199 | struct close_handle_request |
| 200 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 201 | IN int handle; /* handle to close */ |
Alexandre Julliard | 767e6f6 | 1998-08-09 12:47:43 +0000 | [diff] [blame] | 202 | }; |
| 203 | |
| 204 | |
Alexandre Julliard | 6d4ee73 | 1999-02-20 16:13:28 +0000 | [diff] [blame] | 205 | /* Get information about a handle */ |
| 206 | struct get_handle_info_request |
| 207 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 208 | IN int handle; /* handle we are interested in */ |
| 209 | OUT int flags; /* handle flags */ |
Alexandre Julliard | 6d4ee73 | 1999-02-20 16:13:28 +0000 | [diff] [blame] | 210 | }; |
| 211 | |
| 212 | |
| 213 | /* Set a handle information */ |
| 214 | struct set_handle_info_request |
| 215 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 216 | IN int handle; /* handle we are interested in */ |
| 217 | IN int flags; /* new handle flags */ |
| 218 | IN int mask; /* mask for flags to set */ |
Alexandre Julliard | 6d4ee73 | 1999-02-20 16:13:28 +0000 | [diff] [blame] | 219 | }; |
| 220 | |
| 221 | |
Alexandre Julliard | 767e6f6 | 1998-08-09 12:47:43 +0000 | [diff] [blame] | 222 | /* Duplicate a handle */ |
| 223 | struct dup_handle_request |
| 224 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 225 | IN int src_process; /* src process handle */ |
| 226 | IN int src_handle; /* src handle to duplicate */ |
| 227 | IN int dst_process; /* dst process handle */ |
| 228 | IN unsigned int access; /* wanted access rights */ |
| 229 | IN int inherit; /* inherit flag */ |
| 230 | IN int options; /* duplicate options (see below) */ |
| 231 | OUT int handle; /* duplicated handle in dst process */ |
Alexandre Julliard | 767e6f6 | 1998-08-09 12:47:43 +0000 | [diff] [blame] | 232 | }; |
Alexandre Julliard | 63cb0f8 | 1998-12-31 15:43:48 +0000 | [diff] [blame] | 233 | #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE |
| 234 | #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS |
| 235 | #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */ |
Alexandre Julliard | 767e6f6 | 1998-08-09 12:47:43 +0000 | [diff] [blame] | 236 | |
| 237 | |
| 238 | /* Open a handle to a process */ |
| 239 | struct open_process_request |
| 240 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 241 | IN void* pid; /* process id to open */ |
| 242 | IN unsigned int access; /* wanted access rights */ |
| 243 | IN int inherit; /* inherit flag */ |
| 244 | OUT int handle; /* handle to the process */ |
Alexandre Julliard | 767e6f6 | 1998-08-09 12:47:43 +0000 | [diff] [blame] | 245 | }; |
Alexandre Julliard | 642d313 | 1998-07-12 19:29:36 +0000 | [diff] [blame] | 246 | |
| 247 | |
Alexandre Julliard | 85ed45e | 1998-08-22 19:03:56 +0000 | [diff] [blame] | 248 | /* Wait for handles */ |
| 249 | struct select_request |
| 250 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 251 | IN int count; /* handles count */ |
| 252 | IN int flags; /* wait flags (see below) */ |
| 253 | IN int timeout; /* timeout in ms */ |
| 254 | OUT int signaled; /* signaled handle */ |
| 255 | IN int handles[1]; /* handles to select on */ |
Alexandre Julliard | 85ed45e | 1998-08-22 19:03:56 +0000 | [diff] [blame] | 256 | }; |
| 257 | #define SELECT_ALL 1 |
Alexandre Julliard | a8b8d9c | 1999-01-01 16:59:27 +0000 | [diff] [blame] | 258 | #define SELECT_ALERTABLE 2 |
| 259 | #define SELECT_TIMEOUT 4 |
Alexandre Julliard | 85ed45e | 1998-08-22 19:03:56 +0000 | [diff] [blame] | 260 | |
Alexandre Julliard | d30dfd2 | 1998-09-27 18:28:36 +0000 | [diff] [blame] | 261 | |
| 262 | /* Create an event */ |
| 263 | struct create_event_request |
| 264 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 265 | IN int manual_reset; /* manual reset event */ |
| 266 | IN int initial_state; /* initial state of the event */ |
| 267 | IN int inherit; /* inherit flag */ |
| 268 | OUT int handle; /* handle to the event */ |
| 269 | IN char name[1]; /* event name */ |
Alexandre Julliard | d30dfd2 | 1998-09-27 18:28:36 +0000 | [diff] [blame] | 270 | }; |
| 271 | |
| 272 | /* Event operation */ |
| 273 | struct event_op_request |
| 274 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 275 | IN int handle; /* handle to event */ |
| 276 | IN int op; /* event operation (see below) */ |
Alexandre Julliard | d30dfd2 | 1998-09-27 18:28:36 +0000 | [diff] [blame] | 277 | }; |
| 278 | enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT }; |
| 279 | |
| 280 | |
Alexandre Julliard | 43c190e | 1999-05-15 10:48:19 +0000 | [diff] [blame] | 281 | /* Open an event */ |
| 282 | struct open_event_request |
| 283 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 284 | IN unsigned int access; /* wanted access rights */ |
| 285 | IN int inherit; /* inherit flag */ |
| 286 | OUT int handle; /* handle to the event */ |
| 287 | IN char name[1]; /* object name */ |
Alexandre Julliard | 43c190e | 1999-05-15 10:48:19 +0000 | [diff] [blame] | 288 | }; |
| 289 | |
| 290 | |
Alexandre Julliard | d30dfd2 | 1998-09-27 18:28:36 +0000 | [diff] [blame] | 291 | /* Create a mutex */ |
| 292 | struct create_mutex_request |
| 293 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 294 | IN int owned; /* initially owned? */ |
| 295 | IN int inherit; /* inherit flag */ |
| 296 | OUT int handle; /* handle to the mutex */ |
| 297 | IN char name[1]; /* mutex name */ |
Alexandre Julliard | d30dfd2 | 1998-09-27 18:28:36 +0000 | [diff] [blame] | 298 | }; |
| 299 | |
| 300 | |
| 301 | /* Release a mutex */ |
| 302 | struct release_mutex_request |
| 303 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 304 | IN int handle; /* handle to the mutex */ |
Alexandre Julliard | d30dfd2 | 1998-09-27 18:28:36 +0000 | [diff] [blame] | 305 | }; |
| 306 | |
| 307 | |
Alexandre Julliard | 43c190e | 1999-05-15 10:48:19 +0000 | [diff] [blame] | 308 | /* Open a mutex */ |
| 309 | struct open_mutex_request |
| 310 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 311 | IN unsigned int access; /* wanted access rights */ |
| 312 | IN int inherit; /* inherit flag */ |
| 313 | OUT int handle; /* handle to the mutex */ |
| 314 | IN char name[1]; /* object name */ |
Alexandre Julliard | 43c190e | 1999-05-15 10:48:19 +0000 | [diff] [blame] | 315 | }; |
| 316 | |
| 317 | |
Alexandre Julliard | d30dfd2 | 1998-09-27 18:28:36 +0000 | [diff] [blame] | 318 | /* Create a semaphore */ |
| 319 | struct create_semaphore_request |
| 320 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 321 | IN unsigned int initial; /* initial count */ |
| 322 | IN unsigned int max; /* maximum count */ |
| 323 | IN int inherit; /* inherit flag */ |
| 324 | OUT int handle; /* handle to the semaphore */ |
| 325 | IN char name[1]; /* semaphore name */ |
Alexandre Julliard | d30dfd2 | 1998-09-27 18:28:36 +0000 | [diff] [blame] | 326 | }; |
| 327 | |
| 328 | |
| 329 | /* Release a semaphore */ |
| 330 | struct release_semaphore_request |
| 331 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 332 | IN int handle; /* handle to the semaphore */ |
| 333 | IN unsigned int count; /* count to add to semaphore */ |
| 334 | OUT unsigned int prev_count; /* previous semaphore count */ |
Alexandre Julliard | d30dfd2 | 1998-09-27 18:28:36 +0000 | [diff] [blame] | 335 | }; |
| 336 | |
Alexandre Julliard | 338e757 | 1998-12-27 15:28:54 +0000 | [diff] [blame] | 337 | |
Alexandre Julliard | 43c190e | 1999-05-15 10:48:19 +0000 | [diff] [blame] | 338 | /* Open a semaphore */ |
| 339 | struct open_semaphore_request |
Alexandre Julliard | d30dfd2 | 1998-09-27 18:28:36 +0000 | [diff] [blame] | 340 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 341 | IN unsigned int access; /* wanted access rights */ |
| 342 | IN int inherit; /* inherit flag */ |
| 343 | OUT int handle; /* handle to the semaphore */ |
| 344 | IN char name[1]; /* object name */ |
Alexandre Julliard | d30dfd2 | 1998-09-27 18:28:36 +0000 | [diff] [blame] | 345 | }; |
| 346 | |
| 347 | |
Alexandre Julliard | 338e757 | 1998-12-27 15:28:54 +0000 | [diff] [blame] | 348 | /* Create a file */ |
| 349 | struct create_file_request |
| 350 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 351 | IN unsigned int access; /* wanted access rights */ |
| 352 | IN int inherit; /* inherit flag */ |
| 353 | IN unsigned int sharing; /* sharing flags */ |
| 354 | IN int create; /* file create action */ |
| 355 | IN unsigned int attrs; /* file attributes for creation */ |
| 356 | OUT int handle; /* handle to the file */ |
| 357 | IN char name[1]; /* file name */ |
Alexandre Julliard | 338e757 | 1998-12-27 15:28:54 +0000 | [diff] [blame] | 358 | }; |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 359 | |
| 360 | |
| 361 | /* Allocate a file handle for a Unix fd */ |
| 362 | struct alloc_file_handle_request |
Alexandre Julliard | 338e757 | 1998-12-27 15:28:54 +0000 | [diff] [blame] | 363 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 364 | IN unsigned int access; /* wanted access rights */ |
| 365 | OUT int handle; /* handle to the file */ |
Alexandre Julliard | 338e757 | 1998-12-27 15:28:54 +0000 | [diff] [blame] | 366 | }; |
| 367 | |
| 368 | |
Alexandre Julliard | aa0ebd0 | 1998-12-30 12:06:45 +0000 | [diff] [blame] | 369 | /* Get a Unix fd to read from a file */ |
| 370 | struct get_read_fd_request |
| 371 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 372 | IN int handle; /* handle to the file */ |
Alexandre Julliard | aa0ebd0 | 1998-12-30 12:06:45 +0000 | [diff] [blame] | 373 | }; |
| 374 | |
| 375 | |
| 376 | /* Get a Unix fd to write to a file */ |
| 377 | struct get_write_fd_request |
| 378 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 379 | IN int handle; /* handle to the file */ |
Alexandre Julliard | aa0ebd0 | 1998-12-30 12:06:45 +0000 | [diff] [blame] | 380 | }; |
| 381 | |
| 382 | |
| 383 | /* Set a file current position */ |
| 384 | struct set_file_pointer_request |
| 385 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 386 | IN int handle; /* handle to the file */ |
| 387 | IN int low; /* position low word */ |
| 388 | IN int high; /* position high word */ |
| 389 | IN int whence; /* whence to seek */ |
| 390 | OUT int new_low; /* new position low word */ |
| 391 | OUT int new_high; /* new position high word */ |
Alexandre Julliard | aa0ebd0 | 1998-12-30 12:06:45 +0000 | [diff] [blame] | 392 | }; |
| 393 | |
| 394 | |
| 395 | /* Truncate (or extend) a file */ |
| 396 | struct truncate_file_request |
| 397 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 398 | IN int handle; /* handle to the file */ |
Alexandre Julliard | aa0ebd0 | 1998-12-30 12:06:45 +0000 | [diff] [blame] | 399 | }; |
| 400 | |
| 401 | |
Alexandre Julliard | 0562539 | 1999-01-03 11:55:56 +0000 | [diff] [blame] | 402 | /* Set a file access and modification times */ |
| 403 | struct set_file_time_request |
| 404 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 405 | IN int handle; /* handle to the file */ |
| 406 | IN time_t access_time; /* last access time */ |
| 407 | IN time_t write_time; /* last write time */ |
Alexandre Julliard | 0562539 | 1999-01-03 11:55:56 +0000 | [diff] [blame] | 408 | }; |
| 409 | |
| 410 | |
Alexandre Julliard | aa0ebd0 | 1998-12-30 12:06:45 +0000 | [diff] [blame] | 411 | /* Flush a file buffers */ |
| 412 | struct flush_file_request |
| 413 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 414 | IN int handle; /* handle to the file */ |
Alexandre Julliard | aa0ebd0 | 1998-12-30 12:06:45 +0000 | [diff] [blame] | 415 | }; |
| 416 | |
| 417 | |
| 418 | /* Get information about a file */ |
Alexandre Julliard | 338e757 | 1998-12-27 15:28:54 +0000 | [diff] [blame] | 419 | struct get_file_info_request |
| 420 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 421 | IN int handle; /* handle to the file */ |
| 422 | OUT int type; /* file type */ |
| 423 | OUT int attr; /* file attributes */ |
| 424 | OUT time_t access_time; /* last access time */ |
| 425 | OUT time_t write_time; /* last write time */ |
| 426 | OUT int size_high; /* file size */ |
| 427 | OUT int size_low; /* file size */ |
| 428 | OUT int links; /* number of links */ |
| 429 | OUT int index_high; /* unique index */ |
| 430 | OUT int index_low; /* unique index */ |
| 431 | OUT unsigned int serial; /* volume serial number */ |
Alexandre Julliard | 338e757 | 1998-12-27 15:28:54 +0000 | [diff] [blame] | 432 | }; |
| 433 | |
Alexandre Julliard | aa0ebd0 | 1998-12-30 12:06:45 +0000 | [diff] [blame] | 434 | |
Alexandre Julliard | 62a8b43 | 1999-01-19 17:48:23 +0000 | [diff] [blame] | 435 | /* Lock a region of a file */ |
| 436 | struct lock_file_request |
| 437 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 438 | IN int handle; /* handle to the file */ |
| 439 | IN unsigned int offset_low; /* offset of start of lock */ |
| 440 | IN unsigned int offset_high; /* offset of start of lock */ |
| 441 | IN unsigned int count_low; /* count of bytes to lock */ |
| 442 | IN unsigned int count_high; /* count of bytes to lock */ |
Alexandre Julliard | 62a8b43 | 1999-01-19 17:48:23 +0000 | [diff] [blame] | 443 | }; |
| 444 | |
| 445 | |
| 446 | /* Unlock a region of a file */ |
| 447 | struct unlock_file_request |
| 448 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 449 | IN int handle; /* handle to the file */ |
| 450 | IN unsigned int offset_low; /* offset of start of unlock */ |
| 451 | IN unsigned int offset_high; /* offset of start of unlock */ |
| 452 | IN unsigned int count_low; /* count of bytes to unlock */ |
| 453 | IN unsigned int count_high; /* count of bytes to unlock */ |
Alexandre Julliard | 62a8b43 | 1999-01-19 17:48:23 +0000 | [diff] [blame] | 454 | }; |
| 455 | |
| 456 | |
Alexandre Julliard | aa0ebd0 | 1998-12-30 12:06:45 +0000 | [diff] [blame] | 457 | /* Create an anonymous pipe */ |
| 458 | struct create_pipe_request |
| 459 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 460 | IN int inherit; /* inherit flag */ |
| 461 | OUT int handle_read; /* handle to the read-side of the pipe */ |
| 462 | OUT int handle_write; /* handle to the write-side of the pipe */ |
Alexandre Julliard | aa0ebd0 | 1998-12-30 12:06:45 +0000 | [diff] [blame] | 463 | }; |
| 464 | |
| 465 | |
Alexandre Julliard | 62a8b43 | 1999-01-19 17:48:23 +0000 | [diff] [blame] | 466 | /* Allocate a console for the current process */ |
| 467 | struct alloc_console_request |
Alexandre Julliard | aa0ebd0 | 1998-12-30 12:06:45 +0000 | [diff] [blame] | 468 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 469 | IN unsigned int access; /* wanted access rights */ |
| 470 | IN int inherit; /* inherit flag */ |
| 471 | OUT int handle_in; /* handle to console input */ |
| 472 | OUT int handle_out; /* handle to console output */ |
Alexandre Julliard | 62a8b43 | 1999-01-19 17:48:23 +0000 | [diff] [blame] | 473 | }; |
| 474 | |
| 475 | |
| 476 | /* Free the console of the current process */ |
| 477 | struct free_console_request |
| 478 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 479 | IN int dummy; |
Alexandre Julliard | 62a8b43 | 1999-01-19 17:48:23 +0000 | [diff] [blame] | 480 | }; |
| 481 | |
| 482 | |
| 483 | /* Open a handle to the process console */ |
| 484 | struct open_console_request |
| 485 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 486 | IN int output; /* input or output? */ |
| 487 | IN unsigned int access; /* wanted access rights */ |
| 488 | IN int inherit; /* inherit flag */ |
| 489 | OUT int handle; /* handle to the console */ |
Alexandre Julliard | aa0ebd0 | 1998-12-30 12:06:45 +0000 | [diff] [blame] | 490 | }; |
| 491 | |
| 492 | |
| 493 | /* Set a console file descriptor */ |
| 494 | struct set_console_fd_request |
| 495 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 496 | IN int handle; /* handle to the console */ |
| 497 | IN int file_handle; /* handle of file to use as file descriptor */ |
| 498 | IN int pid; /* pid of xterm (hack) */ |
Alexandre Julliard | 62a8b43 | 1999-01-19 17:48:23 +0000 | [diff] [blame] | 499 | }; |
| 500 | |
| 501 | |
| 502 | /* Get a console mode (input or output) */ |
| 503 | struct get_console_mode_request |
| 504 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 505 | IN int handle; /* handle to the console */ |
| 506 | OUT int mode; /* console mode */ |
Alexandre Julliard | 62a8b43 | 1999-01-19 17:48:23 +0000 | [diff] [blame] | 507 | }; |
| 508 | |
| 509 | |
| 510 | /* Set a console mode (input or output) */ |
| 511 | struct set_console_mode_request |
| 512 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 513 | IN int handle; /* handle to the console */ |
| 514 | IN int mode; /* console mode */ |
Alexandre Julliard | 62a8b43 | 1999-01-19 17:48:23 +0000 | [diff] [blame] | 515 | }; |
| 516 | |
| 517 | |
| 518 | /* Set info about a console (output only) */ |
| 519 | struct set_console_info_request |
| 520 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 521 | IN int handle; /* handle to the console */ |
| 522 | IN int mask; /* setting mask (see below) */ |
| 523 | IN int cursor_size; /* size of cursor (percentage filled) */ |
| 524 | IN int cursor_visible;/* cursor visibility flag */ |
| 525 | IN char title[1]; /* console title */ |
Alexandre Julliard | 62a8b43 | 1999-01-19 17:48:23 +0000 | [diff] [blame] | 526 | }; |
| 527 | #define SET_CONSOLE_INFO_CURSOR 0x01 |
| 528 | #define SET_CONSOLE_INFO_TITLE 0x02 |
| 529 | |
| 530 | /* Get info about a console (output only) */ |
| 531 | struct get_console_info_request |
| 532 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 533 | IN int handle; /* handle to the console */ |
| 534 | OUT int cursor_size; /* size of cursor (percentage filled) */ |
| 535 | OUT int cursor_visible;/* cursor visibility flag */ |
| 536 | OUT int pid; /* pid of xterm (hack) */ |
| 537 | OUT char title[1]; /* console title */ |
Alexandre Julliard | aa0ebd0 | 1998-12-30 12:06:45 +0000 | [diff] [blame] | 538 | }; |
| 539 | |
| 540 | |
Alexandre Julliard | 4b46112 | 1999-01-31 19:04:30 +0000 | [diff] [blame] | 541 | /* Add input records to a console input queue */ |
| 542 | struct write_console_input_request |
| 543 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 544 | IN int handle; /* handle to the console input */ |
| 545 | IN int count; /* number of input records */ |
| 546 | OUT int written; /* number of records written */ |
| 547 | /* INPUT_RECORD records[0]; */ /* input records */ |
Alexandre Julliard | 4b46112 | 1999-01-31 19:04:30 +0000 | [diff] [blame] | 548 | }; |
| 549 | |
| 550 | /* Fetch input records from a console input queue */ |
| 551 | struct read_console_input_request |
| 552 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 553 | IN int handle; /* handle to the console input */ |
| 554 | IN int count; /* max number of records to retrieve */ |
| 555 | IN int flush; /* flush the retrieved records from the queue? */ |
| 556 | OUT int read; /* number of records read */ |
| 557 | /* INPUT_RECORD records[0]; */ /* input records */ |
Alexandre Julliard | 4b46112 | 1999-01-31 19:04:30 +0000 | [diff] [blame] | 558 | }; |
| 559 | |
| 560 | |
Alexandre Julliard | a8b8d9c | 1999-01-01 16:59:27 +0000 | [diff] [blame] | 561 | /* Create a change notification */ |
Alexandre Julliard | 63cb0f8 | 1998-12-31 15:43:48 +0000 | [diff] [blame] | 562 | struct create_change_notification_request |
| 563 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 564 | IN int subtree; /* watch all the subtree */ |
| 565 | IN int filter; /* notification filter */ |
| 566 | OUT int handle; /* handle to the change notification */ |
Alexandre Julliard | 63cb0f8 | 1998-12-31 15:43:48 +0000 | [diff] [blame] | 567 | }; |
| 568 | |
| 569 | |
Alexandre Julliard | a8b8d9c | 1999-01-01 16:59:27 +0000 | [diff] [blame] | 570 | /* Create a file mapping */ |
| 571 | struct create_mapping_request |
| 572 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 573 | IN int size_high; /* mapping size */ |
| 574 | IN int size_low; /* mapping size */ |
| 575 | IN int protect; /* protection flags (see below) */ |
| 576 | IN int inherit; /* inherit flag */ |
| 577 | IN int file_handle; /* file handle */ |
| 578 | OUT int handle; /* handle to the mapping */ |
| 579 | IN char name[1]; /* object name */ |
Alexandre Julliard | a8b8d9c | 1999-01-01 16:59:27 +0000 | [diff] [blame] | 580 | }; |
| 581 | /* protection flags */ |
| 582 | #define VPROT_READ 0x01 |
| 583 | #define VPROT_WRITE 0x02 |
| 584 | #define VPROT_EXEC 0x04 |
| 585 | #define VPROT_WRITECOPY 0x08 |
| 586 | #define VPROT_GUARD 0x10 |
| 587 | #define VPROT_NOCACHE 0x20 |
| 588 | #define VPROT_COMMITTED 0x40 |
| 589 | |
| 590 | |
Alexandre Julliard | 43c190e | 1999-05-15 10:48:19 +0000 | [diff] [blame] | 591 | /* Open a mapping */ |
| 592 | struct open_mapping_request |
| 593 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 594 | IN unsigned int access; /* wanted access rights */ |
| 595 | IN int inherit; /* inherit flag */ |
| 596 | OUT int handle; /* handle to the mapping */ |
| 597 | IN char name[1]; /* object name */ |
Alexandre Julliard | 43c190e | 1999-05-15 10:48:19 +0000 | [diff] [blame] | 598 | }; |
| 599 | |
| 600 | |
Alexandre Julliard | a8b8d9c | 1999-01-01 16:59:27 +0000 | [diff] [blame] | 601 | /* Get information about a file mapping */ |
| 602 | struct get_mapping_info_request |
| 603 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 604 | IN int handle; /* handle to the mapping */ |
| 605 | OUT int size_high; /* mapping size */ |
| 606 | OUT int size_low; /* mapping size */ |
| 607 | OUT int protect; /* protection flags */ |
Alexandre Julliard | a8b8d9c | 1999-01-01 16:59:27 +0000 | [diff] [blame] | 608 | }; |
| 609 | |
| 610 | |
Alexandre Julliard | 62a8b43 | 1999-01-19 17:48:23 +0000 | [diff] [blame] | 611 | /* Create a device */ |
| 612 | struct create_device_request |
| 613 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 614 | IN unsigned int access; /* wanted access rights */ |
| 615 | IN int inherit; /* inherit flag */ |
| 616 | IN int id; /* client private id */ |
| 617 | OUT int handle; /* handle to the device */ |
Alexandre Julliard | 62a8b43 | 1999-01-19 17:48:23 +0000 | [diff] [blame] | 618 | }; |
| 619 | |
| 620 | |
Alexandre Julliard | fdc92ba | 1999-02-14 18:03:15 +0000 | [diff] [blame] | 621 | /* Create a snapshot */ |
| 622 | struct create_snapshot_request |
| 623 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 624 | IN int inherit; /* inherit flag */ |
| 625 | IN int flags; /* snapshot flags (TH32CS_*) */ |
| 626 | OUT int handle; /* handle to the snapshot */ |
Alexandre Julliard | fdc92ba | 1999-02-14 18:03:15 +0000 | [diff] [blame] | 627 | }; |
| 628 | |
| 629 | |
| 630 | /* Get the next process from a snapshot */ |
| 631 | struct next_process_request |
| 632 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 633 | IN int handle; /* handle to the snapshot */ |
| 634 | IN int reset; /* reset snapshot position? */ |
| 635 | OUT void* pid; /* process id */ |
| 636 | OUT int threads; /* number of threads */ |
| 637 | OUT int priority; /* process priority */ |
Alexandre Julliard | fdc92ba | 1999-02-14 18:03:15 +0000 | [diff] [blame] | 638 | }; |
| 639 | |
| 640 | |
Alexandre Julliard | e712e07 | 1999-05-23 19:53:30 +0000 | [diff] [blame] | 641 | /* Wait for a debug event */ |
| 642 | struct wait_debug_event_request |
| 643 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 644 | IN int timeout; /* timeout in ms */ |
| 645 | OUT int code; /* event code */ |
| 646 | OUT void* pid; /* process id */ |
| 647 | OUT void* tid; /* thread id */ |
| 648 | /* OUT union debug_event_data data; */ |
Alexandre Julliard | e712e07 | 1999-05-23 19:53:30 +0000 | [diff] [blame] | 649 | }; |
| 650 | |
| 651 | |
| 652 | /* Send a debug event */ |
| 653 | struct send_debug_event_request |
| 654 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 655 | IN int code; /* event code */ |
| 656 | OUT int status; /* event continuation status */ |
| 657 | /* IN union debug_event_data data; */ |
Alexandre Julliard | e712e07 | 1999-05-23 19:53:30 +0000 | [diff] [blame] | 658 | }; |
| 659 | |
| 660 | |
| 661 | /* definitions of the event data depending on the event code */ |
| 662 | struct debug_event_exception |
| 663 | { |
| 664 | int code; /* exception code */ |
| 665 | int flags; /* exception flags */ |
| 666 | void *record; /* exception record ptr */ |
| 667 | void *addr; /* exception address */ |
| 668 | int nb_params; /* exceptions parameters */ |
| 669 | int params[15]; |
| 670 | int first_chance; /* first chance to handle it? */ |
| 671 | }; |
| 672 | struct debug_event_create_thread |
| 673 | { |
| 674 | int handle; /* handle to the new thread */ |
| 675 | void *teb; /* thread teb (in debugged process address space) */ |
| 676 | void *start; /* thread startup routine */ |
| 677 | }; |
| 678 | struct debug_event_create_process |
| 679 | { |
| 680 | int file; /* handle to the process exe file */ |
| 681 | int process; /* handle to the new process */ |
| 682 | int thread; /* handle to the new thread */ |
| 683 | void *base; /* base of executable image */ |
| 684 | int dbg_offset; /* offset of debug info in file */ |
| 685 | int dbg_size; /* size of debug info */ |
| 686 | void *teb; /* thread teb (in debugged process address space) */ |
| 687 | void *start; /* thread startup routine */ |
| 688 | void *name; /* image name (optional) */ |
| 689 | int unicode; /* is it Unicode? */ |
| 690 | }; |
| 691 | struct debug_event_exit |
| 692 | { |
| 693 | int exit_code; /* thread or process exit code */ |
| 694 | }; |
| 695 | struct debug_event_load_dll |
| 696 | { |
| 697 | int handle; /* file handle for the dll */ |
| 698 | void *base; /* base address of the dll */ |
| 699 | int dbg_offset; /* offset of debug info in file */ |
| 700 | int dbg_size; /* size of debug info */ |
| 701 | void *name; /* image name (optional) */ |
| 702 | int unicode; /* is it Unicode? */ |
| 703 | }; |
| 704 | struct debug_event_unload_dll |
| 705 | { |
| 706 | void *base; /* base address of the dll */ |
| 707 | }; |
| 708 | struct debug_event_output_string |
| 709 | { |
| 710 | void *string; /* string to display (in debugged process address space) */ |
| 711 | int unicode; /* is it Unicode? */ |
| 712 | int length; /* string length */ |
| 713 | }; |
| 714 | struct debug_event_rip_info |
| 715 | { |
| 716 | int error; /* ??? */ |
| 717 | int type; /* ??? */ |
| 718 | }; |
| 719 | union debug_event_data |
| 720 | { |
| 721 | struct debug_event_exception exception; |
| 722 | struct debug_event_create_thread create_thread; |
| 723 | struct debug_event_create_process create_process; |
| 724 | struct debug_event_exit exit; |
| 725 | struct debug_event_load_dll load_dll; |
| 726 | struct debug_event_unload_dll unload_dll; |
| 727 | struct debug_event_output_string output_string; |
| 728 | struct debug_event_rip_info rip_info; |
| 729 | }; |
| 730 | |
| 731 | |
| 732 | /* Continue a debug event */ |
| 733 | struct continue_debug_event_request |
| 734 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 735 | IN void* pid; /* process id to continue */ |
| 736 | IN void* tid; /* thread id to continue */ |
| 737 | IN int status; /* continuation status */ |
Alexandre Julliard | e712e07 | 1999-05-23 19:53:30 +0000 | [diff] [blame] | 738 | }; |
| 739 | |
| 740 | |
| 741 | /* Start debugging an existing process */ |
| 742 | struct debug_process_request |
| 743 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 744 | IN void* pid; /* id of the process to debug */ |
Alexandre Julliard | e712e07 | 1999-05-23 19:53:30 +0000 | [diff] [blame] | 745 | }; |
| 746 | |
| 747 | |
Alexandre Julliard | 5bc7808 | 1999-06-22 17:26:53 +0000 | [diff] [blame] | 748 | /* Everything below this line is generated automatically by tools/make_requests */ |
| 749 | /* ### make_requests begin ### */ |
| 750 | |
| 751 | enum request |
| 752 | { |
| 753 | REQ_NEW_PROCESS, |
| 754 | REQ_NEW_THREAD, |
| 755 | REQ_SET_DEBUG, |
| 756 | REQ_INIT_PROCESS, |
| 757 | REQ_INIT_THREAD, |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 758 | REQ_GET_THREAD_BUFFER, |
Alexandre Julliard | 5bc7808 | 1999-06-22 17:26:53 +0000 | [diff] [blame] | 759 | REQ_TERMINATE_PROCESS, |
| 760 | REQ_TERMINATE_THREAD, |
| 761 | REQ_GET_PROCESS_INFO, |
| 762 | REQ_SET_PROCESS_INFO, |
| 763 | REQ_GET_THREAD_INFO, |
| 764 | REQ_SET_THREAD_INFO, |
| 765 | REQ_SUSPEND_THREAD, |
| 766 | REQ_RESUME_THREAD, |
| 767 | REQ_DEBUGGER, |
| 768 | REQ_QUEUE_APC, |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 769 | REQ_GET_APCS, |
Alexandre Julliard | 5bc7808 | 1999-06-22 17:26:53 +0000 | [diff] [blame] | 770 | REQ_CLOSE_HANDLE, |
| 771 | REQ_GET_HANDLE_INFO, |
| 772 | REQ_SET_HANDLE_INFO, |
| 773 | REQ_DUP_HANDLE, |
| 774 | REQ_OPEN_PROCESS, |
| 775 | REQ_SELECT, |
| 776 | REQ_CREATE_EVENT, |
| 777 | REQ_EVENT_OP, |
| 778 | REQ_OPEN_EVENT, |
| 779 | REQ_CREATE_MUTEX, |
| 780 | REQ_RELEASE_MUTEX, |
| 781 | REQ_OPEN_MUTEX, |
| 782 | REQ_CREATE_SEMAPHORE, |
| 783 | REQ_RELEASE_SEMAPHORE, |
| 784 | REQ_OPEN_SEMAPHORE, |
| 785 | REQ_CREATE_FILE, |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 786 | REQ_ALLOC_FILE_HANDLE, |
Alexandre Julliard | 5bc7808 | 1999-06-22 17:26:53 +0000 | [diff] [blame] | 787 | REQ_GET_READ_FD, |
| 788 | REQ_GET_WRITE_FD, |
| 789 | REQ_SET_FILE_POINTER, |
| 790 | REQ_TRUNCATE_FILE, |
| 791 | REQ_SET_FILE_TIME, |
| 792 | REQ_FLUSH_FILE, |
| 793 | REQ_GET_FILE_INFO, |
| 794 | REQ_LOCK_FILE, |
| 795 | REQ_UNLOCK_FILE, |
| 796 | REQ_CREATE_PIPE, |
| 797 | REQ_ALLOC_CONSOLE, |
| 798 | REQ_FREE_CONSOLE, |
| 799 | REQ_OPEN_CONSOLE, |
| 800 | REQ_SET_CONSOLE_FD, |
| 801 | REQ_GET_CONSOLE_MODE, |
| 802 | REQ_SET_CONSOLE_MODE, |
| 803 | REQ_SET_CONSOLE_INFO, |
| 804 | REQ_GET_CONSOLE_INFO, |
| 805 | REQ_WRITE_CONSOLE_INPUT, |
| 806 | REQ_READ_CONSOLE_INPUT, |
| 807 | REQ_CREATE_CHANGE_NOTIFICATION, |
| 808 | REQ_CREATE_MAPPING, |
| 809 | REQ_OPEN_MAPPING, |
| 810 | REQ_GET_MAPPING_INFO, |
| 811 | REQ_CREATE_DEVICE, |
| 812 | REQ_CREATE_SNAPSHOT, |
| 813 | REQ_NEXT_PROCESS, |
| 814 | REQ_WAIT_DEBUG_EVENT, |
| 815 | REQ_SEND_DEBUG_EVENT, |
| 816 | REQ_CONTINUE_DEBUG_EVENT, |
| 817 | REQ_DEBUG_PROCESS, |
| 818 | REQ_NB_REQUESTS |
| 819 | }; |
| 820 | |
| 821 | /* ### make_requests end ### */ |
| 822 | /* Everything above this line is generated automatically by tools/make_requests */ |
| 823 | |
Alexandre Julliard | 43c190e | 1999-05-15 10:48:19 +0000 | [diff] [blame] | 824 | |
Alexandre Julliard | 642d313 | 1998-07-12 19:29:36 +0000 | [diff] [blame] | 825 | /* client-side functions */ |
| 826 | |
| 827 | #ifndef __WINE_SERVER__ |
Alexandre Julliard | d30dfd2 | 1998-09-27 18:28:36 +0000 | [diff] [blame] | 828 | |
Alexandre Julliard | 5bc7808 | 1999-06-22 17:26:53 +0000 | [diff] [blame] | 829 | #include "thread.h" |
| 830 | |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 831 | /* client communication functions */ |
| 832 | |
| 833 | /* get a pointer to the request buffer */ |
| 834 | static inline void *get_req_buffer(void) |
Alexandre Julliard | 5bc7808 | 1999-06-22 17:26:53 +0000 | [diff] [blame] | 835 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 836 | return NtCurrentTeb()->buffer; |
Alexandre Julliard | 5bc7808 | 1999-06-22 17:26:53 +0000 | [diff] [blame] | 837 | } |
| 838 | |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 839 | /* maximum remaining size in the server buffer */ |
| 840 | static inline int server_remaining( const void *ptr ) |
Alexandre Julliard | 5bc7808 | 1999-06-22 17:26:53 +0000 | [diff] [blame] | 841 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 842 | return (char *)NtCurrentTeb()->buffer + NtCurrentTeb()->buffer_size - (char *)ptr; |
Alexandre Julliard | 5bc7808 | 1999-06-22 17:26:53 +0000 | [diff] [blame] | 843 | } |
| 844 | |
| 845 | extern unsigned int server_call( enum request req ); |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 846 | extern unsigned int server_call_fd( enum request req, int fd_out, int *fd_in ); |
| 847 | extern void server_protocol_error( const char *err, ... ); |
Alexandre Julliard | 5bc7808 | 1999-06-22 17:26:53 +0000 | [diff] [blame] | 848 | |
Alexandre Julliard | f692d44 | 1999-03-21 19:23:54 +0000 | [diff] [blame] | 849 | extern int CLIENT_InitServer(void); |
Alexandre Julliard | 338e757 | 1998-12-27 15:28:54 +0000 | [diff] [blame] | 850 | extern int CLIENT_SetDebug( int level ); |
Ulrich Weigand | 371fd75 | 1999-04-11 17:13:03 +0000 | [diff] [blame] | 851 | extern int CLIENT_DebuggerRequest( int op ); |
Alexandre Julliard | 642d313 | 1998-07-12 19:29:36 +0000 | [diff] [blame] | 852 | extern int CLIENT_InitThread(void); |
Alexandre Julliard | 642d313 | 1998-07-12 19:29:36 +0000 | [diff] [blame] | 853 | #endif /* __WINE_SERVER__ */ |
| 854 | |
| 855 | #endif /* __WINE_SERVER_H */ |