protocol.def 126 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750
  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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, 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. typedef unsigned int obj_handle_t;
  31. typedef unsigned int user_handle_t;
  32. typedef unsigned int atom_t;
  33. typedef unsigned int process_id_t;
  34. typedef unsigned int thread_id_t;
  35. typedef unsigned int data_size_t;
  36. typedef unsigned int ioctl_code_t;
  37. typedef unsigned __int64 lparam_t;
  38. typedef unsigned __int64 apc_param_t;
  39. typedef unsigned __int64 mem_size_t;
  40. typedef unsigned __int64 file_pos_t;
  41. typedef unsigned __int64 client_ptr_t;
  42. typedef unsigned __int64 affinity_t;
  43. typedef client_ptr_t mod_handle_t;
  44. struct request_header
  45. {
  46. int req; /* request code */
  47. data_size_t request_size; /* request variable part size */
  48. data_size_t reply_size; /* reply variable part maximum size */
  49. };
  50. struct reply_header
  51. {
  52. unsigned int error; /* error result */
  53. data_size_t reply_size; /* reply variable part size */
  54. };
  55. /* placeholder structure for the maximum allowed request size */
  56. /* this is used to construct the generic_request union */
  57. struct request_max_size
  58. {
  59. int pad[16]; /* the max request size is 16 ints */
  60. };
  61. #define FIRST_USER_HANDLE 0x0020 /* first possible value for low word of user handle */
  62. #define LAST_USER_HANDLE 0xffef /* last possible value for low word of user handle */
  63. /* debug event data */
  64. typedef union
  65. {
  66. int code; /* event code */
  67. struct
  68. {
  69. int code; /* DbgExceptionStateChange */
  70. int first; /* first chance exception? */
  71. unsigned int exc_code; /* exception code */
  72. unsigned int flags; /* exception flags */
  73. client_ptr_t record; /* exception record */
  74. client_ptr_t address; /* exception address */
  75. int nb_params; /* number of parameters */
  76. int __pad;
  77. client_ptr_t params[15]; /* parameters */
  78. } exception;
  79. struct
  80. {
  81. int code; /* DbgCreateThreadStateChange */
  82. obj_handle_t handle; /* handle to the new thread */
  83. client_ptr_t start; /* thread startup routine */
  84. } create_thread;
  85. struct
  86. {
  87. int code; /* DbgCreateProcessStateChange */
  88. obj_handle_t file; /* handle to the process exe file */
  89. obj_handle_t process; /* handle to the new process */
  90. obj_handle_t thread; /* handle to the new thread */
  91. mod_handle_t base; /* base of executable image */
  92. int dbg_offset; /* offset of debug info in file */
  93. int dbg_size; /* size of debug info */
  94. client_ptr_t start; /* thread startup routine */
  95. } create_process;
  96. struct
  97. {
  98. int code; /* DbgExitThreadStateChange/DbgExitProcessStateChange */
  99. int exit_code; /* thread or process exit code */
  100. } exit;
  101. struct
  102. {
  103. int code; /* DbgLoadDllStateChange */
  104. obj_handle_t handle; /* file handle for the dll */
  105. mod_handle_t base; /* base address of the dll */
  106. int dbg_offset; /* offset of debug info in file */
  107. int dbg_size; /* size of debug info */
  108. client_ptr_t name; /* image name (optional) */
  109. } load_dll;
  110. struct
  111. {
  112. int code; /* DbgUnloadDllStateChange */
  113. int __pad;
  114. mod_handle_t base; /* base address of the dll */
  115. } unload_dll;
  116. } debug_event_t;
  117. /* context data */
  118. typedef struct
  119. {
  120. unsigned int machine; /* machine type */
  121. unsigned int flags; /* SERVER_CTX_* flags */
  122. union
  123. {
  124. struct { unsigned int eip, ebp, esp, eflags, cs, ss; } i386_regs;
  125. struct { unsigned __int64 rip, rbp, rsp;
  126. unsigned int cs, ss, flags, __pad; } x86_64_regs;
  127. struct { unsigned int sp, lr, pc, cpsr; } arm_regs;
  128. struct { unsigned __int64 sp, pc, pstate; } arm64_regs;
  129. } ctl; /* selected by SERVER_CTX_CONTROL */
  130. union
  131. {
  132. struct { unsigned int eax, ebx, ecx, edx, esi, edi; } i386_regs;
  133. struct { unsigned __int64 rax,rbx, rcx, rdx, rsi, rdi,
  134. r8, r9, r10, r11, r12, r13, r14, r15; } x86_64_regs;
  135. struct { unsigned int r[13]; } arm_regs;
  136. struct { unsigned __int64 x[31]; } arm64_regs;
  137. } integer; /* selected by SERVER_CTX_INTEGER */
  138. union
  139. {
  140. struct { unsigned int ds, es, fs, gs; } i386_regs;
  141. struct { unsigned int ds, es, fs, gs; } x86_64_regs;
  142. } seg; /* selected by SERVER_CTX_SEGMENTS */
  143. union
  144. {
  145. struct { unsigned int ctrl, status, tag, err_off, err_sel, data_off, data_sel, cr0npx;
  146. unsigned char regs[80]; } i386_regs;
  147. struct { struct { unsigned __int64 low, high; } fpregs[32]; } x86_64_regs;
  148. struct { unsigned __int64 d[32]; unsigned int fpscr; } arm_regs;
  149. struct { struct { unsigned __int64 low, high; } q[32]; unsigned int fpcr, fpsr; } arm64_regs;
  150. } fp; /* selected by SERVER_CTX_FLOATING_POINT */
  151. union
  152. {
  153. struct { unsigned int dr0, dr1, dr2, dr3, dr6, dr7; } i386_regs;
  154. struct { unsigned __int64 dr0, dr1, dr2, dr3, dr6, dr7; } x86_64_regs;
  155. struct { unsigned int bvr[8], bcr[8], wvr[1], wcr[1]; } arm_regs;
  156. struct { unsigned __int64 bvr[8], wvr[2]; unsigned int bcr[8], wcr[2]; } arm64_regs;
  157. } debug; /* selected by SERVER_CTX_DEBUG_REGISTERS */
  158. union
  159. {
  160. unsigned char i386_regs[512];
  161. } ext; /* selected by SERVER_CTX_EXTENDED_REGISTERS */
  162. union
  163. {
  164. struct { struct { unsigned __int64 low, high; } ymm_high[16]; } regs;
  165. } ymm; /* selected by SERVER_CTX_YMM_REGISTERS */
  166. } context_t;
  167. #define SERVER_CTX_CONTROL 0x01
  168. #define SERVER_CTX_INTEGER 0x02
  169. #define SERVER_CTX_SEGMENTS 0x04
  170. #define SERVER_CTX_FLOATING_POINT 0x08
  171. #define SERVER_CTX_DEBUG_REGISTERS 0x10
  172. #define SERVER_CTX_EXTENDED_REGISTERS 0x20
  173. #define SERVER_CTX_YMM_REGISTERS 0x40
  174. /* structure used in sending an fd from client to server */
  175. struct send_fd
  176. {
  177. thread_id_t tid; /* thread id */
  178. int fd; /* file descriptor on client-side */
  179. };
  180. /* structure sent by the server on the wait fifo */
  181. struct wake_up_reply
  182. {
  183. client_ptr_t cookie; /* magic cookie that was passed in select_request */
  184. int signaled; /* wait result */
  185. int __pad;
  186. };
  187. /* NT-style timeout, in 100ns units, negative means relative timeout */
  188. typedef __int64 timeout_t;
  189. #define TIMEOUT_INFINITE (((timeout_t)0x7fffffff) << 32 | 0xffffffff)
  190. /* absolute timeout, negative means that monotonic clock is used */
  191. typedef __int64 abstime_t;
  192. /* structure for process startup info */
  193. typedef struct
  194. {
  195. unsigned int debug_flags;
  196. unsigned int console_flags;
  197. obj_handle_t console;
  198. obj_handle_t hstdin;
  199. obj_handle_t hstdout;
  200. obj_handle_t hstderr;
  201. unsigned int x;
  202. unsigned int y;
  203. unsigned int xsize;
  204. unsigned int ysize;
  205. unsigned int xchars;
  206. unsigned int ychars;
  207. unsigned int attribute;
  208. unsigned int flags;
  209. unsigned int show;
  210. data_size_t curdir_len;
  211. data_size_t dllpath_len;
  212. data_size_t imagepath_len;
  213. data_size_t cmdline_len;
  214. data_size_t title_len;
  215. data_size_t desktop_len;
  216. data_size_t shellinfo_len;
  217. data_size_t runtime_len;
  218. /* VARARG(curdir,unicode_str,curdir_len); */
  219. /* VARARG(dllpath,unicode_str,dllpath_len); */
  220. /* VARARG(imagepath,unicode_str,imagepath_len); */
  221. /* VARARG(cmdline,unicode_str,cmdline_len); */
  222. /* VARARG(title,unicode_str,title_len); */
  223. /* VARARG(desktop,unicode_str,desktop_len); */
  224. /* VARARG(shellinfo,unicode_str,shellinfo_len); */
  225. /* VARARG(runtime,unicode_str,runtime_len); */
  226. } startup_info_t;
  227. /* structure returned in the list of window properties */
  228. typedef struct
  229. {
  230. atom_t atom; /* property atom */
  231. int string; /* was atom a string originally? */
  232. lparam_t data; /* data stored in property */
  233. } property_data_t;
  234. /* structure to specify window rectangles */
  235. typedef struct
  236. {
  237. int left;
  238. int top;
  239. int right;
  240. int bottom;
  241. } rectangle_t;
  242. /* structure for parameters of async I/O calls */
  243. typedef struct
  244. {
  245. obj_handle_t handle; /* object to perform I/O on */
  246. obj_handle_t event; /* event to signal when done */
  247. client_ptr_t iosb; /* I/O status block in client addr space */
  248. client_ptr_t user; /* opaque user data containing callback pointer and async-specific data */
  249. client_ptr_t apc; /* user APC to call */
  250. apc_param_t apc_context; /* user APC context or completion value */
  251. } async_data_t;
  252. /* structures for extra message data */
  253. struct hw_msg_source
  254. {
  255. unsigned int device; /* source device (IMDT_* values) */
  256. unsigned int origin; /* source origin (IMO_* values) */
  257. };
  258. union rawinput
  259. {
  260. int type;
  261. struct
  262. {
  263. int type; /* RIM_TYPEKEYBOARD */
  264. unsigned int message; /* message generated by this rawinput event */
  265. unsigned short vkey; /* virtual key code */
  266. unsigned short scan; /* scan code */
  267. } kbd;
  268. struct
  269. {
  270. int type; /* RIM_TYPEMOUSE */
  271. int x; /* x coordinate */
  272. int y; /* y coordinate */
  273. unsigned int data; /* mouse data */
  274. } mouse;
  275. struct
  276. {
  277. int type; /* RIM_TYPEHID */
  278. unsigned int device; /* rawinput device index */
  279. unsigned int param; /* rawinput message param */
  280. unsigned short usage_page;/* HID usage page */
  281. unsigned short usage; /* HID usage */
  282. unsigned int count; /* HID report count */
  283. unsigned int length; /* HID report length */
  284. } hid;
  285. };
  286. struct hardware_msg_data
  287. {
  288. lparam_t info; /* extra info */
  289. data_size_t size; /* size of hardware message data */
  290. int __pad;
  291. unsigned int hw_id; /* unique id */
  292. unsigned int flags; /* hook flags */
  293. struct hw_msg_source source; /* message source */
  294. union rawinput rawinput; /* rawinput message data */
  295. };
  296. struct callback_msg_data
  297. {
  298. client_ptr_t callback; /* callback function */
  299. lparam_t data; /* user data for callback */
  300. lparam_t result; /* message result */
  301. };
  302. struct winevent_msg_data
  303. {
  304. user_handle_t hook; /* hook handle */
  305. thread_id_t tid; /* thread id */
  306. client_ptr_t hook_proc; /* hook proc address */
  307. /* followed by module name if any */
  308. };
  309. typedef union
  310. {
  311. int type;
  312. struct
  313. {
  314. int type; /* INPUT_KEYBOARD */
  315. unsigned short vkey; /* virtual key code */
  316. unsigned short scan; /* scan code */
  317. unsigned int flags; /* event flags */
  318. unsigned int time; /* event time */
  319. lparam_t info; /* extra info */
  320. } kbd;
  321. struct
  322. {
  323. int type; /* INPUT_MOUSE */
  324. int x; /* coordinates */
  325. int y;
  326. unsigned int data; /* mouse data */
  327. unsigned int flags; /* event flags */
  328. unsigned int time; /* event time */
  329. lparam_t info; /* extra info */
  330. } mouse;
  331. struct
  332. {
  333. int type; /* INPUT_HARDWARE */
  334. unsigned int msg; /* message code */
  335. lparam_t lparam; /* message param */
  336. union rawinput rawinput;/* rawinput message data */
  337. } hw;
  338. } hw_input_t;
  339. typedef union
  340. {
  341. unsigned char bytes[1]; /* raw data for sent messages */
  342. struct hardware_msg_data hardware;
  343. struct callback_msg_data callback;
  344. struct winevent_msg_data winevent;
  345. } message_data_t;
  346. /* structure returned in filesystem events */
  347. struct filesystem_event
  348. {
  349. int action;
  350. data_size_t len;
  351. char name[1];
  352. };
  353. struct luid
  354. {
  355. unsigned int low_part;
  356. int high_part;
  357. };
  358. struct luid_attr
  359. {
  360. struct luid luid;
  361. unsigned int attrs;
  362. };
  363. struct acl
  364. {
  365. unsigned char revision;
  366. unsigned char pad1;
  367. unsigned short size;
  368. unsigned short count;
  369. unsigned short pad2;
  370. };
  371. struct sid
  372. {
  373. unsigned char revision;
  374. unsigned char sub_count;
  375. unsigned char id_auth[6];
  376. unsigned int sub_auth[15];
  377. };
  378. typedef struct
  379. {
  380. unsigned int read;
  381. unsigned int write;
  382. unsigned int exec;
  383. unsigned int all;
  384. } generic_map_t;
  385. #define MAX_ACL_LEN 65535
  386. struct security_descriptor
  387. {
  388. unsigned int control; /* SE_ flags */
  389. data_size_t owner_len;
  390. data_size_t group_len;
  391. data_size_t sacl_len;
  392. data_size_t dacl_len;
  393. /* VARARG(owner,sid); */
  394. /* VARARG(group,sid); */
  395. /* VARARG(sacl,acl); */
  396. /* VARARG(dacl,acl); */
  397. };
  398. struct object_attributes
  399. {
  400. obj_handle_t rootdir; /* root directory */
  401. unsigned int attributes; /* object attributes */
  402. data_size_t sd_len; /* length of security_descriptor data. may be 0 */
  403. data_size_t name_len; /* length of the name string. may be 0 */
  404. /* VARARG(sd,security_descriptor); */
  405. /* VARARG(name,unicode_str); */
  406. };
  407. struct object_type_info
  408. {
  409. data_size_t name_len; /* length of the name string */
  410. unsigned int index; /* type index in global table */
  411. unsigned int obj_count; /* count of objects of this type */
  412. unsigned int handle_count; /* count of handles of this type */
  413. unsigned int obj_max; /* max count of objects of this type */
  414. unsigned int handle_max; /* max count of handles of this type */
  415. unsigned int valid_access; /* mask for valid access bits */
  416. generic_map_t mapping; /* generic access mappings */
  417. /* VARARG(name,unicode_str); */
  418. };
  419. enum select_op
  420. {
  421. SELECT_NONE,
  422. SELECT_WAIT,
  423. SELECT_WAIT_ALL,
  424. SELECT_SIGNAL_AND_WAIT,
  425. SELECT_KEYED_EVENT_WAIT,
  426. SELECT_KEYED_EVENT_RELEASE
  427. };
  428. typedef union
  429. {
  430. enum select_op op;
  431. struct
  432. {
  433. enum select_op op; /* SELECT_WAIT or SELECT_WAIT_ALL */
  434. obj_handle_t handles[MAXIMUM_WAIT_OBJECTS];
  435. } wait;
  436. struct
  437. {
  438. enum select_op op; /* SELECT_SIGNAL_AND_WAIT */
  439. obj_handle_t wait;
  440. obj_handle_t signal; /* must be last in the structure so we can remove it on retries */
  441. } signal_and_wait;
  442. struct
  443. {
  444. enum select_op op; /* SELECT_KEYED_EVENT_WAIT or SELECT_KEYED_EVENT_RELEASE */
  445. obj_handle_t handle;
  446. client_ptr_t key;
  447. } keyed_event;
  448. } select_op_t;
  449. enum apc_type
  450. {
  451. APC_NONE,
  452. APC_USER,
  453. APC_ASYNC_IO,
  454. APC_VIRTUAL_ALLOC,
  455. APC_VIRTUAL_FREE,
  456. APC_VIRTUAL_QUERY,
  457. APC_VIRTUAL_PROTECT,
  458. APC_VIRTUAL_FLUSH,
  459. APC_VIRTUAL_LOCK,
  460. APC_VIRTUAL_UNLOCK,
  461. APC_MAP_VIEW,
  462. APC_UNMAP_VIEW,
  463. APC_CREATE_THREAD,
  464. APC_DUP_HANDLE
  465. };
  466. typedef struct
  467. {
  468. enum apc_type type; /* APC_USER */
  469. int __pad;
  470. client_ptr_t func; /* void (__stdcall *func)(ULONG_PTR,ULONG_PTR,ULONG_PTR); */
  471. apc_param_t args[3]; /* arguments for user function */
  472. } user_apc_t;
  473. typedef union
  474. {
  475. enum apc_type type;
  476. user_apc_t user;
  477. struct
  478. {
  479. enum apc_type type; /* APC_ASYNC_IO */
  480. unsigned int status; /* I/O status */
  481. client_ptr_t user; /* user pointer */
  482. client_ptr_t sb; /* status block */
  483. data_size_t result; /* result size */
  484. } async_io;
  485. struct
  486. {
  487. enum apc_type type; /* APC_VIRTUAL_ALLOC */
  488. unsigned int op_type; /* type of operation */
  489. client_ptr_t addr; /* requested address */
  490. mem_size_t size; /* allocation size */
  491. mem_size_t zero_bits; /* number of zero high bits */
  492. unsigned int prot; /* memory protection flags */
  493. } virtual_alloc;
  494. struct
  495. {
  496. enum apc_type type; /* APC_VIRTUAL_FREE */
  497. unsigned int op_type; /* type of operation */
  498. client_ptr_t addr; /* requested address */
  499. mem_size_t size; /* allocation size */
  500. } virtual_free;
  501. struct
  502. {
  503. enum apc_type type; /* APC_VIRTUAL_QUERY */
  504. int __pad;
  505. client_ptr_t addr; /* requested address */
  506. } virtual_query;
  507. struct
  508. {
  509. enum apc_type type; /* APC_VIRTUAL_PROTECT */
  510. unsigned int prot; /* new protection flags */
  511. client_ptr_t addr; /* requested address */
  512. mem_size_t size; /* requested size */
  513. } virtual_protect;
  514. struct
  515. {
  516. enum apc_type type; /* APC_VIRTUAL_FLUSH */
  517. int __pad;
  518. client_ptr_t addr; /* requested address */
  519. mem_size_t size; /* requested size */
  520. } virtual_flush;
  521. struct
  522. {
  523. enum apc_type type; /* APC_VIRTUAL_LOCK */
  524. int __pad;
  525. client_ptr_t addr; /* requested address */
  526. mem_size_t size; /* requested size */
  527. } virtual_lock;
  528. struct
  529. {
  530. enum apc_type type; /* APC_VIRTUAL_UNLOCK */
  531. int __pad;
  532. client_ptr_t addr; /* requested address */
  533. mem_size_t size; /* requested size */
  534. } virtual_unlock;
  535. struct
  536. {
  537. enum apc_type type; /* APC_MAP_VIEW */
  538. obj_handle_t handle; /* mapping handle */
  539. client_ptr_t addr; /* requested address */
  540. mem_size_t size; /* allocation size */
  541. file_pos_t offset; /* file offset */
  542. mem_size_t zero_bits; /* number of zero high bits */
  543. unsigned int alloc_type; /* allocation type */
  544. unsigned int prot; /* memory protection flags */
  545. } map_view;
  546. struct
  547. {
  548. enum apc_type type; /* APC_UNMAP_VIEW */
  549. int __pad;
  550. client_ptr_t addr; /* view address */
  551. } unmap_view;
  552. struct
  553. {
  554. enum apc_type type; /* APC_CREATE_THREAD */
  555. unsigned int flags; /* creation flags */
  556. client_ptr_t func; /* void (__stdcall *func)(void*); start function */
  557. client_ptr_t arg; /* argument for start function */
  558. mem_size_t zero_bits; /* number of zero high bits for thread stack */
  559. mem_size_t reserve; /* reserve size for thread stack */
  560. mem_size_t commit; /* commit size for thread stack */
  561. } create_thread;
  562. struct
  563. {
  564. enum apc_type type; /* APC_DUP_HANDLE */
  565. obj_handle_t src_handle; /* src handle to duplicate */
  566. obj_handle_t dst_process; /* dst process handle */
  567. unsigned int access; /* wanted access rights */
  568. unsigned int attributes; /* object attributes */
  569. unsigned int options; /* duplicate options */
  570. } dup_handle;
  571. } apc_call_t;
  572. typedef union
  573. {
  574. enum apc_type type;
  575. struct
  576. {
  577. enum apc_type type; /* APC_ASYNC_IO */
  578. unsigned int status; /* new status of async operation */
  579. unsigned int total; /* bytes transferred */
  580. } async_io;
  581. struct
  582. {
  583. enum apc_type type; /* APC_VIRTUAL_ALLOC */
  584. unsigned int status; /* status returned by call */
  585. client_ptr_t addr; /* resulting address */
  586. mem_size_t size; /* resulting size */
  587. } virtual_alloc;
  588. struct
  589. {
  590. enum apc_type type; /* APC_VIRTUAL_FREE */
  591. unsigned int status; /* status returned by call */
  592. client_ptr_t addr; /* resulting address */
  593. mem_size_t size; /* resulting size */
  594. } virtual_free;
  595. struct
  596. {
  597. enum apc_type type; /* APC_VIRTUAL_QUERY */
  598. unsigned int status; /* status returned by call */
  599. client_ptr_t base; /* resulting base address */
  600. client_ptr_t alloc_base;/* resulting allocation base */
  601. mem_size_t size; /* resulting region size */
  602. unsigned short state; /* resulting region state */
  603. unsigned short prot; /* resulting region protection */
  604. unsigned short alloc_prot;/* resulting allocation protection */
  605. unsigned short alloc_type;/* resulting region allocation type */
  606. } virtual_query;
  607. struct
  608. {
  609. enum apc_type type; /* APC_VIRTUAL_PROTECT */
  610. unsigned int status; /* status returned by call */
  611. client_ptr_t addr; /* resulting address */
  612. mem_size_t size; /* resulting size */
  613. unsigned int prot; /* old protection flags */
  614. } virtual_protect;
  615. struct
  616. {
  617. enum apc_type type; /* APC_VIRTUAL_FLUSH */
  618. unsigned int status; /* status returned by call */
  619. client_ptr_t addr; /* resulting address */
  620. mem_size_t size; /* resulting size */
  621. } virtual_flush;
  622. struct
  623. {
  624. enum apc_type type; /* APC_VIRTUAL_LOCK */
  625. unsigned int status; /* status returned by call */
  626. client_ptr_t addr; /* resulting address */
  627. mem_size_t size; /* resulting size */
  628. } virtual_lock;
  629. struct
  630. {
  631. enum apc_type type; /* APC_VIRTUAL_UNLOCK */
  632. unsigned int status; /* status returned by call */
  633. client_ptr_t addr; /* resulting address */
  634. mem_size_t size; /* resulting size */
  635. } virtual_unlock;
  636. struct
  637. {
  638. enum apc_type type; /* APC_MAP_VIEW */
  639. unsigned int status; /* status returned by call */
  640. client_ptr_t addr; /* resulting address */
  641. mem_size_t size; /* resulting size */
  642. } map_view;
  643. struct
  644. {
  645. enum apc_type type; /* APC_UNMAP_VIEW */
  646. unsigned int status; /* status returned by call */
  647. } unmap_view;
  648. struct
  649. {
  650. enum apc_type type; /* APC_CREATE_THREAD */
  651. unsigned int status; /* status returned by call */
  652. process_id_t pid; /* process id */
  653. thread_id_t tid; /* thread id */
  654. client_ptr_t teb; /* thread teb (in process address space) */
  655. obj_handle_t handle; /* handle to new thread */
  656. } create_thread;
  657. struct
  658. {
  659. enum apc_type type; /* APC_DUP_HANDLE */
  660. unsigned int status; /* status returned by call */
  661. obj_handle_t handle; /* duplicated handle in dst process */
  662. } dup_handle;
  663. struct
  664. {
  665. enum apc_type type; /* APC_BREAK_PROCESS */
  666. unsigned int status; /* status returned by call */
  667. } break_process;
  668. } apc_result_t;
  669. enum irp_type
  670. {
  671. IRP_CALL_NONE,
  672. IRP_CALL_CREATE,
  673. IRP_CALL_CLOSE,
  674. IRP_CALL_READ,
  675. IRP_CALL_WRITE,
  676. IRP_CALL_FLUSH,
  677. IRP_CALL_IOCTL,
  678. IRP_CALL_VOLUME,
  679. IRP_CALL_FREE,
  680. IRP_CALL_CANCEL
  681. };
  682. typedef union
  683. {
  684. enum irp_type type; /* irp call type */
  685. struct
  686. {
  687. enum irp_type type; /* IRP_CALL_CREATE */
  688. unsigned int access; /* access rights */
  689. unsigned int sharing; /* sharing flags */
  690. unsigned int options; /* file options */
  691. client_ptr_t device; /* opaque ptr for the device */
  692. obj_handle_t file; /* file handle */
  693. } create;
  694. struct
  695. {
  696. enum irp_type type; /* IRP_CALL_CLOSE */
  697. int __pad;
  698. client_ptr_t file; /* opaque ptr for the file object */
  699. } close;
  700. struct
  701. {
  702. enum irp_type type; /* IRP_CALL_READ */
  703. unsigned int key; /* driver key */
  704. data_size_t out_size; /* needed output size */
  705. int __pad;
  706. client_ptr_t file; /* opaque ptr for the file object */
  707. file_pos_t pos; /* file position */
  708. } read;
  709. struct
  710. {
  711. enum irp_type type; /* IRP_CALL_WRITE */
  712. unsigned int key; /* driver key */
  713. client_ptr_t file; /* opaque ptr for the file object */
  714. file_pos_t pos; /* file position */
  715. } write;
  716. struct
  717. {
  718. enum irp_type type; /* IRP_CALL_FLUSH */
  719. int __pad;
  720. client_ptr_t file; /* opaque ptr for the file object */
  721. } flush;
  722. struct
  723. {
  724. enum irp_type type; /* IRP_CALL_IOCTL */
  725. ioctl_code_t code; /* ioctl code */
  726. data_size_t out_size; /* needed output size */
  727. int __pad;
  728. client_ptr_t file; /* opaque ptr for the file object */
  729. } ioctl;
  730. struct
  731. {
  732. enum irp_type type; /* IRP_CALL_VOLUME */
  733. unsigned int info_class;/* information class */
  734. data_size_t out_size; /* needed output size */
  735. int __pad;
  736. client_ptr_t file; /* opaque ptr for the file object */
  737. } volume;
  738. struct
  739. {
  740. enum irp_type type; /* IRP_CALL_FREE */
  741. int __pad;
  742. client_ptr_t obj; /* opaque ptr for the freed object */
  743. } free;
  744. struct
  745. {
  746. enum irp_type type; /* IRP_CALL_CANCEL */
  747. int __pad;
  748. client_ptr_t irp; /* opaque ptr for canceled irp */
  749. } cancel;
  750. } irp_params_t;
  751. /* information about a PE image mapping, roughly equivalent to SECTION_IMAGE_INFORMATION */
  752. typedef struct
  753. {
  754. client_ptr_t base;
  755. mem_size_t stack_size;
  756. mem_size_t stack_commit;
  757. unsigned int entry_point;
  758. unsigned int map_size;
  759. unsigned int zerobits;
  760. unsigned int subsystem;
  761. unsigned short subsystem_minor;
  762. unsigned short subsystem_major;
  763. unsigned short osversion_major;
  764. unsigned short osversion_minor;
  765. unsigned short image_charact;
  766. unsigned short dll_charact;
  767. unsigned short machine;
  768. unsigned char contains_code;
  769. unsigned char image_flags;
  770. unsigned int loader_flags;
  771. unsigned int header_size;
  772. unsigned int file_size;
  773. unsigned int checksum;
  774. unsigned int dbg_offset;
  775. unsigned int dbg_size;
  776. } pe_image_info_t;
  777. #define IMAGE_FLAGS_ComPlusNativeReady 0x01
  778. #define IMAGE_FLAGS_ComPlusILOnly 0x02
  779. #define IMAGE_FLAGS_ImageDynamicallyRelocated 0x04
  780. #define IMAGE_FLAGS_ImageMappedFlat 0x08
  781. #define IMAGE_FLAGS_BaseBelow4gb 0x10
  782. #define IMAGE_FLAGS_ComPlusPrefer32bit 0x20
  783. #define IMAGE_FLAGS_WineBuiltin 0x40
  784. #define IMAGE_FLAGS_WineFakeDll 0x80
  785. struct rawinput_device
  786. {
  787. unsigned short usage_page;
  788. unsigned short usage;
  789. unsigned int flags;
  790. user_handle_t target;
  791. };
  792. typedef struct
  793. {
  794. int x;
  795. int y;
  796. unsigned int time;
  797. int __pad;
  798. lparam_t info;
  799. } cursor_pos_t;
  800. /****************************************************************/
  801. /* Request declarations */
  802. /* Create a new process from the context of the parent */
  803. @REQ(new_process)
  804. obj_handle_t token; /* process token */
  805. obj_handle_t debug; /* process debug object */
  806. obj_handle_t parent_process; /* parent process */
  807. unsigned int flags; /* process creation flags */
  808. int socket_fd; /* file descriptor for process socket */
  809. unsigned int access; /* access rights for process object */
  810. unsigned short machine; /* architecture that the new process will use */
  811. data_size_t info_size; /* size of startup info */
  812. data_size_t handles_size; /* length of explicit handles list */
  813. data_size_t jobs_size; /* length of jobs list */
  814. VARARG(objattr,object_attributes); /* object attributes */
  815. VARARG(handles,uints,handles_size); /* handles list */
  816. VARARG(jobs,uints,jobs_size); /* jobs list */
  817. VARARG(info,startup_info,info_size); /* startup information */
  818. VARARG(env,unicode_str); /* environment for new process */
  819. @REPLY
  820. obj_handle_t info; /* new process info handle */
  821. process_id_t pid; /* process id */
  822. obj_handle_t handle; /* process handle (in the current process) */
  823. @END
  824. /* Retrieve information about a newly started process */
  825. @REQ(get_new_process_info)
  826. obj_handle_t info; /* info handle returned from new_process_request */
  827. @REPLY
  828. int success; /* did the process start successfully? */
  829. int exit_code; /* process exit code if failed */
  830. @END
  831. /* Create a new thread */
  832. @REQ(new_thread)
  833. obj_handle_t process; /* process in which to create thread */
  834. unsigned int access; /* wanted access rights */
  835. unsigned int flags; /* thread creation flags */
  836. int request_fd; /* fd for request pipe */
  837. VARARG(objattr,object_attributes); /* object attributes */
  838. @REPLY
  839. thread_id_t tid; /* thread id */
  840. obj_handle_t handle; /* thread handle (in the current process) */
  841. @END
  842. /* Retrieve the new process startup info */
  843. @REQ(get_startup_info)
  844. @REPLY
  845. data_size_t info_size; /* size of startup info */
  846. VARARG(info,startup_info,info_size); /* startup information */
  847. VARARG(env,unicode_str); /* environment */
  848. @END
  849. /* Signal the end of the process initialization */
  850. @REQ(init_process_done)
  851. client_ptr_t teb; /* TEB of new thread (in process address space) */
  852. client_ptr_t peb; /* PEB of new process (in process address space) */
  853. client_ptr_t ldt_copy; /* address of LDT copy (in process address space) */
  854. @REPLY
  855. client_ptr_t entry; /* process entry point */
  856. int suspend; /* is process suspended? */
  857. @END
  858. /* Initialize the first thread of a new process */
  859. @REQ(init_first_thread)
  860. int unix_pid; /* Unix pid of new process */
  861. int unix_tid; /* Unix tid of new thread */
  862. int debug_level; /* new debug level */
  863. int reply_fd; /* fd for reply pipe */
  864. int wait_fd; /* fd for blocking calls pipe */
  865. @REPLY
  866. process_id_t pid; /* process id of the new thread's process */
  867. thread_id_t tid; /* thread id of the new thread */
  868. timeout_t server_start; /* server start time */
  869. unsigned int session_id; /* process session id */
  870. data_size_t info_size; /* total size of startup info */
  871. VARARG(machines,ushorts); /* array of supported machines */
  872. @END
  873. /* Initialize a new thread; called from the child after pthread_create() */
  874. @REQ(init_thread)
  875. int unix_tid; /* Unix tid of new thread */
  876. int reply_fd; /* fd for reply pipe */
  877. int wait_fd; /* fd for blocking calls pipe */
  878. client_ptr_t teb; /* TEB of new thread (in thread address space) */
  879. client_ptr_t entry; /* entry point (in thread address space) */
  880. @REPLY
  881. int suspend; /* is thread suspended? */
  882. @END
  883. /* Terminate a process */
  884. @REQ(terminate_process)
  885. obj_handle_t handle; /* process handle to terminate */
  886. int exit_code; /* process exit code */
  887. @REPLY
  888. int self; /* suicide? */
  889. @END
  890. /* Terminate a thread */
  891. @REQ(terminate_thread)
  892. obj_handle_t handle; /* thread handle to terminate */
  893. int exit_code; /* thread exit code */
  894. @REPLY
  895. int self; /* suicide? */
  896. @END
  897. /* Retrieve information about a process */
  898. @REQ(get_process_info)
  899. obj_handle_t handle; /* process handle */
  900. @REPLY
  901. process_id_t pid; /* server process id */
  902. process_id_t ppid; /* server process id of parent */
  903. affinity_t affinity; /* process affinity mask */
  904. client_ptr_t peb; /* PEB address in process address space */
  905. timeout_t start_time; /* process start time */
  906. timeout_t end_time; /* process end time */
  907. unsigned int session_id; /* process session id */
  908. int exit_code; /* process exit code */
  909. int priority; /* priority class */
  910. unsigned short machine; /* process architecture */
  911. VARARG(image,pe_image_info); /* image info for main exe */
  912. @END
  913. /* Retrieve debug information about a process */
  914. @REQ(get_process_debug_info)
  915. obj_handle_t handle; /* process handle */
  916. @REPLY
  917. obj_handle_t debug; /* handle to debug port */
  918. int debug_children; /* inherit debugger to child processes */
  919. VARARG(image,pe_image_info); /* image info for main exe */
  920. @END
  921. /* Fetch the name of the process image */
  922. @REQ(get_process_image_name)
  923. obj_handle_t handle; /* process handle */
  924. int win32; /* return a win32 filename? */
  925. @REPLY
  926. data_size_t len; /* len in bytes required to store filename */
  927. VARARG(name,unicode_str); /* image name for main exe */
  928. @END
  929. /* Retrieve information about a process memory usage */
  930. @REQ(get_process_vm_counters)
  931. obj_handle_t handle; /* process handle */
  932. @REPLY
  933. mem_size_t peak_virtual_size; /* peak virtual memory in bytes */
  934. mem_size_t virtual_size; /* virtual memory in bytes */
  935. mem_size_t peak_working_set_size; /* peak real memory in bytes */
  936. mem_size_t working_set_size; /* real memory in bytes */
  937. mem_size_t pagefile_usage; /* commit charge in bytes */
  938. mem_size_t peak_pagefile_usage; /* peak commit charge in bytes */
  939. @END
  940. /* Set a process information */
  941. @REQ(set_process_info)
  942. obj_handle_t handle; /* process handle */
  943. int mask; /* setting mask (see below) */
  944. int priority; /* priority class */
  945. affinity_t affinity; /* affinity mask */
  946. @END
  947. #define SET_PROCESS_INFO_PRIORITY 0x01
  948. #define SET_PROCESS_INFO_AFFINITY 0x02
  949. /* Retrieve information about a thread */
  950. @REQ(get_thread_info)
  951. obj_handle_t handle; /* thread handle */
  952. unsigned int access; /* required access rights */
  953. @REPLY
  954. process_id_t pid; /* server process id */
  955. thread_id_t tid; /* server thread id */
  956. client_ptr_t teb; /* thread teb pointer */
  957. client_ptr_t entry_point; /* thread entry point */
  958. affinity_t affinity; /* thread affinity mask */
  959. int exit_code; /* thread exit code */
  960. int priority; /* thread priority level */
  961. int last; /* last thread in process */
  962. int suspend_count; /* thread suspend count */
  963. int dbg_hidden; /* thread hidden from debugger */
  964. data_size_t desc_len; /* description length in bytes */
  965. VARARG(desc,unicode_str); /* description string */
  966. @END
  967. /* Retrieve information about thread times */
  968. @REQ(get_thread_times)
  969. obj_handle_t handle; /* thread handle */
  970. @REPLY
  971. timeout_t creation_time; /* thread creation time */
  972. timeout_t exit_time; /* thread exit time */
  973. int unix_pid; /* thread native pid */
  974. int unix_tid; /* thread native pid */
  975. @END
  976. /* Set a thread information */
  977. @REQ(set_thread_info)
  978. obj_handle_t handle; /* thread handle */
  979. int mask; /* setting mask (see below) */
  980. int priority; /* priority class */
  981. affinity_t affinity; /* affinity mask */
  982. client_ptr_t entry_point; /* thread entry point */
  983. obj_handle_t token; /* impersonation token */
  984. VARARG(desc,unicode_str); /* description string */
  985. @END
  986. #define SET_THREAD_INFO_PRIORITY 0x01
  987. #define SET_THREAD_INFO_AFFINITY 0x02
  988. #define SET_THREAD_INFO_TOKEN 0x04
  989. #define SET_THREAD_INFO_ENTRYPOINT 0x08
  990. #define SET_THREAD_INFO_DESCRIPTION 0x10
  991. #define SET_THREAD_INFO_DBG_HIDDEN 0x20
  992. /* Suspend a thread */
  993. @REQ(suspend_thread)
  994. obj_handle_t handle; /* thread handle */
  995. @REPLY
  996. int count; /* new suspend count */
  997. @END
  998. /* Resume a thread */
  999. @REQ(resume_thread)
  1000. obj_handle_t handle; /* thread handle */
  1001. @REPLY
  1002. int count; /* new suspend count */
  1003. @END
  1004. /* Queue an APC for a thread or process */
  1005. @REQ(queue_apc)
  1006. obj_handle_t handle; /* thread or process handle */
  1007. apc_call_t call; /* call arguments */
  1008. @REPLY
  1009. obj_handle_t handle; /* APC handle */
  1010. int self; /* run APC in caller itself? */
  1011. @END
  1012. /* Get the result of an APC call */
  1013. @REQ(get_apc_result)
  1014. obj_handle_t handle; /* handle to the APC */
  1015. @REPLY
  1016. apc_result_t result; /* result of the APC */
  1017. @END
  1018. /* Close a handle for the current process */
  1019. @REQ(close_handle)
  1020. obj_handle_t handle; /* handle to close */
  1021. @END
  1022. /* Set a handle information */
  1023. @REQ(set_handle_info)
  1024. obj_handle_t handle; /* handle we are interested in */
  1025. int flags; /* new handle flags */
  1026. int mask; /* mask for flags to set */
  1027. @REPLY
  1028. int old_flags; /* old flag value */
  1029. @END
  1030. /* Duplicate a handle */
  1031. @REQ(dup_handle)
  1032. obj_handle_t src_process; /* src process handle */
  1033. obj_handle_t src_handle; /* src handle to duplicate */
  1034. obj_handle_t dst_process; /* dst process handle */
  1035. unsigned int access; /* wanted access rights */
  1036. unsigned int attributes; /* object attributes */
  1037. unsigned int options; /* duplicate options */
  1038. @REPLY
  1039. obj_handle_t handle; /* duplicated handle in dst process */
  1040. @END
  1041. /* Test if two handles refer to the same object */
  1042. @REQ(compare_objects)
  1043. obj_handle_t first; /* first object handle */
  1044. obj_handle_t second; /* second object handle */
  1045. @END
  1046. /* Make an object temporary */
  1047. @REQ(make_temporary)
  1048. obj_handle_t handle; /* handle to the object */
  1049. @END
  1050. /* Open a handle to a process */
  1051. @REQ(open_process)
  1052. process_id_t pid; /* process id to open */
  1053. unsigned int access; /* wanted access rights */
  1054. unsigned int attributes; /* object attributes */
  1055. @REPLY
  1056. obj_handle_t handle; /* handle to the process */
  1057. @END
  1058. /* Open a handle to a thread */
  1059. @REQ(open_thread)
  1060. thread_id_t tid; /* thread id to open */
  1061. unsigned int access; /* wanted access rights */
  1062. unsigned int attributes; /* object attributes */
  1063. @REPLY
  1064. obj_handle_t handle; /* handle to the thread */
  1065. @END
  1066. /* Wait for handles */
  1067. @REQ(select)
  1068. int flags; /* wait flags (see below) */
  1069. client_ptr_t cookie; /* magic cookie to return to client */
  1070. abstime_t timeout; /* timeout */
  1071. data_size_t size; /* size of select_op */
  1072. obj_handle_t prev_apc; /* handle to previous APC */
  1073. VARARG(result,apc_result); /* result of previous APC */
  1074. VARARG(data,select_op,size); /* operation-specific data */
  1075. VARARG(contexts,contexts); /* suspend context(s) */
  1076. @REPLY
  1077. apc_call_t call; /* APC call arguments */
  1078. obj_handle_t apc_handle; /* handle to next APC */
  1079. int signaled; /* were the handles immediately signaled? */
  1080. VARARG(contexts,contexts); /* suspend context(s) */
  1081. @END
  1082. #define SELECT_ALERTABLE 1
  1083. #define SELECT_INTERRUPTIBLE 2
  1084. /* Create an event */
  1085. @REQ(create_event)
  1086. unsigned int access; /* wanted access rights */
  1087. int manual_reset; /* manual reset event */
  1088. int initial_state; /* initial state of the event */
  1089. VARARG(objattr,object_attributes); /* object attributes */
  1090. @REPLY
  1091. obj_handle_t handle; /* handle to the event */
  1092. @END
  1093. /* Event operation */
  1094. @REQ(event_op)
  1095. obj_handle_t handle; /* handle to event */
  1096. int op; /* event operation (see below) */
  1097. @REPLY
  1098. int state; /* previous state */
  1099. @END
  1100. enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
  1101. @REQ(query_event)
  1102. obj_handle_t handle; /* handle to event */
  1103. @REPLY
  1104. int manual_reset; /* manual reset event */
  1105. int state; /* current state of the event */
  1106. @END
  1107. /* Open an event */
  1108. @REQ(open_event)
  1109. unsigned int access; /* wanted access rights */
  1110. unsigned int attributes; /* object attributes */
  1111. obj_handle_t rootdir; /* root directory */
  1112. VARARG(name,unicode_str); /* object name */
  1113. @REPLY
  1114. obj_handle_t handle; /* handle to the event */
  1115. @END
  1116. /* Create a keyed event */
  1117. @REQ(create_keyed_event)
  1118. unsigned int access; /* wanted access rights */
  1119. VARARG(objattr,object_attributes); /* object attributes */
  1120. @REPLY
  1121. obj_handle_t handle; /* handle to the event */
  1122. @END
  1123. /* Open a keyed event */
  1124. @REQ(open_keyed_event)
  1125. unsigned int access; /* wanted access rights */
  1126. unsigned int attributes; /* object attributes */
  1127. obj_handle_t rootdir; /* root directory */
  1128. VARARG(name,unicode_str); /* object name */
  1129. @REPLY
  1130. obj_handle_t handle; /* handle to the event */
  1131. @END
  1132. /* Create a mutex */
  1133. @REQ(create_mutex)
  1134. unsigned int access; /* wanted access rights */
  1135. int owned; /* initially owned? */
  1136. VARARG(objattr,object_attributes); /* object attributes */
  1137. @REPLY
  1138. obj_handle_t handle; /* handle to the mutex */
  1139. @END
  1140. /* Release a mutex */
  1141. @REQ(release_mutex)
  1142. obj_handle_t handle; /* handle to the mutex */
  1143. @REPLY
  1144. unsigned int prev_count; /* value of internal counter, before release */
  1145. @END
  1146. /* Open a mutex */
  1147. @REQ(open_mutex)
  1148. unsigned int access; /* wanted access rights */
  1149. unsigned int attributes; /* object attributes */
  1150. obj_handle_t rootdir; /* root directory */
  1151. VARARG(name,unicode_str); /* object name */
  1152. @REPLY
  1153. obj_handle_t handle; /* handle to the mutex */
  1154. @END
  1155. /* Query a mutex */
  1156. @REQ(query_mutex)
  1157. obj_handle_t handle; /* handle to mutex */
  1158. @REPLY
  1159. unsigned int count; /* current count of mutex */
  1160. int owned; /* true if owned by current thread */
  1161. int abandoned; /* true if abandoned */
  1162. @END
  1163. /* Create a semaphore */
  1164. @REQ(create_semaphore)
  1165. unsigned int access; /* wanted access rights */
  1166. unsigned int initial; /* initial count */
  1167. unsigned int max; /* maximum count */
  1168. VARARG(objattr,object_attributes); /* object attributes */
  1169. @REPLY
  1170. obj_handle_t handle; /* handle to the semaphore */
  1171. @END
  1172. /* Release a semaphore */
  1173. @REQ(release_semaphore)
  1174. obj_handle_t handle; /* handle to the semaphore */
  1175. unsigned int count; /* count to add to semaphore */
  1176. @REPLY
  1177. unsigned int prev_count; /* previous semaphore count */
  1178. @END
  1179. @REQ(query_semaphore)
  1180. obj_handle_t handle; /* handle to the semaphore */
  1181. @REPLY
  1182. unsigned int current; /* current count */
  1183. unsigned int max; /* maximum count */
  1184. @END
  1185. /* Open a semaphore */
  1186. @REQ(open_semaphore)
  1187. unsigned int access; /* wanted access rights */
  1188. unsigned int attributes; /* object attributes */
  1189. obj_handle_t rootdir; /* root directory */
  1190. VARARG(name,unicode_str); /* object name */
  1191. @REPLY
  1192. obj_handle_t handle; /* handle to the semaphore */
  1193. @END
  1194. /* Create a file */
  1195. @REQ(create_file)
  1196. unsigned int access; /* wanted access rights */
  1197. unsigned int sharing; /* sharing flags */
  1198. int create; /* file create action */
  1199. unsigned int options; /* file options */
  1200. unsigned int attrs; /* file attributes for creation */
  1201. VARARG(objattr,object_attributes); /* object attributes */
  1202. VARARG(filename,string); /* file name */
  1203. @REPLY
  1204. obj_handle_t handle; /* handle to the file */
  1205. @END
  1206. /* Open a file object */
  1207. @REQ(open_file_object)
  1208. unsigned int access; /* wanted access rights */
  1209. unsigned int attributes; /* open attributes */
  1210. obj_handle_t rootdir; /* root directory */
  1211. unsigned int sharing; /* sharing flags */
  1212. unsigned int options; /* file options */
  1213. VARARG(filename,unicode_str); /* file name */
  1214. @REPLY
  1215. obj_handle_t handle; /* handle to the file */
  1216. @END
  1217. /* Allocate a file handle for a Unix fd */
  1218. @REQ(alloc_file_handle)
  1219. unsigned int access; /* wanted access rights */
  1220. unsigned int attributes; /* object attributes */
  1221. int fd; /* file descriptor on the client side */
  1222. @REPLY
  1223. obj_handle_t handle; /* handle to the file */
  1224. @END
  1225. /* Get the Unix name from a file handle */
  1226. @REQ(get_handle_unix_name)
  1227. obj_handle_t handle; /* file handle */
  1228. @REPLY
  1229. data_size_t name_len; /* unix name length */
  1230. VARARG(name,string); /* unix name */
  1231. @END
  1232. /* Get a Unix fd to access a file */
  1233. @REQ(get_handle_fd)
  1234. obj_handle_t handle; /* handle to the file */
  1235. @REPLY
  1236. int type; /* file type (see below) */
  1237. int cacheable; /* can fd be cached in the client? */
  1238. unsigned int access; /* file access rights */
  1239. unsigned int options; /* file open options */
  1240. @END
  1241. enum server_fd_type
  1242. {
  1243. FD_TYPE_INVALID, /* invalid file (no associated fd) */
  1244. FD_TYPE_FILE, /* regular file */
  1245. FD_TYPE_DIR, /* directory */
  1246. FD_TYPE_SOCKET, /* socket */
  1247. FD_TYPE_SERIAL, /* serial port */
  1248. FD_TYPE_PIPE, /* named pipe */
  1249. FD_TYPE_MAILSLOT, /* mailslot */
  1250. FD_TYPE_CHAR, /* unspecified char device */
  1251. FD_TYPE_DEVICE, /* Windows device file */
  1252. FD_TYPE_NB_TYPES
  1253. };
  1254. /* Retrieve (or allocate) the client-side directory cache entry */
  1255. @REQ(get_directory_cache_entry)
  1256. obj_handle_t handle; /* handle to the directory */
  1257. @REPLY
  1258. int entry; /* cache entry on the client side */
  1259. VARARG(free,ints); /* entries that can be freed */
  1260. @END
  1261. /* Flush a file buffers */
  1262. @REQ(flush)
  1263. async_data_t async; /* async I/O parameters */
  1264. @REPLY
  1265. obj_handle_t event; /* event set when finished */
  1266. @END
  1267. /* Query file information */
  1268. @REQ(get_file_info)
  1269. obj_handle_t handle; /* handle to the file */
  1270. unsigned int info_class; /* queried information class */
  1271. @REPLY
  1272. VARARG(data,bytes); /* file info data */
  1273. @END
  1274. /* Query volume information */
  1275. @REQ(get_volume_info)
  1276. obj_handle_t handle; /* handle to the file */
  1277. async_data_t async; /* async I/O parameters */
  1278. unsigned int info_class; /* queried information class */
  1279. @REPLY
  1280. obj_handle_t wait; /* handle to wait on for blocking read */
  1281. VARARG(data,bytes); /* volume info data */
  1282. @END
  1283. /* Lock a region of a file */
  1284. @REQ(lock_file)
  1285. obj_handle_t handle; /* handle to the file */
  1286. file_pos_t offset; /* offset of start of lock */
  1287. file_pos_t count; /* count of bytes to lock */
  1288. int shared; /* shared or exclusive lock? */
  1289. int wait; /* do we want to wait? */
  1290. @REPLY
  1291. obj_handle_t handle; /* handle to wait on */
  1292. int overlapped; /* is it an overlapped I/O handle? */
  1293. @END
  1294. /* Unlock a region of a file */
  1295. @REQ(unlock_file)
  1296. obj_handle_t handle; /* handle to the file */
  1297. file_pos_t offset; /* offset of start of unlock */
  1298. file_pos_t count; /* count of bytes to unlock */
  1299. @END
  1300. /* Perform a recv on a socket */
  1301. @REQ(recv_socket)
  1302. int oob; /* are we receiving OOB data? */
  1303. async_data_t async; /* async I/O parameters */
  1304. int force_async; /* Force asynchronous mode? */
  1305. @REPLY
  1306. obj_handle_t wait; /* handle to wait on for blocking recv */
  1307. unsigned int options; /* device open options */
  1308. int nonblocking; /* is socket non-blocking? */
  1309. @END
  1310. /* Perform a send on a socket */
  1311. @REQ(send_socket)
  1312. async_data_t async; /* async I/O parameters */
  1313. int force_async; /* Force asynchronous mode? */
  1314. @REPLY
  1315. obj_handle_t wait; /* handle to wait on for blocking send */
  1316. unsigned int options; /* device open options */
  1317. int nonblocking; /* is socket non-blocking? */
  1318. @END
  1319. /* Retrieve the next pending console ioctl request */
  1320. @REQ(get_next_console_request)
  1321. obj_handle_t handle; /* console server handle */
  1322. int signal; /* server signal state */
  1323. int read; /* 1 if reporting result of blocked read ioctl */
  1324. unsigned int status; /* status of previous ioctl */
  1325. VARARG(out_data,bytes); /* out_data of previous ioctl */
  1326. @REPLY
  1327. unsigned int code; /* ioctl code */
  1328. unsigned int output; /* output id or 0 for input */
  1329. data_size_t out_size; /* ioctl output size */
  1330. VARARG(in_data,bytes); /* ioctl in_data */
  1331. @END
  1332. /* enable directory change notifications */
  1333. @REQ(read_directory_changes)
  1334. unsigned int filter; /* notification filter */
  1335. int subtree; /* watch the subtree? */
  1336. int want_data; /* flag indicating whether change data should be collected */
  1337. async_data_t async; /* async I/O parameters */
  1338. @END
  1339. @REQ(read_change)
  1340. obj_handle_t handle;
  1341. @REPLY
  1342. VARARG(events,filesystem_event); /* collected filesystem events */
  1343. @END
  1344. /* Create a file mapping */
  1345. @REQ(create_mapping)
  1346. unsigned int access; /* wanted access rights */
  1347. unsigned int flags; /* SEC_* flags */
  1348. unsigned int file_access; /* file access rights */
  1349. mem_size_t size; /* mapping size */
  1350. obj_handle_t file_handle; /* file handle */
  1351. VARARG(objattr,object_attributes); /* object attributes */
  1352. @REPLY
  1353. obj_handle_t handle; /* handle to the mapping */
  1354. @END
  1355. /* Open a mapping */
  1356. @REQ(open_mapping)
  1357. unsigned int access; /* wanted access rights */
  1358. unsigned int attributes; /* object attributes */
  1359. obj_handle_t rootdir; /* root directory */
  1360. VARARG(name,unicode_str); /* object name */
  1361. @REPLY
  1362. obj_handle_t handle; /* handle to the mapping */
  1363. @END
  1364. /* Get information about a file mapping */
  1365. @REQ(get_mapping_info)
  1366. obj_handle_t handle; /* handle to the mapping */
  1367. unsigned int access; /* wanted access rights */
  1368. @REPLY
  1369. mem_size_t size; /* mapping size */
  1370. unsigned int flags; /* SEC_* flags */
  1371. obj_handle_t shared_file; /* shared mapping file handle */
  1372. data_size_t total; /* total required buffer size in bytes */
  1373. VARARG(image,pe_image_info);/* image info for SEC_IMAGE mappings */
  1374. VARARG(name,unicode_str); /* filename for SEC_IMAGE mappings */
  1375. @END
  1376. /* Add a memory view in the current process */
  1377. @REQ(map_view)
  1378. obj_handle_t mapping; /* file mapping handle, or 0 for .so builtin */
  1379. unsigned int access; /* wanted access rights */
  1380. client_ptr_t base; /* view base address (page-aligned) */
  1381. mem_size_t size; /* view size */
  1382. file_pos_t start; /* start offset in mapping */
  1383. VARARG(image,pe_image_info);/* image info for .so builtins */
  1384. VARARG(name,unicode_str); /* image filename for .so builtins */
  1385. @END
  1386. /* Unmap a memory view from the current process */
  1387. @REQ(unmap_view)
  1388. client_ptr_t base; /* view base address */
  1389. @END
  1390. /* Get a range of committed pages in a file mapping */
  1391. @REQ(get_mapping_committed_range)
  1392. client_ptr_t base; /* view base address */
  1393. file_pos_t offset; /* starting offset (page-aligned, in bytes) */
  1394. @REPLY
  1395. mem_size_t size; /* size of range starting at offset (page-aligned, in bytes) */
  1396. int committed; /* whether it is a committed range */
  1397. @END
  1398. /* Add a range to the committed pages in a file mapping */
  1399. @REQ(add_mapping_committed_range)
  1400. client_ptr_t base; /* view base address */
  1401. file_pos_t offset; /* starting offset (page-aligned, in bytes) */
  1402. mem_size_t size; /* size to set (page-aligned, in bytes) or 0 if only retrieving */
  1403. @END
  1404. /* Check if two memory maps are for the same file */
  1405. @REQ(is_same_mapping)
  1406. client_ptr_t base1; /* first view base address */
  1407. client_ptr_t base2; /* second view base address */
  1408. @END
  1409. /* Get the filename of a mapping */
  1410. @REQ(get_mapping_filename)
  1411. obj_handle_t process; /* process handle */
  1412. client_ptr_t addr; /* address inside mapped view (in process address space) */
  1413. @REPLY
  1414. data_size_t len; /* total filename length in bytes */
  1415. VARARG(filename,unicode_str); /* filename in NT format */
  1416. @END
  1417. struct thread_info
  1418. {
  1419. timeout_t start_time;
  1420. thread_id_t tid;
  1421. int base_priority;
  1422. int current_priority;
  1423. int unix_tid;
  1424. client_ptr_t teb;
  1425. client_ptr_t entry_point;
  1426. };
  1427. struct process_info
  1428. {
  1429. timeout_t start_time;
  1430. data_size_t name_len;
  1431. int thread_count;
  1432. int priority;
  1433. process_id_t pid;
  1434. process_id_t parent_pid;
  1435. unsigned int session_id;
  1436. int handle_count;
  1437. int unix_pid;
  1438. /* VARARG(name,unicode_str,name_len); */
  1439. /* VARARG(threads,struct thread_info,thread_count); */
  1440. };
  1441. /* Get a list of processes and threads currently running */
  1442. @REQ(list_processes)
  1443. @REPLY
  1444. data_size_t info_size;
  1445. int process_count;
  1446. int total_thread_count;
  1447. data_size_t total_name_len;
  1448. VARARG(data,process_info,info_size);
  1449. @END
  1450. /* Create a debug object */
  1451. @REQ(create_debug_obj)
  1452. unsigned int access; /* wanted access rights */
  1453. unsigned int flags; /* object flags */
  1454. VARARG(objattr,object_attributes); /* object attributes */
  1455. @REPLY
  1456. obj_handle_t handle; /* handle to the debug object */
  1457. @END
  1458. /* Wait for a debug event */
  1459. @REQ(wait_debug_event)
  1460. obj_handle_t debug; /* debug object */
  1461. @REPLY
  1462. process_id_t pid; /* process id */
  1463. thread_id_t tid; /* thread id */
  1464. VARARG(event,debug_event); /* debug event data */
  1465. @END
  1466. /* Queue an exception event */
  1467. @REQ(queue_exception_event)
  1468. int first; /* first chance exception? */
  1469. unsigned int code; /* exception code */
  1470. unsigned int flags; /* exception flags */
  1471. client_ptr_t record; /* exception record */
  1472. client_ptr_t address; /* exception address */
  1473. data_size_t len; /* size of parameters */
  1474. VARARG(params,uints64,len);/* exception parameters */
  1475. @REPLY
  1476. obj_handle_t handle; /* handle to the queued event */
  1477. @END
  1478. /* Retrieve the status of an exception event */
  1479. @REQ(get_exception_status)
  1480. obj_handle_t handle; /* handle to the queued event */
  1481. @END
  1482. /* Continue a debug event */
  1483. @REQ(continue_debug_event)
  1484. obj_handle_t debug; /* debug object */
  1485. process_id_t pid; /* process id to continue */
  1486. thread_id_t tid; /* thread id to continue */
  1487. unsigned int status; /* continuation status */
  1488. @END
  1489. /* Start or stop debugging an existing process */
  1490. @REQ(debug_process)
  1491. obj_handle_t handle; /* process handle */
  1492. obj_handle_t debug; /* debug object to attach to the process */
  1493. int attach; /* 1=attaching / 0=detaching from the process */
  1494. @END
  1495. /* Set debug object information */
  1496. @REQ(set_debug_obj_info)
  1497. obj_handle_t debug; /* debug object */
  1498. unsigned int flags; /* object flags */
  1499. @END
  1500. /* Read data from a process address space */
  1501. @REQ(read_process_memory)
  1502. obj_handle_t handle; /* process handle */
  1503. client_ptr_t addr; /* addr to read from */
  1504. @REPLY
  1505. VARARG(data,bytes); /* result data */
  1506. @END
  1507. /* Write data to a process address space */
  1508. @REQ(write_process_memory)
  1509. obj_handle_t handle; /* process handle */
  1510. client_ptr_t addr; /* addr to write to */
  1511. VARARG(data,bytes); /* data to write */
  1512. @END
  1513. /* Create a registry key */
  1514. @REQ(create_key)
  1515. unsigned int access; /* desired access rights */
  1516. unsigned int options; /* creation options */
  1517. VARARG(objattr,object_attributes); /* object attributes */
  1518. VARARG(class,unicode_str); /* class name */
  1519. @REPLY
  1520. obj_handle_t hkey; /* handle to the created key */
  1521. int created; /* has it been newly created? */
  1522. @END
  1523. /* Open a registry key */
  1524. @REQ(open_key)
  1525. obj_handle_t parent; /* handle to the parent key */
  1526. unsigned int access; /* desired access rights */
  1527. unsigned int attributes; /* object attributes */
  1528. VARARG(name,unicode_str); /* key name */
  1529. @REPLY
  1530. obj_handle_t hkey; /* handle to the open key */
  1531. @END
  1532. /* Delete a registry key */
  1533. @REQ(delete_key)
  1534. obj_handle_t hkey; /* handle to the key */
  1535. @END
  1536. /* Flush a registry key */
  1537. @REQ(flush_key)
  1538. obj_handle_t hkey; /* handle to the key */
  1539. @END
  1540. /* Enumerate registry subkeys */
  1541. @REQ(enum_key)
  1542. obj_handle_t hkey; /* handle to registry key */
  1543. int index; /* index of subkey (or -1 for current key) */
  1544. int info_class; /* requested information class */
  1545. @REPLY
  1546. int subkeys; /* number of subkeys */
  1547. int max_subkey; /* longest subkey name */
  1548. int max_class; /* longest class name */
  1549. int values; /* number of values */
  1550. int max_value; /* longest value name */
  1551. int max_data; /* longest value data */
  1552. timeout_t modif; /* last modification time */
  1553. data_size_t total; /* total length needed for full name and class */
  1554. data_size_t namelen; /* length of key name in bytes */
  1555. VARARG(name,unicode_str,namelen); /* key name */
  1556. VARARG(class,unicode_str); /* class name */
  1557. @END
  1558. /* Set a value of a registry key */
  1559. @REQ(set_key_value)
  1560. obj_handle_t hkey; /* handle to registry key */
  1561. int type; /* value type */
  1562. data_size_t namelen; /* length of value name in bytes */
  1563. VARARG(name,unicode_str,namelen); /* value name */
  1564. VARARG(data,bytes); /* value data */
  1565. @END
  1566. /* Retrieve the value of a registry key */
  1567. @REQ(get_key_value)
  1568. obj_handle_t hkey; /* handle to registry key */
  1569. VARARG(name,unicode_str); /* value name */
  1570. @REPLY
  1571. int type; /* value type */
  1572. data_size_t total; /* total length needed for data */
  1573. VARARG(data,bytes); /* value data */
  1574. @END
  1575. /* Enumerate a value of a registry key */
  1576. @REQ(enum_key_value)
  1577. obj_handle_t hkey; /* handle to registry key */
  1578. int index; /* value index */
  1579. int info_class; /* requested information class */
  1580. @REPLY
  1581. int type; /* value type */
  1582. data_size_t total; /* total length needed for full name and data */
  1583. data_size_t namelen; /* length of value name in bytes */
  1584. VARARG(name,unicode_str,namelen); /* value name */
  1585. VARARG(data,bytes); /* value data */
  1586. @END
  1587. /* Delete a value of a registry key */
  1588. @REQ(delete_key_value)
  1589. obj_handle_t hkey; /* handle to registry key */
  1590. VARARG(name,unicode_str); /* value name */
  1591. @END
  1592. /* Load a registry branch from a file */
  1593. @REQ(load_registry)
  1594. obj_handle_t file; /* file to load from */
  1595. VARARG(objattr,object_attributes); /* object attributes */
  1596. @END
  1597. /* UnLoad a registry branch from a file */
  1598. @REQ(unload_registry)
  1599. obj_handle_t parent; /* handle to the parent key */
  1600. unsigned int attributes; /* object attributes */
  1601. VARARG(name,unicode_str); /* key name */
  1602. @END
  1603. /* Save a registry branch to a file */
  1604. @REQ(save_registry)
  1605. obj_handle_t hkey; /* key to save */
  1606. obj_handle_t file; /* file to save to */
  1607. @END
  1608. /* Add a registry key change notification */
  1609. @REQ(set_registry_notification)
  1610. obj_handle_t hkey; /* key to watch for changes */
  1611. obj_handle_t event; /* event to set */
  1612. int subtree; /* should we watch the whole subtree? */
  1613. unsigned int filter; /* things to watch */
  1614. @END
  1615. /* Create a waitable timer */
  1616. @REQ(create_timer)
  1617. unsigned int access; /* wanted access rights */
  1618. int manual; /* manual reset */
  1619. VARARG(objattr,object_attributes); /* object attributes */
  1620. @REPLY
  1621. obj_handle_t handle; /* handle to the timer */
  1622. @END
  1623. /* Open a waitable timer */
  1624. @REQ(open_timer)
  1625. unsigned int access; /* wanted access rights */
  1626. unsigned int attributes; /* object attributes */
  1627. obj_handle_t rootdir; /* root directory */
  1628. VARARG(name,unicode_str); /* object name */
  1629. @REPLY
  1630. obj_handle_t handle; /* handle to the timer */
  1631. @END
  1632. /* Set a waitable timer */
  1633. @REQ(set_timer)
  1634. obj_handle_t handle; /* handle to the timer */
  1635. timeout_t expire; /* next expiration absolute time */
  1636. client_ptr_t callback; /* callback function */
  1637. client_ptr_t arg; /* callback argument */
  1638. int period; /* timer period in ms */
  1639. @REPLY
  1640. int signaled; /* was the timer signaled before this call ? */
  1641. @END
  1642. /* Cancel a waitable timer */
  1643. @REQ(cancel_timer)
  1644. obj_handle_t handle; /* handle to the timer */
  1645. @REPLY
  1646. int signaled; /* was the timer signaled before this calltime ? */
  1647. @END
  1648. /* Get information on a waitable timer */
  1649. @REQ(get_timer_info)
  1650. obj_handle_t handle; /* handle to the timer */
  1651. @REPLY
  1652. timeout_t when; /* absolute time when the timer next expires */
  1653. int signaled; /* is the timer signaled? */
  1654. @END
  1655. /* Retrieve the current context of a thread */
  1656. @REQ(get_thread_context)
  1657. obj_handle_t handle; /* thread handle */
  1658. obj_handle_t context; /* context handle */
  1659. unsigned int flags; /* context flags */
  1660. unsigned short machine; /* context architecture */
  1661. @REPLY
  1662. int self; /* was it a handle to the current thread? */
  1663. obj_handle_t handle; /* pending context handle */
  1664. VARARG(contexts,contexts); /* thread context(s) */
  1665. @END
  1666. /* Set the current context of a thread */
  1667. @REQ(set_thread_context)
  1668. obj_handle_t handle; /* thread handle */
  1669. VARARG(contexts,contexts); /* thread context(s) */
  1670. @REPLY
  1671. int self; /* was it a handle to the current thread? */
  1672. @END
  1673. /* Fetch a selector entry for a thread */
  1674. @REQ(get_selector_entry)
  1675. obj_handle_t handle; /* thread handle */
  1676. int entry; /* LDT entry */
  1677. @REPLY
  1678. unsigned int base; /* selector base */
  1679. unsigned int limit; /* selector limit */
  1680. unsigned char flags; /* selector flags */
  1681. @END
  1682. /* Add an atom */
  1683. @REQ(add_atom)
  1684. VARARG(name,unicode_str); /* atom name */
  1685. @REPLY
  1686. atom_t atom; /* resulting atom */
  1687. @END
  1688. /* Delete an atom */
  1689. @REQ(delete_atom)
  1690. atom_t atom; /* atom handle */
  1691. @END
  1692. /* Find an atom */
  1693. @REQ(find_atom)
  1694. VARARG(name,unicode_str); /* atom name */
  1695. @REPLY
  1696. atom_t atom; /* atom handle */
  1697. @END
  1698. /* Get information about an atom */
  1699. @REQ(get_atom_information)
  1700. atom_t atom; /* atom handle */
  1701. @REPLY
  1702. int count; /* atom lock count */
  1703. int pinned; /* whether the atom has been pinned */
  1704. data_size_t total; /* actual length of atom name */
  1705. VARARG(name,unicode_str); /* atom name */
  1706. @END
  1707. /* Get the message queue of the current thread */
  1708. @REQ(get_msg_queue)
  1709. @REPLY
  1710. obj_handle_t handle; /* handle to the queue */
  1711. @END
  1712. /* Set the file descriptor associated to the current thread queue */
  1713. @REQ(set_queue_fd)
  1714. obj_handle_t handle; /* handle to the file descriptor */
  1715. @END
  1716. /* Set the current message queue wakeup mask */
  1717. @REQ(set_queue_mask)
  1718. unsigned int wake_mask; /* wakeup bits mask */
  1719. unsigned int changed_mask; /* changed bits mask */
  1720. int skip_wait; /* will we skip waiting if signaled? */
  1721. @REPLY
  1722. unsigned int wake_bits; /* current wake bits */
  1723. unsigned int changed_bits; /* current changed bits */
  1724. @END
  1725. /* Get the current message queue status */
  1726. @REQ(get_queue_status)
  1727. unsigned int clear_bits; /* should we clear the change bits? */
  1728. @REPLY
  1729. unsigned int wake_bits; /* wake bits */
  1730. unsigned int changed_bits; /* changed bits since last time */
  1731. @END
  1732. /* Retrieve the process idle event */
  1733. @REQ(get_process_idle_event)
  1734. obj_handle_t handle; /* process handle */
  1735. @REPLY
  1736. obj_handle_t event; /* handle to idle event */
  1737. @END
  1738. /* Send a message to a thread queue */
  1739. @REQ(send_message)
  1740. thread_id_t id; /* thread id */
  1741. int type; /* message type (see below) */
  1742. int flags; /* message flags (see below) */
  1743. user_handle_t win; /* window handle */
  1744. unsigned int msg; /* message code */
  1745. lparam_t wparam; /* parameters */
  1746. lparam_t lparam; /* parameters */
  1747. timeout_t timeout; /* timeout for reply */
  1748. VARARG(data,message_data); /* message data for sent messages */
  1749. @END
  1750. @REQ(post_quit_message)
  1751. int exit_code; /* exit code to return */
  1752. @END
  1753. enum message_type
  1754. {
  1755. MSG_ASCII, /* Ascii message (from SendMessageA) */
  1756. MSG_UNICODE, /* Unicode message (from SendMessageW) */
  1757. MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
  1758. MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
  1759. MSG_CALLBACK_RESULT,/* result of a callback message */
  1760. MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
  1761. MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
  1762. MSG_HARDWARE, /* hardware message */
  1763. MSG_WINEVENT, /* winevent message */
  1764. MSG_HOOK_LL /* low-level hardware hook */
  1765. };
  1766. #define SEND_MSG_ABORT_IF_HUNG 0x01
  1767. /* Send a hardware message to a thread queue */
  1768. @REQ(send_hardware_message)
  1769. user_handle_t win; /* window handle */
  1770. hw_input_t input; /* input data */
  1771. unsigned int flags; /* flags (see below) */
  1772. VARARG(report,bytes); /* HID report data */
  1773. @REPLY
  1774. int wait; /* do we need to wait for a reply? */
  1775. int prev_x; /* previous cursor position */
  1776. int prev_y;
  1777. int new_x; /* new cursor position */
  1778. int new_y;
  1779. VARARG(keystate,bytes); /* global state array for all the keys */
  1780. @END
  1781. #define SEND_HWMSG_INJECTED 0x01
  1782. /* Get a message from the current queue */
  1783. @REQ(get_message)
  1784. unsigned int flags; /* PM_* flags */
  1785. user_handle_t get_win; /* window handle to get */
  1786. unsigned int get_first; /* first message code to get */
  1787. unsigned int get_last; /* last message code to get */
  1788. unsigned int hw_id; /* id of the previous hardware message (or 0) */
  1789. unsigned int wake_mask; /* wakeup bits mask */
  1790. unsigned int changed_mask; /* changed bits mask */
  1791. @REPLY
  1792. user_handle_t win; /* window handle */
  1793. unsigned int msg; /* message code */
  1794. lparam_t wparam; /* parameters */
  1795. lparam_t lparam; /* parameters */
  1796. int type; /* message type */
  1797. int x; /* message x position */
  1798. int y; /* message y position */
  1799. unsigned int time; /* message time */
  1800. unsigned int active_hooks; /* active hooks bitmap */
  1801. data_size_t total; /* total size of extra data */
  1802. VARARG(data,message_data); /* message data for sent messages */
  1803. @END
  1804. /* Reply to a sent message */
  1805. @REQ(reply_message)
  1806. int remove; /* should we remove the message? */
  1807. lparam_t result; /* message result */
  1808. VARARG(data,bytes); /* message data for sent messages */
  1809. @END
  1810. /* Accept and remove the current hardware message */
  1811. @REQ(accept_hardware_message)
  1812. unsigned int hw_id; /* id of the hardware message */
  1813. @END
  1814. /* Retrieve the reply for the last message sent */
  1815. @REQ(get_message_reply)
  1816. int cancel; /* cancel message if not ready? */
  1817. @REPLY
  1818. lparam_t result; /* message result */
  1819. VARARG(data,bytes); /* message data for sent messages */
  1820. @END
  1821. /* Set a window timer */
  1822. @REQ(set_win_timer)
  1823. user_handle_t win; /* window handle */
  1824. unsigned int msg; /* message to post */
  1825. unsigned int rate; /* timer rate in ms */
  1826. lparam_t id; /* timer id */
  1827. lparam_t lparam; /* message lparam (callback proc) */
  1828. @REPLY
  1829. lparam_t id; /* timer id */
  1830. @END
  1831. /* Kill a window timer */
  1832. @REQ(kill_win_timer)
  1833. user_handle_t win; /* window handle */
  1834. lparam_t id; /* timer id */
  1835. unsigned int msg; /* message to post */
  1836. @END
  1837. /* check if the thread owning the window is hung */
  1838. @REQ(is_window_hung)
  1839. user_handle_t win; /* window handle */
  1840. @REPLY
  1841. int is_hung;
  1842. @END
  1843. /* Retrieve info about a serial port */
  1844. @REQ(get_serial_info)
  1845. obj_handle_t handle; /* handle to comm port */
  1846. int flags;
  1847. @REPLY
  1848. unsigned int eventmask;
  1849. unsigned int cookie;
  1850. unsigned int pending_write;
  1851. @END
  1852. /* Set info about a serial port */
  1853. @REQ(set_serial_info)
  1854. obj_handle_t handle; /* handle to comm port */
  1855. int flags; /* bitmask to set values (see below) */
  1856. @END
  1857. #define SERIALINFO_PENDING_WRITE 0x04
  1858. #define SERIALINFO_PENDING_WAIT 0x08
  1859. /* Create an async I/O */
  1860. @REQ(register_async)
  1861. int type; /* type of queue to look after */
  1862. async_data_t async; /* async I/O parameters */
  1863. int count; /* count - usually # of bytes to be read/written */
  1864. @END
  1865. #define ASYNC_TYPE_READ 0x01
  1866. #define ASYNC_TYPE_WRITE 0x02
  1867. #define ASYNC_TYPE_WAIT 0x03
  1868. /* Cancel all async op on a fd */
  1869. @REQ(cancel_async)
  1870. obj_handle_t handle; /* handle to comm port, socket or file */
  1871. client_ptr_t iosb; /* I/O status block (NULL=all) */
  1872. int only_thread; /* cancel matching this thread */
  1873. @END
  1874. /* Retrieve results of an async */
  1875. @REQ(get_async_result)
  1876. client_ptr_t user_arg; /* user arg used to identify async */
  1877. @REPLY
  1878. VARARG(out_data,bytes); /* iosb output data */
  1879. @END
  1880. /* Notify direct completion of async and close the wait handle if not blocking */
  1881. @REQ(set_async_direct_result)
  1882. obj_handle_t handle; /* wait handle */
  1883. apc_param_t information; /* IO_STATUS_BLOCK Information */
  1884. unsigned int status; /* completion status */
  1885. int mark_pending; /* set async to pending before completion? */
  1886. @REPLY
  1887. obj_handle_t handle; /* wait handle, or NULL if closed */
  1888. @END
  1889. /* Perform a read on a file object */
  1890. @REQ(read)
  1891. async_data_t async; /* async I/O parameters */
  1892. file_pos_t pos; /* read position */
  1893. @REPLY
  1894. obj_handle_t wait; /* handle to wait on for blocking read */
  1895. unsigned int options; /* device open options */
  1896. VARARG(data,bytes); /* read data */
  1897. @END
  1898. /* Perform a write on a file object */
  1899. @REQ(write)
  1900. async_data_t async; /* async I/O parameters */
  1901. file_pos_t pos; /* write position */
  1902. VARARG(data,bytes); /* write data */
  1903. @REPLY
  1904. obj_handle_t wait; /* handle to wait on for blocking write */
  1905. unsigned int options; /* device open options */
  1906. data_size_t size; /* size written */
  1907. @END
  1908. /* Perform an ioctl on a file */
  1909. @REQ(ioctl)
  1910. ioctl_code_t code; /* ioctl code */
  1911. async_data_t async; /* async I/O parameters */
  1912. VARARG(in_data,bytes); /* ioctl input data */
  1913. @REPLY
  1914. obj_handle_t wait; /* handle to wait on for blocking ioctl */
  1915. unsigned int options; /* device open options */
  1916. VARARG(out_data,bytes); /* ioctl output data */
  1917. @END
  1918. /* Store results of an async irp */
  1919. @REQ(set_irp_result)
  1920. obj_handle_t handle; /* handle to the irp */
  1921. unsigned int status; /* status of the irp */
  1922. data_size_t size; /* result size (input or output depending on the operation) */
  1923. VARARG(data,bytes); /* output data of the irp */
  1924. @END
  1925. /* Create a named pipe */
  1926. @REQ(create_named_pipe)
  1927. unsigned int access;
  1928. unsigned int options;
  1929. unsigned int sharing;
  1930. unsigned int maxinstances;
  1931. unsigned int outsize;
  1932. unsigned int insize;
  1933. timeout_t timeout;
  1934. unsigned int flags;
  1935. VARARG(objattr,object_attributes); /* object attributes */
  1936. @REPLY
  1937. obj_handle_t handle; /* handle to the pipe */
  1938. @END
  1939. /* flags in create_named_pipe and get_named_pipe_info */
  1940. #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
  1941. #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
  1942. #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
  1943. #define NAMED_PIPE_SERVER_END 0x8000
  1944. /* Set named pipe information by handle */
  1945. @REQ(set_named_pipe_info)
  1946. obj_handle_t handle;
  1947. unsigned int flags;
  1948. @END
  1949. /* Create a window */
  1950. @REQ(create_window)
  1951. user_handle_t parent; /* parent window */
  1952. user_handle_t owner; /* owner window */
  1953. atom_t atom; /* class atom */
  1954. mod_handle_t instance; /* module instance */
  1955. int dpi; /* system DPI */
  1956. int awareness; /* thread DPI awareness */
  1957. unsigned int style; /* window style */
  1958. unsigned int ex_style; /* window extended style */
  1959. VARARG(class,unicode_str); /* class name */
  1960. @REPLY
  1961. user_handle_t handle; /* created window */
  1962. user_handle_t parent; /* full handle of parent */
  1963. user_handle_t owner; /* full handle of owner */
  1964. int extra; /* number of extra bytes */
  1965. client_ptr_t class_ptr; /* pointer to class in client address space */
  1966. int dpi; /* window DPI if not per-monitor aware */
  1967. int awareness; /* window DPI awareness */
  1968. @END
  1969. /* Destroy a window */
  1970. @REQ(destroy_window)
  1971. user_handle_t handle; /* handle to the window */
  1972. @END
  1973. /* Retrieve the desktop window for the current thread */
  1974. @REQ(get_desktop_window)
  1975. int force; /* force creation if it doesn't exist */
  1976. @REPLY
  1977. user_handle_t top_window; /* handle to the desktop window */
  1978. user_handle_t msg_window; /* handle to the top-level HWND_MESSAGE parent */
  1979. @END
  1980. /* Set a window owner */
  1981. @REQ(set_window_owner)
  1982. user_handle_t handle; /* handle to the window */
  1983. user_handle_t owner; /* new owner */
  1984. @REPLY
  1985. user_handle_t full_owner; /* full handle of new owner */
  1986. user_handle_t prev_owner; /* full handle of previous owner */
  1987. @END
  1988. /* Get information from a window handle */
  1989. @REQ(get_window_info)
  1990. user_handle_t handle; /* handle to the window */
  1991. @REPLY
  1992. user_handle_t full_handle; /* full 32-bit handle */
  1993. user_handle_t last_active; /* last active popup */
  1994. process_id_t pid; /* process owning the window */
  1995. thread_id_t tid; /* thread owning the window */
  1996. atom_t atom; /* class atom */
  1997. int is_unicode; /* ANSI or unicode */
  1998. int dpi; /* window DPI */
  1999. int awareness; /* DPI awareness */
  2000. @END
  2001. /* Set some information in a window */
  2002. @REQ(set_window_info)
  2003. unsigned short flags; /* flags for fields to set (see below) */
  2004. short int is_unicode; /* ANSI or unicode */
  2005. user_handle_t handle; /* handle to the window */
  2006. unsigned int style; /* window style */
  2007. unsigned int ex_style; /* window extended style */
  2008. data_size_t extra_size; /* size to set in extra bytes */
  2009. mod_handle_t instance; /* creator instance */
  2010. lparam_t user_data; /* user-specific data */
  2011. lparam_t extra_value; /* value to set in extra bytes or window id */
  2012. int extra_offset; /* offset to set in extra bytes */
  2013. @REPLY
  2014. unsigned int old_style; /* old window style */
  2015. unsigned int old_ex_style; /* old window extended style */
  2016. mod_handle_t old_instance; /* old creator instance */
  2017. lparam_t old_user_data; /* old user-specific data */
  2018. lparam_t old_extra_value; /* old value in extra bytes */
  2019. lparam_t old_id; /* old window id */
  2020. @END
  2021. #define SET_WIN_STYLE 0x01
  2022. #define SET_WIN_EXSTYLE 0x02
  2023. #define SET_WIN_ID 0x04
  2024. #define SET_WIN_INSTANCE 0x08
  2025. #define SET_WIN_USERDATA 0x10
  2026. #define SET_WIN_EXTRA 0x20
  2027. #define SET_WIN_UNICODE 0x40
  2028. /* Set the parent of a window */
  2029. @REQ(set_parent)
  2030. user_handle_t handle; /* handle to the window */
  2031. user_handle_t parent; /* handle to the parent */
  2032. @REPLY
  2033. user_handle_t old_parent; /* old parent window */
  2034. user_handle_t full_parent; /* full handle of new parent */
  2035. int dpi; /* new window DPI if not per-monitor aware */
  2036. int awareness; /* new DPI awareness */
  2037. @END
  2038. /* Get a list of the window parents, up to the root of the tree */
  2039. @REQ(get_window_parents)
  2040. user_handle_t handle; /* handle to the window */
  2041. @REPLY
  2042. int count; /* total count of parents */
  2043. VARARG(parents,user_handles); /* parent handles */
  2044. @END
  2045. /* Get a list of the window children */
  2046. @REQ(get_window_children)
  2047. obj_handle_t desktop; /* handle to desktop */
  2048. user_handle_t parent; /* parent window */
  2049. atom_t atom; /* class atom for the listed children */
  2050. thread_id_t tid; /* thread owning the listed children */
  2051. VARARG(class,unicode_str); /* class name */
  2052. @REPLY
  2053. int count; /* total count of children */
  2054. VARARG(children,user_handles); /* children handles */
  2055. @END
  2056. /* Get a list of the window children that contain a given point */
  2057. @REQ(get_window_children_from_point)
  2058. user_handle_t parent; /* parent window */
  2059. int x; /* point in parent coordinates */
  2060. int y;
  2061. int dpi; /* dpi for the point coordinates */
  2062. @REPLY
  2063. int count; /* total count of children */
  2064. VARARG(children,user_handles); /* children handles */
  2065. @END
  2066. /* Get window tree information from a window handle */
  2067. @REQ(get_window_tree)
  2068. user_handle_t handle; /* handle to the window */
  2069. @REPLY
  2070. user_handle_t parent; /* parent window */
  2071. user_handle_t owner; /* owner window */
  2072. user_handle_t next_sibling; /* next sibling in Z-order */
  2073. user_handle_t prev_sibling; /* prev sibling in Z-order */
  2074. user_handle_t first_sibling; /* first sibling in Z-order */
  2075. user_handle_t last_sibling; /* last sibling in Z-order */
  2076. user_handle_t first_child; /* first child */
  2077. user_handle_t last_child; /* last child */
  2078. @END
  2079. /* Set the position and Z order of a window */
  2080. @REQ(set_window_pos)
  2081. unsigned short swp_flags; /* SWP_* flags */
  2082. unsigned short paint_flags; /* paint flags (see below) */
  2083. user_handle_t handle; /* handle to the window */
  2084. user_handle_t previous; /* previous window in Z order */
  2085. rectangle_t window; /* window rectangle (in parent coords) */
  2086. rectangle_t client; /* client rectangle (in parent coords) */
  2087. VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE (in parent coords) */
  2088. @REPLY
  2089. unsigned int new_style; /* new window style */
  2090. unsigned int new_ex_style; /* new window extended style */
  2091. user_handle_t surface_win; /* parent window that holds the surface */
  2092. int needs_update; /* whether the surface region needs an update */
  2093. @END
  2094. #define SET_WINPOS_PAINT_SURFACE 0x01 /* window has a paintable surface */
  2095. #define SET_WINPOS_PIXEL_FORMAT 0x02 /* window has a custom pixel format */
  2096. /* Get the window and client rectangles of a window */
  2097. @REQ(get_window_rectangles)
  2098. user_handle_t handle; /* handle to the window */
  2099. int relative; /* coords relative to (see below) */
  2100. int dpi; /* DPI to map to, or zero for per-monitor DPI */
  2101. @REPLY
  2102. rectangle_t window; /* window rectangle */
  2103. rectangle_t client; /* client rectangle */
  2104. @END
  2105. enum coords_relative
  2106. {
  2107. COORDS_CLIENT, /* relative to client area */
  2108. COORDS_WINDOW, /* relative to whole window area */
  2109. COORDS_PARENT, /* relative to parent's client area */
  2110. COORDS_SCREEN /* relative to screen origin */
  2111. };
  2112. /* Get the window text */
  2113. @REQ(get_window_text)
  2114. user_handle_t handle; /* handle to the window */
  2115. @REPLY
  2116. data_size_t length; /* total length in WCHARs */
  2117. VARARG(text,unicode_str); /* window text */
  2118. @END
  2119. /* Set the window text */
  2120. @REQ(set_window_text)
  2121. user_handle_t handle; /* handle to the window */
  2122. VARARG(text,unicode_str); /* window text */
  2123. @END
  2124. /* Get the coordinates offset between two windows */
  2125. @REQ(get_windows_offset)
  2126. user_handle_t from; /* handle to the first window */
  2127. user_handle_t to; /* handle to the second window */
  2128. int dpi; /* DPI to map to, or zero for per-monitor DPI */
  2129. @REPLY
  2130. int x; /* x coordinate offset */
  2131. int y; /* y coordinate offset */
  2132. int mirror; /* whether to mirror the x coordinate */
  2133. @END
  2134. /* Get the visible region of a window */
  2135. @REQ(get_visible_region)
  2136. user_handle_t window; /* handle to the window */
  2137. unsigned int flags; /* DCX flags */
  2138. @REPLY
  2139. user_handle_t top_win; /* top window to clip against */
  2140. rectangle_t top_rect; /* top window visible rect with screen coords */
  2141. rectangle_t win_rect; /* window rect in screen coords */
  2142. unsigned int paint_flags; /* paint flags (from SET_WINPOS_* flags) */
  2143. data_size_t total_size; /* total size of the resulting region */
  2144. VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
  2145. @END
  2146. /* Get the visible surface region of a window */
  2147. @REQ(get_surface_region)
  2148. user_handle_t window; /* handle to the window */
  2149. @REPLY
  2150. rectangle_t visible_rect; /* window visible rect in screen coords */
  2151. data_size_t total_size; /* total size of the resulting region */
  2152. VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
  2153. @END
  2154. /* Get the window region */
  2155. @REQ(get_window_region)
  2156. user_handle_t window; /* handle to the window */
  2157. @REPLY
  2158. data_size_t total_size; /* total size of the resulting region */
  2159. VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
  2160. @END
  2161. /* Set the window region */
  2162. @REQ(set_window_region)
  2163. user_handle_t window; /* handle to the window */
  2164. int redraw; /* redraw the window? */
  2165. VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
  2166. @END
  2167. /* Get the window update region */
  2168. @REQ(get_update_region)
  2169. user_handle_t window; /* handle to the window */
  2170. user_handle_t from_child; /* child to start searching from */
  2171. unsigned int flags; /* update flags (see below) */
  2172. @REPLY
  2173. user_handle_t child; /* child to repaint (or window itself) */
  2174. unsigned int flags; /* resulting update flags (see below) */
  2175. data_size_t total_size; /* total size of the resulting region */
  2176. VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
  2177. @END
  2178. #define UPDATE_NONCLIENT 0x001 /* get region for repainting non-client area */
  2179. #define UPDATE_ERASE 0x002 /* get region for erasing client area */
  2180. #define UPDATE_PAINT 0x004 /* get region for painting client area */
  2181. #define UPDATE_INTERNALPAINT 0x008 /* get region if internal paint is pending */
  2182. #define UPDATE_ALLCHILDREN 0x010 /* force repaint of all children */
  2183. #define UPDATE_NOCHILDREN 0x020 /* don't try to repaint any children */
  2184. #define UPDATE_NOREGION 0x040 /* don't return a region, only the flags */
  2185. #define UPDATE_DELAYED_ERASE 0x080 /* still needs erase after BeginPaint */
  2186. #define UPDATE_CLIPCHILDREN 0x100 /* remove clipped children from the update region */
  2187. /* Update the z order of a window so that a given rectangle is fully visible */
  2188. @REQ(update_window_zorder)
  2189. user_handle_t window; /* handle to the window */
  2190. rectangle_t rect; /* rectangle that must be visible (in client coords) */
  2191. @END
  2192. /* Mark parts of a window as needing a redraw */
  2193. @REQ(redraw_window)
  2194. user_handle_t window; /* handle to the window */
  2195. unsigned int flags; /* RDW_* flags */
  2196. VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
  2197. @END
  2198. /* Set a window property */
  2199. @REQ(set_window_property)
  2200. user_handle_t window; /* handle to the window */
  2201. lparam_t data; /* data to store */
  2202. atom_t atom; /* property atom (if no name specified) */
  2203. VARARG(name,unicode_str); /* property name */
  2204. @END
  2205. /* Remove a window property */
  2206. @REQ(remove_window_property)
  2207. user_handle_t window; /* handle to the window */
  2208. atom_t atom; /* property atom (if no name specified) */
  2209. VARARG(name,unicode_str); /* property name */
  2210. @REPLY
  2211. lparam_t data; /* data stored in property */
  2212. @END
  2213. /* Get a window property */
  2214. @REQ(get_window_property)
  2215. user_handle_t window; /* handle to the window */
  2216. atom_t atom; /* property atom (if no name specified) */
  2217. VARARG(name,unicode_str); /* property name */
  2218. @REPLY
  2219. lparam_t data; /* data stored in property */
  2220. @END
  2221. /* Get the list of properties of a window */
  2222. @REQ(get_window_properties)
  2223. user_handle_t window; /* handle to the window */
  2224. @REPLY
  2225. int total; /* total number of properties */
  2226. VARARG(props,properties); /* list of properties */
  2227. @END
  2228. /* Create a window station */
  2229. @REQ(create_winstation)
  2230. unsigned int flags; /* window station flags */
  2231. unsigned int access; /* wanted access rights */
  2232. unsigned int attributes; /* object attributes */
  2233. obj_handle_t rootdir; /* root directory */
  2234. VARARG(name,unicode_str); /* object name */
  2235. @REPLY
  2236. obj_handle_t handle; /* handle to the window station */
  2237. @END
  2238. /* Open a handle to a window station */
  2239. @REQ(open_winstation)
  2240. unsigned int access; /* wanted access rights */
  2241. unsigned int attributes; /* object attributes */
  2242. obj_handle_t rootdir; /* root directory */
  2243. VARARG(name,unicode_str); /* object name */
  2244. @REPLY
  2245. obj_handle_t handle; /* handle to the window station */
  2246. @END
  2247. /* Close a window station */
  2248. @REQ(close_winstation)
  2249. obj_handle_t handle; /* handle to the window station */
  2250. @END
  2251. /* Get the process current window station */
  2252. @REQ(get_process_winstation)
  2253. @REPLY
  2254. obj_handle_t handle; /* handle to the window station */
  2255. @END
  2256. /* Set the process current window station */
  2257. @REQ(set_process_winstation)
  2258. obj_handle_t handle; /* handle to the window station */
  2259. @END
  2260. /* Enumerate window stations */
  2261. @REQ(enum_winstation)
  2262. unsigned int index; /* current index */
  2263. @REPLY
  2264. unsigned int next; /* next index */
  2265. VARARG(name,unicode_str); /* window station name */
  2266. @END
  2267. /* Create a desktop */
  2268. @REQ(create_desktop)
  2269. unsigned int flags; /* desktop flags */
  2270. unsigned int access; /* wanted access rights */
  2271. unsigned int attributes; /* object attributes */
  2272. VARARG(name,unicode_str); /* object name */
  2273. @REPLY
  2274. obj_handle_t handle; /* handle to the desktop */
  2275. @END
  2276. /* Open a handle to a desktop */
  2277. @REQ(open_desktop)
  2278. obj_handle_t winsta; /* window station to open (null allowed) */
  2279. unsigned int flags; /* desktop flags */
  2280. unsigned int access; /* wanted access rights */
  2281. unsigned int attributes; /* object attributes */
  2282. VARARG(name,unicode_str); /* object name */
  2283. @REPLY
  2284. obj_handle_t handle; /* handle to the desktop */
  2285. @END
  2286. /* Open a handle to current input desktop */
  2287. @REQ(open_input_desktop)
  2288. unsigned int flags; /* desktop flags */
  2289. unsigned int access; /* wanted access rights */
  2290. unsigned int attributes; /* object attributes */
  2291. @REPLY
  2292. obj_handle_t handle; /* handle to the desktop */
  2293. @END
  2294. /* Close a desktop */
  2295. @REQ(close_desktop)
  2296. obj_handle_t handle; /* handle to the desktop */
  2297. @END
  2298. /* Get the thread current desktop */
  2299. @REQ(get_thread_desktop)
  2300. thread_id_t tid; /* thread id */
  2301. @REPLY
  2302. obj_handle_t handle; /* handle to the desktop */
  2303. @END
  2304. /* Set the thread current desktop */
  2305. @REQ(set_thread_desktop)
  2306. obj_handle_t handle; /* handle to the desktop */
  2307. @END
  2308. /* Enumerate desktops */
  2309. @REQ(enum_desktop)
  2310. obj_handle_t winstation; /* handle to the window station */
  2311. unsigned int index; /* current index */
  2312. @REPLY
  2313. unsigned int next; /* next index */
  2314. VARARG(name,unicode_str); /* window station name */
  2315. @END
  2316. /* Get/set information about a user object (window station or desktop) */
  2317. @REQ(set_user_object_info)
  2318. obj_handle_t handle; /* handle to the object */
  2319. unsigned int flags; /* information to set/get */
  2320. unsigned int obj_flags; /* new object flags */
  2321. @REPLY
  2322. int is_desktop; /* is object a desktop? */
  2323. unsigned int old_obj_flags; /* old object flags */
  2324. VARARG(name,unicode_str); /* object name */
  2325. @END
  2326. #define SET_USER_OBJECT_SET_FLAGS 1
  2327. #define SET_USER_OBJECT_GET_FULL_NAME 2
  2328. /* Register a hotkey */
  2329. @REQ(register_hotkey)
  2330. user_handle_t window; /* handle to the window */
  2331. int id; /* hotkey identifier */
  2332. unsigned int flags; /* modifier keys */
  2333. unsigned int vkey; /* virtual key code */
  2334. @REPLY
  2335. int replaced; /* did we replace an existing hotkey? */
  2336. unsigned int flags; /* flags of replaced hotkey */
  2337. unsigned int vkey; /* virtual key code of replaced hotkey */
  2338. @END
  2339. /* Unregister a hotkey */
  2340. @REQ(unregister_hotkey)
  2341. user_handle_t window; /* handle to the window */
  2342. int id; /* hotkey identifier */
  2343. @REPLY
  2344. unsigned int flags; /* flags of removed hotkey */
  2345. unsigned int vkey; /* virtual key code of removed hotkey */
  2346. @END
  2347. /* Attach (or detach) thread inputs */
  2348. @REQ(attach_thread_input)
  2349. thread_id_t tid_from; /* thread to be attached */
  2350. thread_id_t tid_to; /* thread to which tid_from should be attached */
  2351. int attach; /* is it an attach? */
  2352. @END
  2353. /* Get input data for a given thread */
  2354. @REQ(get_thread_input)
  2355. thread_id_t tid; /* id of thread */
  2356. @REPLY
  2357. user_handle_t focus; /* handle to the focus window */
  2358. user_handle_t capture; /* handle to the capture window */
  2359. user_handle_t active; /* handle to the active window */
  2360. user_handle_t foreground; /* handle to the global foreground window */
  2361. user_handle_t menu_owner; /* handle to the menu owner */
  2362. user_handle_t move_size; /* handle to the moving/resizing window */
  2363. user_handle_t caret; /* handle to the caret window */
  2364. user_handle_t cursor; /* handle to the cursor */
  2365. int show_count; /* cursor show count */
  2366. rectangle_t rect; /* caret rectangle */
  2367. @END
  2368. /* Get the time of the last input event */
  2369. @REQ(get_last_input_time)
  2370. @REPLY
  2371. unsigned int time;
  2372. @END
  2373. /* Retrieve queue keyboard state for current thread or global async state */
  2374. @REQ(get_key_state)
  2375. int async; /* whether to query the async state */
  2376. int key; /* optional key code or -1 */
  2377. @REPLY
  2378. unsigned char state; /* state of specified key */
  2379. VARARG(keystate,bytes); /* state array for all the keys */
  2380. @END
  2381. /* Set queue keyboard state for current thread */
  2382. @REQ(set_key_state)
  2383. int async; /* whether to change the async state too */
  2384. VARARG(keystate,bytes); /* state array for all the keys */
  2385. @END
  2386. /* Set the system foreground window */
  2387. @REQ(set_foreground_window)
  2388. user_handle_t handle; /* handle to the foreground window */
  2389. @REPLY
  2390. user_handle_t previous; /* handle to the previous foreground window */
  2391. int send_msg_old; /* whether we have to send a msg to the old window */
  2392. int send_msg_new; /* whether we have to send a msg to the new window */
  2393. @END
  2394. /* Set the current thread focus window */
  2395. @REQ(set_focus_window)
  2396. user_handle_t handle; /* handle to the focus window */
  2397. @REPLY
  2398. user_handle_t previous; /* handle to the previous focus window */
  2399. @END
  2400. /* Set the current thread active window */
  2401. @REQ(set_active_window)
  2402. user_handle_t handle; /* handle to the active window */
  2403. @REPLY
  2404. user_handle_t previous; /* handle to the previous active window */
  2405. @END
  2406. /* Set the current thread capture window */
  2407. @REQ(set_capture_window)
  2408. user_handle_t handle; /* handle to the capture window */
  2409. unsigned int flags; /* capture flags (see below) */
  2410. @REPLY
  2411. user_handle_t previous; /* handle to the previous capture window */
  2412. user_handle_t full_handle; /* full 32-bit handle of new capture window */
  2413. @END
  2414. #define CAPTURE_MENU 0x01 /* capture is for a menu */
  2415. #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
  2416. /* Set the current thread caret window */
  2417. @REQ(set_caret_window)
  2418. user_handle_t handle; /* handle to the caret window */
  2419. int width; /* caret width */
  2420. int height; /* caret height */
  2421. @REPLY
  2422. user_handle_t previous; /* handle to the previous caret window */
  2423. rectangle_t old_rect; /* previous caret rectangle */
  2424. int old_hide; /* previous hide count */
  2425. int old_state; /* previous caret state (1=on, 0=off) */
  2426. @END
  2427. /* Set the current thread caret information */
  2428. @REQ(set_caret_info)
  2429. unsigned int flags; /* caret flags (see below) */
  2430. user_handle_t handle; /* handle to the caret window */
  2431. int x; /* caret x position */
  2432. int y; /* caret y position */
  2433. int hide; /* increment for hide count (can be negative to show it) */
  2434. int state; /* caret state (see below) */
  2435. @REPLY
  2436. user_handle_t full_handle; /* handle to the current caret window */
  2437. rectangle_t old_rect; /* previous caret rectangle */
  2438. int old_hide; /* previous hide count */
  2439. int old_state; /* previous caret state (1=on, 0=off) */
  2440. @END
  2441. #define SET_CARET_POS 0x01 /* set the caret position from x,y */
  2442. #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
  2443. #define SET_CARET_STATE 0x04 /* set the caret on/off state */
  2444. enum caret_state
  2445. {
  2446. CARET_STATE_OFF, /* off */
  2447. CARET_STATE_ON, /* on */
  2448. CARET_STATE_TOGGLE, /* toggle current state */
  2449. CARET_STATE_ON_IF_MOVED /* on if the position differs, unchanged otherwise */
  2450. };
  2451. /* Set a window hook */
  2452. @REQ(set_hook)
  2453. int id; /* id of the hook */
  2454. process_id_t pid; /* id of process to set the hook into */
  2455. thread_id_t tid; /* id of thread to set the hook into */
  2456. int event_min;
  2457. int event_max;
  2458. client_ptr_t proc; /* hook procedure */
  2459. int flags;
  2460. int unicode; /* is it a unicode hook? */
  2461. VARARG(module,unicode_str); /* module name */
  2462. @REPLY
  2463. user_handle_t handle; /* handle to the hook */
  2464. unsigned int active_hooks; /* active hooks bitmap */
  2465. @END
  2466. /* Remove a window hook */
  2467. @REQ(remove_hook)
  2468. user_handle_t handle; /* handle to the hook */
  2469. client_ptr_t proc; /* hook procedure if handle is 0 */
  2470. int id; /* id of the hook if handle is 0 */
  2471. @REPLY
  2472. unsigned int active_hooks; /* active hooks bitmap */
  2473. @END
  2474. /* Start calling a hook chain */
  2475. @REQ(start_hook_chain)
  2476. int id; /* id of the hook */
  2477. int event; /* signalled event */
  2478. user_handle_t window; /* handle to the event window */
  2479. int object_id; /* object id for out of context winevent */
  2480. int child_id; /* child id for out of context winevent */
  2481. @REPLY
  2482. user_handle_t handle; /* handle to the next hook */
  2483. process_id_t pid; /* process id for low-level keyboard/mouse hooks */
  2484. thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
  2485. int unicode; /* is it a unicode hook? */
  2486. client_ptr_t proc; /* hook procedure */
  2487. unsigned int active_hooks; /* active hooks bitmap */
  2488. VARARG(module,unicode_str); /* module name */
  2489. @END
  2490. /* Finished calling a hook chain */
  2491. @REQ(finish_hook_chain)
  2492. int id; /* id of the hook */
  2493. @END
  2494. /* Get the hook information */
  2495. @REQ(get_hook_info)
  2496. user_handle_t handle; /* handle to the current hook */
  2497. int get_next; /* do we want info about current or next hook? */
  2498. int event; /* signalled event */
  2499. user_handle_t window; /* handle to the event window */
  2500. int object_id; /* object id for out of context winevent */
  2501. int child_id; /* child id for out of context winevent */
  2502. @REPLY
  2503. user_handle_t handle; /* handle to the hook */
  2504. int id; /* id of the hook */
  2505. process_id_t pid; /* process id for low-level keyboard/mouse hooks */
  2506. thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
  2507. client_ptr_t proc; /* hook procedure */
  2508. int unicode; /* is it a unicode hook? */
  2509. VARARG(module,unicode_str); /* module name */
  2510. @END
  2511. /* Create a window class */
  2512. @REQ(create_class)
  2513. int local; /* is it a local class? */
  2514. atom_t atom; /* class atom */
  2515. unsigned int style; /* class style */
  2516. mod_handle_t instance; /* module instance */
  2517. int extra; /* number of extra class bytes */
  2518. int win_extra; /* number of window extra bytes */
  2519. client_ptr_t client_ptr; /* pointer to class in client address space */
  2520. data_size_t name_offset; /* base class name offset for specified atom */
  2521. VARARG(name,unicode_str); /* class name */
  2522. @REPLY
  2523. atom_t atom; /* resulting class atom */
  2524. @END
  2525. /* Destroy a window class */
  2526. @REQ(destroy_class)
  2527. atom_t atom; /* class atom */
  2528. mod_handle_t instance; /* module instance */
  2529. VARARG(name,unicode_str); /* class name */
  2530. @REPLY
  2531. client_ptr_t client_ptr; /* pointer to class in client address space */
  2532. @END
  2533. /* Set some information in a class */
  2534. @REQ(set_class_info)
  2535. user_handle_t window; /* handle to the window */
  2536. unsigned int flags; /* flags for info to set (see below) */
  2537. atom_t atom; /* class atom */
  2538. unsigned int style; /* class style */
  2539. int win_extra; /* number of window extra bytes */
  2540. mod_handle_t instance; /* module instance */
  2541. int extra_offset; /* offset to set in extra bytes */
  2542. data_size_t extra_size; /* size to set in extra bytes */
  2543. lparam_t extra_value; /* value to set in extra bytes */
  2544. @REPLY
  2545. atom_t old_atom; /* previous class atom */
  2546. atom_t base_atom; /* base class atom */
  2547. mod_handle_t old_instance; /* previous module instance */
  2548. lparam_t old_extra_value; /* old value in extra bytes */
  2549. unsigned int old_style; /* previous class style */
  2550. int old_extra; /* previous number of class extra bytes */
  2551. int old_win_extra; /* previous number of window extra bytes */
  2552. @END
  2553. #define SET_CLASS_ATOM 0x0001
  2554. #define SET_CLASS_STYLE 0x0002
  2555. #define SET_CLASS_WINEXTRA 0x0004
  2556. #define SET_CLASS_INSTANCE 0x0008
  2557. #define SET_CLASS_EXTRA 0x0010
  2558. /* Open the clipboard */
  2559. @REQ(open_clipboard)
  2560. user_handle_t window; /* clipboard window */
  2561. @REPLY
  2562. user_handle_t owner; /* current clipboard owner */
  2563. @END
  2564. /* Close the clipboard */
  2565. @REQ(close_clipboard)
  2566. @REPLY
  2567. user_handle_t viewer; /* first clipboard viewer */
  2568. user_handle_t owner; /* current clipboard owner */
  2569. @END
  2570. /* Empty the clipboard and grab ownership */
  2571. @REQ(empty_clipboard)
  2572. @END
  2573. /* Add a data format to the clipboard */
  2574. @REQ(set_clipboard_data)
  2575. unsigned int format; /* clipboard format of the data */
  2576. unsigned int lcid; /* locale id to use for synthesizing text formats */
  2577. VARARG(data,bytes); /* data contents */
  2578. @REPLY
  2579. unsigned int seqno; /* sequence number for the set data */
  2580. @END
  2581. /* Fetch a data format from the clipboard */
  2582. @REQ(get_clipboard_data)
  2583. unsigned int format; /* clipboard format of the data */
  2584. int render; /* will we try to render it if missing? */
  2585. int cached; /* do we already have it in the client-side cache? */
  2586. unsigned int seqno; /* sequence number for the data in the cache */
  2587. @REPLY
  2588. unsigned int from; /* for synthesized data, format to generate it from */
  2589. user_handle_t owner; /* clipboard owner for delayed-rendered formats */
  2590. unsigned int seqno; /* sequence number for the originally set data */
  2591. data_size_t total; /* total data size */
  2592. VARARG(data,bytes); /* data contents */
  2593. @END
  2594. /* Retrieve a list of available formats */
  2595. @REQ(get_clipboard_formats)
  2596. unsigned int format; /* specific format to query, return all if 0 */
  2597. @REPLY
  2598. unsigned int count; /* count of available formats */
  2599. VARARG(formats,uints); /* array of available formats */
  2600. @END
  2601. /* Retrieve the next available format */
  2602. @REQ(enum_clipboard_formats)
  2603. unsigned int previous; /* previous format, or first if 0 */
  2604. @REPLY
  2605. unsigned int format; /* next format */
  2606. @END
  2607. /* Release ownership of the clipboard */
  2608. @REQ(release_clipboard)
  2609. user_handle_t owner; /* clipboard owner to release */
  2610. @REPLY
  2611. user_handle_t viewer; /* first clipboard viewer */
  2612. user_handle_t owner; /* current clipboard owner */
  2613. @END
  2614. /* Get clipboard information */
  2615. @REQ(get_clipboard_info)
  2616. @REPLY
  2617. user_handle_t window; /* clipboard window */
  2618. user_handle_t owner; /* clipboard owner */
  2619. user_handle_t viewer; /* clipboard viewer */
  2620. unsigned int seqno; /* current sequence number */
  2621. @END
  2622. /* Set the clipboard viewer window */
  2623. @REQ(set_clipboard_viewer)
  2624. user_handle_t viewer; /* clipboard viewer */
  2625. user_handle_t previous; /* if non-zero, check that this was the previous viewer */
  2626. @REPLY
  2627. user_handle_t old_viewer; /* previous clipboard viewer */
  2628. user_handle_t owner; /* clipboard owner */
  2629. @END
  2630. /* Add a clipboard listener window */
  2631. @REQ(add_clipboard_listener)
  2632. user_handle_t window; /* clipboard listener window */
  2633. @END
  2634. /* Remove a clipboard listener window */
  2635. @REQ(remove_clipboard_listener)
  2636. user_handle_t window; /* clipboard listener window */
  2637. @END
  2638. /* Open a security token */
  2639. @REQ(open_token)
  2640. obj_handle_t handle; /* handle to the thread or process */
  2641. unsigned int access; /* access rights to the new token */
  2642. unsigned int attributes;/* object attributes */
  2643. unsigned int flags; /* flags (see below) */
  2644. @REPLY
  2645. obj_handle_t token; /* handle to the token */
  2646. @END
  2647. #define OPEN_TOKEN_THREAD 1
  2648. #define OPEN_TOKEN_AS_SELF 2
  2649. /* Set/get the global windows */
  2650. @REQ(set_global_windows)
  2651. unsigned int flags; /* flags for fields to set (see below) */
  2652. user_handle_t shell_window; /* handle to the new shell window */
  2653. user_handle_t shell_listview; /* handle to the new shell listview window */
  2654. user_handle_t progman_window; /* handle to the new program manager window */
  2655. user_handle_t taskman_window; /* handle to the new task manager window */
  2656. @REPLY
  2657. user_handle_t old_shell_window; /* handle to the shell window */
  2658. user_handle_t old_shell_listview; /* handle to the shell listview window */
  2659. user_handle_t old_progman_window; /* handle to the new program manager window */
  2660. user_handle_t old_taskman_window; /* handle to the new task manager window */
  2661. @END
  2662. #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
  2663. #define SET_GLOBAL_PROGMAN_WINDOW 0x02
  2664. #define SET_GLOBAL_TASKMAN_WINDOW 0x04
  2665. /* Adjust the privileges held by a token */
  2666. @REQ(adjust_token_privileges)
  2667. obj_handle_t handle; /* handle to the token */
  2668. int disable_all; /* disable all privileges? */
  2669. int get_modified_state; /* get modified privileges? */
  2670. VARARG(privileges,luid_attr); /* privileges to enable/disable/remove */
  2671. @REPLY
  2672. unsigned int len; /* total length in bytes required to store token privileges */
  2673. VARARG(privileges,luid_attr); /* modified privileges */
  2674. @END
  2675. /* Retrieves the set of privileges held by or available to a token */
  2676. @REQ(get_token_privileges)
  2677. obj_handle_t handle; /* handle to the token */
  2678. @REPLY
  2679. unsigned int len; /* total length in bytes required to store token privileges */
  2680. VARARG(privileges,luid_attr); /* privileges held by or available to a token */
  2681. @END
  2682. /* Check the token has the required privileges */
  2683. @REQ(check_token_privileges)
  2684. obj_handle_t handle; /* handle to the token */
  2685. int all_required; /* are all the privileges required for the check to succeed? */
  2686. VARARG(privileges,luid_attr); /* privileges to check */
  2687. @REPLY
  2688. int has_privileges; /* does the token have the required privileges? */
  2689. VARARG(privileges,luid_attr); /* privileges held by or available to a token */
  2690. @END
  2691. @REQ(duplicate_token)
  2692. obj_handle_t handle; /* handle to the token to duplicate */
  2693. unsigned int access; /* access rights to the new token */
  2694. int primary; /* is the new token to be a primary one? */
  2695. int impersonation_level; /* impersonation level of the new token */
  2696. VARARG(objattr,object_attributes); /* object attributes */
  2697. @REPLY
  2698. obj_handle_t new_handle; /* duplicated handle */
  2699. @END
  2700. @REQ(filter_token)
  2701. obj_handle_t handle; /* handle to the token to duplicate */
  2702. unsigned int flags; /* flags */
  2703. data_size_t privileges_size; /* size of privileges */
  2704. VARARG(privileges,luid_attr,privileges_size); /* privileges to remove from new token */
  2705. VARARG(disable_sids,sid); /* array of groups to remove from new token */
  2706. @REPLY
  2707. obj_handle_t new_handle; /* filtered handle */
  2708. @END
  2709. @REQ(access_check)
  2710. obj_handle_t handle; /* handle to the token */
  2711. unsigned int desired_access; /* desired access to the object */
  2712. generic_map_t mapping; /* mapping to specific rights */
  2713. VARARG(sd,security_descriptor); /* security descriptor to check */
  2714. @REPLY
  2715. unsigned int access_granted; /* access rights actually granted */
  2716. unsigned int access_status; /* was access granted? */
  2717. unsigned int privileges_len; /* length needed to store privileges */
  2718. VARARG(privileges,luid_attr); /* privileges used during access check */
  2719. @END
  2720. @REQ(get_token_sid)
  2721. obj_handle_t handle; /* handle to the token */
  2722. unsigned int which_sid; /* which SID to retrieve from the token */
  2723. @REPLY
  2724. data_size_t sid_len; /* length needed to store sid */
  2725. VARARG(sid,sid); /* the sid specified by which_sid from the token */
  2726. @END
  2727. @REQ(get_token_groups)
  2728. obj_handle_t handle; /* handle to the token */
  2729. unsigned int attr_mask; /* mask for wanted attributes */
  2730. @REPLY
  2731. data_size_t attr_len; /* length needed to store attrs */
  2732. data_size_t sid_len; /* length needed to store sids */
  2733. VARARG(attrs,uints,attr_len); /* group attributes */
  2734. VARARG(sids,sids); /* group sids */
  2735. @END
  2736. @REQ(get_token_default_dacl)
  2737. obj_handle_t handle; /* handle to the token */
  2738. @REPLY
  2739. data_size_t acl_len; /* length needed to store access control list */
  2740. VARARG(acl,acl); /* access control list */
  2741. @END
  2742. @REQ(set_token_default_dacl)
  2743. obj_handle_t handle; /* handle to the token */
  2744. VARARG(acl,acl); /* default dacl to set */
  2745. @END
  2746. @REQ(set_security_object)
  2747. obj_handle_t handle; /* handle to the object */
  2748. unsigned int security_info; /* which parts of security descriptor to set */
  2749. VARARG(sd,security_descriptor); /* security descriptor to set */
  2750. @END
  2751. @REQ(get_security_object)
  2752. obj_handle_t handle; /* handle to the object */
  2753. unsigned int security_info; /* which parts of security descriptor to get */
  2754. @REPLY
  2755. unsigned int sd_len; /* buffer size needed for sd */
  2756. VARARG(sd,security_descriptor); /* retrieved security descriptor */
  2757. @END
  2758. struct handle_info
  2759. {
  2760. process_id_t owner;
  2761. obj_handle_t handle;
  2762. unsigned int access;
  2763. unsigned int attributes;
  2764. unsigned int type;
  2765. };
  2766. /* Return a list of all opened handles */
  2767. @REQ(get_system_handles)
  2768. @REPLY
  2769. unsigned int count; /* number of handles */
  2770. VARARG(data,handle_infos); /* array of handle_infos */
  2771. @END
  2772. /* Create a mailslot */
  2773. @REQ(create_mailslot)
  2774. unsigned int access; /* wanted access rights */
  2775. timeout_t read_timeout;
  2776. unsigned int max_msgsize;
  2777. VARARG(objattr,object_attributes); /* object attributes */
  2778. @REPLY
  2779. obj_handle_t handle; /* handle to the mailslot */
  2780. @END
  2781. /* Set mailslot information */
  2782. @REQ(set_mailslot_info)
  2783. obj_handle_t handle; /* handle to the mailslot */
  2784. timeout_t read_timeout;
  2785. unsigned int flags;
  2786. @REPLY
  2787. timeout_t read_timeout;
  2788. unsigned int max_msgsize;
  2789. @END
  2790. #define MAILSLOT_SET_READ_TIMEOUT 1
  2791. /* Create a directory object */
  2792. @REQ(create_directory)
  2793. unsigned int access; /* access flags */
  2794. VARARG(objattr,object_attributes); /* object attributes */
  2795. @REPLY
  2796. obj_handle_t handle; /* handle to the directory */
  2797. @END
  2798. /* Open a directory object */
  2799. @REQ(open_directory)
  2800. unsigned int access; /* access flags */
  2801. unsigned int attributes; /* object attributes */
  2802. obj_handle_t rootdir; /* root directory */
  2803. VARARG(directory_name,unicode_str); /* Directory name */
  2804. @REPLY
  2805. obj_handle_t handle; /* handle to the directory */
  2806. @END
  2807. /* Get a directory entry by index */
  2808. @REQ(get_directory_entry)
  2809. obj_handle_t handle; /* handle to the directory */
  2810. unsigned int index; /* entry index */
  2811. @REPLY
  2812. data_size_t total_len; /* total length needed for strings */
  2813. data_size_t name_len; /* length of the entry name in bytes */
  2814. VARARG(name,unicode_str,name_len); /* entry name */
  2815. VARARG(type,unicode_str); /* entry type */
  2816. @END
  2817. /* Create a symbolic link object */
  2818. @REQ(create_symlink)
  2819. unsigned int access; /* access flags */
  2820. VARARG(objattr,object_attributes); /* object attributes */
  2821. VARARG(target_name,unicode_str); /* target name */
  2822. @REPLY
  2823. obj_handle_t handle; /* handle to the symlink */
  2824. @END
  2825. /* Open a symbolic link object */
  2826. @REQ(open_symlink)
  2827. unsigned int access; /* access flags */
  2828. unsigned int attributes; /* object attributes */
  2829. obj_handle_t rootdir; /* root directory */
  2830. VARARG(name,unicode_str); /* symlink name */
  2831. @REPLY
  2832. obj_handle_t handle; /* handle to the symlink */
  2833. @END
  2834. /* Query a symbolic link object */
  2835. @REQ(query_symlink)
  2836. obj_handle_t handle; /* handle to the symlink */
  2837. @REPLY
  2838. data_size_t total; /* total needed size for name */
  2839. VARARG(target_name,unicode_str); /* target name */
  2840. @END
  2841. /* Query basic object information */
  2842. @REQ(get_object_info)
  2843. obj_handle_t handle; /* handle to the object */
  2844. @REPLY
  2845. unsigned int access; /* granted access mask */
  2846. unsigned int ref_count; /* object ref count */
  2847. unsigned int handle_count; /* object handle count */
  2848. @END
  2849. /* Query the full name of an object */
  2850. @REQ(get_object_name)
  2851. obj_handle_t handle; /* handle to the object */
  2852. @REPLY
  2853. data_size_t total; /* total needed size for name */
  2854. VARARG(name,unicode_str); /* object name */
  2855. @END
  2856. /* Query object type name information */
  2857. @REQ(get_object_type)
  2858. obj_handle_t handle; /* handle to the object */
  2859. @REPLY
  2860. VARARG(info,object_type_info); /* type information */
  2861. @END
  2862. /* Query type information for all types */
  2863. @REQ(get_object_types)
  2864. @REPLY
  2865. int count; /* total count of object types */
  2866. VARARG(info,object_types_info); /* type information */
  2867. @END
  2868. /* Allocate a locally-unique identifier */
  2869. @REQ(allocate_locally_unique_id)
  2870. @REPLY
  2871. struct luid luid;
  2872. @END
  2873. /* Create a device manager */
  2874. @REQ(create_device_manager)
  2875. unsigned int access; /* wanted access rights */
  2876. unsigned int attributes; /* object attributes */
  2877. @REPLY
  2878. obj_handle_t handle; /* handle to the device */
  2879. @END
  2880. /* Create a device */
  2881. @REQ(create_device)
  2882. obj_handle_t rootdir; /* root directory */
  2883. client_ptr_t user_ptr; /* opaque ptr for use by client */
  2884. obj_handle_t manager; /* device manager */
  2885. VARARG(name,unicode_str); /* object name */
  2886. @END
  2887. /* Delete a device */
  2888. @REQ(delete_device)
  2889. obj_handle_t manager; /* handle to the device manager */
  2890. client_ptr_t device; /* pointer to the device */
  2891. @END
  2892. /* Retrieve the next pending device irp request */
  2893. @REQ(get_next_device_request)
  2894. obj_handle_t manager; /* handle to the device manager */
  2895. obj_handle_t prev; /* handle to the previous irp */
  2896. unsigned int status; /* status of the previous irp */
  2897. client_ptr_t user_ptr; /* user pointer of the previous irp */
  2898. int pending; /* was the previous irp marked pending? */
  2899. unsigned int iosb_status; /* IOSB status of the previous irp */
  2900. data_size_t result; /* IOSB result of the previous irp */
  2901. VARARG(data,bytes); /* output data of the previous irp */
  2902. @REPLY
  2903. irp_params_t params; /* irp parameters */
  2904. obj_handle_t next; /* handle to the next irp */
  2905. thread_id_t client_tid; /* tid of thread calling irp */
  2906. client_ptr_t client_thread; /* pointer to thread object of calling irp */
  2907. data_size_t in_size; /* total needed input size */
  2908. VARARG(next_data,bytes); /* input data of the next irp */
  2909. @END
  2910. /* Get kernel pointer from server object */
  2911. @REQ(get_kernel_object_ptr)
  2912. obj_handle_t manager; /* handle to the device manager */
  2913. obj_handle_t handle; /* object handle */
  2914. @REPLY
  2915. client_ptr_t user_ptr; /* kernel object pointer */
  2916. @END
  2917. /* Associate kernel pointer with server object */
  2918. @REQ(set_kernel_object_ptr)
  2919. obj_handle_t manager; /* handle to the device manager */
  2920. obj_handle_t handle; /* object handle */
  2921. client_ptr_t user_ptr; /* kernel object pointer */
  2922. @END
  2923. /* Grab server object reference from kernel object pointer */
  2924. @REQ(grab_kernel_object)
  2925. obj_handle_t manager; /* handle to the device manager */
  2926. client_ptr_t user_ptr; /* kernel object pointer */
  2927. @END
  2928. /* Release server object reference from kernel object pointer */
  2929. @REQ(release_kernel_object)
  2930. obj_handle_t manager; /* handle to the device manager */
  2931. client_ptr_t user_ptr; /* kernel object pointer */
  2932. @END
  2933. /* Get handle from kernel object pointer */
  2934. @REQ(get_kernel_object_handle)
  2935. obj_handle_t manager; /* handle to the device manager */
  2936. client_ptr_t user_ptr; /* kernel object pointer */
  2937. unsigned int access; /* wanted access rights */
  2938. @REPLY
  2939. obj_handle_t handle; /* kernel object handle */
  2940. @END
  2941. /* Make the current process a system process */
  2942. @REQ(make_process_system)
  2943. obj_handle_t handle; /* handle to the process */
  2944. @REPLY
  2945. obj_handle_t event; /* event signaled when all user processes have exited */
  2946. @END
  2947. /* Get detailed fixed-size information about a token */
  2948. @REQ(get_token_info)
  2949. obj_handle_t handle; /* handle to the object */
  2950. @REPLY
  2951. struct luid token_id; /* locally-unique identifier of the token */
  2952. struct luid modified_id; /* locally-unique identifier of the modified version of the token */
  2953. unsigned int session_id; /* token session id */
  2954. int primary; /* is the token primary or impersonation? */
  2955. int impersonation_level; /* level of impersonation */
  2956. int elevation; /* elevation type */
  2957. int group_count; /* the number of groups the token is a member of */
  2958. int privilege_count; /* the number of privileges the token has */
  2959. @END
  2960. /* Create a token which is an elevation counterpart to this token */
  2961. @REQ(create_linked_token)
  2962. obj_handle_t handle; /* handle to the token */
  2963. @REPLY
  2964. obj_handle_t linked; /* handle to the linked token */
  2965. @END
  2966. /* Create I/O completion port */
  2967. @REQ(create_completion)
  2968. unsigned int access; /* desired access to a port */
  2969. unsigned int concurrent; /* max number of concurrent active threads */
  2970. VARARG(objattr,object_attributes); /* object attributes */
  2971. @REPLY
  2972. obj_handle_t handle; /* port handle */
  2973. @END
  2974. /* Open I/O completion port */
  2975. @REQ(open_completion)
  2976. unsigned int access; /* desired access to a port */
  2977. unsigned int attributes; /* object attributes */
  2978. obj_handle_t rootdir; /* root directory */
  2979. VARARG(filename,unicode_str); /* port name */
  2980. @REPLY
  2981. obj_handle_t handle; /* port handle */
  2982. @END
  2983. /* add completion to completion port */
  2984. @REQ(add_completion)
  2985. obj_handle_t handle; /* port handle */
  2986. apc_param_t ckey; /* completion key */
  2987. apc_param_t cvalue; /* completion value */
  2988. apc_param_t information; /* IO_STATUS_BLOCK Information */
  2989. unsigned int status; /* completion result */
  2990. @END
  2991. /* get completion from completion port queue */
  2992. @REQ(remove_completion)
  2993. obj_handle_t handle; /* port handle */
  2994. @REPLY
  2995. apc_param_t ckey; /* completion key */
  2996. apc_param_t cvalue; /* completion value */
  2997. apc_param_t information; /* IO_STATUS_BLOCK Information */
  2998. unsigned int status; /* completion result */
  2999. @END
  3000. /* get completion queue depth */
  3001. @REQ(query_completion)
  3002. obj_handle_t handle; /* port handle */
  3003. @REPLY
  3004. unsigned int depth; /* completion queue depth */
  3005. @END
  3006. /* associate object with completion port */
  3007. @REQ(set_completion_info)
  3008. obj_handle_t handle; /* object handle */
  3009. apc_param_t ckey; /* completion key */
  3010. obj_handle_t chandle; /* port handle */
  3011. @END
  3012. /* check for associated completion and push msg */
  3013. @REQ(add_fd_completion)
  3014. obj_handle_t handle; /* async' object */
  3015. apc_param_t cvalue; /* completion value */
  3016. apc_param_t information; /* IO_STATUS_BLOCK Information */
  3017. unsigned int status; /* completion status */
  3018. int async; /* completion is an async result */
  3019. @END
  3020. /* set fd completion information */
  3021. @REQ(set_fd_completion_mode)
  3022. obj_handle_t handle; /* handle to a file or directory */
  3023. unsigned int flags; /* completion notification flags */
  3024. @END
  3025. /* set fd disposition information */
  3026. @REQ(set_fd_disp_info)
  3027. obj_handle_t handle; /* handle to a file or directory */
  3028. int unlink; /* whether to unlink file on close */
  3029. @END
  3030. /* set fd name information */
  3031. @REQ(set_fd_name_info)
  3032. obj_handle_t handle; /* handle to a file or directory */
  3033. obj_handle_t rootdir; /* root directory */
  3034. data_size_t namelen; /* length of NT name in bytes */
  3035. int link; /* link instead of renaming */
  3036. int replace; /* replace an existing file? */
  3037. VARARG(name,unicode_str,namelen); /* NT name */
  3038. VARARG(filename,string); /* new file name */
  3039. @END
  3040. /* set fd eof information */
  3041. @REQ(set_fd_eof_info)
  3042. obj_handle_t handle; /* handle to a file or directory */
  3043. file_pos_t eof; /* offset of eof of file */
  3044. @END
  3045. /* Retrieve layered info for a window */
  3046. @REQ(get_window_layered_info)
  3047. user_handle_t handle; /* handle to the window */
  3048. @REPLY
  3049. unsigned int color_key; /* color key */
  3050. unsigned int alpha; /* alpha (0..255) */
  3051. unsigned int flags; /* LWA_* flags */
  3052. @END
  3053. /* Set layered info for a window */
  3054. @REQ(set_window_layered_info)
  3055. user_handle_t handle; /* handle to the window */
  3056. unsigned int color_key; /* color key */
  3057. unsigned int alpha; /* alpha (0..255) */
  3058. unsigned int flags; /* LWA_* flags */
  3059. @END
  3060. /* Allocate an arbitrary user handle */
  3061. @REQ(alloc_user_handle)
  3062. @REPLY
  3063. user_handle_t handle; /* allocated handle */
  3064. @END
  3065. /* Free an arbitrary user handle */
  3066. @REQ(free_user_handle)
  3067. user_handle_t handle; /* handle to free*/
  3068. @END
  3069. /* Set/get the current cursor */
  3070. @REQ(set_cursor)
  3071. unsigned int flags; /* flags for fields to set (see below) */
  3072. user_handle_t handle; /* handle to the cursor */
  3073. int show_count; /* show count increment/decrement */
  3074. int x; /* cursor position */
  3075. int y;
  3076. rectangle_t clip; /* cursor clip rectangle */
  3077. unsigned int clip_msg; /* message to post on cursor clip changes */
  3078. @REPLY
  3079. user_handle_t prev_handle; /* previous handle */
  3080. int prev_count; /* previous show count */
  3081. int prev_x; /* previous position */
  3082. int prev_y;
  3083. int new_x; /* new position */
  3084. int new_y;
  3085. rectangle_t new_clip; /* new clip rectangle */
  3086. unsigned int last_change; /* time of last position change */
  3087. @END
  3088. #define SET_CURSOR_HANDLE 0x01
  3089. #define SET_CURSOR_COUNT 0x02
  3090. #define SET_CURSOR_POS 0x04
  3091. #define SET_CURSOR_CLIP 0x08
  3092. #define SET_CURSOR_NOCLIP 0x10
  3093. /* Get the history of the 64 last cursor positions */
  3094. @REQ(get_cursor_history)
  3095. @REPLY
  3096. VARARG(history,cursor_positions);
  3097. @END
  3098. /* Batch read rawinput message data */
  3099. @REQ(get_rawinput_buffer)
  3100. data_size_t rawinput_size; /* size of RAWINPUT structure */
  3101. data_size_t buffer_size; /* size of output buffer */
  3102. @REPLY
  3103. data_size_t next_size; /* minimum size to get next message data */
  3104. unsigned int count;
  3105. VARARG(data,bytes);
  3106. @END
  3107. /* Modify the list of registered rawinput devices */
  3108. @REQ(update_rawinput_devices)
  3109. VARARG(devices,rawinput_devices);
  3110. @END
  3111. /* Retrieve the list of registered rawinput devices */
  3112. @REQ(get_rawinput_devices)
  3113. @REPLY
  3114. unsigned int device_count;
  3115. VARARG(devices,rawinput_devices);
  3116. @END
  3117. /* Create a new job object */
  3118. @REQ(create_job)
  3119. unsigned int access; /* wanted access rights */
  3120. VARARG(objattr,object_attributes); /* object attributes */
  3121. @REPLY
  3122. obj_handle_t handle; /* handle to the job */
  3123. @END
  3124. /* Open a job object */
  3125. @REQ(open_job)
  3126. unsigned int access; /* wanted access rights */
  3127. unsigned int attributes; /* object attributes */
  3128. obj_handle_t rootdir; /* root directory */
  3129. VARARG(name,unicode_str); /* object name */
  3130. @REPLY
  3131. obj_handle_t handle; /* handle to the job */
  3132. @END
  3133. /* Assign a job object to a process */
  3134. @REQ(assign_job)
  3135. obj_handle_t job; /* handle to the job */
  3136. obj_handle_t process; /* handle to the process */
  3137. @END
  3138. /* Check if a process is associated with a job */
  3139. @REQ(process_in_job)
  3140. obj_handle_t job; /* handle to the job */
  3141. obj_handle_t process; /* handle to the process */
  3142. @END
  3143. /* Set limit flags on a job */
  3144. @REQ(set_job_limits)
  3145. obj_handle_t handle; /* handle to the job */
  3146. unsigned int limit_flags; /* new limit flags */
  3147. @END
  3148. /* Set new completion port for a job */
  3149. @REQ(set_job_completion_port)
  3150. obj_handle_t job; /* handle to the job */
  3151. obj_handle_t port; /* handle to the completion port */
  3152. client_ptr_t key; /* key to send with completion messages */
  3153. @END
  3154. /* Retrieve information about a job */
  3155. @REQ(get_job_info)
  3156. obj_handle_t handle; /* handle to the job */
  3157. @REPLY
  3158. int total_processes; /* total count of processes */
  3159. int active_processes; /* count of running processes */
  3160. VARARG(pids,uints); /* list of active pids */
  3161. @END
  3162. /* Terminate all processes associated with the job */
  3163. @REQ(terminate_job)
  3164. obj_handle_t handle; /* handle to the job */
  3165. int status; /* process exit code */
  3166. @END
  3167. /* Suspend a process */
  3168. @REQ(suspend_process)
  3169. obj_handle_t handle; /* process handle */
  3170. @END
  3171. /* Resume a process */
  3172. @REQ(resume_process)
  3173. obj_handle_t handle; /* process handle */
  3174. @END
  3175. /* Iterate thread list for process */
  3176. @REQ(get_next_thread)
  3177. obj_handle_t process; /* process handle */
  3178. obj_handle_t last; /* thread handle to start with */
  3179. unsigned int access; /* desired access for returned handle */
  3180. unsigned int attributes; /* returned handle attributes */
  3181. unsigned int flags; /* controls iteration direction */
  3182. @REPLY
  3183. obj_handle_t handle; /* next thread handle */
  3184. @END