protocol.def 127 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799
  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. @REPLY
  2730. data_size_t attr_len; /* length needed to store attrs */
  2731. data_size_t sid_len; /* length needed to store sids */
  2732. VARARG(attrs,uints,attr_len); /* group attributes */
  2733. VARARG(sids,sids); /* group sids */
  2734. @END
  2735. @REQ(get_token_default_dacl)
  2736. obj_handle_t handle; /* handle to the token */
  2737. @REPLY
  2738. data_size_t acl_len; /* length needed to store access control list */
  2739. VARARG(acl,acl); /* access control list */
  2740. @END
  2741. @REQ(set_token_default_dacl)
  2742. obj_handle_t handle; /* handle to the token */
  2743. VARARG(acl,acl); /* default dacl to set */
  2744. @END
  2745. @REQ(set_security_object)
  2746. obj_handle_t handle; /* handle to the object */
  2747. unsigned int security_info; /* which parts of security descriptor to set */
  2748. VARARG(sd,security_descriptor); /* security descriptor to set */
  2749. @END
  2750. @REQ(get_security_object)
  2751. obj_handle_t handle; /* handle to the object */
  2752. unsigned int security_info; /* which parts of security descriptor to get */
  2753. @REPLY
  2754. unsigned int sd_len; /* buffer size needed for sd */
  2755. VARARG(sd,security_descriptor); /* retrieved security descriptor */
  2756. @END
  2757. struct handle_info
  2758. {
  2759. process_id_t owner;
  2760. obj_handle_t handle;
  2761. unsigned int access;
  2762. unsigned int attributes;
  2763. unsigned int type;
  2764. };
  2765. /* Return a list of all opened handles */
  2766. @REQ(get_system_handles)
  2767. @REPLY
  2768. unsigned int count; /* number of handles */
  2769. VARARG(data,handle_infos); /* array of handle_infos */
  2770. @END
  2771. /* Create a mailslot */
  2772. @REQ(create_mailslot)
  2773. unsigned int access; /* wanted access rights */
  2774. timeout_t read_timeout;
  2775. unsigned int max_msgsize;
  2776. VARARG(objattr,object_attributes); /* object attributes */
  2777. @REPLY
  2778. obj_handle_t handle; /* handle to the mailslot */
  2779. @END
  2780. /* Set mailslot information */
  2781. @REQ(set_mailslot_info)
  2782. obj_handle_t handle; /* handle to the mailslot */
  2783. timeout_t read_timeout;
  2784. unsigned int flags;
  2785. @REPLY
  2786. timeout_t read_timeout;
  2787. unsigned int max_msgsize;
  2788. @END
  2789. #define MAILSLOT_SET_READ_TIMEOUT 1
  2790. /* Create a directory object */
  2791. @REQ(create_directory)
  2792. unsigned int access; /* access flags */
  2793. VARARG(objattr,object_attributes); /* object attributes */
  2794. @REPLY
  2795. obj_handle_t handle; /* handle to the directory */
  2796. @END
  2797. /* Open a directory object */
  2798. @REQ(open_directory)
  2799. unsigned int access; /* access flags */
  2800. unsigned int attributes; /* object attributes */
  2801. obj_handle_t rootdir; /* root directory */
  2802. VARARG(directory_name,unicode_str); /* Directory name */
  2803. @REPLY
  2804. obj_handle_t handle; /* handle to the directory */
  2805. @END
  2806. /* Get a directory entry by index */
  2807. @REQ(get_directory_entry)
  2808. obj_handle_t handle; /* handle to the directory */
  2809. unsigned int index; /* entry index */
  2810. @REPLY
  2811. data_size_t total_len; /* total length needed for strings */
  2812. data_size_t name_len; /* length of the entry name in bytes */
  2813. VARARG(name,unicode_str,name_len); /* entry name */
  2814. VARARG(type,unicode_str); /* entry type */
  2815. @END
  2816. /* Create a symbolic link object */
  2817. @REQ(create_symlink)
  2818. unsigned int access; /* access flags */
  2819. VARARG(objattr,object_attributes); /* object attributes */
  2820. VARARG(target_name,unicode_str); /* target name */
  2821. @REPLY
  2822. obj_handle_t handle; /* handle to the symlink */
  2823. @END
  2824. /* Open a symbolic link object */
  2825. @REQ(open_symlink)
  2826. unsigned int access; /* access flags */
  2827. unsigned int attributes; /* object attributes */
  2828. obj_handle_t rootdir; /* root directory */
  2829. VARARG(name,unicode_str); /* symlink name */
  2830. @REPLY
  2831. obj_handle_t handle; /* handle to the symlink */
  2832. @END
  2833. /* Query a symbolic link object */
  2834. @REQ(query_symlink)
  2835. obj_handle_t handle; /* handle to the symlink */
  2836. @REPLY
  2837. data_size_t total; /* total needed size for name */
  2838. VARARG(target_name,unicode_str); /* target name */
  2839. @END
  2840. /* Query basic object information */
  2841. @REQ(get_object_info)
  2842. obj_handle_t handle; /* handle to the object */
  2843. @REPLY
  2844. unsigned int access; /* granted access mask */
  2845. unsigned int ref_count; /* object ref count */
  2846. unsigned int handle_count; /* object handle count */
  2847. @END
  2848. /* Query the full name of an object */
  2849. @REQ(get_object_name)
  2850. obj_handle_t handle; /* handle to the object */
  2851. @REPLY
  2852. data_size_t total; /* total needed size for name */
  2853. VARARG(name,unicode_str); /* object name */
  2854. @END
  2855. /* Query object type name information */
  2856. @REQ(get_object_type)
  2857. obj_handle_t handle; /* handle to the object */
  2858. @REPLY
  2859. VARARG(info,object_type_info); /* type information */
  2860. @END
  2861. /* Query type information for all types */
  2862. @REQ(get_object_types)
  2863. @REPLY
  2864. int count; /* total count of object types */
  2865. VARARG(info,object_types_info); /* type information */
  2866. @END
  2867. /* Allocate a locally-unique identifier */
  2868. @REQ(allocate_locally_unique_id)
  2869. @REPLY
  2870. struct luid luid;
  2871. @END
  2872. /* Create a device manager */
  2873. @REQ(create_device_manager)
  2874. unsigned int access; /* wanted access rights */
  2875. unsigned int attributes; /* object attributes */
  2876. @REPLY
  2877. obj_handle_t handle; /* handle to the device */
  2878. @END
  2879. /* Create a device */
  2880. @REQ(create_device)
  2881. obj_handle_t rootdir; /* root directory */
  2882. client_ptr_t user_ptr; /* opaque ptr for use by client */
  2883. obj_handle_t manager; /* device manager */
  2884. VARARG(name,unicode_str); /* object name */
  2885. @END
  2886. /* Delete a device */
  2887. @REQ(delete_device)
  2888. obj_handle_t manager; /* handle to the device manager */
  2889. client_ptr_t device; /* pointer to the device */
  2890. @END
  2891. /* Retrieve the next pending device irp request */
  2892. @REQ(get_next_device_request)
  2893. obj_handle_t manager; /* handle to the device manager */
  2894. obj_handle_t prev; /* handle to the previous irp */
  2895. unsigned int status; /* status of the previous irp */
  2896. client_ptr_t user_ptr; /* user pointer of the previous irp */
  2897. int pending; /* was the previous irp marked pending? */
  2898. unsigned int iosb_status; /* IOSB status of the previous irp */
  2899. data_size_t result; /* IOSB result of the previous irp */
  2900. VARARG(data,bytes); /* output data of the previous irp */
  2901. @REPLY
  2902. irp_params_t params; /* irp parameters */
  2903. obj_handle_t next; /* handle to the next irp */
  2904. thread_id_t client_tid; /* tid of thread calling irp */
  2905. client_ptr_t client_thread; /* pointer to thread object of calling irp */
  2906. data_size_t in_size; /* total needed input size */
  2907. VARARG(next_data,bytes); /* input data of the next irp */
  2908. @END
  2909. /* Get kernel pointer from server object */
  2910. @REQ(get_kernel_object_ptr)
  2911. obj_handle_t manager; /* handle to the device manager */
  2912. obj_handle_t handle; /* object handle */
  2913. @REPLY
  2914. client_ptr_t user_ptr; /* kernel object pointer */
  2915. @END
  2916. /* Associate kernel pointer with server object */
  2917. @REQ(set_kernel_object_ptr)
  2918. obj_handle_t manager; /* handle to the device manager */
  2919. obj_handle_t handle; /* object handle */
  2920. client_ptr_t user_ptr; /* kernel object pointer */
  2921. @END
  2922. /* Grab server object reference from kernel object pointer */
  2923. @REQ(grab_kernel_object)
  2924. obj_handle_t manager; /* handle to the device manager */
  2925. client_ptr_t user_ptr; /* kernel object pointer */
  2926. @END
  2927. /* Release server object reference from kernel object pointer */
  2928. @REQ(release_kernel_object)
  2929. obj_handle_t manager; /* handle to the device manager */
  2930. client_ptr_t user_ptr; /* kernel object pointer */
  2931. @END
  2932. /* Get handle from kernel object pointer */
  2933. @REQ(get_kernel_object_handle)
  2934. obj_handle_t manager; /* handle to the device manager */
  2935. client_ptr_t user_ptr; /* kernel object pointer */
  2936. unsigned int access; /* wanted access rights */
  2937. @REPLY
  2938. obj_handle_t handle; /* kernel object handle */
  2939. @END
  2940. /* Make the current process a system process */
  2941. @REQ(make_process_system)
  2942. obj_handle_t handle; /* handle to the process */
  2943. @REPLY
  2944. obj_handle_t event; /* event signaled when all user processes have exited */
  2945. @END
  2946. /* Get detailed fixed-size information about a token */
  2947. @REQ(get_token_info)
  2948. obj_handle_t handle; /* handle to the object */
  2949. @REPLY
  2950. struct luid token_id; /* locally-unique identifier of the token */
  2951. struct luid modified_id; /* locally-unique identifier of the modified version of the token */
  2952. unsigned int session_id; /* token session id */
  2953. int primary; /* is the token primary or impersonation? */
  2954. int impersonation_level; /* level of impersonation */
  2955. int elevation; /* elevation type */
  2956. int group_count; /* the number of groups the token is a member of */
  2957. int privilege_count; /* the number of privileges the token has */
  2958. @END
  2959. /* Create a token which is an elevation counterpart to this token */
  2960. @REQ(create_linked_token)
  2961. obj_handle_t handle; /* handle to the token */
  2962. @REPLY
  2963. obj_handle_t linked; /* handle to the linked token */
  2964. @END
  2965. /* Create I/O completion port */
  2966. @REQ(create_completion)
  2967. unsigned int access; /* desired access to a port */
  2968. unsigned int concurrent; /* max number of concurrent active threads */
  2969. VARARG(objattr,object_attributes); /* object attributes */
  2970. @REPLY
  2971. obj_handle_t handle; /* port handle */
  2972. @END
  2973. /* Open I/O completion port */
  2974. @REQ(open_completion)
  2975. unsigned int access; /* desired access to a port */
  2976. unsigned int attributes; /* object attributes */
  2977. obj_handle_t rootdir; /* root directory */
  2978. VARARG(filename,unicode_str); /* port name */
  2979. @REPLY
  2980. obj_handle_t handle; /* port handle */
  2981. @END
  2982. /* add completion to completion port */
  2983. @REQ(add_completion)
  2984. obj_handle_t handle; /* port handle */
  2985. apc_param_t ckey; /* completion key */
  2986. apc_param_t cvalue; /* completion value */
  2987. apc_param_t information; /* IO_STATUS_BLOCK Information */
  2988. unsigned int status; /* completion result */
  2989. @END
  2990. /* get completion from completion port queue */
  2991. @REQ(remove_completion)
  2992. obj_handle_t handle; /* port handle */
  2993. @REPLY
  2994. apc_param_t ckey; /* completion key */
  2995. apc_param_t cvalue; /* completion value */
  2996. apc_param_t information; /* IO_STATUS_BLOCK Information */
  2997. unsigned int status; /* completion result */
  2998. @END
  2999. /* get completion queue depth */
  3000. @REQ(query_completion)
  3001. obj_handle_t handle; /* port handle */
  3002. @REPLY
  3003. unsigned int depth; /* completion queue depth */
  3004. @END
  3005. /* associate object with completion port */
  3006. @REQ(set_completion_info)
  3007. obj_handle_t handle; /* object handle */
  3008. apc_param_t ckey; /* completion key */
  3009. obj_handle_t chandle; /* port handle */
  3010. @END
  3011. /* check for associated completion and push msg */
  3012. @REQ(add_fd_completion)
  3013. obj_handle_t handle; /* async' object */
  3014. apc_param_t cvalue; /* completion value */
  3015. apc_param_t information; /* IO_STATUS_BLOCK Information */
  3016. unsigned int status; /* completion status */
  3017. int async; /* completion is an async result */
  3018. @END
  3019. /* set fd completion information */
  3020. @REQ(set_fd_completion_mode)
  3021. obj_handle_t handle; /* handle to a file or directory */
  3022. unsigned int flags; /* completion notification flags */
  3023. @END
  3024. /* set fd disposition information */
  3025. @REQ(set_fd_disp_info)
  3026. obj_handle_t handle; /* handle to a file or directory */
  3027. int unlink; /* whether to unlink file on close */
  3028. @END
  3029. /* set fd name information */
  3030. @REQ(set_fd_name_info)
  3031. obj_handle_t handle; /* handle to a file or directory */
  3032. obj_handle_t rootdir; /* root directory */
  3033. data_size_t namelen; /* length of NT name in bytes */
  3034. int link; /* link instead of renaming */
  3035. int replace; /* replace an existing file? */
  3036. VARARG(name,unicode_str,namelen); /* NT name */
  3037. VARARG(filename,string); /* new file name */
  3038. @END
  3039. /* set fd eof information */
  3040. @REQ(set_fd_eof_info)
  3041. obj_handle_t handle; /* handle to a file or directory */
  3042. file_pos_t eof; /* offset of eof of file */
  3043. @END
  3044. /* Retrieve layered info for a window */
  3045. @REQ(get_window_layered_info)
  3046. user_handle_t handle; /* handle to the window */
  3047. @REPLY
  3048. unsigned int color_key; /* color key */
  3049. unsigned int alpha; /* alpha (0..255) */
  3050. unsigned int flags; /* LWA_* flags */
  3051. @END
  3052. /* Set layered info for a window */
  3053. @REQ(set_window_layered_info)
  3054. user_handle_t handle; /* handle to the window */
  3055. unsigned int color_key; /* color key */
  3056. unsigned int alpha; /* alpha (0..255) */
  3057. unsigned int flags; /* LWA_* flags */
  3058. @END
  3059. /* Allocate an arbitrary user handle */
  3060. @REQ(alloc_user_handle)
  3061. @REPLY
  3062. user_handle_t handle; /* allocated handle */
  3063. @END
  3064. /* Free an arbitrary user handle */
  3065. @REQ(free_user_handle)
  3066. user_handle_t handle; /* handle to free*/
  3067. @END
  3068. /* Set/get the current cursor */
  3069. @REQ(set_cursor)
  3070. unsigned int flags; /* flags for fields to set (see below) */
  3071. user_handle_t handle; /* handle to the cursor */
  3072. int show_count; /* show count increment/decrement */
  3073. int x; /* cursor position */
  3074. int y;
  3075. rectangle_t clip; /* cursor clip rectangle */
  3076. unsigned int clip_msg; /* message to post on cursor clip changes */
  3077. @REPLY
  3078. user_handle_t prev_handle; /* previous handle */
  3079. int prev_count; /* previous show count */
  3080. int prev_x; /* previous position */
  3081. int prev_y;
  3082. int new_x; /* new position */
  3083. int new_y;
  3084. rectangle_t new_clip; /* new clip rectangle */
  3085. unsigned int last_change; /* time of last position change */
  3086. @END
  3087. #define SET_CURSOR_HANDLE 0x01
  3088. #define SET_CURSOR_COUNT 0x02
  3089. #define SET_CURSOR_POS 0x04
  3090. #define SET_CURSOR_CLIP 0x08
  3091. #define SET_CURSOR_NOCLIP 0x10
  3092. /* Get the history of the 64 last cursor positions */
  3093. @REQ(get_cursor_history)
  3094. @REPLY
  3095. VARARG(history,cursor_positions);
  3096. @END
  3097. /* Batch read rawinput message data */
  3098. @REQ(get_rawinput_buffer)
  3099. data_size_t rawinput_size; /* size of RAWINPUT structure */
  3100. data_size_t buffer_size; /* size of output buffer */
  3101. @REPLY
  3102. data_size_t next_size; /* minimum size to get next message data */
  3103. unsigned int count;
  3104. VARARG(data,bytes);
  3105. @END
  3106. /* Modify the list of registered rawinput devices */
  3107. @REQ(update_rawinput_devices)
  3108. VARARG(devices,rawinput_devices);
  3109. @END
  3110. /* Retrieve the list of registered rawinput devices */
  3111. @REQ(get_rawinput_devices)
  3112. @REPLY
  3113. unsigned int device_count;
  3114. VARARG(devices,rawinput_devices);
  3115. @END
  3116. /* Create a new job object */
  3117. @REQ(create_job)
  3118. unsigned int access; /* wanted access rights */
  3119. VARARG(objattr,object_attributes); /* object attributes */
  3120. @REPLY
  3121. obj_handle_t handle; /* handle to the job */
  3122. @END
  3123. /* Open a job object */
  3124. @REQ(open_job)
  3125. unsigned int access; /* wanted access rights */
  3126. unsigned int attributes; /* object attributes */
  3127. obj_handle_t rootdir; /* root directory */
  3128. VARARG(name,unicode_str); /* object name */
  3129. @REPLY
  3130. obj_handle_t handle; /* handle to the job */
  3131. @END
  3132. /* Assign a job object to a process */
  3133. @REQ(assign_job)
  3134. obj_handle_t job; /* handle to the job */
  3135. obj_handle_t process; /* handle to the process */
  3136. @END
  3137. /* Check if a process is associated with a job */
  3138. @REQ(process_in_job)
  3139. obj_handle_t job; /* handle to the job */
  3140. obj_handle_t process; /* handle to the process */
  3141. @END
  3142. /* Set limit flags on a job */
  3143. @REQ(set_job_limits)
  3144. obj_handle_t handle; /* handle to the job */
  3145. unsigned int limit_flags; /* new limit flags */
  3146. @END
  3147. /* Set new completion port for a job */
  3148. @REQ(set_job_completion_port)
  3149. obj_handle_t job; /* handle to the job */
  3150. obj_handle_t port; /* handle to the completion port */
  3151. client_ptr_t key; /* key to send with completion messages */
  3152. @END
  3153. /* Retrieve information about a job */
  3154. @REQ(get_job_info)
  3155. obj_handle_t handle; /* handle to the job */
  3156. @REPLY
  3157. int total_processes; /* total count of processes */
  3158. int active_processes; /* count of running processes */
  3159. VARARG(pids,uints); /* list of active pids */
  3160. @END
  3161. /* Terminate all processes associated with the job */
  3162. @REQ(terminate_job)
  3163. obj_handle_t handle; /* handle to the job */
  3164. int status; /* process exit code */
  3165. @END
  3166. /* Suspend a process */
  3167. @REQ(suspend_process)
  3168. obj_handle_t handle; /* process handle */
  3169. @END
  3170. /* Resume a process */
  3171. @REQ(resume_process)
  3172. obj_handle_t handle; /* process handle */
  3173. @END
  3174. /* Iterate thread list for process */
  3175. @REQ(get_next_thread)
  3176. obj_handle_t process; /* process handle */
  3177. obj_handle_t last; /* thread handle to start with */
  3178. unsigned int access; /* desired access for returned handle */
  3179. unsigned int attributes; /* returned handle attributes */
  3180. unsigned int flags; /* controls iteration direction */
  3181. @REPLY
  3182. obj_handle_t handle; /* next thread handle */
  3183. @END
  3184. enum fast_sync_type
  3185. {
  3186. FAST_SYNC_SEMAPHORE = 1,
  3187. FAST_SYNC_MUTEX,
  3188. FAST_SYNC_AUTO_EVENT,
  3189. FAST_SYNC_MANUAL_EVENT,
  3190. FAST_SYNC_AUTO_SERVER,
  3191. FAST_SYNC_MANUAL_SERVER,
  3192. FAST_SYNC_QUEUE,
  3193. };
  3194. /* Obtain a handle to the fast synchronization device object */
  3195. @REQ(get_linux_sync_device)
  3196. @REPLY
  3197. obj_handle_t handle; /* handle to the device */
  3198. @END
  3199. /* Get the fast synchronization object associated with the given handle */
  3200. @REQ(get_linux_sync_obj)
  3201. obj_handle_t handle; /* handle to the object */
  3202. @REPLY
  3203. obj_handle_t handle; /* handle to the fast synchronization object */
  3204. int obj; /* linux object */
  3205. int type; /* object type */
  3206. unsigned int access; /* handle access rights */
  3207. @END
  3208. /* Begin a client-side wait on a message queue */
  3209. @REQ(fast_select_queue)
  3210. obj_handle_t handle; /* handle to the queue */
  3211. @END
  3212. /* End a client-side wait on a message queue */
  3213. @REQ(fast_unselect_queue)
  3214. obj_handle_t handle; /* handle to the queue */
  3215. int signaled; /* was the queue signaled? */
  3216. @END
  3217. /* Get an event handle to be used for thread alerts with fast synchronization */
  3218. @REQ(get_fast_alert_event)
  3219. @REPLY
  3220. obj_handle_t handle; /* handle to the event */
  3221. @END