protocol.def 77 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261
  1. /* -*- C -*-
  2. *
  3. * Wine server protocol definition
  4. *
  5. * Copyright (C) 2001 Alexandre Julliard
  6. *
  7. * This file is used by tools/make_requests to build the
  8. * protocol structures in include/wine/server_protocol.h
  9. *
  10. * This library is free software; you can redistribute it and/or
  11. * modify it under the terms of the GNU Lesser General Public
  12. * License as published by the Free Software Foundation; either
  13. * version 2.1 of the License, or (at your option) any later version.
  14. *
  15. * This library is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  18. * Lesser General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU Lesser General Public
  21. * License along with this library; if not, write to the Free Software
  22. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  23. */
  24. @HEADER /* start of C declarations */
  25. #include <stdarg.h>
  26. #include <stdlib.h>
  27. #include <time.h>
  28. #include <windef.h>
  29. #include <winbase.h>
  30. struct request_header
  31. {
  32. int req; /* request code */
  33. size_t request_size; /* request variable part size */
  34. size_t reply_size; /* reply variable part maximum size */
  35. };
  36. struct reply_header
  37. {
  38. unsigned int error; /* error result */
  39. size_t reply_size; /* reply variable part size */
  40. };
  41. /* placeholder structure for the maximum allowed request size */
  42. /* this is used to construct the generic_request union */
  43. struct request_max_size
  44. {
  45. int pad[16]; /* the max request size is 16 ints */
  46. };
  47. typedef void *obj_handle_t;
  48. typedef void *user_handle_t;
  49. typedef unsigned short atom_t;
  50. typedef unsigned int process_id_t;
  51. typedef unsigned int thread_id_t;
  52. #define FIRST_USER_HANDLE 0x0020 /* first possible value for low word of user handle */
  53. #define LAST_USER_HANDLE 0xffef /* last possible value for low word of user handle */
  54. /* definitions of the event data depending on the event code */
  55. struct debug_event_exception
  56. {
  57. EXCEPTION_RECORD record; /* exception record */
  58. int first; /* first chance exception? */
  59. };
  60. struct debug_event_create_thread
  61. {
  62. obj_handle_t handle; /* handle to the new thread */
  63. void *teb; /* thread teb (in debugged process address space) */
  64. void *start; /* thread startup routine */
  65. };
  66. struct debug_event_create_process
  67. {
  68. obj_handle_t file; /* handle to the process exe file */
  69. obj_handle_t process; /* handle to the new process */
  70. obj_handle_t thread; /* handle to the new thread */
  71. void *base; /* base of executable image */
  72. int dbg_offset; /* offset of debug info in file */
  73. int dbg_size; /* size of debug info */
  74. void *teb; /* thread teb (in debugged process address space) */
  75. void *start; /* thread startup routine */
  76. void *name; /* image name (optional) */
  77. int unicode; /* is it Unicode? */
  78. };
  79. struct debug_event_exit
  80. {
  81. int exit_code; /* thread or process exit code */
  82. };
  83. struct debug_event_load_dll
  84. {
  85. obj_handle_t handle; /* file handle for the dll */
  86. void *base; /* base address of the dll */
  87. int dbg_offset; /* offset of debug info in file */
  88. int dbg_size; /* size of debug info */
  89. void *name; /* image name (optional) */
  90. int unicode; /* is it Unicode? */
  91. };
  92. struct debug_event_unload_dll
  93. {
  94. void *base; /* base address of the dll */
  95. };
  96. struct debug_event_output_string
  97. {
  98. void *string; /* string to display (in debugged process address space) */
  99. int unicode; /* is it Unicode? */
  100. int length; /* string length */
  101. };
  102. struct debug_event_rip_info
  103. {
  104. int error; /* ??? */
  105. int type; /* ??? */
  106. };
  107. union debug_event_data
  108. {
  109. struct debug_event_exception exception;
  110. struct debug_event_create_thread create_thread;
  111. struct debug_event_create_process create_process;
  112. struct debug_event_exit exit;
  113. struct debug_event_load_dll load_dll;
  114. struct debug_event_unload_dll unload_dll;
  115. struct debug_event_output_string output_string;
  116. struct debug_event_rip_info rip_info;
  117. };
  118. /* debug event data */
  119. typedef struct
  120. {
  121. int code; /* event code */
  122. union debug_event_data info; /* event information */
  123. } debug_event_t;
  124. /* structure used in sending an fd from client to server */
  125. struct send_fd
  126. {
  127. thread_id_t tid; /* thread id */
  128. int fd; /* file descriptor on client-side */
  129. };
  130. /* structure sent by the server on the wait fifo */
  131. struct wake_up_reply
  132. {
  133. void *cookie; /* magic cookie that was passed in select_request */
  134. int signaled; /* wait result */
  135. };
  136. /* structure for absolute timeouts */
  137. typedef struct
  138. {
  139. int sec; /* seconds since Unix epoch */
  140. int usec; /* microseconds */
  141. } abs_time_t;
  142. /* structure returned in the list of window properties */
  143. typedef struct
  144. {
  145. atom_t atom; /* property atom */
  146. short string; /* was atom a string originally? */
  147. obj_handle_t handle; /* handle stored in property */
  148. } property_data_t;
  149. /* structure to specify window rectangles */
  150. typedef struct
  151. {
  152. int left;
  153. int top;
  154. int right;
  155. int bottom;
  156. } rectangle_t;
  157. /* structure for console char/attribute info */
  158. typedef struct
  159. {
  160. WCHAR ch;
  161. unsigned short attr;
  162. } char_info_t;
  163. /****************************************************************/
  164. /* Request declarations */
  165. /* Create a new process from the context of the parent */
  166. @REQ(new_process)
  167. int inherit_all; /* inherit all handles from parent */
  168. int create_flags; /* creation flags */
  169. int unix_pid; /* Unix pid of new process */
  170. obj_handle_t exe_file; /* file handle for main exe */
  171. obj_handle_t hstdin; /* handle for stdin */
  172. obj_handle_t hstdout; /* handle for stdout */
  173. obj_handle_t hstderr; /* handle for stderr */
  174. VARARG(info,startup_info); /* startup information */
  175. VARARG(env,unicode_str); /* environment for new process */
  176. @REPLY
  177. obj_handle_t info; /* new process info handle */
  178. @END
  179. /* Retrieve information about a newly started process */
  180. @REQ(get_new_process_info)
  181. obj_handle_t info; /* info handle returned from new_process_request */
  182. int pinherit; /* process handle inherit flag */
  183. int tinherit; /* thread handle inherit flag */
  184. @REPLY
  185. process_id_t pid; /* process id */
  186. obj_handle_t phandle; /* process handle (in the current process) */
  187. thread_id_t tid; /* thread id */
  188. obj_handle_t thandle; /* thread handle (in the current process) */
  189. int success; /* did the process start successfully? */
  190. @END
  191. /* Create a new thread from the context of the parent */
  192. @REQ(new_thread)
  193. int suspend; /* new thread should be suspended on creation */
  194. int inherit; /* inherit flag */
  195. int request_fd; /* fd for request pipe */
  196. @REPLY
  197. thread_id_t tid; /* thread id */
  198. obj_handle_t handle; /* thread handle (in the current process) */
  199. @END
  200. /* Signal that we are finished booting on the client side */
  201. @REQ(boot_done)
  202. int debug_level; /* new debug level */
  203. @END
  204. /* Initialize a process; called from the new process context */
  205. @REQ(init_process)
  206. void* peb; /* addr of PEB */
  207. void* ldt_copy; /* addr of LDT copy */
  208. @REPLY
  209. int create_flags; /* creation flags */
  210. unsigned int server_start; /* server start time (GetTickCount) */
  211. size_t info_size; /* total size of startup info */
  212. obj_handle_t exe_file; /* file handle for main exe */
  213. obj_handle_t hstdin; /* handle for stdin */
  214. obj_handle_t hstdout; /* handle for stdout */
  215. obj_handle_t hstderr; /* handle for stderr */
  216. @END
  217. /* Retrieve the new process startup info */
  218. @REQ(get_startup_info)
  219. @REPLY
  220. VARARG(info,startup_info); /* startup information */
  221. VARARG(env,unicode_str); /* environment */
  222. @END
  223. /* Signal the end of the process initialization */
  224. @REQ(init_process_done)
  225. void* module; /* main module base address */
  226. size_t module_size; /* main module size */
  227. void* entry; /* process entry point */
  228. void* name; /* ptr to ptr to name (in process addr space) */
  229. obj_handle_t exe_file; /* file handle for main exe */
  230. int gui; /* is it a GUI process? */
  231. VARARG(filename,unicode_str); /* file name of main exe */
  232. @END
  233. /* Initialize a thread; called from the child after fork()/clone() */
  234. @REQ(init_thread)
  235. int unix_pid; /* Unix pid of new thread */
  236. int unix_tid; /* Unix tid of new thread */
  237. void* teb; /* TEB of new thread (in thread address space) */
  238. void* entry; /* thread entry point (in thread address space) */
  239. int reply_fd; /* fd for reply pipe */
  240. int wait_fd; /* fd for blocking calls pipe */
  241. @REPLY
  242. process_id_t pid; /* process id of the new thread's process */
  243. thread_id_t tid; /* thread id of the new thread */
  244. int boot; /* is this the boot thread? */
  245. int version; /* protocol version */
  246. @END
  247. /* Terminate a process */
  248. @REQ(terminate_process)
  249. obj_handle_t handle; /* process handle to terminate */
  250. int exit_code; /* process exit code */
  251. @REPLY
  252. int self; /* suicide? */
  253. @END
  254. /* Terminate a thread */
  255. @REQ(terminate_thread)
  256. obj_handle_t handle; /* thread handle to terminate */
  257. int exit_code; /* thread exit code */
  258. @REPLY
  259. int self; /* suicide? */
  260. int last; /* last thread in this process? */
  261. @END
  262. /* Retrieve information about a process */
  263. @REQ(get_process_info)
  264. obj_handle_t handle; /* process handle */
  265. @REPLY
  266. process_id_t pid; /* server process id */
  267. process_id_t ppid; /* server process id of parent */
  268. int exit_code; /* process exit code */
  269. int priority; /* priority class */
  270. int process_affinity; /* process affinity mask */
  271. int system_affinity; /* system affinity mask */
  272. void* peb; /* PEB address in process address space */
  273. @END
  274. /* Set a process informations */
  275. @REQ(set_process_info)
  276. obj_handle_t handle; /* process handle */
  277. int mask; /* setting mask (see below) */
  278. int priority; /* priority class */
  279. int affinity; /* affinity mask */
  280. @END
  281. #define SET_PROCESS_INFO_PRIORITY 0x01
  282. #define SET_PROCESS_INFO_AFFINITY 0x02
  283. /* Retrieve information about a thread */
  284. @REQ(get_thread_info)
  285. obj_handle_t handle; /* thread handle */
  286. thread_id_t tid_in; /* thread id (optional) */
  287. @REPLY
  288. process_id_t pid; /* server process id */
  289. thread_id_t tid; /* server thread id */
  290. void* teb; /* thread teb pointer */
  291. int exit_code; /* thread exit code */
  292. int priority; /* thread priority level */
  293. int affinity; /* thread affinity mask */
  294. time_t creation_time; /* thread creation time */
  295. time_t exit_time; /* thread exit time */
  296. @END
  297. /* Set a thread informations */
  298. @REQ(set_thread_info)
  299. obj_handle_t handle; /* thread handle */
  300. int mask; /* setting mask (see below) */
  301. int priority; /* priority class */
  302. int affinity; /* affinity mask */
  303. @END
  304. #define SET_THREAD_INFO_PRIORITY 0x01
  305. #define SET_THREAD_INFO_AFFINITY 0x02
  306. /* Retrieve information about a module */
  307. @REQ(get_dll_info)
  308. obj_handle_t handle; /* process handle */
  309. void* base_address; /* base address of module */
  310. @REPLY
  311. size_t size; /* module size */
  312. void* entry_point;
  313. VARARG(filename,unicode_str); /* file name of module */
  314. @END
  315. /* Suspend a thread */
  316. @REQ(suspend_thread)
  317. obj_handle_t handle; /* thread handle */
  318. @REPLY
  319. int count; /* new suspend count */
  320. @END
  321. /* Resume a thread */
  322. @REQ(resume_thread)
  323. obj_handle_t handle; /* thread handle */
  324. @REPLY
  325. int count; /* new suspend count */
  326. @END
  327. /* Notify the server that a dll has been loaded */
  328. @REQ(load_dll)
  329. obj_handle_t handle; /* file handle */
  330. void* base; /* base address */
  331. size_t size; /* dll size */
  332. int dbg_offset; /* debug info offset */
  333. int dbg_size; /* debug info size */
  334. void* name; /* ptr to ptr to name (in process addr space) */
  335. VARARG(filename,unicode_str); /* file name of dll */
  336. @END
  337. /* Notify the server that a dll is being unloaded */
  338. @REQ(unload_dll)
  339. void* base; /* base address */
  340. @END
  341. /* Queue an APC for a thread */
  342. @REQ(queue_apc)
  343. obj_handle_t handle; /* thread handle */
  344. int user; /* user or system apc? */
  345. void* func; /* function to call */
  346. void* arg1; /* params for function to call */
  347. void* arg2;
  348. void* arg3;
  349. @END
  350. /* Get next APC to call */
  351. @REQ(get_apc)
  352. int alertable; /* is thread alertable? */
  353. @REPLY
  354. void* func; /* function to call */
  355. int type; /* function type */
  356. void* arg1; /* function arguments */
  357. void* arg2;
  358. void* arg3;
  359. @END
  360. enum apc_type { APC_NONE, APC_USER, APC_TIMER, APC_ASYNC, APC_ASYNC_IO };
  361. /* Close a handle for the current process */
  362. @REQ(close_handle)
  363. obj_handle_t handle; /* handle to close */
  364. @REPLY
  365. int fd; /* associated fd to close */
  366. @END
  367. /* Set a handle information */
  368. @REQ(set_handle_info)
  369. obj_handle_t handle; /* handle we are interested in */
  370. int flags; /* new handle flags */
  371. int mask; /* mask for flags to set */
  372. int fd; /* file descriptor or -1 */
  373. @REPLY
  374. int old_flags; /* old flag value */
  375. int cur_fd; /* current file descriptor */
  376. @END
  377. /* Duplicate a handle */
  378. @REQ(dup_handle)
  379. obj_handle_t src_process; /* src process handle */
  380. obj_handle_t src_handle; /* src handle to duplicate */
  381. obj_handle_t dst_process; /* dst process handle */
  382. unsigned int access; /* wanted access rights */
  383. int inherit; /* inherit flag */
  384. int options; /* duplicate options (see below) */
  385. @REPLY
  386. obj_handle_t handle; /* duplicated handle in dst process */
  387. int fd; /* associated fd to close */
  388. @END
  389. #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
  390. #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
  391. #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
  392. /* Open a handle to a process */
  393. @REQ(open_process)
  394. process_id_t pid; /* process id to open */
  395. unsigned int access; /* wanted access rights */
  396. int inherit; /* inherit flag */
  397. @REPLY
  398. obj_handle_t handle; /* handle to the process */
  399. @END
  400. /* Open a handle to a thread */
  401. @REQ(open_thread)
  402. thread_id_t tid; /* thread id to open */
  403. unsigned int access; /* wanted access rights */
  404. int inherit; /* inherit flag */
  405. @REPLY
  406. obj_handle_t handle; /* handle to the thread */
  407. @END
  408. /* Wait for handles */
  409. @REQ(select)
  410. int flags; /* wait flags (see below) */
  411. void* cookie; /* magic cookie to return to client */
  412. abs_time_t timeout; /* absolute timeout */
  413. VARARG(handles,handles); /* handles to select on */
  414. @END
  415. #define SELECT_ALL 1
  416. #define SELECT_ALERTABLE 2
  417. #define SELECT_INTERRUPTIBLE 4
  418. #define SELECT_TIMEOUT 8
  419. /* Create an event */
  420. @REQ(create_event)
  421. unsigned int access; /* wanted access rights */
  422. int manual_reset; /* manual reset event */
  423. int initial_state; /* initial state of the event */
  424. int inherit; /* inherit flag */
  425. VARARG(name,unicode_str); /* object name */
  426. @REPLY
  427. obj_handle_t handle; /* handle to the event */
  428. @END
  429. /* Event operation */
  430. @REQ(event_op)
  431. obj_handle_t handle; /* handle to event */
  432. int op; /* event operation (see below) */
  433. @END
  434. enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
  435. /* Open an event */
  436. @REQ(open_event)
  437. unsigned int access; /* wanted access rights */
  438. int inherit; /* inherit flag */
  439. VARARG(name,unicode_str); /* object name */
  440. @REPLY
  441. obj_handle_t handle; /* handle to the event */
  442. @END
  443. /* Create a mutex */
  444. @REQ(create_mutex)
  445. unsigned int access; /* wanted access rights */
  446. int owned; /* initially owned? */
  447. int inherit; /* inherit flag */
  448. VARARG(name,unicode_str); /* object name */
  449. @REPLY
  450. obj_handle_t handle; /* handle to the mutex */
  451. @END
  452. /* Release a mutex */
  453. @REQ(release_mutex)
  454. obj_handle_t handle; /* handle to the mutex */
  455. @REPLY
  456. unsigned int prev_count; /* value of internal counter, before release */
  457. @END
  458. /* Open a mutex */
  459. @REQ(open_mutex)
  460. unsigned int access; /* wanted access rights */
  461. int inherit; /* inherit flag */
  462. VARARG(name,unicode_str); /* object name */
  463. @REPLY
  464. obj_handle_t handle; /* handle to the mutex */
  465. @END
  466. /* Create a semaphore */
  467. @REQ(create_semaphore)
  468. unsigned int access; /* wanted access rights */
  469. unsigned int initial; /* initial count */
  470. unsigned int max; /* maximum count */
  471. int inherit; /* inherit flag */
  472. VARARG(name,unicode_str); /* object name */
  473. @REPLY
  474. obj_handle_t handle; /* handle to the semaphore */
  475. @END
  476. /* Release a semaphore */
  477. @REQ(release_semaphore)
  478. obj_handle_t handle; /* handle to the semaphore */
  479. unsigned int count; /* count to add to semaphore */
  480. @REPLY
  481. unsigned int prev_count; /* previous semaphore count */
  482. @END
  483. /* Open a semaphore */
  484. @REQ(open_semaphore)
  485. unsigned int access; /* wanted access rights */
  486. int inherit; /* inherit flag */
  487. VARARG(name,unicode_str); /* object name */
  488. @REPLY
  489. obj_handle_t handle; /* handle to the semaphore */
  490. @END
  491. /* Create a file */
  492. @REQ(create_file)
  493. unsigned int access; /* wanted access rights */
  494. int inherit; /* inherit flag */
  495. unsigned int sharing; /* sharing flags */
  496. int create; /* file create action */
  497. unsigned int options; /* file options */
  498. unsigned int attrs; /* file attributes for creation */
  499. VARARG(filename,string); /* file name */
  500. @REPLY
  501. obj_handle_t handle; /* handle to the file */
  502. @END
  503. /* Allocate a file handle for a Unix fd */
  504. @REQ(alloc_file_handle)
  505. unsigned int access; /* wanted access rights */
  506. int inherit; /* inherit flag */
  507. int fd; /* file descriptor on the client side */
  508. @REPLY
  509. obj_handle_t handle; /* handle to the file */
  510. @END
  511. /* Get a Unix fd to access a file */
  512. @REQ(get_handle_fd)
  513. obj_handle_t handle; /* handle to the file */
  514. unsigned int access; /* wanted access rights */
  515. @REPLY
  516. int fd; /* file descriptor */
  517. int flags; /* file read/write flags (see below) */
  518. @END
  519. #define FD_FLAG_OVERLAPPED 0x01 /* fd opened in overlapped mode */
  520. #define FD_FLAG_TIMEOUT 0x02 /* read/write is synchronous */
  521. #define FD_FLAG_RECV_SHUTDOWN 0x04
  522. #define FD_FLAG_SEND_SHUTDOWN 0x08
  523. #define FD_FLAG_AVAILABLE 0x10 /* in overlap read/write operation,
  524. * only handle available data (don't wait) */
  525. /* Flush a file buffers */
  526. @REQ(flush_file)
  527. obj_handle_t handle; /* handle to the file */
  528. @REPLY
  529. obj_handle_t event; /* event set when finished */
  530. @END
  531. /* Lock a region of a file */
  532. @REQ(lock_file)
  533. obj_handle_t handle; /* handle to the file */
  534. unsigned int offset_low; /* offset of start of lock */
  535. unsigned int offset_high; /* offset of start of lock */
  536. unsigned int count_low; /* count of bytes to lock */
  537. unsigned int count_high; /* count of bytes to lock */
  538. int shared; /* shared or exclusive lock? */
  539. int wait; /* do we want to wait? */
  540. @REPLY
  541. obj_handle_t handle; /* handle to wait on */
  542. int overlapped; /* is it an overlapped I/O handle? */
  543. @END
  544. /* Unlock a region of a file */
  545. @REQ(unlock_file)
  546. obj_handle_t handle; /* handle to the file */
  547. unsigned int offset_low; /* offset of start of unlock */
  548. unsigned int offset_high; /* offset of start of unlock */
  549. unsigned int count_low; /* count of bytes to unlock */
  550. unsigned int count_high; /* count of bytes to unlock */
  551. @END
  552. /* Create a socket */
  553. @REQ(create_socket)
  554. unsigned int access; /* wanted access rights */
  555. int inherit; /* inherit flag */
  556. int family; /* family, see socket manpage */
  557. int type; /* type, see socket manpage */
  558. int protocol; /* protocol, see socket manpage */
  559. unsigned int flags; /* socket flags */
  560. @REPLY
  561. obj_handle_t handle; /* handle to the new socket */
  562. @END
  563. /* Accept a socket */
  564. @REQ(accept_socket)
  565. obj_handle_t lhandle; /* handle to the listening socket */
  566. unsigned int access; /* wanted access rights */
  567. int inherit; /* inherit flag */
  568. @REPLY
  569. obj_handle_t handle; /* handle to the new socket */
  570. @END
  571. /* Set socket event parameters */
  572. @REQ(set_socket_event)
  573. obj_handle_t handle; /* handle to the socket */
  574. unsigned int mask; /* event mask */
  575. obj_handle_t event; /* event object */
  576. user_handle_t window; /* window to send the message to */
  577. unsigned int msg; /* message to send */
  578. @END
  579. /* Get socket event parameters */
  580. @REQ(get_socket_event)
  581. obj_handle_t handle; /* handle to the socket */
  582. int service; /* clear pending? */
  583. obj_handle_t c_event; /* event to clear */
  584. @REPLY
  585. unsigned int mask; /* event mask */
  586. unsigned int pmask; /* pending events */
  587. unsigned int state; /* status bits */
  588. VARARG(errors,ints); /* event errors */
  589. @END
  590. /* Reenable pending socket events */
  591. @REQ(enable_socket_event)
  592. obj_handle_t handle; /* handle to the socket */
  593. unsigned int mask; /* events to re-enable */
  594. unsigned int sstate; /* status bits to set */
  595. unsigned int cstate; /* status bits to clear */
  596. @END
  597. @REQ(set_socket_deferred)
  598. obj_handle_t handle; /* handle to the socket */
  599. obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
  600. @END
  601. /* Allocate a console (only used by a console renderer) */
  602. @REQ(alloc_console)
  603. unsigned int access; /* wanted access rights */
  604. int inherit; /* inherit flag */
  605. process_id_t pid; /* pid of process which shall be attached to the console */
  606. @REPLY
  607. obj_handle_t handle_in; /* handle to console input */
  608. obj_handle_t event; /* handle to renderer events change notification */
  609. @END
  610. /* Free the console of the current process */
  611. @REQ(free_console)
  612. @END
  613. #define CONSOLE_RENDERER_NONE_EVENT 0x00
  614. #define CONSOLE_RENDERER_TITLE_EVENT 0x01
  615. #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
  616. #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
  617. #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
  618. #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
  619. #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
  620. #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
  621. #define CONSOLE_RENDERER_EXIT_EVENT 0x08
  622. struct console_renderer_event
  623. {
  624. short event;
  625. union
  626. {
  627. struct update
  628. {
  629. short top;
  630. short bottom;
  631. } update;
  632. struct resize
  633. {
  634. short width;
  635. short height;
  636. } resize;
  637. struct cursor_pos
  638. {
  639. short x;
  640. short y;
  641. } cursor_pos;
  642. struct cursor_geom
  643. {
  644. short visible;
  645. short size;
  646. } cursor_geom;
  647. struct display
  648. {
  649. short left;
  650. short top;
  651. short width;
  652. short height;
  653. } display;
  654. } u;
  655. };
  656. /* retrieve console events for the renderer */
  657. @REQ(get_console_renderer_events)
  658. obj_handle_t handle; /* handle to console input events */
  659. @REPLY
  660. VARARG(data,bytes); /* the various console_renderer_events */
  661. @END
  662. /* Open a handle to the process console */
  663. @REQ(open_console)
  664. int from; /* 0 (resp 1) input (resp output) of current process console */
  665. /* otherwise console_in handle to get active screen buffer? */
  666. unsigned int access; /* wanted access rights */
  667. int inherit; /* inherit flag */
  668. int share; /* share mask (only for output handles) */
  669. @REPLY
  670. obj_handle_t handle; /* handle to the console */
  671. @END
  672. /* Get the input queue wait event */
  673. @REQ(get_console_wait_event)
  674. @REPLY
  675. obj_handle_t handle;
  676. @END
  677. /* Get a console mode (input or output) */
  678. @REQ(get_console_mode)
  679. obj_handle_t handle; /* handle to the console */
  680. @REPLY
  681. int mode; /* console mode */
  682. @END
  683. /* Set a console mode (input or output) */
  684. @REQ(set_console_mode)
  685. obj_handle_t handle; /* handle to the console */
  686. int mode; /* console mode */
  687. @END
  688. /* Set info about a console (input only) */
  689. @REQ(set_console_input_info)
  690. obj_handle_t handle; /* handle to console input, or 0 for process' console */
  691. int mask; /* setting mask (see below) */
  692. obj_handle_t active_sb; /* active screen buffer */
  693. int history_mode; /* whether we duplicate lines in history */
  694. int history_size; /* number of lines in history */
  695. int edition_mode; /* index to the edition mode flavors */
  696. VARARG(title,unicode_str); /* console title */
  697. @END
  698. #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
  699. #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
  700. #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
  701. #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
  702. #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
  703. /* Get info about a console (input only) */
  704. @REQ(get_console_input_info)
  705. obj_handle_t handle; /* handle to console input, or 0 for process' console */
  706. @REPLY
  707. int history_mode; /* whether we duplicate lines in history */
  708. int history_size; /* number of lines in history */
  709. int history_index; /* number of used lines in history */
  710. int edition_mode; /* index to the edition mode flavors */
  711. VARARG(title,unicode_str); /* console title */
  712. @END
  713. /* appends a string to console's history */
  714. @REQ(append_console_input_history)
  715. obj_handle_t handle; /* handle to console input, or 0 for process' console */
  716. VARARG(line,unicode_str); /* line to add */
  717. @END
  718. /* appends a string to console's history */
  719. @REQ(get_console_input_history)
  720. obj_handle_t handle; /* handle to console input, or 0 for process' console */
  721. int index; /* index to get line from */
  722. @REPLY
  723. int total; /* total length of line in Unicode chars */
  724. VARARG(line,unicode_str); /* line to add */
  725. @END
  726. /* creates a new screen buffer on process' console */
  727. @REQ(create_console_output)
  728. obj_handle_t handle_in; /* handle to console input, or 0 for process' console */
  729. int access; /* wanted access rights */
  730. int share; /* sharing credentials */
  731. int inherit; /* inherit flag */
  732. @REPLY
  733. obj_handle_t handle_out; /* handle to the screen buffer */
  734. @END
  735. /* Set info about a console (output only) */
  736. @REQ(set_console_output_info)
  737. obj_handle_t handle; /* handle to the console */
  738. int mask; /* setting mask (see below) */
  739. short int cursor_size; /* size of cursor (percentage filled) */
  740. short int cursor_visible;/* cursor visibility flag */
  741. short int cursor_x; /* position of cursor (x, y) */
  742. short int cursor_y;
  743. short int width; /* width of the screen buffer */
  744. short int height; /* height of the screen buffer */
  745. short int attr; /* default attribute */
  746. short int win_left; /* window actually displayed by renderer */
  747. short int win_top; /* the rect area is expressed withing the */
  748. short int win_right; /* boundaries of the screen buffer */
  749. short int win_bottom;
  750. short int max_width; /* maximum size (width x height) for the window */
  751. short int max_height;
  752. @END
  753. #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01
  754. #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02
  755. #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x04
  756. #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08
  757. #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10
  758. #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20
  759. /* Get info about a console (output only) */
  760. @REQ(get_console_output_info)
  761. obj_handle_t handle; /* handle to the console */
  762. @REPLY
  763. short int cursor_size; /* size of cursor (percentage filled) */
  764. short int cursor_visible;/* cursor visibility flag */
  765. short int cursor_x; /* position of cursor (x, y) */
  766. short int cursor_y;
  767. short int width; /* width of the screen buffer */
  768. short int height; /* height of the screen buffer */
  769. short int attr; /* default attribute */
  770. short int win_left; /* window actually displayed by renderer */
  771. short int win_top; /* the rect area is expressed withing the */
  772. short int win_right; /* boundaries of the screen buffer */
  773. short int win_bottom;
  774. short int max_width; /* maximum size (width x height) for the window */
  775. short int max_height;
  776. @END
  777. /* Add input records to a console input queue */
  778. @REQ(write_console_input)
  779. obj_handle_t handle; /* handle to the console input */
  780. VARARG(rec,input_records); /* input records */
  781. @REPLY
  782. int written; /* number of records written */
  783. @END
  784. /* Fetch input records from a console input queue */
  785. @REQ(read_console_input)
  786. obj_handle_t handle; /* handle to the console input */
  787. int flush; /* flush the retrieved records from the queue? */
  788. @REPLY
  789. int read; /* number of records read */
  790. VARARG(rec,input_records); /* input records */
  791. @END
  792. /* write data (chars and/or attributes) in a screen buffer */
  793. @REQ(write_console_output)
  794. obj_handle_t handle; /* handle to the console output */
  795. int x; /* position where to start writing */
  796. int y;
  797. int mode; /* char info (see below) */
  798. int wrap; /* wrap around at end of line? */
  799. VARARG(data,bytes); /* info to write */
  800. @REPLY
  801. int written; /* number of char infos actually written */
  802. int width; /* width of screen buffer */
  803. int height; /* height of screen buffer */
  804. @END
  805. enum char_info_mode
  806. {
  807. CHAR_INFO_MODE_TEXT, /* characters only */
  808. CHAR_INFO_MODE_ATTR, /* attributes only */
  809. CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
  810. CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
  811. };
  812. /* fill a screen buffer with constant data (chars and/or attributes) */
  813. @REQ(fill_console_output)
  814. obj_handle_t handle; /* handle to the console output */
  815. int x; /* position where to start writing */
  816. int y;
  817. int mode; /* char info mode */
  818. int count; /* number to write */
  819. int wrap; /* wrap around at end of line? */
  820. char_info_t data; /* data to write */
  821. @REPLY
  822. int written; /* number of char infos actually written */
  823. @END
  824. /* read data (chars and/or attributes) from a screen buffer */
  825. @REQ(read_console_output)
  826. obj_handle_t handle; /* handle to the console output */
  827. int x; /* position (x,y) where to start reading */
  828. int y;
  829. int mode; /* char info mode */
  830. int wrap; /* wrap around at end of line? */
  831. @REPLY
  832. int width; /* width of screen buffer */
  833. int height; /* height of screen buffer */
  834. VARARG(data,bytes);
  835. @END
  836. /* move a rect (of data) in screen buffer content */
  837. @REQ(move_console_output)
  838. obj_handle_t handle; /* handle to the console output */
  839. short int x_src; /* position (x, y) of rect to start moving from */
  840. short int y_src;
  841. short int x_dst; /* position (x, y) of rect to move to */
  842. short int y_dst;
  843. short int w; /* size of the rect (width, height) to move */
  844. short int h;
  845. @END
  846. /* Sends a signal to a process group */
  847. @REQ(send_console_signal)
  848. int signal; /* the signal to send */
  849. process_id_t group_id; /* the group to send the signal to */
  850. @END
  851. /* Create a change notification */
  852. @REQ(create_change_notification)
  853. obj_handle_t handle; /* handle to the directory */
  854. int subtree; /* watch all the subtree */
  855. unsigned int filter; /* notification filter */
  856. @REPLY
  857. obj_handle_t handle; /* handle to the change notification */
  858. @END
  859. /* Move to the next change notification */
  860. @REQ(next_change_notification)
  861. obj_handle_t handle; /* handle to the change notification */
  862. @END
  863. /* Create a file mapping */
  864. @REQ(create_mapping)
  865. int size_high; /* mapping size */
  866. int size_low; /* mapping size */
  867. int protect; /* protection flags (see below) */
  868. unsigned int access; /* wanted access rights */
  869. int inherit; /* inherit flag */
  870. obj_handle_t file_handle; /* file handle */
  871. VARARG(name,unicode_str); /* object name */
  872. @REPLY
  873. obj_handle_t handle; /* handle to the mapping */
  874. @END
  875. /* protection flags */
  876. #define VPROT_READ 0x01
  877. #define VPROT_WRITE 0x02
  878. #define VPROT_EXEC 0x04
  879. #define VPROT_WRITECOPY 0x08
  880. #define VPROT_GUARD 0x10
  881. #define VPROT_NOCACHE 0x20
  882. #define VPROT_COMMITTED 0x40
  883. #define VPROT_IMAGE 0x80
  884. /* Open a mapping */
  885. @REQ(open_mapping)
  886. unsigned int access; /* wanted access rights */
  887. int inherit; /* inherit flag */
  888. VARARG(name,unicode_str); /* object name */
  889. @REPLY
  890. obj_handle_t handle; /* handle to the mapping */
  891. @END
  892. /* Get information about a file mapping */
  893. @REQ(get_mapping_info)
  894. obj_handle_t handle; /* handle to the mapping */
  895. @REPLY
  896. int size_high; /* mapping size */
  897. int size_low; /* mapping size */
  898. int protect; /* protection flags */
  899. int header_size; /* header size (for VPROT_IMAGE mapping) */
  900. void* base; /* default base addr (for VPROT_IMAGE mapping) */
  901. obj_handle_t shared_file; /* shared mapping file handle */
  902. int shared_size; /* shared mapping size */
  903. @END
  904. #define SNAP_HEAPLIST 0x00000001
  905. #define SNAP_PROCESS 0x00000002
  906. #define SNAP_THREAD 0x00000004
  907. #define SNAP_MODULE 0x00000008
  908. /* Create a snapshot */
  909. @REQ(create_snapshot)
  910. int inherit; /* inherit flag */
  911. int flags; /* snapshot flags (SNAP_*) */
  912. process_id_t pid; /* process id */
  913. @REPLY
  914. obj_handle_t handle; /* handle to the snapshot */
  915. @END
  916. /* Get the next process from a snapshot */
  917. @REQ(next_process)
  918. obj_handle_t handle; /* handle to the snapshot */
  919. int reset; /* reset snapshot position? */
  920. @REPLY
  921. int count; /* process usage count */
  922. process_id_t pid; /* process id */
  923. process_id_t ppid; /* parent process id */
  924. void* heap; /* heap base */
  925. void* module; /* main module */
  926. int threads; /* number of threads */
  927. int priority; /* process priority */
  928. int handles; /* number of handles */
  929. VARARG(filename,unicode_str); /* file name of main exe */
  930. @END
  931. /* Get the next thread from a snapshot */
  932. @REQ(next_thread)
  933. obj_handle_t handle; /* handle to the snapshot */
  934. int reset; /* reset snapshot position? */
  935. @REPLY
  936. int count; /* thread usage count */
  937. process_id_t pid; /* process id */
  938. thread_id_t tid; /* thread id */
  939. int base_pri; /* base priority */
  940. int delta_pri; /* delta priority */
  941. @END
  942. /* Get the next module from a snapshot */
  943. @REQ(next_module)
  944. obj_handle_t handle; /* handle to the snapshot */
  945. int reset; /* reset snapshot position? */
  946. @REPLY
  947. process_id_t pid; /* process id */
  948. void* base; /* module base address */
  949. size_t size; /* module size */
  950. VARARG(filename,unicode_str); /* file name of module */
  951. @END
  952. /* Wait for a debug event */
  953. @REQ(wait_debug_event)
  954. int get_handle; /* should we alloc a handle for waiting? */
  955. @REPLY
  956. process_id_t pid; /* process id */
  957. thread_id_t tid; /* thread id */
  958. obj_handle_t wait; /* wait handle if no event ready */
  959. VARARG(event,debug_event); /* debug event data */
  960. @END
  961. /* Queue an exception event */
  962. @REQ(queue_exception_event)
  963. int first; /* first chance exception? */
  964. VARARG(record,exc_event); /* thread context followed by exception record */
  965. @REPLY
  966. obj_handle_t handle; /* handle to the queued event */
  967. @END
  968. /* Retrieve the status of an exception event */
  969. @REQ(get_exception_status)
  970. obj_handle_t handle; /* handle to the queued event */
  971. @REPLY
  972. int status; /* event continuation status */
  973. VARARG(context,context); /* modified thread context */
  974. @END
  975. /* Send an output string to the debugger */
  976. @REQ(output_debug_string)
  977. void* string; /* string to display (in debugged process address space) */
  978. int unicode; /* is it Unicode? */
  979. int length; /* string length */
  980. @END
  981. /* Continue a debug event */
  982. @REQ(continue_debug_event)
  983. process_id_t pid; /* process id to continue */
  984. thread_id_t tid; /* thread id to continue */
  985. int status; /* continuation status */
  986. @END
  987. /* Start/stop debugging an existing process */
  988. @REQ(debug_process)
  989. process_id_t pid; /* id of the process to debug */
  990. int attach; /* 1=attaching / 0=detaching from the process */
  991. @END
  992. /* Simulate a breakpoint in a process */
  993. @REQ(debug_break)
  994. obj_handle_t handle; /* process handle */
  995. @REPLY
  996. int self; /* was it the caller itself? */
  997. @END
  998. /* Set debugger kill on exit flag */
  999. @REQ(set_debugger_kill_on_exit)
  1000. int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
  1001. @END
  1002. /* Read data from a process address space */
  1003. @REQ(read_process_memory)
  1004. obj_handle_t handle; /* process handle */
  1005. void* addr; /* addr to read from */
  1006. @REPLY
  1007. VARARG(data,bytes); /* result data */
  1008. @END
  1009. /* Write data to a process address space */
  1010. @REQ(write_process_memory)
  1011. obj_handle_t handle; /* process handle */
  1012. void* addr; /* addr to write to (must be int-aligned) */
  1013. unsigned int first_mask; /* mask for first word */
  1014. unsigned int last_mask; /* mask for last word */
  1015. VARARG(data,bytes); /* data to write */
  1016. @END
  1017. /* Create a registry key */
  1018. @REQ(create_key)
  1019. obj_handle_t parent; /* handle to the parent key */
  1020. unsigned int access; /* desired access rights */
  1021. unsigned int options; /* creation options */
  1022. time_t modif; /* last modification time */
  1023. size_t namelen; /* length of key name in bytes */
  1024. VARARG(name,unicode_str,namelen); /* key name */
  1025. VARARG(class,unicode_str); /* class name */
  1026. @REPLY
  1027. obj_handle_t hkey; /* handle to the created key */
  1028. int created; /* has it been newly created? */
  1029. @END
  1030. /* Open a registry key */
  1031. @REQ(open_key)
  1032. obj_handle_t parent; /* handle to the parent key */
  1033. unsigned int access; /* desired access rights */
  1034. VARARG(name,unicode_str); /* key name */
  1035. @REPLY
  1036. obj_handle_t hkey; /* handle to the open key */
  1037. @END
  1038. /* Delete a registry key */
  1039. @REQ(delete_key)
  1040. obj_handle_t hkey; /* handle to the key */
  1041. @END
  1042. /* Flush a registry key */
  1043. @REQ(flush_key)
  1044. obj_handle_t hkey; /* handle to the key */
  1045. @END
  1046. /* Enumerate registry subkeys */
  1047. @REQ(enum_key)
  1048. obj_handle_t hkey; /* handle to registry key */
  1049. int index; /* index of subkey (or -1 for current key) */
  1050. int info_class; /* requested information class */
  1051. @REPLY
  1052. int subkeys; /* number of subkeys */
  1053. int max_subkey; /* longest subkey name */
  1054. int max_class; /* longest class name */
  1055. int values; /* number of values */
  1056. int max_value; /* longest value name */
  1057. int max_data; /* longest value data */
  1058. time_t modif; /* last modification time */
  1059. size_t total; /* total length needed for full name and class */
  1060. size_t namelen; /* length of key name in bytes */
  1061. VARARG(name,unicode_str,namelen); /* key name */
  1062. VARARG(class,unicode_str); /* class name */
  1063. @END
  1064. /* Set a value of a registry key */
  1065. @REQ(set_key_value)
  1066. obj_handle_t hkey; /* handle to registry key */
  1067. int type; /* value type */
  1068. size_t namelen; /* length of value name in bytes */
  1069. VARARG(name,unicode_str,namelen); /* value name */
  1070. VARARG(data,bytes); /* value data */
  1071. @END
  1072. /* Retrieve the value of a registry key */
  1073. @REQ(get_key_value)
  1074. obj_handle_t hkey; /* handle to registry key */
  1075. VARARG(name,unicode_str); /* value name */
  1076. @REPLY
  1077. int type; /* value type */
  1078. size_t total; /* total length needed for data */
  1079. VARARG(data,bytes); /* value data */
  1080. @END
  1081. /* Enumerate a value of a registry key */
  1082. @REQ(enum_key_value)
  1083. obj_handle_t hkey; /* handle to registry key */
  1084. int index; /* value index */
  1085. int info_class; /* requested information class */
  1086. @REPLY
  1087. int type; /* value type */
  1088. size_t total; /* total length needed for full name and data */
  1089. size_t namelen; /* length of value name in bytes */
  1090. VARARG(name,unicode_str,namelen); /* value name */
  1091. VARARG(data,bytes); /* value data */
  1092. @END
  1093. /* Delete a value of a registry key */
  1094. @REQ(delete_key_value)
  1095. obj_handle_t hkey; /* handle to registry key */
  1096. VARARG(name,unicode_str); /* value name */
  1097. @END
  1098. /* Load a registry branch from a file */
  1099. @REQ(load_registry)
  1100. obj_handle_t hkey; /* root key to load to */
  1101. obj_handle_t file; /* file to load from */
  1102. VARARG(name,unicode_str); /* subkey name */
  1103. @END
  1104. /* UnLoad a registry branch from a file */
  1105. @REQ(unload_registry)
  1106. obj_handle_t hkey; /* root key to unload to */
  1107. @END
  1108. /* Save a registry branch to a file */
  1109. @REQ(save_registry)
  1110. obj_handle_t hkey; /* key to save */
  1111. obj_handle_t file; /* file to save to */
  1112. @END
  1113. /* Load the user registry files */
  1114. @REQ(load_user_registries)
  1115. obj_handle_t hkey; /* key for HKCU */
  1116. int saving; /* new saving level */
  1117. int period; /* duration between periodic saves (milliseconds) */
  1118. @END
  1119. /* Add a registry key change notification */
  1120. @REQ(set_registry_notification)
  1121. obj_handle_t hkey; /* key to watch for changes */
  1122. obj_handle_t event; /* event to set */
  1123. int subtree; /* should we watch the whole subtree? */
  1124. unsigned int filter; /* things to watch */
  1125. @END
  1126. /* Create a waitable timer */
  1127. @REQ(create_timer)
  1128. unsigned int access; /* wanted access rights */
  1129. int inherit; /* inherit flag */
  1130. int manual; /* manual reset */
  1131. VARARG(name,unicode_str); /* object name */
  1132. @REPLY
  1133. obj_handle_t handle; /* handle to the timer */
  1134. @END
  1135. /* Open a waitable timer */
  1136. @REQ(open_timer)
  1137. unsigned int access; /* wanted access rights */
  1138. int inherit; /* inherit flag */
  1139. VARARG(name,unicode_str); /* object name */
  1140. @REPLY
  1141. obj_handle_t handle; /* handle to the timer */
  1142. @END
  1143. /* Set a waitable timer */
  1144. @REQ(set_timer)
  1145. obj_handle_t handle; /* handle to the timer */
  1146. abs_time_t expire; /* next expiration absolute time */
  1147. int period; /* timer period in ms */
  1148. void* callback; /* callback function */
  1149. void* arg; /* callback argument */
  1150. @REPLY
  1151. int signaled; /* was the timer signaled before this call ? */
  1152. @END
  1153. /* Cancel a waitable timer */
  1154. @REQ(cancel_timer)
  1155. obj_handle_t handle; /* handle to the timer */
  1156. @REPLY
  1157. int signaled; /* was the timer signaled before this calltime ? */
  1158. @END
  1159. /* Get information on a waitable timer */
  1160. @REQ(get_timer_info)
  1161. obj_handle_t handle; /* handle to the timer */
  1162. @REPLY
  1163. abs_time_t when; /* absolute time when the timer next expires */
  1164. int signaled; /* is the timer signaled? */
  1165. @END
  1166. /* Retrieve the current context of a thread */
  1167. @REQ(get_thread_context)
  1168. obj_handle_t handle; /* thread handle */
  1169. unsigned int flags; /* context flags */
  1170. @REPLY
  1171. VARARG(context,context); /* thread context */
  1172. @END
  1173. /* Set the current context of a thread */
  1174. @REQ(set_thread_context)
  1175. obj_handle_t handle; /* thread handle */
  1176. unsigned int flags; /* context flags */
  1177. VARARG(context,context); /* thread context */
  1178. @END
  1179. /* Fetch a selector entry for a thread */
  1180. @REQ(get_selector_entry)
  1181. obj_handle_t handle; /* thread handle */
  1182. int entry; /* LDT entry */
  1183. @REPLY
  1184. unsigned int base; /* selector base */
  1185. unsigned int limit; /* selector limit */
  1186. unsigned char flags; /* selector flags */
  1187. @END
  1188. /* Add an atom */
  1189. @REQ(add_atom)
  1190. int local; /* is atom in local process table? */
  1191. VARARG(name,unicode_str); /* atom name */
  1192. @REPLY
  1193. atom_t atom; /* resulting atom */
  1194. @END
  1195. /* Delete an atom */
  1196. @REQ(delete_atom)
  1197. atom_t atom; /* atom handle */
  1198. int local; /* is atom in local process table? */
  1199. @END
  1200. /* Find an atom */
  1201. @REQ(find_atom)
  1202. int local; /* is atom in local process table? */
  1203. VARARG(name,unicode_str); /* atom name */
  1204. @REPLY
  1205. atom_t atom; /* atom handle */
  1206. @END
  1207. /* Get an atom name */
  1208. @REQ(get_atom_name)
  1209. atom_t atom; /* atom handle */
  1210. int local; /* is atom in local process table? */
  1211. @REPLY
  1212. int count; /* atom lock count */
  1213. VARARG(name,unicode_str); /* atom name */
  1214. @END
  1215. /* Init the process atom table */
  1216. @REQ(init_atom_table)
  1217. int entries; /* number of entries */
  1218. @END
  1219. /* Get the message queue of the current thread */
  1220. @REQ(get_msg_queue)
  1221. @REPLY
  1222. obj_handle_t handle; /* handle to the queue */
  1223. @END
  1224. /* Set the current message queue wakeup mask */
  1225. @REQ(set_queue_mask)
  1226. unsigned int wake_mask; /* wakeup bits mask */
  1227. unsigned int changed_mask; /* changed bits mask */
  1228. int skip_wait; /* will we skip waiting if signaled? */
  1229. @REPLY
  1230. unsigned int wake_bits; /* current wake bits */
  1231. unsigned int changed_bits; /* current changed bits */
  1232. @END
  1233. /* Get the current message queue status */
  1234. @REQ(get_queue_status)
  1235. int clear; /* should we clear the change bits? */
  1236. @REPLY
  1237. unsigned int wake_bits; /* wake bits */
  1238. unsigned int changed_bits; /* changed bits since last time */
  1239. @END
  1240. /* Wait for a process to start waiting on input */
  1241. @REQ(wait_input_idle)
  1242. obj_handle_t handle; /* process handle */
  1243. int timeout; /* timeout */
  1244. @REPLY
  1245. obj_handle_t event; /* handle to idle event */
  1246. @END
  1247. /* Send a message to a thread queue */
  1248. @REQ(send_message)
  1249. thread_id_t id; /* thread id */
  1250. int type; /* message type (see below) */
  1251. int flags; /* message flags (see below) */
  1252. user_handle_t win; /* window handle */
  1253. unsigned int msg; /* message code */
  1254. unsigned int wparam; /* parameters */
  1255. unsigned int lparam; /* parameters */
  1256. int x; /* x position */
  1257. int y; /* y position */
  1258. unsigned int time; /* message time */
  1259. unsigned int info; /* extra info */
  1260. int timeout; /* timeout for reply */
  1261. void* callback; /* callback address */
  1262. VARARG(data,bytes); /* message data for sent messages */
  1263. @END
  1264. enum message_type
  1265. {
  1266. MSG_ASCII, /* Ascii message (from SendMessageA) */
  1267. MSG_UNICODE, /* Unicode message (from SendMessageW) */
  1268. MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
  1269. MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
  1270. MSG_CALLBACK_RESULT,/* result of a callback message */
  1271. MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
  1272. MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
  1273. MSG_HARDWARE, /* hardware message */
  1274. MSG_WINEVENT /* winevent message */
  1275. };
  1276. #define SEND_MSG_ABORT_IF_HUNG 0x01
  1277. /* Get a message from the current queue */
  1278. @REQ(get_message)
  1279. int flags; /* see below */
  1280. user_handle_t get_win; /* window handle to get */
  1281. unsigned int get_first; /* first message code to get */
  1282. unsigned int get_last; /* last message code to get */
  1283. @REPLY
  1284. int type; /* message type */
  1285. user_handle_t win; /* window handle */
  1286. unsigned int msg; /* message code */
  1287. unsigned int wparam; /* parameters (callback function for MSG_CALLBACK_RESULT) */
  1288. unsigned int lparam; /* parameters (result for MSG_CALLBACK_RESULT) */
  1289. int x; /* x position */
  1290. int y; /* y position */
  1291. user_handle_t hook; /* winevent hook handle */
  1292. void* hook_proc; /* winevent hook proc address */
  1293. unsigned int time; /* message time */
  1294. unsigned int info; /* extra info (callback argument for MSG_CALLBACK_RESULT) */
  1295. size_t total; /* total size of extra data */
  1296. VARARG(data,bytes); /* message data for sent messages */
  1297. @END
  1298. #define GET_MSG_REMOVE 1 /* remove the message */
  1299. #define GET_MSG_SENT_ONLY 2 /* only get sent messages */
  1300. /* Reply to a sent message */
  1301. @REQ(reply_message)
  1302. int type; /* type of original message */
  1303. unsigned int result; /* message result */
  1304. int remove; /* should we remove the message? */
  1305. VARARG(data,bytes); /* message data for sent messages */
  1306. @END
  1307. /* Retrieve the reply for the last message sent */
  1308. @REQ(get_message_reply)
  1309. int cancel; /* cancel message if not ready? */
  1310. @REPLY
  1311. unsigned int result; /* message result */
  1312. VARARG(data,bytes); /* message data for sent messages */
  1313. @END
  1314. /* Set a window timer */
  1315. @REQ(set_win_timer)
  1316. user_handle_t win; /* window handle */
  1317. unsigned int msg; /* message to post */
  1318. unsigned int id; /* timer id */
  1319. unsigned int rate; /* timer rate in ms */
  1320. unsigned int lparam; /* message lparam (callback proc) */
  1321. @REPLY
  1322. unsigned int id; /* timer id */
  1323. @END
  1324. /* Kill a window timer */
  1325. @REQ(kill_win_timer)
  1326. user_handle_t win; /* window handle */
  1327. unsigned int msg; /* message to post */
  1328. unsigned int id; /* timer id */
  1329. @END
  1330. /* Retrieve info about a serial port */
  1331. @REQ(get_serial_info)
  1332. obj_handle_t handle; /* handle to comm port */
  1333. @REPLY
  1334. unsigned int readinterval;
  1335. unsigned int readconst;
  1336. unsigned int readmult;
  1337. unsigned int writeconst;
  1338. unsigned int writemult;
  1339. unsigned int eventmask;
  1340. unsigned int commerror;
  1341. @END
  1342. /* Set info about a serial port */
  1343. @REQ(set_serial_info)
  1344. obj_handle_t handle; /* handle to comm port */
  1345. int flags; /* bitmask to set values (see below) */
  1346. unsigned int readinterval;
  1347. unsigned int readconst;
  1348. unsigned int readmult;
  1349. unsigned int writeconst;
  1350. unsigned int writemult;
  1351. unsigned int eventmask;
  1352. unsigned int commerror;
  1353. @END
  1354. #define SERIALINFO_SET_TIMEOUTS 0x01
  1355. #define SERIALINFO_SET_MASK 0x02
  1356. #define SERIALINFO_SET_ERROR 0x04
  1357. /* Create an async I/O */
  1358. @REQ(register_async)
  1359. obj_handle_t handle; /* handle to comm port, socket or file */
  1360. int type; /* type of queue to look after */
  1361. void* io_apc; /* APC routine to queue upon end of async */
  1362. void* io_sb; /* I/O status block (unique across all async on this handle) */
  1363. void* io_user; /* data to pass back to caller */
  1364. int count; /* count - usually # of bytes to be read/written */
  1365. @END
  1366. #define ASYNC_TYPE_READ 0x01
  1367. #define ASYNC_TYPE_WRITE 0x02
  1368. #define ASYNC_TYPE_WAIT 0x03
  1369. /* Cancel all async op on a fd */
  1370. @REQ(cancel_async)
  1371. obj_handle_t handle; /* handle to comm port, socket or file */
  1372. @END
  1373. /* Create a named pipe */
  1374. @REQ(create_named_pipe)
  1375. unsigned int openmode;
  1376. unsigned int pipemode;
  1377. unsigned int maxinstances;
  1378. unsigned int outsize;
  1379. unsigned int insize;
  1380. unsigned int timeout;
  1381. int inherit; /* inherit flag */
  1382. VARARG(name,unicode_str); /* pipe name */
  1383. @REPLY
  1384. obj_handle_t handle; /* handle to the pipe */
  1385. @END
  1386. /* Open an existing named pipe */
  1387. @REQ(open_named_pipe)
  1388. unsigned int access;
  1389. int inherit; /* inherit flag */
  1390. VARARG(name,unicode_str); /* pipe name */
  1391. @REPLY
  1392. obj_handle_t handle; /* handle to the pipe */
  1393. @END
  1394. /* Connect to a named pipe */
  1395. @REQ(connect_named_pipe)
  1396. obj_handle_t handle;
  1397. void* overlapped;
  1398. void* func;
  1399. @END
  1400. /* Wait for a named pipe */
  1401. @REQ(wait_named_pipe)
  1402. unsigned int timeout;
  1403. void* overlapped;
  1404. void* func;
  1405. VARARG(name,unicode_str); /* pipe name */
  1406. @END
  1407. /* Disconnect a named pipe */
  1408. @REQ(disconnect_named_pipe)
  1409. obj_handle_t handle;
  1410. @REPLY
  1411. int fd; /* associated fd to close */
  1412. @END
  1413. @REQ(get_named_pipe_info)
  1414. obj_handle_t handle;
  1415. @REPLY
  1416. unsigned int flags;
  1417. unsigned int maxinstances;
  1418. unsigned int outsize;
  1419. unsigned int insize;
  1420. @END
  1421. /* Create a window */
  1422. @REQ(create_window)
  1423. user_handle_t parent; /* parent window */
  1424. user_handle_t owner; /* owner window */
  1425. atom_t atom; /* class atom */
  1426. void* instance; /* module instance */
  1427. @REPLY
  1428. user_handle_t handle; /* created window */
  1429. int extra; /* number of extra bytes */
  1430. void* class_ptr; /* pointer to class in client address space */
  1431. @END
  1432. /* Link a window into the tree */
  1433. @REQ(link_window)
  1434. user_handle_t handle; /* handle to the window */
  1435. user_handle_t parent; /* handle to the parent */
  1436. user_handle_t previous; /* previous child in Z-order */
  1437. @REPLY
  1438. user_handle_t full_parent; /* full handle of new parent */
  1439. @END
  1440. /* Destroy a window */
  1441. @REQ(destroy_window)
  1442. user_handle_t handle; /* handle to the window */
  1443. @END
  1444. /* Set a window owner */
  1445. @REQ(set_window_owner)
  1446. user_handle_t handle; /* handle to the window */
  1447. user_handle_t owner; /* new owner */
  1448. @REPLY
  1449. user_handle_t full_owner; /* full handle of new owner */
  1450. user_handle_t prev_owner; /* full handle of previous owner */
  1451. @END
  1452. /* Get information from a window handle */
  1453. @REQ(get_window_info)
  1454. user_handle_t handle; /* handle to the window */
  1455. @REPLY
  1456. user_handle_t full_handle; /* full 32-bit handle */
  1457. user_handle_t last_active; /* last active popup */
  1458. process_id_t pid; /* process owning the window */
  1459. thread_id_t tid; /* thread owning the window */
  1460. atom_t atom; /* class atom */
  1461. @END
  1462. /* Set some information in a window */
  1463. @REQ(set_window_info)
  1464. user_handle_t handle; /* handle to the window */
  1465. unsigned int flags; /* flags for fields to set (see below) */
  1466. unsigned int style; /* window style */
  1467. unsigned int ex_style; /* window extended style */
  1468. unsigned int id; /* window id */
  1469. void* instance; /* creator instance */
  1470. void* user_data; /* user-specific data */
  1471. int extra_offset; /* offset to set in extra bytes */
  1472. size_t extra_size; /* size to set in extra bytes */
  1473. unsigned int extra_value; /* value to set in extra bytes */
  1474. @REPLY
  1475. unsigned int old_style; /* old window style */
  1476. unsigned int old_ex_style; /* old window extended style */
  1477. unsigned int old_id; /* old window id */
  1478. void* old_instance; /* old creator instance */
  1479. void* old_user_data; /* old user-specific data */
  1480. unsigned int old_extra_value; /* old value in extra bytes */
  1481. @END
  1482. #define SET_WIN_STYLE 0x01
  1483. #define SET_WIN_EXSTYLE 0x02
  1484. #define SET_WIN_ID 0x04
  1485. #define SET_WIN_INSTANCE 0x08
  1486. #define SET_WIN_USERDATA 0x10
  1487. #define SET_WIN_EXTRA 0x20
  1488. /* Get a list of the window parents, up to the root of the tree */
  1489. @REQ(get_window_parents)
  1490. user_handle_t handle; /* handle to the window */
  1491. @REPLY
  1492. int count; /* total count of parents */
  1493. VARARG(parents,user_handles); /* parent handles */
  1494. @END
  1495. /* Get a list of the window children */
  1496. @REQ(get_window_children)
  1497. user_handle_t parent; /* parent window */
  1498. atom_t atom; /* class atom for the listed children */
  1499. thread_id_t tid; /* thread owning the listed children */
  1500. @REPLY
  1501. int count; /* total count of children */
  1502. VARARG(children,user_handles); /* children handles */
  1503. @END
  1504. /* Get a list of the window children that contain a given point */
  1505. @REQ(get_window_children_from_point)
  1506. user_handle_t parent; /* parent window */
  1507. int x; /* point in parent coordinates */
  1508. int y;
  1509. @REPLY
  1510. int count; /* total count of children */
  1511. VARARG(children,user_handles); /* children handles */
  1512. @END
  1513. /* Get window tree information from a window handle */
  1514. @REQ(get_window_tree)
  1515. user_handle_t handle; /* handle to the window */
  1516. @REPLY
  1517. user_handle_t parent; /* parent window */
  1518. user_handle_t owner; /* owner window */
  1519. user_handle_t next_sibling; /* next sibling in Z-order */
  1520. user_handle_t prev_sibling; /* prev sibling in Z-order */
  1521. user_handle_t first_sibling; /* first sibling in Z-order */
  1522. user_handle_t last_sibling; /* last sibling in Z-order */
  1523. user_handle_t first_child; /* first child */
  1524. user_handle_t last_child; /* last child */
  1525. @END
  1526. /* Set the position and Z order of a window */
  1527. @REQ(set_window_pos)
  1528. user_handle_t handle; /* handle to the window */
  1529. user_handle_t top_win; /* top window to clip against */
  1530. user_handle_t previous; /* previous window in Z order */
  1531. unsigned int flags; /* SWP_* flags */
  1532. rectangle_t window; /* window rectangle */
  1533. rectangle_t client; /* client rectangle */
  1534. VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE */
  1535. @REPLY
  1536. unsigned int new_style; /* new window style */
  1537. @END
  1538. /* Get the window and client rectangles of a window */
  1539. @REQ(get_window_rectangles)
  1540. user_handle_t handle; /* handle to the window */
  1541. @REPLY
  1542. rectangle_t window; /* window rectangle */
  1543. rectangle_t client; /* client rectangle */
  1544. @END
  1545. /* Get the window text */
  1546. @REQ(get_window_text)
  1547. user_handle_t handle; /* handle to the window */
  1548. @REPLY
  1549. VARARG(text,unicode_str); /* window text */
  1550. @END
  1551. /* Set the window text */
  1552. @REQ(set_window_text)
  1553. user_handle_t handle; /* handle to the window */
  1554. VARARG(text,unicode_str); /* window text */
  1555. @END
  1556. /* Get the coordinates offset between two windows */
  1557. @REQ(get_windows_offset)
  1558. user_handle_t from; /* handle to the first window */
  1559. user_handle_t to; /* handle to the second window */
  1560. @REPLY
  1561. int x; /* x coordinate offset */
  1562. int y; /* y coordinate offset */
  1563. @END
  1564. /* Get the visible region of a window */
  1565. @REQ(get_visible_region)
  1566. user_handle_t window; /* handle to the window */
  1567. user_handle_t top_win; /* top window to clip against */
  1568. unsigned int flags; /* DCX flags */
  1569. @REPLY
  1570. size_t total_size; /* total size of the resulting region */
  1571. VARARG(region,rectangles); /* list of rectangles for the region */
  1572. @END
  1573. /* Get the window region */
  1574. @REQ(get_window_region)
  1575. user_handle_t window; /* handle to the window */
  1576. @REPLY
  1577. size_t total_size; /* total size of the resulting region */
  1578. VARARG(region,rectangles); /* list of rectangles for the region */
  1579. @END
  1580. /* Set the window region */
  1581. @REQ(set_window_region)
  1582. user_handle_t window; /* handle to the window */
  1583. VARARG(region,rectangles); /* list of rectangles for the region */
  1584. @END
  1585. /* Get the window update region */
  1586. @REQ(get_update_region)
  1587. user_handle_t window; /* handle to the window */
  1588. unsigned int flags; /* update flags (see below) */
  1589. @REPLY
  1590. user_handle_t child; /* child to repaint (or window itself) */
  1591. unsigned int flags; /* resulting update flags (see below) */
  1592. size_t total_size; /* total size of the resulting region */
  1593. VARARG(region,rectangles); /* list of rectangles for the region */
  1594. @END
  1595. #define UPDATE_NONCLIENT 0x01 /* get region for repainting non-client area */
  1596. #define UPDATE_ERASE 0x02 /* get region for erasing client area */
  1597. #define UPDATE_PAINT 0x04 /* get region for painting client area */
  1598. #define UPDATE_INTERNALPAINT 0x08 /* get region if internal paint is pending */
  1599. #define UPDATE_ALLCHILDREN 0x10 /* force repaint of all children */
  1600. #define UPDATE_NOCHILDREN 0x20 /* don't try to repaint any children */
  1601. #define UPDATE_NOREGION 0x40 /* don't return a region, only the flags */
  1602. /* Mark parts of a window as needing a redraw */
  1603. @REQ(redraw_window)
  1604. user_handle_t window; /* handle to the window */
  1605. unsigned int flags; /* RDW_* flags */
  1606. VARARG(region,rectangles); /* list of rectangles for the region */
  1607. @END
  1608. /* Set a window property */
  1609. @REQ(set_window_property)
  1610. user_handle_t window; /* handle to the window */
  1611. atom_t atom; /* property atom (high-word set if it was a string) */
  1612. int string; /* was atom a string originally? */
  1613. obj_handle_t handle; /* handle to store */
  1614. @END
  1615. /* Remove a window property */
  1616. @REQ(remove_window_property)
  1617. user_handle_t window; /* handle to the window */
  1618. atom_t atom; /* property atom */
  1619. @REPLY
  1620. obj_handle_t handle; /* handle stored in property */
  1621. @END
  1622. /* Get a window property */
  1623. @REQ(get_window_property)
  1624. user_handle_t window; /* handle to the window */
  1625. atom_t atom; /* property atom */
  1626. @REPLY
  1627. obj_handle_t handle; /* handle stored in property */
  1628. @END
  1629. /* Get the list of properties of a window */
  1630. @REQ(get_window_properties)
  1631. user_handle_t window; /* handle to the window */
  1632. @REPLY
  1633. int total; /* total number of properties */
  1634. VARARG(props,properties); /* list of properties */
  1635. @END
  1636. /* Attach (or detach) thread inputs */
  1637. @REQ(attach_thread_input)
  1638. thread_id_t tid_from; /* thread to be attached */
  1639. thread_id_t tid_to; /* thread to which tid_from should be attached */
  1640. int attach; /* is it an attach? */
  1641. @END
  1642. /* Get input data for a given thread */
  1643. @REQ(get_thread_input)
  1644. thread_id_t tid; /* id of thread */
  1645. @REPLY
  1646. user_handle_t focus; /* handle to the focus window */
  1647. user_handle_t capture; /* handle to the capture window */
  1648. user_handle_t active; /* handle to the active window */
  1649. user_handle_t foreground; /* handle to the global foreground window */
  1650. user_handle_t menu_owner; /* handle to the menu owner */
  1651. user_handle_t move_size; /* handle to the moving/resizing window */
  1652. user_handle_t caret; /* handle to the caret window */
  1653. rectangle_t rect; /* caret rectangle */
  1654. @END
  1655. /* Retrieve queue keyboard state for a given thread */
  1656. @REQ(get_key_state)
  1657. thread_id_t tid; /* id of thread */
  1658. int key; /* optional key code or -1 */
  1659. @REPLY
  1660. unsigned char state; /* state of specified key */
  1661. VARARG(keystate,bytes); /* state array for all the keys */
  1662. @END
  1663. /* Set queue keyboard state for a given thread */
  1664. @REQ(set_key_state)
  1665. thread_id_t tid; /* id of thread */
  1666. VARARG(keystate,bytes); /* state array for all the keys */
  1667. @END
  1668. /* Set the system foreground window */
  1669. @REQ(set_foreground_window)
  1670. user_handle_t handle; /* handle to the foreground window */
  1671. @REPLY
  1672. user_handle_t previous; /* handle to the previous foreground window */
  1673. int send_msg_old; /* whether we have to send a msg to the old window */
  1674. int send_msg_new; /* whether we have to send a msg to the new window */
  1675. @END
  1676. /* Set the current thread focus window */
  1677. @REQ(set_focus_window)
  1678. user_handle_t handle; /* handle to the focus window */
  1679. @REPLY
  1680. user_handle_t previous; /* handle to the previous focus window */
  1681. @END
  1682. /* Set the current thread active window */
  1683. @REQ(set_active_window)
  1684. user_handle_t handle; /* handle to the active window */
  1685. @REPLY
  1686. user_handle_t previous; /* handle to the previous active window */
  1687. @END
  1688. /* Set the current thread capture window */
  1689. @REQ(set_capture_window)
  1690. user_handle_t handle; /* handle to the capture window */
  1691. unsigned int flags; /* capture flags (see below) */
  1692. @REPLY
  1693. user_handle_t previous; /* handle to the previous capture window */
  1694. user_handle_t full_handle; /* full 32-bit handle of new capture window */
  1695. @END
  1696. #define CAPTURE_MENU 0x01 /* capture is for a menu */
  1697. #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
  1698. /* Set the current thread caret window */
  1699. @REQ(set_caret_window)
  1700. user_handle_t handle; /* handle to the caret window */
  1701. int width; /* caret width */
  1702. int height; /* caret height */
  1703. @REPLY
  1704. user_handle_t previous; /* handle to the previous caret window */
  1705. rectangle_t old_rect; /* previous caret rectangle */
  1706. int old_hide; /* previous hide count */
  1707. int old_state; /* previous caret state (1=on, 0=off) */
  1708. @END
  1709. /* Set the current thread caret information */
  1710. @REQ(set_caret_info)
  1711. unsigned int flags; /* caret flags (see below) */
  1712. user_handle_t handle; /* handle to the caret window */
  1713. int x; /* caret x position */
  1714. int y; /* caret y position */
  1715. int hide; /* increment for hide count (can be negative to show it) */
  1716. int state; /* caret state (1=on, 0=off, -1=toggle current state) */
  1717. @REPLY
  1718. user_handle_t full_handle; /* handle to the current caret window */
  1719. rectangle_t old_rect; /* previous caret rectangle */
  1720. int old_hide; /* previous hide count */
  1721. int old_state; /* previous caret state (1=on, 0=off) */
  1722. @END
  1723. #define SET_CARET_POS 0x01 /* set the caret position from x,y */
  1724. #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
  1725. #define SET_CARET_STATE 0x04 /* set the caret on/off state */
  1726. /* Set a window hook */
  1727. @REQ(set_hook)
  1728. int id; /* id of the hook */
  1729. process_id_t pid; /* id of process to set the hook into */
  1730. thread_id_t tid; /* id of thread to set the hook into */
  1731. int event_min;
  1732. int event_max;
  1733. int flags;
  1734. void* proc; /* hook procedure */
  1735. int unicode; /* is it a unicode hook? */
  1736. VARARG(module,unicode_str); /* module name */
  1737. @REPLY
  1738. user_handle_t handle; /* handle to the hook */
  1739. @END
  1740. /* Remove a window hook */
  1741. @REQ(remove_hook)
  1742. user_handle_t handle; /* handle to the hook */
  1743. int id; /* id of the hook if handle is 0 */
  1744. void* proc; /* hook procedure if handle is 0 */
  1745. @END
  1746. /* Start calling a hook chain */
  1747. @REQ(start_hook_chain)
  1748. int id; /* id of the hook */
  1749. int event; /* signalled event */
  1750. user_handle_t window; /* handle to the event window */
  1751. int object_id; /* object id for out of context winevent */
  1752. int child_id; /* child id for out of context winevent */
  1753. @REPLY
  1754. user_handle_t handle; /* handle to the next hook */
  1755. process_id_t pid; /* process id for low-level keyboard/mouse hooks */
  1756. thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
  1757. void* proc; /* hook procedure */
  1758. int unicode; /* is it a unicode hook? */
  1759. VARARG(module,unicode_str); /* module name */
  1760. @END
  1761. /* Finished calling a hook chain */
  1762. @REQ(finish_hook_chain)
  1763. int id; /* id of the hook */
  1764. @END
  1765. /* Get the next hook to call */
  1766. @REQ(get_next_hook)
  1767. user_handle_t handle; /* handle to the current hook */
  1768. int event; /* signalled event */
  1769. user_handle_t window; /* handle to the event window */
  1770. int object_id; /* object id for out of context winevent */
  1771. int child_id; /* child id for out of context winevent */
  1772. @REPLY
  1773. user_handle_t next; /* handle to the next hook */
  1774. int id; /* id of the next hook */
  1775. process_id_t pid; /* process id for low-level keyboard/mouse hooks */
  1776. thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
  1777. void* proc; /* next hook procedure */
  1778. int prev_unicode; /* was the previous a unicode hook? */
  1779. int next_unicode; /* is the next a unicode hook? */
  1780. VARARG(module,unicode_str); /* module name */
  1781. @END
  1782. /* Create a window class */
  1783. @REQ(create_class)
  1784. int local; /* is it a local class? */
  1785. atom_t atom; /* class atom */
  1786. unsigned int style; /* class style */
  1787. void* instance; /* module instance */
  1788. int extra; /* number of extra class bytes */
  1789. int win_extra; /* number of window extra bytes */
  1790. void* client_ptr; /* pointer to class in client address space */
  1791. @END
  1792. /* Destroy a window class */
  1793. @REQ(destroy_class)
  1794. atom_t atom; /* class atom */
  1795. void* instance; /* module instance */
  1796. @REPLY
  1797. void* client_ptr; /* pointer to class in client address space */
  1798. @END
  1799. /* Set some information in a class */
  1800. @REQ(set_class_info)
  1801. user_handle_t window; /* handle to the window */
  1802. unsigned int flags; /* flags for info to set (see below) */
  1803. atom_t atom; /* class atom */
  1804. unsigned int style; /* class style */
  1805. int win_extra; /* number of window extra bytes */
  1806. void* instance; /* module instance */
  1807. int extra_offset; /* offset to set in extra bytes */
  1808. size_t extra_size; /* size to set in extra bytes */
  1809. unsigned int extra_value; /* value to set in extra bytes */
  1810. @REPLY
  1811. atom_t old_atom; /* previous class atom */
  1812. unsigned int old_style; /* previous class style */
  1813. int old_extra; /* previous number of class extra bytes */
  1814. int old_win_extra; /* previous number of window extra bytes */
  1815. void* old_instance; /* previous module instance */
  1816. unsigned int old_extra_value; /* old value in extra bytes */
  1817. @END
  1818. #define SET_CLASS_ATOM 0x0001
  1819. #define SET_CLASS_STYLE 0x0002
  1820. #define SET_CLASS_WINEXTRA 0x0004
  1821. #define SET_CLASS_INSTANCE 0x0008
  1822. #define SET_CLASS_EXTRA 0x0010
  1823. /* Set/get clipboard information */
  1824. @REQ(set_clipboard_info)
  1825. unsigned int flags; /* flags for fields to set (see below) */
  1826. user_handle_t clipboard; /* clipboard window */
  1827. user_handle_t owner; /* clipboard owner */
  1828. user_handle_t viewer; /* first clipboard viewer */
  1829. unsigned int seqno; /* change sequence number */
  1830. @REPLY
  1831. unsigned int flags; /* status flags (see below) */
  1832. user_handle_t old_clipboard; /* old clipboard window */
  1833. user_handle_t old_owner; /* old clipboard owner */
  1834. user_handle_t old_viewer; /* old clipboard viewer */
  1835. unsigned int seqno; /* current sequence number */
  1836. @END
  1837. #define SET_CB_OPEN 0x001
  1838. #define SET_CB_OWNER 0x002
  1839. #define SET_CB_VIEWER 0x004
  1840. #define SET_CB_SEQNO 0x008
  1841. #define SET_CB_RELOWNER 0x010
  1842. #define SET_CB_CLOSE 0x020
  1843. #define CB_OPEN 0x040
  1844. #define CB_OWNER 0x080
  1845. /* Open a security token */
  1846. @REQ(open_token)
  1847. obj_handle_t handle; /* handle to the thread or process */
  1848. unsigned int flags; /* flags (see below) */
  1849. @REPLY
  1850. obj_handle_t token; /* handle to the token */
  1851. @END
  1852. #define OPEN_TOKEN_THREAD 1
  1853. #define OPEN_TOKEN_AS_SELF 2
  1854. /* Set/get the global windows */
  1855. @REQ(set_global_windows)
  1856. unsigned int flags; /* flags for fields to set (see below) */
  1857. user_handle_t shell_window; /* handle to the new shell window */
  1858. user_handle_t shell_listview; /* handle to the new shell listview window */
  1859. user_handle_t progman_window; /* handle to the new program manager window */
  1860. user_handle_t taskman_window; /* handle to the new task manager window */
  1861. @REPLY
  1862. user_handle_t old_shell_window; /* handle to the shell window */
  1863. user_handle_t old_shell_listview; /* handle to the shell listview window */
  1864. user_handle_t old_progman_window; /* handle to the new program manager window */
  1865. user_handle_t old_taskman_window; /* handle to the new task manager window */
  1866. @END
  1867. #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
  1868. #define SET_GLOBAL_PROGMAN_WINDOW 0x02
  1869. #define SET_GLOBAL_TASKMAN_WINDOW 0x04
  1870. /* Adjust the privileges held by a token */
  1871. @REQ(adjust_token_privileges)
  1872. obj_handle_t handle; /* handle to the token */
  1873. int disable_all; /* disable all privileges? */
  1874. int get_modified_state; /* get modified privileges? */
  1875. VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
  1876. @REPLY
  1877. unsigned int len; /* total length in bytes required to store token privileges */
  1878. VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
  1879. @END
  1880. /* Retrieves the set of privileges held by or available to a token */
  1881. @REQ(get_token_privileges)
  1882. obj_handle_t handle; /* handle to the token */
  1883. @REPLY
  1884. unsigned int len; /* total length in bytes required to store token privileges */
  1885. VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
  1886. @END
  1887. @REQ(duplicate_token)
  1888. obj_handle_t handle; /* handle to the token to duplicate */
  1889. unsigned int access; /* access rights to the new token */
  1890. int inherit; /* inherit flag */
  1891. int primary; /* is the new token to be a primary one? */
  1892. int impersonation_level; /* impersonation level of the new token */
  1893. @REPLY
  1894. obj_handle_t new_handle; /* duplicated handle */
  1895. @END