123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281 |
- /* -*- C -*-
- *
- * Wine server protocol definition
- *
- * Copyright (C) 2001 Alexandre Julliard
- *
- * This file is used by tools/make_requests to build the
- * protocol structures in include/wine/server_protocol.h
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
- @HEADER /* start of C declarations */
- #include <stdarg.h>
- #include <stdlib.h>
- #include <time.h>
- #include <windef.h>
- #include <winbase.h>
- typedef unsigned int obj_handle_t;
- typedef unsigned int user_handle_t;
- typedef unsigned int atom_t;
- typedef unsigned int process_id_t;
- typedef unsigned int thread_id_t;
- typedef unsigned int data_size_t;
- typedef unsigned int ioctl_code_t;
- typedef unsigned __int64 lparam_t;
- typedef unsigned __int64 apc_param_t;
- typedef unsigned __int64 mem_size_t;
- typedef unsigned __int64 file_pos_t;
- typedef unsigned __int64 client_ptr_t;
- typedef unsigned __int64 affinity_t;
- typedef client_ptr_t mod_handle_t;
- struct request_header
- {
- int req; /* request code */
- data_size_t request_size; /* request variable part size */
- data_size_t reply_size; /* reply variable part maximum size */
- };
- struct reply_header
- {
- unsigned int error; /* error result */
- data_size_t reply_size; /* reply variable part size */
- };
- /* placeholder structure for the maximum allowed request size */
- /* this is used to construct the generic_request union */
- struct request_max_size
- {
- int pad[18]; /* the max request size is 16 ints */
- };
- #define FIRST_USER_HANDLE 0x0020 /* first possible value for low word of user handle */
- #define LAST_USER_HANDLE 0xffef /* last possible value for low word of user handle */
- typedef struct
- {
- unsigned int last_input_time; /* last input time */
- } shmglobal_t;
- typedef struct
- {
- int queue_bits; /* queue wake bits */
- user_handle_t input_focus; /* focus window */
- user_handle_t input_capture; /* capture window */
- user_handle_t input_active; /* active window */
- } shmlocal_t;
- /* debug event data */
- typedef union
- {
- int code; /* event code */
- struct
- {
- int code; /* EXCEPTION_DEBUG_EVENT */
- int first; /* first chance exception? */
- unsigned int exc_code; /* exception code */
- unsigned int flags; /* exception flags */
- client_ptr_t record; /* exception record */
- client_ptr_t address; /* exception address */
- int nb_params; /* number of parameters */
- int __pad;
- client_ptr_t params[15]; /* parameters */
- } exception;
- struct
- {
- int code; /* CREATE_THREAD_DEBUG_EVENT */
- obj_handle_t handle; /* handle to the new thread */
- client_ptr_t teb; /* thread teb (in debugged process address space) */
- client_ptr_t start; /* thread startup routine */
- } create_thread;
- struct
- {
- int code; /* CREATE_PROCESS_DEBUG_EVENT */
- obj_handle_t file; /* handle to the process exe file */
- obj_handle_t process; /* handle to the new process */
- obj_handle_t thread; /* handle to the new thread */
- mod_handle_t base; /* base of executable image */
- int dbg_offset; /* offset of debug info in file */
- int dbg_size; /* size of debug info */
- client_ptr_t teb; /* thread teb (in debugged process address space) */
- client_ptr_t start; /* thread startup routine */
- client_ptr_t name; /* image name (optional) */
- int unicode; /* is it Unicode? */
- } create_process;
- struct
- {
- int code; /* EXIT_THREAD_DEBUG_EVENT/EXIT_PROCESS_DEBUG_EVENT */
- int exit_code; /* thread or process exit code */
- } exit;
- struct
- {
- int code; /* LOAD_DLL_DEBUG_EVENT */
- obj_handle_t handle; /* file handle for the dll */
- mod_handle_t base; /* base address of the dll */
- int dbg_offset; /* offset of debug info in file */
- int dbg_size; /* size of debug info */
- client_ptr_t name; /* image name (optional) */
- int unicode; /* is it Unicode? */
- } load_dll;
- struct
- {
- int code; /* UNLOAD_DLL_DEBUG_EVENT */
- int __pad;
- mod_handle_t base; /* base address of the dll */
- } unload_dll;
- } debug_event_t;
- /* supported CPU types */
- enum cpu_type
- {
- CPU_x86, CPU_x86_64, CPU_POWERPC, CPU_ARM, CPU_ARM64
- };
- typedef int client_cpu_t;
- /* context data */
- typedef struct
- {
- client_cpu_t cpu; /* cpu type */
- unsigned int flags; /* SERVER_CTX_* flags */
- union
- {
- struct { unsigned int eip, ebp, esp, eflags, cs, ss; } i386_regs;
- struct { unsigned __int64 rip, rbp, rsp;
- unsigned int cs, ss, flags, __pad; } x86_64_regs;
- struct { unsigned int iar, msr, ctr, lr, dar, dsisr, trap, __pad; } powerpc_regs;
- struct { unsigned int sp, lr, pc, cpsr; } arm_regs;
- struct { unsigned __int64 sp, pc, pstate; } arm64_regs;
- } ctl; /* selected by SERVER_CTX_CONTROL */
- union
- {
- struct { unsigned int eax, ebx, ecx, edx, esi, edi; } i386_regs;
- struct { unsigned __int64 rax,rbx, rcx, rdx, rsi, rdi,
- r8, r9, r10, r11, r12, r13, r14, r15; } x86_64_regs;
- struct { unsigned int gpr[32], cr, xer; } powerpc_regs;
- struct { unsigned int r[13]; } arm_regs;
- struct { unsigned __int64 x[31]; } arm64_regs;
- } integer; /* selected by SERVER_CTX_INTEGER */
- union
- {
- struct { unsigned int ds, es, fs, gs; } i386_regs;
- struct { unsigned int ds, es, fs, gs; } x86_64_regs;
- } seg; /* selected by SERVER_CTX_SEGMENTS */
- union
- {
- struct { unsigned int ctrl, status, tag, err_off, err_sel, data_off, data_sel, cr0npx;
- unsigned char regs[80]; } i386_regs;
- struct { struct { unsigned __int64 low, high; } fpregs[32]; } x86_64_regs;
- struct { double fpr[32], fpscr; } powerpc_regs;
- struct { unsigned __int64 d[32]; unsigned int fpscr; } arm_regs;
- struct { struct { unsigned __int64 low, high; } q[32]; unsigned int fpcr, fpsr; } arm64_regs;
- } fp; /* selected by SERVER_CTX_FLOATING_POINT */
- union
- {
- struct { unsigned int dr0, dr1, dr2, dr3, dr6, dr7; } i386_regs;
- struct { unsigned __int64 dr0, dr1, dr2, dr3, dr6, dr7; } x86_64_regs;
- struct { unsigned int dr[8]; } powerpc_regs;
- struct { unsigned int bvr[8], bcr[8], wvr[1], wcr[1]; } arm_regs;
- struct { unsigned __int64 bvr[8], wvr[2]; unsigned int bcr[8], wcr[2]; } arm64_regs;
- } debug; /* selected by SERVER_CTX_DEBUG_REGISTERS */
- union
- {
- unsigned char i386_regs[512];
- } ext; /* selected by SERVER_CTX_EXTENDED_REGISTERS */
- } context_t;
- #define SERVER_CTX_CONTROL 0x01
- #define SERVER_CTX_INTEGER 0x02
- #define SERVER_CTX_SEGMENTS 0x04
- #define SERVER_CTX_FLOATING_POINT 0x08
- #define SERVER_CTX_DEBUG_REGISTERS 0x10
- #define SERVER_CTX_EXTENDED_REGISTERS 0x20
- /* structure used in sending an fd from client to server */
- struct send_fd
- {
- thread_id_t tid; /* thread id */
- int fd; /* file descriptor on client-side */
- };
- /* structure sent by the server on the wait fifo */
- struct wake_up_reply
- {
- client_ptr_t cookie; /* magic cookie that was passed in select_request */
- int signaled; /* wait result */
- int __pad;
- };
- /* NT-style timeout, in 100ns units, negative means relative timeout */
- typedef __int64 timeout_t;
- #define TIMEOUT_INFINITE (((timeout_t)0x7fffffff) << 32 | 0xffffffff)
- /* structure for process startup info */
- typedef struct
- {
- unsigned int debug_flags;
- unsigned int console_flags;
- obj_handle_t console;
- obj_handle_t hstdin;
- obj_handle_t hstdout;
- obj_handle_t hstderr;
- unsigned int x;
- unsigned int y;
- unsigned int xsize;
- unsigned int ysize;
- unsigned int xchars;
- unsigned int ychars;
- unsigned int attribute;
- unsigned int flags;
- unsigned int show;
- data_size_t curdir_len;
- data_size_t dllpath_len;
- data_size_t imagepath_len;
- data_size_t cmdline_len;
- data_size_t title_len;
- data_size_t desktop_len;
- data_size_t shellinfo_len;
- data_size_t runtime_len;
- /* VARARG(curdir,unicode_str,curdir_len); */
- /* VARARG(dllpath,unicode_str,dllpath_len); */
- /* VARARG(imagepath,unicode_str,imagepath_len); */
- /* VARARG(cmdline,unicode_str,cmdline_len); */
- /* VARARG(title,unicode_str,title_len); */
- /* VARARG(desktop,unicode_str,desktop_len); */
- /* VARARG(shellinfo,unicode_str,shellinfo_len); */
- /* VARARG(runtime,unicode_str,runtime_len); */
- } startup_info_t;
- /* structure returned in the list of window properties */
- typedef struct
- {
- atom_t atom; /* property atom */
- int string; /* was atom a string originally? */
- lparam_t data; /* data stored in property */
- } property_data_t;
- /* structure to specify window rectangles */
- typedef struct
- {
- int left;
- int top;
- int right;
- int bottom;
- } rectangle_t;
- /* structure for parameters of async I/O calls */
- typedef struct
- {
- obj_handle_t handle; /* object to perform I/O on */
- obj_handle_t event; /* event to signal when done */
- client_ptr_t iosb; /* I/O status block in client addr space */
- client_ptr_t user; /* opaque user data containing callback pointer and async-specific data */
- client_ptr_t apc; /* user APC to call */
- apc_param_t apc_context; /* user APC context or completion value */
- } async_data_t;
- /* structures for extra message data */
- struct hw_msg_source
- {
- unsigned int device; /* source device (IMDT_* values) */
- unsigned int origin; /* source origin (IMO_* values) */
- };
- struct hardware_msg_data
- {
- lparam_t info; /* extra info */
- unsigned int hw_id; /* unique id */
- unsigned int flags; /* hook flags */
- struct hw_msg_source source; /* message source */
- union
- {
- int type;
- struct
- {
- int type; /* RIM_TYPEKEYBOARD */
- unsigned int message; /* message generated by this rawinput event */
- unsigned short vkey; /* virtual key code */
- unsigned short scan; /* scan code */
- } kbd;
- struct
- {
- int type; /* RIM_TYPEMOUSE */
- int x; /* x coordinate */
- int y; /* y coordinate */
- unsigned int data; /* mouse data */
- } mouse;
- struct
- {
- int type; /* RIM_TYPEHID */
- obj_handle_t device;
- unsigned int length; /* HID report length */
- /* followed by length bytes of HID report data */
- } hid;
- } rawinput;
- };
- struct callback_msg_data
- {
- client_ptr_t callback; /* callback function */
- lparam_t data; /* user data for callback */
- lparam_t result; /* message result */
- };
- struct winevent_msg_data
- {
- user_handle_t hook; /* hook handle */
- thread_id_t tid; /* thread id */
- client_ptr_t hook_proc; /* hook proc address */
- /* followed by module name if any */
- };
- typedef union
- {
- int type;
- struct
- {
- int type; /* HW_INPUT_KEYBOARD */
- unsigned short vkey; /* virtual key code */
- unsigned short scan; /* scan code */
- unsigned int flags; /* event flags */
- unsigned int time; /* event time */
- lparam_t info; /* extra info */
- } kbd;
- struct
- {
- int type; /* HW_INPUT_MOUSE */
- int x; /* coordinates */
- int y;
- unsigned int data; /* mouse data */
- unsigned int flags; /* event flags */
- unsigned int time; /* event time */
- lparam_t info; /* extra info */
- } mouse;
- struct
- {
- int type; /* HW_INPUT_HARDWARE */
- unsigned int msg; /* message code */
- lparam_t lparam; /* message param */
- } hw;
- struct
- {
- int type; /* HW_INPUT_HID */
- obj_handle_t device;
- unsigned char usage_page;
- unsigned char usage;
- unsigned int length;
- } hid;
- } hw_input_t;
- #define HW_INPUT_MOUSE 0
- #define HW_INPUT_KEYBOARD 1
- #define HW_INPUT_HARDWARE 2
- #define HW_INPUT_HID 3
- typedef union
- {
- unsigned char bytes[1]; /* raw data for sent messages */
- struct hardware_msg_data hardware;
- struct callback_msg_data callback;
- struct winevent_msg_data winevent;
- } message_data_t;
- /* structure for console char/attribute info */
- typedef struct
- {
- WCHAR ch;
- unsigned short attr;
- } char_info_t;
- /* structure returned in filesystem events */
- struct filesystem_event
- {
- int action;
- data_size_t len;
- char name[1];
- };
- typedef struct
- {
- unsigned int low_part;
- int high_part;
- } luid_t;
- #define MAX_ACL_LEN 65535
- struct security_descriptor
- {
- unsigned int control; /* SE_ flags */
- data_size_t owner_len;
- data_size_t group_len;
- data_size_t sacl_len;
- data_size_t dacl_len;
- /* VARARG(owner,SID); */
- /* VARARG(group,SID); */
- /* VARARG(sacl,ACL); */
- /* VARARG(dacl,ACL); */
- };
- struct object_attributes
- {
- obj_handle_t rootdir; /* root directory */
- unsigned int attributes; /* object attributes */
- data_size_t sd_len; /* length of security_descriptor data. may be 0 */
- data_size_t name_len; /* length of the name string. may be 0 */
- /* VARARG(sd,security_descriptor); */
- /* VARARG(name,unicode_str); */
- };
- struct token_groups
- {
- unsigned int count;
- /* unsigned int attributes[count]; */
- /* VARARG(sids,SID); */
- };
- enum select_op
- {
- SELECT_NONE,
- SELECT_WAIT,
- SELECT_WAIT_ALL,
- SELECT_SIGNAL_AND_WAIT,
- SELECT_KEYED_EVENT_WAIT,
- SELECT_KEYED_EVENT_RELEASE
- };
- typedef union
- {
- enum select_op op;
- struct
- {
- enum select_op op; /* SELECT_WAIT or SELECT_WAIT_ALL */
- obj_handle_t handles[MAXIMUM_WAIT_OBJECTS];
- } wait;
- struct
- {
- enum select_op op; /* SELECT_SIGNAL_AND_WAIT */
- obj_handle_t wait;
- obj_handle_t signal; /* must be last in the structure so we can remove it on retries */
- } signal_and_wait;
- struct
- {
- enum select_op op; /* SELECT_KEYED_EVENT_WAIT or SELECT_KEYED_EVENT_RELEASE */
- obj_handle_t handle;
- client_ptr_t key;
- } keyed_event;
- } select_op_t;
- enum apc_type
- {
- APC_NONE,
- APC_USER,
- APC_TIMER,
- APC_ASYNC_IO,
- APC_VIRTUAL_ALLOC,
- APC_VIRTUAL_FREE,
- APC_VIRTUAL_QUERY,
- APC_VIRTUAL_PROTECT,
- APC_VIRTUAL_FLUSH,
- APC_VIRTUAL_LOCK,
- APC_VIRTUAL_UNLOCK,
- APC_MAP_VIEW,
- APC_UNMAP_VIEW,
- APC_CREATE_THREAD,
- APC_BREAK_PROCESS,
- APC_REAL_USER,
- APC_REAL_KERNEL,
- };
- typedef union
- {
- enum apc_type type;
- struct
- {
- enum apc_type type; /* APC_USER */
- int __pad;
- client_ptr_t func; /* void (__stdcall *func)(ULONG_PTR,ULONG_PTR,ULONG_PTR); */
- apc_param_t args[3]; /* arguments for user function */
- } user;
- struct
- {
- enum apc_type type; /* APC_TIMER */
- int __pad;
- client_ptr_t func; /* void (__stdcall *func)(void*, unsigned int, unsigned int); */
- timeout_t time; /* absolute time of expiration */
- client_ptr_t arg; /* user argument */
- } timer;
- struct
- {
- enum apc_type type; /* APC_ASYNC_IO */
- unsigned int status; /* I/O status */
- client_ptr_t user; /* user pointer */
- client_ptr_t sb; /* status block */
- } async_io;
- struct
- {
- enum apc_type type; /* APC_VIRTUAL_ALLOC */
- unsigned int op_type; /* type of operation */
- client_ptr_t addr; /* requested address */
- mem_size_t size; /* allocation size */
- unsigned int zero_bits_64; /* number of zero high bits */
- unsigned int prot; /* memory protection flags */
- } virtual_alloc;
- struct
- {
- enum apc_type type; /* APC_VIRTUAL_FREE */
- unsigned int op_type; /* type of operation */
- client_ptr_t addr; /* requested address */
- mem_size_t size; /* allocation size */
- } virtual_free;
- struct
- {
- enum apc_type type; /* APC_VIRTUAL_QUERY */
- int __pad;
- client_ptr_t addr; /* requested address */
- } virtual_query;
- struct
- {
- enum apc_type type; /* APC_VIRTUAL_PROTECT */
- unsigned int prot; /* new protection flags */
- client_ptr_t addr; /* requested address */
- mem_size_t size; /* requested size */
- } virtual_protect;
- struct
- {
- enum apc_type type; /* APC_VIRTUAL_FLUSH */
- int __pad;
- client_ptr_t addr; /* requested address */
- mem_size_t size; /* requested size */
- } virtual_flush;
- struct
- {
- enum apc_type type; /* APC_VIRTUAL_LOCK */
- int __pad;
- client_ptr_t addr; /* requested address */
- mem_size_t size; /* requested size */
- } virtual_lock;
- struct
- {
- enum apc_type type; /* APC_VIRTUAL_UNLOCK */
- int __pad;
- client_ptr_t addr; /* requested address */
- mem_size_t size; /* requested size */
- } virtual_unlock;
- struct
- {
- enum apc_type type; /* APC_MAP_VIEW */
- obj_handle_t handle; /* mapping handle */
- client_ptr_t addr; /* requested address */
- mem_size_t size; /* allocation size */
- file_pos_t offset; /* file offset */
- unsigned int alloc_type; /* allocation type */
- unsigned short zero_bits_64; /* number of zero high bits */
- unsigned short prot; /* memory protection flags */
- } map_view;
- struct
- {
- enum apc_type type; /* APC_UNMAP_VIEW */
- int __pad;
- client_ptr_t addr; /* view address */
- } unmap_view;
- struct
- {
- enum apc_type type; /* APC_CREATE_THREAD */
- int suspend; /* suspended thread? */
- client_ptr_t func; /* void (__stdcall *func)(void*); start function */
- client_ptr_t arg; /* argument for start function */
- mem_size_t reserve; /* reserve size for thread stack */
- mem_size_t commit; /* commit size for thread stack */
- } create_thread;
- struct
- {
- enum apc_type type; /* APC_REAL_KERNEL && APC_REAL_USER */
- int special_apc;
- } real_apc;
- } apc_call_t;
- typedef union
- {
- enum apc_type type;
- struct
- {
- enum apc_type type; /* APC_ASYNC_IO */
- unsigned int status; /* new status of async operation */
- unsigned int total; /* bytes transferred */
- } async_io;
- struct
- {
- enum apc_type type; /* APC_VIRTUAL_ALLOC */
- unsigned int status; /* status returned by call */
- client_ptr_t addr; /* resulting address */
- mem_size_t size; /* resulting size */
- } virtual_alloc;
- struct
- {
- enum apc_type type; /* APC_VIRTUAL_FREE */
- unsigned int status; /* status returned by call */
- client_ptr_t addr; /* resulting address */
- mem_size_t size; /* resulting size */
- } virtual_free;
- struct
- {
- enum apc_type type; /* APC_VIRTUAL_QUERY */
- unsigned int status; /* status returned by call */
- client_ptr_t base; /* resulting base address */
- client_ptr_t alloc_base;/* resulting allocation base */
- mem_size_t size; /* resulting region size */
- unsigned short state; /* resulting region state */
- unsigned short prot; /* resulting region protection */
- unsigned short alloc_prot;/* resulting allocation protection */
- unsigned short alloc_type;/* resulting region allocation type */
- } virtual_query;
- struct
- {
- enum apc_type type; /* APC_VIRTUAL_PROTECT */
- unsigned int status; /* status returned by call */
- client_ptr_t addr; /* resulting address */
- mem_size_t size; /* resulting size */
- unsigned int prot; /* old protection flags */
- } virtual_protect;
- struct
- {
- enum apc_type type; /* APC_VIRTUAL_FLUSH */
- unsigned int status; /* status returned by call */
- client_ptr_t addr; /* resulting address */
- mem_size_t size; /* resulting size */
- } virtual_flush;
- struct
- {
- enum apc_type type; /* APC_VIRTUAL_LOCK */
- unsigned int status; /* status returned by call */
- client_ptr_t addr; /* resulting address */
- mem_size_t size; /* resulting size */
- } virtual_lock;
- struct
- {
- enum apc_type type; /* APC_VIRTUAL_UNLOCK */
- unsigned int status; /* status returned by call */
- client_ptr_t addr; /* resulting address */
- mem_size_t size; /* resulting size */
- } virtual_unlock;
- struct
- {
- enum apc_type type; /* APC_MAP_VIEW */
- unsigned int status; /* status returned by call */
- client_ptr_t addr; /* resulting address */
- mem_size_t size; /* resulting size */
- } map_view;
- struct
- {
- enum apc_type type; /* APC_MAP_VIEW */
- unsigned int status; /* status returned by call */
- } unmap_view;
- struct
- {
- enum apc_type type; /* APC_CREATE_THREAD */
- unsigned int status; /* status returned by call */
- thread_id_t tid; /* thread id */
- obj_handle_t handle; /* handle to new thread */
- } create_thread;
- struct
- {
- enum apc_type type; /* APC_BREAK_PROCESS */
- unsigned int status; /* status returned by call */
- } break_process;
- } apc_result_t;
- enum irp_type
- {
- IRP_CALL_NONE,
- IRP_CALL_CREATE,
- IRP_CALL_CLOSE,
- IRP_CALL_READ,
- IRP_CALL_WRITE,
- IRP_CALL_FLUSH,
- IRP_CALL_IOCTL,
- IRP_CALL_FREE,
- IRP_CALL_CANCEL
- };
- typedef union
- {
- enum irp_type type; /* irp call type */
- struct
- {
- enum irp_type type; /* IRP_CALL_CREATE */
- unsigned int access; /* access rights */
- unsigned int sharing; /* sharing flags */
- unsigned int options; /* file options */
- client_ptr_t device; /* opaque ptr for the device */
- obj_handle_t file; /* file handle */
- } create;
- struct
- {
- enum irp_type type; /* IRP_CALL_CLOSE */
- int __pad;
- client_ptr_t file; /* opaque ptr for the file object */
- } close;
- struct
- {
- enum irp_type type; /* IRP_CALL_READ */
- unsigned int key; /* driver key */
- data_size_t out_size; /* needed output size */
- int __pad;
- client_ptr_t file; /* opaque ptr for the file object */
- file_pos_t pos; /* file position */
- } read;
- struct
- {
- enum irp_type type; /* IRP_CALL_WRITE */
- unsigned int key; /* driver key */
- client_ptr_t file; /* opaque ptr for the file object */
- file_pos_t pos; /* file position */
- } write;
- struct
- {
- enum irp_type type; /* IRP_CALL_FLUSH */
- int __pad;
- client_ptr_t file; /* opaque ptr for the file object */
- } flush;
- struct
- {
- enum irp_type type; /* IRP_CALL_IOCTL */
- ioctl_code_t code; /* ioctl code */
- client_ptr_t in_buf;
- client_ptr_t out_buf;
- data_size_t out_size; /* needed output size */
- int __pad;
- client_ptr_t file; /* opaque ptr for the file object */
- } ioctl;
- struct
- {
- enum irp_type type; /* IRP_CALL_FREE */
- int __pad;
- client_ptr_t obj; /* opaque ptr for the freed object */
- } free;
- struct
- {
- enum irp_type type; /* IRP_CALL_CANCEL */
- int __pad;
- client_ptr_t irp; /* opaque ptr for canceled irp */
- } cancel;
- } irp_params_t;
- /* information about a PE image mapping, roughly equivalent to SECTION_IMAGE_INFORMATION */
- typedef struct
- {
- client_ptr_t base;
- client_ptr_t entry_point;
- mem_size_t map_size;
- mem_size_t stack_size;
- mem_size_t stack_commit;
- unsigned int zerobits;
- unsigned int subsystem;
- unsigned short subsystem_low;
- unsigned short subsystem_high;
- unsigned int gp;
- unsigned short image_charact;
- unsigned short dll_charact;
- unsigned short machine;
- unsigned char contains_code;
- unsigned char image_flags;
- unsigned int loader_flags;
- unsigned int header_size;
- unsigned int file_size;
- unsigned int checksum;
- client_cpu_t cpu;
- int __pad;
- } pe_image_info_t;
- #define IMAGE_FLAGS_ComPlusNativeReady 0x01
- #define IMAGE_FLAGS_ComPlusILOnly 0x02
- #define IMAGE_FLAGS_ImageDynamicallyRelocated 0x04
- #define IMAGE_FLAGS_ImageMappedFlat 0x08
- #define IMAGE_FLAGS_BaseBelow4gb 0x10
- #define IMAGE_FLAGS_WineBuiltin 0x40
- #define IMAGE_FLAGS_WineFakeDll 0x80
- struct rawinput_device
- {
- unsigned short usage_page;
- unsigned short usage;
- unsigned int flags;
- user_handle_t target;
- };
- /****************************************************************/
- /* Request declarations */
- /* Create a new process from the context of the parent */
- @REQ(new_process)
- obj_handle_t parent_process; /* parent process */
- int inherit_all; /* inherit all handles from parent */
- unsigned int create_flags; /* creation flags */
- int socket_fd; /* file descriptor for process socket */
- obj_handle_t exe_file; /* file handle for main exe */
- unsigned int access; /* access rights for process object */
- client_cpu_t cpu; /* CPU that the new process will use */
- data_size_t info_size; /* size of startup info */
- obj_handle_t token; /* token for the new process */
- VARARG(objattr,object_attributes); /* object attributes */
- VARARG(info,startup_info,info_size); /* startup information */
- VARARG(env,unicode_str); /* environment for new process */
- @REPLY
- obj_handle_t info; /* new process info handle */
- process_id_t pid; /* process id */
- obj_handle_t handle; /* process handle (in the current process) */
- @END
- /* Execute a process, replacing the current one */
- @REQ(exec_process)
- int socket_fd; /* file descriptor for process socket */
- client_cpu_t cpu; /* CPU that the new process will use */
- @END
- /* Retrieve information about a newly started process */
- @REQ(get_new_process_info)
- obj_handle_t info; /* info handle returned from new_process_request */
- @REPLY
- int success; /* did the process start successfully? */
- int exit_code; /* process exit code if failed */
- @END
- @REQ(wait_proc_init)
- obj_handle_t process;
- @REPLY
- unsigned int process_state;
- obj_handle_t init_event;
- @END
- #define PROCESS_STARTING 0x0
- #define PROCESS_RUNNING 0x1
- @REQ(wait_thread_init)
- obj_handle_t thread;
- @REPLY
- unsigned int thread_state;
- obj_handle_t init_event;
- @END
- #define THREAD_STARTING 0x0
- #define THREAD_RUNNING 0x1
- /* Create a new thread */
- @REQ(new_thread)
- obj_handle_t process; /* process in which to create thread */
- unsigned int access; /* wanted access rights */
- int suspend; /* new thread should be suspended on creation */
- int request_fd; /* fd for request pipe */
- VARARG(objattr,object_attributes); /* object attributes */
- @REPLY
- thread_id_t tid; /* thread id */
- obj_handle_t handle; /* thread handle (in the current process) */
- @END
- /* Retrieve the new process startup info */
- @REQ(get_startup_info)
- @REPLY
- data_size_t info_size; /* size of startup info */
- VARARG(info,startup_info,info_size); /* startup information */
- VARARG(env,unicode_str); /* environment */
- @END
- /* Signal the end of the process initialization */
- @REQ(init_process_done)
- int gui; /* is it a GUI process? */
- mod_handle_t module; /* main module base address */
- client_ptr_t ldt_copy; /* address of LDT copy (in thread address space) */
- client_ptr_t entry; /* process entry point */
- @REPLY
- int suspend; /* is process suspended? */
- obj_handle_t processed_event;
- @END
- /* Initialize a thread; called from the child after fork()/clone() */
- @REQ(init_thread)
- int unix_pid; /* Unix pid of new thread */
- int unix_tid; /* Unix tid of new thread */
- int debug_level; /* new debug level */
- client_ptr_t teb; /* TEB of new thread (in thread address space) */
- client_ptr_t entry; /* entry point or PEB if initial thread (in thread address space) */
- int reply_fd; /* fd for reply pipe */
- int wait_fd; /* fd for blocking calls pipe */
- client_cpu_t cpu; /* CPU that this thread is running on */
- @REPLY
- process_id_t pid; /* process id of the new thread's process */
- thread_id_t tid; /* thread id of the new thread */
- timeout_t server_start; /* server start time */
- data_size_t info_size; /* total size of startup info */
- int version; /* protocol version */
- unsigned int all_cpus; /* bitset of supported CPUs */
- int suspend; /* is thread suspended? */
- obj_handle_t processed_event;
- @END
- /* Terminate a process */
- @REQ(terminate_process)
- obj_handle_t handle; /* process handle to terminate */
- int exit_code; /* process exit code */
- @REPLY
- int self; /* suicide? */
- @END
- /* Terminate a thread */
- @REQ(terminate_thread)
- obj_handle_t handle; /* thread handle to terminate */
- int exit_code; /* thread exit code */
- @REPLY
- int self; /* suicide? */
- int last; /* last thread in this process? */
- @END
- /* Retrieve information about a process */
- @REQ(get_process_info)
- obj_handle_t handle; /* process handle */
- @REPLY
- process_id_t pid; /* server process id */
- process_id_t ppid; /* server process id of parent */
- affinity_t affinity; /* process affinity mask */
- client_ptr_t peb; /* PEB address in process address space */
- timeout_t start_time; /* process start time */
- timeout_t end_time; /* process end time */
- int exit_code; /* process exit code */
- int priority; /* priority class */
- client_cpu_t cpu; /* CPU that this process is running on */
- short int debugger_present; /* process is being debugged */
- short int debug_children; /* inherit debugger to child processes */
- @END
- /* Retrieve information about a process memory usage */
- @REQ(get_process_vm_counters)
- obj_handle_t handle; /* process handle */
- @REPLY
- mem_size_t peak_virtual_size; /* peak virtual memory in bytes */
- mem_size_t virtual_size; /* virtual memory in bytes */
- mem_size_t peak_working_set_size; /* peak real memory in bytes */
- mem_size_t working_set_size; /* real memory in bytes */
- mem_size_t pagefile_usage; /* commit charge in bytes */
- mem_size_t peak_pagefile_usage; /* peak commit charge in bytes */
- @END
- /* Set a process information */
- @REQ(set_process_info)
- obj_handle_t handle; /* process handle */
- int mask; /* setting mask (see below) */
- int priority; /* priority class */
- affinity_t affinity; /* affinity mask */
- @END
- #define SET_PROCESS_INFO_PRIORITY 0x01
- #define SET_PROCESS_INFO_AFFINITY 0x02
- /* Retrieve information about a thread */
- @REQ(get_thread_info)
- obj_handle_t handle; /* thread handle */
- thread_id_t tid_in; /* thread id (optional) */
- @REPLY
- process_id_t pid; /* server process id */
- thread_id_t tid; /* server thread id */
- client_ptr_t teb; /* thread teb pointer */
- client_ptr_t entry_point; /* thread entry point */
- affinity_t affinity; /* thread affinity mask */
- int exit_code; /* thread exit code */
- int priority; /* thread priority level */
- int last; /* last thread in process */
- int suspend_count; /* thread suspend count */
- data_size_t desc_len; /* description length in bytes */
- VARARG(desc,unicode_str); /* description string */
- @END
- /* Retrieve information about thread times */
- @REQ(get_thread_times)
- obj_handle_t handle; /* thread handle */
- @REPLY
- timeout_t creation_time; /* thread creation time */
- timeout_t exit_time; /* thread exit time */
- int unix_pid; /* thread native pid */
- int unix_tid; /* thread native pid */
- @END
- /* Set a thread information */
- @REQ(set_thread_info)
- obj_handle_t handle; /* thread handle */
- int mask; /* setting mask (see below) */
- int priority; /* priority class */
- affinity_t affinity; /* affinity mask */
- client_ptr_t entry_point; /* thread entry point */
- obj_handle_t token; /* impersonation token */
- VARARG(desc,unicode_str); /* description string */
- @END
- #define SET_THREAD_INFO_PRIORITY 0x01
- #define SET_THREAD_INFO_AFFINITY 0x02
- #define SET_THREAD_INFO_TOKEN 0x04
- #define SET_THREAD_INFO_ENTRYPOINT 0x08
- #define SET_THREAD_INFO_DESCRIPTION 0x10
- /* Retrieve information about a module */
- @REQ(get_dll_info)
- obj_handle_t handle; /* process handle */
- mod_handle_t base_address; /* base address of module */
- @REPLY
- client_ptr_t entry_point;
- mod_handle_t base_address;
- data_size_t filename_len; /* buffer len in bytes required to store filename */
- VARARG(filename,unicode_str); /* file name of module */
- @END
- /* Suspend a thread */
- @REQ(suspend_thread)
- obj_handle_t handle; /* thread handle */
- @REPLY
- int count; /* new suspend count */
- @END
- /* Resume a thread */
- @REQ(resume_thread)
- obj_handle_t handle; /* thread handle */
- @REPLY
- int count; /* new suspend count */
- @END
- /* Notify the server that a dll has been loaded */
- @REQ(load_dll)
- data_size_t dbg_offset; /* debug info offset */
- mod_handle_t base; /* base address */
- client_ptr_t name; /* ptr to ptr to name (in process addr space) */
- data_size_t dbg_size; /* debug info size */
- VARARG(filename,unicode_str); /* file name of dll */
- @REPLY
- obj_handle_t processed_event; /* signals when "kernel" callbacks are done with it */
- @END
- /* Notify the server that a dll is being unloaded */
- @REQ(unload_dll)
- mod_handle_t base; /* base address */
- @END
- /* Queue an APC for a thread or process */
- @REQ(queue_apc)
- obj_handle_t handle; /* thread or process handle */
- apc_call_t call; /* call arguments */
- @REPLY
- obj_handle_t handle; /* APC handle */
- int self; /* run APC in caller itself? */
- @END
- @REQ(finalize_apc)
- obj_handle_t handle; /* handle to the apc */
- apc_call_t call; /* real call */
- @END
- /* Get the result of an APC call */
- @REQ(get_apc_result)
- obj_handle_t handle; /* handle to the APC */
- @REPLY
- apc_result_t result; /* result of the APC */
- @END
- #define KERNEL_HANDLE_FLAG 0x8000000
- /* Open any object */
- @REQ(open_handle)
- unsigned int access; /* access flags */
- unsigned int attributes; /* object attributes */
- obj_handle_t rootdir; /* root directory */
- VARARG(object_name,unicode_str); /* Object name */
- @REPLY
- obj_handle_t handle; /* handle to the directory */
- @END
- /* Close a handle for the current process */
- @REQ(close_handle)
- obj_handle_t handle; /* handle to close */
- @END
- /* Close all sockets for the current process */
- @REQ(socket_cleanup)
- @END
- /* Set a handle information */
- @REQ(set_handle_info)
- obj_handle_t handle; /* handle we are interested in */
- int flags; /* new handle flags */
- int mask; /* mask for flags to set */
- @REPLY
- int old_flags; /* old flag value */
- @END
- /* Duplicate a handle */
- @REQ(dup_handle)
- obj_handle_t src_process; /* src process handle */
- obj_handle_t src_handle; /* src handle to duplicate */
- obj_handle_t dst_process; /* dst process handle */
- unsigned int access; /* wanted access rights */
- unsigned int attributes; /* object attributes */
- unsigned int options; /* duplicate options (see below) */
- @REPLY
- obj_handle_t handle; /* duplicated handle in dst process */
- int self; /* is the source the current process? */
- int closed; /* whether the source handle has been closed */
- @END
- #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
- #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
- #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
- /* Open a handle to a process */
- @REQ(open_process)
- process_id_t pid; /* process id to open */
- unsigned int access; /* wanted access rights */
- unsigned int attributes; /* object attributes */
- @REPLY
- obj_handle_t handle; /* handle to the process */
- @END
- /* Open a handle to a thread */
- @REQ(open_thread)
- thread_id_t tid; /* thread id to open */
- unsigned int access; /* wanted access rights */
- unsigned int attributes; /* object attributes */
- @REPLY
- obj_handle_t handle; /* handle to the thread */
- @END
- /* Wait for handles */
- @REQ(select)
- int flags; /* wait flags (see below) */
- client_ptr_t cookie; /* magic cookie to return to client */
- timeout_t timeout; /* timeout */
- obj_handle_t prev_apc; /* handle to previous APC */
- VARARG(result,apc_result); /* result of previous APC */
- VARARG(data,select_op); /* operation-specific data */
- @REPLY
- timeout_t timeout; /* timeout converted to absolute */
- apc_call_t call; /* APC call arguments */
- obj_handle_t apc_handle; /* handle to next APC */
- @END
- #define SELECT_ALERTABLE 1
- #define SELECT_INTERRUPTIBLE 2
- /* Create an event */
- @REQ(create_event)
- unsigned int access; /* wanted access rights */
- int manual_reset; /* manual reset event */
- int initial_state; /* initial state of the event */
- VARARG(objattr,object_attributes); /* object attributes */
- @REPLY
- obj_handle_t handle; /* handle to the event */
- @END
- /* Event operation */
- @REQ(event_op)
- obj_handle_t handle; /* handle to event */
- int op; /* event operation (see below) */
- @REPLY
- int state; /* previous state */
- @END
- enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
- @REQ(query_event)
- obj_handle_t handle; /* handle to event */
- @REPLY
- int manual_reset; /* manual reset event */
- int state; /* current state of the event */
- @END
- /* Open an event */
- @REQ(open_event)
- unsigned int access; /* wanted access rights */
- unsigned int attributes; /* object attributes */
- obj_handle_t rootdir; /* root directory */
- VARARG(name,unicode_str); /* object name */
- @REPLY
- obj_handle_t handle; /* handle to the event */
- @END
- /* Create a keyed event */
- @REQ(create_keyed_event)
- unsigned int access; /* wanted access rights */
- VARARG(objattr,object_attributes); /* object attributes */
- @REPLY
- obj_handle_t handle; /* handle to the event */
- @END
- /* Open a keyed event */
- @REQ(open_keyed_event)
- unsigned int access; /* wanted access rights */
- unsigned int attributes; /* object attributes */
- obj_handle_t rootdir; /* root directory */
- VARARG(name,unicode_str); /* object name */
- @REPLY
- obj_handle_t handle; /* handle to the event */
- @END
- /* Create a mutex */
- @REQ(create_mutex)
- unsigned int access; /* wanted access rights */
- int owned; /* initially owned? */
- VARARG(objattr,object_attributes); /* object attributes */
- @REPLY
- obj_handle_t handle; /* handle to the mutex */
- @END
- /* Release a mutex */
- @REQ(release_mutex)
- obj_handle_t handle; /* handle to the mutex */
- @REPLY
- unsigned int prev_count; /* value of internal counter, before release */
- @END
- /* Open a mutex */
- @REQ(open_mutex)
- unsigned int access; /* wanted access rights */
- unsigned int attributes; /* object attributes */
- obj_handle_t rootdir; /* root directory */
- VARARG(name,unicode_str); /* object name */
- @REPLY
- obj_handle_t handle; /* handle to the mutex */
- @END
- /* Query a mutex */
- @REQ(query_mutex)
- obj_handle_t handle; /* handle to mutex */
- @REPLY
- unsigned int count; /* current count of mutex */
- int owned; /* true if owned by current thread */
- int abandoned; /* true if abandoned */
- @END
- /* Create a semaphore */
- @REQ(create_semaphore)
- unsigned int access; /* wanted access rights */
- unsigned int initial; /* initial count */
- unsigned int max; /* maximum count */
- VARARG(objattr,object_attributes); /* object attributes */
- @REPLY
- obj_handle_t handle; /* handle to the semaphore */
- @END
- /* Release a semaphore */
- @REQ(release_semaphore)
- obj_handle_t handle; /* handle to the semaphore */
- unsigned int count; /* count to add to semaphore */
- @REPLY
- unsigned int prev_count; /* previous semaphore count */
- @END
- @REQ(query_semaphore)
- obj_handle_t handle; /* handle to the semaphore */
- @REPLY
- unsigned int current; /* current count */
- unsigned int max; /* maximum count */
- @END
- /* Open a semaphore */
- @REQ(open_semaphore)
- unsigned int access; /* wanted access rights */
- unsigned int attributes; /* object attributes */
- obj_handle_t rootdir; /* root directory */
- VARARG(name,unicode_str); /* object name */
- @REPLY
- obj_handle_t handle; /* handle to the semaphore */
- @END
- /* Create a file */
- @REQ(create_file)
- unsigned int access; /* wanted access rights */
- unsigned int sharing; /* sharing flags */
- int create; /* file create action */
- unsigned int options; /* file options */
- unsigned int attrs; /* file attributes for creation */
- VARARG(objattr,object_attributes); /* object attributes */
- VARARG(filename,string); /* file name */
- @REPLY
- obj_handle_t handle; /* handle to the file */
- @END
- /* Open a file object */
- @REQ(open_file_object)
- unsigned int access; /* wanted access rights */
- unsigned int attributes; /* open attributes */
- obj_handle_t rootdir; /* root directory */
- unsigned int sharing; /* sharing flags */
- unsigned int options; /* file options */
- VARARG(filename,unicode_str); /* file name */
- @REPLY
- obj_handle_t handle; /* handle to the file */
- @END
- /* Allocate a file handle for a Unix fd */
- @REQ(alloc_file_handle)
- unsigned int access; /* wanted access rights */
- unsigned int attributes; /* object attributes */
- int fd; /* file descriptor on the client side */
- @REPLY
- obj_handle_t handle; /* handle to the file */
- @END
- /* Get the Unix name from a file handle */
- @REQ(get_handle_unix_name)
- obj_handle_t handle; /* file handle */
- @REPLY
- data_size_t name_len; /* unix name length */
- VARARG(name,string); /* unix name */
- @END
- /* Get a Unix fd to access a file */
- @REQ(get_handle_fd)
- obj_handle_t handle; /* handle to the file */
- @REPLY
- int type; /* file type (see below) */
- int cacheable; /* can fd be cached in the client? */
- unsigned int access; /* file access rights */
- unsigned int options; /* file open options */
- @END
- enum server_fd_type
- {
- FD_TYPE_INVALID, /* invalid file (no associated fd) */
- FD_TYPE_FILE, /* regular file */
- FD_TYPE_DIR, /* directory */
- FD_TYPE_SOCKET, /* socket */
- FD_TYPE_SERIAL, /* serial port */
- FD_TYPE_PIPE, /* named pipe */
- FD_TYPE_MAILSLOT, /* mailslot */
- FD_TYPE_CHAR, /* unspecified char device */
- FD_TYPE_DEVICE, /* Windows device file */
- FD_TYPE_NB_TYPES
- };
- /* Retrieve (or allocate) the client-side directory cache entry */
- @REQ(get_directory_cache_entry)
- obj_handle_t handle; /* handle to the directory */
- @REPLY
- int entry; /* cache entry on the client side */
- VARARG(free,ints); /* entries that can be freed */
- @END
- /* Get file descriptor for shared memory */
- @REQ(get_shared_memory)
- thread_id_t tid; /* thread id or 0 */
- @END
- /* Flush a file buffers */
- @REQ(flush)
- async_data_t async; /* async I/O parameters */
- @REPLY
- obj_handle_t event; /* event set when finished */
- @END
- /* Query file information */
- @REQ(get_file_info)
- obj_handle_t handle; /* handle to the file */
- unsigned int info_class; /* queried information class */
- @REPLY
- VARARG(data,bytes); /* file info data */
- @END
- /* Query volume information */
- @REQ(get_volume_info)
- obj_handle_t handle; /* handle to the file */
- unsigned int info_class; /* queried information class */
- @REPLY
- VARARG(data,bytes); /* volume info data */
- @END
- /* Lock a region of a file */
- @REQ(lock_file)
- obj_handle_t handle; /* handle to the file */
- file_pos_t offset; /* offset of start of lock */
- file_pos_t count; /* count of bytes to lock */
- int shared; /* shared or exclusive lock? */
- int wait; /* do we want to wait? */
- @REPLY
- obj_handle_t handle; /* handle to wait on */
- int overlapped; /* is it an overlapped I/O handle? */
- @END
- /* Unlock a region of a file */
- @REQ(unlock_file)
- obj_handle_t handle; /* handle to the file */
- file_pos_t offset; /* offset of start of unlock */
- file_pos_t count; /* count of bytes to unlock */
- @END
- /* Create a socket */
- @REQ(create_socket)
- unsigned int access; /* wanted access rights */
- unsigned int attributes; /* object attributes */
- int family; /* family, see socket manpage */
- int type; /* type, see socket manpage */
- int protocol; /* protocol, see socket manpage */
- unsigned int flags; /* socket flags */
- @REPLY
- obj_handle_t handle; /* handle to the new socket */
- @END
- /* Accept a socket */
- @REQ(accept_socket)
- obj_handle_t lhandle; /* handle to the listening socket */
- unsigned int access; /* wanted access rights */
- unsigned int attributes; /* object attributes */
- @REPLY
- obj_handle_t handle; /* handle to the new socket */
- @END
- /* Accept into an initialized socket */
- @REQ(accept_into_socket)
- obj_handle_t lhandle; /* handle to the listening socket */
- obj_handle_t ahandle; /* handle to the accepting socket */
- @END
- /* Mark a socket to be reused after "closed" */
- @REQ(reuse_socket)
- obj_handle_t handle; /* handle to the socket */
- @END
- /* Set socket event parameters */
- @REQ(set_socket_event)
- obj_handle_t handle; /* handle to the socket */
- unsigned int mask; /* event mask */
- obj_handle_t event; /* event object */
- user_handle_t window; /* window to send the message to */
- unsigned int msg; /* message to send */
- @END
- /* Get socket event parameters */
- @REQ(get_socket_event)
- obj_handle_t handle; /* handle to the socket */
- int service; /* clear pending? */
- obj_handle_t c_event; /* event to clear */
- @REPLY
- unsigned int mask; /* event mask */
- unsigned int pmask; /* pending events */
- unsigned int state; /* status bits */
- VARARG(errors,ints); /* event errors */
- @END
- /* Get socket info */
- @REQ(get_socket_info)
- obj_handle_t handle; /* handle to the socket */
- @REPLY
- int family; /* family, see socket manpage */
- int type; /* type, see socket manpage */
- int protocol; /* protocol, see socket manpage */
- timeout_t connect_time; /* time the socket was connected (relative) */
- @END
- /* Re-enable pending socket events */
- @REQ(enable_socket_event)
- obj_handle_t handle; /* handle to the socket */
- unsigned int mask; /* events to re-enable */
- unsigned int sstate; /* status bits to set */
- unsigned int cstate; /* status bits to clear */
- @END
- @REQ(set_socket_deferred)
- obj_handle_t handle; /* handle to the socket */
- obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
- @END
- /* Allocate a console (only used by a console renderer) */
- @REQ(alloc_console)
- unsigned int access; /* wanted access rights */
- unsigned int attributes; /* object attributes */
- process_id_t pid; /* pid of process which shall be attached to the console */
- int input_fd; /* if pid=-1 (bare console to current process), fd for input */
- @REPLY
- obj_handle_t handle_in; /* handle to console input */
- obj_handle_t event; /* handle to renderer events change notification */
- @END
- /* Free the console of the current process */
- @REQ(free_console)
- @END
- #define CONSOLE_RENDERER_NONE_EVENT 0x00
- #define CONSOLE_RENDERER_TITLE_EVENT 0x01
- #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
- #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
- #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
- #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
- #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
- #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
- #define CONSOLE_RENDERER_EXIT_EVENT 0x08
- struct console_renderer_event
- {
- short event;
- union
- {
- struct
- {
- short top;
- short bottom;
- } update;
- struct
- {
- short width;
- short height;
- } resize;
- struct
- {
- short x;
- short y;
- } cursor_pos;
- struct
- {
- short visible;
- short size;
- } cursor_geom;
- struct
- {
- short left;
- short top;
- short width;
- short height;
- } display;
- } u;
- };
- /* retrieve console events for the renderer */
- @REQ(get_console_renderer_events)
- obj_handle_t handle; /* handle to console input events */
- @REPLY
- VARARG(data,bytes); /* the various console_renderer_events */
- @END
- /* Open a handle to the process console */
- @REQ(open_console)
- obj_handle_t from; /* 0 (resp 1) input (resp output) of current process console */
- /* otherwise console_in handle to get active screen buffer? */
- unsigned int access; /* wanted access rights */
- unsigned int attributes; /* object attributes */
- int share; /* share mask (only for output handles) */
- @REPLY
- obj_handle_t handle; /* handle to the console */
- @END
- /* Attach to a other process's console */
- @REQ(attach_console)
- process_id_t pid; /* pid of attached console process */
- @REPLY
- obj_handle_t std_in; /* attached stdin */
- obj_handle_t std_out; /* attached stdout */
- obj_handle_t std_err; /* attached stderr */
- @END
- /* Get the input queue wait event */
- @REQ(get_console_wait_event)
- obj_handle_t handle; /* handle to the console */
- @REPLY
- obj_handle_t event;
- @END
- /* Get a console mode (input or output) */
- @REQ(get_console_mode)
- obj_handle_t handle; /* handle to the console */
- @REPLY
- int mode; /* console mode */
- @END
- /* Set a console mode (input or output) */
- @REQ(set_console_mode)
- obj_handle_t handle; /* handle to the console */
- int mode; /* console mode */
- @END
- /* Set info about a console (input only) */
- @REQ(set_console_input_info)
- obj_handle_t handle; /* handle to console input, or 0 for process' console */
- int mask; /* setting mask (see below) */
- obj_handle_t active_sb; /* active screen buffer */
- int history_mode; /* whether we duplicate lines in history */
- int history_size; /* number of lines in history */
- int edition_mode; /* index to the edition mode flavors */
- int input_cp; /* console input codepage */
- int output_cp; /* console output codepage */
- user_handle_t win; /* console window if backend supports it */
- VARARG(title,unicode_str); /* console title */
- @END
- #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
- #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
- #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
- #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
- #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
- #define SET_CONSOLE_INPUT_INFO_INPUT_CODEPAGE 0x20
- #define SET_CONSOLE_INPUT_INFO_OUTPUT_CODEPAGE 0x40
- #define SET_CONSOLE_INPUT_INFO_WIN 0x80
- /* Get info about a console (input only) */
- @REQ(get_console_input_info)
- obj_handle_t handle; /* handle to console input, or 0 for process' console */
- @REPLY
- int history_mode; /* whether we duplicate lines in history */
- int history_size; /* number of lines in history */
- int history_index; /* number of used lines in history */
- int edition_mode; /* index to the edition mode flavors */
- int input_cp; /* console input codepage */
- int output_cp; /* console output codepage */
- user_handle_t win; /* console window if backend supports it */
- VARARG(title,unicode_str); /* console title */
- @END
- /* appends a string to console's history */
- @REQ(append_console_input_history)
- obj_handle_t handle; /* handle to console input, or 0 for process' console */
- VARARG(line,unicode_str); /* line to add */
- @END
- /* appends a string to console's history */
- @REQ(get_console_input_history)
- obj_handle_t handle; /* handle to console input, or 0 for process' console */
- int index; /* index to get line from */
- @REPLY
- int total; /* total length of line in Unicode chars */
- VARARG(line,unicode_str); /* line to add */
- @END
- /* creates a new screen buffer on process' console */
- @REQ(create_console_output)
- obj_handle_t handle_in; /* handle to console input, or 0 for process' console */
- unsigned int access; /* wanted access rights */
- unsigned int attributes; /* object attributes */
- unsigned int share; /* sharing credentials */
- int fd; /* for bare consoles, fd the screen-buffer is attached to */
- @REPLY
- obj_handle_t handle_out; /* handle to the screen buffer */
- @END
- /* Set info about a console (output only) */
- @REQ(set_console_output_info)
- obj_handle_t handle; /* handle to the console */
- int mask; /* setting mask (see below) */
- short int cursor_size; /* size of cursor (percentage filled) */
- short int cursor_visible;/* cursor visibility flag */
- short int cursor_x; /* position of cursor (x, y) */
- short int cursor_y;
- short int width; /* width of the screen buffer */
- short int height; /* height of the screen buffer */
- short int attr; /* default fill attributes (screen colors) */
- short int popup_attr; /* pop-up color attributes */
- short int win_left; /* window actually displayed by renderer */
- short int win_top; /* the rect area is expressed within the */
- short int win_right; /* boundaries of the screen buffer */
- short int win_bottom;
- short int max_width; /* maximum size (width x height) for the window */
- short int max_height;
- short int font_width; /* font size (width x height) */
- short int font_height;
- short int font_weight; /* font weight */
- short int font_pitch_family; /* font pitch & family */
- VARARG(colors,uints,64); /* color table */
- VARARG(face_name,unicode_str); /* font face name */
- @END
- #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x0001
- #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x0002
- #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x0004
- #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x0008
- #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x0010
- #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x0020
- #define SET_CONSOLE_OUTPUT_INFO_FONT 0x0040
- #define SET_CONSOLE_OUTPUT_INFO_COLORTABLE 0x0080
- #define SET_CONSOLE_OUTPUT_INFO_POPUP_ATTR 0x0100
- /* Get info about a console (output only) */
- @REQ(get_console_output_info)
- obj_handle_t handle; /* handle to the console */
- @REPLY
- short int cursor_size; /* size of cursor (percentage filled) */
- short int cursor_visible;/* cursor visibility flag */
- short int cursor_x; /* position of cursor (x, y) */
- short int cursor_y;
- short int width; /* width of the screen buffer */
- short int height; /* height of the screen buffer */
- short int attr; /* default fill attributes (screen colors) */
- short int popup_attr; /* pop-up color attributes */
- short int win_left; /* window actually displayed by renderer */
- short int win_top; /* the rect area is expressed within the */
- short int win_right; /* boundaries of the screen buffer */
- short int win_bottom;
- short int max_width; /* maximum size (width x height) for the window */
- short int max_height;
- short int font_width; /* font size (width x height) */
- short int font_height;
- short int font_weight; /* font weight */
- short int font_pitch_family; /* font pitch & family */
- VARARG(colors,uints,64); /* color table */
- VARARG(face_name,unicode_str); /* font face name */
- @END
- /* Add input records to a console input queue */
- @REQ(write_console_input)
- obj_handle_t handle; /* handle to the console input */
- VARARG(rec,input_records); /* input records */
- @REPLY
- int written; /* number of records written */
- @END
- /* Fetch input records from a console input queue */
- @REQ(read_console_input)
- obj_handle_t handle; /* handle to the console input */
- int flush; /* flush the retrieved records from the queue? */
- @REPLY
- int read; /* number of records read */
- VARARG(rec,input_records); /* input records */
- @END
- /* write data (chars and/or attributes) in a screen buffer */
- @REQ(write_console_output)
- obj_handle_t handle; /* handle to the console output */
- int x; /* position where to start writing */
- int y;
- int mode; /* char info (see below) */
- int wrap; /* wrap around at end of line? */
- VARARG(data,bytes); /* info to write */
- @REPLY
- int written; /* number of char infos actually written */
- int width; /* width of screen buffer */
- int height; /* height of screen buffer */
- @END
- enum char_info_mode
- {
- CHAR_INFO_MODE_TEXT, /* characters only */
- CHAR_INFO_MODE_ATTR, /* attributes only */
- CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
- CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
- };
- /* fill a screen buffer with constant data (chars and/or attributes) */
- @REQ(fill_console_output)
- obj_handle_t handle; /* handle to the console output */
- int x; /* position where to start writing */
- int y;
- int mode; /* char info mode */
- int count; /* number to write */
- int wrap; /* wrap around at end of line? */
- char_info_t data; /* data to write */
- @REPLY
- int written; /* number of char infos actually written */
- @END
- /* read data (chars and/or attributes) from a screen buffer */
- @REQ(read_console_output)
- obj_handle_t handle; /* handle to the console output */
- int x; /* position (x,y) where to start reading */
- int y;
- int mode; /* char info mode */
- int wrap; /* wrap around at end of line? */
- @REPLY
- int width; /* width of screen buffer */
- int height; /* height of screen buffer */
- VARARG(data,bytes);
- @END
- /* move a rect (of data) in screen buffer content */
- @REQ(move_console_output)
- obj_handle_t handle; /* handle to the console output */
- short int x_src; /* position (x, y) of rect to start moving from */
- short int y_src;
- short int x_dst; /* position (x, y) of rect to move to */
- short int y_dst;
- short int w; /* size of the rect (width, height) to move */
- short int h;
- @END
- /* Sends a signal to a process group */
- @REQ(send_console_signal)
- int signal; /* the signal to send */
- process_id_t group_id; /* the group to send the signal to */
- @END
- /* enable directory change notifications */
- @REQ(read_directory_changes)
- unsigned int filter; /* notification filter */
- int subtree; /* watch the subtree? */
- int want_data; /* flag indicating whether change data should be collected */
- async_data_t async; /* async I/O parameters */
- @END
- @REQ(read_change)
- obj_handle_t handle;
- @REPLY
- VARARG(events,filesystem_event); /* collected filesystem events */
- @END
- /* Create a file mapping */
- @REQ(create_mapping)
- unsigned int access; /* wanted access rights */
- unsigned int flags; /* SEC_* flags */
- unsigned int file_access; /* file access rights */
- mem_size_t size; /* mapping size */
- obj_handle_t file_handle; /* file handle */
- VARARG(objattr,object_attributes); /* object attributes */
- @REPLY
- obj_handle_t handle; /* handle to the mapping */
- @END
- /* Open a mapping */
- @REQ(open_mapping)
- unsigned int access; /* wanted access rights */
- unsigned int attributes; /* object attributes */
- obj_handle_t rootdir; /* root directory */
- VARARG(name,unicode_str); /* object name */
- @REPLY
- obj_handle_t handle; /* handle to the mapping */
- @END
- /* Get information about a file mapping */
- @REQ(get_mapping_info)
- obj_handle_t handle; /* handle to the mapping */
- unsigned int access; /* wanted access rights */
- @REPLY
- mem_size_t size; /* mapping size */
- unsigned int flags; /* SEC_* flags */
- obj_handle_t shared_file; /* shared mapping file handle */
- VARARG(image,pe_image_info);/* image info for SEC_IMAGE mappings */
- @END
- /* Add a memory view in the current process */
- @REQ(map_view)
- obj_handle_t mapping; /* file mapping handle */
- unsigned int access; /* wanted access rights */
- client_ptr_t base; /* view base address (page-aligned) */
- mem_size_t size; /* view size */
- file_pos_t start; /* start offset in mapping */
- @END
- /* Unmap a memory view from the current process */
- @REQ(unmap_view)
- client_ptr_t base; /* view base address */
- @END
- /* Get file for a mapping */
- @REQ(get_mapping_file)
- obj_handle_t process; /* process handle */
- client_ptr_t addr; /* arbitrary address in view */
- @REPLY
- obj_handle_t handle; /* handle to file */
- @END
- /* Get a range of committed pages in a file mapping */
- @REQ(get_mapping_committed_range)
- client_ptr_t base; /* view base address */
- file_pos_t offset; /* starting offset (page-aligned, in bytes) */
- @REPLY
- mem_size_t size; /* size of range starting at offset (page-aligned, in bytes) */
- int committed; /* whether it is a committed range */
- @END
- /* Add a range to the committed pages in a file mapping */
- @REQ(add_mapping_committed_range)
- client_ptr_t base; /* view base address */
- file_pos_t offset; /* starting offset (page-aligned, in bytes) */
- mem_size_t size; /* size to set (page-aligned, in bytes) or 0 if only retrieving */
- @END
- /* Check if two memory maps are for the same file */
- @REQ(is_same_mapping)
- client_ptr_t base1; /* first view base address */
- client_ptr_t base2; /* second view base address */
- @END
- #define SNAP_PROCESS 0x00000001
- #define SNAP_THREAD 0x00000002
- /* Create a snapshot */
- @REQ(create_snapshot)
- unsigned int attributes; /* object attributes */
- unsigned int flags; /* snapshot flags (SNAP_*) */
- @REPLY
- obj_handle_t handle; /* handle to the snapshot */
- @END
- /* Get the next process from a snapshot */
- @REQ(next_process)
- obj_handle_t handle; /* handle to the snapshot */
- int reset; /* reset snapshot position? */
- @REPLY
- int count; /* process usage count */
- process_id_t pid; /* process id */
- process_id_t ppid; /* parent process id */
- int threads; /* number of threads */
- int priority; /* process priority */
- int handles; /* number of handles */
- int unix_pid; /* Unix pid */
- timeout_t start_time; /* start time */
- VARARG(filename,unicode_str); /* file name of main exe */
- @END
- /* Get the next thread from a snapshot */
- @REQ(next_thread)
- obj_handle_t handle; /* handle to the snapshot */
- int reset; /* reset snapshot position? */
- @REPLY
- int count; /* thread usage count */
- process_id_t pid; /* process id */
- thread_id_t tid; /* thread id */
- timeout_t creation_time; /* thread creation time */
- int base_pri; /* base priority */
- int delta_pri; /* delta priority */
- int unix_tid; /* Unix tid */
- @END
- /* Wait for a debug event */
- @REQ(wait_debug_event)
- int get_handle; /* should we alloc a handle for waiting? */
- @REPLY
- process_id_t pid; /* process id */
- thread_id_t tid; /* thread id */
- obj_handle_t wait; /* wait handle if no event ready */
- VARARG(event,debug_event); /* debug event data */
- @END
- /* Queue an exception event */
- @REQ(queue_exception_event)
- int first; /* first chance exception? */
- unsigned int code; /* exception code */
- unsigned int flags; /* exception flags */
- client_ptr_t record; /* exception record */
- client_ptr_t address; /* exception address */
- data_size_t len; /* size of parameters */
- VARARG(params,uints64,len);/* exception parameters */
- VARARG(context,context); /* thread context */
- @REPLY
- obj_handle_t handle; /* handle to the queued event */
- @END
- /* Retrieve the status of an exception event */
- @REQ(get_exception_status)
- obj_handle_t handle; /* handle to the queued event */
- @REPLY
- VARARG(context,context); /* modified thread context */
- @END
- /* Continue a debug event */
- @REQ(continue_debug_event)
- process_id_t pid; /* process id to continue */
- thread_id_t tid; /* thread id to continue */
- int status; /* continuation status */
- @END
- /* Start/stop debugging an existing process */
- @REQ(debug_process)
- process_id_t pid; /* id of the process to debug */
- int attach; /* 1=attaching / 0=detaching from the process */
- @END
- /* Set debugger kill on exit flag */
- @REQ(set_debugger_kill_on_exit)
- int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
- @END
- /* Read data from a process address space */
- @REQ(read_process_memory)
- obj_handle_t handle; /* process handle */
- client_ptr_t addr; /* addr to read from */
- @REPLY
- VARARG(data,bytes); /* result data */
- @END
- /* Write data to a process address space */
- @REQ(write_process_memory)
- obj_handle_t handle; /* process handle */
- client_ptr_t addr; /* addr to write to */
- VARARG(data,bytes); /* data to write */
- @END
- /* Create a registry key */
- @REQ(create_key)
- unsigned int access; /* desired access rights */
- unsigned int options; /* creation options */
- VARARG(objattr,object_attributes); /* object attributes */
- VARARG(class,unicode_str); /* class name */
- @REPLY
- obj_handle_t hkey; /* handle to the created key */
- int created; /* has it been newly created? */
- @END
- /* Open a registry key */
- @REQ(open_key)
- obj_handle_t parent; /* handle to the parent key */
- unsigned int access; /* desired access rights */
- unsigned int attributes; /* object attributes */
- VARARG(name,unicode_str); /* key name */
- @REPLY
- obj_handle_t hkey; /* handle to the open key */
- @END
- /* Delete a registry key */
- @REQ(delete_key)
- obj_handle_t hkey; /* handle to the key */
- @END
- /* Flush a registry key */
- @REQ(flush_key)
- obj_handle_t hkey; /* handle to the key */
- @END
- /* Enumerate registry subkeys */
- @REQ(enum_key)
- obj_handle_t hkey; /* handle to registry key */
- int index; /* index of subkey (or -1 for current key) */
- int info_class; /* requested information class */
- @REPLY
- int subkeys; /* number of subkeys */
- int max_subkey; /* longest subkey name */
- int max_class; /* longest class name */
- int values; /* number of values */
- int max_value; /* longest value name */
- int max_data; /* longest value data */
- timeout_t modif; /* last modification time */
- data_size_t total; /* total length needed for full name and class */
- data_size_t namelen; /* length of key name in bytes */
- VARARG(name,unicode_str,namelen); /* key name */
- VARARG(class,unicode_str); /* class name */
- @END
- /* Set a value of a registry key */
- @REQ(set_key_value)
- obj_handle_t hkey; /* handle to registry key */
- int type; /* value type */
- data_size_t namelen; /* length of value name in bytes */
- VARARG(name,unicode_str,namelen); /* value name */
- VARARG(data,bytes); /* value data */
- @END
- /* Retrieve the value of a registry key */
- @REQ(get_key_value)
- obj_handle_t hkey; /* handle to registry key */
- VARARG(name,unicode_str); /* value name */
- @REPLY
- int type; /* value type */
- data_size_t total; /* total length needed for data */
- VARARG(data,bytes); /* value data */
- @END
- /* Enumerate a value of a registry key */
- @REQ(enum_key_value)
- obj_handle_t hkey; /* handle to registry key */
- int index; /* value index */
- int info_class; /* requested information class */
- @REPLY
- int type; /* value type */
- data_size_t total; /* total length needed for full name and data */
- data_size_t namelen; /* length of value name in bytes */
- VARARG(name,unicode_str,namelen); /* value name */
- VARARG(data,bytes); /* value data */
- @END
- /* Delete a value of a registry key */
- @REQ(delete_key_value)
- obj_handle_t hkey; /* handle to registry key */
- VARARG(name,unicode_str); /* value name */
- @END
- /* Load a registry branch from a file */
- @REQ(load_registry)
- obj_handle_t file; /* file to load from */
- VARARG(objattr,object_attributes); /* object attributes */
- @END
- /* UnLoad a registry branch from a file */
- @REQ(unload_registry)
- obj_handle_t hkey; /* root key to unload to */
- @END
- /* Save a registry branch to a file */
- @REQ(save_registry)
- obj_handle_t hkey; /* key to save */
- obj_handle_t file; /* file to save to */
- @END
- /* Add a registry key change notification */
- @REQ(set_registry_notification)
- obj_handle_t hkey; /* key to watch for changes */
- obj_handle_t event; /* event to set */
- int subtree; /* should we watch the whole subtree? */
- unsigned int filter; /* things to watch */
- @END
- /* Create a waitable timer */
- @REQ(create_timer)
- unsigned int access; /* wanted access rights */
- int manual; /* manual reset */
- VARARG(objattr,object_attributes); /* object attributes */
- @REPLY
- obj_handle_t handle; /* handle to the timer */
- @END
- /* Open a waitable timer */
- @REQ(open_timer)
- unsigned int access; /* wanted access rights */
- unsigned int attributes; /* object attributes */
- obj_handle_t rootdir; /* root directory */
- VARARG(name,unicode_str); /* object name */
- @REPLY
- obj_handle_t handle; /* handle to the timer */
- @END
- /* Set a waitable timer */
- @REQ(set_timer)
- obj_handle_t handle; /* handle to the timer */
- timeout_t expire; /* next expiration absolute time */
- client_ptr_t callback; /* callback function */
- client_ptr_t arg; /* callback argument */
- int period; /* timer period in ms */
- @REPLY
- int signaled; /* was the timer signaled before this call ? */
- @END
- /* Cancel a waitable timer */
- @REQ(cancel_timer)
- obj_handle_t handle; /* handle to the timer */
- @REPLY
- int signaled; /* was the timer signaled before this calltime ? */
- @END
- /* Get information on a waitable timer */
- @REQ(get_timer_info)
- obj_handle_t handle; /* handle to the timer */
- @REPLY
- timeout_t when; /* absolute time when the timer next expires */
- int signaled; /* is the timer signaled? */
- @END
- /* Retrieve the current context of a thread */
- @REQ(get_thread_context)
- obj_handle_t handle; /* thread handle */
- unsigned int flags; /* context flags */
- int suspend; /* suspend the thread if needed */
- @REPLY
- int self; /* was it a handle to the current thread? */
- VARARG(context,context); /* thread context */
- @END
- /* Set the current context of a thread */
- @REQ(set_thread_context)
- obj_handle_t handle; /* thread handle */
- int suspend; /* suspend the thread if needed */
- VARARG(context,context); /* thread context */
- @REPLY
- int self; /* was it a handle to the current thread? */
- @END
- /* Fetch a selector entry for a thread */
- @REQ(get_selector_entry)
- obj_handle_t handle; /* thread handle */
- int entry; /* LDT entry */
- @REPLY
- unsigned int base; /* selector base */
- unsigned int limit; /* selector limit */
- unsigned char flags; /* selector flags */
- @END
- /* Add an atom */
- @REQ(add_atom)
- obj_handle_t table; /* which table to add atom to */
- VARARG(name,unicode_str); /* atom name */
- @REPLY
- atom_t atom; /* resulting atom */
- @END
- /* Delete an atom */
- @REQ(delete_atom)
- obj_handle_t table; /* which table to delete atom from */
- atom_t atom; /* atom handle */
- @END
- /* Find an atom */
- @REQ(find_atom)
- obj_handle_t table; /* which table to find atom from */
- VARARG(name,unicode_str); /* atom name */
- @REPLY
- atom_t atom; /* atom handle */
- @END
- /* Get information about an atom */
- @REQ(get_atom_information)
- obj_handle_t table; /* which table to find atom from */
- atom_t atom; /* atom handle */
- @REPLY
- int count; /* atom lock count */
- int pinned; /* whether the atom has been pinned */
- data_size_t total; /* actual length of atom name */
- VARARG(name,unicode_str); /* atom name */
- @END
- /* Set information about an atom */
- @REQ(set_atom_information)
- obj_handle_t table; /* which table to find atom from */
- atom_t atom; /* atom handle */
- int pinned; /* whether to bump atom information */
- @END
- /* Empty an atom table */
- @REQ(empty_atom_table)
- obj_handle_t table; /* which table to find atom from */
- int if_pinned; /* whether to delete pinned atoms */
- @END
- /* Init an atom table */
- @REQ(init_atom_table)
- int entries; /* number of entries (only for local) */
- @REPLY
- obj_handle_t table; /* handle to the atom table */
- @END
- /* Get the message queue of the current thread */
- @REQ(get_msg_queue)
- @REPLY
- obj_handle_t handle; /* handle to the queue */
- @END
- /* Set the file descriptor associated to the current thread queue */
- @REQ(set_queue_fd)
- obj_handle_t handle; /* handle to the file descriptor */
- @END
- /* Set the current message queue wakeup mask */
- @REQ(set_queue_mask)
- unsigned int wake_mask; /* wakeup bits mask */
- unsigned int changed_mask; /* changed bits mask */
- int skip_wait; /* will we skip waiting if signaled? */
- @REPLY
- unsigned int wake_bits; /* current wake bits */
- unsigned int changed_bits; /* current changed bits */
- @END
- /* Get the current message queue status */
- @REQ(get_queue_status)
- unsigned int clear_bits; /* should we clear the change bits? */
- @REPLY
- unsigned int wake_bits; /* wake bits */
- unsigned int changed_bits; /* changed bits since last time */
- @END
- /* Retrieve the process idle event */
- @REQ(get_process_idle_event)
- obj_handle_t handle; /* process handle */
- @REPLY
- obj_handle_t event; /* handle to idle event */
- @END
- /* Send a message to a thread queue */
- @REQ(send_message)
- thread_id_t id; /* thread id */
- int type; /* message type (see below) */
- int flags; /* message flags (see below) */
- user_handle_t win; /* window handle */
- unsigned int msg; /* message code */
- lparam_t wparam; /* parameters */
- lparam_t lparam; /* parameters */
- timeout_t timeout; /* timeout for reply */
- VARARG(data,message_data); /* message data for sent messages */
- @END
- @REQ(post_quit_message)
- int exit_code; /* exit code to return */
- @END
- enum message_type
- {
- MSG_ASCII, /* Ascii message (from SendMessageA) */
- MSG_UNICODE, /* Unicode message (from SendMessageW) */
- MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
- MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
- MSG_CALLBACK_RESULT,/* result of a callback message */
- MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
- MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
- MSG_HARDWARE, /* hardware message */
- MSG_WINEVENT, /* winevent message */
- MSG_HOOK_LL /* low-level hardware hook */
- };
- #define SEND_MSG_ABORT_IF_HUNG 0x01
- /* Send a hardware message to a thread queue */
- @REQ(send_hardware_message)
- user_handle_t win; /* window handle */
- hw_input_t input; /* input data */
- unsigned int flags; /* flags (see below) */
- VARARG(data,bytes); /* hid report data */
- @REPLY
- int wait; /* do we need to wait for a reply? */
- int prev_x; /* previous cursor position */
- int prev_y;
- int new_x; /* new cursor position */
- int new_y;
- VARARG(keystate,bytes); /* global state array for all the keys */
- @END
- #define SEND_HWMSG_INJECTED 0x01
- #define SEND_HWMSG_RAWINPUT 0x02
- #define SEND_HWMSG_WINDOW 0x04
- /* Get a message from the current queue */
- @REQ(get_message)
- unsigned int flags; /* PM_* flags */
- user_handle_t get_win; /* window handle to get */
- unsigned int get_first; /* first message code to get */
- unsigned int get_last; /* last message code to get */
- unsigned int hw_id; /* id of the previous hardware message (or 0) */
- unsigned int wake_mask; /* wakeup bits mask */
- unsigned int changed_mask; /* changed bits mask */
- @REPLY
- user_handle_t win; /* window handle */
- unsigned int msg; /* message code */
- lparam_t wparam; /* parameters */
- lparam_t lparam; /* parameters */
- int type; /* message type */
- int x; /* message x position */
- int y; /* message y position */
- unsigned int time; /* message time */
- unsigned int active_hooks; /* active hooks bitmap */
- data_size_t total; /* total size of extra data */
- VARARG(data,message_data); /* message data for sent messages */
- @END
- /* Reply to a sent message */
- @REQ(reply_message)
- int remove; /* should we remove the message? */
- lparam_t result; /* message result */
- VARARG(data,bytes); /* message data for sent messages */
- @END
- /* Accept the current hardware message */
- @REQ(accept_hardware_message)
- unsigned int hw_id; /* id of the hardware message */
- int remove; /* should we remove the message? */
- @END
- /* Retrieve the reply for the last message sent */
- @REQ(get_message_reply)
- int cancel; /* cancel message if not ready? */
- @REPLY
- lparam_t result; /* message result */
- VARARG(data,bytes); /* message data for sent messages */
- @END
- /* Set a window timer */
- @REQ(set_win_timer)
- user_handle_t win; /* window handle */
- unsigned int msg; /* message to post */
- unsigned int rate; /* timer rate in ms */
- lparam_t id; /* timer id */
- lparam_t lparam; /* message lparam (callback proc) */
- @REPLY
- lparam_t id; /* timer id */
- @END
- /* Kill a window timer */
- @REQ(kill_win_timer)
- user_handle_t win; /* window handle */
- lparam_t id; /* timer id */
- unsigned int msg; /* message to post */
- @END
- /* check if the thread owning the window is hung */
- @REQ(is_window_hung)
- user_handle_t win; /* window handle */
- @REPLY
- int is_hung;
- @END
- /* Retrieve info about a serial port */
- @REQ(get_serial_info)
- obj_handle_t handle; /* handle to comm port */
- int flags;
- @REPLY
- unsigned int eventmask;
- unsigned int cookie;
- unsigned int pending_write;
- @END
- /* Set info about a serial port */
- @REQ(set_serial_info)
- obj_handle_t handle; /* handle to comm port */
- int flags; /* bitmask to set values (see below) */
- @END
- #define SERIALINFO_PENDING_WRITE 0x04
- #define SERIALINFO_PENDING_WAIT 0x08
- /* Create an async I/O */
- @REQ(register_async)
- int type; /* type of queue to look after */
- async_data_t async; /* async I/O parameters */
- int count; /* count - usually # of bytes to be read/written */
- @END
- #define ASYNC_TYPE_READ 0x01
- #define ASYNC_TYPE_WRITE 0x02
- #define ASYNC_TYPE_WAIT 0x03
- /* Cancel all async op on a fd */
- @REQ(cancel_async)
- obj_handle_t handle; /* handle to comm port, socket or file */
- client_ptr_t iosb; /* I/O status block (NULL=all) */
- int only_thread; /* cancel matching this thread */
- @END
- /* Retrieve results of an async */
- @REQ(get_async_result)
- client_ptr_t user_arg; /* user arg used to identify async */
- @REPLY
- data_size_t size; /* result size (input or output depending on the operation) */
- VARARG(out_data,bytes); /* iosb output data */
- @END
- /* Perform a read on a file object */
- @REQ(read)
- async_data_t async; /* async I/O parameters */
- file_pos_t pos; /* read position */
- @REPLY
- obj_handle_t wait; /* handle to wait on for blocking read */
- unsigned int options; /* device open options */
- VARARG(data,bytes); /* read data */
- @END
- /* Perform a write on a file object */
- @REQ(write)
- async_data_t async; /* async I/O parameters */
- file_pos_t pos; /* write position */
- VARARG(data,bytes); /* write data */
- @REPLY
- obj_handle_t wait; /* handle to wait on for blocking write */
- unsigned int options; /* device open options */
- data_size_t size; /* size written */
- @END
- /* Perform an ioctl on a file */
- @REQ(ioctl)
- ioctl_code_t code; /* ioctl code */
- async_data_t async; /* async I/O parameters */
- client_ptr_t input_buffer; /* user space address of input buffer */
- client_ptr_t output_buffer; /* user space address of output buffer */
- VARARG(in_data,bytes); /* ioctl input data */
- @REPLY
- obj_handle_t wait; /* handle to wait on for blocking ioctl */
- unsigned int options; /* device open options */
- VARARG(out_data,bytes); /* ioctl output data */
- @END
- /* Store results of an async irp */
- @REQ(set_irp_result)
- obj_handle_t handle; /* handle to the irp */
- unsigned int status; /* status of the irp */
- data_size_t size; /* result size (input or output depending on the operation) */
- VARARG(data,bytes); /* output data of the irp */
- @END
- /* Create a named pipe */
- @REQ(create_named_pipe)
- unsigned int access;
- unsigned int options;
- unsigned int sharing;
- unsigned int maxinstances;
- unsigned int outsize;
- unsigned int insize;
- timeout_t timeout;
- unsigned int flags;
- VARARG(objattr,object_attributes); /* object attributes */
- @REPLY
- obj_handle_t handle; /* handle to the pipe */
- @END
- /* flags in create_named_pipe and get_named_pipe_info */
- #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
- #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
- #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
- #define NAMED_PIPE_SERVER_END 0x8000
- /* Set named pipe information by handle */
- @REQ(set_named_pipe_info)
- obj_handle_t handle;
- unsigned int flags;
- @END
- /* Create a window */
- @REQ(create_window)
- user_handle_t parent; /* parent window */
- user_handle_t owner; /* owner window */
- atom_t atom; /* class atom */
- mod_handle_t instance; /* module instance */
- int dpi; /* system DPI */
- int awareness; /* thread DPI awareness */
- VARARG(class,unicode_str); /* class name */
- @REPLY
- user_handle_t handle; /* created window */
- user_handle_t parent; /* full handle of parent */
- user_handle_t owner; /* full handle of owner */
- int extra; /* number of extra bytes */
- client_ptr_t class_ptr; /* pointer to class in client address space */
- int dpi; /* window DPI if not per-monitor aware */
- int awareness; /* window DPI awareness */
- @END
- /* Destroy a window */
- @REQ(destroy_window)
- user_handle_t handle; /* handle to the window */
- @END
- /* Retrieve the desktop window for the current thread */
- @REQ(get_desktop_window)
- int force; /* force creation if it doesn't exist */
- @REPLY
- user_handle_t top_window; /* handle to the desktop window */
- user_handle_t msg_window; /* handle to the top-level HWND_MESSAGE parent */
- @END
- /* Set a window owner */
- @REQ(set_window_owner)
- user_handle_t handle; /* handle to the window */
- user_handle_t owner; /* new owner */
- @REPLY
- user_handle_t full_owner; /* full handle of new owner */
- user_handle_t prev_owner; /* full handle of previous owner */
- @END
- /* Get information from a window handle */
- @REQ(get_window_info)
- user_handle_t handle; /* handle to the window */
- @REPLY
- user_handle_t full_handle; /* full 32-bit handle */
- user_handle_t last_active; /* last active popup */
- process_id_t pid; /* process owning the window */
- thread_id_t tid; /* thread owning the window */
- atom_t atom; /* class atom */
- int is_unicode; /* ANSI or unicode */
- int dpi; /* window DPI */
- int awareness; /* DPI awareness */
- @END
- /* Set some information in a window */
- @REQ(set_window_info)
- unsigned short flags; /* flags for fields to set (see below) */
- short int is_unicode; /* ANSI or unicode */
- user_handle_t handle; /* handle to the window */
- unsigned int style; /* window style */
- unsigned int ex_style; /* window extended style */
- unsigned int id; /* window id */
- mod_handle_t instance; /* creator instance */
- lparam_t user_data; /* user-specific data */
- int extra_offset; /* offset to set in extra bytes */
- data_size_t extra_size; /* size to set in extra bytes */
- lparam_t extra_value; /* value to set in extra bytes */
- @REPLY
- unsigned int old_style; /* old window style */
- unsigned int old_ex_style; /* old window extended style */
- mod_handle_t old_instance; /* old creator instance */
- lparam_t old_user_data; /* old user-specific data */
- lparam_t old_extra_value; /* old value in extra bytes */
- unsigned int old_id; /* old window id */
- @END
- #define SET_WIN_STYLE 0x01
- #define SET_WIN_EXSTYLE 0x02
- #define SET_WIN_ID 0x04
- #define SET_WIN_INSTANCE 0x08
- #define SET_WIN_USERDATA 0x10
- #define SET_WIN_EXTRA 0x20
- #define SET_WIN_UNICODE 0x40
- /* Set the parent of a window */
- @REQ(set_parent)
- user_handle_t handle; /* handle to the window */
- user_handle_t parent; /* handle to the parent */
- @REPLY
- user_handle_t old_parent; /* old parent window */
- user_handle_t full_parent; /* full handle of new parent */
- int dpi; /* new window DPI if not per-monitor aware */
- int awareness; /* new DPI awareness */
- @END
- /* Get a list of the window parents, up to the root of the tree */
- @REQ(get_window_parents)
- user_handle_t handle; /* handle to the window */
- @REPLY
- int count; /* total count of parents */
- VARARG(parents,user_handles); /* parent handles */
- @END
- /* Get a list of the window children */
- @REQ(get_window_children)
- obj_handle_t desktop; /* handle to desktop */
- user_handle_t parent; /* parent window */
- atom_t atom; /* class atom for the listed children */
- thread_id_t tid; /* thread owning the listed children */
- VARARG(class,unicode_str); /* class name */
- @REPLY
- int count; /* total count of children */
- VARARG(children,user_handles); /* children handles */
- @END
- /* Get a list of the window children that contain a given point */
- @REQ(get_window_children_from_point)
- user_handle_t parent; /* parent window */
- int x; /* point in parent coordinates */
- int y;
- int dpi; /* dpi for the point coordinates */
- @REPLY
- int count; /* total count of children */
- VARARG(children,user_handles); /* children handles */
- @END
- /* Get window tree information from a window handle */
- @REQ(get_window_tree)
- user_handle_t handle; /* handle to the window */
- @REPLY
- user_handle_t parent; /* parent window */
- user_handle_t owner; /* owner window */
- user_handle_t next_sibling; /* next sibling in Z-order */
- user_handle_t prev_sibling; /* prev sibling in Z-order */
- user_handle_t first_sibling; /* first sibling in Z-order */
- user_handle_t last_sibling; /* last sibling in Z-order */
- user_handle_t first_child; /* first child */
- user_handle_t last_child; /* last child */
- @END
- /* Set the position and Z order of a window */
- @REQ(set_window_pos)
- unsigned short swp_flags; /* SWP_* flags */
- unsigned short paint_flags; /* paint flags (see below) */
- user_handle_t handle; /* handle to the window */
- user_handle_t previous; /* previous window in Z order */
- rectangle_t window; /* window rectangle (in parent coords) */
- rectangle_t client; /* client rectangle (in parent coords) */
- VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE (in parent coords) */
- @REPLY
- unsigned int new_style; /* new window style */
- unsigned int new_ex_style; /* new window extended style */
- user_handle_t surface_win; /* parent window that holds the surface */
- int needs_update; /* whether the surface region needs an update */
- @END
- #define SET_WINPOS_PAINT_SURFACE 0x01 /* window has a paintable surface */
- #define SET_WINPOS_PIXEL_FORMAT 0x02 /* window has a custom pixel format */
- /* Get the window and client rectangles of a window */
- @REQ(get_window_rectangles)
- user_handle_t handle; /* handle to the window */
- int relative; /* coords relative to (see below) */
- int dpi; /* DPI to map to, or zero for per-monitor DPI */
- @REPLY
- rectangle_t window; /* window rectangle */
- rectangle_t client; /* client rectangle */
- @END
- enum coords_relative
- {
- COORDS_CLIENT, /* relative to client area */
- COORDS_WINDOW, /* relative to whole window area */
- COORDS_PARENT, /* relative to parent's client area */
- COORDS_SCREEN /* relative to screen origin */
- };
- /* Get the window text */
- @REQ(get_window_text)
- user_handle_t handle; /* handle to the window */
- @REPLY
- data_size_t length; /* total length in WCHARs */
- VARARG(text,unicode_str); /* window text */
- @END
- /* Set the window text */
- @REQ(set_window_text)
- user_handle_t handle; /* handle to the window */
- VARARG(text,unicode_str); /* window text */
- @END
- /* Get the coordinates offset between two windows */
- @REQ(get_windows_offset)
- user_handle_t from; /* handle to the first window */
- user_handle_t to; /* handle to the second window */
- int dpi; /* DPI to map to, or zero for per-monitor DPI */
- @REPLY
- int x; /* x coordinate offset */
- int y; /* y coordinate offset */
- int mirror; /* whether to mirror the x coordinate */
- @END
- /* Get the visible region of a window */
- @REQ(get_visible_region)
- user_handle_t window; /* handle to the window */
- unsigned int flags; /* DCX flags */
- @REPLY
- user_handle_t top_win; /* top window to clip against */
- rectangle_t top_rect; /* top window visible rect with screen coords */
- rectangle_t win_rect; /* window rect in screen coords */
- unsigned int paint_flags; /* paint flags (from SET_WINPOS_* flags) */
- data_size_t total_size; /* total size of the resulting region */
- VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
- @END
- /* Get the visible surface region of a window */
- @REQ(get_surface_region)
- user_handle_t window; /* handle to the window */
- @REPLY
- rectangle_t visible_rect; /* window visible rect in screen coords */
- data_size_t total_size; /* total size of the resulting region */
- VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
- @END
- /* Get the window region */
- @REQ(get_window_region)
- user_handle_t window; /* handle to the window */
- @REPLY
- data_size_t total_size; /* total size of the resulting region */
- VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
- @END
- /* Set the window region */
- @REQ(set_window_region)
- user_handle_t window; /* handle to the window */
- int redraw; /* redraw the window? */
- VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
- @END
- /* Set the layer region */
- @REQ(set_layer_region)
- user_handle_t window; /* handle to the window */
- VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
- @END
- /* Get the window update region */
- @REQ(get_update_region)
- user_handle_t window; /* handle to the window */
- user_handle_t from_child; /* child to start searching from */
- unsigned int flags; /* update flags (see below) */
- @REPLY
- user_handle_t child; /* child to repaint (or window itself) */
- unsigned int flags; /* resulting update flags (see below) */
- data_size_t total_size; /* total size of the resulting region */
- VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
- @END
- #define UPDATE_NONCLIENT 0x001 /* get region for repainting non-client area */
- #define UPDATE_ERASE 0x002 /* get region for erasing client area */
- #define UPDATE_PAINT 0x004 /* get region for painting client area */
- #define UPDATE_INTERNALPAINT 0x008 /* get region if internal paint is pending */
- #define UPDATE_ALLCHILDREN 0x010 /* force repaint of all children */
- #define UPDATE_NOCHILDREN 0x020 /* don't try to repaint any children */
- #define UPDATE_NOREGION 0x040 /* don't return a region, only the flags */
- #define UPDATE_DELAYED_ERASE 0x080 /* still needs erase after BeginPaint */
- #define UPDATE_CLIPCHILDREN 0x100 /* remove clipped children from the update region */
- /* Update the z order of a window so that a given rectangle is fully visible */
- @REQ(update_window_zorder)
- user_handle_t window; /* handle to the window */
- rectangle_t rect; /* rectangle that must be visible (in client coords) */
- @END
- /* Mark parts of a window as needing a redraw */
- @REQ(redraw_window)
- user_handle_t window; /* handle to the window */
- unsigned int flags; /* RDW_* flags */
- VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
- @END
- /* Set a window property */
- @REQ(set_window_property)
- user_handle_t window; /* handle to the window */
- lparam_t data; /* data to store */
- atom_t atom; /* property atom (if no name specified) */
- VARARG(name,unicode_str); /* property name */
- @END
- /* Remove a window property */
- @REQ(remove_window_property)
- user_handle_t window; /* handle to the window */
- atom_t atom; /* property atom (if no name specified) */
- VARARG(name,unicode_str); /* property name */
- @REPLY
- lparam_t data; /* data stored in property */
- @END
- /* Get a window property */
- @REQ(get_window_property)
- user_handle_t window; /* handle to the window */
- atom_t atom; /* property atom (if no name specified) */
- VARARG(name,unicode_str); /* property name */
- @REPLY
- lparam_t data; /* data stored in property */
- @END
- /* Get the list of properties of a window */
- @REQ(get_window_properties)
- user_handle_t window; /* handle to the window */
- @REPLY
- int total; /* total number of properties */
- VARARG(props,properties); /* list of properties */
- @END
- /* Create a window station */
- @REQ(create_winstation)
- unsigned int flags; /* window station flags */
- unsigned int access; /* wanted access rights */
- unsigned int attributes; /* object attributes */
- obj_handle_t rootdir; /* root directory */
- VARARG(name,unicode_str); /* object name */
- @REPLY
- obj_handle_t handle; /* handle to the window station */
- @END
- /* Open a handle to a window station */
- @REQ(open_winstation)
- unsigned int access; /* wanted access rights */
- unsigned int attributes; /* object attributes */
- obj_handle_t rootdir; /* root directory */
- VARARG(name,unicode_str); /* object name */
- @REPLY
- obj_handle_t handle; /* handle to the window station */
- @END
- /* Close a window station */
- @REQ(close_winstation)
- obj_handle_t handle; /* handle to the window station */
- @END
- /* Get the process current window station */
- @REQ(get_process_winstation)
- @REPLY
- obj_handle_t handle; /* handle to the window station */
- @END
- /* Set the process current window station */
- @REQ(set_process_winstation)
- obj_handle_t handle; /* handle to the window station */
- @END
- /* Enumerate window stations */
- @REQ(enum_winstation)
- unsigned int index; /* current index */
- @REPLY
- unsigned int next; /* next index */
- VARARG(name,unicode_str); /* window station name */
- @END
- /* Create a desktop */
- @REQ(create_desktop)
- unsigned int flags; /* desktop flags */
- unsigned int access; /* wanted access rights */
- unsigned int attributes; /* object attributes */
- VARARG(name,unicode_str); /* object name */
- @REPLY
- obj_handle_t handle; /* handle to the desktop */
- @END
- /* Open a handle to a desktop */
- @REQ(open_desktop)
- obj_handle_t winsta; /* window station to open (null allowed) */
- unsigned int flags; /* desktop flags */
- unsigned int access; /* wanted access rights */
- unsigned int attributes; /* object attributes */
- VARARG(name,unicode_str); /* object name */
- @REPLY
- obj_handle_t handle; /* handle to the desktop */
- @END
- /* Open a handle to current input desktop */
- @REQ(open_input_desktop)
- unsigned int flags; /* desktop flags */
- unsigned int access; /* wanted access rights */
- unsigned int attributes; /* object attributes */
- @REPLY
- obj_handle_t handle; /* handle to the desktop */
- @END
- /* Close a desktop */
- @REQ(close_desktop)
- obj_handle_t handle; /* handle to the desktop */
- @END
- /* Get the thread current desktop */
- @REQ(get_thread_desktop)
- thread_id_t tid; /* thread id */
- @REPLY
- obj_handle_t handle; /* handle to the desktop */
- @END
- /* Set the thread current desktop */
- @REQ(set_thread_desktop)
- obj_handle_t handle; /* handle to the desktop */
- @END
- /* Enumerate desktops */
- @REQ(enum_desktop)
- obj_handle_t winstation; /* handle to the window station */
- unsigned int index; /* current index */
- @REPLY
- unsigned int next; /* next index */
- VARARG(name,unicode_str); /* window station name */
- @END
- /* Get/set information about a user object (window station or desktop) */
- @REQ(set_user_object_info)
- obj_handle_t handle; /* handle to the object */
- unsigned int flags; /* information to set/get */
- unsigned int obj_flags; /* new object flags */
- @REPLY
- int is_desktop; /* is object a desktop? */
- unsigned int old_obj_flags; /* old object flags */
- VARARG(name,unicode_str); /* object name */
- @END
- #define SET_USER_OBJECT_SET_FLAGS 1
- #define SET_USER_OBJECT_GET_FULL_NAME 2
- /* Register a hotkey */
- @REQ(register_hotkey)
- user_handle_t window; /* handle to the window */
- int id; /* hotkey identifier */
- unsigned int flags; /* modifier keys */
- unsigned int vkey; /* virtual key code */
- @REPLY
- int replaced; /* did we replace an existing hotkey? */
- unsigned int flags; /* flags of replaced hotkey */
- unsigned int vkey; /* virtual key code of replaced hotkey */
- @END
- /* Unregister a hotkey */
- @REQ(unregister_hotkey)
- user_handle_t window; /* handle to the window */
- int id; /* hotkey identifier */
- @REPLY
- unsigned int flags; /* flags of removed hotkey */
- unsigned int vkey; /* virtual key code of removed hotkey */
- @END
- /* Attach (or detach) thread inputs */
- @REQ(attach_thread_input)
- thread_id_t tid_from; /* thread to be attached */
- thread_id_t tid_to; /* thread to which tid_from should be attached */
- int attach; /* is it an attach? */
- @END
- /* Get input data for a given thread */
- @REQ(get_thread_input)
- thread_id_t tid; /* id of thread */
- @REPLY
- user_handle_t focus; /* handle to the focus window */
- user_handle_t capture; /* handle to the capture window */
- user_handle_t active; /* handle to the active window */
- user_handle_t foreground; /* handle to the global foreground window */
- user_handle_t menu_owner; /* handle to the menu owner */
- user_handle_t move_size; /* handle to the moving/resizing window */
- user_handle_t caret; /* handle to the caret window */
- user_handle_t cursor; /* handle to the cursor */
- int show_count; /* cursor show count */
- rectangle_t rect; /* caret rectangle */
- @END
- /* Get the time of the last input event */
- @REQ(get_last_input_time)
- @REPLY
- unsigned int time;
- @END
- /* Retrieve queue keyboard state for a given thread */
- @REQ(get_key_state)
- thread_id_t tid; /* id of thread */
- int key; /* optional key code or -1 */
- @REPLY
- unsigned char state; /* state of specified key */
- VARARG(keystate,bytes); /* state array for all the keys */
- @END
- /* Set queue keyboard state for a given thread */
- @REQ(set_key_state)
- thread_id_t tid; /* id of thread */
- int async; /* whether to change the async state too */
- VARARG(keystate,bytes); /* state array for all the keys */
- @END
- /* Set the system foreground window */
- @REQ(set_foreground_window)
- user_handle_t handle; /* handle to the foreground window */
- @REPLY
- user_handle_t previous; /* handle to the previous foreground window */
- int send_msg_old; /* whether we have to send a msg to the old window */
- int send_msg_new; /* whether we have to send a msg to the new window */
- @END
- /* Set the current thread focus window */
- @REQ(set_focus_window)
- user_handle_t handle; /* handle to the focus window */
- @REPLY
- user_handle_t previous; /* handle to the previous focus window */
- @END
- /* Set the current thread active window */
- @REQ(set_active_window)
- user_handle_t handle; /* handle to the active window */
- @REPLY
- user_handle_t previous; /* handle to the previous active window */
- @END
- /* Set the current thread capture window */
- @REQ(set_capture_window)
- user_handle_t handle; /* handle to the capture window */
- unsigned int flags; /* capture flags (see below) */
- @REPLY
- user_handle_t previous; /* handle to the previous capture window */
- user_handle_t full_handle; /* full 32-bit handle of new capture window */
- @END
- #define CAPTURE_MENU 0x01 /* capture is for a menu */
- #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
- /* Set the current thread caret window */
- @REQ(set_caret_window)
- user_handle_t handle; /* handle to the caret window */
- int width; /* caret width */
- int height; /* caret height */
- @REPLY
- user_handle_t previous; /* handle to the previous caret window */
- rectangle_t old_rect; /* previous caret rectangle */
- int old_hide; /* previous hide count */
- int old_state; /* previous caret state (1=on, 0=off) */
- @END
- /* Set the current thread caret information */
- @REQ(set_caret_info)
- unsigned int flags; /* caret flags (see below) */
- user_handle_t handle; /* handle to the caret window */
- int x; /* caret x position */
- int y; /* caret y position */
- int hide; /* increment for hide count (can be negative to show it) */
- int state; /* caret state (see below) */
- @REPLY
- user_handle_t full_handle; /* handle to the current caret window */
- rectangle_t old_rect; /* previous caret rectangle */
- int old_hide; /* previous hide count */
- int old_state; /* previous caret state (1=on, 0=off) */
- @END
- #define SET_CARET_POS 0x01 /* set the caret position from x,y */
- #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
- #define SET_CARET_STATE 0x04 /* set the caret on/off state */
- enum caret_state
- {
- CARET_STATE_OFF, /* off */
- CARET_STATE_ON, /* on */
- CARET_STATE_TOGGLE, /* toggle current state */
- CARET_STATE_ON_IF_MOVED /* on if the position differs, unchanged otherwise */
- };
- /* Set a window hook */
- @REQ(set_hook)
- int id; /* id of the hook */
- process_id_t pid; /* id of process to set the hook into */
- thread_id_t tid; /* id of thread to set the hook into */
- int event_min;
- int event_max;
- client_ptr_t proc; /* hook procedure */
- int flags;
- int unicode; /* is it a unicode hook? */
- VARARG(module,unicode_str); /* module name */
- @REPLY
- user_handle_t handle; /* handle to the hook */
- unsigned int active_hooks; /* active hooks bitmap */
- @END
- /* Remove a window hook */
- @REQ(remove_hook)
- user_handle_t handle; /* handle to the hook */
- client_ptr_t proc; /* hook procedure if handle is 0 */
- int id; /* id of the hook if handle is 0 */
- @REPLY
- unsigned int active_hooks; /* active hooks bitmap */
- @END
- /* Start calling a hook chain */
- @REQ(start_hook_chain)
- int id; /* id of the hook */
- int event; /* signalled event */
- user_handle_t window; /* handle to the event window */
- int object_id; /* object id for out of context winevent */
- int child_id; /* child id for out of context winevent */
- @REPLY
- user_handle_t handle; /* handle to the next hook */
- process_id_t pid; /* process id for low-level keyboard/mouse hooks */
- thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
- int unicode; /* is it a unicode hook? */
- client_ptr_t proc; /* hook procedure */
- unsigned int active_hooks; /* active hooks bitmap */
- VARARG(module,unicode_str); /* module name */
- @END
- /* Finished calling a hook chain */
- @REQ(finish_hook_chain)
- int id; /* id of the hook */
- @END
- /* Get the hook information */
- @REQ(get_hook_info)
- user_handle_t handle; /* handle to the current hook */
- int get_next; /* do we want info about current or next hook? */
- int event; /* signalled event */
- user_handle_t window; /* handle to the event window */
- int object_id; /* object id for out of context winevent */
- int child_id; /* child id for out of context winevent */
- @REPLY
- user_handle_t handle; /* handle to the hook */
- int id; /* id of the hook */
- process_id_t pid; /* process id for low-level keyboard/mouse hooks */
- thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
- client_ptr_t proc; /* hook procedure */
- int unicode; /* is it a unicode hook? */
- VARARG(module,unicode_str); /* module name */
- @END
- /* Create a window class */
- @REQ(create_class)
- int local; /* is it a local class? */
- atom_t atom; /* class atom */
- unsigned int style; /* class style */
- mod_handle_t instance; /* module instance */
- int extra; /* number of extra class bytes */
- int win_extra; /* number of window extra bytes */
- client_ptr_t client_ptr; /* pointer to class in client address space */
- data_size_t name_offset; /* base class name offset for specified atom */
- VARARG(name,unicode_str); /* class name */
- @REPLY
- atom_t atom; /* resulting class atom */
- @END
- /* Destroy a window class */
- @REQ(destroy_class)
- atom_t atom; /* class atom */
- mod_handle_t instance; /* module instance */
- VARARG(name,unicode_str); /* class name */
- @REPLY
- client_ptr_t client_ptr; /* pointer to class in client address space */
- @END
- /* Set some information in a class */
- @REQ(set_class_info)
- user_handle_t window; /* handle to the window */
- unsigned int flags; /* flags for info to set (see below) */
- atom_t atom; /* class atom */
- unsigned int style; /* class style */
- int win_extra; /* number of window extra bytes */
- mod_handle_t instance; /* module instance */
- int extra_offset; /* offset to set in extra bytes */
- data_size_t extra_size; /* size to set in extra bytes */
- lparam_t extra_value; /* value to set in extra bytes */
- @REPLY
- atom_t old_atom; /* previous class atom */
- atom_t base_atom; /* base class atom */
- mod_handle_t old_instance; /* previous module instance */
- lparam_t old_extra_value; /* old value in extra bytes */
- unsigned int old_style; /* previous class style */
- int old_extra; /* previous number of class extra bytes */
- int old_win_extra; /* previous number of window extra bytes */
- @END
- #define SET_CLASS_ATOM 0x0001
- #define SET_CLASS_STYLE 0x0002
- #define SET_CLASS_WINEXTRA 0x0004
- #define SET_CLASS_INSTANCE 0x0008
- #define SET_CLASS_EXTRA 0x0010
- /* Open the clipboard */
- @REQ(open_clipboard)
- user_handle_t window; /* clipboard window */
- @REPLY
- user_handle_t owner; /* current clipboard owner */
- @END
- /* Close the clipboard */
- @REQ(close_clipboard)
- @REPLY
- user_handle_t viewer; /* first clipboard viewer */
- user_handle_t owner; /* current clipboard owner */
- @END
- /* Empty the clipboard and grab ownership */
- @REQ(empty_clipboard)
- @END
- /* Add a data format to the clipboard */
- @REQ(set_clipboard_data)
- unsigned int format; /* clipboard format of the data */
- unsigned int lcid; /* locale id to use for synthesizing text formats */
- VARARG(data,bytes); /* data contents */
- @REPLY
- unsigned int seqno; /* sequence number for the set data */
- @END
- /* Fetch a data format from the clipboard */
- @REQ(get_clipboard_data)
- unsigned int format; /* clipboard format of the data */
- int render; /* will we try to render it if missing? */
- int cached; /* do we already have it in the client-side cache? */
- unsigned int seqno; /* sequence number for the data in the cache */
- @REPLY
- unsigned int from; /* for synthesized data, format to generate it from */
- user_handle_t owner; /* clipboard owner for delayed-rendered formats */
- unsigned int seqno; /* sequence number for the originally set data */
- data_size_t total; /* total data size */
- VARARG(data,bytes); /* data contents */
- @END
- /* Retrieve a list of available formats */
- @REQ(get_clipboard_formats)
- unsigned int format; /* specific format to query, return all if 0 */
- @REPLY
- unsigned int count; /* count of available formats */
- VARARG(formats,uints); /* array of available formats */
- @END
- /* Retrieve the next available format */
- @REQ(enum_clipboard_formats)
- unsigned int previous; /* previous format, or first if 0 */
- @REPLY
- unsigned int format; /* next format */
- @END
- /* Release ownership of the clipboard */
- @REQ(release_clipboard)
- user_handle_t owner; /* clipboard owner to release */
- @REPLY
- user_handle_t viewer; /* first clipboard viewer */
- user_handle_t owner; /* current clipboard owner */
- @END
- /* Get clipboard information */
- @REQ(get_clipboard_info)
- @REPLY
- user_handle_t window; /* clipboard window */
- user_handle_t owner; /* clipboard owner */
- user_handle_t viewer; /* clipboard viewer */
- unsigned int seqno; /* current sequence number */
- @END
- /* Set the clipboard viewer window */
- @REQ(set_clipboard_viewer)
- user_handle_t viewer; /* clipboard viewer */
- user_handle_t previous; /* if non-zero, check that this was the previous viewer */
- @REPLY
- user_handle_t old_viewer; /* previous clipboard viewer */
- user_handle_t owner; /* clipboard owner */
- @END
- /* Add a clipboard listener window */
- @REQ(add_clipboard_listener)
- user_handle_t window; /* clipboard listener window */
- @END
- /* Remove a clipboard listener window */
- @REQ(remove_clipboard_listener)
- user_handle_t window; /* clipboard listener window */
- @END
- /* Open a security token */
- @REQ(open_token)
- obj_handle_t handle; /* handle to the thread or process */
- unsigned int access; /* access rights to the new token */
- unsigned int attributes;/* object attributes */
- unsigned int flags; /* flags (see below) */
- @REPLY
- obj_handle_t token; /* handle to the token */
- @END
- #define OPEN_TOKEN_THREAD 1
- #define OPEN_TOKEN_AS_SELF 2
- /* Set/get the global windows */
- @REQ(set_global_windows)
- unsigned int flags; /* flags for fields to set (see below) */
- user_handle_t shell_window; /* handle to the new shell window */
- user_handle_t shell_listview; /* handle to the new shell listview window */
- user_handle_t progman_window; /* handle to the new program manager window */
- user_handle_t taskman_window; /* handle to the new task manager window */
- @REPLY
- user_handle_t old_shell_window; /* handle to the shell window */
- user_handle_t old_shell_listview; /* handle to the shell listview window */
- user_handle_t old_progman_window; /* handle to the new program manager window */
- user_handle_t old_taskman_window; /* handle to the new task manager window */
- @END
- #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
- #define SET_GLOBAL_PROGMAN_WINDOW 0x02
- #define SET_GLOBAL_TASKMAN_WINDOW 0x04
- /* Adjust the privileges held by a token */
- @REQ(adjust_token_privileges)
- obj_handle_t handle; /* handle to the token */
- int disable_all; /* disable all privileges? */
- int get_modified_state; /* get modified privileges? */
- VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
- @REPLY
- unsigned int len; /* total length in bytes required to store token privileges */
- VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
- @END
- /* Retrieves the set of privileges held by or available to a token */
- @REQ(get_token_privileges)
- obj_handle_t handle; /* handle to the token */
- @REPLY
- unsigned int len; /* total length in bytes required to store token privileges */
- VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
- @END
- /* Check the token has the required privileges */
- @REQ(check_token_privileges)
- obj_handle_t handle; /* handle to the token */
- int all_required; /* are all the privileges required for the check to succeed? */
- VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
- @REPLY
- int has_privileges; /* does the token have the required privileges? */
- VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
- @END
- @REQ(duplicate_token)
- obj_handle_t handle; /* handle to the token to duplicate */
- unsigned int access; /* access rights to the new token */
- int primary; /* is the new token to be a primary one? */
- int impersonation_level; /* impersonation level of the new token */
- VARARG(objattr,object_attributes); /* object attributes */
- @REPLY
- obj_handle_t new_handle; /* duplicated handle */
- @END
- @REQ(filter_token)
- obj_handle_t handle; /* handle to the token to duplicate */
- unsigned int flags; /* flags */
- data_size_t privileges_size; /* size of privileges */
- VARARG(privileges,LUID_AND_ATTRIBUTES,privileges_size); /* privileges to remove from new token */
- VARARG(disable_sids,SID); /* array of groups to remove from new token */
- @REPLY
- obj_handle_t new_handle; /* filtered handle */
- @END
- @REQ(access_check)
- obj_handle_t handle; /* handle to the token */
- unsigned int desired_access; /* desired access to the object */
- unsigned int mapping_read; /* mapping from generic read to specific rights */
- unsigned int mapping_write; /* mapping from generic write to specific rights */
- unsigned int mapping_execute; /* mapping from generic execute to specific rights */
- unsigned int mapping_all; /* mapping from generic all to specific rights */
- VARARG(sd,security_descriptor); /* security descriptor to check */
- @REPLY
- unsigned int access_granted; /* access rights actually granted */
- unsigned int access_status; /* was access granted? */
- unsigned int privileges_len; /* length needed to store privileges */
- VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
- @END
- @REQ(get_token_sid)
- obj_handle_t handle; /* handle to the token */
- unsigned int which_sid; /* which SID to retrieve from the token */
- @REPLY
- data_size_t sid_len; /* length needed to store sid */
- VARARG(sid,SID); /* the sid specified by which_sid from the token */
- @END
- @REQ(get_token_integrity)
- obj_handle_t handle; /* handle to the token */
- @REPLY
- data_size_t sid_len; /* length needed to store sid */
- VARARG(sid,SID); /* the integrity sid */
- @END
- @REQ(get_token_groups)
- obj_handle_t handle; /* handle to the token */
- @REPLY
- data_size_t user_len; /* length needed to store user */
- VARARG(user,token_groups); /* groups the token's user belongs to */
- @END
- @REQ(get_token_default_dacl)
- obj_handle_t handle; /* handle to the token */
- @REPLY
- data_size_t acl_len; /* length needed to store access control list */
- VARARG(acl,ACL); /* access control list */
- @END
- @REQ(set_token_default_dacl)
- obj_handle_t handle; /* handle to the token */
- VARARG(acl,ACL); /* default dacl to set */
- @END
- @REQ(set_security_object)
- obj_handle_t handle; /* handle to the object */
- unsigned int security_info; /* which parts of security descriptor to set */
- VARARG(sd,security_descriptor); /* security descriptor to set */
- @END
- @REQ(get_security_object)
- obj_handle_t handle; /* handle to the object */
- unsigned int security_info; /* which parts of security descriptor to get */
- @REPLY
- unsigned int sd_len; /* buffer size needed for sd */
- VARARG(sd,security_descriptor); /* retrieved security descriptor */
- @END
- struct handle_info
- {
- process_id_t owner;
- obj_handle_t handle;
- unsigned int access;
- unsigned int type;
- client_ptr_t object;
- };
- /* Return a list of all opened handles */
- @REQ(get_system_handles)
- @REPLY
- unsigned int count; /* number of handles */
- VARARG(data,handle_infos); /* array of handle_infos */
- @END
- /* Create a mailslot */
- @REQ(create_mailslot)
- unsigned int access; /* wanted access rights */
- timeout_t read_timeout;
- unsigned int max_msgsize;
- VARARG(objattr,object_attributes); /* object attributes */
- @REPLY
- obj_handle_t handle; /* handle to the mailslot */
- @END
- /* Set mailslot information */
- @REQ(set_mailslot_info)
- obj_handle_t handle; /* handle to the mailslot */
- timeout_t read_timeout;
- unsigned int flags;
- @REPLY
- timeout_t read_timeout;
- unsigned int max_msgsize;
- @END
- #define MAILSLOT_SET_READ_TIMEOUT 1
- /* Create a directory object */
- @REQ(create_directory)
- unsigned int access; /* access flags */
- VARARG(objattr,object_attributes); /* object attributes */
- @REPLY
- obj_handle_t handle; /* handle to the directory */
- @END
- /* Open a directory object */
- @REQ(open_directory)
- unsigned int access; /* access flags */
- unsigned int attributes; /* object attributes */
- obj_handle_t rootdir; /* root directory */
- VARARG(directory_name,unicode_str); /* Directory name */
- @REPLY
- obj_handle_t handle; /* handle to the directory */
- @END
- /* Get a directory entry by index */
- @REQ(get_directory_entry)
- obj_handle_t handle; /* handle to the directory */
- unsigned int index; /* entry index */
- @REPLY
- data_size_t name_len; /* length of the entry name in bytes */
- VARARG(name,unicode_str,name_len); /* entry name */
- VARARG(type,unicode_str); /* entry type */
- @END
- /* Create a symbolic link object */
- @REQ(create_symlink)
- unsigned int access; /* access flags */
- VARARG(objattr,object_attributes); /* object attributes */
- VARARG(target_name,unicode_str); /* target name */
- @REPLY
- obj_handle_t handle; /* handle to the symlink */
- @END
- /* Open a symbolic link object */
- @REQ(open_symlink)
- unsigned int access; /* access flags */
- unsigned int attributes; /* object attributes */
- obj_handle_t rootdir; /* root directory */
- VARARG(name,unicode_str); /* symlink name */
- @REPLY
- obj_handle_t handle; /* handle to the symlink */
- @END
- /* Query a symbolic link object */
- @REQ(query_symlink)
- obj_handle_t handle; /* handle to the symlink */
- @REPLY
- data_size_t total; /* total needed size for name */
- VARARG(target_name,unicode_str); /* target name */
- @END
- /* Query basic object information */
- @REQ(get_object_info)
- obj_handle_t handle; /* handle to the object */
- @REPLY
- unsigned int access; /* granted access mask */
- unsigned int ref_count; /* object ref count */
- unsigned int handle_count; /* object handle count */
- data_size_t total; /* total needed size for name */
- VARARG(name,unicode_str); /* object name */
- @END
- /* Query object type name information */
- @REQ(get_object_type)
- obj_handle_t handle; /* handle to the object */
- @REPLY
- unsigned int index; /* type index */
- data_size_t total; /* needed size for type name */
- VARARG(type,unicode_str); /* type name */
- @END
- /* Query object type name information */
- @REQ(get_object_type_by_index)
- unsigned int index; /* index of the type */
- @REPLY
- data_size_t total; /* needed size for type name */
- VARARG(type,unicode_str); /* type name */
- @END
- /* Unlink a named object */
- @REQ(unlink_object)
- obj_handle_t handle; /* handle to the object */
- @END
- /* Query the impersonation level of an impersonation token */
- @REQ(get_token_impersonation_level)
- obj_handle_t handle; /* handle to the object */
- @REPLY
- int impersonation_level; /* impersonation level of the impersonation token */
- @END
- /* Allocate a locally-unique identifier */
- @REQ(allocate_locally_unique_id)
- @REPLY
- luid_t luid;
- @END
- /* Create a device manager */
- @REQ(create_device_manager)
- unsigned int access; /* wanted access rights */
- unsigned int attributes; /* object attributes */
- @REPLY
- obj_handle_t handle; /* handle to the device */
- @END
- /* Create a device */
- @REQ(create_device)
- obj_handle_t rootdir; /* root directory */
- client_ptr_t user_ptr; /* opaque ptr for use by client */
- obj_handle_t manager; /* device manager */
- VARARG(name,unicode_str); /* object name */
- @END
- /* Delete a device */
- @REQ(delete_device)
- obj_handle_t manager; /* handle to the device manager */
- client_ptr_t device; /* pointer to the device */
- @END
- /* Retrieve the next pending device irp request */
- @REQ(get_next_device_request)
- obj_handle_t manager; /* handle to the device manager */
- obj_handle_t prev; /* handle to the previous irp */
- unsigned int status; /* status of the previous irp */
- client_ptr_t user_ptr; /* user pointer of the previous irp */
- @REPLY
- irp_params_t params; /* irp parameters */
- obj_handle_t next; /* handle to the next irp */
- thread_id_t client_tid; /* tid of thread calling irp */
- client_ptr_t client_thread; /* pointer to thread object of calling irp */
- data_size_t in_size; /* total needed input size */
- VARARG(next_data,bytes); /* input data of the next irp */
- @END
- /* Get kernel pointer from server object */
- @REQ(get_kernel_object_ptr)
- obj_handle_t manager; /* handle to the device manager */
- obj_handle_t handle; /* object handle */
- @REPLY
- client_ptr_t user_ptr; /* kernel object pointer */
- @END
- /* Associate kernel pointer with server object */
- @REQ(set_kernel_object_ptr)
- obj_handle_t manager; /* handle to the device manager */
- obj_handle_t handle; /* object handle */
- client_ptr_t user_ptr; /* kernel object pointer */
- @END
- /* Grab server object reference from kernel object pointer */
- @REQ(grab_kernel_object)
- obj_handle_t manager; /* handle to the device manager */
- client_ptr_t user_ptr; /* kernel object pointer */
- @END
- /* Release server object reference from kernel object pointer */
- @REQ(release_kernel_object)
- obj_handle_t manager; /* handle to the device manager */
- client_ptr_t user_ptr; /* kernel object pointer */
- @END
- /* Get handle from kernel object pointer */
- @REQ(get_kernel_object_handle)
- obj_handle_t manager; /* handle to the device manager */
- client_ptr_t user_ptr; /* kernel object pointer */
- unsigned int access; /* wanted access rights */
- unsigned int attributes;
- @REPLY
- obj_handle_t handle; /* kernel object handle */
- @END
- @REQ(callback_subscribe)
- obj_handle_t manager;
- int callback_mask;
- @END
- enum operation_type { CREATE_PROC, DUP_PROC, CREATE_THRD, DUP_THRD };
- typedef union
- {
- int cb_type;
- struct
- {
- int cb_type;
- int create; /* creation or destruction */
- process_id_t pid;
- process_id_t ppid;
- } process_life;
- struct
- {
- int cb_type;
- int create; /* creation or destruction */
- process_id_t pid;
- thread_id_t tid;
- } thread_life;
- struct
- {
- int cb_type;
- process_id_t pid;
- client_ptr_t base;
- mem_size_t size;
- } image_life;
- struct
- {
- int cb_type;
- enum operation_type op_type;
- unsigned int access;
- unsigned int status;
- process_id_t source_pid;
- process_id_t target_pid;
- obj_handle_t object;
- unsigned int padding;
- } handle_event;
- } krnl_cbdata_t;
- enum kernel_callback_type
- {
- SERVER_CALLBACK_PROC_LIFE = 0x1,
- SERVER_CALLBACK_THRD_LIFE = 0x2,
- SERVER_CALLBACK_IMAGE_LIFE = 0x4,
- SERVER_CALLBACK_HANDLE_EVENT = 0x8
- };
- @REQ(get_next_callback_event)
- obj_handle_t manager;
- @REPLY
- krnl_cbdata_t cb_data;
- thread_id_t client_tid;
- client_ptr_t client_thread;
- VARARG(string_paramenter,unicode_str); /* type defined meaning */
- @END
- @REQ(attach_process)
- obj_handle_t manager;
- client_ptr_t process;
- int detach;
- @END
- /* Make the current process a system process */
- @REQ(make_process_system)
- @REPLY
- obj_handle_t event; /* event signaled when all user processes have exited */
- @END
- /* Get detailed fixed-size information about a token */
- @REQ(get_token_statistics)
- obj_handle_t handle; /* handle to the object */
- @REPLY
- luid_t token_id; /* locally-unique identifier of the token */
- luid_t modified_id; /* locally-unique identifier of the modified version of the token */
- int primary; /* is the token primary or impersonation? */
- int impersonation_level; /* level of impersonation */
- int group_count; /* the number of groups the token is a member of */
- int privilege_count; /* the number of privileges the token has */
- @END
- /* Get elevation level of token */
- @REQ(get_token_elevation_type)
- obj_handle_t handle; /* handle to the object */
- @REPLY
- unsigned int elevation; /* elevation level */
- @END
- /* Create a new token */
- @REQ(create_token)
- unsigned int admin; /* admin or limited token */
- @REPLY
- obj_handle_t token; /* handle for new token */
- @END
- /* Create a new token */
- @REQ(replace_process_token)
- obj_handle_t token; /* new process token */
- @REPLY
- @END
- /* Create I/O completion port */
- @REQ(create_completion)
- unsigned int access; /* desired access to a port */
- unsigned int concurrent; /* max number of concurrent active threads */
- VARARG(objattr,object_attributes); /* object attributes */
- @REPLY
- obj_handle_t handle; /* port handle */
- @END
- /* Open I/O completion port */
- @REQ(open_completion)
- unsigned int access; /* desired access to a port */
- unsigned int attributes; /* object attributes */
- obj_handle_t rootdir; /* root directory */
- VARARG(filename,unicode_str); /* port name */
- @REPLY
- obj_handle_t handle; /* port handle */
- @END
- /* add completion to completion port */
- @REQ(add_completion)
- obj_handle_t handle; /* port handle */
- apc_param_t ckey; /* completion key */
- apc_param_t cvalue; /* completion value */
- apc_param_t information; /* IO_STATUS_BLOCK Information */
- unsigned int status; /* completion result */
- @END
- /* get completion from completion port queue */
- @REQ(remove_completion)
- obj_handle_t handle; /* port handle */
- @REPLY
- apc_param_t ckey; /* completion key */
- apc_param_t cvalue; /* completion value */
- apc_param_t information; /* IO_STATUS_BLOCK Information */
- unsigned int status; /* completion result */
- @END
- /* get completion queue depth */
- @REQ(query_completion)
- obj_handle_t handle; /* port handle */
- @REPLY
- unsigned int depth; /* completion queue depth */
- @END
- /* associate object with completion port */
- @REQ(set_completion_info)
- obj_handle_t handle; /* object handle */
- apc_param_t ckey; /* completion key */
- obj_handle_t chandle; /* port handle */
- @END
- /* check for associated completion and push msg */
- @REQ(add_fd_completion)
- obj_handle_t handle; /* async' object */
- apc_param_t cvalue; /* completion value */
- apc_param_t information; /* IO_STATUS_BLOCK Information */
- unsigned int status; /* completion status */
- int async; /* completion is an async result */
- @END
- /* set fd completion information */
- @REQ(set_fd_completion_mode)
- obj_handle_t handle; /* handle to a file or directory */
- unsigned int flags; /* completion notification flags */
- @END
- /* set fd disposition information */
- @REQ(set_fd_disp_info)
- obj_handle_t handle; /* handle to a file or directory */
- int unlink; /* whether to unlink file on close */
- @END
- /* set fd name information */
- @REQ(set_fd_name_info)
- obj_handle_t handle; /* handle to a file or directory */
- obj_handle_t rootdir; /* root directory */
- int link; /* link instead of renaming */
- int replace; /* replace an existing file? */
- VARARG(filename,string); /* new file name */
- @END
- /* set fd eof information */
- @REQ(set_fd_eof_info)
- obj_handle_t handle; /* handle to a file or directory */
- file_pos_t eof; /* offset of eof of file */
- @END
- /* Retrieve layered info for a window */
- @REQ(get_window_layered_info)
- user_handle_t handle; /* handle to the window */
- @REPLY
- unsigned int color_key; /* color key */
- unsigned int alpha; /* alpha (0..255) */
- unsigned int flags; /* LWA_* flags */
- @END
- /* Set layered info for a window */
- @REQ(set_window_layered_info)
- user_handle_t handle; /* handle to the window */
- unsigned int color_key; /* color key */
- unsigned int alpha; /* alpha (0..255) */
- unsigned int flags; /* LWA_* flags */
- @END
- /* Allocate an arbitrary user handle */
- @REQ(alloc_user_handle)
- @REPLY
- user_handle_t handle; /* allocated handle */
- @END
- /* Free an arbitrary user handle */
- @REQ(free_user_handle)
- user_handle_t handle; /* handle to free*/
- @END
- /* Set/get the current cursor */
- @REQ(set_cursor)
- unsigned int flags; /* flags for fields to set (see below) */
- user_handle_t handle; /* handle to the cursor */
- int show_count; /* show count increment/decrement */
- int x; /* cursor position */
- int y;
- rectangle_t clip; /* cursor clip rectangle */
- unsigned int clip_msg; /* message to post on cursor clip changes */
- @REPLY
- user_handle_t prev_handle; /* previous handle */
- int prev_count; /* previous show count */
- int prev_x; /* previous position */
- int prev_y;
- int new_x; /* new position */
- int new_y;
- rectangle_t new_clip; /* new clip rectangle */
- unsigned int last_change; /* time of last position change */
- @END
- #define SET_CURSOR_HANDLE 0x01
- #define SET_CURSOR_COUNT 0x02
- #define SET_CURSOR_POS 0x04
- #define SET_CURSOR_CLIP 0x08
- #define SET_CURSOR_NOCLIP 0x10
- /* Modify the list of registered rawinput devices */
- @REQ(update_rawinput_devices)
- VARARG(devices,rawinput_devices);
- @END
- /* Retrieve the list of registered rawinput devices */
- @REQ(get_rawinput_devices)
- @REPLY
- unsigned int device_count;
- VARARG(devices,rawinput_devices);
- @END
- /* Retrieve the suspended context of a thread */
- @REQ(get_suspend_context)
- @REPLY
- VARARG(context,context); /* thread context */
- @END
- /* Store the suspend context of a thread */
- @REQ(set_suspend_context)
- VARARG(context,context); /* thread context */
- @END
- /* Create a new job object */
- @REQ(create_job)
- unsigned int access; /* wanted access rights */
- VARARG(objattr,object_attributes); /* object attributes */
- @REPLY
- obj_handle_t handle; /* handle to the job */
- @END
- /* Open a job object */
- @REQ(open_job)
- unsigned int access; /* wanted access rights */
- unsigned int attributes; /* object attributes */
- obj_handle_t rootdir; /* root directory */
- VARARG(name,unicode_str); /* object name */
- @REPLY
- obj_handle_t handle; /* handle to the job */
- @END
- /* Assign a job object to a process */
- @REQ(assign_job)
- obj_handle_t job; /* handle to the job */
- obj_handle_t process; /* handle to the process */
- @END
- /* Check if a process is associated with a job */
- @REQ(process_in_job)
- obj_handle_t job; /* handle to the job */
- obj_handle_t process; /* handle to the process */
- @END
- /* Set limit flags on a job */
- @REQ(set_job_limits)
- obj_handle_t handle; /* handle to the job */
- unsigned int limit_flags; /* new limit flags */
- @END
- /* Set new completion port for a job */
- @REQ(set_job_completion_port)
- obj_handle_t job; /* handle to the job */
- obj_handle_t port; /* handle to the completion port */
- client_ptr_t key; /* key to send with completion messages */
- @END
- /* Terminate all processes associated with the job */
- @REQ(terminate_job)
- obj_handle_t handle; /* handle to the job */
- int status; /* process exit code */
- @END
- /* Suspend a process */
- @REQ(suspend_process)
- obj_handle_t handle; /* process handle */
- @END
- /* Resume a process */
- @REQ(resume_process)
- obj_handle_t handle; /* process handle */
- @END
- /* Return system information values */
- @REQ(get_system_info)
- @REPLY
- unsigned int processes; /* number of processes */
- unsigned int threads; /* number of threads */
- unsigned int handles; /* number of handles */
- @END
- /* Create a new eventfd-based synchronization object */
- @REQ(create_esync)
- unsigned int access; /* wanted access rights */
- int initval; /* initial value */
- int type; /* type of esync object (see below) */
- int max; /* maximum count on a semaphore */
- VARARG(objattr,object_attributes); /* object attributes */
- @REPLY
- obj_handle_t handle; /* handle to the object */
- int type; /* type of esync object (see below) */
- unsigned int shm_idx; /* this object's index into the shm section */
- @END
- /* Open an esync object */
- @REQ(open_esync)
- unsigned int access; /* wanted access rights */
- unsigned int attributes; /* object attributes */
- obj_handle_t rootdir; /* root directory */
- int type; /* type of esync object (above) */
- VARARG(name,unicode_str); /* object name */
- @REPLY
- obj_handle_t handle; /* handle to the event */
- int type; /* type of esync object (above) */
- unsigned int shm_idx; /* this object's index into the shm section */
- @END
- /* Retrieve the esync fd for an object. */
- @REQ(get_esync_fd)
- obj_handle_t handle; /* handle to the object */
- @REPLY
- int type; /* esync type (defined below) */
- unsigned int shm_idx; /* this object's index into the shm section */
- @END
- /* Retrieve the fd to wait on for user APCs. */
- @REQ(get_esync_apc_fd)
- @END
- /* Notify the server that we are doing a message wait (or done with one). */
- @REQ(esync_msgwait)
- int in_msgwait; /* are we in a message wait? */
- @END
- enum esync_type
- {
- ESYNC_SEMAPHORE = 1,
- ESYNC_AUTO_EVENT,
- ESYNC_MANUAL_EVENT,
- ESYNC_MUTEX,
- ESYNC_AUTO_SERVER,
- ESYNC_MANUAL_SERVER,
- ESYNC_QUEUE,
- };
|