protocol.def 125 KB

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