protocol.def 132 KB

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