trace.c 197 KB

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