trace.c 196 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552
  1. /*
  2. * Server request tracing
  3. *
  4. * Copyright (C) 1999 Alexandre Julliard
  5. *
  6. * This library is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Lesser General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 2.1 of the License, or (at your option) any later version.
  10. *
  11. * This library is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * Lesser General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Lesser General Public
  17. * License along with this library; if not, write to the Free Software
  18. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  19. */
  20. #include "config.h"
  21. #include <ctype.h>
  22. #include <stdarg.h>
  23. #include <stdio.h>
  24. #include <sys/types.h>
  25. #ifdef HAVE_SYS_UIO_H
  26. #include <sys/uio.h>
  27. #endif
  28. #include "ntstatus.h"
  29. #define WIN32_NO_STATUS
  30. #include "windef.h"
  31. #include "winbase.h"
  32. #include "wincon.h"
  33. #include "winternl.h"
  34. #include "winuser.h"
  35. #include "winioctl.h"
  36. #include "wine/condrv.h"
  37. #include "ddk/wdm.h"
  38. #include "ddk/ntddser.h"
  39. #define USE_WS_PREFIX
  40. #include "winsock2.h"
  41. #include "file.h"
  42. #include "request.h"
  43. #include "security.h"
  44. #include "unicode.h"
  45. static const void *cur_data;
  46. static data_size_t cur_size;
  47. static const char *get_status_name( unsigned int status );
  48. /* utility functions */
  49. static inline void remove_data( data_size_t size )
  50. {
  51. cur_data = (const char *)cur_data + size;
  52. cur_size -= size;
  53. }
  54. static void dump_uints( const char *prefix, const unsigned int *ptr, int len )
  55. {
  56. fprintf( stderr, "%s{", prefix );
  57. while (len > 0)
  58. {
  59. fprintf( stderr, "%08x", *ptr++ );
  60. if (--len) fputc( ',', stderr );
  61. }
  62. fputc( '}', stderr );
  63. }
  64. static void dump_handles( const char *prefix, const obj_handle_t *data, data_size_t size )
  65. {
  66. data_size_t len = size / sizeof(*data);
  67. fprintf( stderr,"%s{", prefix );
  68. while (len > 0)
  69. {
  70. fprintf( stderr, "%04x", *data++ );
  71. if (--len) fputc( ',', stderr );
  72. }
  73. fputc( '}', stderr );
  74. }
  75. static void dump_timeout( const char *prefix, const timeout_t *time )
  76. {
  77. fprintf( stderr, "%s%s", prefix, get_timeout_str(*time) );
  78. }
  79. static void dump_abstime( const char *prefix, const abstime_t *when )
  80. {
  81. timeout_t timeout = abstime_to_timeout( *when );
  82. dump_timeout( prefix, &timeout );
  83. }
  84. static void dump_uint64( const char *prefix, const unsigned __int64 *val )
  85. {
  86. if ((unsigned int)*val != *val)
  87. fprintf( stderr, "%s%x%08x", prefix, (unsigned int)(*val >> 32), (unsigned int)*val );
  88. else
  89. fprintf( stderr, "%s%08x", prefix, (unsigned int)*val );
  90. }
  91. static void dump_uint128( const char *prefix, const unsigned __int64 val[2] )
  92. {
  93. unsigned __int64 low = val[0], high = val[1];
  94. if ((unsigned int)high != high)
  95. fprintf( stderr, "%s%x%08x%08x%08x", prefix, (unsigned int)(high >> 32), (unsigned int)high,
  96. (unsigned int)(low >> 32), (unsigned int)low );
  97. else if (high)
  98. fprintf( stderr, "%s%x%08x%08x", prefix, (unsigned int)high,
  99. (unsigned int)(low >> 32), (unsigned int)low );
  100. else if ((unsigned int)low != low)
  101. fprintf( stderr, "%s%x%08x", prefix, (unsigned int)(low >> 32), (unsigned int)low );
  102. else
  103. fprintf( stderr, "%s%x", prefix, (unsigned int)low );
  104. }
  105. static void dump_rectangle( const char *prefix, const rectangle_t *rect )
  106. {
  107. fprintf( stderr, "%s{%d,%d;%d,%d}", prefix,
  108. rect->left, rect->top, rect->right, rect->bottom );
  109. }
  110. static void dump_ioctl_code( const char *prefix, const ioctl_code_t *code )
  111. {
  112. switch(*code)
  113. {
  114. #define CASE(c) case c: fprintf( stderr, "%s%s", prefix, #c ); break
  115. CASE(IOCTL_CONDRV_ACTIVATE);
  116. CASE(IOCTL_CONDRV_BIND_PID);
  117. CASE(IOCTL_CONDRV_CTRL_EVENT);
  118. CASE(IOCTL_CONDRV_FILL_OUTPUT);
  119. CASE(IOCTL_CONDRV_GET_INPUT_INFO);
  120. CASE(IOCTL_CONDRV_GET_MODE);
  121. CASE(IOCTL_CONDRV_GET_OUTPUT_INFO);
  122. CASE(IOCTL_CONDRV_GET_TITLE);
  123. CASE(IOCTL_CONDRV_PEEK);
  124. CASE(IOCTL_CONDRV_READ_CONSOLE);
  125. CASE(IOCTL_CONDRV_READ_INPUT);
  126. CASE(IOCTL_CONDRV_READ_OUTPUT);
  127. CASE(IOCTL_CONDRV_SET_MODE);
  128. CASE(IOCTL_CONDRV_SET_OUTPUT_INFO);
  129. CASE(IOCTL_CONDRV_SETUP_INPUT);
  130. CASE(IOCTL_CONDRV_WRITE_CONSOLE);
  131. CASE(IOCTL_CONDRV_WRITE_INPUT);
  132. CASE(IOCTL_CONDRV_WRITE_OUTPUT);
  133. CASE(FSCTL_DISMOUNT_VOLUME);
  134. CASE(FSCTL_PIPE_DISCONNECT);
  135. CASE(FSCTL_PIPE_LISTEN);
  136. CASE(FSCTL_PIPE_PEEK);
  137. CASE(FSCTL_PIPE_WAIT);
  138. CASE(IOCTL_SERIAL_GET_TIMEOUTS);
  139. CASE(IOCTL_SERIAL_GET_WAIT_MASK);
  140. CASE(IOCTL_SERIAL_SET_TIMEOUTS);
  141. CASE(IOCTL_SERIAL_SET_WAIT_MASK);
  142. CASE(WS_SIO_ADDRESS_LIST_CHANGE);
  143. default: fprintf( stderr, "%s%08x", prefix, *code ); break;
  144. #undef CASE
  145. }
  146. }
  147. static void dump_apc_call( const char *prefix, const apc_call_t *call )
  148. {
  149. fprintf( stderr, "%s{", prefix );
  150. switch(call->type)
  151. {
  152. case APC_NONE:
  153. fprintf( stderr, "APC_NONE" );
  154. break;
  155. case APC_USER:
  156. dump_uint64( "APC_USER,func=", &call->user.func );
  157. dump_uint64( ",args={", &call->user.args[0] );
  158. dump_uint64( ",", &call->user.args[1] );
  159. dump_uint64( ",", &call->user.args[2] );
  160. fputc( '}', stderr );
  161. break;
  162. case APC_ASYNC_IO:
  163. dump_uint64( "APC_ASYNC_IO,user=", &call->async_io.user );
  164. dump_uint64( ",sb=", &call->async_io.sb );
  165. fprintf( stderr, ",status=%s,result=%u", get_status_name(call->async_io.status), call->async_io.result );
  166. break;
  167. case APC_VIRTUAL_ALLOC:
  168. dump_uint64( "APC_VIRTUAL_ALLOC,addr==", &call->virtual_alloc.addr );
  169. dump_uint64( ",size=", &call->virtual_alloc.size );
  170. dump_uint64( ",zero_bits=", &call->virtual_alloc.zero_bits );
  171. fprintf( stderr, ",op_type=%x,prot=%x", call->virtual_alloc.op_type, call->virtual_alloc.prot );
  172. break;
  173. case APC_VIRTUAL_FREE:
  174. dump_uint64( "APC_VIRTUAL_FREE,addr=", &call->virtual_free.addr );
  175. dump_uint64( ",size=", &call->virtual_free.size );
  176. fprintf( stderr, ",op_type=%x", call->virtual_free.op_type );
  177. break;
  178. case APC_VIRTUAL_QUERY:
  179. dump_uint64( "APC_VIRTUAL_QUERY,addr=", &call->virtual_query.addr );
  180. break;
  181. case APC_VIRTUAL_PROTECT:
  182. dump_uint64( "APC_VIRTUAL_PROTECT,addr=", &call->virtual_protect.addr );
  183. dump_uint64( ",size=", &call->virtual_protect.size );
  184. fprintf( stderr, ",prot=%x", call->virtual_protect.prot );
  185. break;
  186. case APC_VIRTUAL_FLUSH:
  187. dump_uint64( "APC_VIRTUAL_FLUSH,addr=", &call->virtual_flush.addr );
  188. dump_uint64( ",size=", &call->virtual_flush.size );
  189. break;
  190. case APC_VIRTUAL_LOCK:
  191. dump_uint64( "APC_VIRTUAL_LOCK,addr=", &call->virtual_lock.addr );
  192. dump_uint64( ",size=", &call->virtual_lock.size );
  193. break;
  194. case APC_VIRTUAL_UNLOCK:
  195. dump_uint64( "APC_VIRTUAL_UNLOCK,addr=", &call->virtual_unlock.addr );
  196. dump_uint64( ",size=", &call->virtual_unlock.size );
  197. break;
  198. case APC_MAP_VIEW:
  199. fprintf( stderr, "APC_MAP_VIEW,handle=%04x", call->map_view.handle );
  200. dump_uint64( ",addr=", &call->map_view.addr );
  201. dump_uint64( ",size=", &call->map_view.size );
  202. dump_uint64( ",offset=", &call->map_view.offset );
  203. dump_uint64( ",zero_bits=", &call->map_view.zero_bits );
  204. fprintf( stderr, ",alloc_type=%x,prot=%x", call->map_view.alloc_type, call->map_view.prot );
  205. break;
  206. case APC_UNMAP_VIEW:
  207. dump_uint64( "APC_UNMAP_VIEW,addr=", &call->unmap_view.addr );
  208. break;
  209. case APC_CREATE_THREAD:
  210. dump_uint64( "APC_CREATE_THREAD,func=", &call->create_thread.func );
  211. dump_uint64( ",arg=", &call->create_thread.arg );
  212. dump_uint64( ",zero_bits=", &call->create_thread.zero_bits );
  213. dump_uint64( ",reserve=", &call->create_thread.reserve );
  214. dump_uint64( ",commit=", &call->create_thread.commit );
  215. fprintf( stderr, ",flags=%x", call->create_thread.flags );
  216. break;
  217. case APC_DUP_HANDLE:
  218. fprintf( stderr, "APC_DUP_HANDLE,src_handle=%04x,dst_process=%04x,access=%x,attributes=%x,options=%x",
  219. call->dup_handle.src_handle, call->dup_handle.dst_process, call->dup_handle.access,
  220. call->dup_handle.attributes, call->dup_handle.options );
  221. break;
  222. default:
  223. fprintf( stderr, "type=%u", call->type );
  224. break;
  225. }
  226. fputc( '}', stderr );
  227. }
  228. static void dump_apc_result( const char *prefix, const apc_result_t *result )
  229. {
  230. fprintf( stderr, "%s{", prefix );
  231. switch(result->type)
  232. {
  233. case APC_NONE:
  234. break;
  235. case APC_ASYNC_IO:
  236. fprintf( stderr, "APC_ASYNC_IO,status=%s,total=%u",
  237. get_status_name( result->async_io.status ), result->async_io.total );
  238. break;
  239. case APC_VIRTUAL_ALLOC:
  240. fprintf( stderr, "APC_VIRTUAL_ALLOC,status=%s",
  241. get_status_name( result->virtual_alloc.status ));
  242. dump_uint64( ",addr=", &result->virtual_alloc.addr );
  243. dump_uint64( ",size=", &result->virtual_alloc.size );
  244. break;
  245. case APC_VIRTUAL_FREE:
  246. fprintf( stderr, "APC_VIRTUAL_FREE,status=%s",
  247. get_status_name( result->virtual_free.status ));
  248. dump_uint64( ",addr=", &result->virtual_free.addr );
  249. dump_uint64( ",size=", &result->virtual_free.size );
  250. break;
  251. case APC_VIRTUAL_QUERY:
  252. fprintf( stderr, "APC_VIRTUAL_QUERY,status=%s",
  253. get_status_name( result->virtual_query.status ));
  254. dump_uint64( ",base=", &result->virtual_query.base );
  255. dump_uint64( ",alloc_base=", &result->virtual_query.alloc_base );
  256. dump_uint64( ",size=", &result->virtual_query.size );
  257. fprintf( stderr, ",state=%x,prot=%x,alloc_prot=%x,alloc_type=%x",
  258. result->virtual_query.state, result->virtual_query.prot,
  259. result->virtual_query.alloc_prot, result->virtual_query.alloc_type );
  260. break;
  261. case APC_VIRTUAL_PROTECT:
  262. fprintf( stderr, "APC_VIRTUAL_PROTECT,status=%s",
  263. get_status_name( result->virtual_protect.status ));
  264. dump_uint64( ",addr=", &result->virtual_protect.addr );
  265. dump_uint64( ",size=", &result->virtual_protect.size );
  266. fprintf( stderr, ",prot=%x", result->virtual_protect.prot );
  267. break;
  268. case APC_VIRTUAL_FLUSH:
  269. fprintf( stderr, "APC_VIRTUAL_FLUSH,status=%s",
  270. get_status_name( result->virtual_flush.status ));
  271. dump_uint64( ",addr=", &result->virtual_flush.addr );
  272. dump_uint64( ",size=", &result->virtual_flush.size );
  273. break;
  274. case APC_VIRTUAL_LOCK:
  275. fprintf( stderr, "APC_VIRTUAL_LOCK,status=%s",
  276. get_status_name( result->virtual_lock.status ));
  277. dump_uint64( ",addr=", &result->virtual_lock.addr );
  278. dump_uint64( ",size=", &result->virtual_lock.size );
  279. break;
  280. case APC_VIRTUAL_UNLOCK:
  281. fprintf( stderr, "APC_VIRTUAL_UNLOCK,status=%s",
  282. get_status_name( result->virtual_unlock.status ));
  283. dump_uint64( ",addr=", &result->virtual_unlock.addr );
  284. dump_uint64( ",size=", &result->virtual_unlock.size );
  285. break;
  286. case APC_MAP_VIEW:
  287. fprintf( stderr, "APC_MAP_VIEW,status=%s",
  288. get_status_name( result->map_view.status ));
  289. dump_uint64( ",addr=", &result->map_view.addr );
  290. dump_uint64( ",size=", &result->map_view.size );
  291. break;
  292. case APC_UNMAP_VIEW:
  293. fprintf( stderr, "APC_UNMAP_VIEW,status=%s",
  294. get_status_name( result->unmap_view.status ) );
  295. break;
  296. case APC_CREATE_THREAD:
  297. fprintf( stderr, "APC_CREATE_THREAD,status=%s,pid=%04x,tid=%04x,handle=%04x",
  298. get_status_name( result->create_thread.status ),
  299. result->create_thread.pid, result->create_thread.tid, result->create_thread.handle );
  300. break;
  301. case APC_DUP_HANDLE:
  302. fprintf( stderr, "APC_DUP_HANDLE,status=%s,handle=%04x",
  303. get_status_name( result->dup_handle.status ), result->dup_handle.handle );
  304. break;
  305. default:
  306. fprintf( stderr, "type=%u", result->type );
  307. break;
  308. }
  309. fputc( '}', stderr );
  310. }
  311. static void dump_async_data( const char *prefix, const async_data_t *data )
  312. {
  313. fprintf( stderr, "%s{handle=%04x,event=%04x", prefix, data->handle, data->event );
  314. dump_uint64( ",iosb=", &data->iosb );
  315. dump_uint64( ",user=", &data->user );
  316. dump_uint64( ",apc=", &data->apc );
  317. dump_uint64( ",apc_context=", &data->apc_context );
  318. fputc( '}', stderr );
  319. }
  320. static void dump_irp_params( const char *prefix, const irp_params_t *data )
  321. {
  322. switch (data->type)
  323. {
  324. case IRP_CALL_NONE:
  325. fprintf( stderr, "%s{NONE}", prefix );
  326. break;
  327. case IRP_CALL_CREATE:
  328. fprintf( stderr, "%s{CREATE,access=%08x,sharing=%08x,options=%08x",
  329. prefix, data->create.access, data->create.sharing, data->create.options );
  330. dump_uint64( ",device=", &data->create.device );
  331. fprintf( stderr, ",file=%08x}", data->create.file );
  332. break;
  333. case IRP_CALL_CLOSE:
  334. fprintf( stderr, "%s{CLOSE", prefix );
  335. dump_uint64( ",file=", &data->close.file );
  336. fputc( '}', stderr );
  337. break;
  338. case IRP_CALL_READ:
  339. fprintf( stderr, "%s{READ,key=%08x,out_size=%u", prefix, data->read.key,
  340. data->read.out_size );
  341. dump_uint64( ",pos=", &data->read.pos );
  342. dump_uint64( ",file=", &data->read.file );
  343. fputc( '}', stderr );
  344. break;
  345. case IRP_CALL_WRITE:
  346. fprintf( stderr, "%s{WRITE,key=%08x", prefix, data->write.key );
  347. dump_uint64( ",pos=", &data->write.pos );
  348. dump_uint64( ",file=", &data->write.file );
  349. fputc( '}', stderr );
  350. break;
  351. case IRP_CALL_FLUSH:
  352. fprintf( stderr, "%s{FLUSH", prefix );
  353. dump_uint64( ",file=", &data->flush.file );
  354. fputc( '}', stderr );
  355. break;
  356. case IRP_CALL_IOCTL:
  357. fprintf( stderr, "%s{IOCTL", prefix );
  358. dump_ioctl_code( ",code=", &data->ioctl.code );
  359. fprintf( stderr, ",out_size=%u", data->ioctl.out_size );
  360. dump_uint64( ",file=", &data->ioctl.file );
  361. fputc( '}', stderr );
  362. break;
  363. case IRP_CALL_VOLUME:
  364. fprintf( stderr, "%s{VOLUME,class=%u,out_size=%u", prefix,
  365. data->volume.info_class, data->volume.out_size );
  366. dump_uint64( ",file=", &data->volume.file );
  367. fputc( '}', stderr );
  368. break;
  369. case IRP_CALL_FREE:
  370. fprintf( stderr, "%s{FREE", prefix );
  371. dump_uint64( ",obj=", &data->free.obj );
  372. fputc( '}', stderr );
  373. break;
  374. case IRP_CALL_CANCEL:
  375. fprintf( stderr, "%s{CANCEL", prefix );
  376. dump_uint64( ",irp=", &data->cancel.irp );
  377. fputc( '}', stderr );
  378. break;
  379. }
  380. }
  381. static void dump_rawinput( const char *prefix, const union rawinput *rawinput )
  382. {
  383. switch (rawinput->type)
  384. {
  385. case RIM_TYPEMOUSE:
  386. fprintf( stderr, "%s{type=MOUSE,x=%d,y=%d,data=%08x}", prefix, rawinput->mouse.x,
  387. rawinput->mouse.y, rawinput->mouse.data );
  388. break;
  389. case RIM_TYPEKEYBOARD:
  390. fprintf( stderr, "%s{type=KEYBOARD,message=%04x,vkey=%04hx,scan=%04hx}", prefix,
  391. rawinput->kbd.message, rawinput->kbd.vkey, rawinput->kbd.scan );
  392. break;
  393. case RIM_TYPEHID:
  394. fprintf( stderr, "%s{type=HID,device=%04x,param=%04x,page=%04hx,usage=%04hx,count=%u,length=%u}",
  395. prefix, rawinput->hid.device, rawinput->hid.param, rawinput->hid.usage_page,
  396. rawinput->hid.usage, rawinput->hid.count, rawinput->hid.length );
  397. break;
  398. default:
  399. fprintf( stderr, "%s{type=%04x}", prefix, rawinput->type );
  400. break;
  401. }
  402. }
  403. static void dump_hw_input( const char *prefix, const hw_input_t *input )
  404. {
  405. switch (input->type)
  406. {
  407. case INPUT_MOUSE:
  408. fprintf( stderr, "%s{type=MOUSE,x=%d,y=%d,data=%08x,flags=%08x,time=%u",
  409. prefix, input->mouse.x, input->mouse.y, input->mouse.data, input->mouse.flags,
  410. input->mouse.time );
  411. dump_uint64( ",info=", &input->mouse.info );
  412. fputc( '}', stderr );
  413. break;
  414. case INPUT_KEYBOARD:
  415. fprintf( stderr, "%s{type=KEYBOARD,vkey=%04hx,scan=%04hx,flags=%08x,time=%u",
  416. prefix, input->kbd.vkey, input->kbd.scan, input->kbd.flags, input->kbd.time );
  417. dump_uint64( ",info=", &input->kbd.info );
  418. fputc( '}', stderr );
  419. break;
  420. case INPUT_HARDWARE:
  421. fprintf( stderr, "%s{type=HARDWARE,msg=%04x", prefix, input->hw.msg );
  422. dump_uint64( ",lparam=", &input->hw.lparam );
  423. switch (input->hw.msg)
  424. {
  425. case WM_INPUT:
  426. case WM_INPUT_DEVICE_CHANGE:
  427. dump_rawinput( ",rawinput=", &input->hw.rawinput );
  428. }
  429. fputc( '}', stderr );
  430. break;
  431. default:
  432. fprintf( stderr, "%s{type=%04x}", prefix, input->type );
  433. break;
  434. }
  435. }
  436. static void dump_luid( const char *prefix, const struct luid *luid )
  437. {
  438. fprintf( stderr, "%s%d.%u", prefix, luid->high_part, luid->low_part );
  439. }
  440. static void dump_generic_map( const char *prefix, const generic_map_t *map )
  441. {
  442. fprintf( stderr, "%s{r=%08x,w=%08x,x=%08x,a=%08x}",
  443. prefix, map->read, map->write, map->exec, map->all );
  444. }
  445. static void dump_varargs_ints( const char *prefix, data_size_t size )
  446. {
  447. const int *data = cur_data;
  448. data_size_t len = size / sizeof(*data);
  449. fprintf( stderr,"%s{", prefix );
  450. while (len > 0)
  451. {
  452. fprintf( stderr, "%d", *data++ );
  453. if (--len) fputc( ',', stderr );
  454. }
  455. fputc( '}', stderr );
  456. remove_data( size );
  457. }
  458. static void dump_varargs_uints( const char *prefix, data_size_t size )
  459. {
  460. const unsigned int *data = cur_data;
  461. dump_uints( prefix, data, size / sizeof(*data) );
  462. remove_data( size );
  463. }
  464. static void dump_varargs_uints64( const char *prefix, data_size_t size )
  465. {
  466. const unsigned __int64 *data = cur_data;
  467. data_size_t len = size / sizeof(*data);
  468. fprintf( stderr,"%s{", prefix );
  469. while (len > 0)
  470. {
  471. dump_uint64( "", data++ );
  472. if (--len) fputc( ',', stderr );
  473. }
  474. fputc( '}', stderr );
  475. remove_data( size );
  476. }
  477. static void dump_varargs_ushorts( const char *prefix, data_size_t size )
  478. {
  479. const unsigned short *data = cur_data;
  480. data_size_t len = size / sizeof(*data);
  481. fprintf( stderr, "%s{", prefix );
  482. while (len > 0)
  483. {
  484. fprintf( stderr, "%04x", *data++ );
  485. if (--len) fputc( ',', stderr );
  486. }
  487. fputc( '}', stderr );
  488. remove_data( size );
  489. }
  490. static void dump_varargs_apc_result( const char *prefix, data_size_t size )
  491. {
  492. const apc_result_t *result = cur_data;
  493. if (size >= sizeof(*result))
  494. {
  495. dump_apc_result( prefix, result );
  496. size = sizeof(*result);
  497. }
  498. remove_data( size );
  499. }
  500. static void dump_varargs_select_op( const char *prefix, data_size_t size )
  501. {
  502. select_op_t data;
  503. if (!size)
  504. {
  505. fprintf( stderr, "%s{}", prefix );
  506. return;
  507. }
  508. memset( &data, 0, sizeof(data) );
  509. memcpy( &data, cur_data, min( size, sizeof(data) ));
  510. fprintf( stderr, "%s{", prefix );
  511. switch (data.op)
  512. {
  513. case SELECT_NONE:
  514. fprintf( stderr, "NONE" );
  515. break;
  516. case SELECT_WAIT:
  517. case SELECT_WAIT_ALL:
  518. fprintf( stderr, "%s", data.op == SELECT_WAIT ? "WAIT" : "WAIT_ALL" );
  519. if (size > offsetof( select_op_t, wait.handles ))
  520. dump_handles( ",handles=", data.wait.handles,
  521. min( size, sizeof(data.wait) ) - offsetof( select_op_t, wait.handles ));
  522. break;
  523. case SELECT_SIGNAL_AND_WAIT:
  524. fprintf( stderr, "SIGNAL_AND_WAIT,signal=%04x,wait=%04x",
  525. data.signal_and_wait.signal, data.signal_and_wait.wait );
  526. break;
  527. case SELECT_KEYED_EVENT_WAIT:
  528. case SELECT_KEYED_EVENT_RELEASE:
  529. fprintf( stderr, "KEYED_EVENT_%s,handle=%04x",
  530. data.op == SELECT_KEYED_EVENT_WAIT ? "WAIT" : "RELEASE",
  531. data.keyed_event.handle );
  532. dump_uint64( ",key=", &data.keyed_event.key );
  533. break;
  534. default:
  535. fprintf( stderr, "op=%u", data.op );
  536. break;
  537. }
  538. fputc( '}', stderr );
  539. remove_data( size );
  540. }
  541. static void dump_varargs_user_handles( const char *prefix, data_size_t size )
  542. {
  543. const user_handle_t *data = cur_data;
  544. data_size_t len = size / sizeof(*data);
  545. fprintf( stderr,"%s{", prefix );
  546. while (len > 0)
  547. {
  548. fprintf( stderr, "%08x", *data++ );
  549. if (--len) fputc( ',', stderr );
  550. }
  551. fputc( '}', stderr );
  552. remove_data( size );
  553. }
  554. static void dump_varargs_bytes( const char *prefix, data_size_t size )
  555. {
  556. const unsigned char *data = cur_data;
  557. data_size_t len = min( 1024, size );
  558. fprintf( stderr,"%s{", prefix );
  559. while (len > 0)
  560. {
  561. fprintf( stderr, "%02x", *data++ );
  562. if (--len) fputc( ',', stderr );
  563. }
  564. if (size > 1024) fprintf( stderr, "...(total %u)", size );
  565. fputc( '}', stderr );
  566. remove_data( size );
  567. }
  568. static void dump_varargs_string( const char *prefix, data_size_t size )
  569. {
  570. fprintf( stderr, "%s\"%.*s\"", prefix, (int)size, (const char *)cur_data );
  571. remove_data( size );
  572. }
  573. static void dump_varargs_unicode_str( const char *prefix, data_size_t size )
  574. {
  575. fprintf( stderr, "%sL\"", prefix );
  576. dump_strW( cur_data, size, stderr, "\"\"" );
  577. fputc( '\"', stderr );
  578. remove_data( size );
  579. }
  580. static void dump_varargs_context( const char *prefix, data_size_t size )
  581. {
  582. const context_t *context = cur_data;
  583. context_t ctx;
  584. unsigned int i;
  585. if (!size)
  586. {
  587. fprintf( stderr, "%s{}", prefix );
  588. return;
  589. }
  590. size = min( size, sizeof(ctx) );
  591. memset( &ctx, 0, sizeof(ctx) );
  592. memcpy( &ctx, context, size );
  593. switch (ctx.machine)
  594. {
  595. case IMAGE_FILE_MACHINE_I386:
  596. fprintf( stderr, "%s{machine=i386", prefix );
  597. if (ctx.flags & SERVER_CTX_CONTROL)
  598. fprintf( stderr, ",eip=%08x,esp=%08x,ebp=%08x,eflags=%08x,cs=%04x,ss=%04x",
  599. ctx.ctl.i386_regs.eip, ctx.ctl.i386_regs.esp, ctx.ctl.i386_regs.ebp,
  600. ctx.ctl.i386_regs.eflags, ctx.ctl.i386_regs.cs, ctx.ctl.i386_regs.ss );
  601. if (ctx.flags & SERVER_CTX_SEGMENTS)
  602. fprintf( stderr, ",ds=%04x,es=%04x,fs=%04x,gs=%04x",
  603. ctx.seg.i386_regs.ds, ctx.seg.i386_regs.es,
  604. ctx.seg.i386_regs.fs, ctx.seg.i386_regs.gs );
  605. if (ctx.flags & SERVER_CTX_INTEGER)
  606. fprintf( stderr, ",eax=%08x,ebx=%08x,ecx=%08x,edx=%08x,esi=%08x,edi=%08x",
  607. ctx.integer.i386_regs.eax, ctx.integer.i386_regs.ebx, ctx.integer.i386_regs.ecx,
  608. ctx.integer.i386_regs.edx, ctx.integer.i386_regs.esi, ctx.integer.i386_regs.edi );
  609. if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
  610. fprintf( stderr, ",dr0=%08x,dr1=%08x,dr2=%08x,dr3=%08x,dr6=%08x,dr7=%08x",
  611. ctx.debug.i386_regs.dr0, ctx.debug.i386_regs.dr1, ctx.debug.i386_regs.dr2,
  612. ctx.debug.i386_regs.dr3, ctx.debug.i386_regs.dr6, ctx.debug.i386_regs.dr7 );
  613. if (ctx.flags & SERVER_CTX_FLOATING_POINT)
  614. {
  615. fprintf( stderr, ",fp.ctrl=%08x,fp.status=%08x,fp.tag=%08x,fp.err_off=%08x,fp.err_sel=%08x",
  616. ctx.fp.i386_regs.ctrl, ctx.fp.i386_regs.status, ctx.fp.i386_regs.tag,
  617. ctx.fp.i386_regs.err_off, ctx.fp.i386_regs.err_sel );
  618. fprintf( stderr, ",fp.data_off=%08x,fp.data_sel=%08x,fp.cr0npx=%08x",
  619. ctx.fp.i386_regs.data_off, ctx.fp.i386_regs.data_sel, ctx.fp.i386_regs.cr0npx );
  620. for (i = 0; i < 8; i++)
  621. {
  622. unsigned __int64 reg[2];
  623. memset( reg, 0, sizeof(reg) );
  624. memcpy( reg, &ctx.fp.i386_regs.regs[10 * i], 10 );
  625. fprintf( stderr, ",fp.reg%u=", i );
  626. dump_uint128( "", reg );
  627. }
  628. }
  629. if (ctx.flags & SERVER_CTX_EXTENDED_REGISTERS)
  630. dump_uints( ",extended=", (const unsigned int *)ctx.ext.i386_regs,
  631. sizeof(ctx.ext.i386_regs) / sizeof(int) );
  632. if (ctx.flags & SERVER_CTX_YMM_REGISTERS)
  633. for (i = 0; i < 16; i++)
  634. {
  635. fprintf( stderr, ",ymm%u=", i );
  636. dump_uint128( "", (const unsigned __int64 *)&ctx.ymm.regs.ymm_high[i] );
  637. }
  638. break;
  639. case IMAGE_FILE_MACHINE_AMD64:
  640. fprintf( stderr, "%s{machine=x86_64", prefix );
  641. if (ctx.flags & SERVER_CTX_CONTROL)
  642. {
  643. dump_uint64( ",rip=", &ctx.ctl.x86_64_regs.rip );
  644. dump_uint64( ",rbp=", &ctx.ctl.x86_64_regs.rbp );
  645. dump_uint64( ",rsp=", &ctx.ctl.x86_64_regs.rsp );
  646. fprintf( stderr, ",cs=%04x,ss=%04x,flags=%08x",
  647. ctx.ctl.x86_64_regs.cs, ctx.ctl.x86_64_regs.ss, ctx.ctl.x86_64_regs.flags );
  648. }
  649. if (ctx.flags & SERVER_CTX_INTEGER)
  650. {
  651. dump_uint64( ",rax=", &ctx.integer.x86_64_regs.rax );
  652. dump_uint64( ",rbx=", &ctx.integer.x86_64_regs.rbx );
  653. dump_uint64( ",rcx=", &ctx.integer.x86_64_regs.rcx );
  654. dump_uint64( ",rdx=", &ctx.integer.x86_64_regs.rdx );
  655. dump_uint64( ",rsi=", &ctx.integer.x86_64_regs.rsi );
  656. dump_uint64( ",rdi=", &ctx.integer.x86_64_regs.rdi );
  657. dump_uint64( ",r8=", &ctx.integer.x86_64_regs.r8 );
  658. dump_uint64( ",r9=", &ctx.integer.x86_64_regs.r9 );
  659. dump_uint64( ",r10=", &ctx.integer.x86_64_regs.r10 );
  660. dump_uint64( ",r11=", &ctx.integer.x86_64_regs.r11 );
  661. dump_uint64( ",r12=", &ctx.integer.x86_64_regs.r12 );
  662. dump_uint64( ",r13=", &ctx.integer.x86_64_regs.r13 );
  663. dump_uint64( ",r14=", &ctx.integer.x86_64_regs.r14 );
  664. dump_uint64( ",r15=", &ctx.integer.x86_64_regs.r15 );
  665. }
  666. if (ctx.flags & SERVER_CTX_SEGMENTS)
  667. fprintf( stderr, ",ds=%04x,es=%04x,fs=%04x,gs=%04x",
  668. ctx.seg.x86_64_regs.ds, ctx.seg.x86_64_regs.es,
  669. ctx.seg.x86_64_regs.fs, ctx.seg.x86_64_regs.gs );
  670. if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
  671. {
  672. dump_uint64( ",dr0=", &ctx.debug.x86_64_regs.dr0 );
  673. dump_uint64( ",dr1=", &ctx.debug.x86_64_regs.dr1 );
  674. dump_uint64( ",dr2=", &ctx.debug.x86_64_regs.dr2 );
  675. dump_uint64( ",dr3=", &ctx.debug.x86_64_regs.dr3 );
  676. dump_uint64( ",dr6=", &ctx.debug.x86_64_regs.dr6 );
  677. dump_uint64( ",dr7=", &ctx.debug.x86_64_regs.dr7 );
  678. }
  679. if (ctx.flags & SERVER_CTX_FLOATING_POINT)
  680. for (i = 0; i < 32; i++)
  681. {
  682. fprintf( stderr, ",fp%u=", i );
  683. dump_uint128( "", (const unsigned __int64 *)&ctx.fp.x86_64_regs.fpregs[i] );
  684. }
  685. if (ctx.flags & SERVER_CTX_YMM_REGISTERS)
  686. for (i = 0; i < 16; i++)
  687. {
  688. fprintf( stderr, ",ymm%u=", i );
  689. dump_uint128( "", (const unsigned __int64 *)&ctx.ymm.regs.ymm_high[i] );
  690. }
  691. break;
  692. case IMAGE_FILE_MACHINE_ARMNT:
  693. fprintf( stderr, "%s{machine=arm", prefix );
  694. if (ctx.flags & SERVER_CTX_CONTROL)
  695. fprintf( stderr, ",sp=%08x,lr=%08x,pc=%08x,cpsr=%08x",
  696. ctx.ctl.arm_regs.sp, ctx.ctl.arm_regs.lr,
  697. ctx.ctl.arm_regs.pc, ctx.ctl.arm_regs.cpsr );
  698. if (ctx.flags & SERVER_CTX_INTEGER)
  699. for (i = 0; i < 13; i++) fprintf( stderr, ",r%u=%08x", i, ctx.integer.arm_regs.r[i] );
  700. if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
  701. {
  702. for (i = 0; i < 8; i++)
  703. fprintf( stderr, ",bcr%u=%08x,bvr%u=%08x",
  704. i, ctx.debug.arm_regs.bcr[i], i, ctx.debug.arm_regs.bvr[i] );
  705. fprintf( stderr, ",wcr0=%08x,wvr0=%08x",
  706. ctx.debug.arm_regs.wcr[0], ctx.debug.arm_regs.wvr[0] );
  707. }
  708. if (ctx.flags & SERVER_CTX_FLOATING_POINT)
  709. {
  710. for (i = 0; i < 32; i++)
  711. {
  712. fprintf( stderr, ",d%u=", i );
  713. dump_uint64( "", &ctx.fp.arm_regs.d[i] );
  714. }
  715. fprintf( stderr, ",fpscr=%08x", ctx.fp.arm_regs.fpscr );
  716. }
  717. break;
  718. case IMAGE_FILE_MACHINE_ARM64:
  719. fprintf( stderr, "%s{machine=arm64", prefix );
  720. if (ctx.flags & SERVER_CTX_CONTROL)
  721. {
  722. dump_uint64( ",sp=", &ctx.ctl.arm64_regs.sp );
  723. dump_uint64( ",pc=", &ctx.ctl.arm64_regs.pc );
  724. dump_uint64( ",pstate=", &ctx.ctl.arm64_regs.pstate );
  725. }
  726. if (ctx.flags & SERVER_CTX_INTEGER)
  727. {
  728. for (i = 0; i < 31; i++)
  729. {
  730. fprintf( stderr, ",x%u=", i );
  731. dump_uint64( "", &ctx.integer.arm64_regs.x[i] );
  732. }
  733. }
  734. if (ctx.flags & SERVER_CTX_DEBUG_REGISTERS)
  735. {
  736. for (i = 0; i < 8; i++)
  737. {
  738. fprintf( stderr, ",bcr%u=%08x,bvr%u=", i, ctx.debug.arm64_regs.bcr[i], i );
  739. dump_uint64( "", &ctx.debug.arm64_regs.bvr[i] );
  740. }
  741. for (i = 0; i < 2; i++)
  742. {
  743. fprintf( stderr, ",wcr%u=%08x,wvr%u=", i, ctx.debug.arm64_regs.wcr[i], i );
  744. dump_uint64( "", &ctx.debug.arm64_regs.wvr[i] );
  745. }
  746. }
  747. if (ctx.flags & SERVER_CTX_FLOATING_POINT)
  748. {
  749. for (i = 0; i < 32; i++)
  750. {
  751. fprintf( stderr, ",q%u=", i );
  752. dump_uint64( "", &ctx.fp.arm64_regs.q[i].high );
  753. dump_uint64( "", &ctx.fp.arm64_regs.q[i].low );
  754. }
  755. fprintf( stderr, ",fpcr=%08x,fpsr=%08x", ctx.fp.arm64_regs.fpcr, ctx.fp.arm64_regs.fpsr );
  756. }
  757. break;
  758. default:
  759. fprintf( stderr, "%s{machine=%04x", prefix, ctx.machine );
  760. break;
  761. }
  762. fputc( '}', stderr );
  763. remove_data( size );
  764. }
  765. static void dump_varargs_contexts( const char *prefix, data_size_t size )
  766. {
  767. if (!size)
  768. {
  769. fprintf( stderr, "%s{}", prefix );
  770. return;
  771. }
  772. fprintf( stderr, "%s{", prefix );
  773. while (cur_size)
  774. {
  775. dump_varargs_context( "", cur_size );
  776. fputc( cur_size ? ',' : '}', stderr );
  777. }
  778. }
  779. static void dump_varargs_debug_event( const char *prefix, data_size_t size )
  780. {
  781. debug_event_t event;
  782. unsigned int i;
  783. if (!size)
  784. {
  785. fprintf( stderr, "%s{}", prefix );
  786. return;
  787. }
  788. size = min( size, sizeof(event) );
  789. memset( &event, 0, sizeof(event) );
  790. memcpy( &event, cur_data, size );
  791. switch(event.code)
  792. {
  793. case DbgIdle:
  794. fprintf( stderr, "%s{idle}", prefix );
  795. break;
  796. case DbgReplyPending:
  797. fprintf( stderr, "%s{pending}", prefix );
  798. break;
  799. case DbgCreateThreadStateChange:
  800. fprintf( stderr, "%s{create_thread,thread=%04x", prefix, event.create_thread.handle );
  801. dump_uint64( ",start=", &event.create_thread.start );
  802. fputc( '}', stderr );
  803. break;
  804. case DbgCreateProcessStateChange:
  805. fprintf( stderr, "%s{create_process,file=%04x,process=%04x,thread=%04x", prefix,
  806. event.create_process.file, event.create_process.process,
  807. event.create_process.thread );
  808. dump_uint64( ",base=", &event.create_process.base );
  809. fprintf( stderr, ",offset=%d,size=%d",
  810. event.create_process.dbg_offset, event.create_process.dbg_size );
  811. dump_uint64( ",start=", &event.create_process.start );
  812. fputc( '}', stderr );
  813. break;
  814. case DbgExitThreadStateChange:
  815. fprintf( stderr, "%s{exit_thread,code=%d}", prefix, event.exit.exit_code );
  816. break;
  817. case DbgExitProcessStateChange:
  818. fprintf( stderr, "%s{exit_process,code=%d}", prefix, event.exit.exit_code );
  819. break;
  820. case DbgExceptionStateChange:
  821. case DbgBreakpointStateChange:
  822. case DbgSingleStepStateChange:
  823. fprintf( stderr, "%s{%s,first=%d,exc_code=%08x,flags=%08x", prefix,
  824. event.code == DbgBreakpointStateChange ? "breakpoint" :
  825. event.code == DbgSingleStepStateChange ? "singlestep" : "exception",
  826. event.exception.first, event.exception.exc_code, event.exception.flags );
  827. dump_uint64( ",record=", &event.exception.record );
  828. dump_uint64( ",address=", &event.exception.address );
  829. fprintf( stderr, ",params={" );
  830. event.exception.nb_params = min( event.exception.nb_params, EXCEPTION_MAXIMUM_PARAMETERS );
  831. for (i = 0; i < event.exception.nb_params; i++)
  832. {
  833. dump_uint64( "", &event.exception.params[i] );
  834. if (i < event.exception.nb_params) fputc( ',', stderr );
  835. }
  836. fprintf( stderr, "}}" );
  837. break;
  838. case DbgLoadDllStateChange:
  839. fprintf( stderr, "%s{load_dll,file=%04x", prefix, event.load_dll.handle );
  840. dump_uint64( ",base=", &event.load_dll.base );
  841. fprintf( stderr, ",offset=%d,size=%d",
  842. event.load_dll.dbg_offset, event.load_dll.dbg_size );
  843. dump_uint64( ",name=", &event.load_dll.name );
  844. fputc( '}', stderr );
  845. break;
  846. case DbgUnloadDllStateChange:
  847. fprintf( stderr, "%s{unload_dll", prefix );
  848. dump_uint64( ",base=", &event.unload_dll.base );
  849. fputc( '}', stderr );
  850. break;
  851. default:
  852. fprintf( stderr, "%s{code=??? (%d)}", prefix, event.code );
  853. break;
  854. }
  855. remove_data( size );
  856. }
  857. /* dump a unicode string contained in a buffer; helper for dump_varargs_startup_info */
  858. static data_size_t dump_inline_unicode_string( const char *prefix, data_size_t pos, data_size_t len, data_size_t total_size )
  859. {
  860. fputs( prefix, stderr );
  861. if (pos >= total_size) return pos;
  862. if (len > total_size - pos) len = total_size - pos;
  863. dump_strW( (const WCHAR *)cur_data + pos/sizeof(WCHAR), len, stderr, "\"\"" );
  864. return pos + (len / sizeof(WCHAR)) * sizeof(WCHAR);
  865. }
  866. static void dump_varargs_startup_info( const char *prefix, data_size_t size )
  867. {
  868. startup_info_t info;
  869. data_size_t pos = sizeof(info);
  870. memset( &info, 0, sizeof(info) );
  871. memcpy( &info, cur_data, min( size, sizeof(info) ));
  872. fprintf( stderr,
  873. "%s{debug_flags=%x,console_flags=%x,console=%04x,hstdin=%04x,hstdout=%04x,hstderr=%04x,"
  874. "x=%u,y=%u,xsize=%u,ysize=%u,xchars=%u,ychars=%u,attribute=%02x,flags=%x,show=%u",
  875. prefix, info.debug_flags, info.console_flags, info.console,
  876. info.hstdin, info.hstdout, info.hstderr, info.x, info.y, info.xsize, info.ysize,
  877. info.xchars, info.ychars, info.attribute, info.flags, info.show );
  878. pos = dump_inline_unicode_string( ",curdir=L\"", pos, info.curdir_len, size );
  879. pos = dump_inline_unicode_string( "\",dllpath=L\"", pos, info.dllpath_len, size );
  880. pos = dump_inline_unicode_string( "\",imagepath=L\"", pos, info.imagepath_len, size );
  881. pos = dump_inline_unicode_string( "\",cmdline=L\"", pos, info.cmdline_len, size );
  882. pos = dump_inline_unicode_string( "\",title=L\"", pos, info.title_len, size );
  883. pos = dump_inline_unicode_string( "\",desktop=L\"", pos, info.desktop_len, size );
  884. pos = dump_inline_unicode_string( "\",shellinfo=L\"", pos, info.shellinfo_len, size );
  885. pos = dump_inline_unicode_string( "\",runtime=L\"", pos, info.runtime_len, size );
  886. fprintf( stderr, "\"}" );
  887. remove_data( size );
  888. }
  889. static void dump_varargs_rectangles( const char *prefix, data_size_t size )
  890. {
  891. const rectangle_t *rect = cur_data;
  892. data_size_t len = size / sizeof(*rect);
  893. fprintf( stderr,"%s{", prefix );
  894. while (len > 0)
  895. {
  896. dump_rectangle( "", rect++ );
  897. if (--len) fputc( ',', stderr );
  898. }
  899. fputc( '}', stderr );
  900. remove_data( size );
  901. }
  902. static void dump_varargs_cursor_positions( const char *prefix, data_size_t size )
  903. {
  904. const cursor_pos_t *pos = cur_data;
  905. data_size_t len = size / sizeof(*pos);
  906. fprintf( stderr, "%s{", prefix );
  907. while (len > 0)
  908. {
  909. fprintf( stderr, "{x=%d,y=%d,time=%u", pos->x, pos->y, pos->time );
  910. dump_uint64( ",info=", &pos->info );
  911. fputc( '}', stderr );
  912. pos++;
  913. if (--len) fputc( ',', stderr );
  914. }
  915. fputc( '}', stderr );
  916. remove_data( size );
  917. }
  918. static void dump_varargs_message_data( const char *prefix, data_size_t size )
  919. {
  920. /* FIXME: dump the structured data */
  921. dump_varargs_bytes( prefix, size );
  922. }
  923. static void dump_varargs_properties( const char *prefix, data_size_t size )
  924. {
  925. const property_data_t *prop = cur_data;
  926. data_size_t len = size / sizeof(*prop);
  927. fprintf( stderr,"%s{", prefix );
  928. while (len > 0)
  929. {
  930. fprintf( stderr, "{atom=%04x,str=%d", prop->atom, prop->string );
  931. dump_uint64( ",data=", &prop->data );
  932. fputc( '}', stderr );
  933. prop++;
  934. if (--len) fputc( ',', stderr );
  935. }
  936. fputc( '}', stderr );
  937. remove_data( size );
  938. }
  939. static void dump_varargs_luid_attr( const char *prefix, data_size_t size )
  940. {
  941. const struct luid_attr *lat = cur_data;
  942. data_size_t len = size / sizeof(*lat);
  943. fprintf( stderr,"%s{", prefix );
  944. while (len > 0)
  945. {
  946. fprintf( stderr, "{luid=%08x%08x,attrs=%x}", lat->luid.high_part, lat->luid.low_part, lat->attrs );
  947. lat++;
  948. if (--len) fputc( ',', stderr );
  949. }
  950. fputc( '}', stderr );
  951. remove_data( size );
  952. }
  953. static void dump_inline_sid( const char *prefix, const struct sid *sid, data_size_t size )
  954. {
  955. DWORD i;
  956. fprintf( stderr,"%s", prefix );
  957. if (sid_valid_size( sid, size ))
  958. {
  959. fprintf( stderr, "S-%u-%u", sid->revision,
  960. ((unsigned int)sid->id_auth[2] << 24) |
  961. ((unsigned int)sid->id_auth[3] << 16) |
  962. ((unsigned int)sid->id_auth[4] << 8) |
  963. ((unsigned int)sid->id_auth[5]) );
  964. for (i = 0; i < sid->sub_count; i++) fprintf( stderr, "-%u", sid->sub_auth[i] );
  965. }
  966. else fprintf( stderr, "<invalid>" );
  967. }
  968. static void dump_varargs_sid( const char *prefix, data_size_t size )
  969. {
  970. const struct sid *sid = cur_data;
  971. if (size) dump_inline_sid( prefix, sid, size );
  972. remove_data( size );
  973. }
  974. static void dump_varargs_sids( const char *prefix, data_size_t size )
  975. {
  976. const struct sid *sid = cur_data;
  977. data_size_t len = size;
  978. fprintf( stderr,"%s{", prefix );
  979. while (len > 0)
  980. {
  981. if (!sid_valid_size( sid, len ))
  982. {
  983. fprintf( stderr, "bad len %u", len);
  984. break;
  985. }
  986. dump_inline_sid( "", sid, size );
  987. len -= sid_len( sid );
  988. sid = (const struct sid *)((const char *)sid + sid_len( sid ));
  989. if (len) fputc( ',', stderr );
  990. }
  991. fputc( '}', stderr );
  992. remove_data( size );
  993. }
  994. static void dump_inline_acl( const char *prefix, const struct acl *acl, data_size_t size )
  995. {
  996. const struct ace *ace;
  997. ULONG i;
  998. fprintf( stderr,"%s{", prefix );
  999. if (size)
  1000. {
  1001. if (size < sizeof(*acl))
  1002. {
  1003. fprintf( stderr, "<invalid acl>}" );
  1004. return;
  1005. }
  1006. size -= sizeof(*acl);
  1007. for (i = 0, ace = ace_first( acl ); i < acl->count; i++, ace = ace_next( ace ))
  1008. {
  1009. const struct sid *sid = (const struct sid *)(ace + 1);
  1010. data_size_t sid_size;
  1011. if (size < sizeof(*ace) || size < ace->size) break;
  1012. size -= ace->size;
  1013. sid_size = ace->size - sizeof(*ace);
  1014. if (i != 0) fputc( ',', stderr );
  1015. fprintf( stderr, "{type=" );
  1016. switch (ace->type)
  1017. {
  1018. case ACCESS_DENIED_ACE_TYPE: fprintf( stderr, "ACCESS_DENIED" ); break;
  1019. case ACCESS_ALLOWED_ACE_TYPE: fprintf( stderr, "ACCESS_ALLOWED" ); break;
  1020. case SYSTEM_AUDIT_ACE_TYPE: fprintf( stderr, "SYSTEM_AUDIT" ); break;
  1021. case SYSTEM_ALARM_ACE_TYPE: fprintf( stderr, "SYSTEM_ALARM" ); break;
  1022. case SYSTEM_MANDATORY_LABEL_ACE_TYPE: fprintf( stderr, "SYSTEM_MANDATORY_LABEL" ); break;
  1023. default:
  1024. fprintf( stderr, "%02x", ace->type );
  1025. sid = NULL;
  1026. break;
  1027. }
  1028. fprintf( stderr, ",flags=%x,mask=%x", ace->flags, ace->mask );
  1029. if (sid) dump_inline_sid( ",sid=", sid, sid_size );
  1030. fputc( '}', stderr );
  1031. }
  1032. }
  1033. fputc( '}', stderr );
  1034. }
  1035. static void dump_varargs_acl( const char *prefix, data_size_t size )
  1036. {
  1037. const struct acl *acl = cur_data;
  1038. dump_inline_acl( prefix, acl, size );
  1039. remove_data( size );
  1040. }
  1041. static void dump_inline_security_descriptor( const char *prefix, const struct security_descriptor *sd, data_size_t size )
  1042. {
  1043. fprintf( stderr,"%s{", prefix );
  1044. if (size >= sizeof(struct security_descriptor))
  1045. {
  1046. size_t offset = sizeof(struct security_descriptor);
  1047. fprintf( stderr, "control=%08x", sd->control );
  1048. if ((sd->owner_len > offsetof(struct sid, sub_auth[255])) || (offset + sd->owner_len > size))
  1049. return;
  1050. if (sd->owner_len)
  1051. dump_inline_sid( ",owner=", (const struct sid *)((const char *)sd + offset), sd->owner_len );
  1052. else
  1053. fprintf( stderr, ",owner=<not present>" );
  1054. offset += sd->owner_len;
  1055. if ((sd->group_len > offsetof(struct sid, sub_auth[255])) || (offset + sd->group_len > size))
  1056. return;
  1057. if (sd->group_len)
  1058. dump_inline_sid( ",group=", (const struct sid *)((const char *)sd + offset), sd->group_len );
  1059. else
  1060. fprintf( stderr, ",group=<not present>" );
  1061. offset += sd->group_len;
  1062. if ((sd->sacl_len >= MAX_ACL_LEN) || (offset + sd->sacl_len > size))
  1063. return;
  1064. dump_inline_acl( ",sacl=", (const struct acl *)((const char *)sd + offset), sd->sacl_len );
  1065. offset += sd->sacl_len;
  1066. if ((sd->dacl_len >= MAX_ACL_LEN) || (offset + sd->dacl_len > size))
  1067. return;
  1068. dump_inline_acl( ",dacl=", (const struct acl *)((const char *)sd + offset), sd->dacl_len );
  1069. offset += sd->dacl_len;
  1070. }
  1071. fputc( '}', stderr );
  1072. }
  1073. static void dump_varargs_security_descriptor( const char *prefix, data_size_t size )
  1074. {
  1075. const struct security_descriptor *sd = cur_data;
  1076. dump_inline_security_descriptor( prefix, sd, size );
  1077. remove_data( size );
  1078. }
  1079. static void dump_varargs_process_info( const char *prefix, data_size_t size )
  1080. {
  1081. data_size_t pos = 0;
  1082. unsigned int i;
  1083. fprintf( stderr,"%s{", prefix );
  1084. while (size - pos >= sizeof(struct process_info))
  1085. {
  1086. const struct process_info *process;
  1087. pos = (pos + 7) & ~7;
  1088. process = (const struct process_info *)((const char *)cur_data + pos);
  1089. if (size - pos < sizeof(*process)) break;
  1090. if (pos) fputc( ',', stderr );
  1091. dump_timeout( "{start_time=", &process->start_time );
  1092. fprintf( stderr, ",thread_count=%u,priority=%d,pid=%04x,parent_pid=%04x,session_id=%08x,handle_count=%u,unix_pid=%d,",
  1093. process->thread_count, process->priority, process->pid,
  1094. process->parent_pid, process->session_id, process->handle_count, process->unix_pid );
  1095. pos += sizeof(*process);
  1096. pos = dump_inline_unicode_string( "name=L\"", pos, process->name_len, size );
  1097. pos = (pos + 7) & ~7;
  1098. fprintf( stderr, "\",threads={" );
  1099. for (i = 0; i < process->thread_count; i++)
  1100. {
  1101. const struct thread_info *thread = (const struct thread_info *)((const char *)cur_data + pos);
  1102. if (size - pos < sizeof(*thread)) break;
  1103. if (i) fputc( ',', stderr );
  1104. dump_timeout( "{start_time=", &thread->start_time );
  1105. fprintf( stderr, ",tid=%04x,base_priority=%d,current_priority=%d,unix_tid=%d}",
  1106. thread->tid, thread->base_priority, thread->current_priority, thread->unix_tid );
  1107. pos += sizeof(*thread);
  1108. }
  1109. fprintf( stderr, "}}" );
  1110. }
  1111. fputc( '}', stderr );
  1112. remove_data( size );
  1113. }
  1114. static void dump_varargs_object_attributes( const char *prefix, data_size_t size )
  1115. {
  1116. const struct object_attributes *objattr = cur_data;
  1117. fprintf( stderr,"%s{", prefix );
  1118. if (size)
  1119. {
  1120. const WCHAR *str;
  1121. if (size < sizeof(*objattr) ||
  1122. (size - sizeof(*objattr) < objattr->sd_len) ||
  1123. (size - sizeof(*objattr) - objattr->sd_len < objattr->name_len))
  1124. {
  1125. fprintf( stderr, "***invalid***}" );
  1126. remove_data( size );
  1127. return;
  1128. }
  1129. fprintf( stderr, "rootdir=%04x,attributes=%08x", objattr->rootdir, objattr->attributes );
  1130. dump_inline_security_descriptor( ",sd=", (const struct security_descriptor *)(objattr + 1), objattr->sd_len );
  1131. str = (const WCHAR *)objattr + (sizeof(*objattr) + objattr->sd_len) / sizeof(WCHAR);
  1132. fprintf( stderr, ",name=L\"" );
  1133. dump_strW( str, objattr->name_len, stderr, "\"\"" );
  1134. fputc( '\"', stderr );
  1135. remove_data( (sizeof(*objattr) + (objattr->sd_len & ~1) + (objattr->name_len & ~1) + 3) & ~3 );
  1136. }
  1137. fputc( '}', stderr );
  1138. }
  1139. static void dump_varargs_object_type_info( const char *prefix, data_size_t size )
  1140. {
  1141. const struct object_type_info *info = cur_data;
  1142. fprintf( stderr,"%s{", prefix );
  1143. if (size)
  1144. {
  1145. if (size < sizeof(*info) || (size - sizeof(*info) < info->name_len))
  1146. {
  1147. fprintf( stderr, "***invalid***}" );
  1148. remove_data( size );
  1149. return;
  1150. }
  1151. fprintf( stderr, "index=%u,obj_count=%u,handle_count=%u,obj_max=%u,handle_max=%u,valid=%08x",
  1152. info->index,info->obj_count, info->handle_count, info->obj_max, info->handle_max,
  1153. info->valid_access );
  1154. dump_generic_map( ",access=", &info->mapping );
  1155. fprintf( stderr, ",name=L\"" );
  1156. dump_strW( (const WCHAR *)(info + 1), info->name_len, stderr, "\"\"" );
  1157. fputc( '\"', stderr );
  1158. remove_data( min( size, sizeof(*info) + ((info->name_len + 2) & ~3 )));
  1159. }
  1160. fputc( '}', stderr );
  1161. }
  1162. static void dump_varargs_object_types_info( const char *prefix, data_size_t size )
  1163. {
  1164. fprintf( stderr,"%s{", prefix );
  1165. while (cur_size) dump_varargs_object_type_info( ",", cur_size );
  1166. fputc( '}', stderr );
  1167. }
  1168. static void dump_varargs_filesystem_event( const char *prefix, data_size_t size )
  1169. {
  1170. static const char * const actions[] = {
  1171. NULL,
  1172. "ADDED",
  1173. "REMOVED",
  1174. "MODIFIED",
  1175. "RENAMED_OLD_NAME",
  1176. "RENAMED_NEW_NAME",
  1177. "ADDED_STREAM",
  1178. "REMOVED_STREAM",
  1179. "MODIFIED_STREAM"
  1180. };
  1181. fprintf( stderr,"%s{", prefix );
  1182. while (size)
  1183. {
  1184. const struct filesystem_event *event = cur_data;
  1185. data_size_t len = (offsetof( struct filesystem_event, name[event->len] ) + sizeof(int)-1)
  1186. / sizeof(int) * sizeof(int);
  1187. if (size < len) break;
  1188. if (event->action < ARRAY_SIZE( actions ) && actions[event->action])
  1189. fprintf( stderr, "{action=%s", actions[event->action] );
  1190. else
  1191. fprintf( stderr, "{action=%u", event->action );
  1192. fprintf( stderr, ",name=\"%.*s\"}", event->len, event->name );
  1193. size -= len;
  1194. remove_data( len );
  1195. if (size)fputc( ',', stderr );
  1196. }
  1197. fputc( '}', stderr );
  1198. }
  1199. static void dump_varargs_pe_image_info( const char *prefix, data_size_t size )
  1200. {
  1201. pe_image_info_t info;
  1202. if (!size)
  1203. {
  1204. fprintf( stderr, "%s{}", prefix );
  1205. return;
  1206. }
  1207. memset( &info, 0, sizeof(info) );
  1208. memcpy( &info, cur_data, min( size, sizeof(info) ));
  1209. fprintf( stderr, "%s{", prefix );
  1210. dump_uint64( "base=", &info.base );
  1211. dump_uint64( ",stack_size=", &info.stack_size );
  1212. dump_uint64( ",stack_commit=", &info.stack_commit );
  1213. fprintf( stderr, ",entry_point=%08x,map_size=%08x,zerobits=%08x,subsystem=%08x,subsystem_minor=%04x,subsystem_major=%04x"
  1214. ",osversion_major=%04x,osversion_minor=%04x,image_charact=%04x,dll_charact=%04x,machine=%04x"
  1215. ",contains_code=%u,image_flags=%02x"
  1216. ",loader_flags=%08x,header_size=%08x,file_size=%08x,checksum=%08x}",
  1217. info.entry_point, info.map_size, info.zerobits, info.subsystem, info.subsystem_minor,
  1218. info.subsystem_major, info.osversion_major, info.osversion_minor, info.image_charact,
  1219. info.dll_charact, info.machine, info.contains_code, info.image_flags, info.loader_flags,
  1220. info.header_size, info.file_size, info.checksum );
  1221. remove_data( min( size, sizeof(info) ));
  1222. }
  1223. static void dump_varargs_rawinput_devices(const char *prefix, data_size_t size )
  1224. {
  1225. const struct rawinput_device *device;
  1226. fprintf( stderr, "%s{", prefix );
  1227. while (size >= sizeof(*device))
  1228. {
  1229. device = cur_data;
  1230. fprintf( stderr, "{usage_page=%04x,usage=%04x,flags=%08x,target=%08x}",
  1231. device->usage_page, device->usage, device->flags, device->target );
  1232. size -= sizeof(*device);
  1233. remove_data( sizeof(*device) );
  1234. if (size) fputc( ',', stderr );
  1235. }
  1236. fputc( '}', stderr );
  1237. }
  1238. static void dump_varargs_handle_infos( const char *prefix, data_size_t size )
  1239. {
  1240. const struct handle_info *handle;
  1241. fprintf( stderr, "%s{", prefix );
  1242. while (size >= sizeof(*handle))
  1243. {
  1244. handle = cur_data;
  1245. fprintf( stderr, "{owner=%04x,handle=%04x,access=%08x,attributes=%08x,type=%u}",
  1246. handle->owner, handle->handle, handle->access, handle->attributes, handle->type );
  1247. size -= sizeof(*handle);
  1248. remove_data( sizeof(*handle) );
  1249. if (size) fputc( ',', stderr );
  1250. }
  1251. fputc( '}', stderr );
  1252. }
  1253. typedef void (*dump_func)( const void *req );
  1254. /* Everything below this line is generated automatically by tools/make_requests */
  1255. /* ### make_requests begin ### */
  1256. static void dump_new_process_request( const struct new_process_request *req )
  1257. {
  1258. fprintf( stderr, " token=%04x", req->token );
  1259. fprintf( stderr, ", debug=%04x", req->debug );
  1260. fprintf( stderr, ", parent_process=%04x", req->parent_process );
  1261. fprintf( stderr, ", flags=%08x", req->flags );
  1262. fprintf( stderr, ", socket_fd=%d", req->socket_fd );
  1263. fprintf( stderr, ", access=%08x", req->access );
  1264. fprintf( stderr, ", machine=%04x", req->machine );
  1265. fprintf( stderr, ", info_size=%u", req->info_size );
  1266. fprintf( stderr, ", handles_size=%u", req->handles_size );
  1267. fprintf( stderr, ", jobs_size=%u", req->jobs_size );
  1268. dump_varargs_object_attributes( ", objattr=", cur_size );
  1269. dump_varargs_uints( ", handles=", min(cur_size,req->handles_size) );
  1270. dump_varargs_uints( ", jobs=", min(cur_size,req->jobs_size) );
  1271. dump_varargs_startup_info( ", info=", min(cur_size,req->info_size) );
  1272. dump_varargs_unicode_str( ", env=", cur_size );
  1273. }
  1274. static void dump_new_process_reply( const struct new_process_reply *req )
  1275. {
  1276. fprintf( stderr, " info=%04x", req->info );
  1277. fprintf( stderr, ", pid=%04x", req->pid );
  1278. fprintf( stderr, ", handle=%04x", req->handle );
  1279. }
  1280. static void dump_get_new_process_info_request( const struct get_new_process_info_request *req )
  1281. {
  1282. fprintf( stderr, " info=%04x", req->info );
  1283. }
  1284. static void dump_get_new_process_info_reply( const struct get_new_process_info_reply *req )
  1285. {
  1286. fprintf( stderr, " success=%d", req->success );
  1287. fprintf( stderr, ", exit_code=%d", req->exit_code );
  1288. }
  1289. static void dump_new_thread_request( const struct new_thread_request *req )
  1290. {
  1291. fprintf( stderr, " process=%04x", req->process );
  1292. fprintf( stderr, ", access=%08x", req->access );
  1293. fprintf( stderr, ", flags=%08x", req->flags );
  1294. fprintf( stderr, ", request_fd=%d", req->request_fd );
  1295. dump_varargs_object_attributes( ", objattr=", cur_size );
  1296. }
  1297. static void dump_new_thread_reply( const struct new_thread_reply *req )
  1298. {
  1299. fprintf( stderr, " tid=%04x", req->tid );
  1300. fprintf( stderr, ", handle=%04x", req->handle );
  1301. }
  1302. static void dump_get_startup_info_request( const struct get_startup_info_request *req )
  1303. {
  1304. }
  1305. static void dump_get_startup_info_reply( const struct get_startup_info_reply *req )
  1306. {
  1307. fprintf( stderr, " info_size=%u", req->info_size );
  1308. dump_varargs_startup_info( ", info=", min(cur_size,req->info_size) );
  1309. dump_varargs_unicode_str( ", env=", cur_size );
  1310. }
  1311. static void dump_init_process_done_request( const struct init_process_done_request *req )
  1312. {
  1313. dump_uint64( " teb=", &req->teb );
  1314. dump_uint64( ", peb=", &req->peb );
  1315. dump_uint64( ", ldt_copy=", &req->ldt_copy );
  1316. }
  1317. static void dump_init_process_done_reply( const struct init_process_done_reply *req )
  1318. {
  1319. dump_uint64( " entry=", &req->entry );
  1320. fprintf( stderr, ", suspend=%d", req->suspend );
  1321. }
  1322. static void dump_init_first_thread_request( const struct init_first_thread_request *req )
  1323. {
  1324. fprintf( stderr, " unix_pid=%d", req->unix_pid );
  1325. fprintf( stderr, ", unix_tid=%d", req->unix_tid );
  1326. fprintf( stderr, ", debug_level=%d", req->debug_level );
  1327. fprintf( stderr, ", reply_fd=%d", req->reply_fd );
  1328. fprintf( stderr, ", wait_fd=%d", req->wait_fd );
  1329. }
  1330. static void dump_init_first_thread_reply( const struct init_first_thread_reply *req )
  1331. {
  1332. fprintf( stderr, " pid=%04x", req->pid );
  1333. fprintf( stderr, ", tid=%04x", req->tid );
  1334. dump_timeout( ", server_start=", &req->server_start );
  1335. fprintf( stderr, ", session_id=%08x", req->session_id );
  1336. fprintf( stderr, ", info_size=%u", req->info_size );
  1337. dump_varargs_ushorts( ", machines=", cur_size );
  1338. }
  1339. static void dump_init_thread_request( const struct init_thread_request *req )
  1340. {
  1341. fprintf( stderr, " unix_tid=%d", req->unix_tid );
  1342. fprintf( stderr, ", reply_fd=%d", req->reply_fd );
  1343. fprintf( stderr, ", wait_fd=%d", req->wait_fd );
  1344. dump_uint64( ", teb=", &req->teb );
  1345. dump_uint64( ", entry=", &req->entry );
  1346. }
  1347. static void dump_init_thread_reply( const struct init_thread_reply *req )
  1348. {
  1349. fprintf( stderr, " suspend=%d", req->suspend );
  1350. }
  1351. static void dump_terminate_process_request( const struct terminate_process_request *req )
  1352. {
  1353. fprintf( stderr, " handle=%04x", req->handle );
  1354. fprintf( stderr, ", exit_code=%d", req->exit_code );
  1355. }
  1356. static void dump_terminate_process_reply( const struct terminate_process_reply *req )
  1357. {
  1358. fprintf( stderr, " self=%d", req->self );
  1359. }
  1360. static void dump_terminate_thread_request( const struct terminate_thread_request *req )
  1361. {
  1362. fprintf( stderr, " handle=%04x", req->handle );
  1363. fprintf( stderr, ", exit_code=%d", req->exit_code );
  1364. }
  1365. static void dump_terminate_thread_reply( const struct terminate_thread_reply *req )
  1366. {
  1367. fprintf( stderr, " self=%d", req->self );
  1368. }
  1369. static void dump_get_process_info_request( const struct get_process_info_request *req )
  1370. {
  1371. fprintf( stderr, " handle=%04x", req->handle );
  1372. }
  1373. static void dump_get_process_info_reply( const struct get_process_info_reply *req )
  1374. {
  1375. fprintf( stderr, " pid=%04x", req->pid );
  1376. fprintf( stderr, ", ppid=%04x", req->ppid );
  1377. dump_uint64( ", affinity=", &req->affinity );
  1378. dump_uint64( ", peb=", &req->peb );
  1379. dump_timeout( ", start_time=", &req->start_time );
  1380. dump_timeout( ", end_time=", &req->end_time );
  1381. fprintf( stderr, ", session_id=%08x", req->session_id );
  1382. fprintf( stderr, ", exit_code=%d", req->exit_code );
  1383. fprintf( stderr, ", priority=%d", req->priority );
  1384. fprintf( stderr, ", machine=%04x", req->machine );
  1385. dump_varargs_pe_image_info( ", image=", cur_size );
  1386. }
  1387. static void dump_get_process_debug_info_request( const struct get_process_debug_info_request *req )
  1388. {
  1389. fprintf( stderr, " handle=%04x", req->handle );
  1390. }
  1391. static void dump_get_process_debug_info_reply( const struct get_process_debug_info_reply *req )
  1392. {
  1393. fprintf( stderr, " debug=%04x", req->debug );
  1394. fprintf( stderr, ", debug_children=%d", req->debug_children );
  1395. dump_varargs_pe_image_info( ", image=", cur_size );
  1396. }
  1397. static void dump_get_process_image_name_request( const struct get_process_image_name_request *req )
  1398. {
  1399. fprintf( stderr, " handle=%04x", req->handle );
  1400. fprintf( stderr, ", win32=%d", req->win32 );
  1401. }
  1402. static void dump_get_process_image_name_reply( const struct get_process_image_name_reply *req )
  1403. {
  1404. fprintf( stderr, " len=%u", req->len );
  1405. dump_varargs_unicode_str( ", name=", cur_size );
  1406. }
  1407. static void dump_get_process_vm_counters_request( const struct get_process_vm_counters_request *req )
  1408. {
  1409. fprintf( stderr, " handle=%04x", req->handle );
  1410. }
  1411. static void dump_get_process_vm_counters_reply( const struct get_process_vm_counters_reply *req )
  1412. {
  1413. dump_uint64( " peak_virtual_size=", &req->peak_virtual_size );
  1414. dump_uint64( ", virtual_size=", &req->virtual_size );
  1415. dump_uint64( ", peak_working_set_size=", &req->peak_working_set_size );
  1416. dump_uint64( ", working_set_size=", &req->working_set_size );
  1417. dump_uint64( ", pagefile_usage=", &req->pagefile_usage );
  1418. dump_uint64( ", peak_pagefile_usage=", &req->peak_pagefile_usage );
  1419. }
  1420. static void dump_set_process_info_request( const struct set_process_info_request *req )
  1421. {
  1422. fprintf( stderr, " handle=%04x", req->handle );
  1423. fprintf( stderr, ", mask=%d", req->mask );
  1424. fprintf( stderr, ", priority=%d", req->priority );
  1425. dump_uint64( ", affinity=", &req->affinity );
  1426. }
  1427. static void dump_get_thread_info_request( const struct get_thread_info_request *req )
  1428. {
  1429. fprintf( stderr, " handle=%04x", req->handle );
  1430. fprintf( stderr, ", access=%08x", req->access );
  1431. }
  1432. static void dump_get_thread_info_reply( const struct get_thread_info_reply *req )
  1433. {
  1434. fprintf( stderr, " pid=%04x", req->pid );
  1435. fprintf( stderr, ", tid=%04x", req->tid );
  1436. dump_uint64( ", teb=", &req->teb );
  1437. dump_uint64( ", entry_point=", &req->entry_point );
  1438. dump_uint64( ", affinity=", &req->affinity );
  1439. fprintf( stderr, ", exit_code=%d", req->exit_code );
  1440. fprintf( stderr, ", priority=%d", req->priority );
  1441. fprintf( stderr, ", last=%d", req->last );
  1442. fprintf( stderr, ", suspend_count=%d", req->suspend_count );
  1443. fprintf( stderr, ", dbg_hidden=%d", req->dbg_hidden );
  1444. fprintf( stderr, ", desc_len=%u", req->desc_len );
  1445. dump_varargs_unicode_str( ", desc=", cur_size );
  1446. }
  1447. static void dump_get_thread_times_request( const struct get_thread_times_request *req )
  1448. {
  1449. fprintf( stderr, " handle=%04x", req->handle );
  1450. }
  1451. static void dump_get_thread_times_reply( const struct get_thread_times_reply *req )
  1452. {
  1453. dump_timeout( " creation_time=", &req->creation_time );
  1454. dump_timeout( ", exit_time=", &req->exit_time );
  1455. fprintf( stderr, ", unix_pid=%d", req->unix_pid );
  1456. fprintf( stderr, ", unix_tid=%d", req->unix_tid );
  1457. }
  1458. static void dump_set_thread_info_request( const struct set_thread_info_request *req )
  1459. {
  1460. fprintf( stderr, " handle=%04x", req->handle );
  1461. fprintf( stderr, ", mask=%d", req->mask );
  1462. fprintf( stderr, ", priority=%d", req->priority );
  1463. dump_uint64( ", affinity=", &req->affinity );
  1464. dump_uint64( ", entry_point=", &req->entry_point );
  1465. fprintf( stderr, ", token=%04x", req->token );
  1466. dump_varargs_unicode_str( ", desc=", cur_size );
  1467. }
  1468. static void dump_suspend_thread_request( const struct suspend_thread_request *req )
  1469. {
  1470. fprintf( stderr, " handle=%04x", req->handle );
  1471. }
  1472. static void dump_suspend_thread_reply( const struct suspend_thread_reply *req )
  1473. {
  1474. fprintf( stderr, " count=%d", req->count );
  1475. }
  1476. static void dump_resume_thread_request( const struct resume_thread_request *req )
  1477. {
  1478. fprintf( stderr, " handle=%04x", req->handle );
  1479. }
  1480. static void dump_resume_thread_reply( const struct resume_thread_reply *req )
  1481. {
  1482. fprintf( stderr, " count=%d", req->count );
  1483. }
  1484. static void dump_queue_apc_request( const struct queue_apc_request *req )
  1485. {
  1486. fprintf( stderr, " handle=%04x", req->handle );
  1487. dump_apc_call( ", call=", &req->call );
  1488. }
  1489. static void dump_queue_apc_reply( const struct queue_apc_reply *req )
  1490. {
  1491. fprintf( stderr, " handle=%04x", req->handle );
  1492. fprintf( stderr, ", self=%d", req->self );
  1493. }
  1494. static void dump_get_apc_result_request( const struct get_apc_result_request *req )
  1495. {
  1496. fprintf( stderr, " handle=%04x", req->handle );
  1497. }
  1498. static void dump_get_apc_result_reply( const struct get_apc_result_reply *req )
  1499. {
  1500. dump_apc_result( " result=", &req->result );
  1501. }
  1502. static void dump_close_handle_request( const struct close_handle_request *req )
  1503. {
  1504. fprintf( stderr, " handle=%04x", req->handle );
  1505. }
  1506. static void dump_set_handle_info_request( const struct set_handle_info_request *req )
  1507. {
  1508. fprintf( stderr, " handle=%04x", req->handle );
  1509. fprintf( stderr, ", flags=%d", req->flags );
  1510. fprintf( stderr, ", mask=%d", req->mask );
  1511. }
  1512. static void dump_set_handle_info_reply( const struct set_handle_info_reply *req )
  1513. {
  1514. fprintf( stderr, " old_flags=%d", req->old_flags );
  1515. }
  1516. static void dump_dup_handle_request( const struct dup_handle_request *req )
  1517. {
  1518. fprintf( stderr, " src_process=%04x", req->src_process );
  1519. fprintf( stderr, ", src_handle=%04x", req->src_handle );
  1520. fprintf( stderr, ", dst_process=%04x", req->dst_process );
  1521. fprintf( stderr, ", access=%08x", req->access );
  1522. fprintf( stderr, ", attributes=%08x", req->attributes );
  1523. fprintf( stderr, ", options=%08x", req->options );
  1524. }
  1525. static void dump_dup_handle_reply( const struct dup_handle_reply *req )
  1526. {
  1527. fprintf( stderr, " handle=%04x", req->handle );
  1528. }
  1529. static void dump_compare_objects_request( const struct compare_objects_request *req )
  1530. {
  1531. fprintf( stderr, " first=%04x", req->first );
  1532. fprintf( stderr, ", second=%04x", req->second );
  1533. }
  1534. static void dump_make_temporary_request( const struct make_temporary_request *req )
  1535. {
  1536. fprintf( stderr, " handle=%04x", req->handle );
  1537. }
  1538. static void dump_open_process_request( const struct open_process_request *req )
  1539. {
  1540. fprintf( stderr, " pid=%04x", req->pid );
  1541. fprintf( stderr, ", access=%08x", req->access );
  1542. fprintf( stderr, ", attributes=%08x", req->attributes );
  1543. }
  1544. static void dump_open_process_reply( const struct open_process_reply *req )
  1545. {
  1546. fprintf( stderr, " handle=%04x", req->handle );
  1547. }
  1548. static void dump_open_thread_request( const struct open_thread_request *req )
  1549. {
  1550. fprintf( stderr, " tid=%04x", req->tid );
  1551. fprintf( stderr, ", access=%08x", req->access );
  1552. fprintf( stderr, ", attributes=%08x", req->attributes );
  1553. }
  1554. static void dump_open_thread_reply( const struct open_thread_reply *req )
  1555. {
  1556. fprintf( stderr, " handle=%04x", req->handle );
  1557. }
  1558. static void dump_select_request( const struct select_request *req )
  1559. {
  1560. fprintf( stderr, " flags=%d", req->flags );
  1561. dump_uint64( ", cookie=", &req->cookie );
  1562. dump_abstime( ", timeout=", &req->timeout );
  1563. fprintf( stderr, ", size=%u", req->size );
  1564. fprintf( stderr, ", prev_apc=%04x", req->prev_apc );
  1565. dump_varargs_apc_result( ", result=", cur_size );
  1566. dump_varargs_select_op( ", data=", min(cur_size,req->size) );
  1567. dump_varargs_contexts( ", contexts=", cur_size );
  1568. }
  1569. static void dump_select_reply( const struct select_reply *req )
  1570. {
  1571. dump_apc_call( " call=", &req->call );
  1572. fprintf( stderr, ", apc_handle=%04x", req->apc_handle );
  1573. fprintf( stderr, ", signaled=%d", req->signaled );
  1574. dump_varargs_contexts( ", contexts=", cur_size );
  1575. }
  1576. static void dump_create_event_request( const struct create_event_request *req )
  1577. {
  1578. fprintf( stderr, " access=%08x", req->access );
  1579. fprintf( stderr, ", manual_reset=%d", req->manual_reset );
  1580. fprintf( stderr, ", initial_state=%d", req->initial_state );
  1581. dump_varargs_object_attributes( ", objattr=", cur_size );
  1582. }
  1583. static void dump_create_event_reply( const struct create_event_reply *req )
  1584. {
  1585. fprintf( stderr, " handle=%04x", req->handle );
  1586. }
  1587. static void dump_event_op_request( const struct event_op_request *req )
  1588. {
  1589. fprintf( stderr, " handle=%04x", req->handle );
  1590. fprintf( stderr, ", op=%d", req->op );
  1591. }
  1592. static void dump_event_op_reply( const struct event_op_reply *req )
  1593. {
  1594. fprintf( stderr, " state=%d", req->state );
  1595. }
  1596. static void dump_query_event_request( const struct query_event_request *req )
  1597. {
  1598. fprintf( stderr, " handle=%04x", req->handle );
  1599. }
  1600. static void dump_query_event_reply( const struct query_event_reply *req )
  1601. {
  1602. fprintf( stderr, " manual_reset=%d", req->manual_reset );
  1603. fprintf( stderr, ", state=%d", req->state );
  1604. }
  1605. static void dump_open_event_request( const struct open_event_request *req )
  1606. {
  1607. fprintf( stderr, " access=%08x", req->access );
  1608. fprintf( stderr, ", attributes=%08x", req->attributes );
  1609. fprintf( stderr, ", rootdir=%04x", req->rootdir );
  1610. dump_varargs_unicode_str( ", name=", cur_size );
  1611. }
  1612. static void dump_open_event_reply( const struct open_event_reply *req )
  1613. {
  1614. fprintf( stderr, " handle=%04x", req->handle );
  1615. }
  1616. static void dump_create_keyed_event_request( const struct create_keyed_event_request *req )
  1617. {
  1618. fprintf( stderr, " access=%08x", req->access );
  1619. dump_varargs_object_attributes( ", objattr=", cur_size );
  1620. }
  1621. static void dump_create_keyed_event_reply( const struct create_keyed_event_reply *req )
  1622. {
  1623. fprintf( stderr, " handle=%04x", req->handle );
  1624. }
  1625. static void dump_open_keyed_event_request( const struct open_keyed_event_request *req )
  1626. {
  1627. fprintf( stderr, " access=%08x", req->access );
  1628. fprintf( stderr, ", attributes=%08x", req->attributes );
  1629. fprintf( stderr, ", rootdir=%04x", req->rootdir );
  1630. dump_varargs_unicode_str( ", name=", cur_size );
  1631. }
  1632. static void dump_open_keyed_event_reply( const struct open_keyed_event_reply *req )
  1633. {
  1634. fprintf( stderr, " handle=%04x", req->handle );
  1635. }
  1636. static void dump_create_mutex_request( const struct create_mutex_request *req )
  1637. {
  1638. fprintf( stderr, " access=%08x", req->access );
  1639. fprintf( stderr, ", owned=%d", req->owned );
  1640. dump_varargs_object_attributes( ", objattr=", cur_size );
  1641. }
  1642. static void dump_create_mutex_reply( const struct create_mutex_reply *req )
  1643. {
  1644. fprintf( stderr, " handle=%04x", req->handle );
  1645. }
  1646. static void dump_release_mutex_request( const struct release_mutex_request *req )
  1647. {
  1648. fprintf( stderr, " handle=%04x", req->handle );
  1649. }
  1650. static void dump_release_mutex_reply( const struct release_mutex_reply *req )
  1651. {
  1652. fprintf( stderr, " prev_count=%08x", req->prev_count );
  1653. }
  1654. static void dump_open_mutex_request( const struct open_mutex_request *req )
  1655. {
  1656. fprintf( stderr, " access=%08x", req->access );
  1657. fprintf( stderr, ", attributes=%08x", req->attributes );
  1658. fprintf( stderr, ", rootdir=%04x", req->rootdir );
  1659. dump_varargs_unicode_str( ", name=", cur_size );
  1660. }
  1661. static void dump_open_mutex_reply( const struct open_mutex_reply *req )
  1662. {
  1663. fprintf( stderr, " handle=%04x", req->handle );
  1664. }
  1665. static void dump_query_mutex_request( const struct query_mutex_request *req )
  1666. {
  1667. fprintf( stderr, " handle=%04x", req->handle );
  1668. }
  1669. static void dump_query_mutex_reply( const struct query_mutex_reply *req )
  1670. {
  1671. fprintf( stderr, " count=%08x", req->count );
  1672. fprintf( stderr, ", owned=%d", req->owned );
  1673. fprintf( stderr, ", abandoned=%d", req->abandoned );
  1674. }
  1675. static void dump_create_semaphore_request( const struct create_semaphore_request *req )
  1676. {
  1677. fprintf( stderr, " access=%08x", req->access );
  1678. fprintf( stderr, ", initial=%08x", req->initial );
  1679. fprintf( stderr, ", max=%08x", req->max );
  1680. dump_varargs_object_attributes( ", objattr=", cur_size );
  1681. }
  1682. static void dump_create_semaphore_reply( const struct create_semaphore_reply *req )
  1683. {
  1684. fprintf( stderr, " handle=%04x", req->handle );
  1685. }
  1686. static void dump_release_semaphore_request( const struct release_semaphore_request *req )
  1687. {
  1688. fprintf( stderr, " handle=%04x", req->handle );
  1689. fprintf( stderr, ", count=%08x", req->count );
  1690. }
  1691. static void dump_release_semaphore_reply( const struct release_semaphore_reply *req )
  1692. {
  1693. fprintf( stderr, " prev_count=%08x", req->prev_count );
  1694. }
  1695. static void dump_query_semaphore_request( const struct query_semaphore_request *req )
  1696. {
  1697. fprintf( stderr, " handle=%04x", req->handle );
  1698. }
  1699. static void dump_query_semaphore_reply( const struct query_semaphore_reply *req )
  1700. {
  1701. fprintf( stderr, " current=%08x", req->current );
  1702. fprintf( stderr, ", max=%08x", req->max );
  1703. }
  1704. static void dump_open_semaphore_request( const struct open_semaphore_request *req )
  1705. {
  1706. fprintf( stderr, " access=%08x", req->access );
  1707. fprintf( stderr, ", attributes=%08x", req->attributes );
  1708. fprintf( stderr, ", rootdir=%04x", req->rootdir );
  1709. dump_varargs_unicode_str( ", name=", cur_size );
  1710. }
  1711. static void dump_open_semaphore_reply( const struct open_semaphore_reply *req )
  1712. {
  1713. fprintf( stderr, " handle=%04x", req->handle );
  1714. }
  1715. static void dump_create_file_request( const struct create_file_request *req )
  1716. {
  1717. fprintf( stderr, " access=%08x", req->access );
  1718. fprintf( stderr, ", sharing=%08x", req->sharing );
  1719. fprintf( stderr, ", create=%d", req->create );
  1720. fprintf( stderr, ", options=%08x", req->options );
  1721. fprintf( stderr, ", attrs=%08x", req->attrs );
  1722. dump_varargs_object_attributes( ", objattr=", cur_size );
  1723. dump_varargs_string( ", filename=", cur_size );
  1724. }
  1725. static void dump_create_file_reply( const struct create_file_reply *req )
  1726. {
  1727. fprintf( stderr, " handle=%04x", req->handle );
  1728. }
  1729. static void dump_open_file_object_request( const struct open_file_object_request *req )
  1730. {
  1731. fprintf( stderr, " access=%08x", req->access );
  1732. fprintf( stderr, ", attributes=%08x", req->attributes );
  1733. fprintf( stderr, ", rootdir=%04x", req->rootdir );
  1734. fprintf( stderr, ", sharing=%08x", req->sharing );
  1735. fprintf( stderr, ", options=%08x", req->options );
  1736. dump_varargs_unicode_str( ", filename=", cur_size );
  1737. }
  1738. static void dump_open_file_object_reply( const struct open_file_object_reply *req )
  1739. {
  1740. fprintf( stderr, " handle=%04x", req->handle );
  1741. }
  1742. static void dump_alloc_file_handle_request( const struct alloc_file_handle_request *req )
  1743. {
  1744. fprintf( stderr, " access=%08x", req->access );
  1745. fprintf( stderr, ", attributes=%08x", req->attributes );
  1746. fprintf( stderr, ", fd=%d", req->fd );
  1747. }
  1748. static void dump_alloc_file_handle_reply( const struct alloc_file_handle_reply *req )
  1749. {
  1750. fprintf( stderr, " handle=%04x", req->handle );
  1751. }
  1752. static void dump_get_handle_unix_name_request( const struct get_handle_unix_name_request *req )
  1753. {
  1754. fprintf( stderr, " handle=%04x", req->handle );
  1755. }
  1756. static void dump_get_handle_unix_name_reply( const struct get_handle_unix_name_reply *req )
  1757. {
  1758. fprintf( stderr, " name_len=%u", req->name_len );
  1759. dump_varargs_string( ", name=", cur_size );
  1760. }
  1761. static void dump_get_handle_fd_request( const struct get_handle_fd_request *req )
  1762. {
  1763. fprintf( stderr, " handle=%04x", req->handle );
  1764. }
  1765. static void dump_get_handle_fd_reply( const struct get_handle_fd_reply *req )
  1766. {
  1767. fprintf( stderr, " type=%d", req->type );
  1768. fprintf( stderr, ", cacheable=%d", req->cacheable );
  1769. fprintf( stderr, ", access=%08x", req->access );
  1770. fprintf( stderr, ", options=%08x", req->options );
  1771. }
  1772. static void dump_get_directory_cache_entry_request( const struct get_directory_cache_entry_request *req )
  1773. {
  1774. fprintf( stderr, " handle=%04x", req->handle );
  1775. }
  1776. static void dump_get_directory_cache_entry_reply( const struct get_directory_cache_entry_reply *req )
  1777. {
  1778. fprintf( stderr, " entry=%d", req->entry );
  1779. dump_varargs_ints( ", free=", cur_size );
  1780. }
  1781. static void dump_flush_request( const struct flush_request *req )
  1782. {
  1783. dump_async_data( " async=", &req->async );
  1784. }
  1785. static void dump_flush_reply( const struct flush_reply *req )
  1786. {
  1787. fprintf( stderr, " event=%04x", req->event );
  1788. }
  1789. static void dump_get_file_info_request( const struct get_file_info_request *req )
  1790. {
  1791. fprintf( stderr, " handle=%04x", req->handle );
  1792. fprintf( stderr, ", info_class=%08x", req->info_class );
  1793. }
  1794. static void dump_get_file_info_reply( const struct get_file_info_reply *req )
  1795. {
  1796. dump_varargs_bytes( " data=", cur_size );
  1797. }
  1798. static void dump_get_volume_info_request( const struct get_volume_info_request *req )
  1799. {
  1800. fprintf( stderr, " handle=%04x", req->handle );
  1801. dump_async_data( ", async=", &req->async );
  1802. fprintf( stderr, ", info_class=%08x", req->info_class );
  1803. }
  1804. static void dump_get_volume_info_reply( const struct get_volume_info_reply *req )
  1805. {
  1806. fprintf( stderr, " wait=%04x", req->wait );
  1807. dump_varargs_bytes( ", data=", cur_size );
  1808. }
  1809. static void dump_lock_file_request( const struct lock_file_request *req )
  1810. {
  1811. fprintf( stderr, " handle=%04x", req->handle );
  1812. dump_uint64( ", offset=", &req->offset );
  1813. dump_uint64( ", count=", &req->count );
  1814. fprintf( stderr, ", shared=%d", req->shared );
  1815. fprintf( stderr, ", wait=%d", req->wait );
  1816. }
  1817. static void dump_lock_file_reply( const struct lock_file_reply *req )
  1818. {
  1819. fprintf( stderr, " handle=%04x", req->handle );
  1820. fprintf( stderr, ", overlapped=%d", req->overlapped );
  1821. }
  1822. static void dump_unlock_file_request( const struct unlock_file_request *req )
  1823. {
  1824. fprintf( stderr, " handle=%04x", req->handle );
  1825. dump_uint64( ", offset=", &req->offset );
  1826. dump_uint64( ", count=", &req->count );
  1827. }
  1828. static void dump_recv_socket_request( const struct recv_socket_request *req )
  1829. {
  1830. fprintf( stderr, " oob=%d", req->oob );
  1831. dump_async_data( ", async=", &req->async );
  1832. fprintf( stderr, ", force_async=%d", req->force_async );
  1833. }
  1834. static void dump_recv_socket_reply( const struct recv_socket_reply *req )
  1835. {
  1836. fprintf( stderr, " wait=%04x", req->wait );
  1837. fprintf( stderr, ", options=%08x", req->options );
  1838. fprintf( stderr, ", nonblocking=%d", req->nonblocking );
  1839. }
  1840. static void dump_send_socket_request( const struct send_socket_request *req )
  1841. {
  1842. dump_async_data( " async=", &req->async );
  1843. fprintf( stderr, ", status=%08x", req->status );
  1844. fprintf( stderr, ", total=%08x", req->total );
  1845. }
  1846. static void dump_send_socket_reply( const struct send_socket_reply *req )
  1847. {
  1848. fprintf( stderr, " wait=%04x", req->wait );
  1849. fprintf( stderr, ", options=%08x", req->options );
  1850. }
  1851. static void dump_get_next_console_request_request( const struct get_next_console_request_request *req )
  1852. {
  1853. fprintf( stderr, " handle=%04x", req->handle );
  1854. fprintf( stderr, ", signal=%d", req->signal );
  1855. fprintf( stderr, ", read=%d", req->read );
  1856. fprintf( stderr, ", status=%08x", req->status );
  1857. dump_varargs_bytes( ", out_data=", cur_size );
  1858. }
  1859. static void dump_get_next_console_request_reply( const struct get_next_console_request_reply *req )
  1860. {
  1861. fprintf( stderr, " code=%08x", req->code );
  1862. fprintf( stderr, ", output=%08x", req->output );
  1863. fprintf( stderr, ", out_size=%u", req->out_size );
  1864. dump_varargs_bytes( ", in_data=", cur_size );
  1865. }
  1866. static void dump_read_directory_changes_request( const struct read_directory_changes_request *req )
  1867. {
  1868. fprintf( stderr, " filter=%08x", req->filter );
  1869. fprintf( stderr, ", subtree=%d", req->subtree );
  1870. fprintf( stderr, ", want_data=%d", req->want_data );
  1871. dump_async_data( ", async=", &req->async );
  1872. }
  1873. static void dump_read_change_request( const struct read_change_request *req )
  1874. {
  1875. fprintf( stderr, " handle=%04x", req->handle );
  1876. }
  1877. static void dump_read_change_reply( const struct read_change_reply *req )
  1878. {
  1879. dump_varargs_filesystem_event( " events=", cur_size );
  1880. }
  1881. static void dump_create_mapping_request( const struct create_mapping_request *req )
  1882. {
  1883. fprintf( stderr, " access=%08x", req->access );
  1884. fprintf( stderr, ", flags=%08x", req->flags );
  1885. fprintf( stderr, ", file_access=%08x", req->file_access );
  1886. dump_uint64( ", size=", &req->size );
  1887. fprintf( stderr, ", file_handle=%04x", req->file_handle );
  1888. dump_varargs_object_attributes( ", objattr=", cur_size );
  1889. }
  1890. static void dump_create_mapping_reply( const struct create_mapping_reply *req )
  1891. {
  1892. fprintf( stderr, " handle=%04x", req->handle );
  1893. }
  1894. static void dump_open_mapping_request( const struct open_mapping_request *req )
  1895. {
  1896. fprintf( stderr, " access=%08x", req->access );
  1897. fprintf( stderr, ", attributes=%08x", req->attributes );
  1898. fprintf( stderr, ", rootdir=%04x", req->rootdir );
  1899. dump_varargs_unicode_str( ", name=", cur_size );
  1900. }
  1901. static void dump_open_mapping_reply( const struct open_mapping_reply *req )
  1902. {
  1903. fprintf( stderr, " handle=%04x", req->handle );
  1904. }
  1905. static void dump_get_mapping_info_request( const struct get_mapping_info_request *req )
  1906. {
  1907. fprintf( stderr, " handle=%04x", req->handle );
  1908. fprintf( stderr, ", access=%08x", req->access );
  1909. }
  1910. static void dump_get_mapping_info_reply( const struct get_mapping_info_reply *req )
  1911. {
  1912. dump_uint64( " size=", &req->size );
  1913. fprintf( stderr, ", flags=%08x", req->flags );
  1914. fprintf( stderr, ", shared_file=%04x", req->shared_file );
  1915. fprintf( stderr, ", total=%u", req->total );
  1916. dump_varargs_pe_image_info( ", image=", cur_size );
  1917. dump_varargs_unicode_str( ", name=", cur_size );
  1918. }
  1919. static void dump_map_view_request( const struct map_view_request *req )
  1920. {
  1921. fprintf( stderr, " mapping=%04x", req->mapping );
  1922. fprintf( stderr, ", access=%08x", req->access );
  1923. dump_uint64( ", base=", &req->base );
  1924. dump_uint64( ", size=", &req->size );
  1925. dump_uint64( ", start=", &req->start );
  1926. dump_varargs_pe_image_info( ", image=", cur_size );
  1927. dump_varargs_unicode_str( ", name=", cur_size );
  1928. }
  1929. static void dump_unmap_view_request( const struct unmap_view_request *req )
  1930. {
  1931. dump_uint64( " base=", &req->base );
  1932. }
  1933. static void dump_get_mapping_committed_range_request( const struct get_mapping_committed_range_request *req )
  1934. {
  1935. dump_uint64( " base=", &req->base );
  1936. dump_uint64( ", offset=", &req->offset );
  1937. }
  1938. static void dump_get_mapping_committed_range_reply( const struct get_mapping_committed_range_reply *req )
  1939. {
  1940. dump_uint64( " size=", &req->size );
  1941. fprintf( stderr, ", committed=%d", req->committed );
  1942. }
  1943. static void dump_add_mapping_committed_range_request( const struct add_mapping_committed_range_request *req )
  1944. {
  1945. dump_uint64( " base=", &req->base );
  1946. dump_uint64( ", offset=", &req->offset );
  1947. dump_uint64( ", size=", &req->size );
  1948. }
  1949. static void dump_is_same_mapping_request( const struct is_same_mapping_request *req )
  1950. {
  1951. dump_uint64( " base1=", &req->base1 );
  1952. dump_uint64( ", base2=", &req->base2 );
  1953. }
  1954. static void dump_get_mapping_filename_request( const struct get_mapping_filename_request *req )
  1955. {
  1956. fprintf( stderr, " process=%04x", req->process );
  1957. dump_uint64( ", addr=", &req->addr );
  1958. }
  1959. static void dump_get_mapping_filename_reply( const struct get_mapping_filename_reply *req )
  1960. {
  1961. fprintf( stderr, " len=%u", req->len );
  1962. dump_varargs_unicode_str( ", filename=", cur_size );
  1963. }
  1964. static void dump_list_processes_request( const struct list_processes_request *req )
  1965. {
  1966. }
  1967. static void dump_list_processes_reply( const struct list_processes_reply *req )
  1968. {
  1969. fprintf( stderr, " info_size=%u", req->info_size );
  1970. fprintf( stderr, ", process_count=%d", req->process_count );
  1971. fprintf( stderr, ", total_thread_count=%d", req->total_thread_count );
  1972. fprintf( stderr, ", total_name_len=%u", req->total_name_len );
  1973. dump_varargs_process_info( ", data=", min(cur_size,req->info_size) );
  1974. }
  1975. static void dump_create_debug_obj_request( const struct create_debug_obj_request *req )
  1976. {
  1977. fprintf( stderr, " access=%08x", req->access );
  1978. fprintf( stderr, ", flags=%08x", req->flags );
  1979. dump_varargs_object_attributes( ", objattr=", cur_size );
  1980. }
  1981. static void dump_create_debug_obj_reply( const struct create_debug_obj_reply *req )
  1982. {
  1983. fprintf( stderr, " handle=%04x", req->handle );
  1984. }
  1985. static void dump_wait_debug_event_request( const struct wait_debug_event_request *req )
  1986. {
  1987. fprintf( stderr, " debug=%04x", req->debug );
  1988. }
  1989. static void dump_wait_debug_event_reply( const struct wait_debug_event_reply *req )
  1990. {
  1991. fprintf( stderr, " pid=%04x", req->pid );
  1992. fprintf( stderr, ", tid=%04x", req->tid );
  1993. dump_varargs_debug_event( ", event=", cur_size );
  1994. }
  1995. static void dump_queue_exception_event_request( const struct queue_exception_event_request *req )
  1996. {
  1997. fprintf( stderr, " first=%d", req->first );
  1998. fprintf( stderr, ", code=%08x", req->code );
  1999. fprintf( stderr, ", flags=%08x", req->flags );
  2000. dump_uint64( ", record=", &req->record );
  2001. dump_uint64( ", address=", &req->address );
  2002. fprintf( stderr, ", len=%u", req->len );
  2003. dump_varargs_uints64( ", params=", min(cur_size,req->len) );
  2004. }
  2005. static void dump_queue_exception_event_reply( const struct queue_exception_event_reply *req )
  2006. {
  2007. fprintf( stderr, " handle=%04x", req->handle );
  2008. }
  2009. static void dump_get_exception_status_request( const struct get_exception_status_request *req )
  2010. {
  2011. fprintf( stderr, " handle=%04x", req->handle );
  2012. }
  2013. static void dump_continue_debug_event_request( const struct continue_debug_event_request *req )
  2014. {
  2015. fprintf( stderr, " debug=%04x", req->debug );
  2016. fprintf( stderr, ", pid=%04x", req->pid );
  2017. fprintf( stderr, ", tid=%04x", req->tid );
  2018. fprintf( stderr, ", status=%08x", req->status );
  2019. }
  2020. static void dump_debug_process_request( const struct debug_process_request *req )
  2021. {
  2022. fprintf( stderr, " handle=%04x", req->handle );
  2023. fprintf( stderr, ", debug=%04x", req->debug );
  2024. fprintf( stderr, ", attach=%d", req->attach );
  2025. }
  2026. static void dump_set_debug_obj_info_request( const struct set_debug_obj_info_request *req )
  2027. {
  2028. fprintf( stderr, " debug=%04x", req->debug );
  2029. fprintf( stderr, ", flags=%08x", req->flags );
  2030. }
  2031. static void dump_read_process_memory_request( const struct read_process_memory_request *req )
  2032. {
  2033. fprintf( stderr, " handle=%04x", req->handle );
  2034. dump_uint64( ", addr=", &req->addr );
  2035. }
  2036. static void dump_read_process_memory_reply( const struct read_process_memory_reply *req )
  2037. {
  2038. dump_varargs_bytes( " data=", cur_size );
  2039. }
  2040. static void dump_write_process_memory_request( const struct write_process_memory_request *req )
  2041. {
  2042. fprintf( stderr, " handle=%04x", req->handle );
  2043. dump_uint64( ", addr=", &req->addr );
  2044. dump_varargs_bytes( ", data=", cur_size );
  2045. }
  2046. static void dump_create_key_request( const struct create_key_request *req )
  2047. {
  2048. fprintf( stderr, " access=%08x", req->access );
  2049. fprintf( stderr, ", options=%08x", req->options );
  2050. dump_varargs_object_attributes( ", objattr=", cur_size );
  2051. dump_varargs_unicode_str( ", class=", cur_size );
  2052. }
  2053. static void dump_create_key_reply( const struct create_key_reply *req )
  2054. {
  2055. fprintf( stderr, " hkey=%04x", req->hkey );
  2056. fprintf( stderr, ", created=%d", req->created );
  2057. }
  2058. static void dump_open_key_request( const struct open_key_request *req )
  2059. {
  2060. fprintf( stderr, " parent=%04x", req->parent );
  2061. fprintf( stderr, ", access=%08x", req->access );
  2062. fprintf( stderr, ", attributes=%08x", req->attributes );
  2063. dump_varargs_unicode_str( ", name=", cur_size );
  2064. }
  2065. static void dump_open_key_reply( const struct open_key_reply *req )
  2066. {
  2067. fprintf( stderr, " hkey=%04x", req->hkey );
  2068. }
  2069. static void dump_delete_key_request( const struct delete_key_request *req )
  2070. {
  2071. fprintf( stderr, " hkey=%04x", req->hkey );
  2072. }
  2073. static void dump_flush_key_request( const struct flush_key_request *req )
  2074. {
  2075. fprintf( stderr, " hkey=%04x", req->hkey );
  2076. }
  2077. static void dump_enum_key_request( const struct enum_key_request *req )
  2078. {
  2079. fprintf( stderr, " hkey=%04x", req->hkey );
  2080. fprintf( stderr, ", index=%d", req->index );
  2081. fprintf( stderr, ", info_class=%d", req->info_class );
  2082. }
  2083. static void dump_enum_key_reply( const struct enum_key_reply *req )
  2084. {
  2085. fprintf( stderr, " subkeys=%d", req->subkeys );
  2086. fprintf( stderr, ", max_subkey=%d", req->max_subkey );
  2087. fprintf( stderr, ", max_class=%d", req->max_class );
  2088. fprintf( stderr, ", values=%d", req->values );
  2089. fprintf( stderr, ", max_value=%d", req->max_value );
  2090. fprintf( stderr, ", max_data=%d", req->max_data );
  2091. dump_timeout( ", modif=", &req->modif );
  2092. fprintf( stderr, ", total=%u", req->total );
  2093. fprintf( stderr, ", namelen=%u", req->namelen );
  2094. dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
  2095. dump_varargs_unicode_str( ", class=", cur_size );
  2096. }
  2097. static void dump_set_key_value_request( const struct set_key_value_request *req )
  2098. {
  2099. fprintf( stderr, " hkey=%04x", req->hkey );
  2100. fprintf( stderr, ", type=%d", req->type );
  2101. fprintf( stderr, ", namelen=%u", req->namelen );
  2102. dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
  2103. dump_varargs_bytes( ", data=", cur_size );
  2104. }
  2105. static void dump_get_key_value_request( const struct get_key_value_request *req )
  2106. {
  2107. fprintf( stderr, " hkey=%04x", req->hkey );
  2108. dump_varargs_unicode_str( ", name=", cur_size );
  2109. }
  2110. static void dump_get_key_value_reply( const struct get_key_value_reply *req )
  2111. {
  2112. fprintf( stderr, " type=%d", req->type );
  2113. fprintf( stderr, ", total=%u", req->total );
  2114. dump_varargs_bytes( ", data=", cur_size );
  2115. }
  2116. static void dump_enum_key_value_request( const struct enum_key_value_request *req )
  2117. {
  2118. fprintf( stderr, " hkey=%04x", req->hkey );
  2119. fprintf( stderr, ", index=%d", req->index );
  2120. fprintf( stderr, ", info_class=%d", req->info_class );
  2121. }
  2122. static void dump_enum_key_value_reply( const struct enum_key_value_reply *req )
  2123. {
  2124. fprintf( stderr, " type=%d", req->type );
  2125. fprintf( stderr, ", total=%u", req->total );
  2126. fprintf( stderr, ", namelen=%u", req->namelen );
  2127. dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
  2128. dump_varargs_bytes( ", data=", cur_size );
  2129. }
  2130. static void dump_delete_key_value_request( const struct delete_key_value_request *req )
  2131. {
  2132. fprintf( stderr, " hkey=%04x", req->hkey );
  2133. dump_varargs_unicode_str( ", name=", cur_size );
  2134. }
  2135. static void dump_load_registry_request( const struct load_registry_request *req )
  2136. {
  2137. fprintf( stderr, " file=%04x", req->file );
  2138. dump_varargs_object_attributes( ", objattr=", cur_size );
  2139. }
  2140. static void dump_unload_registry_request( const struct unload_registry_request *req )
  2141. {
  2142. fprintf( stderr, " parent=%04x", req->parent );
  2143. fprintf( stderr, ", attributes=%08x", req->attributes );
  2144. dump_varargs_unicode_str( ", name=", cur_size );
  2145. }
  2146. static void dump_save_registry_request( const struct save_registry_request *req )
  2147. {
  2148. fprintf( stderr, " hkey=%04x", req->hkey );
  2149. fprintf( stderr, ", file=%04x", req->file );
  2150. }
  2151. static void dump_set_registry_notification_request( const struct set_registry_notification_request *req )
  2152. {
  2153. fprintf( stderr, " hkey=%04x", req->hkey );
  2154. fprintf( stderr, ", event=%04x", req->event );
  2155. fprintf( stderr, ", subtree=%d", req->subtree );
  2156. fprintf( stderr, ", filter=%08x", req->filter );
  2157. }
  2158. static void dump_create_timer_request( const struct create_timer_request *req )
  2159. {
  2160. fprintf( stderr, " access=%08x", req->access );
  2161. fprintf( stderr, ", manual=%d", req->manual );
  2162. dump_varargs_object_attributes( ", objattr=", cur_size );
  2163. }
  2164. static void dump_create_timer_reply( const struct create_timer_reply *req )
  2165. {
  2166. fprintf( stderr, " handle=%04x", req->handle );
  2167. }
  2168. static void dump_open_timer_request( const struct open_timer_request *req )
  2169. {
  2170. fprintf( stderr, " access=%08x", req->access );
  2171. fprintf( stderr, ", attributes=%08x", req->attributes );
  2172. fprintf( stderr, ", rootdir=%04x", req->rootdir );
  2173. dump_varargs_unicode_str( ", name=", cur_size );
  2174. }
  2175. static void dump_open_timer_reply( const struct open_timer_reply *req )
  2176. {
  2177. fprintf( stderr, " handle=%04x", req->handle );
  2178. }
  2179. static void dump_set_timer_request( const struct set_timer_request *req )
  2180. {
  2181. fprintf( stderr, " handle=%04x", req->handle );
  2182. dump_timeout( ", expire=", &req->expire );
  2183. dump_uint64( ", callback=", &req->callback );
  2184. dump_uint64( ", arg=", &req->arg );
  2185. fprintf( stderr, ", period=%d", req->period );
  2186. }
  2187. static void dump_set_timer_reply( const struct set_timer_reply *req )
  2188. {
  2189. fprintf( stderr, " signaled=%d", req->signaled );
  2190. }
  2191. static void dump_cancel_timer_request( const struct cancel_timer_request *req )
  2192. {
  2193. fprintf( stderr, " handle=%04x", req->handle );
  2194. }
  2195. static void dump_cancel_timer_reply( const struct cancel_timer_reply *req )
  2196. {
  2197. fprintf( stderr, " signaled=%d", req->signaled );
  2198. }
  2199. static void dump_get_timer_info_request( const struct get_timer_info_request *req )
  2200. {
  2201. fprintf( stderr, " handle=%04x", req->handle );
  2202. }
  2203. static void dump_get_timer_info_reply( const struct get_timer_info_reply *req )
  2204. {
  2205. dump_timeout( " when=", &req->when );
  2206. fprintf( stderr, ", signaled=%d", req->signaled );
  2207. }
  2208. static void dump_get_thread_context_request( const struct get_thread_context_request *req )
  2209. {
  2210. fprintf( stderr, " handle=%04x", req->handle );
  2211. fprintf( stderr, ", context=%04x", req->context );
  2212. fprintf( stderr, ", flags=%08x", req->flags );
  2213. fprintf( stderr, ", machine=%04x", req->machine );
  2214. }
  2215. static void dump_get_thread_context_reply( const struct get_thread_context_reply *req )
  2216. {
  2217. fprintf( stderr, " self=%d", req->self );
  2218. fprintf( stderr, ", handle=%04x", req->handle );
  2219. dump_varargs_contexts( ", contexts=", cur_size );
  2220. }
  2221. static void dump_set_thread_context_request( const struct set_thread_context_request *req )
  2222. {
  2223. fprintf( stderr, " handle=%04x", req->handle );
  2224. dump_varargs_contexts( ", contexts=", cur_size );
  2225. }
  2226. static void dump_set_thread_context_reply( const struct set_thread_context_reply *req )
  2227. {
  2228. fprintf( stderr, " self=%d", req->self );
  2229. }
  2230. static void dump_get_selector_entry_request( const struct get_selector_entry_request *req )
  2231. {
  2232. fprintf( stderr, " handle=%04x", req->handle );
  2233. fprintf( stderr, ", entry=%d", req->entry );
  2234. }
  2235. static void dump_get_selector_entry_reply( const struct get_selector_entry_reply *req )
  2236. {
  2237. fprintf( stderr, " base=%08x", req->base );
  2238. fprintf( stderr, ", limit=%08x", req->limit );
  2239. fprintf( stderr, ", flags=%02x", req->flags );
  2240. }
  2241. static void dump_add_atom_request( const struct add_atom_request *req )
  2242. {
  2243. dump_varargs_unicode_str( " name=", cur_size );
  2244. }
  2245. static void dump_add_atom_reply( const struct add_atom_reply *req )
  2246. {
  2247. fprintf( stderr, " atom=%04x", req->atom );
  2248. }
  2249. static void dump_delete_atom_request( const struct delete_atom_request *req )
  2250. {
  2251. fprintf( stderr, " atom=%04x", req->atom );
  2252. }
  2253. static void dump_find_atom_request( const struct find_atom_request *req )
  2254. {
  2255. dump_varargs_unicode_str( " name=", cur_size );
  2256. }
  2257. static void dump_find_atom_reply( const struct find_atom_reply *req )
  2258. {
  2259. fprintf( stderr, " atom=%04x", req->atom );
  2260. }
  2261. static void dump_get_atom_information_request( const struct get_atom_information_request *req )
  2262. {
  2263. fprintf( stderr, " atom=%04x", req->atom );
  2264. }
  2265. static void dump_get_atom_information_reply( const struct get_atom_information_reply *req )
  2266. {
  2267. fprintf( stderr, " count=%d", req->count );
  2268. fprintf( stderr, ", pinned=%d", req->pinned );
  2269. fprintf( stderr, ", total=%u", req->total );
  2270. dump_varargs_unicode_str( ", name=", cur_size );
  2271. }
  2272. static void dump_get_msg_queue_request( const struct get_msg_queue_request *req )
  2273. {
  2274. }
  2275. static void dump_get_msg_queue_reply( const struct get_msg_queue_reply *req )
  2276. {
  2277. fprintf( stderr, " handle=%04x", req->handle );
  2278. }
  2279. static void dump_set_queue_fd_request( const struct set_queue_fd_request *req )
  2280. {
  2281. fprintf( stderr, " handle=%04x", req->handle );
  2282. }
  2283. static void dump_set_queue_mask_request( const struct set_queue_mask_request *req )
  2284. {
  2285. fprintf( stderr, " wake_mask=%08x", req->wake_mask );
  2286. fprintf( stderr, ", changed_mask=%08x", req->changed_mask );
  2287. fprintf( stderr, ", skip_wait=%d", req->skip_wait );
  2288. }
  2289. static void dump_set_queue_mask_reply( const struct set_queue_mask_reply *req )
  2290. {
  2291. fprintf( stderr, " wake_bits=%08x", req->wake_bits );
  2292. fprintf( stderr, ", changed_bits=%08x", req->changed_bits );
  2293. }
  2294. static void dump_get_queue_status_request( const struct get_queue_status_request *req )
  2295. {
  2296. fprintf( stderr, " clear_bits=%08x", req->clear_bits );
  2297. }
  2298. static void dump_get_queue_status_reply( const struct get_queue_status_reply *req )
  2299. {
  2300. fprintf( stderr, " wake_bits=%08x", req->wake_bits );
  2301. fprintf( stderr, ", changed_bits=%08x", req->changed_bits );
  2302. }
  2303. static void dump_get_process_idle_event_request( const struct get_process_idle_event_request *req )
  2304. {
  2305. fprintf( stderr, " handle=%04x", req->handle );
  2306. }
  2307. static void dump_get_process_idle_event_reply( const struct get_process_idle_event_reply *req )
  2308. {
  2309. fprintf( stderr, " event=%04x", req->event );
  2310. }
  2311. static void dump_send_message_request( const struct send_message_request *req )
  2312. {
  2313. fprintf( stderr, " id=%04x", req->id );
  2314. fprintf( stderr, ", type=%d", req->type );
  2315. fprintf( stderr, ", flags=%d", req->flags );
  2316. fprintf( stderr, ", win=%08x", req->win );
  2317. fprintf( stderr, ", msg=%08x", req->msg );
  2318. dump_uint64( ", wparam=", &req->wparam );
  2319. dump_uint64( ", lparam=", &req->lparam );
  2320. dump_timeout( ", timeout=", &req->timeout );
  2321. dump_varargs_message_data( ", data=", cur_size );
  2322. }
  2323. static void dump_post_quit_message_request( const struct post_quit_message_request *req )
  2324. {
  2325. fprintf( stderr, " exit_code=%d", req->exit_code );
  2326. }
  2327. static void dump_send_hardware_message_request( const struct send_hardware_message_request *req )
  2328. {
  2329. fprintf( stderr, " win=%08x", req->win );
  2330. dump_hw_input( ", input=", &req->input );
  2331. fprintf( stderr, ", flags=%08x", req->flags );
  2332. dump_varargs_bytes( ", report=", cur_size );
  2333. }
  2334. static void dump_send_hardware_message_reply( const struct send_hardware_message_reply *req )
  2335. {
  2336. fprintf( stderr, " wait=%d", req->wait );
  2337. fprintf( stderr, ", prev_x=%d", req->prev_x );
  2338. fprintf( stderr, ", prev_y=%d", req->prev_y );
  2339. fprintf( stderr, ", new_x=%d", req->new_x );
  2340. fprintf( stderr, ", new_y=%d", req->new_y );
  2341. dump_varargs_bytes( ", keystate=", cur_size );
  2342. }
  2343. static void dump_get_message_request( const struct get_message_request *req )
  2344. {
  2345. fprintf( stderr, " flags=%08x", req->flags );
  2346. fprintf( stderr, ", get_win=%08x", req->get_win );
  2347. fprintf( stderr, ", get_first=%08x", req->get_first );
  2348. fprintf( stderr, ", get_last=%08x", req->get_last );
  2349. fprintf( stderr, ", hw_id=%08x", req->hw_id );
  2350. fprintf( stderr, ", wake_mask=%08x", req->wake_mask );
  2351. fprintf( stderr, ", changed_mask=%08x", req->changed_mask );
  2352. }
  2353. static void dump_get_message_reply( const struct get_message_reply *req )
  2354. {
  2355. fprintf( stderr, " win=%08x", req->win );
  2356. fprintf( stderr, ", msg=%08x", req->msg );
  2357. dump_uint64( ", wparam=", &req->wparam );
  2358. dump_uint64( ", lparam=", &req->lparam );
  2359. fprintf( stderr, ", type=%d", req->type );
  2360. fprintf( stderr, ", x=%d", req->x );
  2361. fprintf( stderr, ", y=%d", req->y );
  2362. fprintf( stderr, ", time=%08x", req->time );
  2363. fprintf( stderr, ", active_hooks=%08x", req->active_hooks );
  2364. fprintf( stderr, ", total=%u", req->total );
  2365. dump_varargs_message_data( ", data=", cur_size );
  2366. }
  2367. static void dump_reply_message_request( const struct reply_message_request *req )
  2368. {
  2369. fprintf( stderr, " remove=%d", req->remove );
  2370. dump_uint64( ", result=", &req->result );
  2371. dump_varargs_bytes( ", data=", cur_size );
  2372. }
  2373. static void dump_accept_hardware_message_request( const struct accept_hardware_message_request *req )
  2374. {
  2375. fprintf( stderr, " hw_id=%08x", req->hw_id );
  2376. }
  2377. static void dump_get_message_reply_request( const struct get_message_reply_request *req )
  2378. {
  2379. fprintf( stderr, " cancel=%d", req->cancel );
  2380. }
  2381. static void dump_get_message_reply_reply( const struct get_message_reply_reply *req )
  2382. {
  2383. dump_uint64( " result=", &req->result );
  2384. dump_varargs_bytes( ", data=", cur_size );
  2385. }
  2386. static void dump_set_win_timer_request( const struct set_win_timer_request *req )
  2387. {
  2388. fprintf( stderr, " win=%08x", req->win );
  2389. fprintf( stderr, ", msg=%08x", req->msg );
  2390. fprintf( stderr, ", rate=%08x", req->rate );
  2391. dump_uint64( ", id=", &req->id );
  2392. dump_uint64( ", lparam=", &req->lparam );
  2393. }
  2394. static void dump_set_win_timer_reply( const struct set_win_timer_reply *req )
  2395. {
  2396. dump_uint64( " id=", &req->id );
  2397. }
  2398. static void dump_kill_win_timer_request( const struct kill_win_timer_request *req )
  2399. {
  2400. fprintf( stderr, " win=%08x", req->win );
  2401. dump_uint64( ", id=", &req->id );
  2402. fprintf( stderr, ", msg=%08x", req->msg );
  2403. }
  2404. static void dump_is_window_hung_request( const struct is_window_hung_request *req )
  2405. {
  2406. fprintf( stderr, " win=%08x", req->win );
  2407. }
  2408. static void dump_is_window_hung_reply( const struct is_window_hung_reply *req )
  2409. {
  2410. fprintf( stderr, " is_hung=%d", req->is_hung );
  2411. }
  2412. static void dump_get_serial_info_request( const struct get_serial_info_request *req )
  2413. {
  2414. fprintf( stderr, " handle=%04x", req->handle );
  2415. fprintf( stderr, ", flags=%d", req->flags );
  2416. }
  2417. static void dump_get_serial_info_reply( const struct get_serial_info_reply *req )
  2418. {
  2419. fprintf( stderr, " eventmask=%08x", req->eventmask );
  2420. fprintf( stderr, ", cookie=%08x", req->cookie );
  2421. fprintf( stderr, ", pending_write=%08x", req->pending_write );
  2422. }
  2423. static void dump_set_serial_info_request( const struct set_serial_info_request *req )
  2424. {
  2425. fprintf( stderr, " handle=%04x", req->handle );
  2426. fprintf( stderr, ", flags=%d", req->flags );
  2427. }
  2428. static void dump_register_async_request( const struct register_async_request *req )
  2429. {
  2430. fprintf( stderr, " type=%d", req->type );
  2431. dump_async_data( ", async=", &req->async );
  2432. fprintf( stderr, ", count=%d", req->count );
  2433. }
  2434. static void dump_cancel_async_request( const struct cancel_async_request *req )
  2435. {
  2436. fprintf( stderr, " handle=%04x", req->handle );
  2437. dump_uint64( ", iosb=", &req->iosb );
  2438. fprintf( stderr, ", only_thread=%d", req->only_thread );
  2439. }
  2440. static void dump_get_async_result_request( const struct get_async_result_request *req )
  2441. {
  2442. dump_uint64( " user_arg=", &req->user_arg );
  2443. }
  2444. static void dump_get_async_result_reply( const struct get_async_result_reply *req )
  2445. {
  2446. dump_varargs_bytes( " out_data=", cur_size );
  2447. }
  2448. static void dump_set_async_direct_result_request( const struct set_async_direct_result_request *req )
  2449. {
  2450. fprintf( stderr, " handle=%04x", req->handle );
  2451. dump_uint64( ", information=", &req->information );
  2452. fprintf( stderr, ", status=%08x", req->status );
  2453. }
  2454. static void dump_set_async_direct_result_reply( const struct set_async_direct_result_reply *req )
  2455. {
  2456. fprintf( stderr, " handle=%04x", req->handle );
  2457. }
  2458. static void dump_read_request( const struct read_request *req )
  2459. {
  2460. dump_async_data( " async=", &req->async );
  2461. dump_uint64( ", pos=", &req->pos );
  2462. }
  2463. static void dump_read_reply( const struct read_reply *req )
  2464. {
  2465. fprintf( stderr, " wait=%04x", req->wait );
  2466. fprintf( stderr, ", options=%08x", req->options );
  2467. dump_varargs_bytes( ", data=", cur_size );
  2468. }
  2469. static void dump_write_request( const struct write_request *req )
  2470. {
  2471. dump_async_data( " async=", &req->async );
  2472. dump_uint64( ", pos=", &req->pos );
  2473. dump_varargs_bytes( ", data=", cur_size );
  2474. }
  2475. static void dump_write_reply( const struct write_reply *req )
  2476. {
  2477. fprintf( stderr, " wait=%04x", req->wait );
  2478. fprintf( stderr, ", options=%08x", req->options );
  2479. fprintf( stderr, ", size=%u", req->size );
  2480. }
  2481. static void dump_ioctl_request( const struct ioctl_request *req )
  2482. {
  2483. dump_ioctl_code( " code=", &req->code );
  2484. dump_async_data( ", async=", &req->async );
  2485. dump_varargs_bytes( ", in_data=", cur_size );
  2486. }
  2487. static void dump_ioctl_reply( const struct ioctl_reply *req )
  2488. {
  2489. fprintf( stderr, " wait=%04x", req->wait );
  2490. fprintf( stderr, ", options=%08x", req->options );
  2491. dump_varargs_bytes( ", out_data=", cur_size );
  2492. }
  2493. static void dump_set_irp_result_request( const struct set_irp_result_request *req )
  2494. {
  2495. fprintf( stderr, " handle=%04x", req->handle );
  2496. fprintf( stderr, ", status=%08x", req->status );
  2497. fprintf( stderr, ", size=%u", req->size );
  2498. dump_varargs_bytes( ", data=", cur_size );
  2499. }
  2500. static void dump_create_named_pipe_request( const struct create_named_pipe_request *req )
  2501. {
  2502. fprintf( stderr, " access=%08x", req->access );
  2503. fprintf( stderr, ", options=%08x", req->options );
  2504. fprintf( stderr, ", sharing=%08x", req->sharing );
  2505. fprintf( stderr, ", maxinstances=%08x", req->maxinstances );
  2506. fprintf( stderr, ", outsize=%08x", req->outsize );
  2507. fprintf( stderr, ", insize=%08x", req->insize );
  2508. dump_timeout( ", timeout=", &req->timeout );
  2509. fprintf( stderr, ", flags=%08x", req->flags );
  2510. dump_varargs_object_attributes( ", objattr=", cur_size );
  2511. }
  2512. static void dump_create_named_pipe_reply( const struct create_named_pipe_reply *req )
  2513. {
  2514. fprintf( stderr, " handle=%04x", req->handle );
  2515. }
  2516. static void dump_set_named_pipe_info_request( const struct set_named_pipe_info_request *req )
  2517. {
  2518. fprintf( stderr, " handle=%04x", req->handle );
  2519. fprintf( stderr, ", flags=%08x", req->flags );
  2520. }
  2521. static void dump_create_window_request( const struct create_window_request *req )
  2522. {
  2523. fprintf( stderr, " parent=%08x", req->parent );
  2524. fprintf( stderr, ", owner=%08x", req->owner );
  2525. fprintf( stderr, ", atom=%04x", req->atom );
  2526. dump_uint64( ", instance=", &req->instance );
  2527. fprintf( stderr, ", dpi=%d", req->dpi );
  2528. fprintf( stderr, ", awareness=%d", req->awareness );
  2529. fprintf( stderr, ", style=%08x", req->style );
  2530. fprintf( stderr, ", ex_style=%08x", req->ex_style );
  2531. dump_varargs_unicode_str( ", class=", cur_size );
  2532. }
  2533. static void dump_create_window_reply( const struct create_window_reply *req )
  2534. {
  2535. fprintf( stderr, " handle=%08x", req->handle );
  2536. fprintf( stderr, ", parent=%08x", req->parent );
  2537. fprintf( stderr, ", owner=%08x", req->owner );
  2538. fprintf( stderr, ", extra=%d", req->extra );
  2539. dump_uint64( ", class_ptr=", &req->class_ptr );
  2540. fprintf( stderr, ", dpi=%d", req->dpi );
  2541. fprintf( stderr, ", awareness=%d", req->awareness );
  2542. }
  2543. static void dump_destroy_window_request( const struct destroy_window_request *req )
  2544. {
  2545. fprintf( stderr, " handle=%08x", req->handle );
  2546. }
  2547. static void dump_get_desktop_window_request( const struct get_desktop_window_request *req )
  2548. {
  2549. fprintf( stderr, " force=%d", req->force );
  2550. }
  2551. static void dump_get_desktop_window_reply( const struct get_desktop_window_reply *req )
  2552. {
  2553. fprintf( stderr, " top_window=%08x", req->top_window );
  2554. fprintf( stderr, ", msg_window=%08x", req->msg_window );
  2555. }
  2556. static void dump_set_window_owner_request( const struct set_window_owner_request *req )
  2557. {
  2558. fprintf( stderr, " handle=%08x", req->handle );
  2559. fprintf( stderr, ", owner=%08x", req->owner );
  2560. }
  2561. static void dump_set_window_owner_reply( const struct set_window_owner_reply *req )
  2562. {
  2563. fprintf( stderr, " full_owner=%08x", req->full_owner );
  2564. fprintf( stderr, ", prev_owner=%08x", req->prev_owner );
  2565. }
  2566. static void dump_get_window_info_request( const struct get_window_info_request *req )
  2567. {
  2568. fprintf( stderr, " handle=%08x", req->handle );
  2569. }
  2570. static void dump_get_window_info_reply( const struct get_window_info_reply *req )
  2571. {
  2572. fprintf( stderr, " full_handle=%08x", req->full_handle );
  2573. fprintf( stderr, ", last_active=%08x", req->last_active );
  2574. fprintf( stderr, ", pid=%04x", req->pid );
  2575. fprintf( stderr, ", tid=%04x", req->tid );
  2576. fprintf( stderr, ", atom=%04x", req->atom );
  2577. fprintf( stderr, ", is_unicode=%d", req->is_unicode );
  2578. fprintf( stderr, ", dpi=%d", req->dpi );
  2579. fprintf( stderr, ", awareness=%d", req->awareness );
  2580. }
  2581. static void dump_set_window_info_request( const struct set_window_info_request *req )
  2582. {
  2583. fprintf( stderr, " flags=%04x", req->flags );
  2584. fprintf( stderr, ", is_unicode=%d", req->is_unicode );
  2585. fprintf( stderr, ", handle=%08x", req->handle );
  2586. fprintf( stderr, ", style=%08x", req->style );
  2587. fprintf( stderr, ", ex_style=%08x", req->ex_style );
  2588. fprintf( stderr, ", extra_size=%u", req->extra_size );
  2589. dump_uint64( ", instance=", &req->instance );
  2590. dump_uint64( ", user_data=", &req->user_data );
  2591. dump_uint64( ", extra_value=", &req->extra_value );
  2592. fprintf( stderr, ", extra_offset=%d", req->extra_offset );
  2593. }
  2594. static void dump_set_window_info_reply( const struct set_window_info_reply *req )
  2595. {
  2596. fprintf( stderr, " old_style=%08x", req->old_style );
  2597. fprintf( stderr, ", old_ex_style=%08x", req->old_ex_style );
  2598. dump_uint64( ", old_instance=", &req->old_instance );
  2599. dump_uint64( ", old_user_data=", &req->old_user_data );
  2600. dump_uint64( ", old_extra_value=", &req->old_extra_value );
  2601. dump_uint64( ", old_id=", &req->old_id );
  2602. }
  2603. static void dump_set_parent_request( const struct set_parent_request *req )
  2604. {
  2605. fprintf( stderr, " handle=%08x", req->handle );
  2606. fprintf( stderr, ", parent=%08x", req->parent );
  2607. }
  2608. static void dump_set_parent_reply( const struct set_parent_reply *req )
  2609. {
  2610. fprintf( stderr, " old_parent=%08x", req->old_parent );
  2611. fprintf( stderr, ", full_parent=%08x", req->full_parent );
  2612. fprintf( stderr, ", dpi=%d", req->dpi );
  2613. fprintf( stderr, ", awareness=%d", req->awareness );
  2614. }
  2615. static void dump_get_window_parents_request( const struct get_window_parents_request *req )
  2616. {
  2617. fprintf( stderr, " handle=%08x", req->handle );
  2618. }
  2619. static void dump_get_window_parents_reply( const struct get_window_parents_reply *req )
  2620. {
  2621. fprintf( stderr, " count=%d", req->count );
  2622. dump_varargs_user_handles( ", parents=", cur_size );
  2623. }
  2624. static void dump_get_window_children_request( const struct get_window_children_request *req )
  2625. {
  2626. fprintf( stderr, " desktop=%04x", req->desktop );
  2627. fprintf( stderr, ", parent=%08x", req->parent );
  2628. fprintf( stderr, ", atom=%04x", req->atom );
  2629. fprintf( stderr, ", tid=%04x", req->tid );
  2630. dump_varargs_unicode_str( ", class=", cur_size );
  2631. }
  2632. static void dump_get_window_children_reply( const struct get_window_children_reply *req )
  2633. {
  2634. fprintf( stderr, " count=%d", req->count );
  2635. dump_varargs_user_handles( ", children=", cur_size );
  2636. }
  2637. static void dump_get_window_children_from_point_request( const struct get_window_children_from_point_request *req )
  2638. {
  2639. fprintf( stderr, " parent=%08x", req->parent );
  2640. fprintf( stderr, ", x=%d", req->x );
  2641. fprintf( stderr, ", y=%d", req->y );
  2642. fprintf( stderr, ", dpi=%d", req->dpi );
  2643. }
  2644. static void dump_get_window_children_from_point_reply( const struct get_window_children_from_point_reply *req )
  2645. {
  2646. fprintf( stderr, " count=%d", req->count );
  2647. dump_varargs_user_handles( ", children=", cur_size );
  2648. }
  2649. static void dump_get_window_tree_request( const struct get_window_tree_request *req )
  2650. {
  2651. fprintf( stderr, " handle=%08x", req->handle );
  2652. }
  2653. static void dump_get_window_tree_reply( const struct get_window_tree_reply *req )
  2654. {
  2655. fprintf( stderr, " parent=%08x", req->parent );
  2656. fprintf( stderr, ", owner=%08x", req->owner );
  2657. fprintf( stderr, ", next_sibling=%08x", req->next_sibling );
  2658. fprintf( stderr, ", prev_sibling=%08x", req->prev_sibling );
  2659. fprintf( stderr, ", first_sibling=%08x", req->first_sibling );
  2660. fprintf( stderr, ", last_sibling=%08x", req->last_sibling );
  2661. fprintf( stderr, ", first_child=%08x", req->first_child );
  2662. fprintf( stderr, ", last_child=%08x", req->last_child );
  2663. }
  2664. static void dump_set_window_pos_request( const struct set_window_pos_request *req )
  2665. {
  2666. fprintf( stderr, " swp_flags=%04x", req->swp_flags );
  2667. fprintf( stderr, ", paint_flags=%04x", req->paint_flags );
  2668. fprintf( stderr, ", handle=%08x", req->handle );
  2669. fprintf( stderr, ", previous=%08x", req->previous );
  2670. dump_rectangle( ", window=", &req->window );
  2671. dump_rectangle( ", client=", &req->client );
  2672. dump_varargs_rectangles( ", valid=", cur_size );
  2673. }
  2674. static void dump_set_window_pos_reply( const struct set_window_pos_reply *req )
  2675. {
  2676. fprintf( stderr, " new_style=%08x", req->new_style );
  2677. fprintf( stderr, ", new_ex_style=%08x", req->new_ex_style );
  2678. fprintf( stderr, ", surface_win=%08x", req->surface_win );
  2679. fprintf( stderr, ", needs_update=%d", req->needs_update );
  2680. }
  2681. static void dump_get_window_rectangles_request( const struct get_window_rectangles_request *req )
  2682. {
  2683. fprintf( stderr, " handle=%08x", req->handle );
  2684. fprintf( stderr, ", relative=%d", req->relative );
  2685. fprintf( stderr, ", dpi=%d", req->dpi );
  2686. }
  2687. static void dump_get_window_rectangles_reply( const struct get_window_rectangles_reply *req )
  2688. {
  2689. dump_rectangle( " window=", &req->window );
  2690. dump_rectangle( ", client=", &req->client );
  2691. }
  2692. static void dump_get_window_text_request( const struct get_window_text_request *req )
  2693. {
  2694. fprintf( stderr, " handle=%08x", req->handle );
  2695. }
  2696. static void dump_get_window_text_reply( const struct get_window_text_reply *req )
  2697. {
  2698. fprintf( stderr, " length=%u", req->length );
  2699. dump_varargs_unicode_str( ", text=", cur_size );
  2700. }
  2701. static void dump_set_window_text_request( const struct set_window_text_request *req )
  2702. {
  2703. fprintf( stderr, " handle=%08x", req->handle );
  2704. dump_varargs_unicode_str( ", text=", cur_size );
  2705. }
  2706. static void dump_get_windows_offset_request( const struct get_windows_offset_request *req )
  2707. {
  2708. fprintf( stderr, " from=%08x", req->from );
  2709. fprintf( stderr, ", to=%08x", req->to );
  2710. fprintf( stderr, ", dpi=%d", req->dpi );
  2711. }
  2712. static void dump_get_windows_offset_reply( const struct get_windows_offset_reply *req )
  2713. {
  2714. fprintf( stderr, " x=%d", req->x );
  2715. fprintf( stderr, ", y=%d", req->y );
  2716. fprintf( stderr, ", mirror=%d", req->mirror );
  2717. }
  2718. static void dump_get_visible_region_request( const struct get_visible_region_request *req )
  2719. {
  2720. fprintf( stderr, " window=%08x", req->window );
  2721. fprintf( stderr, ", flags=%08x", req->flags );
  2722. }
  2723. static void dump_get_visible_region_reply( const struct get_visible_region_reply *req )
  2724. {
  2725. fprintf( stderr, " top_win=%08x", req->top_win );
  2726. dump_rectangle( ", top_rect=", &req->top_rect );
  2727. dump_rectangle( ", win_rect=", &req->win_rect );
  2728. fprintf( stderr, ", paint_flags=%08x", req->paint_flags );
  2729. fprintf( stderr, ", total_size=%u", req->total_size );
  2730. dump_varargs_rectangles( ", region=", cur_size );
  2731. }
  2732. static void dump_get_surface_region_request( const struct get_surface_region_request *req )
  2733. {
  2734. fprintf( stderr, " window=%08x", req->window );
  2735. }
  2736. static void dump_get_surface_region_reply( const struct get_surface_region_reply *req )
  2737. {
  2738. dump_rectangle( " visible_rect=", &req->visible_rect );
  2739. fprintf( stderr, ", total_size=%u", req->total_size );
  2740. dump_varargs_rectangles( ", region=", cur_size );
  2741. }
  2742. static void dump_get_window_region_request( const struct get_window_region_request *req )
  2743. {
  2744. fprintf( stderr, " window=%08x", req->window );
  2745. }
  2746. static void dump_get_window_region_reply( const struct get_window_region_reply *req )
  2747. {
  2748. fprintf( stderr, " total_size=%u", req->total_size );
  2749. dump_varargs_rectangles( ", region=", cur_size );
  2750. }
  2751. static void dump_set_window_region_request( const struct set_window_region_request *req )
  2752. {
  2753. fprintf( stderr, " window=%08x", req->window );
  2754. fprintf( stderr, ", redraw=%d", req->redraw );
  2755. dump_varargs_rectangles( ", region=", cur_size );
  2756. }
  2757. static void dump_get_update_region_request( const struct get_update_region_request *req )
  2758. {
  2759. fprintf( stderr, " window=%08x", req->window );
  2760. fprintf( stderr, ", from_child=%08x", req->from_child );
  2761. fprintf( stderr, ", flags=%08x", req->flags );
  2762. }
  2763. static void dump_get_update_region_reply( const struct get_update_region_reply *req )
  2764. {
  2765. fprintf( stderr, " child=%08x", req->child );
  2766. fprintf( stderr, ", flags=%08x", req->flags );
  2767. fprintf( stderr, ", total_size=%u", req->total_size );
  2768. dump_varargs_rectangles( ", region=", cur_size );
  2769. }
  2770. static void dump_update_window_zorder_request( const struct update_window_zorder_request *req )
  2771. {
  2772. fprintf( stderr, " window=%08x", req->window );
  2773. dump_rectangle( ", rect=", &req->rect );
  2774. }
  2775. static void dump_redraw_window_request( const struct redraw_window_request *req )
  2776. {
  2777. fprintf( stderr, " window=%08x", req->window );
  2778. fprintf( stderr, ", flags=%08x", req->flags );
  2779. dump_varargs_rectangles( ", region=", cur_size );
  2780. }
  2781. static void dump_set_window_property_request( const struct set_window_property_request *req )
  2782. {
  2783. fprintf( stderr, " window=%08x", req->window );
  2784. dump_uint64( ", data=", &req->data );
  2785. fprintf( stderr, ", atom=%04x", req->atom );
  2786. dump_varargs_unicode_str( ", name=", cur_size );
  2787. }
  2788. static void dump_remove_window_property_request( const struct remove_window_property_request *req )
  2789. {
  2790. fprintf( stderr, " window=%08x", req->window );
  2791. fprintf( stderr, ", atom=%04x", req->atom );
  2792. dump_varargs_unicode_str( ", name=", cur_size );
  2793. }
  2794. static void dump_remove_window_property_reply( const struct remove_window_property_reply *req )
  2795. {
  2796. dump_uint64( " data=", &req->data );
  2797. }
  2798. static void dump_get_window_property_request( const struct get_window_property_request *req )
  2799. {
  2800. fprintf( stderr, " window=%08x", req->window );
  2801. fprintf( stderr, ", atom=%04x", req->atom );
  2802. dump_varargs_unicode_str( ", name=", cur_size );
  2803. }
  2804. static void dump_get_window_property_reply( const struct get_window_property_reply *req )
  2805. {
  2806. dump_uint64( " data=", &req->data );
  2807. }
  2808. static void dump_get_window_properties_request( const struct get_window_properties_request *req )
  2809. {
  2810. fprintf( stderr, " window=%08x", req->window );
  2811. }
  2812. static void dump_get_window_properties_reply( const struct get_window_properties_reply *req )
  2813. {
  2814. fprintf( stderr, " total=%d", req->total );
  2815. dump_varargs_properties( ", props=", cur_size );
  2816. }
  2817. static void dump_create_winstation_request( const struct create_winstation_request *req )
  2818. {
  2819. fprintf( stderr, " flags=%08x", req->flags );
  2820. fprintf( stderr, ", access=%08x", req->access );
  2821. fprintf( stderr, ", attributes=%08x", req->attributes );
  2822. fprintf( stderr, ", rootdir=%04x", req->rootdir );
  2823. dump_varargs_unicode_str( ", name=", cur_size );
  2824. }
  2825. static void dump_create_winstation_reply( const struct create_winstation_reply *req )
  2826. {
  2827. fprintf( stderr, " handle=%04x", req->handle );
  2828. }
  2829. static void dump_open_winstation_request( const struct open_winstation_request *req )
  2830. {
  2831. fprintf( stderr, " access=%08x", req->access );
  2832. fprintf( stderr, ", attributes=%08x", req->attributes );
  2833. fprintf( stderr, ", rootdir=%04x", req->rootdir );
  2834. dump_varargs_unicode_str( ", name=", cur_size );
  2835. }
  2836. static void dump_open_winstation_reply( const struct open_winstation_reply *req )
  2837. {
  2838. fprintf( stderr, " handle=%04x", req->handle );
  2839. }
  2840. static void dump_close_winstation_request( const struct close_winstation_request *req )
  2841. {
  2842. fprintf( stderr, " handle=%04x", req->handle );
  2843. }
  2844. static void dump_get_process_winstation_request( const struct get_process_winstation_request *req )
  2845. {
  2846. }
  2847. static void dump_get_process_winstation_reply( const struct get_process_winstation_reply *req )
  2848. {
  2849. fprintf( stderr, " handle=%04x", req->handle );
  2850. }
  2851. static void dump_set_process_winstation_request( const struct set_process_winstation_request *req )
  2852. {
  2853. fprintf( stderr, " handle=%04x", req->handle );
  2854. }
  2855. static void dump_enum_winstation_request( const struct enum_winstation_request *req )
  2856. {
  2857. fprintf( stderr, " index=%08x", req->index );
  2858. }
  2859. static void dump_enum_winstation_reply( const struct enum_winstation_reply *req )
  2860. {
  2861. fprintf( stderr, " next=%08x", req->next );
  2862. dump_varargs_unicode_str( ", name=", cur_size );
  2863. }
  2864. static void dump_create_desktop_request( const struct create_desktop_request *req )
  2865. {
  2866. fprintf( stderr, " flags=%08x", req->flags );
  2867. fprintf( stderr, ", access=%08x", req->access );
  2868. fprintf( stderr, ", attributes=%08x", req->attributes );
  2869. dump_varargs_unicode_str( ", name=", cur_size );
  2870. }
  2871. static void dump_create_desktop_reply( const struct create_desktop_reply *req )
  2872. {
  2873. fprintf( stderr, " handle=%04x", req->handle );
  2874. }
  2875. static void dump_open_desktop_request( const struct open_desktop_request *req )
  2876. {
  2877. fprintf( stderr, " winsta=%04x", req->winsta );
  2878. fprintf( stderr, ", flags=%08x", req->flags );
  2879. fprintf( stderr, ", access=%08x", req->access );
  2880. fprintf( stderr, ", attributes=%08x", req->attributes );
  2881. dump_varargs_unicode_str( ", name=", cur_size );
  2882. }
  2883. static void dump_open_desktop_reply( const struct open_desktop_reply *req )
  2884. {
  2885. fprintf( stderr, " handle=%04x", req->handle );
  2886. }
  2887. static void dump_open_input_desktop_request( const struct open_input_desktop_request *req )
  2888. {
  2889. fprintf( stderr, " flags=%08x", req->flags );
  2890. fprintf( stderr, ", access=%08x", req->access );
  2891. fprintf( stderr, ", attributes=%08x", req->attributes );
  2892. }
  2893. static void dump_open_input_desktop_reply( const struct open_input_desktop_reply *req )
  2894. {
  2895. fprintf( stderr, " handle=%04x", req->handle );
  2896. }
  2897. static void dump_close_desktop_request( const struct close_desktop_request *req )
  2898. {
  2899. fprintf( stderr, " handle=%04x", req->handle );
  2900. }
  2901. static void dump_get_thread_desktop_request( const struct get_thread_desktop_request *req )
  2902. {
  2903. fprintf( stderr, " tid=%04x", req->tid );
  2904. }
  2905. static void dump_get_thread_desktop_reply( const struct get_thread_desktop_reply *req )
  2906. {
  2907. fprintf( stderr, " handle=%04x", req->handle );
  2908. }
  2909. static void dump_set_thread_desktop_request( const struct set_thread_desktop_request *req )
  2910. {
  2911. fprintf( stderr, " handle=%04x", req->handle );
  2912. }
  2913. static void dump_enum_desktop_request( const struct enum_desktop_request *req )
  2914. {
  2915. fprintf( stderr, " winstation=%04x", req->winstation );
  2916. fprintf( stderr, ", index=%08x", req->index );
  2917. }
  2918. static void dump_enum_desktop_reply( const struct enum_desktop_reply *req )
  2919. {
  2920. fprintf( stderr, " next=%08x", req->next );
  2921. dump_varargs_unicode_str( ", name=", cur_size );
  2922. }
  2923. static void dump_set_user_object_info_request( const struct set_user_object_info_request *req )
  2924. {
  2925. fprintf( stderr, " handle=%04x", req->handle );
  2926. fprintf( stderr, ", flags=%08x", req->flags );
  2927. fprintf( stderr, ", obj_flags=%08x", req->obj_flags );
  2928. }
  2929. static void dump_set_user_object_info_reply( const struct set_user_object_info_reply *req )
  2930. {
  2931. fprintf( stderr, " is_desktop=%d", req->is_desktop );
  2932. fprintf( stderr, ", old_obj_flags=%08x", req->old_obj_flags );
  2933. dump_varargs_unicode_str( ", name=", cur_size );
  2934. }
  2935. static void dump_register_hotkey_request( const struct register_hotkey_request *req )
  2936. {
  2937. fprintf( stderr, " window=%08x", req->window );
  2938. fprintf( stderr, ", id=%d", req->id );
  2939. fprintf( stderr, ", flags=%08x", req->flags );
  2940. fprintf( stderr, ", vkey=%08x", req->vkey );
  2941. }
  2942. static void dump_register_hotkey_reply( const struct register_hotkey_reply *req )
  2943. {
  2944. fprintf( stderr, " replaced=%d", req->replaced );
  2945. fprintf( stderr, ", flags=%08x", req->flags );
  2946. fprintf( stderr, ", vkey=%08x", req->vkey );
  2947. }
  2948. static void dump_unregister_hotkey_request( const struct unregister_hotkey_request *req )
  2949. {
  2950. fprintf( stderr, " window=%08x", req->window );
  2951. fprintf( stderr, ", id=%d", req->id );
  2952. }
  2953. static void dump_unregister_hotkey_reply( const struct unregister_hotkey_reply *req )
  2954. {
  2955. fprintf( stderr, " flags=%08x", req->flags );
  2956. fprintf( stderr, ", vkey=%08x", req->vkey );
  2957. }
  2958. static void dump_attach_thread_input_request( const struct attach_thread_input_request *req )
  2959. {
  2960. fprintf( stderr, " tid_from=%04x", req->tid_from );
  2961. fprintf( stderr, ", tid_to=%04x", req->tid_to );
  2962. fprintf( stderr, ", attach=%d", req->attach );
  2963. }
  2964. static void dump_get_thread_input_request( const struct get_thread_input_request *req )
  2965. {
  2966. fprintf( stderr, " tid=%04x", req->tid );
  2967. }
  2968. static void dump_get_thread_input_reply( const struct get_thread_input_reply *req )
  2969. {
  2970. fprintf( stderr, " focus=%08x", req->focus );
  2971. fprintf( stderr, ", capture=%08x", req->capture );
  2972. fprintf( stderr, ", active=%08x", req->active );
  2973. fprintf( stderr, ", foreground=%08x", req->foreground );
  2974. fprintf( stderr, ", menu_owner=%08x", req->menu_owner );
  2975. fprintf( stderr, ", move_size=%08x", req->move_size );
  2976. fprintf( stderr, ", caret=%08x", req->caret );
  2977. fprintf( stderr, ", cursor=%08x", req->cursor );
  2978. fprintf( stderr, ", show_count=%d", req->show_count );
  2979. dump_rectangle( ", rect=", &req->rect );
  2980. }
  2981. static void dump_get_last_input_time_request( const struct get_last_input_time_request *req )
  2982. {
  2983. }
  2984. static void dump_get_last_input_time_reply( const struct get_last_input_time_reply *req )
  2985. {
  2986. fprintf( stderr, " time=%08x", req->time );
  2987. }
  2988. static void dump_get_key_state_request( const struct get_key_state_request *req )
  2989. {
  2990. fprintf( stderr, " async=%d", req->async );
  2991. fprintf( stderr, ", key=%d", req->key );
  2992. }
  2993. static void dump_get_key_state_reply( const struct get_key_state_reply *req )
  2994. {
  2995. fprintf( stderr, " state=%02x", req->state );
  2996. dump_varargs_bytes( ", keystate=", cur_size );
  2997. }
  2998. static void dump_set_key_state_request( const struct set_key_state_request *req )
  2999. {
  3000. fprintf( stderr, " async=%d", req->async );
  3001. dump_varargs_bytes( ", keystate=", cur_size );
  3002. }
  3003. static void dump_set_foreground_window_request( const struct set_foreground_window_request *req )
  3004. {
  3005. fprintf( stderr, " handle=%08x", req->handle );
  3006. }
  3007. static void dump_set_foreground_window_reply( const struct set_foreground_window_reply *req )
  3008. {
  3009. fprintf( stderr, " previous=%08x", req->previous );
  3010. fprintf( stderr, ", send_msg_old=%d", req->send_msg_old );
  3011. fprintf( stderr, ", send_msg_new=%d", req->send_msg_new );
  3012. }
  3013. static void dump_set_focus_window_request( const struct set_focus_window_request *req )
  3014. {
  3015. fprintf( stderr, " handle=%08x", req->handle );
  3016. }
  3017. static void dump_set_focus_window_reply( const struct set_focus_window_reply *req )
  3018. {
  3019. fprintf( stderr, " previous=%08x", req->previous );
  3020. }
  3021. static void dump_set_active_window_request( const struct set_active_window_request *req )
  3022. {
  3023. fprintf( stderr, " handle=%08x", req->handle );
  3024. }
  3025. static void dump_set_active_window_reply( const struct set_active_window_reply *req )
  3026. {
  3027. fprintf( stderr, " previous=%08x", req->previous );
  3028. }
  3029. static void dump_set_capture_window_request( const struct set_capture_window_request *req )
  3030. {
  3031. fprintf( stderr, " handle=%08x", req->handle );
  3032. fprintf( stderr, ", flags=%08x", req->flags );
  3033. }
  3034. static void dump_set_capture_window_reply( const struct set_capture_window_reply *req )
  3035. {
  3036. fprintf( stderr, " previous=%08x", req->previous );
  3037. fprintf( stderr, ", full_handle=%08x", req->full_handle );
  3038. }
  3039. static void dump_set_caret_window_request( const struct set_caret_window_request *req )
  3040. {
  3041. fprintf( stderr, " handle=%08x", req->handle );
  3042. fprintf( stderr, ", width=%d", req->width );
  3043. fprintf( stderr, ", height=%d", req->height );
  3044. }
  3045. static void dump_set_caret_window_reply( const struct set_caret_window_reply *req )
  3046. {
  3047. fprintf( stderr, " previous=%08x", req->previous );
  3048. dump_rectangle( ", old_rect=", &req->old_rect );
  3049. fprintf( stderr, ", old_hide=%d", req->old_hide );
  3050. fprintf( stderr, ", old_state=%d", req->old_state );
  3051. }
  3052. static void dump_set_caret_info_request( const struct set_caret_info_request *req )
  3053. {
  3054. fprintf( stderr, " flags=%08x", req->flags );
  3055. fprintf( stderr, ", handle=%08x", req->handle );
  3056. fprintf( stderr, ", x=%d", req->x );
  3057. fprintf( stderr, ", y=%d", req->y );
  3058. fprintf( stderr, ", hide=%d", req->hide );
  3059. fprintf( stderr, ", state=%d", req->state );
  3060. }
  3061. static void dump_set_caret_info_reply( const struct set_caret_info_reply *req )
  3062. {
  3063. fprintf( stderr, " full_handle=%08x", req->full_handle );
  3064. dump_rectangle( ", old_rect=", &req->old_rect );
  3065. fprintf( stderr, ", old_hide=%d", req->old_hide );
  3066. fprintf( stderr, ", old_state=%d", req->old_state );
  3067. }
  3068. static void dump_set_hook_request( const struct set_hook_request *req )
  3069. {
  3070. fprintf( stderr, " id=%d", req->id );
  3071. fprintf( stderr, ", pid=%04x", req->pid );
  3072. fprintf( stderr, ", tid=%04x", req->tid );
  3073. fprintf( stderr, ", event_min=%d", req->event_min );
  3074. fprintf( stderr, ", event_max=%d", req->event_max );
  3075. dump_uint64( ", proc=", &req->proc );
  3076. fprintf( stderr, ", flags=%d", req->flags );
  3077. fprintf( stderr, ", unicode=%d", req->unicode );
  3078. dump_varargs_unicode_str( ", module=", cur_size );
  3079. }
  3080. static void dump_set_hook_reply( const struct set_hook_reply *req )
  3081. {
  3082. fprintf( stderr, " handle=%08x", req->handle );
  3083. fprintf( stderr, ", active_hooks=%08x", req->active_hooks );
  3084. }
  3085. static void dump_remove_hook_request( const struct remove_hook_request *req )
  3086. {
  3087. fprintf( stderr, " handle=%08x", req->handle );
  3088. dump_uint64( ", proc=", &req->proc );
  3089. fprintf( stderr, ", id=%d", req->id );
  3090. }
  3091. static void dump_remove_hook_reply( const struct remove_hook_reply *req )
  3092. {
  3093. fprintf( stderr, " active_hooks=%08x", req->active_hooks );
  3094. }
  3095. static void dump_start_hook_chain_request( const struct start_hook_chain_request *req )
  3096. {
  3097. fprintf( stderr, " id=%d", req->id );
  3098. fprintf( stderr, ", event=%d", req->event );
  3099. fprintf( stderr, ", window=%08x", req->window );
  3100. fprintf( stderr, ", object_id=%d", req->object_id );
  3101. fprintf( stderr, ", child_id=%d", req->child_id );
  3102. }
  3103. static void dump_start_hook_chain_reply( const struct start_hook_chain_reply *req )
  3104. {
  3105. fprintf( stderr, " handle=%08x", req->handle );
  3106. fprintf( stderr, ", pid=%04x", req->pid );
  3107. fprintf( stderr, ", tid=%04x", req->tid );
  3108. fprintf( stderr, ", unicode=%d", req->unicode );
  3109. dump_uint64( ", proc=", &req->proc );
  3110. fprintf( stderr, ", active_hooks=%08x", req->active_hooks );
  3111. dump_varargs_unicode_str( ", module=", cur_size );
  3112. }
  3113. static void dump_finish_hook_chain_request( const struct finish_hook_chain_request *req )
  3114. {
  3115. fprintf( stderr, " id=%d", req->id );
  3116. }
  3117. static void dump_get_hook_info_request( const struct get_hook_info_request *req )
  3118. {
  3119. fprintf( stderr, " handle=%08x", req->handle );
  3120. fprintf( stderr, ", get_next=%d", req->get_next );
  3121. fprintf( stderr, ", event=%d", req->event );
  3122. fprintf( stderr, ", window=%08x", req->window );
  3123. fprintf( stderr, ", object_id=%d", req->object_id );
  3124. fprintf( stderr, ", child_id=%d", req->child_id );
  3125. }
  3126. static void dump_get_hook_info_reply( const struct get_hook_info_reply *req )
  3127. {
  3128. fprintf( stderr, " handle=%08x", req->handle );
  3129. fprintf( stderr, ", id=%d", req->id );
  3130. fprintf( stderr, ", pid=%04x", req->pid );
  3131. fprintf( stderr, ", tid=%04x", req->tid );
  3132. dump_uint64( ", proc=", &req->proc );
  3133. fprintf( stderr, ", unicode=%d", req->unicode );
  3134. dump_varargs_unicode_str( ", module=", cur_size );
  3135. }
  3136. static void dump_create_class_request( const struct create_class_request *req )
  3137. {
  3138. fprintf( stderr, " local=%d", req->local );
  3139. fprintf( stderr, ", atom=%04x", req->atom );
  3140. fprintf( stderr, ", style=%08x", req->style );
  3141. dump_uint64( ", instance=", &req->instance );
  3142. fprintf( stderr, ", extra=%d", req->extra );
  3143. fprintf( stderr, ", win_extra=%d", req->win_extra );
  3144. dump_uint64( ", client_ptr=", &req->client_ptr );
  3145. fprintf( stderr, ", name_offset=%u", req->name_offset );
  3146. dump_varargs_unicode_str( ", name=", cur_size );
  3147. }
  3148. static void dump_create_class_reply( const struct create_class_reply *req )
  3149. {
  3150. fprintf( stderr, " atom=%04x", req->atom );
  3151. }
  3152. static void dump_destroy_class_request( const struct destroy_class_request *req )
  3153. {
  3154. fprintf( stderr, " atom=%04x", req->atom );
  3155. dump_uint64( ", instance=", &req->instance );
  3156. dump_varargs_unicode_str( ", name=", cur_size );
  3157. }
  3158. static void dump_destroy_class_reply( const struct destroy_class_reply *req )
  3159. {
  3160. dump_uint64( " client_ptr=", &req->client_ptr );
  3161. }
  3162. static void dump_set_class_info_request( const struct set_class_info_request *req )
  3163. {
  3164. fprintf( stderr, " window=%08x", req->window );
  3165. fprintf( stderr, ", flags=%08x", req->flags );
  3166. fprintf( stderr, ", atom=%04x", req->atom );
  3167. fprintf( stderr, ", style=%08x", req->style );
  3168. fprintf( stderr, ", win_extra=%d", req->win_extra );
  3169. dump_uint64( ", instance=", &req->instance );
  3170. fprintf( stderr, ", extra_offset=%d", req->extra_offset );
  3171. fprintf( stderr, ", extra_size=%u", req->extra_size );
  3172. dump_uint64( ", extra_value=", &req->extra_value );
  3173. }
  3174. static void dump_set_class_info_reply( const struct set_class_info_reply *req )
  3175. {
  3176. fprintf( stderr, " old_atom=%04x", req->old_atom );
  3177. fprintf( stderr, ", base_atom=%04x", req->base_atom );
  3178. dump_uint64( ", old_instance=", &req->old_instance );
  3179. dump_uint64( ", old_extra_value=", &req->old_extra_value );
  3180. fprintf( stderr, ", old_style=%08x", req->old_style );
  3181. fprintf( stderr, ", old_extra=%d", req->old_extra );
  3182. fprintf( stderr, ", old_win_extra=%d", req->old_win_extra );
  3183. }
  3184. static void dump_open_clipboard_request( const struct open_clipboard_request *req )
  3185. {
  3186. fprintf( stderr, " window=%08x", req->window );
  3187. }
  3188. static void dump_open_clipboard_reply( const struct open_clipboard_reply *req )
  3189. {
  3190. fprintf( stderr, " owner=%08x", req->owner );
  3191. }
  3192. static void dump_close_clipboard_request( const struct close_clipboard_request *req )
  3193. {
  3194. }
  3195. static void dump_close_clipboard_reply( const struct close_clipboard_reply *req )
  3196. {
  3197. fprintf( stderr, " viewer=%08x", req->viewer );
  3198. fprintf( stderr, ", owner=%08x", req->owner );
  3199. }
  3200. static void dump_empty_clipboard_request( const struct empty_clipboard_request *req )
  3201. {
  3202. }
  3203. static void dump_set_clipboard_data_request( const struct set_clipboard_data_request *req )
  3204. {
  3205. fprintf( stderr, " format=%08x", req->format );
  3206. fprintf( stderr, ", lcid=%08x", req->lcid );
  3207. dump_varargs_bytes( ", data=", cur_size );
  3208. }
  3209. static void dump_set_clipboard_data_reply( const struct set_clipboard_data_reply *req )
  3210. {
  3211. fprintf( stderr, " seqno=%08x", req->seqno );
  3212. }
  3213. static void dump_get_clipboard_data_request( const struct get_clipboard_data_request *req )
  3214. {
  3215. fprintf( stderr, " format=%08x", req->format );
  3216. fprintf( stderr, ", render=%d", req->render );
  3217. fprintf( stderr, ", cached=%d", req->cached );
  3218. fprintf( stderr, ", seqno=%08x", req->seqno );
  3219. }
  3220. static void dump_get_clipboard_data_reply( const struct get_clipboard_data_reply *req )
  3221. {
  3222. fprintf( stderr, " from=%08x", req->from );
  3223. fprintf( stderr, ", owner=%08x", req->owner );
  3224. fprintf( stderr, ", seqno=%08x", req->seqno );
  3225. fprintf( stderr, ", total=%u", req->total );
  3226. dump_varargs_bytes( ", data=", cur_size );
  3227. }
  3228. static void dump_get_clipboard_formats_request( const struct get_clipboard_formats_request *req )
  3229. {
  3230. fprintf( stderr, " format=%08x", req->format );
  3231. }
  3232. static void dump_get_clipboard_formats_reply( const struct get_clipboard_formats_reply *req )
  3233. {
  3234. fprintf( stderr, " count=%08x", req->count );
  3235. dump_varargs_uints( ", formats=", cur_size );
  3236. }
  3237. static void dump_enum_clipboard_formats_request( const struct enum_clipboard_formats_request *req )
  3238. {
  3239. fprintf( stderr, " previous=%08x", req->previous );
  3240. }
  3241. static void dump_enum_clipboard_formats_reply( const struct enum_clipboard_formats_reply *req )
  3242. {
  3243. fprintf( stderr, " format=%08x", req->format );
  3244. }
  3245. static void dump_release_clipboard_request( const struct release_clipboard_request *req )
  3246. {
  3247. fprintf( stderr, " owner=%08x", req->owner );
  3248. }
  3249. static void dump_release_clipboard_reply( const struct release_clipboard_reply *req )
  3250. {
  3251. fprintf( stderr, " viewer=%08x", req->viewer );
  3252. fprintf( stderr, ", owner=%08x", req->owner );
  3253. }
  3254. static void dump_get_clipboard_info_request( const struct get_clipboard_info_request *req )
  3255. {
  3256. }
  3257. static void dump_get_clipboard_info_reply( const struct get_clipboard_info_reply *req )
  3258. {
  3259. fprintf( stderr, " window=%08x", req->window );
  3260. fprintf( stderr, ", owner=%08x", req->owner );
  3261. fprintf( stderr, ", viewer=%08x", req->viewer );
  3262. fprintf( stderr, ", seqno=%08x", req->seqno );
  3263. }
  3264. static void dump_set_clipboard_viewer_request( const struct set_clipboard_viewer_request *req )
  3265. {
  3266. fprintf( stderr, " viewer=%08x", req->viewer );
  3267. fprintf( stderr, ", previous=%08x", req->previous );
  3268. }
  3269. static void dump_set_clipboard_viewer_reply( const struct set_clipboard_viewer_reply *req )
  3270. {
  3271. fprintf( stderr, " old_viewer=%08x", req->old_viewer );
  3272. fprintf( stderr, ", owner=%08x", req->owner );
  3273. }
  3274. static void dump_add_clipboard_listener_request( const struct add_clipboard_listener_request *req )
  3275. {
  3276. fprintf( stderr, " window=%08x", req->window );
  3277. }
  3278. static void dump_remove_clipboard_listener_request( const struct remove_clipboard_listener_request *req )
  3279. {
  3280. fprintf( stderr, " window=%08x", req->window );
  3281. }
  3282. static void dump_open_token_request( const struct open_token_request *req )
  3283. {
  3284. fprintf( stderr, " handle=%04x", req->handle );
  3285. fprintf( stderr, ", access=%08x", req->access );
  3286. fprintf( stderr, ", attributes=%08x", req->attributes );
  3287. fprintf( stderr, ", flags=%08x", req->flags );
  3288. }
  3289. static void dump_open_token_reply( const struct open_token_reply *req )
  3290. {
  3291. fprintf( stderr, " token=%04x", req->token );
  3292. }
  3293. static void dump_set_global_windows_request( const struct set_global_windows_request *req )
  3294. {
  3295. fprintf( stderr, " flags=%08x", req->flags );
  3296. fprintf( stderr, ", shell_window=%08x", req->shell_window );
  3297. fprintf( stderr, ", shell_listview=%08x", req->shell_listview );
  3298. fprintf( stderr, ", progman_window=%08x", req->progman_window );
  3299. fprintf( stderr, ", taskman_window=%08x", req->taskman_window );
  3300. }
  3301. static void dump_set_global_windows_reply( const struct set_global_windows_reply *req )
  3302. {
  3303. fprintf( stderr, " old_shell_window=%08x", req->old_shell_window );
  3304. fprintf( stderr, ", old_shell_listview=%08x", req->old_shell_listview );
  3305. fprintf( stderr, ", old_progman_window=%08x", req->old_progman_window );
  3306. fprintf( stderr, ", old_taskman_window=%08x", req->old_taskman_window );
  3307. }
  3308. static void dump_adjust_token_privileges_request( const struct adjust_token_privileges_request *req )
  3309. {
  3310. fprintf( stderr, " handle=%04x", req->handle );
  3311. fprintf( stderr, ", disable_all=%d", req->disable_all );
  3312. fprintf( stderr, ", get_modified_state=%d", req->get_modified_state );
  3313. dump_varargs_luid_attr( ", privileges=", cur_size );
  3314. }
  3315. static void dump_adjust_token_privileges_reply( const struct adjust_token_privileges_reply *req )
  3316. {
  3317. fprintf( stderr, " len=%08x", req->len );
  3318. dump_varargs_luid_attr( ", privileges=", cur_size );
  3319. }
  3320. static void dump_get_token_privileges_request( const struct get_token_privileges_request *req )
  3321. {
  3322. fprintf( stderr, " handle=%04x", req->handle );
  3323. }
  3324. static void dump_get_token_privileges_reply( const struct get_token_privileges_reply *req )
  3325. {
  3326. fprintf( stderr, " len=%08x", req->len );
  3327. dump_varargs_luid_attr( ", privileges=", cur_size );
  3328. }
  3329. static void dump_check_token_privileges_request( const struct check_token_privileges_request *req )
  3330. {
  3331. fprintf( stderr, " handle=%04x", req->handle );
  3332. fprintf( stderr, ", all_required=%d", req->all_required );
  3333. dump_varargs_luid_attr( ", privileges=", cur_size );
  3334. }
  3335. static void dump_check_token_privileges_reply( const struct check_token_privileges_reply *req )
  3336. {
  3337. fprintf( stderr, " has_privileges=%d", req->has_privileges );
  3338. dump_varargs_luid_attr( ", privileges=", cur_size );
  3339. }
  3340. static void dump_duplicate_token_request( const struct duplicate_token_request *req )
  3341. {
  3342. fprintf( stderr, " handle=%04x", req->handle );
  3343. fprintf( stderr, ", access=%08x", req->access );
  3344. fprintf( stderr, ", primary=%d", req->primary );
  3345. fprintf( stderr, ", impersonation_level=%d", req->impersonation_level );
  3346. dump_varargs_object_attributes( ", objattr=", cur_size );
  3347. }
  3348. static void dump_duplicate_token_reply( const struct duplicate_token_reply *req )
  3349. {
  3350. fprintf( stderr, " new_handle=%04x", req->new_handle );
  3351. }
  3352. static void dump_filter_token_request( const struct filter_token_request *req )
  3353. {
  3354. fprintf( stderr, " handle=%04x", req->handle );
  3355. fprintf( stderr, ", flags=%08x", req->flags );
  3356. fprintf( stderr, ", privileges_size=%u", req->privileges_size );
  3357. dump_varargs_luid_attr( ", privileges=", min(cur_size,req->privileges_size) );
  3358. dump_varargs_sid( ", disable_sids=", cur_size );
  3359. }
  3360. static void dump_filter_token_reply( const struct filter_token_reply *req )
  3361. {
  3362. fprintf( stderr, " new_handle=%04x", req->new_handle );
  3363. }
  3364. static void dump_access_check_request( const struct access_check_request *req )
  3365. {
  3366. fprintf( stderr, " handle=%04x", req->handle );
  3367. fprintf( stderr, ", desired_access=%08x", req->desired_access );
  3368. dump_generic_map( ", mapping=", &req->mapping );
  3369. dump_varargs_security_descriptor( ", sd=", cur_size );
  3370. }
  3371. static void dump_access_check_reply( const struct access_check_reply *req )
  3372. {
  3373. fprintf( stderr, " access_granted=%08x", req->access_granted );
  3374. fprintf( stderr, ", access_status=%08x", req->access_status );
  3375. fprintf( stderr, ", privileges_len=%08x", req->privileges_len );
  3376. dump_varargs_luid_attr( ", privileges=", cur_size );
  3377. }
  3378. static void dump_get_token_sid_request( const struct get_token_sid_request *req )
  3379. {
  3380. fprintf( stderr, " handle=%04x", req->handle );
  3381. fprintf( stderr, ", which_sid=%08x", req->which_sid );
  3382. }
  3383. static void dump_get_token_sid_reply( const struct get_token_sid_reply *req )
  3384. {
  3385. fprintf( stderr, " sid_len=%u", req->sid_len );
  3386. dump_varargs_sid( ", sid=", cur_size );
  3387. }
  3388. static void dump_get_token_groups_request( const struct get_token_groups_request *req )
  3389. {
  3390. fprintf( stderr, " handle=%04x", req->handle );
  3391. }
  3392. static void dump_get_token_groups_reply( const struct get_token_groups_reply *req )
  3393. {
  3394. fprintf( stderr, " attr_len=%u", req->attr_len );
  3395. fprintf( stderr, ", sid_len=%u", req->sid_len );
  3396. dump_varargs_uints( ", attrs=", min(cur_size,req->attr_len) );
  3397. dump_varargs_sids( ", sids=", cur_size );
  3398. }
  3399. static void dump_get_token_default_dacl_request( const struct get_token_default_dacl_request *req )
  3400. {
  3401. fprintf( stderr, " handle=%04x", req->handle );
  3402. }
  3403. static void dump_get_token_default_dacl_reply( const struct get_token_default_dacl_reply *req )
  3404. {
  3405. fprintf( stderr, " acl_len=%u", req->acl_len );
  3406. dump_varargs_acl( ", acl=", cur_size );
  3407. }
  3408. static void dump_set_token_default_dacl_request( const struct set_token_default_dacl_request *req )
  3409. {
  3410. fprintf( stderr, " handle=%04x", req->handle );
  3411. dump_varargs_acl( ", acl=", cur_size );
  3412. }
  3413. static void dump_set_security_object_request( const struct set_security_object_request *req )
  3414. {
  3415. fprintf( stderr, " handle=%04x", req->handle );
  3416. fprintf( stderr, ", security_info=%08x", req->security_info );
  3417. dump_varargs_security_descriptor( ", sd=", cur_size );
  3418. }
  3419. static void dump_get_security_object_request( const struct get_security_object_request *req )
  3420. {
  3421. fprintf( stderr, " handle=%04x", req->handle );
  3422. fprintf( stderr, ", security_info=%08x", req->security_info );
  3423. }
  3424. static void dump_get_security_object_reply( const struct get_security_object_reply *req )
  3425. {
  3426. fprintf( stderr, " sd_len=%08x", req->sd_len );
  3427. dump_varargs_security_descriptor( ", sd=", cur_size );
  3428. }
  3429. static void dump_get_system_handles_request( const struct get_system_handles_request *req )
  3430. {
  3431. }
  3432. static void dump_get_system_handles_reply( const struct get_system_handles_reply *req )
  3433. {
  3434. fprintf( stderr, " count=%08x", req->count );
  3435. dump_varargs_handle_infos( ", data=", cur_size );
  3436. }
  3437. static void dump_create_mailslot_request( const struct create_mailslot_request *req )
  3438. {
  3439. fprintf( stderr, " access=%08x", req->access );
  3440. dump_timeout( ", read_timeout=", &req->read_timeout );
  3441. fprintf( stderr, ", max_msgsize=%08x", req->max_msgsize );
  3442. dump_varargs_object_attributes( ", objattr=", cur_size );
  3443. }
  3444. static void dump_create_mailslot_reply( const struct create_mailslot_reply *req )
  3445. {
  3446. fprintf( stderr, " handle=%04x", req->handle );
  3447. }
  3448. static void dump_set_mailslot_info_request( const struct set_mailslot_info_request *req )
  3449. {
  3450. fprintf( stderr, " handle=%04x", req->handle );
  3451. dump_timeout( ", read_timeout=", &req->read_timeout );
  3452. fprintf( stderr, ", flags=%08x", req->flags );
  3453. }
  3454. static void dump_set_mailslot_info_reply( const struct set_mailslot_info_reply *req )
  3455. {
  3456. dump_timeout( " read_timeout=", &req->read_timeout );
  3457. fprintf( stderr, ", max_msgsize=%08x", req->max_msgsize );
  3458. }
  3459. static void dump_create_directory_request( const struct create_directory_request *req )
  3460. {
  3461. fprintf( stderr, " access=%08x", req->access );
  3462. dump_varargs_object_attributes( ", objattr=", cur_size );
  3463. }
  3464. static void dump_create_directory_reply( const struct create_directory_reply *req )
  3465. {
  3466. fprintf( stderr, " handle=%04x", req->handle );
  3467. }
  3468. static void dump_open_directory_request( const struct open_directory_request *req )
  3469. {
  3470. fprintf( stderr, " access=%08x", req->access );
  3471. fprintf( stderr, ", attributes=%08x", req->attributes );
  3472. fprintf( stderr, ", rootdir=%04x", req->rootdir );
  3473. dump_varargs_unicode_str( ", directory_name=", cur_size );
  3474. }
  3475. static void dump_open_directory_reply( const struct open_directory_reply *req )
  3476. {
  3477. fprintf( stderr, " handle=%04x", req->handle );
  3478. }
  3479. static void dump_get_directory_entry_request( const struct get_directory_entry_request *req )
  3480. {
  3481. fprintf( stderr, " handle=%04x", req->handle );
  3482. fprintf( stderr, ", index=%08x", req->index );
  3483. }
  3484. static void dump_get_directory_entry_reply( const struct get_directory_entry_reply *req )
  3485. {
  3486. fprintf( stderr, " name_len=%u", req->name_len );
  3487. dump_varargs_unicode_str( ", name=", min(cur_size,req->name_len) );
  3488. dump_varargs_unicode_str( ", type=", cur_size );
  3489. }
  3490. static void dump_create_symlink_request( const struct create_symlink_request *req )
  3491. {
  3492. fprintf( stderr, " access=%08x", req->access );
  3493. dump_varargs_object_attributes( ", objattr=", cur_size );
  3494. dump_varargs_unicode_str( ", target_name=", cur_size );
  3495. }
  3496. static void dump_create_symlink_reply( const struct create_symlink_reply *req )
  3497. {
  3498. fprintf( stderr, " handle=%04x", req->handle );
  3499. }
  3500. static void dump_open_symlink_request( const struct open_symlink_request *req )
  3501. {
  3502. fprintf( stderr, " access=%08x", req->access );
  3503. fprintf( stderr, ", attributes=%08x", req->attributes );
  3504. fprintf( stderr, ", rootdir=%04x", req->rootdir );
  3505. dump_varargs_unicode_str( ", name=", cur_size );
  3506. }
  3507. static void dump_open_symlink_reply( const struct open_symlink_reply *req )
  3508. {
  3509. fprintf( stderr, " handle=%04x", req->handle );
  3510. }
  3511. static void dump_query_symlink_request( const struct query_symlink_request *req )
  3512. {
  3513. fprintf( stderr, " handle=%04x", req->handle );
  3514. }
  3515. static void dump_query_symlink_reply( const struct query_symlink_reply *req )
  3516. {
  3517. fprintf( stderr, " total=%u", req->total );
  3518. dump_varargs_unicode_str( ", target_name=", cur_size );
  3519. }
  3520. static void dump_get_object_info_request( const struct get_object_info_request *req )
  3521. {
  3522. fprintf( stderr, " handle=%04x", req->handle );
  3523. }
  3524. static void dump_get_object_info_reply( const struct get_object_info_reply *req )
  3525. {
  3526. fprintf( stderr, " access=%08x", req->access );
  3527. fprintf( stderr, ", ref_count=%08x", req->ref_count );
  3528. fprintf( stderr, ", handle_count=%08x", req->handle_count );
  3529. }
  3530. static void dump_get_object_name_request( const struct get_object_name_request *req )
  3531. {
  3532. fprintf( stderr, " handle=%04x", req->handle );
  3533. }
  3534. static void dump_get_object_name_reply( const struct get_object_name_reply *req )
  3535. {
  3536. fprintf( stderr, " total=%u", req->total );
  3537. dump_varargs_unicode_str( ", name=", cur_size );
  3538. }
  3539. static void dump_get_object_type_request( const struct get_object_type_request *req )
  3540. {
  3541. fprintf( stderr, " handle=%04x", req->handle );
  3542. }
  3543. static void dump_get_object_type_reply( const struct get_object_type_reply *req )
  3544. {
  3545. dump_varargs_object_type_info( " info=", cur_size );
  3546. }
  3547. static void dump_get_object_types_request( const struct get_object_types_request *req )
  3548. {
  3549. }
  3550. static void dump_get_object_types_reply( const struct get_object_types_reply *req )
  3551. {
  3552. fprintf( stderr, " count=%d", req->count );
  3553. dump_varargs_object_types_info( ", info=", cur_size );
  3554. }
  3555. static void dump_allocate_locally_unique_id_request( const struct allocate_locally_unique_id_request *req )
  3556. {
  3557. }
  3558. static void dump_allocate_locally_unique_id_reply( const struct allocate_locally_unique_id_reply *req )
  3559. {
  3560. dump_luid( " luid=", &req->luid );
  3561. }
  3562. static void dump_create_device_manager_request( const struct create_device_manager_request *req )
  3563. {
  3564. fprintf( stderr, " access=%08x", req->access );
  3565. fprintf( stderr, ", attributes=%08x", req->attributes );
  3566. }
  3567. static void dump_create_device_manager_reply( const struct create_device_manager_reply *req )
  3568. {
  3569. fprintf( stderr, " handle=%04x", req->handle );
  3570. }
  3571. static void dump_create_device_request( const struct create_device_request *req )
  3572. {
  3573. fprintf( stderr, " rootdir=%04x", req->rootdir );
  3574. dump_uint64( ", user_ptr=", &req->user_ptr );
  3575. fprintf( stderr, ", manager=%04x", req->manager );
  3576. dump_varargs_unicode_str( ", name=", cur_size );
  3577. }
  3578. static void dump_delete_device_request( const struct delete_device_request *req )
  3579. {
  3580. fprintf( stderr, " manager=%04x", req->manager );
  3581. dump_uint64( ", device=", &req->device );
  3582. }
  3583. static void dump_get_next_device_request_request( const struct get_next_device_request_request *req )
  3584. {
  3585. fprintf( stderr, " manager=%04x", req->manager );
  3586. fprintf( stderr, ", prev=%04x", req->prev );
  3587. fprintf( stderr, ", status=%08x", req->status );
  3588. dump_uint64( ", user_ptr=", &req->user_ptr );
  3589. fprintf( stderr, ", pending=%d", req->pending );
  3590. fprintf( stderr, ", iosb_status=%08x", req->iosb_status );
  3591. fprintf( stderr, ", result=%u", req->result );
  3592. dump_varargs_bytes( ", data=", cur_size );
  3593. }
  3594. static void dump_get_next_device_request_reply( const struct get_next_device_request_reply *req )
  3595. {
  3596. dump_irp_params( " params=", &req->params );
  3597. fprintf( stderr, ", next=%04x", req->next );
  3598. fprintf( stderr, ", client_tid=%04x", req->client_tid );
  3599. dump_uint64( ", client_thread=", &req->client_thread );
  3600. fprintf( stderr, ", in_size=%u", req->in_size );
  3601. dump_varargs_bytes( ", next_data=", cur_size );
  3602. }
  3603. static void dump_get_kernel_object_ptr_request( const struct get_kernel_object_ptr_request *req )
  3604. {
  3605. fprintf( stderr, " manager=%04x", req->manager );
  3606. fprintf( stderr, ", handle=%04x", req->handle );
  3607. }
  3608. static void dump_get_kernel_object_ptr_reply( const struct get_kernel_object_ptr_reply *req )
  3609. {
  3610. dump_uint64( " user_ptr=", &req->user_ptr );
  3611. }
  3612. static void dump_set_kernel_object_ptr_request( const struct set_kernel_object_ptr_request *req )
  3613. {
  3614. fprintf( stderr, " manager=%04x", req->manager );
  3615. fprintf( stderr, ", handle=%04x", req->handle );
  3616. dump_uint64( ", user_ptr=", &req->user_ptr );
  3617. }
  3618. static void dump_grab_kernel_object_request( const struct grab_kernel_object_request *req )
  3619. {
  3620. fprintf( stderr, " manager=%04x", req->manager );
  3621. dump_uint64( ", user_ptr=", &req->user_ptr );
  3622. }
  3623. static void dump_release_kernel_object_request( const struct release_kernel_object_request *req )
  3624. {
  3625. fprintf( stderr, " manager=%04x", req->manager );
  3626. dump_uint64( ", user_ptr=", &req->user_ptr );
  3627. }
  3628. static void dump_get_kernel_object_handle_request( const struct get_kernel_object_handle_request *req )
  3629. {
  3630. fprintf( stderr, " manager=%04x", req->manager );
  3631. dump_uint64( ", user_ptr=", &req->user_ptr );
  3632. fprintf( stderr, ", access=%08x", req->access );
  3633. }
  3634. static void dump_get_kernel_object_handle_reply( const struct get_kernel_object_handle_reply *req )
  3635. {
  3636. fprintf( stderr, " handle=%04x", req->handle );
  3637. }
  3638. static void dump_make_process_system_request( const struct make_process_system_request *req )
  3639. {
  3640. fprintf( stderr, " handle=%04x", req->handle );
  3641. }
  3642. static void dump_make_process_system_reply( const struct make_process_system_reply *req )
  3643. {
  3644. fprintf( stderr, " event=%04x", req->event );
  3645. }
  3646. static void dump_get_token_info_request( const struct get_token_info_request *req )
  3647. {
  3648. fprintf( stderr, " handle=%04x", req->handle );
  3649. }
  3650. static void dump_get_token_info_reply( const struct get_token_info_reply *req )
  3651. {
  3652. dump_luid( " token_id=", &req->token_id );
  3653. dump_luid( ", modified_id=", &req->modified_id );
  3654. fprintf( stderr, ", session_id=%08x", req->session_id );
  3655. fprintf( stderr, ", primary=%d", req->primary );
  3656. fprintf( stderr, ", impersonation_level=%d", req->impersonation_level );
  3657. fprintf( stderr, ", elevation=%d", req->elevation );
  3658. fprintf( stderr, ", group_count=%d", req->group_count );
  3659. fprintf( stderr, ", privilege_count=%d", req->privilege_count );
  3660. }
  3661. static void dump_create_linked_token_request( const struct create_linked_token_request *req )
  3662. {
  3663. fprintf( stderr, " handle=%04x", req->handle );
  3664. }
  3665. static void dump_create_linked_token_reply( const struct create_linked_token_reply *req )
  3666. {
  3667. fprintf( stderr, " linked=%04x", req->linked );
  3668. }
  3669. static void dump_create_completion_request( const struct create_completion_request *req )
  3670. {
  3671. fprintf( stderr, " access=%08x", req->access );
  3672. fprintf( stderr, ", concurrent=%08x", req->concurrent );
  3673. dump_varargs_object_attributes( ", objattr=", cur_size );
  3674. }
  3675. static void dump_create_completion_reply( const struct create_completion_reply *req )
  3676. {
  3677. fprintf( stderr, " handle=%04x", req->handle );
  3678. }
  3679. static void dump_open_completion_request( const struct open_completion_request *req )
  3680. {
  3681. fprintf( stderr, " access=%08x", req->access );
  3682. fprintf( stderr, ", attributes=%08x", req->attributes );
  3683. fprintf( stderr, ", rootdir=%04x", req->rootdir );
  3684. dump_varargs_unicode_str( ", filename=", cur_size );
  3685. }
  3686. static void dump_open_completion_reply( const struct open_completion_reply *req )
  3687. {
  3688. fprintf( stderr, " handle=%04x", req->handle );
  3689. }
  3690. static void dump_add_completion_request( const struct add_completion_request *req )
  3691. {
  3692. fprintf( stderr, " handle=%04x", req->handle );
  3693. dump_uint64( ", ckey=", &req->ckey );
  3694. dump_uint64( ", cvalue=", &req->cvalue );
  3695. dump_uint64( ", information=", &req->information );
  3696. fprintf( stderr, ", status=%08x", req->status );
  3697. }
  3698. static void dump_remove_completion_request( const struct remove_completion_request *req )
  3699. {
  3700. fprintf( stderr, " handle=%04x", req->handle );
  3701. }
  3702. static void dump_remove_completion_reply( const struct remove_completion_reply *req )
  3703. {
  3704. dump_uint64( " ckey=", &req->ckey );
  3705. dump_uint64( ", cvalue=", &req->cvalue );
  3706. dump_uint64( ", information=", &req->information );
  3707. fprintf( stderr, ", status=%08x", req->status );
  3708. }
  3709. static void dump_query_completion_request( const struct query_completion_request *req )
  3710. {
  3711. fprintf( stderr, " handle=%04x", req->handle );
  3712. }
  3713. static void dump_query_completion_reply( const struct query_completion_reply *req )
  3714. {
  3715. fprintf( stderr, " depth=%08x", req->depth );
  3716. }
  3717. static void dump_set_completion_info_request( const struct set_completion_info_request *req )
  3718. {
  3719. fprintf( stderr, " handle=%04x", req->handle );
  3720. dump_uint64( ", ckey=", &req->ckey );
  3721. fprintf( stderr, ", chandle=%04x", req->chandle );
  3722. }
  3723. static void dump_add_fd_completion_request( const struct add_fd_completion_request *req )
  3724. {
  3725. fprintf( stderr, " handle=%04x", req->handle );
  3726. dump_uint64( ", cvalue=", &req->cvalue );
  3727. dump_uint64( ", information=", &req->information );
  3728. fprintf( stderr, ", status=%08x", req->status );
  3729. fprintf( stderr, ", async=%d", req->async );
  3730. }
  3731. static void dump_set_fd_completion_mode_request( const struct set_fd_completion_mode_request *req )
  3732. {
  3733. fprintf( stderr, " handle=%04x", req->handle );
  3734. fprintf( stderr, ", flags=%08x", req->flags );
  3735. }
  3736. static void dump_set_fd_disp_info_request( const struct set_fd_disp_info_request *req )
  3737. {
  3738. fprintf( stderr, " handle=%04x", req->handle );
  3739. fprintf( stderr, ", unlink=%d", req->unlink );
  3740. }
  3741. static void dump_set_fd_name_info_request( const struct set_fd_name_info_request *req )
  3742. {
  3743. fprintf( stderr, " handle=%04x", req->handle );
  3744. fprintf( stderr, ", rootdir=%04x", req->rootdir );
  3745. fprintf( stderr, ", namelen=%u", req->namelen );
  3746. fprintf( stderr, ", link=%d", req->link );
  3747. fprintf( stderr, ", replace=%d", req->replace );
  3748. dump_varargs_unicode_str( ", name=", min(cur_size,req->namelen) );
  3749. dump_varargs_string( ", filename=", cur_size );
  3750. }
  3751. static void dump_set_fd_eof_info_request( const struct set_fd_eof_info_request *req )
  3752. {
  3753. fprintf( stderr, " handle=%04x", req->handle );
  3754. dump_uint64( ", eof=", &req->eof );
  3755. }
  3756. static void dump_get_window_layered_info_request( const struct get_window_layered_info_request *req )
  3757. {
  3758. fprintf( stderr, " handle=%08x", req->handle );
  3759. }
  3760. static void dump_get_window_layered_info_reply( const struct get_window_layered_info_reply *req )
  3761. {
  3762. fprintf( stderr, " color_key=%08x", req->color_key );
  3763. fprintf( stderr, ", alpha=%08x", req->alpha );
  3764. fprintf( stderr, ", flags=%08x", req->flags );
  3765. }
  3766. static void dump_set_window_layered_info_request( const struct set_window_layered_info_request *req )
  3767. {
  3768. fprintf( stderr, " handle=%08x", req->handle );
  3769. fprintf( stderr, ", color_key=%08x", req->color_key );
  3770. fprintf( stderr, ", alpha=%08x", req->alpha );
  3771. fprintf( stderr, ", flags=%08x", req->flags );
  3772. }
  3773. static void dump_alloc_user_handle_request( const struct alloc_user_handle_request *req )
  3774. {
  3775. }
  3776. static void dump_alloc_user_handle_reply( const struct alloc_user_handle_reply *req )
  3777. {
  3778. fprintf( stderr, " handle=%08x", req->handle );
  3779. }
  3780. static void dump_free_user_handle_request( const struct free_user_handle_request *req )
  3781. {
  3782. fprintf( stderr, " handle=%08x", req->handle );
  3783. }
  3784. static void dump_set_cursor_request( const struct set_cursor_request *req )
  3785. {
  3786. fprintf( stderr, " flags=%08x", req->flags );
  3787. fprintf( stderr, ", handle=%08x", req->handle );
  3788. fprintf( stderr, ", show_count=%d", req->show_count );
  3789. fprintf( stderr, ", x=%d", req->x );
  3790. fprintf( stderr, ", y=%d", req->y );
  3791. dump_rectangle( ", clip=", &req->clip );
  3792. fprintf( stderr, ", clip_msg=%08x", req->clip_msg );
  3793. }
  3794. static void dump_set_cursor_reply( const struct set_cursor_reply *req )
  3795. {
  3796. fprintf( stderr, " prev_handle=%08x", req->prev_handle );
  3797. fprintf( stderr, ", prev_count=%d", req->prev_count );
  3798. fprintf( stderr, ", prev_x=%d", req->prev_x );
  3799. fprintf( stderr, ", prev_y=%d", req->prev_y );
  3800. fprintf( stderr, ", new_x=%d", req->new_x );
  3801. fprintf( stderr, ", new_y=%d", req->new_y );
  3802. dump_rectangle( ", new_clip=", &req->new_clip );
  3803. fprintf( stderr, ", last_change=%08x", req->last_change );
  3804. }
  3805. static void dump_get_cursor_history_request( const struct get_cursor_history_request *req )
  3806. {
  3807. }
  3808. static void dump_get_cursor_history_reply( const struct get_cursor_history_reply *req )
  3809. {
  3810. dump_varargs_cursor_positions( " history=", cur_size );
  3811. }
  3812. static void dump_get_rawinput_buffer_request( const struct get_rawinput_buffer_request *req )
  3813. {
  3814. fprintf( stderr, " rawinput_size=%u", req->rawinput_size );
  3815. fprintf( stderr, ", buffer_size=%u", req->buffer_size );
  3816. }
  3817. static void dump_get_rawinput_buffer_reply( const struct get_rawinput_buffer_reply *req )
  3818. {
  3819. fprintf( stderr, " next_size=%u", req->next_size );
  3820. fprintf( stderr, ", count=%08x", req->count );
  3821. dump_varargs_bytes( ", data=", cur_size );
  3822. }
  3823. static void dump_update_rawinput_devices_request( const struct update_rawinput_devices_request *req )
  3824. {
  3825. dump_varargs_rawinput_devices( " devices=", cur_size );
  3826. }
  3827. static void dump_get_rawinput_devices_request( const struct get_rawinput_devices_request *req )
  3828. {
  3829. }
  3830. static void dump_get_rawinput_devices_reply( const struct get_rawinput_devices_reply *req )
  3831. {
  3832. fprintf( stderr, " device_count=%08x", req->device_count );
  3833. dump_varargs_rawinput_devices( ", devices=", cur_size );
  3834. }
  3835. static void dump_create_job_request( const struct create_job_request *req )
  3836. {
  3837. fprintf( stderr, " access=%08x", req->access );
  3838. dump_varargs_object_attributes( ", objattr=", cur_size );
  3839. }
  3840. static void dump_create_job_reply( const struct create_job_reply *req )
  3841. {
  3842. fprintf( stderr, " handle=%04x", req->handle );
  3843. }
  3844. static void dump_open_job_request( const struct open_job_request *req )
  3845. {
  3846. fprintf( stderr, " access=%08x", req->access );
  3847. fprintf( stderr, ", attributes=%08x", req->attributes );
  3848. fprintf( stderr, ", rootdir=%04x", req->rootdir );
  3849. dump_varargs_unicode_str( ", name=", cur_size );
  3850. }
  3851. static void dump_open_job_reply( const struct open_job_reply *req )
  3852. {
  3853. fprintf( stderr, " handle=%04x", req->handle );
  3854. }
  3855. static void dump_assign_job_request( const struct assign_job_request *req )
  3856. {
  3857. fprintf( stderr, " job=%04x", req->job );
  3858. fprintf( stderr, ", process=%04x", req->process );
  3859. }
  3860. static void dump_process_in_job_request( const struct process_in_job_request *req )
  3861. {
  3862. fprintf( stderr, " job=%04x", req->job );
  3863. fprintf( stderr, ", process=%04x", req->process );
  3864. }
  3865. static void dump_set_job_limits_request( const struct set_job_limits_request *req )
  3866. {
  3867. fprintf( stderr, " handle=%04x", req->handle );
  3868. fprintf( stderr, ", limit_flags=%08x", req->limit_flags );
  3869. }
  3870. static void dump_set_job_completion_port_request( const struct set_job_completion_port_request *req )
  3871. {
  3872. fprintf( stderr, " job=%04x", req->job );
  3873. fprintf( stderr, ", port=%04x", req->port );
  3874. dump_uint64( ", key=", &req->key );
  3875. }
  3876. static void dump_get_job_info_request( const struct get_job_info_request *req )
  3877. {
  3878. fprintf( stderr, " handle=%04x", req->handle );
  3879. }
  3880. static void dump_get_job_info_reply( const struct get_job_info_reply *req )
  3881. {
  3882. fprintf( stderr, " total_processes=%d", req->total_processes );
  3883. fprintf( stderr, ", active_processes=%d", req->active_processes );
  3884. dump_varargs_uints( ", pids=", cur_size );
  3885. }
  3886. static void dump_terminate_job_request( const struct terminate_job_request *req )
  3887. {
  3888. fprintf( stderr, " handle=%04x", req->handle );
  3889. fprintf( stderr, ", status=%d", req->status );
  3890. }
  3891. static void dump_suspend_process_request( const struct suspend_process_request *req )
  3892. {
  3893. fprintf( stderr, " handle=%04x", req->handle );
  3894. }
  3895. static void dump_resume_process_request( const struct resume_process_request *req )
  3896. {
  3897. fprintf( stderr, " handle=%04x", req->handle );
  3898. }
  3899. static void dump_get_next_thread_request( const struct get_next_thread_request *req )
  3900. {
  3901. fprintf( stderr, " process=%04x", req->process );
  3902. fprintf( stderr, ", last=%04x", req->last );
  3903. fprintf( stderr, ", access=%08x", req->access );
  3904. fprintf( stderr, ", attributes=%08x", req->attributes );
  3905. fprintf( stderr, ", flags=%08x", req->flags );
  3906. }
  3907. static void dump_get_next_thread_reply( const struct get_next_thread_reply *req )
  3908. {
  3909. fprintf( stderr, " handle=%04x", req->handle );
  3910. }
  3911. static const dump_func req_dumpers[REQ_NB_REQUESTS] = {
  3912. (dump_func)dump_new_process_request,
  3913. (dump_func)dump_get_new_process_info_request,
  3914. (dump_func)dump_new_thread_request,
  3915. (dump_func)dump_get_startup_info_request,
  3916. (dump_func)dump_init_process_done_request,
  3917. (dump_func)dump_init_first_thread_request,
  3918. (dump_func)dump_init_thread_request,
  3919. (dump_func)dump_terminate_process_request,
  3920. (dump_func)dump_terminate_thread_request,
  3921. (dump_func)dump_get_process_info_request,
  3922. (dump_func)dump_get_process_debug_info_request,
  3923. (dump_func)dump_get_process_image_name_request,
  3924. (dump_func)dump_get_process_vm_counters_request,
  3925. (dump_func)dump_set_process_info_request,
  3926. (dump_func)dump_get_thread_info_request,
  3927. (dump_func)dump_get_thread_times_request,
  3928. (dump_func)dump_set_thread_info_request,
  3929. (dump_func)dump_suspend_thread_request,
  3930. (dump_func)dump_resume_thread_request,
  3931. (dump_func)dump_queue_apc_request,
  3932. (dump_func)dump_get_apc_result_request,
  3933. (dump_func)dump_close_handle_request,
  3934. (dump_func)dump_set_handle_info_request,
  3935. (dump_func)dump_dup_handle_request,
  3936. (dump_func)dump_compare_objects_request,
  3937. (dump_func)dump_make_temporary_request,
  3938. (dump_func)dump_open_process_request,
  3939. (dump_func)dump_open_thread_request,
  3940. (dump_func)dump_select_request,
  3941. (dump_func)dump_create_event_request,
  3942. (dump_func)dump_event_op_request,
  3943. (dump_func)dump_query_event_request,
  3944. (dump_func)dump_open_event_request,
  3945. (dump_func)dump_create_keyed_event_request,
  3946. (dump_func)dump_open_keyed_event_request,
  3947. (dump_func)dump_create_mutex_request,
  3948. (dump_func)dump_release_mutex_request,
  3949. (dump_func)dump_open_mutex_request,
  3950. (dump_func)dump_query_mutex_request,
  3951. (dump_func)dump_create_semaphore_request,
  3952. (dump_func)dump_release_semaphore_request,
  3953. (dump_func)dump_query_semaphore_request,
  3954. (dump_func)dump_open_semaphore_request,
  3955. (dump_func)dump_create_file_request,
  3956. (dump_func)dump_open_file_object_request,
  3957. (dump_func)dump_alloc_file_handle_request,
  3958. (dump_func)dump_get_handle_unix_name_request,
  3959. (dump_func)dump_get_handle_fd_request,
  3960. (dump_func)dump_get_directory_cache_entry_request,
  3961. (dump_func)dump_flush_request,
  3962. (dump_func)dump_get_file_info_request,
  3963. (dump_func)dump_get_volume_info_request,
  3964. (dump_func)dump_lock_file_request,
  3965. (dump_func)dump_unlock_file_request,
  3966. (dump_func)dump_recv_socket_request,
  3967. (dump_func)dump_send_socket_request,
  3968. (dump_func)dump_get_next_console_request_request,
  3969. (dump_func)dump_read_directory_changes_request,
  3970. (dump_func)dump_read_change_request,
  3971. (dump_func)dump_create_mapping_request,
  3972. (dump_func)dump_open_mapping_request,
  3973. (dump_func)dump_get_mapping_info_request,
  3974. (dump_func)dump_map_view_request,
  3975. (dump_func)dump_unmap_view_request,
  3976. (dump_func)dump_get_mapping_committed_range_request,
  3977. (dump_func)dump_add_mapping_committed_range_request,
  3978. (dump_func)dump_is_same_mapping_request,
  3979. (dump_func)dump_get_mapping_filename_request,
  3980. (dump_func)dump_list_processes_request,
  3981. (dump_func)dump_create_debug_obj_request,
  3982. (dump_func)dump_wait_debug_event_request,
  3983. (dump_func)dump_queue_exception_event_request,
  3984. (dump_func)dump_get_exception_status_request,
  3985. (dump_func)dump_continue_debug_event_request,
  3986. (dump_func)dump_debug_process_request,
  3987. (dump_func)dump_set_debug_obj_info_request,
  3988. (dump_func)dump_read_process_memory_request,
  3989. (dump_func)dump_write_process_memory_request,
  3990. (dump_func)dump_create_key_request,
  3991. (dump_func)dump_open_key_request,
  3992. (dump_func)dump_delete_key_request,
  3993. (dump_func)dump_flush_key_request,
  3994. (dump_func)dump_enum_key_request,
  3995. (dump_func)dump_set_key_value_request,
  3996. (dump_func)dump_get_key_value_request,
  3997. (dump_func)dump_enum_key_value_request,
  3998. (dump_func)dump_delete_key_value_request,
  3999. (dump_func)dump_load_registry_request,
  4000. (dump_func)dump_unload_registry_request,
  4001. (dump_func)dump_save_registry_request,
  4002. (dump_func)dump_set_registry_notification_request,
  4003. (dump_func)dump_create_timer_request,
  4004. (dump_func)dump_open_timer_request,
  4005. (dump_func)dump_set_timer_request,
  4006. (dump_func)dump_cancel_timer_request,
  4007. (dump_func)dump_get_timer_info_request,
  4008. (dump_func)dump_get_thread_context_request,
  4009. (dump_func)dump_set_thread_context_request,
  4010. (dump_func)dump_get_selector_entry_request,
  4011. (dump_func)dump_add_atom_request,
  4012. (dump_func)dump_delete_atom_request,
  4013. (dump_func)dump_find_atom_request,
  4014. (dump_func)dump_get_atom_information_request,
  4015. (dump_func)dump_get_msg_queue_request,
  4016. (dump_func)dump_set_queue_fd_request,
  4017. (dump_func)dump_set_queue_mask_request,
  4018. (dump_func)dump_get_queue_status_request,
  4019. (dump_func)dump_get_process_idle_event_request,
  4020. (dump_func)dump_send_message_request,
  4021. (dump_func)dump_post_quit_message_request,
  4022. (dump_func)dump_send_hardware_message_request,
  4023. (dump_func)dump_get_message_request,
  4024. (dump_func)dump_reply_message_request,
  4025. (dump_func)dump_accept_hardware_message_request,
  4026. (dump_func)dump_get_message_reply_request,
  4027. (dump_func)dump_set_win_timer_request,
  4028. (dump_func)dump_kill_win_timer_request,
  4029. (dump_func)dump_is_window_hung_request,
  4030. (dump_func)dump_get_serial_info_request,
  4031. (dump_func)dump_set_serial_info_request,
  4032. (dump_func)dump_register_async_request,
  4033. (dump_func)dump_cancel_async_request,
  4034. (dump_func)dump_get_async_result_request,
  4035. (dump_func)dump_set_async_direct_result_request,
  4036. (dump_func)dump_read_request,
  4037. (dump_func)dump_write_request,
  4038. (dump_func)dump_ioctl_request,
  4039. (dump_func)dump_set_irp_result_request,
  4040. (dump_func)dump_create_named_pipe_request,
  4041. (dump_func)dump_set_named_pipe_info_request,
  4042. (dump_func)dump_create_window_request,
  4043. (dump_func)dump_destroy_window_request,
  4044. (dump_func)dump_get_desktop_window_request,
  4045. (dump_func)dump_set_window_owner_request,
  4046. (dump_func)dump_get_window_info_request,
  4047. (dump_func)dump_set_window_info_request,
  4048. (dump_func)dump_set_parent_request,
  4049. (dump_func)dump_get_window_parents_request,
  4050. (dump_func)dump_get_window_children_request,
  4051. (dump_func)dump_get_window_children_from_point_request,
  4052. (dump_func)dump_get_window_tree_request,
  4053. (dump_func)dump_set_window_pos_request,
  4054. (dump_func)dump_get_window_rectangles_request,
  4055. (dump_func)dump_get_window_text_request,
  4056. (dump_func)dump_set_window_text_request,
  4057. (dump_func)dump_get_windows_offset_request,
  4058. (dump_func)dump_get_visible_region_request,
  4059. (dump_func)dump_get_surface_region_request,
  4060. (dump_func)dump_get_window_region_request,
  4061. (dump_func)dump_set_window_region_request,
  4062. (dump_func)dump_get_update_region_request,
  4063. (dump_func)dump_update_window_zorder_request,
  4064. (dump_func)dump_redraw_window_request,
  4065. (dump_func)dump_set_window_property_request,
  4066. (dump_func)dump_remove_window_property_request,
  4067. (dump_func)dump_get_window_property_request,
  4068. (dump_func)dump_get_window_properties_request,
  4069. (dump_func)dump_create_winstation_request,
  4070. (dump_func)dump_open_winstation_request,
  4071. (dump_func)dump_close_winstation_request,
  4072. (dump_func)dump_get_process_winstation_request,
  4073. (dump_func)dump_set_process_winstation_request,
  4074. (dump_func)dump_enum_winstation_request,
  4075. (dump_func)dump_create_desktop_request,
  4076. (dump_func)dump_open_desktop_request,
  4077. (dump_func)dump_open_input_desktop_request,
  4078. (dump_func)dump_close_desktop_request,
  4079. (dump_func)dump_get_thread_desktop_request,
  4080. (dump_func)dump_set_thread_desktop_request,
  4081. (dump_func)dump_enum_desktop_request,
  4082. (dump_func)dump_set_user_object_info_request,
  4083. (dump_func)dump_register_hotkey_request,
  4084. (dump_func)dump_unregister_hotkey_request,
  4085. (dump_func)dump_attach_thread_input_request,
  4086. (dump_func)dump_get_thread_input_request,
  4087. (dump_func)dump_get_last_input_time_request,
  4088. (dump_func)dump_get_key_state_request,
  4089. (dump_func)dump_set_key_state_request,
  4090. (dump_func)dump_set_foreground_window_request,
  4091. (dump_func)dump_set_focus_window_request,
  4092. (dump_func)dump_set_active_window_request,
  4093. (dump_func)dump_set_capture_window_request,
  4094. (dump_func)dump_set_caret_window_request,
  4095. (dump_func)dump_set_caret_info_request,
  4096. (dump_func)dump_set_hook_request,
  4097. (dump_func)dump_remove_hook_request,
  4098. (dump_func)dump_start_hook_chain_request,
  4099. (dump_func)dump_finish_hook_chain_request,
  4100. (dump_func)dump_get_hook_info_request,
  4101. (dump_func)dump_create_class_request,
  4102. (dump_func)dump_destroy_class_request,
  4103. (dump_func)dump_set_class_info_request,
  4104. (dump_func)dump_open_clipboard_request,
  4105. (dump_func)dump_close_clipboard_request,
  4106. (dump_func)dump_empty_clipboard_request,
  4107. (dump_func)dump_set_clipboard_data_request,
  4108. (dump_func)dump_get_clipboard_data_request,
  4109. (dump_func)dump_get_clipboard_formats_request,
  4110. (dump_func)dump_enum_clipboard_formats_request,
  4111. (dump_func)dump_release_clipboard_request,
  4112. (dump_func)dump_get_clipboard_info_request,
  4113. (dump_func)dump_set_clipboard_viewer_request,
  4114. (dump_func)dump_add_clipboard_listener_request,
  4115. (dump_func)dump_remove_clipboard_listener_request,
  4116. (dump_func)dump_open_token_request,
  4117. (dump_func)dump_set_global_windows_request,
  4118. (dump_func)dump_adjust_token_privileges_request,
  4119. (dump_func)dump_get_token_privileges_request,
  4120. (dump_func)dump_check_token_privileges_request,
  4121. (dump_func)dump_duplicate_token_request,
  4122. (dump_func)dump_filter_token_request,
  4123. (dump_func)dump_access_check_request,
  4124. (dump_func)dump_get_token_sid_request,
  4125. (dump_func)dump_get_token_groups_request,
  4126. (dump_func)dump_get_token_default_dacl_request,
  4127. (dump_func)dump_set_token_default_dacl_request,
  4128. (dump_func)dump_set_security_object_request,
  4129. (dump_func)dump_get_security_object_request,
  4130. (dump_func)dump_get_system_handles_request,
  4131. (dump_func)dump_create_mailslot_request,
  4132. (dump_func)dump_set_mailslot_info_request,
  4133. (dump_func)dump_create_directory_request,
  4134. (dump_func)dump_open_directory_request,
  4135. (dump_func)dump_get_directory_entry_request,
  4136. (dump_func)dump_create_symlink_request,
  4137. (dump_func)dump_open_symlink_request,
  4138. (dump_func)dump_query_symlink_request,
  4139. (dump_func)dump_get_object_info_request,
  4140. (dump_func)dump_get_object_name_request,
  4141. (dump_func)dump_get_object_type_request,
  4142. (dump_func)dump_get_object_types_request,
  4143. (dump_func)dump_allocate_locally_unique_id_request,
  4144. (dump_func)dump_create_device_manager_request,
  4145. (dump_func)dump_create_device_request,
  4146. (dump_func)dump_delete_device_request,
  4147. (dump_func)dump_get_next_device_request_request,
  4148. (dump_func)dump_get_kernel_object_ptr_request,
  4149. (dump_func)dump_set_kernel_object_ptr_request,
  4150. (dump_func)dump_grab_kernel_object_request,
  4151. (dump_func)dump_release_kernel_object_request,
  4152. (dump_func)dump_get_kernel_object_handle_request,
  4153. (dump_func)dump_make_process_system_request,
  4154. (dump_func)dump_get_token_info_request,
  4155. (dump_func)dump_create_linked_token_request,
  4156. (dump_func)dump_create_completion_request,
  4157. (dump_func)dump_open_completion_request,
  4158. (dump_func)dump_add_completion_request,
  4159. (dump_func)dump_remove_completion_request,
  4160. (dump_func)dump_query_completion_request,
  4161. (dump_func)dump_set_completion_info_request,
  4162. (dump_func)dump_add_fd_completion_request,
  4163. (dump_func)dump_set_fd_completion_mode_request,
  4164. (dump_func)dump_set_fd_disp_info_request,
  4165. (dump_func)dump_set_fd_name_info_request,
  4166. (dump_func)dump_set_fd_eof_info_request,
  4167. (dump_func)dump_get_window_layered_info_request,
  4168. (dump_func)dump_set_window_layered_info_request,
  4169. (dump_func)dump_alloc_user_handle_request,
  4170. (dump_func)dump_free_user_handle_request,
  4171. (dump_func)dump_set_cursor_request,
  4172. (dump_func)dump_get_cursor_history_request,
  4173. (dump_func)dump_get_rawinput_buffer_request,
  4174. (dump_func)dump_update_rawinput_devices_request,
  4175. (dump_func)dump_get_rawinput_devices_request,
  4176. (dump_func)dump_create_job_request,
  4177. (dump_func)dump_open_job_request,
  4178. (dump_func)dump_assign_job_request,
  4179. (dump_func)dump_process_in_job_request,
  4180. (dump_func)dump_set_job_limits_request,
  4181. (dump_func)dump_set_job_completion_port_request,
  4182. (dump_func)dump_get_job_info_request,
  4183. (dump_func)dump_terminate_job_request,
  4184. (dump_func)dump_suspend_process_request,
  4185. (dump_func)dump_resume_process_request,
  4186. (dump_func)dump_get_next_thread_request,
  4187. };
  4188. static const dump_func reply_dumpers[REQ_NB_REQUESTS] = {
  4189. (dump_func)dump_new_process_reply,
  4190. (dump_func)dump_get_new_process_info_reply,
  4191. (dump_func)dump_new_thread_reply,
  4192. (dump_func)dump_get_startup_info_reply,
  4193. (dump_func)dump_init_process_done_reply,
  4194. (dump_func)dump_init_first_thread_reply,
  4195. (dump_func)dump_init_thread_reply,
  4196. (dump_func)dump_terminate_process_reply,
  4197. (dump_func)dump_terminate_thread_reply,
  4198. (dump_func)dump_get_process_info_reply,
  4199. (dump_func)dump_get_process_debug_info_reply,
  4200. (dump_func)dump_get_process_image_name_reply,
  4201. (dump_func)dump_get_process_vm_counters_reply,
  4202. NULL,
  4203. (dump_func)dump_get_thread_info_reply,
  4204. (dump_func)dump_get_thread_times_reply,
  4205. NULL,
  4206. (dump_func)dump_suspend_thread_reply,
  4207. (dump_func)dump_resume_thread_reply,
  4208. (dump_func)dump_queue_apc_reply,
  4209. (dump_func)dump_get_apc_result_reply,
  4210. NULL,
  4211. (dump_func)dump_set_handle_info_reply,
  4212. (dump_func)dump_dup_handle_reply,
  4213. NULL,
  4214. NULL,
  4215. (dump_func)dump_open_process_reply,
  4216. (dump_func)dump_open_thread_reply,
  4217. (dump_func)dump_select_reply,
  4218. (dump_func)dump_create_event_reply,
  4219. (dump_func)dump_event_op_reply,
  4220. (dump_func)dump_query_event_reply,
  4221. (dump_func)dump_open_event_reply,
  4222. (dump_func)dump_create_keyed_event_reply,
  4223. (dump_func)dump_open_keyed_event_reply,
  4224. (dump_func)dump_create_mutex_reply,
  4225. (dump_func)dump_release_mutex_reply,
  4226. (dump_func)dump_open_mutex_reply,
  4227. (dump_func)dump_query_mutex_reply,
  4228. (dump_func)dump_create_semaphore_reply,
  4229. (dump_func)dump_release_semaphore_reply,
  4230. (dump_func)dump_query_semaphore_reply,
  4231. (dump_func)dump_open_semaphore_reply,
  4232. (dump_func)dump_create_file_reply,
  4233. (dump_func)dump_open_file_object_reply,
  4234. (dump_func)dump_alloc_file_handle_reply,
  4235. (dump_func)dump_get_handle_unix_name_reply,
  4236. (dump_func)dump_get_handle_fd_reply,
  4237. (dump_func)dump_get_directory_cache_entry_reply,
  4238. (dump_func)dump_flush_reply,
  4239. (dump_func)dump_get_file_info_reply,
  4240. (dump_func)dump_get_volume_info_reply,
  4241. (dump_func)dump_lock_file_reply,
  4242. NULL,
  4243. (dump_func)dump_recv_socket_reply,
  4244. (dump_func)dump_send_socket_reply,
  4245. (dump_func)dump_get_next_console_request_reply,
  4246. NULL,
  4247. (dump_func)dump_read_change_reply,
  4248. (dump_func)dump_create_mapping_reply,
  4249. (dump_func)dump_open_mapping_reply,
  4250. (dump_func)dump_get_mapping_info_reply,
  4251. NULL,
  4252. NULL,
  4253. (dump_func)dump_get_mapping_committed_range_reply,
  4254. NULL,
  4255. NULL,
  4256. (dump_func)dump_get_mapping_filename_reply,
  4257. (dump_func)dump_list_processes_reply,
  4258. (dump_func)dump_create_debug_obj_reply,
  4259. (dump_func)dump_wait_debug_event_reply,
  4260. (dump_func)dump_queue_exception_event_reply,
  4261. NULL,
  4262. NULL,
  4263. NULL,
  4264. NULL,
  4265. (dump_func)dump_read_process_memory_reply,
  4266. NULL,
  4267. (dump_func)dump_create_key_reply,
  4268. (dump_func)dump_open_key_reply,
  4269. NULL,
  4270. NULL,
  4271. (dump_func)dump_enum_key_reply,
  4272. NULL,
  4273. (dump_func)dump_get_key_value_reply,
  4274. (dump_func)dump_enum_key_value_reply,
  4275. NULL,
  4276. NULL,
  4277. NULL,
  4278. NULL,
  4279. NULL,
  4280. (dump_func)dump_create_timer_reply,
  4281. (dump_func)dump_open_timer_reply,
  4282. (dump_func)dump_set_timer_reply,
  4283. (dump_func)dump_cancel_timer_reply,
  4284. (dump_func)dump_get_timer_info_reply,
  4285. (dump_func)dump_get_thread_context_reply,
  4286. (dump_func)dump_set_thread_context_reply,
  4287. (dump_func)dump_get_selector_entry_reply,
  4288. (dump_func)dump_add_atom_reply,
  4289. NULL,
  4290. (dump_func)dump_find_atom_reply,
  4291. (dump_func)dump_get_atom_information_reply,
  4292. (dump_func)dump_get_msg_queue_reply,
  4293. NULL,
  4294. (dump_func)dump_set_queue_mask_reply,
  4295. (dump_func)dump_get_queue_status_reply,
  4296. (dump_func)dump_get_process_idle_event_reply,
  4297. NULL,
  4298. NULL,
  4299. (dump_func)dump_send_hardware_message_reply,
  4300. (dump_func)dump_get_message_reply,
  4301. NULL,
  4302. NULL,
  4303. (dump_func)dump_get_message_reply_reply,
  4304. (dump_func)dump_set_win_timer_reply,
  4305. NULL,
  4306. (dump_func)dump_is_window_hung_reply,
  4307. (dump_func)dump_get_serial_info_reply,
  4308. NULL,
  4309. NULL,
  4310. NULL,
  4311. (dump_func)dump_get_async_result_reply,
  4312. (dump_func)dump_set_async_direct_result_reply,
  4313. (dump_func)dump_read_reply,
  4314. (dump_func)dump_write_reply,
  4315. (dump_func)dump_ioctl_reply,
  4316. NULL,
  4317. (dump_func)dump_create_named_pipe_reply,
  4318. NULL,
  4319. (dump_func)dump_create_window_reply,
  4320. NULL,
  4321. (dump_func)dump_get_desktop_window_reply,
  4322. (dump_func)dump_set_window_owner_reply,
  4323. (dump_func)dump_get_window_info_reply,
  4324. (dump_func)dump_set_window_info_reply,
  4325. (dump_func)dump_set_parent_reply,
  4326. (dump_func)dump_get_window_parents_reply,
  4327. (dump_func)dump_get_window_children_reply,
  4328. (dump_func)dump_get_window_children_from_point_reply,
  4329. (dump_func)dump_get_window_tree_reply,
  4330. (dump_func)dump_set_window_pos_reply,
  4331. (dump_func)dump_get_window_rectangles_reply,
  4332. (dump_func)dump_get_window_text_reply,
  4333. NULL,
  4334. (dump_func)dump_get_windows_offset_reply,
  4335. (dump_func)dump_get_visible_region_reply,
  4336. (dump_func)dump_get_surface_region_reply,
  4337. (dump_func)dump_get_window_region_reply,
  4338. NULL,
  4339. (dump_func)dump_get_update_region_reply,
  4340. NULL,
  4341. NULL,
  4342. NULL,
  4343. (dump_func)dump_remove_window_property_reply,
  4344. (dump_func)dump_get_window_property_reply,
  4345. (dump_func)dump_get_window_properties_reply,
  4346. (dump_func)dump_create_winstation_reply,
  4347. (dump_func)dump_open_winstation_reply,
  4348. NULL,
  4349. (dump_func)dump_get_process_winstation_reply,
  4350. NULL,
  4351. (dump_func)dump_enum_winstation_reply,
  4352. (dump_func)dump_create_desktop_reply,
  4353. (dump_func)dump_open_desktop_reply,
  4354. (dump_func)dump_open_input_desktop_reply,
  4355. NULL,
  4356. (dump_func)dump_get_thread_desktop_reply,
  4357. NULL,
  4358. (dump_func)dump_enum_desktop_reply,
  4359. (dump_func)dump_set_user_object_info_reply,
  4360. (dump_func)dump_register_hotkey_reply,
  4361. (dump_func)dump_unregister_hotkey_reply,
  4362. NULL,
  4363. (dump_func)dump_get_thread_input_reply,
  4364. (dump_func)dump_get_last_input_time_reply,
  4365. (dump_func)dump_get_key_state_reply,
  4366. NULL,
  4367. (dump_func)dump_set_foreground_window_reply,
  4368. (dump_func)dump_set_focus_window_reply,
  4369. (dump_func)dump_set_active_window_reply,
  4370. (dump_func)dump_set_capture_window_reply,
  4371. (dump_func)dump_set_caret_window_reply,
  4372. (dump_func)dump_set_caret_info_reply,
  4373. (dump_func)dump_set_hook_reply,
  4374. (dump_func)dump_remove_hook_reply,
  4375. (dump_func)dump_start_hook_chain_reply,
  4376. NULL,
  4377. (dump_func)dump_get_hook_info_reply,
  4378. (dump_func)dump_create_class_reply,
  4379. (dump_func)dump_destroy_class_reply,
  4380. (dump_func)dump_set_class_info_reply,
  4381. (dump_func)dump_open_clipboard_reply,
  4382. (dump_func)dump_close_clipboard_reply,
  4383. NULL,
  4384. (dump_func)dump_set_clipboard_data_reply,
  4385. (dump_func)dump_get_clipboard_data_reply,
  4386. (dump_func)dump_get_clipboard_formats_reply,
  4387. (dump_func)dump_enum_clipboard_formats_reply,
  4388. (dump_func)dump_release_clipboard_reply,
  4389. (dump_func)dump_get_clipboard_info_reply,
  4390. (dump_func)dump_set_clipboard_viewer_reply,
  4391. NULL,
  4392. NULL,
  4393. (dump_func)dump_open_token_reply,
  4394. (dump_func)dump_set_global_windows_reply,
  4395. (dump_func)dump_adjust_token_privileges_reply,
  4396. (dump_func)dump_get_token_privileges_reply,
  4397. (dump_func)dump_check_token_privileges_reply,
  4398. (dump_func)dump_duplicate_token_reply,
  4399. (dump_func)dump_filter_token_reply,
  4400. (dump_func)dump_access_check_reply,
  4401. (dump_func)dump_get_token_sid_reply,
  4402. (dump_func)dump_get_token_groups_reply,
  4403. (dump_func)dump_get_token_default_dacl_reply,
  4404. NULL,
  4405. NULL,
  4406. (dump_func)dump_get_security_object_reply,
  4407. (dump_func)dump_get_system_handles_reply,
  4408. (dump_func)dump_create_mailslot_reply,
  4409. (dump_func)dump_set_mailslot_info_reply,
  4410. (dump_func)dump_create_directory_reply,
  4411. (dump_func)dump_open_directory_reply,
  4412. (dump_func)dump_get_directory_entry_reply,
  4413. (dump_func)dump_create_symlink_reply,
  4414. (dump_func)dump_open_symlink_reply,
  4415. (dump_func)dump_query_symlink_reply,
  4416. (dump_func)dump_get_object_info_reply,
  4417. (dump_func)dump_get_object_name_reply,
  4418. (dump_func)dump_get_object_type_reply,
  4419. (dump_func)dump_get_object_types_reply,
  4420. (dump_func)dump_allocate_locally_unique_id_reply,
  4421. (dump_func)dump_create_device_manager_reply,
  4422. NULL,
  4423. NULL,
  4424. (dump_func)dump_get_next_device_request_reply,
  4425. (dump_func)dump_get_kernel_object_ptr_reply,
  4426. NULL,
  4427. NULL,
  4428. NULL,
  4429. (dump_func)dump_get_kernel_object_handle_reply,
  4430. (dump_func)dump_make_process_system_reply,
  4431. (dump_func)dump_get_token_info_reply,
  4432. (dump_func)dump_create_linked_token_reply,
  4433. (dump_func)dump_create_completion_reply,
  4434. (dump_func)dump_open_completion_reply,
  4435. NULL,
  4436. (dump_func)dump_remove_completion_reply,
  4437. (dump_func)dump_query_completion_reply,
  4438. NULL,
  4439. NULL,
  4440. NULL,
  4441. NULL,
  4442. NULL,
  4443. NULL,
  4444. (dump_func)dump_get_window_layered_info_reply,
  4445. NULL,
  4446. (dump_func)dump_alloc_user_handle_reply,
  4447. NULL,
  4448. (dump_func)dump_set_cursor_reply,
  4449. (dump_func)dump_get_cursor_history_reply,
  4450. (dump_func)dump_get_rawinput_buffer_reply,
  4451. NULL,
  4452. (dump_func)dump_get_rawinput_devices_reply,
  4453. (dump_func)dump_create_job_reply,
  4454. (dump_func)dump_open_job_reply,
  4455. NULL,
  4456. NULL,
  4457. NULL,
  4458. NULL,
  4459. (dump_func)dump_get_job_info_reply,
  4460. NULL,
  4461. NULL,
  4462. NULL,
  4463. (dump_func)dump_get_next_thread_reply,
  4464. };
  4465. static const char * const req_names[REQ_NB_REQUESTS] = {
  4466. "new_process",
  4467. "get_new_process_info",
  4468. "new_thread",
  4469. "get_startup_info",
  4470. "init_process_done",
  4471. "init_first_thread",
  4472. "init_thread",
  4473. "terminate_process",
  4474. "terminate_thread",
  4475. "get_process_info",
  4476. "get_process_debug_info",
  4477. "get_process_image_name",
  4478. "get_process_vm_counters",
  4479. "set_process_info",
  4480. "get_thread_info",
  4481. "get_thread_times",
  4482. "set_thread_info",
  4483. "suspend_thread",
  4484. "resume_thread",
  4485. "queue_apc",
  4486. "get_apc_result",
  4487. "close_handle",
  4488. "set_handle_info",
  4489. "dup_handle",
  4490. "compare_objects",
  4491. "make_temporary",
  4492. "open_process",
  4493. "open_thread",
  4494. "select",
  4495. "create_event",
  4496. "event_op",
  4497. "query_event",
  4498. "open_event",
  4499. "create_keyed_event",
  4500. "open_keyed_event",
  4501. "create_mutex",
  4502. "release_mutex",
  4503. "open_mutex",
  4504. "query_mutex",
  4505. "create_semaphore",
  4506. "release_semaphore",
  4507. "query_semaphore",
  4508. "open_semaphore",
  4509. "create_file",
  4510. "open_file_object",
  4511. "alloc_file_handle",
  4512. "get_handle_unix_name",
  4513. "get_handle_fd",
  4514. "get_directory_cache_entry",
  4515. "flush",
  4516. "get_file_info",
  4517. "get_volume_info",
  4518. "lock_file",
  4519. "unlock_file",
  4520. "recv_socket",
  4521. "send_socket",
  4522. "get_next_console_request",
  4523. "read_directory_changes",
  4524. "read_change",
  4525. "create_mapping",
  4526. "open_mapping",
  4527. "get_mapping_info",
  4528. "map_view",
  4529. "unmap_view",
  4530. "get_mapping_committed_range",
  4531. "add_mapping_committed_range",
  4532. "is_same_mapping",
  4533. "get_mapping_filename",
  4534. "list_processes",
  4535. "create_debug_obj",
  4536. "wait_debug_event",
  4537. "queue_exception_event",
  4538. "get_exception_status",
  4539. "continue_debug_event",
  4540. "debug_process",
  4541. "set_debug_obj_info",
  4542. "read_process_memory",
  4543. "write_process_memory",
  4544. "create_key",
  4545. "open_key",
  4546. "delete_key",
  4547. "flush_key",
  4548. "enum_key",
  4549. "set_key_value",
  4550. "get_key_value",
  4551. "enum_key_value",
  4552. "delete_key_value",
  4553. "load_registry",
  4554. "unload_registry",
  4555. "save_registry",
  4556. "set_registry_notification",
  4557. "create_timer",
  4558. "open_timer",
  4559. "set_timer",
  4560. "cancel_timer",
  4561. "get_timer_info",
  4562. "get_thread_context",
  4563. "set_thread_context",
  4564. "get_selector_entry",
  4565. "add_atom",
  4566. "delete_atom",
  4567. "find_atom",
  4568. "get_atom_information",
  4569. "get_msg_queue",
  4570. "set_queue_fd",
  4571. "set_queue_mask",
  4572. "get_queue_status",
  4573. "get_process_idle_event",
  4574. "send_message",
  4575. "post_quit_message",
  4576. "send_hardware_message",
  4577. "get_message",
  4578. "reply_message",
  4579. "accept_hardware_message",
  4580. "get_message_reply",
  4581. "set_win_timer",
  4582. "kill_win_timer",
  4583. "is_window_hung",
  4584. "get_serial_info",
  4585. "set_serial_info",
  4586. "register_async",
  4587. "cancel_async",
  4588. "get_async_result",
  4589. "set_async_direct_result",
  4590. "read",
  4591. "write",
  4592. "ioctl",
  4593. "set_irp_result",
  4594. "create_named_pipe",
  4595. "set_named_pipe_info",
  4596. "create_window",
  4597. "destroy_window",
  4598. "get_desktop_window",
  4599. "set_window_owner",
  4600. "get_window_info",
  4601. "set_window_info",
  4602. "set_parent",
  4603. "get_window_parents",
  4604. "get_window_children",
  4605. "get_window_children_from_point",
  4606. "get_window_tree",
  4607. "set_window_pos",
  4608. "get_window_rectangles",
  4609. "get_window_text",
  4610. "set_window_text",
  4611. "get_windows_offset",
  4612. "get_visible_region",
  4613. "get_surface_region",
  4614. "get_window_region",
  4615. "set_window_region",
  4616. "get_update_region",
  4617. "update_window_zorder",
  4618. "redraw_window",
  4619. "set_window_property",
  4620. "remove_window_property",
  4621. "get_window_property",
  4622. "get_window_properties",
  4623. "create_winstation",
  4624. "open_winstation",
  4625. "close_winstation",
  4626. "get_process_winstation",
  4627. "set_process_winstation",
  4628. "enum_winstation",
  4629. "create_desktop",
  4630. "open_desktop",
  4631. "open_input_desktop",
  4632. "close_desktop",
  4633. "get_thread_desktop",
  4634. "set_thread_desktop",
  4635. "enum_desktop",
  4636. "set_user_object_info",
  4637. "register_hotkey",
  4638. "unregister_hotkey",
  4639. "attach_thread_input",
  4640. "get_thread_input",
  4641. "get_last_input_time",
  4642. "get_key_state",
  4643. "set_key_state",
  4644. "set_foreground_window",
  4645. "set_focus_window",
  4646. "set_active_window",
  4647. "set_capture_window",
  4648. "set_caret_window",
  4649. "set_caret_info",
  4650. "set_hook",
  4651. "remove_hook",
  4652. "start_hook_chain",
  4653. "finish_hook_chain",
  4654. "get_hook_info",
  4655. "create_class",
  4656. "destroy_class",
  4657. "set_class_info",
  4658. "open_clipboard",
  4659. "close_clipboard",
  4660. "empty_clipboard",
  4661. "set_clipboard_data",
  4662. "get_clipboard_data",
  4663. "get_clipboard_formats",
  4664. "enum_clipboard_formats",
  4665. "release_clipboard",
  4666. "get_clipboard_info",
  4667. "set_clipboard_viewer",
  4668. "add_clipboard_listener",
  4669. "remove_clipboard_listener",
  4670. "open_token",
  4671. "set_global_windows",
  4672. "adjust_token_privileges",
  4673. "get_token_privileges",
  4674. "check_token_privileges",
  4675. "duplicate_token",
  4676. "filter_token",
  4677. "access_check",
  4678. "get_token_sid",
  4679. "get_token_groups",
  4680. "get_token_default_dacl",
  4681. "set_token_default_dacl",
  4682. "set_security_object",
  4683. "get_security_object",
  4684. "get_system_handles",
  4685. "create_mailslot",
  4686. "set_mailslot_info",
  4687. "create_directory",
  4688. "open_directory",
  4689. "get_directory_entry",
  4690. "create_symlink",
  4691. "open_symlink",
  4692. "query_symlink",
  4693. "get_object_info",
  4694. "get_object_name",
  4695. "get_object_type",
  4696. "get_object_types",
  4697. "allocate_locally_unique_id",
  4698. "create_device_manager",
  4699. "create_device",
  4700. "delete_device",
  4701. "get_next_device_request",
  4702. "get_kernel_object_ptr",
  4703. "set_kernel_object_ptr",
  4704. "grab_kernel_object",
  4705. "release_kernel_object",
  4706. "get_kernel_object_handle",
  4707. "make_process_system",
  4708. "get_token_info",
  4709. "create_linked_token",
  4710. "create_completion",
  4711. "open_completion",
  4712. "add_completion",
  4713. "remove_completion",
  4714. "query_completion",
  4715. "set_completion_info",
  4716. "add_fd_completion",
  4717. "set_fd_completion_mode",
  4718. "set_fd_disp_info",
  4719. "set_fd_name_info",
  4720. "set_fd_eof_info",
  4721. "get_window_layered_info",
  4722. "set_window_layered_info",
  4723. "alloc_user_handle",
  4724. "free_user_handle",
  4725. "set_cursor",
  4726. "get_cursor_history",
  4727. "get_rawinput_buffer",
  4728. "update_rawinput_devices",
  4729. "get_rawinput_devices",
  4730. "create_job",
  4731. "open_job",
  4732. "assign_job",
  4733. "process_in_job",
  4734. "set_job_limits",
  4735. "set_job_completion_port",
  4736. "get_job_info",
  4737. "terminate_job",
  4738. "suspend_process",
  4739. "resume_process",
  4740. "get_next_thread",
  4741. };
  4742. static const struct
  4743. {
  4744. const char *name;
  4745. unsigned int value;
  4746. } status_names[] =
  4747. {
  4748. { "ABANDONED_WAIT_0", STATUS_ABANDONED_WAIT_0 },
  4749. { "ACCESS_DENIED", STATUS_ACCESS_DENIED },
  4750. { "ACCESS_VIOLATION", STATUS_ACCESS_VIOLATION },
  4751. { "ADDRESS_ALREADY_ASSOCIATED", STATUS_ADDRESS_ALREADY_ASSOCIATED },
  4752. { "ALERTED", STATUS_ALERTED },
  4753. { "BAD_DEVICE_TYPE", STATUS_BAD_DEVICE_TYPE },
  4754. { "BAD_IMPERSONATION_LEVEL", STATUS_BAD_IMPERSONATION_LEVEL },
  4755. { "BUFFER_OVERFLOW", STATUS_BUFFER_OVERFLOW },
  4756. { "BUFFER_TOO_SMALL", STATUS_BUFFER_TOO_SMALL },
  4757. { "CANCELLED", STATUS_CANCELLED },
  4758. { "CANNOT_DELETE", STATUS_CANNOT_DELETE },
  4759. { "CANT_OPEN_ANONYMOUS", STATUS_CANT_OPEN_ANONYMOUS },
  4760. { "CHILD_MUST_BE_VOLATILE", STATUS_CHILD_MUST_BE_VOLATILE },
  4761. { "CONNECTION_ABORTED", STATUS_CONNECTION_ABORTED },
  4762. { "CONNECTION_ACTIVE", STATUS_CONNECTION_ACTIVE },
  4763. { "CONNECTION_REFUSED", STATUS_CONNECTION_REFUSED },
  4764. { "CONNECTION_RESET", STATUS_CONNECTION_RESET },
  4765. { "DEBUGGER_INACTIVE", STATUS_DEBUGGER_INACTIVE },
  4766. { "DEVICE_BUSY", STATUS_DEVICE_BUSY },
  4767. { "DEVICE_NOT_READY", STATUS_DEVICE_NOT_READY },
  4768. { "DIRECTORY_NOT_EMPTY", STATUS_DIRECTORY_NOT_EMPTY },
  4769. { "DISK_FULL", STATUS_DISK_FULL },
  4770. { "DLL_NOT_FOUND", STATUS_DLL_NOT_FOUND },
  4771. { "ERROR_CLASS_ALREADY_EXISTS", 0xc0010000 | ERROR_CLASS_ALREADY_EXISTS },
  4772. { "ERROR_CLASS_DOES_NOT_EXIST", 0xc0010000 | ERROR_CLASS_DOES_NOT_EXIST },
  4773. { "ERROR_CLASS_HAS_WINDOWS", 0xc0010000 | ERROR_CLASS_HAS_WINDOWS },
  4774. { "ERROR_CLIPBOARD_NOT_OPEN", 0xc0010000 | ERROR_CLIPBOARD_NOT_OPEN },
  4775. { "ERROR_HOTKEY_ALREADY_REGISTERED", 0xc0010000 | ERROR_HOTKEY_ALREADY_REGISTERED },
  4776. { "ERROR_HOTKEY_NOT_REGISTERED", 0xc0010000 | ERROR_HOTKEY_NOT_REGISTERED },
  4777. { "ERROR_INVALID_CURSOR_HANDLE", 0xc0010000 | ERROR_INVALID_CURSOR_HANDLE },
  4778. { "ERROR_INVALID_INDEX", 0xc0010000 | ERROR_INVALID_INDEX },
  4779. { "ERROR_INVALID_WINDOW_HANDLE", 0xc0010000 | ERROR_INVALID_WINDOW_HANDLE },
  4780. { "ERROR_NO_MORE_USER_HANDLES", 0xc0010000 | ERROR_NO_MORE_USER_HANDLES },
  4781. { "ERROR_WINDOW_OF_OTHER_THREAD", 0xc0010000 | ERROR_WINDOW_OF_OTHER_THREAD },
  4782. { "FILE_DELETED", STATUS_FILE_DELETED },
  4783. { "FILE_INVALID", STATUS_FILE_INVALID },
  4784. { "FILE_IS_A_DIRECTORY", STATUS_FILE_IS_A_DIRECTORY },
  4785. { "FILE_LOCK_CONFLICT", STATUS_FILE_LOCK_CONFLICT },
  4786. { "GENERIC_NOT_MAPPED", STATUS_GENERIC_NOT_MAPPED },
  4787. { "HANDLES_CLOSED", STATUS_HANDLES_CLOSED },
  4788. { "HANDLE_NOT_CLOSABLE", STATUS_HANDLE_NOT_CLOSABLE },
  4789. { "HOST_UNREACHABLE", STATUS_HOST_UNREACHABLE },
  4790. { "ILLEGAL_FUNCTION", STATUS_ILLEGAL_FUNCTION },
  4791. { "IMAGE_NOT_AT_BASE", STATUS_IMAGE_NOT_AT_BASE },
  4792. { "INFO_LENGTH_MISMATCH", STATUS_INFO_LENGTH_MISMATCH },
  4793. { "INSTANCE_NOT_AVAILABLE", STATUS_INSTANCE_NOT_AVAILABLE },
  4794. { "INSUFFICIENT_RESOURCES", STATUS_INSUFFICIENT_RESOURCES },
  4795. { "INVALID_ACL", STATUS_INVALID_ACL },
  4796. { "INVALID_ADDRESS", STATUS_INVALID_ADDRESS },
  4797. { "INVALID_ADDRESS_COMPONENT", STATUS_INVALID_ADDRESS_COMPONENT },
  4798. { "INVALID_CID", STATUS_INVALID_CID },
  4799. { "INVALID_CONNECTION", STATUS_INVALID_CONNECTION },
  4800. { "INVALID_DEVICE_REQUEST", STATUS_INVALID_DEVICE_REQUEST },
  4801. { "INVALID_FILE_FOR_SECTION", STATUS_INVALID_FILE_FOR_SECTION },
  4802. { "INVALID_HANDLE", STATUS_INVALID_HANDLE },
  4803. { "INVALID_IMAGE_FORMAT", STATUS_INVALID_IMAGE_FORMAT },
  4804. { "INVALID_IMAGE_NE_FORMAT", STATUS_INVALID_IMAGE_NE_FORMAT },
  4805. { "INVALID_IMAGE_NOT_MZ", STATUS_INVALID_IMAGE_NOT_MZ },
  4806. { "INVALID_IMAGE_PROTECT", STATUS_INVALID_IMAGE_PROTECT },
  4807. { "INVALID_IMAGE_WIN_16", STATUS_INVALID_IMAGE_WIN_16 },
  4808. { "INVALID_IMAGE_WIN_64", STATUS_INVALID_IMAGE_WIN_64 },
  4809. { "INVALID_LOCK_SEQUENCE", STATUS_INVALID_LOCK_SEQUENCE },
  4810. { "INVALID_OWNER", STATUS_INVALID_OWNER },
  4811. { "INVALID_PARAMETER", STATUS_INVALID_PARAMETER },
  4812. { "INVALID_PIPE_STATE", STATUS_INVALID_PIPE_STATE },
  4813. { "INVALID_READ_MODE", STATUS_INVALID_READ_MODE },
  4814. { "INVALID_SECURITY_DESCR", STATUS_INVALID_SECURITY_DESCR },
  4815. { "IO_TIMEOUT", STATUS_IO_TIMEOUT },
  4816. { "KERNEL_APC", STATUS_KERNEL_APC },
  4817. { "KEY_DELETED", STATUS_KEY_DELETED },
  4818. { "MAPPED_FILE_SIZE_ZERO", STATUS_MAPPED_FILE_SIZE_ZERO },
  4819. { "MUTANT_NOT_OWNED", STATUS_MUTANT_NOT_OWNED },
  4820. { "NAME_TOO_LONG", STATUS_NAME_TOO_LONG },
  4821. { "NETWORK_BUSY", STATUS_NETWORK_BUSY },
  4822. { "NETWORK_UNREACHABLE", STATUS_NETWORK_UNREACHABLE },
  4823. { "NOT_ALL_ASSIGNED", STATUS_NOT_ALL_ASSIGNED },
  4824. { "NOT_A_DIRECTORY", STATUS_NOT_A_DIRECTORY },
  4825. { "NOT_FOUND", STATUS_NOT_FOUND },
  4826. { "NOT_IMPLEMENTED", STATUS_NOT_IMPLEMENTED },
  4827. { "NOT_MAPPED_VIEW", STATUS_NOT_MAPPED_VIEW },
  4828. { "NOT_REGISTRY_FILE", STATUS_NOT_REGISTRY_FILE },
  4829. { "NOT_SAME_DEVICE", STATUS_NOT_SAME_DEVICE },
  4830. { "NOT_SAME_OBJECT", STATUS_NOT_SAME_OBJECT },
  4831. { "NOT_SUPPORTED", STATUS_NOT_SUPPORTED },
  4832. { "NO_DATA_DETECTED", STATUS_NO_DATA_DETECTED },
  4833. { "NO_IMPERSONATION_TOKEN", STATUS_NO_IMPERSONATION_TOKEN },
  4834. { "NO_MEMORY", STATUS_NO_MEMORY },
  4835. { "NO_MORE_ENTRIES", STATUS_NO_MORE_ENTRIES },
  4836. { "NO_SUCH_DEVICE", STATUS_NO_SUCH_DEVICE },
  4837. { "NO_SUCH_FILE", STATUS_NO_SUCH_FILE },
  4838. { "NO_TOKEN", STATUS_NO_TOKEN },
  4839. { "OBJECT_NAME_COLLISION", STATUS_OBJECT_NAME_COLLISION },
  4840. { "OBJECT_NAME_EXISTS", STATUS_OBJECT_NAME_EXISTS },
  4841. { "OBJECT_NAME_INVALID", STATUS_OBJECT_NAME_INVALID },
  4842. { "OBJECT_NAME_NOT_FOUND", STATUS_OBJECT_NAME_NOT_FOUND },
  4843. { "OBJECT_PATH_INVALID", STATUS_OBJECT_PATH_INVALID },
  4844. { "OBJECT_PATH_NOT_FOUND", STATUS_OBJECT_PATH_NOT_FOUND },
  4845. { "OBJECT_PATH_SYNTAX_BAD", STATUS_OBJECT_PATH_SYNTAX_BAD },
  4846. { "OBJECT_TYPE_MISMATCH", STATUS_OBJECT_TYPE_MISMATCH },
  4847. { "PENDING", STATUS_PENDING },
  4848. { "PIPE_BROKEN", STATUS_PIPE_BROKEN },
  4849. { "PIPE_BUSY", STATUS_PIPE_BUSY },
  4850. { "PIPE_CLOSING", STATUS_PIPE_CLOSING },
  4851. { "PIPE_CONNECTED", STATUS_PIPE_CONNECTED },
  4852. { "PIPE_DISCONNECTED", STATUS_PIPE_DISCONNECTED },
  4853. { "PIPE_EMPTY", STATUS_PIPE_EMPTY },
  4854. { "PIPE_LISTENING", STATUS_PIPE_LISTENING },
  4855. { "PIPE_NOT_AVAILABLE", STATUS_PIPE_NOT_AVAILABLE },
  4856. { "PORT_NOT_SET", STATUS_PORT_NOT_SET },
  4857. { "PREDEFINED_HANDLE", STATUS_PREDEFINED_HANDLE },
  4858. { "PRIVILEGE_NOT_HELD", STATUS_PRIVILEGE_NOT_HELD },
  4859. { "PROCESS_IN_JOB", STATUS_PROCESS_IN_JOB },
  4860. { "PROCESS_IS_TERMINATING", STATUS_PROCESS_IS_TERMINATING },
  4861. { "PROCESS_NOT_IN_JOB", STATUS_PROCESS_NOT_IN_JOB },
  4862. { "REPARSE_POINT_NOT_RESOLVED", STATUS_REPARSE_POINT_NOT_RESOLVED },
  4863. { "SECTION_TOO_BIG", STATUS_SECTION_TOO_BIG },
  4864. { "SEMAPHORE_LIMIT_EXCEEDED", STATUS_SEMAPHORE_LIMIT_EXCEEDED },
  4865. { "SHARING_VIOLATION", STATUS_SHARING_VIOLATION },
  4866. { "SHUTDOWN_IN_PROGRESS", STATUS_SHUTDOWN_IN_PROGRESS },
  4867. { "SUSPEND_COUNT_EXCEEDED", STATUS_SUSPEND_COUNT_EXCEEDED },
  4868. { "THREAD_IS_TERMINATING", STATUS_THREAD_IS_TERMINATING },
  4869. { "TIMEOUT", STATUS_TIMEOUT },
  4870. { "TOO_MANY_OPENED_FILES", STATUS_TOO_MANY_OPENED_FILES },
  4871. { "UNSUCCESSFUL", STATUS_UNSUCCESSFUL },
  4872. { "USER_APC", STATUS_USER_APC },
  4873. { "USER_MAPPED_FILE", STATUS_USER_MAPPED_FILE },
  4874. { "VOLUME_DISMOUNTED", STATUS_VOLUME_DISMOUNTED },
  4875. { "WAS_LOCKED", STATUS_WAS_LOCKED },
  4876. { "WSAEACCES", 0xc0010000 | WSAEACCES },
  4877. { "WSAEADDRINUSE", 0xc0010000 | WSAEADDRINUSE },
  4878. { "WSAEADDRNOTAVAIL", 0xc0010000 | WSAEADDRNOTAVAIL },
  4879. { "WSAEAFNOSUPPORT", 0xc0010000 | WSAEAFNOSUPPORT },
  4880. { "WSAEALREADY", 0xc0010000 | WSAEALREADY },
  4881. { "WSAEBADF", 0xc0010000 | WSAEBADF },
  4882. { "WSAECONNABORTED", 0xc0010000 | WSAECONNABORTED },
  4883. { "WSAECONNREFUSED", 0xc0010000 | WSAECONNREFUSED },
  4884. { "WSAECONNRESET", 0xc0010000 | WSAECONNRESET },
  4885. { "WSAEDESTADDRREQ", 0xc0010000 | WSAEDESTADDRREQ },
  4886. { "WSAEDQUOT", 0xc0010000 | WSAEDQUOT },
  4887. { "WSAEFAULT", 0xc0010000 | WSAEFAULT },
  4888. { "WSAEHOSTDOWN", 0xc0010000 | WSAEHOSTDOWN },
  4889. { "WSAEHOSTUNREACH", 0xc0010000 | WSAEHOSTUNREACH },
  4890. { "WSAEINTR", 0xc0010000 | WSAEINTR },
  4891. { "WSAEINVAL", 0xc0010000 | WSAEINVAL },
  4892. { "WSAEISCONN", 0xc0010000 | WSAEISCONN },
  4893. { "WSAELOOP", 0xc0010000 | WSAELOOP },
  4894. { "WSAEMFILE", 0xc0010000 | WSAEMFILE },
  4895. { "WSAEMSGSIZE", 0xc0010000 | WSAEMSGSIZE },
  4896. { "WSAENAMETOOLONG", 0xc0010000 | WSAENAMETOOLONG },
  4897. { "WSAENETDOWN", 0xc0010000 | WSAENETDOWN },
  4898. { "WSAENETRESET", 0xc0010000 | WSAENETRESET },
  4899. { "WSAENETUNREACH", 0xc0010000 | WSAENETUNREACH },
  4900. { "WSAENOBUFS", 0xc0010000 | WSAENOBUFS },
  4901. { "WSAENOPROTOOPT", 0xc0010000 | WSAENOPROTOOPT },
  4902. { "WSAENOTCONN", 0xc0010000 | WSAENOTCONN },
  4903. { "WSAENOTEMPTY", 0xc0010000 | WSAENOTEMPTY },
  4904. { "WSAENOTSOCK", 0xc0010000 | WSAENOTSOCK },
  4905. { "WSAEOPNOTSUPP", 0xc0010000 | WSAEOPNOTSUPP },
  4906. { "WSAEPFNOSUPPORT", 0xc0010000 | WSAEPFNOSUPPORT },
  4907. { "WSAEPROCLIM", 0xc0010000 | WSAEPROCLIM },
  4908. { "WSAEPROTONOSUPPORT", 0xc0010000 | WSAEPROTONOSUPPORT },
  4909. { "WSAEPROTOTYPE", 0xc0010000 | WSAEPROTOTYPE },
  4910. { "WSAEREMOTE", 0xc0010000 | WSAEREMOTE },
  4911. { "WSAESHUTDOWN", 0xc0010000 | WSAESHUTDOWN },
  4912. { "WSAESOCKTNOSUPPORT", 0xc0010000 | WSAESOCKTNOSUPPORT },
  4913. { "WSAESTALE", 0xc0010000 | WSAESTALE },
  4914. { "WSAETIMEDOUT", 0xc0010000 | WSAETIMEDOUT },
  4915. { "WSAETOOMANYREFS", 0xc0010000 | WSAETOOMANYREFS },
  4916. { "WSAEUSERS", 0xc0010000 | WSAEUSERS },
  4917. { "WSAEWOULDBLOCK", 0xc0010000 | WSAEWOULDBLOCK },
  4918. { NULL, 0 }
  4919. };
  4920. /* ### make_requests end ### */
  4921. /* Everything above this line is generated automatically by tools/make_requests */
  4922. static const char *get_status_name( unsigned int status )
  4923. {
  4924. int i;
  4925. static char buffer[10];
  4926. if (status)
  4927. {
  4928. for (i = 0; status_names[i].name; i++)
  4929. if (status_names[i].value == status) return status_names[i].name;
  4930. }
  4931. sprintf( buffer, "%x", status );
  4932. return buffer;
  4933. }
  4934. void trace_request(void)
  4935. {
  4936. enum request req = current->req.request_header.req;
  4937. if (req < REQ_NB_REQUESTS)
  4938. {
  4939. fprintf( stderr, "%04x: %s(", current->id, req_names[req] );
  4940. if (req_dumpers[req])
  4941. {
  4942. cur_data = get_req_data();
  4943. cur_size = get_req_data_size();
  4944. req_dumpers[req]( &current->req );
  4945. }
  4946. fprintf( stderr, " )\n" );
  4947. }
  4948. else fprintf( stderr, "%04x: %d(?)\n", current->id, req );
  4949. }
  4950. void trace_reply( enum request req, const union generic_reply *reply )
  4951. {
  4952. if (req < REQ_NB_REQUESTS)
  4953. {
  4954. fprintf( stderr, "%04x: %s() = %s",
  4955. current->id, req_names[req], get_status_name(current->error) );
  4956. if (reply_dumpers[req])
  4957. {
  4958. fprintf( stderr, " {" );
  4959. cur_data = current->reply_data;
  4960. cur_size = reply->reply_header.reply_size;
  4961. reply_dumpers[req]( reply );
  4962. fprintf( stderr, " }" );
  4963. }
  4964. fputc( '\n', stderr );
  4965. }
  4966. else fprintf( stderr, "%04x: %d() = %s\n",
  4967. current->id, req, get_status_name(current->error) );
  4968. }