trace.c 111 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355
  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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  19. */
  20. #include "config.h"
  21. #include "wine/port.h"
  22. #include <ctype.h>
  23. #include <stdarg.h>
  24. #include <stdio.h>
  25. #include <sys/types.h>
  26. #ifdef HAVE_SYS_UIO_H
  27. #include <sys/uio.h>
  28. #endif
  29. #include "windef.h"
  30. #include "winbase.h"
  31. #include "wincon.h"
  32. #include "winreg.h"
  33. #include "winternl.h"
  34. #include "request.h"
  35. #include "unicode.h"
  36. static int cur_pos;
  37. static const void *cur_data;
  38. static int cur_size;
  39. /* utility functions */
  40. inline static void remove_data( size_t size )
  41. {
  42. cur_data = (const char *)cur_data + size;
  43. cur_size -= size;
  44. }
  45. static void dump_uints( const int *ptr, int len )
  46. {
  47. fputc( '{', stderr );
  48. while (len > 0)
  49. {
  50. fprintf( stderr, "%08x", *ptr++ );
  51. if (--len) fputc( ',', stderr );
  52. }
  53. fputc( '}', stderr );
  54. }
  55. static void dump_abs_time( const abs_time_t *time )
  56. {
  57. struct timeval tv;
  58. int secs, usecs;
  59. if (!time->sec && !time->usec)
  60. {
  61. fprintf( stderr, "0" );
  62. return;
  63. }
  64. gettimeofday( &tv, NULL );
  65. secs = time->sec - tv.tv_sec;
  66. if ((usecs = time->usec - tv.tv_usec) < 0)
  67. {
  68. usecs += 1000000;
  69. secs--;
  70. }
  71. if (secs > 0 || (secs == 0 && usecs >= 0))
  72. fprintf( stderr, "%d.%06d (+%d.%06d)", time->sec, time->usec, secs, usecs );
  73. else
  74. fprintf( stderr, "%d.%06d (-%d.%06d)", time->sec, time->usec, abs(secs+1), 1000000-usecs );
  75. }
  76. static void dump_rectangle( const rectangle_t *rect )
  77. {
  78. fprintf( stderr, "{%d,%d;%d,%d}",
  79. rect->left, rect->top, rect->right, rect->bottom );
  80. }
  81. static void dump_char_info( const char_info_t *info )
  82. {
  83. fprintf( stderr, "{'" );
  84. dump_strW( &info->ch, 1, stderr, "\'\'" );
  85. fprintf( stderr, "',%04x}", info->attr );
  86. }
  87. static void dump_context( const CONTEXT *context )
  88. {
  89. #ifdef __i386__
  90. fprintf( stderr, "{flags=%08lx,eax=%08lx,ebx=%08lx,ecx=%08lx,edx=%08lx,esi=%08lx,edi=%08lx,"
  91. "ebp=%08lx,eip=%08lx,esp=%08lx,eflags=%08lx,cs=%04lx,ds=%04lx,es=%04lx,"
  92. "fs=%04lx,gs=%04lx,dr0=%08lx,dr1=%08lx,dr2=%08lx,dr3=%08lx,dr6=%08lx,dr7=%08lx,",
  93. context->ContextFlags, context->Eax, context->Ebx, context->Ecx, context->Edx,
  94. context->Esi, context->Edi, context->Ebp, context->Eip, context->Esp, context->EFlags,
  95. context->SegCs, context->SegDs, context->SegEs, context->SegFs, context->SegGs,
  96. context->Dr0, context->Dr1, context->Dr2, context->Dr3, context->Dr6, context->Dr7 );
  97. fprintf( stderr, "float=" );
  98. dump_uints( (const int *)&context->FloatSave, sizeof(context->FloatSave) / sizeof(int) );
  99. fprintf( stderr, "}" );
  100. #else
  101. dump_uints( (const int *)context, sizeof(*context) / sizeof(int) );
  102. #endif
  103. }
  104. static void dump_exc_record( const EXCEPTION_RECORD *rec )
  105. {
  106. unsigned int i;
  107. fprintf( stderr, "{code=%lx,flags=%lx,rec=%p,addr=%p,params={",
  108. rec->ExceptionCode, rec->ExceptionFlags, rec->ExceptionRecord,
  109. rec->ExceptionAddress );
  110. for (i = 0; i < min(rec->NumberParameters,EXCEPTION_MAXIMUM_PARAMETERS); i++)
  111. {
  112. if (i) fputc( ',', stderr );
  113. fprintf( stderr, "%lx", rec->ExceptionInformation[i] );
  114. }
  115. fputc( '}', stderr );
  116. }
  117. static void dump_varargs_ints( size_t size )
  118. {
  119. const int *data = cur_data;
  120. size_t len = size / sizeof(*data);
  121. fputc( '{', stderr );
  122. while (len > 0)
  123. {
  124. fprintf( stderr, "%d", *data++ );
  125. if (--len) fputc( ',', stderr );
  126. }
  127. fputc( '}', stderr );
  128. remove_data( size );
  129. }
  130. static void dump_varargs_handles( size_t size )
  131. {
  132. const obj_handle_t *data = cur_data;
  133. size_t len = size / sizeof(*data);
  134. fputc( '{', stderr );
  135. while (len > 0)
  136. {
  137. fprintf( stderr, "%p", *data++ );
  138. if (--len) fputc( ',', stderr );
  139. }
  140. fputc( '}', stderr );
  141. remove_data( size );
  142. }
  143. static void dump_varargs_user_handles( size_t size )
  144. {
  145. const user_handle_t *data = cur_data;
  146. size_t len = size / sizeof(*data);
  147. fputc( '{', stderr );
  148. while (len > 0)
  149. {
  150. fprintf( stderr, "%p", *data++ );
  151. if (--len) fputc( ',', stderr );
  152. }
  153. fputc( '}', stderr );
  154. remove_data( size );
  155. }
  156. static void dump_varargs_bytes( size_t size )
  157. {
  158. const unsigned char *data = cur_data;
  159. size_t len = size;
  160. fputc( '{', stderr );
  161. while (len > 0)
  162. {
  163. fprintf( stderr, "%02x", *data++ );
  164. if (--len) fputc( ',', stderr );
  165. }
  166. fputc( '}', stderr );
  167. remove_data( size );
  168. }
  169. static void dump_varargs_string( size_t size )
  170. {
  171. fprintf( stderr, "\"%.*s\"", (int)size, (const char *)cur_data );
  172. remove_data( size );
  173. }
  174. static void dump_varargs_unicode_str( size_t size )
  175. {
  176. fprintf( stderr, "L\"" );
  177. dump_strW( cur_data, size / sizeof(WCHAR), stderr, "\"\"" );
  178. fputc( '\"', stderr );
  179. remove_data( size );
  180. }
  181. static void dump_varargs_context( size_t size )
  182. {
  183. if (!size)
  184. {
  185. fprintf( stderr, "{}" );
  186. return;
  187. }
  188. dump_context( cur_data );
  189. remove_data( size );
  190. }
  191. static void dump_varargs_exc_event( size_t size )
  192. {
  193. const CONTEXT *ptr = cur_data;
  194. if (!size)
  195. {
  196. fprintf( stderr, "{}" );
  197. return;
  198. }
  199. fprintf( stderr, "{context=" );
  200. dump_context( ptr );
  201. fprintf( stderr, ",rec=" );
  202. dump_exc_record( (const EXCEPTION_RECORD *)(ptr + 1) );
  203. fputc( '}', stderr );
  204. remove_data( size );
  205. }
  206. static void dump_varargs_debug_event( size_t size )
  207. {
  208. const debug_event_t *event = cur_data;
  209. if (!size)
  210. {
  211. fprintf( stderr, "{}" );
  212. return;
  213. }
  214. switch(event->code)
  215. {
  216. case EXCEPTION_DEBUG_EVENT:
  217. fprintf( stderr, "{exception," );
  218. dump_exc_record( &event->info.exception.record );
  219. fprintf( stderr, ",first=%d}", event->info.exception.first );
  220. break;
  221. case CREATE_THREAD_DEBUG_EVENT:
  222. fprintf( stderr, "{create_thread,thread=%p,teb=%p,start=%p}",
  223. event->info.create_thread.handle, event->info.create_thread.teb,
  224. event->info.create_thread.start );
  225. break;
  226. case CREATE_PROCESS_DEBUG_EVENT:
  227. fprintf( stderr, "{create_process,file=%p,process=%p,thread=%p,base=%p,offset=%d,"
  228. "size=%d,teb=%p,start=%p,name=%p,unicode=%d}",
  229. event->info.create_process.file, event->info.create_process.process,
  230. event->info.create_process.thread, event->info.create_process.base,
  231. event->info.create_process.dbg_offset, event->info.create_process.dbg_size,
  232. event->info.create_process.teb, event->info.create_process.start,
  233. event->info.create_process.name, event->info.create_process.unicode );
  234. break;
  235. case EXIT_THREAD_DEBUG_EVENT:
  236. fprintf( stderr, "{exit_thread,code=%d}", event->info.exit.exit_code );
  237. break;
  238. case EXIT_PROCESS_DEBUG_EVENT:
  239. fprintf( stderr, "{exit_process,code=%d}", event->info.exit.exit_code );
  240. break;
  241. case LOAD_DLL_DEBUG_EVENT:
  242. fprintf( stderr, "{load_dll,file=%p,base=%p,offset=%d,size=%d,name=%p,unicode=%d}",
  243. event->info.load_dll.handle, event->info.load_dll.base,
  244. event->info.load_dll.dbg_offset, event->info.load_dll.dbg_size,
  245. event->info.load_dll.name, event->info.load_dll.unicode );
  246. break;
  247. case UNLOAD_DLL_DEBUG_EVENT:
  248. fprintf( stderr, "{unload_dll,base=%p}", event->info.unload_dll.base );
  249. break;
  250. case OUTPUT_DEBUG_STRING_EVENT:
  251. fprintf( stderr, "{output_string,data=%p,unicode=%d,len=%d}",
  252. event->info.output_string.string, event->info.output_string.unicode,
  253. event->info.output_string.length );
  254. break;
  255. case RIP_EVENT:
  256. fprintf( stderr, "{rip,err=%d,type=%d}",
  257. event->info.rip_info.error, event->info.rip_info.type );
  258. break;
  259. case 0: /* zero is the code returned on timeouts */
  260. fprintf( stderr, "{}" );
  261. break;
  262. default:
  263. fprintf( stderr, "{code=??? (%d)}", event->code );
  264. break;
  265. }
  266. remove_data( size );
  267. }
  268. /* dump a unicode string contained in a buffer; helper for dump_varargs_startup_info */
  269. static void dump_inline_unicode_string( const UNICODE_STRING *str, const void *data, size_t size )
  270. {
  271. size_t length = str->Length / sizeof(WCHAR);
  272. size_t offset = (size_t)str->Buffer;
  273. if (offset >= size) return;
  274. if (offset + length > size) length = size - offset;
  275. dump_strW( (const WCHAR *)data + offset/sizeof(WCHAR), length, stderr, "\"\"" );
  276. }
  277. static void dump_varargs_startup_info( size_t size )
  278. {
  279. const RTL_USER_PROCESS_PARAMETERS *ptr = cur_data;
  280. RTL_USER_PROCESS_PARAMETERS params;
  281. if (size < sizeof(params.Size))
  282. {
  283. fprintf( stderr, "{}" );
  284. return;
  285. }
  286. if (size > ptr->Size) size = ptr->Size;
  287. memset( &params, 0, sizeof(params) );
  288. memcpy( &params, ptr, min( size, sizeof(params) ));
  289. fprintf( stderr, "{AllocationSize=%lx,", params.AllocationSize );
  290. fprintf( stderr, "Size=%lx,", params.Size );
  291. fprintf( stderr, "Flags=%lx,", params.Flags );
  292. fprintf( stderr, "DebugFlags=%lx,", params.DebugFlags );
  293. fprintf( stderr, "ConsoleHandle=%p,", params.ConsoleHandle );
  294. fprintf( stderr, "ConsoleFlags=%lx,", params.ConsoleFlags );
  295. fprintf( stderr, "hStdInput=%p,", params.hStdInput );
  296. fprintf( stderr, "hStdOutput=%p,", params.hStdOutput );
  297. fprintf( stderr, "hStdError=%p,", params.hStdError );
  298. fprintf( stderr, "CurrentDirectory.Handle=%p,", params.CurrentDirectory.Handle );
  299. fprintf( stderr, "dwX=%ld,", params.dwX );
  300. fprintf( stderr, "dwY=%ld,", params.dwY );
  301. fprintf( stderr, "dwXSize=%ld,", params.dwXSize );
  302. fprintf( stderr, "dwYSize=%ld,", params.dwYSize );
  303. fprintf( stderr, "dwXCountChars=%ld,", params.dwXCountChars );
  304. fprintf( stderr, "dwYCountChars=%ld,", params.dwYCountChars );
  305. fprintf( stderr, "dwFillAttribute=%lx,", params.dwFillAttribute );
  306. fprintf( stderr, "dwFlags=%lx,", params.dwFlags );
  307. fprintf( stderr, "wShowWindow=%lx,", params.wShowWindow );
  308. fprintf( stderr, "CurrentDirectory.DosPath=L\"" );
  309. dump_inline_unicode_string( &params.CurrentDirectory.DosPath, cur_data, size );
  310. fprintf( stderr, "\",DllPath=L\"" );
  311. dump_inline_unicode_string( &params.DllPath, cur_data, size );
  312. fprintf( stderr, "\",ImagePathName=L\"" );
  313. dump_inline_unicode_string( &params.ImagePathName, cur_data, size );
  314. fprintf( stderr, "\",CommandLine=L\"" );
  315. dump_inline_unicode_string( &params.CommandLine, cur_data, size );
  316. fprintf( stderr, "\",WindowTitle=L\"" );
  317. dump_inline_unicode_string( &params.WindowTitle, cur_data, size );
  318. fprintf( stderr, "\",Desktop=L\"" );
  319. dump_inline_unicode_string( &params.Desktop, cur_data, size );
  320. fprintf( stderr, "\",ShellInfo=L\"" );
  321. dump_inline_unicode_string( &params.ShellInfo, cur_data, size );
  322. fprintf( stderr, "\",RuntimeInfo=L\"" );
  323. dump_inline_unicode_string( &params.RuntimeInfo, cur_data, size );
  324. fprintf( stderr, "\"}" );
  325. remove_data( size );
  326. }
  327. static void dump_varargs_input_records( size_t size )
  328. {
  329. const INPUT_RECORD *rec = cur_data;
  330. size_t len = size / sizeof(*rec);
  331. fputc( '{', stderr );
  332. while (len > 0)
  333. {
  334. fprintf( stderr, "{%04x,...}", rec->EventType );
  335. rec++;
  336. if (--len) fputc( ',', stderr );
  337. }
  338. fputc( '}', stderr );
  339. remove_data( size );
  340. }
  341. static void dump_varargs_rectangles( size_t size )
  342. {
  343. const rectangle_t *rect = cur_data;
  344. size_t len = size / sizeof(*rect);
  345. fputc( '{', stderr );
  346. while (len > 0)
  347. {
  348. dump_rectangle( rect++ );
  349. if (--len) fputc( ',', stderr );
  350. }
  351. fputc( '}', stderr );
  352. remove_data( size );
  353. }
  354. static void dump_varargs_properties( size_t size )
  355. {
  356. const property_data_t *prop = cur_data;
  357. size_t len = size / sizeof(*prop);
  358. fputc( '{', stderr );
  359. while (len > 0)
  360. {
  361. fprintf( stderr, "{atom=%04x,str=%d,handle=%p}",
  362. prop->atom, prop->string, prop->handle );
  363. prop++;
  364. if (--len) fputc( ',', stderr );
  365. }
  366. fputc( '}', stderr );
  367. remove_data( size );
  368. }
  369. static void dump_varargs_LUID_AND_ATTRIBUTES( size_t size )
  370. {
  371. const LUID_AND_ATTRIBUTES *lat = cur_data;
  372. size_t len = size / sizeof(*lat);
  373. fputc( '{', stderr );
  374. while (len > 0)
  375. {
  376. fprintf( stderr, "{luid=%08lx%08lx,attr=%lx}",
  377. lat->Luid.HighPart, lat->Luid.LowPart, lat->Attributes );
  378. lat++;
  379. if (--len) fputc( ',', stderr );
  380. }
  381. fputc( '}', stderr );
  382. remove_data( size );
  383. }
  384. typedef void (*dump_func)( const void *req );
  385. /* Everything below this line is generated automatically by tools/make_requests */
  386. /* ### make_requests begin ### */
  387. static void dump_new_process_request( const struct new_process_request *req )
  388. {
  389. fprintf( stderr, " inherit_all=%d,", req->inherit_all );
  390. fprintf( stderr, " create_flags=%d,", req->create_flags );
  391. fprintf( stderr, " unix_pid=%d,", req->unix_pid );
  392. fprintf( stderr, " exe_file=%p,", req->exe_file );
  393. fprintf( stderr, " hstdin=%p,", req->hstdin );
  394. fprintf( stderr, " hstdout=%p,", req->hstdout );
  395. fprintf( stderr, " hstderr=%p,", req->hstderr );
  396. fprintf( stderr, " info=" );
  397. dump_varargs_startup_info( cur_size );
  398. fputc( ',', stderr );
  399. fprintf( stderr, " env=" );
  400. dump_varargs_unicode_str( cur_size );
  401. }
  402. static void dump_new_process_reply( const struct new_process_reply *req )
  403. {
  404. fprintf( stderr, " info=%p", req->info );
  405. }
  406. static void dump_get_new_process_info_request( const struct get_new_process_info_request *req )
  407. {
  408. fprintf( stderr, " info=%p,", req->info );
  409. fprintf( stderr, " pinherit=%d,", req->pinherit );
  410. fprintf( stderr, " tinherit=%d", req->tinherit );
  411. }
  412. static void dump_get_new_process_info_reply( const struct get_new_process_info_reply *req )
  413. {
  414. fprintf( stderr, " pid=%04x,", req->pid );
  415. fprintf( stderr, " phandle=%p,", req->phandle );
  416. fprintf( stderr, " tid=%04x,", req->tid );
  417. fprintf( stderr, " thandle=%p,", req->thandle );
  418. fprintf( stderr, " success=%d", req->success );
  419. }
  420. static void dump_new_thread_request( const struct new_thread_request *req )
  421. {
  422. fprintf( stderr, " suspend=%d,", req->suspend );
  423. fprintf( stderr, " inherit=%d,", req->inherit );
  424. fprintf( stderr, " request_fd=%d", req->request_fd );
  425. }
  426. static void dump_new_thread_reply( const struct new_thread_reply *req )
  427. {
  428. fprintf( stderr, " tid=%04x,", req->tid );
  429. fprintf( stderr, " handle=%p", req->handle );
  430. }
  431. static void dump_boot_done_request( const struct boot_done_request *req )
  432. {
  433. fprintf( stderr, " debug_level=%d", req->debug_level );
  434. }
  435. static void dump_init_process_request( const struct init_process_request *req )
  436. {
  437. fprintf( stderr, " peb=%p,", req->peb );
  438. fprintf( stderr, " ldt_copy=%p", req->ldt_copy );
  439. }
  440. static void dump_init_process_reply( const struct init_process_reply *req )
  441. {
  442. fprintf( stderr, " create_flags=%d,", req->create_flags );
  443. fprintf( stderr, " server_start=%08x,", req->server_start );
  444. fprintf( stderr, " info_size=%d,", req->info_size );
  445. fprintf( stderr, " exe_file=%p,", req->exe_file );
  446. fprintf( stderr, " hstdin=%p,", req->hstdin );
  447. fprintf( stderr, " hstdout=%p,", req->hstdout );
  448. fprintf( stderr, " hstderr=%p", req->hstderr );
  449. }
  450. static void dump_get_startup_info_request( const struct get_startup_info_request *req )
  451. {
  452. }
  453. static void dump_get_startup_info_reply( const struct get_startup_info_reply *req )
  454. {
  455. fprintf( stderr, " info=" );
  456. dump_varargs_startup_info( cur_size );
  457. fputc( ',', stderr );
  458. fprintf( stderr, " env=" );
  459. dump_varargs_unicode_str( cur_size );
  460. }
  461. static void dump_init_process_done_request( const struct init_process_done_request *req )
  462. {
  463. fprintf( stderr, " module=%p,", req->module );
  464. fprintf( stderr, " module_size=%d,", req->module_size );
  465. fprintf( stderr, " entry=%p,", req->entry );
  466. fprintf( stderr, " name=%p,", req->name );
  467. fprintf( stderr, " exe_file=%p,", req->exe_file );
  468. fprintf( stderr, " gui=%d,", req->gui );
  469. fprintf( stderr, " filename=" );
  470. dump_varargs_unicode_str( cur_size );
  471. }
  472. static void dump_init_thread_request( const struct init_thread_request *req )
  473. {
  474. fprintf( stderr, " unix_pid=%d,", req->unix_pid );
  475. fprintf( stderr, " unix_tid=%d,", req->unix_tid );
  476. fprintf( stderr, " teb=%p,", req->teb );
  477. fprintf( stderr, " entry=%p,", req->entry );
  478. fprintf( stderr, " reply_fd=%d,", req->reply_fd );
  479. fprintf( stderr, " wait_fd=%d", req->wait_fd );
  480. }
  481. static void dump_init_thread_reply( const struct init_thread_reply *req )
  482. {
  483. fprintf( stderr, " pid=%04x,", req->pid );
  484. fprintf( stderr, " tid=%04x,", req->tid );
  485. fprintf( stderr, " boot=%d,", req->boot );
  486. fprintf( stderr, " version=%d", req->version );
  487. }
  488. static void dump_terminate_process_request( const struct terminate_process_request *req )
  489. {
  490. fprintf( stderr, " handle=%p,", req->handle );
  491. fprintf( stderr, " exit_code=%d", req->exit_code );
  492. }
  493. static void dump_terminate_process_reply( const struct terminate_process_reply *req )
  494. {
  495. fprintf( stderr, " self=%d", req->self );
  496. }
  497. static void dump_terminate_thread_request( const struct terminate_thread_request *req )
  498. {
  499. fprintf( stderr, " handle=%p,", req->handle );
  500. fprintf( stderr, " exit_code=%d", req->exit_code );
  501. }
  502. static void dump_terminate_thread_reply( const struct terminate_thread_reply *req )
  503. {
  504. fprintf( stderr, " self=%d,", req->self );
  505. fprintf( stderr, " last=%d", req->last );
  506. }
  507. static void dump_get_process_info_request( const struct get_process_info_request *req )
  508. {
  509. fprintf( stderr, " handle=%p", req->handle );
  510. }
  511. static void dump_get_process_info_reply( const struct get_process_info_reply *req )
  512. {
  513. fprintf( stderr, " pid=%04x,", req->pid );
  514. fprintf( stderr, " ppid=%04x,", req->ppid );
  515. fprintf( stderr, " exit_code=%d,", req->exit_code );
  516. fprintf( stderr, " priority=%d,", req->priority );
  517. fprintf( stderr, " process_affinity=%d,", req->process_affinity );
  518. fprintf( stderr, " system_affinity=%d,", req->system_affinity );
  519. fprintf( stderr, " peb=%p", req->peb );
  520. }
  521. static void dump_set_process_info_request( const struct set_process_info_request *req )
  522. {
  523. fprintf( stderr, " handle=%p,", req->handle );
  524. fprintf( stderr, " mask=%d,", req->mask );
  525. fprintf( stderr, " priority=%d,", req->priority );
  526. fprintf( stderr, " affinity=%d", req->affinity );
  527. }
  528. static void dump_get_thread_info_request( const struct get_thread_info_request *req )
  529. {
  530. fprintf( stderr, " handle=%p,", req->handle );
  531. fprintf( stderr, " tid_in=%04x", req->tid_in );
  532. }
  533. static void dump_get_thread_info_reply( const struct get_thread_info_reply *req )
  534. {
  535. fprintf( stderr, " pid=%04x,", req->pid );
  536. fprintf( stderr, " tid=%04x,", req->tid );
  537. fprintf( stderr, " teb=%p,", req->teb );
  538. fprintf( stderr, " exit_code=%d,", req->exit_code );
  539. fprintf( stderr, " priority=%d,", req->priority );
  540. fprintf( stderr, " affinity=%d,", req->affinity );
  541. fprintf( stderr, " creation_time=%ld,", (long)req->creation_time );
  542. fprintf( stderr, " exit_time=%ld", (long)req->exit_time );
  543. }
  544. static void dump_set_thread_info_request( const struct set_thread_info_request *req )
  545. {
  546. fprintf( stderr, " handle=%p,", req->handle );
  547. fprintf( stderr, " mask=%d,", req->mask );
  548. fprintf( stderr, " priority=%d,", req->priority );
  549. fprintf( stderr, " affinity=%d", req->affinity );
  550. }
  551. static void dump_get_dll_info_request( const struct get_dll_info_request *req )
  552. {
  553. fprintf( stderr, " handle=%p,", req->handle );
  554. fprintf( stderr, " base_address=%p", req->base_address );
  555. }
  556. static void dump_get_dll_info_reply( const struct get_dll_info_reply *req )
  557. {
  558. fprintf( stderr, " size=%d,", req->size );
  559. fprintf( stderr, " entry_point=%p,", req->entry_point );
  560. fprintf( stderr, " filename=" );
  561. dump_varargs_unicode_str( cur_size );
  562. }
  563. static void dump_suspend_thread_request( const struct suspend_thread_request *req )
  564. {
  565. fprintf( stderr, " handle=%p", req->handle );
  566. }
  567. static void dump_suspend_thread_reply( const struct suspend_thread_reply *req )
  568. {
  569. fprintf( stderr, " count=%d", req->count );
  570. }
  571. static void dump_resume_thread_request( const struct resume_thread_request *req )
  572. {
  573. fprintf( stderr, " handle=%p", req->handle );
  574. }
  575. static void dump_resume_thread_reply( const struct resume_thread_reply *req )
  576. {
  577. fprintf( stderr, " count=%d", req->count );
  578. }
  579. static void dump_load_dll_request( const struct load_dll_request *req )
  580. {
  581. fprintf( stderr, " handle=%p,", req->handle );
  582. fprintf( stderr, " base=%p,", req->base );
  583. fprintf( stderr, " size=%d,", req->size );
  584. fprintf( stderr, " dbg_offset=%d,", req->dbg_offset );
  585. fprintf( stderr, " dbg_size=%d,", req->dbg_size );
  586. fprintf( stderr, " name=%p,", req->name );
  587. fprintf( stderr, " filename=" );
  588. dump_varargs_unicode_str( cur_size );
  589. }
  590. static void dump_unload_dll_request( const struct unload_dll_request *req )
  591. {
  592. fprintf( stderr, " base=%p", req->base );
  593. }
  594. static void dump_queue_apc_request( const struct queue_apc_request *req )
  595. {
  596. fprintf( stderr, " handle=%p,", req->handle );
  597. fprintf( stderr, " user=%d,", req->user );
  598. fprintf( stderr, " func=%p,", req->func );
  599. fprintf( stderr, " arg1=%p,", req->arg1 );
  600. fprintf( stderr, " arg2=%p,", req->arg2 );
  601. fprintf( stderr, " arg3=%p", req->arg3 );
  602. }
  603. static void dump_get_apc_request( const struct get_apc_request *req )
  604. {
  605. fprintf( stderr, " alertable=%d", req->alertable );
  606. }
  607. static void dump_get_apc_reply( const struct get_apc_reply *req )
  608. {
  609. fprintf( stderr, " func=%p,", req->func );
  610. fprintf( stderr, " type=%d,", req->type );
  611. fprintf( stderr, " arg1=%p,", req->arg1 );
  612. fprintf( stderr, " arg2=%p,", req->arg2 );
  613. fprintf( stderr, " arg3=%p", req->arg3 );
  614. }
  615. static void dump_close_handle_request( const struct close_handle_request *req )
  616. {
  617. fprintf( stderr, " handle=%p", req->handle );
  618. }
  619. static void dump_close_handle_reply( const struct close_handle_reply *req )
  620. {
  621. fprintf( stderr, " fd=%d", req->fd );
  622. }
  623. static void dump_set_handle_info_request( const struct set_handle_info_request *req )
  624. {
  625. fprintf( stderr, " handle=%p,", req->handle );
  626. fprintf( stderr, " flags=%d,", req->flags );
  627. fprintf( stderr, " mask=%d,", req->mask );
  628. fprintf( stderr, " fd=%d", req->fd );
  629. }
  630. static void dump_set_handle_info_reply( const struct set_handle_info_reply *req )
  631. {
  632. fprintf( stderr, " old_flags=%d,", req->old_flags );
  633. fprintf( stderr, " cur_fd=%d", req->cur_fd );
  634. }
  635. static void dump_dup_handle_request( const struct dup_handle_request *req )
  636. {
  637. fprintf( stderr, " src_process=%p,", req->src_process );
  638. fprintf( stderr, " src_handle=%p,", req->src_handle );
  639. fprintf( stderr, " dst_process=%p,", req->dst_process );
  640. fprintf( stderr, " access=%08x,", req->access );
  641. fprintf( stderr, " inherit=%d,", req->inherit );
  642. fprintf( stderr, " options=%d", req->options );
  643. }
  644. static void dump_dup_handle_reply( const struct dup_handle_reply *req )
  645. {
  646. fprintf( stderr, " handle=%p,", req->handle );
  647. fprintf( stderr, " fd=%d", req->fd );
  648. }
  649. static void dump_open_process_request( const struct open_process_request *req )
  650. {
  651. fprintf( stderr, " pid=%04x,", req->pid );
  652. fprintf( stderr, " access=%08x,", req->access );
  653. fprintf( stderr, " inherit=%d", req->inherit );
  654. }
  655. static void dump_open_process_reply( const struct open_process_reply *req )
  656. {
  657. fprintf( stderr, " handle=%p", req->handle );
  658. }
  659. static void dump_open_thread_request( const struct open_thread_request *req )
  660. {
  661. fprintf( stderr, " tid=%04x,", req->tid );
  662. fprintf( stderr, " access=%08x,", req->access );
  663. fprintf( stderr, " inherit=%d", req->inherit );
  664. }
  665. static void dump_open_thread_reply( const struct open_thread_reply *req )
  666. {
  667. fprintf( stderr, " handle=%p", req->handle );
  668. }
  669. static void dump_select_request( const struct select_request *req )
  670. {
  671. fprintf( stderr, " flags=%d,", req->flags );
  672. fprintf( stderr, " cookie=%p,", req->cookie );
  673. fprintf( stderr, " timeout=" );
  674. dump_abs_time( &req->timeout );
  675. fprintf( stderr, "," );
  676. fprintf( stderr, " handles=" );
  677. dump_varargs_handles( cur_size );
  678. }
  679. static void dump_create_event_request( const struct create_event_request *req )
  680. {
  681. fprintf( stderr, " access=%08x,", req->access );
  682. fprintf( stderr, " manual_reset=%d,", req->manual_reset );
  683. fprintf( stderr, " initial_state=%d,", req->initial_state );
  684. fprintf( stderr, " inherit=%d,", req->inherit );
  685. fprintf( stderr, " name=" );
  686. dump_varargs_unicode_str( cur_size );
  687. }
  688. static void dump_create_event_reply( const struct create_event_reply *req )
  689. {
  690. fprintf( stderr, " handle=%p", req->handle );
  691. }
  692. static void dump_event_op_request( const struct event_op_request *req )
  693. {
  694. fprintf( stderr, " handle=%p,", req->handle );
  695. fprintf( stderr, " op=%d", req->op );
  696. }
  697. static void dump_open_event_request( const struct open_event_request *req )
  698. {
  699. fprintf( stderr, " access=%08x,", req->access );
  700. fprintf( stderr, " inherit=%d,", req->inherit );
  701. fprintf( stderr, " name=" );
  702. dump_varargs_unicode_str( cur_size );
  703. }
  704. static void dump_open_event_reply( const struct open_event_reply *req )
  705. {
  706. fprintf( stderr, " handle=%p", req->handle );
  707. }
  708. static void dump_create_mutex_request( const struct create_mutex_request *req )
  709. {
  710. fprintf( stderr, " access=%08x,", req->access );
  711. fprintf( stderr, " owned=%d,", req->owned );
  712. fprintf( stderr, " inherit=%d,", req->inherit );
  713. fprintf( stderr, " name=" );
  714. dump_varargs_unicode_str( cur_size );
  715. }
  716. static void dump_create_mutex_reply( const struct create_mutex_reply *req )
  717. {
  718. fprintf( stderr, " handle=%p", req->handle );
  719. }
  720. static void dump_release_mutex_request( const struct release_mutex_request *req )
  721. {
  722. fprintf( stderr, " handle=%p", req->handle );
  723. }
  724. static void dump_release_mutex_reply( const struct release_mutex_reply *req )
  725. {
  726. fprintf( stderr, " prev_count=%08x", req->prev_count );
  727. }
  728. static void dump_open_mutex_request( const struct open_mutex_request *req )
  729. {
  730. fprintf( stderr, " access=%08x,", req->access );
  731. fprintf( stderr, " inherit=%d,", req->inherit );
  732. fprintf( stderr, " name=" );
  733. dump_varargs_unicode_str( cur_size );
  734. }
  735. static void dump_open_mutex_reply( const struct open_mutex_reply *req )
  736. {
  737. fprintf( stderr, " handle=%p", req->handle );
  738. }
  739. static void dump_create_semaphore_request( const struct create_semaphore_request *req )
  740. {
  741. fprintf( stderr, " access=%08x,", req->access );
  742. fprintf( stderr, " initial=%08x,", req->initial );
  743. fprintf( stderr, " max=%08x,", req->max );
  744. fprintf( stderr, " inherit=%d,", req->inherit );
  745. fprintf( stderr, " name=" );
  746. dump_varargs_unicode_str( cur_size );
  747. }
  748. static void dump_create_semaphore_reply( const struct create_semaphore_reply *req )
  749. {
  750. fprintf( stderr, " handle=%p", req->handle );
  751. }
  752. static void dump_release_semaphore_request( const struct release_semaphore_request *req )
  753. {
  754. fprintf( stderr, " handle=%p,", req->handle );
  755. fprintf( stderr, " count=%08x", req->count );
  756. }
  757. static void dump_release_semaphore_reply( const struct release_semaphore_reply *req )
  758. {
  759. fprintf( stderr, " prev_count=%08x", req->prev_count );
  760. }
  761. static void dump_open_semaphore_request( const struct open_semaphore_request *req )
  762. {
  763. fprintf( stderr, " access=%08x,", req->access );
  764. fprintf( stderr, " inherit=%d,", req->inherit );
  765. fprintf( stderr, " name=" );
  766. dump_varargs_unicode_str( cur_size );
  767. }
  768. static void dump_open_semaphore_reply( const struct open_semaphore_reply *req )
  769. {
  770. fprintf( stderr, " handle=%p", req->handle );
  771. }
  772. static void dump_create_file_request( const struct create_file_request *req )
  773. {
  774. fprintf( stderr, " access=%08x,", req->access );
  775. fprintf( stderr, " inherit=%d,", req->inherit );
  776. fprintf( stderr, " sharing=%08x,", req->sharing );
  777. fprintf( stderr, " create=%d,", req->create );
  778. fprintf( stderr, " options=%08x,", req->options );
  779. fprintf( stderr, " attrs=%08x,", req->attrs );
  780. fprintf( stderr, " filename=" );
  781. dump_varargs_string( cur_size );
  782. }
  783. static void dump_create_file_reply( const struct create_file_reply *req )
  784. {
  785. fprintf( stderr, " handle=%p", req->handle );
  786. }
  787. static void dump_alloc_file_handle_request( const struct alloc_file_handle_request *req )
  788. {
  789. fprintf( stderr, " access=%08x,", req->access );
  790. fprintf( stderr, " inherit=%d,", req->inherit );
  791. fprintf( stderr, " fd=%d", req->fd );
  792. }
  793. static void dump_alloc_file_handle_reply( const struct alloc_file_handle_reply *req )
  794. {
  795. fprintf( stderr, " handle=%p", req->handle );
  796. }
  797. static void dump_get_handle_fd_request( const struct get_handle_fd_request *req )
  798. {
  799. fprintf( stderr, " handle=%p,", req->handle );
  800. fprintf( stderr, " access=%08x", req->access );
  801. }
  802. static void dump_get_handle_fd_reply( const struct get_handle_fd_reply *req )
  803. {
  804. fprintf( stderr, " fd=%d,", req->fd );
  805. fprintf( stderr, " flags=%d", req->flags );
  806. }
  807. static void dump_flush_file_request( const struct flush_file_request *req )
  808. {
  809. fprintf( stderr, " handle=%p", req->handle );
  810. }
  811. static void dump_flush_file_reply( const struct flush_file_reply *req )
  812. {
  813. fprintf( stderr, " event=%p", req->event );
  814. }
  815. static void dump_lock_file_request( const struct lock_file_request *req )
  816. {
  817. fprintf( stderr, " handle=%p,", req->handle );
  818. fprintf( stderr, " offset_low=%08x,", req->offset_low );
  819. fprintf( stderr, " offset_high=%08x,", req->offset_high );
  820. fprintf( stderr, " count_low=%08x,", req->count_low );
  821. fprintf( stderr, " count_high=%08x,", req->count_high );
  822. fprintf( stderr, " shared=%d,", req->shared );
  823. fprintf( stderr, " wait=%d", req->wait );
  824. }
  825. static void dump_lock_file_reply( const struct lock_file_reply *req )
  826. {
  827. fprintf( stderr, " handle=%p,", req->handle );
  828. fprintf( stderr, " overlapped=%d", req->overlapped );
  829. }
  830. static void dump_unlock_file_request( const struct unlock_file_request *req )
  831. {
  832. fprintf( stderr, " handle=%p,", req->handle );
  833. fprintf( stderr, " offset_low=%08x,", req->offset_low );
  834. fprintf( stderr, " offset_high=%08x,", req->offset_high );
  835. fprintf( stderr, " count_low=%08x,", req->count_low );
  836. fprintf( stderr, " count_high=%08x", req->count_high );
  837. }
  838. static void dump_create_socket_request( const struct create_socket_request *req )
  839. {
  840. fprintf( stderr, " access=%08x,", req->access );
  841. fprintf( stderr, " inherit=%d,", req->inherit );
  842. fprintf( stderr, " family=%d,", req->family );
  843. fprintf( stderr, " type=%d,", req->type );
  844. fprintf( stderr, " protocol=%d,", req->protocol );
  845. fprintf( stderr, " flags=%08x", req->flags );
  846. }
  847. static void dump_create_socket_reply( const struct create_socket_reply *req )
  848. {
  849. fprintf( stderr, " handle=%p", req->handle );
  850. }
  851. static void dump_accept_socket_request( const struct accept_socket_request *req )
  852. {
  853. fprintf( stderr, " lhandle=%p,", req->lhandle );
  854. fprintf( stderr, " access=%08x,", req->access );
  855. fprintf( stderr, " inherit=%d", req->inherit );
  856. }
  857. static void dump_accept_socket_reply( const struct accept_socket_reply *req )
  858. {
  859. fprintf( stderr, " handle=%p", req->handle );
  860. }
  861. static void dump_set_socket_event_request( const struct set_socket_event_request *req )
  862. {
  863. fprintf( stderr, " handle=%p,", req->handle );
  864. fprintf( stderr, " mask=%08x,", req->mask );
  865. fprintf( stderr, " event=%p,", req->event );
  866. fprintf( stderr, " window=%p,", req->window );
  867. fprintf( stderr, " msg=%08x", req->msg );
  868. }
  869. static void dump_get_socket_event_request( const struct get_socket_event_request *req )
  870. {
  871. fprintf( stderr, " handle=%p,", req->handle );
  872. fprintf( stderr, " service=%d,", req->service );
  873. fprintf( stderr, " c_event=%p", req->c_event );
  874. }
  875. static void dump_get_socket_event_reply( const struct get_socket_event_reply *req )
  876. {
  877. fprintf( stderr, " mask=%08x,", req->mask );
  878. fprintf( stderr, " pmask=%08x,", req->pmask );
  879. fprintf( stderr, " state=%08x,", req->state );
  880. fprintf( stderr, " errors=" );
  881. dump_varargs_ints( cur_size );
  882. }
  883. static void dump_enable_socket_event_request( const struct enable_socket_event_request *req )
  884. {
  885. fprintf( stderr, " handle=%p,", req->handle );
  886. fprintf( stderr, " mask=%08x,", req->mask );
  887. fprintf( stderr, " sstate=%08x,", req->sstate );
  888. fprintf( stderr, " cstate=%08x", req->cstate );
  889. }
  890. static void dump_set_socket_deferred_request( const struct set_socket_deferred_request *req )
  891. {
  892. fprintf( stderr, " handle=%p,", req->handle );
  893. fprintf( stderr, " deferred=%p", req->deferred );
  894. }
  895. static void dump_alloc_console_request( const struct alloc_console_request *req )
  896. {
  897. fprintf( stderr, " access=%08x,", req->access );
  898. fprintf( stderr, " inherit=%d,", req->inherit );
  899. fprintf( stderr, " pid=%04x", req->pid );
  900. }
  901. static void dump_alloc_console_reply( const struct alloc_console_reply *req )
  902. {
  903. fprintf( stderr, " handle_in=%p,", req->handle_in );
  904. fprintf( stderr, " event=%p", req->event );
  905. }
  906. static void dump_free_console_request( const struct free_console_request *req )
  907. {
  908. }
  909. static void dump_get_console_renderer_events_request( const struct get_console_renderer_events_request *req )
  910. {
  911. fprintf( stderr, " handle=%p", req->handle );
  912. }
  913. static void dump_get_console_renderer_events_reply( const struct get_console_renderer_events_reply *req )
  914. {
  915. fprintf( stderr, " data=" );
  916. dump_varargs_bytes( cur_size );
  917. }
  918. static void dump_open_console_request( const struct open_console_request *req )
  919. {
  920. fprintf( stderr, " from=%d,", req->from );
  921. fprintf( stderr, " access=%08x,", req->access );
  922. fprintf( stderr, " inherit=%d,", req->inherit );
  923. fprintf( stderr, " share=%d", req->share );
  924. }
  925. static void dump_open_console_reply( const struct open_console_reply *req )
  926. {
  927. fprintf( stderr, " handle=%p", req->handle );
  928. }
  929. static void dump_get_console_wait_event_request( const struct get_console_wait_event_request *req )
  930. {
  931. }
  932. static void dump_get_console_wait_event_reply( const struct get_console_wait_event_reply *req )
  933. {
  934. fprintf( stderr, " handle=%p", req->handle );
  935. }
  936. static void dump_get_console_mode_request( const struct get_console_mode_request *req )
  937. {
  938. fprintf( stderr, " handle=%p", req->handle );
  939. }
  940. static void dump_get_console_mode_reply( const struct get_console_mode_reply *req )
  941. {
  942. fprintf( stderr, " mode=%d", req->mode );
  943. }
  944. static void dump_set_console_mode_request( const struct set_console_mode_request *req )
  945. {
  946. fprintf( stderr, " handle=%p,", req->handle );
  947. fprintf( stderr, " mode=%d", req->mode );
  948. }
  949. static void dump_set_console_input_info_request( const struct set_console_input_info_request *req )
  950. {
  951. fprintf( stderr, " handle=%p,", req->handle );
  952. fprintf( stderr, " mask=%d,", req->mask );
  953. fprintf( stderr, " active_sb=%p,", req->active_sb );
  954. fprintf( stderr, " history_mode=%d,", req->history_mode );
  955. fprintf( stderr, " history_size=%d,", req->history_size );
  956. fprintf( stderr, " edition_mode=%d,", req->edition_mode );
  957. fprintf( stderr, " title=" );
  958. dump_varargs_unicode_str( cur_size );
  959. }
  960. static void dump_get_console_input_info_request( const struct get_console_input_info_request *req )
  961. {
  962. fprintf( stderr, " handle=%p", req->handle );
  963. }
  964. static void dump_get_console_input_info_reply( const struct get_console_input_info_reply *req )
  965. {
  966. fprintf( stderr, " history_mode=%d,", req->history_mode );
  967. fprintf( stderr, " history_size=%d,", req->history_size );
  968. fprintf( stderr, " history_index=%d,", req->history_index );
  969. fprintf( stderr, " edition_mode=%d,", req->edition_mode );
  970. fprintf( stderr, " title=" );
  971. dump_varargs_unicode_str( cur_size );
  972. }
  973. static void dump_append_console_input_history_request( const struct append_console_input_history_request *req )
  974. {
  975. fprintf( stderr, " handle=%p,", req->handle );
  976. fprintf( stderr, " line=" );
  977. dump_varargs_unicode_str( cur_size );
  978. }
  979. static void dump_get_console_input_history_request( const struct get_console_input_history_request *req )
  980. {
  981. fprintf( stderr, " handle=%p,", req->handle );
  982. fprintf( stderr, " index=%d", req->index );
  983. }
  984. static void dump_get_console_input_history_reply( const struct get_console_input_history_reply *req )
  985. {
  986. fprintf( stderr, " total=%d,", req->total );
  987. fprintf( stderr, " line=" );
  988. dump_varargs_unicode_str( cur_size );
  989. }
  990. static void dump_create_console_output_request( const struct create_console_output_request *req )
  991. {
  992. fprintf( stderr, " handle_in=%p,", req->handle_in );
  993. fprintf( stderr, " access=%d,", req->access );
  994. fprintf( stderr, " share=%d,", req->share );
  995. fprintf( stderr, " inherit=%d", req->inherit );
  996. }
  997. static void dump_create_console_output_reply( const struct create_console_output_reply *req )
  998. {
  999. fprintf( stderr, " handle_out=%p", req->handle_out );
  1000. }
  1001. static void dump_set_console_output_info_request( const struct set_console_output_info_request *req )
  1002. {
  1003. fprintf( stderr, " handle=%p,", req->handle );
  1004. fprintf( stderr, " mask=%d,", req->mask );
  1005. fprintf( stderr, " cursor_size=%d,", req->cursor_size );
  1006. fprintf( stderr, " cursor_visible=%d,", req->cursor_visible );
  1007. fprintf( stderr, " cursor_x=%d,", req->cursor_x );
  1008. fprintf( stderr, " cursor_y=%d,", req->cursor_y );
  1009. fprintf( stderr, " width=%d,", req->width );
  1010. fprintf( stderr, " height=%d,", req->height );
  1011. fprintf( stderr, " attr=%d,", req->attr );
  1012. fprintf( stderr, " win_left=%d,", req->win_left );
  1013. fprintf( stderr, " win_top=%d,", req->win_top );
  1014. fprintf( stderr, " win_right=%d,", req->win_right );
  1015. fprintf( stderr, " win_bottom=%d,", req->win_bottom );
  1016. fprintf( stderr, " max_width=%d,", req->max_width );
  1017. fprintf( stderr, " max_height=%d", req->max_height );
  1018. }
  1019. static void dump_get_console_output_info_request( const struct get_console_output_info_request *req )
  1020. {
  1021. fprintf( stderr, " handle=%p", req->handle );
  1022. }
  1023. static void dump_get_console_output_info_reply( const struct get_console_output_info_reply *req )
  1024. {
  1025. fprintf( stderr, " cursor_size=%d,", req->cursor_size );
  1026. fprintf( stderr, " cursor_visible=%d,", req->cursor_visible );
  1027. fprintf( stderr, " cursor_x=%d,", req->cursor_x );
  1028. fprintf( stderr, " cursor_y=%d,", req->cursor_y );
  1029. fprintf( stderr, " width=%d,", req->width );
  1030. fprintf( stderr, " height=%d,", req->height );
  1031. fprintf( stderr, " attr=%d,", req->attr );
  1032. fprintf( stderr, " win_left=%d,", req->win_left );
  1033. fprintf( stderr, " win_top=%d,", req->win_top );
  1034. fprintf( stderr, " win_right=%d,", req->win_right );
  1035. fprintf( stderr, " win_bottom=%d,", req->win_bottom );
  1036. fprintf( stderr, " max_width=%d,", req->max_width );
  1037. fprintf( stderr, " max_height=%d", req->max_height );
  1038. }
  1039. static void dump_write_console_input_request( const struct write_console_input_request *req )
  1040. {
  1041. fprintf( stderr, " handle=%p,", req->handle );
  1042. fprintf( stderr, " rec=" );
  1043. dump_varargs_input_records( cur_size );
  1044. }
  1045. static void dump_write_console_input_reply( const struct write_console_input_reply *req )
  1046. {
  1047. fprintf( stderr, " written=%d", req->written );
  1048. }
  1049. static void dump_read_console_input_request( const struct read_console_input_request *req )
  1050. {
  1051. fprintf( stderr, " handle=%p,", req->handle );
  1052. fprintf( stderr, " flush=%d", req->flush );
  1053. }
  1054. static void dump_read_console_input_reply( const struct read_console_input_reply *req )
  1055. {
  1056. fprintf( stderr, " read=%d,", req->read );
  1057. fprintf( stderr, " rec=" );
  1058. dump_varargs_input_records( cur_size );
  1059. }
  1060. static void dump_write_console_output_request( const struct write_console_output_request *req )
  1061. {
  1062. fprintf( stderr, " handle=%p,", req->handle );
  1063. fprintf( stderr, " x=%d,", req->x );
  1064. fprintf( stderr, " y=%d,", req->y );
  1065. fprintf( stderr, " mode=%d,", req->mode );
  1066. fprintf( stderr, " wrap=%d,", req->wrap );
  1067. fprintf( stderr, " data=" );
  1068. dump_varargs_bytes( cur_size );
  1069. }
  1070. static void dump_write_console_output_reply( const struct write_console_output_reply *req )
  1071. {
  1072. fprintf( stderr, " written=%d,", req->written );
  1073. fprintf( stderr, " width=%d,", req->width );
  1074. fprintf( stderr, " height=%d", req->height );
  1075. }
  1076. static void dump_fill_console_output_request( const struct fill_console_output_request *req )
  1077. {
  1078. fprintf( stderr, " handle=%p,", req->handle );
  1079. fprintf( stderr, " x=%d,", req->x );
  1080. fprintf( stderr, " y=%d,", req->y );
  1081. fprintf( stderr, " mode=%d,", req->mode );
  1082. fprintf( stderr, " count=%d,", req->count );
  1083. fprintf( stderr, " wrap=%d,", req->wrap );
  1084. fprintf( stderr, " data=" );
  1085. dump_char_info( &req->data );
  1086. }
  1087. static void dump_fill_console_output_reply( const struct fill_console_output_reply *req )
  1088. {
  1089. fprintf( stderr, " written=%d", req->written );
  1090. }
  1091. static void dump_read_console_output_request( const struct read_console_output_request *req )
  1092. {
  1093. fprintf( stderr, " handle=%p,", req->handle );
  1094. fprintf( stderr, " x=%d,", req->x );
  1095. fprintf( stderr, " y=%d,", req->y );
  1096. fprintf( stderr, " mode=%d,", req->mode );
  1097. fprintf( stderr, " wrap=%d", req->wrap );
  1098. }
  1099. static void dump_read_console_output_reply( const struct read_console_output_reply *req )
  1100. {
  1101. fprintf( stderr, " width=%d,", req->width );
  1102. fprintf( stderr, " height=%d,", req->height );
  1103. fprintf( stderr, " data=" );
  1104. dump_varargs_bytes( cur_size );
  1105. }
  1106. static void dump_move_console_output_request( const struct move_console_output_request *req )
  1107. {
  1108. fprintf( stderr, " handle=%p,", req->handle );
  1109. fprintf( stderr, " x_src=%d,", req->x_src );
  1110. fprintf( stderr, " y_src=%d,", req->y_src );
  1111. fprintf( stderr, " x_dst=%d,", req->x_dst );
  1112. fprintf( stderr, " y_dst=%d,", req->y_dst );
  1113. fprintf( stderr, " w=%d,", req->w );
  1114. fprintf( stderr, " h=%d", req->h );
  1115. }
  1116. static void dump_send_console_signal_request( const struct send_console_signal_request *req )
  1117. {
  1118. fprintf( stderr, " signal=%d,", req->signal );
  1119. fprintf( stderr, " group_id=%04x", req->group_id );
  1120. }
  1121. static void dump_create_change_notification_request( const struct create_change_notification_request *req )
  1122. {
  1123. fprintf( stderr, " handle=%p,", req->handle );
  1124. fprintf( stderr, " subtree=%d,", req->subtree );
  1125. fprintf( stderr, " filter=%08x", req->filter );
  1126. }
  1127. static void dump_create_change_notification_reply( const struct create_change_notification_reply *req )
  1128. {
  1129. fprintf( stderr, " handle=%p", req->handle );
  1130. }
  1131. static void dump_next_change_notification_request( const struct next_change_notification_request *req )
  1132. {
  1133. fprintf( stderr, " handle=%p", req->handle );
  1134. }
  1135. static void dump_create_mapping_request( const struct create_mapping_request *req )
  1136. {
  1137. fprintf( stderr, " size_high=%d,", req->size_high );
  1138. fprintf( stderr, " size_low=%d,", req->size_low );
  1139. fprintf( stderr, " protect=%d,", req->protect );
  1140. fprintf( stderr, " access=%08x,", req->access );
  1141. fprintf( stderr, " inherit=%d,", req->inherit );
  1142. fprintf( stderr, " file_handle=%p,", req->file_handle );
  1143. fprintf( stderr, " name=" );
  1144. dump_varargs_unicode_str( cur_size );
  1145. }
  1146. static void dump_create_mapping_reply( const struct create_mapping_reply *req )
  1147. {
  1148. fprintf( stderr, " handle=%p", req->handle );
  1149. }
  1150. static void dump_open_mapping_request( const struct open_mapping_request *req )
  1151. {
  1152. fprintf( stderr, " access=%08x,", req->access );
  1153. fprintf( stderr, " inherit=%d,", req->inherit );
  1154. fprintf( stderr, " name=" );
  1155. dump_varargs_unicode_str( cur_size );
  1156. }
  1157. static void dump_open_mapping_reply( const struct open_mapping_reply *req )
  1158. {
  1159. fprintf( stderr, " handle=%p", req->handle );
  1160. }
  1161. static void dump_get_mapping_info_request( const struct get_mapping_info_request *req )
  1162. {
  1163. fprintf( stderr, " handle=%p", req->handle );
  1164. }
  1165. static void dump_get_mapping_info_reply( const struct get_mapping_info_reply *req )
  1166. {
  1167. fprintf( stderr, " size_high=%d,", req->size_high );
  1168. fprintf( stderr, " size_low=%d,", req->size_low );
  1169. fprintf( stderr, " protect=%d,", req->protect );
  1170. fprintf( stderr, " header_size=%d,", req->header_size );
  1171. fprintf( stderr, " base=%p,", req->base );
  1172. fprintf( stderr, " shared_file=%p,", req->shared_file );
  1173. fprintf( stderr, " shared_size=%d", req->shared_size );
  1174. }
  1175. static void dump_create_snapshot_request( const struct create_snapshot_request *req )
  1176. {
  1177. fprintf( stderr, " inherit=%d,", req->inherit );
  1178. fprintf( stderr, " flags=%d,", req->flags );
  1179. fprintf( stderr, " pid=%04x", req->pid );
  1180. }
  1181. static void dump_create_snapshot_reply( const struct create_snapshot_reply *req )
  1182. {
  1183. fprintf( stderr, " handle=%p", req->handle );
  1184. }
  1185. static void dump_next_process_request( const struct next_process_request *req )
  1186. {
  1187. fprintf( stderr, " handle=%p,", req->handle );
  1188. fprintf( stderr, " reset=%d", req->reset );
  1189. }
  1190. static void dump_next_process_reply( const struct next_process_reply *req )
  1191. {
  1192. fprintf( stderr, " count=%d,", req->count );
  1193. fprintf( stderr, " pid=%04x,", req->pid );
  1194. fprintf( stderr, " ppid=%04x,", req->ppid );
  1195. fprintf( stderr, " heap=%p,", req->heap );
  1196. fprintf( stderr, " module=%p,", req->module );
  1197. fprintf( stderr, " threads=%d,", req->threads );
  1198. fprintf( stderr, " priority=%d,", req->priority );
  1199. fprintf( stderr, " handles=%d,", req->handles );
  1200. fprintf( stderr, " filename=" );
  1201. dump_varargs_unicode_str( cur_size );
  1202. }
  1203. static void dump_next_thread_request( const struct next_thread_request *req )
  1204. {
  1205. fprintf( stderr, " handle=%p,", req->handle );
  1206. fprintf( stderr, " reset=%d", req->reset );
  1207. }
  1208. static void dump_next_thread_reply( const struct next_thread_reply *req )
  1209. {
  1210. fprintf( stderr, " count=%d,", req->count );
  1211. fprintf( stderr, " pid=%04x,", req->pid );
  1212. fprintf( stderr, " tid=%04x,", req->tid );
  1213. fprintf( stderr, " base_pri=%d,", req->base_pri );
  1214. fprintf( stderr, " delta_pri=%d", req->delta_pri );
  1215. }
  1216. static void dump_next_module_request( const struct next_module_request *req )
  1217. {
  1218. fprintf( stderr, " handle=%p,", req->handle );
  1219. fprintf( stderr, " reset=%d", req->reset );
  1220. }
  1221. static void dump_next_module_reply( const struct next_module_reply *req )
  1222. {
  1223. fprintf( stderr, " pid=%04x,", req->pid );
  1224. fprintf( stderr, " base=%p,", req->base );
  1225. fprintf( stderr, " size=%d,", req->size );
  1226. fprintf( stderr, " filename=" );
  1227. dump_varargs_unicode_str( cur_size );
  1228. }
  1229. static void dump_wait_debug_event_request( const struct wait_debug_event_request *req )
  1230. {
  1231. fprintf( stderr, " get_handle=%d", req->get_handle );
  1232. }
  1233. static void dump_wait_debug_event_reply( const struct wait_debug_event_reply *req )
  1234. {
  1235. fprintf( stderr, " pid=%04x,", req->pid );
  1236. fprintf( stderr, " tid=%04x,", req->tid );
  1237. fprintf( stderr, " wait=%p,", req->wait );
  1238. fprintf( stderr, " event=" );
  1239. dump_varargs_debug_event( cur_size );
  1240. }
  1241. static void dump_queue_exception_event_request( const struct queue_exception_event_request *req )
  1242. {
  1243. fprintf( stderr, " first=%d,", req->first );
  1244. fprintf( stderr, " record=" );
  1245. dump_varargs_exc_event( cur_size );
  1246. }
  1247. static void dump_queue_exception_event_reply( const struct queue_exception_event_reply *req )
  1248. {
  1249. fprintf( stderr, " handle=%p", req->handle );
  1250. }
  1251. static void dump_get_exception_status_request( const struct get_exception_status_request *req )
  1252. {
  1253. fprintf( stderr, " handle=%p", req->handle );
  1254. }
  1255. static void dump_get_exception_status_reply( const struct get_exception_status_reply *req )
  1256. {
  1257. fprintf( stderr, " status=%d,", req->status );
  1258. fprintf( stderr, " context=" );
  1259. dump_varargs_context( cur_size );
  1260. }
  1261. static void dump_output_debug_string_request( const struct output_debug_string_request *req )
  1262. {
  1263. fprintf( stderr, " string=%p,", req->string );
  1264. fprintf( stderr, " unicode=%d,", req->unicode );
  1265. fprintf( stderr, " length=%d", req->length );
  1266. }
  1267. static void dump_continue_debug_event_request( const struct continue_debug_event_request *req )
  1268. {
  1269. fprintf( stderr, " pid=%04x,", req->pid );
  1270. fprintf( stderr, " tid=%04x,", req->tid );
  1271. fprintf( stderr, " status=%d", req->status );
  1272. }
  1273. static void dump_debug_process_request( const struct debug_process_request *req )
  1274. {
  1275. fprintf( stderr, " pid=%04x,", req->pid );
  1276. fprintf( stderr, " attach=%d", req->attach );
  1277. }
  1278. static void dump_debug_break_request( const struct debug_break_request *req )
  1279. {
  1280. fprintf( stderr, " handle=%p", req->handle );
  1281. }
  1282. static void dump_debug_break_reply( const struct debug_break_reply *req )
  1283. {
  1284. fprintf( stderr, " self=%d", req->self );
  1285. }
  1286. static void dump_set_debugger_kill_on_exit_request( const struct set_debugger_kill_on_exit_request *req )
  1287. {
  1288. fprintf( stderr, " kill_on_exit=%d", req->kill_on_exit );
  1289. }
  1290. static void dump_read_process_memory_request( const struct read_process_memory_request *req )
  1291. {
  1292. fprintf( stderr, " handle=%p,", req->handle );
  1293. fprintf( stderr, " addr=%p", req->addr );
  1294. }
  1295. static void dump_read_process_memory_reply( const struct read_process_memory_reply *req )
  1296. {
  1297. fprintf( stderr, " data=" );
  1298. dump_varargs_bytes( cur_size );
  1299. }
  1300. static void dump_write_process_memory_request( const struct write_process_memory_request *req )
  1301. {
  1302. fprintf( stderr, " handle=%p,", req->handle );
  1303. fprintf( stderr, " addr=%p,", req->addr );
  1304. fprintf( stderr, " first_mask=%08x,", req->first_mask );
  1305. fprintf( stderr, " last_mask=%08x,", req->last_mask );
  1306. fprintf( stderr, " data=" );
  1307. dump_varargs_bytes( cur_size );
  1308. }
  1309. static void dump_create_key_request( const struct create_key_request *req )
  1310. {
  1311. fprintf( stderr, " parent=%p,", req->parent );
  1312. fprintf( stderr, " access=%08x,", req->access );
  1313. fprintf( stderr, " options=%08x,", req->options );
  1314. fprintf( stderr, " modif=%ld,", (long)req->modif );
  1315. fprintf( stderr, " namelen=%d,", req->namelen );
  1316. fprintf( stderr, " name=" );
  1317. dump_varargs_unicode_str( min(cur_size,req->namelen) );
  1318. fputc( ',', stderr );
  1319. fprintf( stderr, " class=" );
  1320. dump_varargs_unicode_str( cur_size );
  1321. }
  1322. static void dump_create_key_reply( const struct create_key_reply *req )
  1323. {
  1324. fprintf( stderr, " hkey=%p,", req->hkey );
  1325. fprintf( stderr, " created=%d", req->created );
  1326. }
  1327. static void dump_open_key_request( const struct open_key_request *req )
  1328. {
  1329. fprintf( stderr, " parent=%p,", req->parent );
  1330. fprintf( stderr, " access=%08x,", req->access );
  1331. fprintf( stderr, " name=" );
  1332. dump_varargs_unicode_str( cur_size );
  1333. }
  1334. static void dump_open_key_reply( const struct open_key_reply *req )
  1335. {
  1336. fprintf( stderr, " hkey=%p", req->hkey );
  1337. }
  1338. static void dump_delete_key_request( const struct delete_key_request *req )
  1339. {
  1340. fprintf( stderr, " hkey=%p", req->hkey );
  1341. }
  1342. static void dump_flush_key_request( const struct flush_key_request *req )
  1343. {
  1344. fprintf( stderr, " hkey=%p", req->hkey );
  1345. }
  1346. static void dump_enum_key_request( const struct enum_key_request *req )
  1347. {
  1348. fprintf( stderr, " hkey=%p,", req->hkey );
  1349. fprintf( stderr, " index=%d,", req->index );
  1350. fprintf( stderr, " info_class=%d", req->info_class );
  1351. }
  1352. static void dump_enum_key_reply( const struct enum_key_reply *req )
  1353. {
  1354. fprintf( stderr, " subkeys=%d,", req->subkeys );
  1355. fprintf( stderr, " max_subkey=%d,", req->max_subkey );
  1356. fprintf( stderr, " max_class=%d,", req->max_class );
  1357. fprintf( stderr, " values=%d,", req->values );
  1358. fprintf( stderr, " max_value=%d,", req->max_value );
  1359. fprintf( stderr, " max_data=%d,", req->max_data );
  1360. fprintf( stderr, " modif=%ld,", (long)req->modif );
  1361. fprintf( stderr, " total=%d,", req->total );
  1362. fprintf( stderr, " namelen=%d,", req->namelen );
  1363. fprintf( stderr, " name=" );
  1364. dump_varargs_unicode_str( min(cur_size,req->namelen) );
  1365. fputc( ',', stderr );
  1366. fprintf( stderr, " class=" );
  1367. dump_varargs_unicode_str( cur_size );
  1368. }
  1369. static void dump_set_key_value_request( const struct set_key_value_request *req )
  1370. {
  1371. fprintf( stderr, " hkey=%p,", req->hkey );
  1372. fprintf( stderr, " type=%d,", req->type );
  1373. fprintf( stderr, " namelen=%d,", req->namelen );
  1374. fprintf( stderr, " name=" );
  1375. dump_varargs_unicode_str( min(cur_size,req->namelen) );
  1376. fputc( ',', stderr );
  1377. fprintf( stderr, " data=" );
  1378. dump_varargs_bytes( cur_size );
  1379. }
  1380. static void dump_get_key_value_request( const struct get_key_value_request *req )
  1381. {
  1382. fprintf( stderr, " hkey=%p,", req->hkey );
  1383. fprintf( stderr, " name=" );
  1384. dump_varargs_unicode_str( cur_size );
  1385. }
  1386. static void dump_get_key_value_reply( const struct get_key_value_reply *req )
  1387. {
  1388. fprintf( stderr, " type=%d,", req->type );
  1389. fprintf( stderr, " total=%d,", req->total );
  1390. fprintf( stderr, " data=" );
  1391. dump_varargs_bytes( cur_size );
  1392. }
  1393. static void dump_enum_key_value_request( const struct enum_key_value_request *req )
  1394. {
  1395. fprintf( stderr, " hkey=%p,", req->hkey );
  1396. fprintf( stderr, " index=%d,", req->index );
  1397. fprintf( stderr, " info_class=%d", req->info_class );
  1398. }
  1399. static void dump_enum_key_value_reply( const struct enum_key_value_reply *req )
  1400. {
  1401. fprintf( stderr, " type=%d,", req->type );
  1402. fprintf( stderr, " total=%d,", req->total );
  1403. fprintf( stderr, " namelen=%d,", req->namelen );
  1404. fprintf( stderr, " name=" );
  1405. dump_varargs_unicode_str( min(cur_size,req->namelen) );
  1406. fputc( ',', stderr );
  1407. fprintf( stderr, " data=" );
  1408. dump_varargs_bytes( cur_size );
  1409. }
  1410. static void dump_delete_key_value_request( const struct delete_key_value_request *req )
  1411. {
  1412. fprintf( stderr, " hkey=%p,", req->hkey );
  1413. fprintf( stderr, " name=" );
  1414. dump_varargs_unicode_str( cur_size );
  1415. }
  1416. static void dump_load_registry_request( const struct load_registry_request *req )
  1417. {
  1418. fprintf( stderr, " hkey=%p,", req->hkey );
  1419. fprintf( stderr, " file=%p,", req->file );
  1420. fprintf( stderr, " name=" );
  1421. dump_varargs_unicode_str( cur_size );
  1422. }
  1423. static void dump_unload_registry_request( const struct unload_registry_request *req )
  1424. {
  1425. fprintf( stderr, " hkey=%p", req->hkey );
  1426. }
  1427. static void dump_save_registry_request( const struct save_registry_request *req )
  1428. {
  1429. fprintf( stderr, " hkey=%p,", req->hkey );
  1430. fprintf( stderr, " file=%p", req->file );
  1431. }
  1432. static void dump_load_user_registries_request( const struct load_user_registries_request *req )
  1433. {
  1434. fprintf( stderr, " hkey=%p,", req->hkey );
  1435. fprintf( stderr, " saving=%d,", req->saving );
  1436. fprintf( stderr, " period=%d", req->period );
  1437. }
  1438. static void dump_set_registry_notification_request( const struct set_registry_notification_request *req )
  1439. {
  1440. fprintf( stderr, " hkey=%p,", req->hkey );
  1441. fprintf( stderr, " event=%p,", req->event );
  1442. fprintf( stderr, " subtree=%d,", req->subtree );
  1443. fprintf( stderr, " filter=%08x", req->filter );
  1444. }
  1445. static void dump_create_timer_request( const struct create_timer_request *req )
  1446. {
  1447. fprintf( stderr, " access=%08x,", req->access );
  1448. fprintf( stderr, " inherit=%d,", req->inherit );
  1449. fprintf( stderr, " manual=%d,", req->manual );
  1450. fprintf( stderr, " name=" );
  1451. dump_varargs_unicode_str( cur_size );
  1452. }
  1453. static void dump_create_timer_reply( const struct create_timer_reply *req )
  1454. {
  1455. fprintf( stderr, " handle=%p", req->handle );
  1456. }
  1457. static void dump_open_timer_request( const struct open_timer_request *req )
  1458. {
  1459. fprintf( stderr, " access=%08x,", req->access );
  1460. fprintf( stderr, " inherit=%d,", req->inherit );
  1461. fprintf( stderr, " name=" );
  1462. dump_varargs_unicode_str( cur_size );
  1463. }
  1464. static void dump_open_timer_reply( const struct open_timer_reply *req )
  1465. {
  1466. fprintf( stderr, " handle=%p", req->handle );
  1467. }
  1468. static void dump_set_timer_request( const struct set_timer_request *req )
  1469. {
  1470. fprintf( stderr, " handle=%p,", req->handle );
  1471. fprintf( stderr, " expire=" );
  1472. dump_abs_time( &req->expire );
  1473. fprintf( stderr, "," );
  1474. fprintf( stderr, " period=%d,", req->period );
  1475. fprintf( stderr, " callback=%p,", req->callback );
  1476. fprintf( stderr, " arg=%p", req->arg );
  1477. }
  1478. static void dump_set_timer_reply( const struct set_timer_reply *req )
  1479. {
  1480. fprintf( stderr, " signaled=%d", req->signaled );
  1481. }
  1482. static void dump_cancel_timer_request( const struct cancel_timer_request *req )
  1483. {
  1484. fprintf( stderr, " handle=%p", req->handle );
  1485. }
  1486. static void dump_cancel_timer_reply( const struct cancel_timer_reply *req )
  1487. {
  1488. fprintf( stderr, " signaled=%d", req->signaled );
  1489. }
  1490. static void dump_get_timer_info_request( const struct get_timer_info_request *req )
  1491. {
  1492. fprintf( stderr, " handle=%p", req->handle );
  1493. }
  1494. static void dump_get_timer_info_reply( const struct get_timer_info_reply *req )
  1495. {
  1496. fprintf( stderr, " when=" );
  1497. dump_abs_time( &req->when );
  1498. fprintf( stderr, "," );
  1499. fprintf( stderr, " signaled=%d", req->signaled );
  1500. }
  1501. static void dump_get_thread_context_request( const struct get_thread_context_request *req )
  1502. {
  1503. fprintf( stderr, " handle=%p,", req->handle );
  1504. fprintf( stderr, " flags=%08x", req->flags );
  1505. }
  1506. static void dump_get_thread_context_reply( const struct get_thread_context_reply *req )
  1507. {
  1508. fprintf( stderr, " context=" );
  1509. dump_varargs_context( cur_size );
  1510. }
  1511. static void dump_set_thread_context_request( const struct set_thread_context_request *req )
  1512. {
  1513. fprintf( stderr, " handle=%p,", req->handle );
  1514. fprintf( stderr, " flags=%08x,", req->flags );
  1515. fprintf( stderr, " context=" );
  1516. dump_varargs_context( cur_size );
  1517. }
  1518. static void dump_get_selector_entry_request( const struct get_selector_entry_request *req )
  1519. {
  1520. fprintf( stderr, " handle=%p,", req->handle );
  1521. fprintf( stderr, " entry=%d", req->entry );
  1522. }
  1523. static void dump_get_selector_entry_reply( const struct get_selector_entry_reply *req )
  1524. {
  1525. fprintf( stderr, " base=%08x,", req->base );
  1526. fprintf( stderr, " limit=%08x,", req->limit );
  1527. fprintf( stderr, " flags=%02x", req->flags );
  1528. }
  1529. static void dump_add_atom_request( const struct add_atom_request *req )
  1530. {
  1531. fprintf( stderr, " local=%d,", req->local );
  1532. fprintf( stderr, " name=" );
  1533. dump_varargs_unicode_str( cur_size );
  1534. }
  1535. static void dump_add_atom_reply( const struct add_atom_reply *req )
  1536. {
  1537. fprintf( stderr, " atom=%04x", req->atom );
  1538. }
  1539. static void dump_delete_atom_request( const struct delete_atom_request *req )
  1540. {
  1541. fprintf( stderr, " atom=%04x,", req->atom );
  1542. fprintf( stderr, " local=%d", req->local );
  1543. }
  1544. static void dump_find_atom_request( const struct find_atom_request *req )
  1545. {
  1546. fprintf( stderr, " local=%d,", req->local );
  1547. fprintf( stderr, " name=" );
  1548. dump_varargs_unicode_str( cur_size );
  1549. }
  1550. static void dump_find_atom_reply( const struct find_atom_reply *req )
  1551. {
  1552. fprintf( stderr, " atom=%04x", req->atom );
  1553. }
  1554. static void dump_get_atom_name_request( const struct get_atom_name_request *req )
  1555. {
  1556. fprintf( stderr, " atom=%04x,", req->atom );
  1557. fprintf( stderr, " local=%d", req->local );
  1558. }
  1559. static void dump_get_atom_name_reply( const struct get_atom_name_reply *req )
  1560. {
  1561. fprintf( stderr, " count=%d,", req->count );
  1562. fprintf( stderr, " name=" );
  1563. dump_varargs_unicode_str( cur_size );
  1564. }
  1565. static void dump_init_atom_table_request( const struct init_atom_table_request *req )
  1566. {
  1567. fprintf( stderr, " entries=%d", req->entries );
  1568. }
  1569. static void dump_get_msg_queue_request( const struct get_msg_queue_request *req )
  1570. {
  1571. }
  1572. static void dump_get_msg_queue_reply( const struct get_msg_queue_reply *req )
  1573. {
  1574. fprintf( stderr, " handle=%p", req->handle );
  1575. }
  1576. static void dump_set_queue_mask_request( const struct set_queue_mask_request *req )
  1577. {
  1578. fprintf( stderr, " wake_mask=%08x,", req->wake_mask );
  1579. fprintf( stderr, " changed_mask=%08x,", req->changed_mask );
  1580. fprintf( stderr, " skip_wait=%d", req->skip_wait );
  1581. }
  1582. static void dump_set_queue_mask_reply( const struct set_queue_mask_reply *req )
  1583. {
  1584. fprintf( stderr, " wake_bits=%08x,", req->wake_bits );
  1585. fprintf( stderr, " changed_bits=%08x", req->changed_bits );
  1586. }
  1587. static void dump_get_queue_status_request( const struct get_queue_status_request *req )
  1588. {
  1589. fprintf( stderr, " clear=%d", req->clear );
  1590. }
  1591. static void dump_get_queue_status_reply( const struct get_queue_status_reply *req )
  1592. {
  1593. fprintf( stderr, " wake_bits=%08x,", req->wake_bits );
  1594. fprintf( stderr, " changed_bits=%08x", req->changed_bits );
  1595. }
  1596. static void dump_wait_input_idle_request( const struct wait_input_idle_request *req )
  1597. {
  1598. fprintf( stderr, " handle=%p,", req->handle );
  1599. fprintf( stderr, " timeout=%d", req->timeout );
  1600. }
  1601. static void dump_wait_input_idle_reply( const struct wait_input_idle_reply *req )
  1602. {
  1603. fprintf( stderr, " event=%p", req->event );
  1604. }
  1605. static void dump_send_message_request( const struct send_message_request *req )
  1606. {
  1607. fprintf( stderr, " id=%04x,", req->id );
  1608. fprintf( stderr, " type=%d,", req->type );
  1609. fprintf( stderr, " flags=%d,", req->flags );
  1610. fprintf( stderr, " win=%p,", req->win );
  1611. fprintf( stderr, " msg=%08x,", req->msg );
  1612. fprintf( stderr, " wparam=%08x,", req->wparam );
  1613. fprintf( stderr, " lparam=%08x,", req->lparam );
  1614. fprintf( stderr, " x=%d,", req->x );
  1615. fprintf( stderr, " y=%d,", req->y );
  1616. fprintf( stderr, " time=%08x,", req->time );
  1617. fprintf( stderr, " info=%08x,", req->info );
  1618. fprintf( stderr, " timeout=%d,", req->timeout );
  1619. fprintf( stderr, " callback=%p,", req->callback );
  1620. fprintf( stderr, " data=" );
  1621. dump_varargs_bytes( cur_size );
  1622. }
  1623. static void dump_get_message_request( const struct get_message_request *req )
  1624. {
  1625. fprintf( stderr, " flags=%d,", req->flags );
  1626. fprintf( stderr, " get_win=%p,", req->get_win );
  1627. fprintf( stderr, " get_first=%08x,", req->get_first );
  1628. fprintf( stderr, " get_last=%08x", req->get_last );
  1629. }
  1630. static void dump_get_message_reply( const struct get_message_reply *req )
  1631. {
  1632. fprintf( stderr, " type=%d,", req->type );
  1633. fprintf( stderr, " win=%p,", req->win );
  1634. fprintf( stderr, " msg=%08x,", req->msg );
  1635. fprintf( stderr, " wparam=%08x,", req->wparam );
  1636. fprintf( stderr, " lparam=%08x,", req->lparam );
  1637. fprintf( stderr, " x=%d,", req->x );
  1638. fprintf( stderr, " y=%d,", req->y );
  1639. fprintf( stderr, " hook=%p,", req->hook );
  1640. fprintf( stderr, " hook_proc=%p,", req->hook_proc );
  1641. fprintf( stderr, " time=%08x,", req->time );
  1642. fprintf( stderr, " info=%08x,", req->info );
  1643. fprintf( stderr, " total=%d,", req->total );
  1644. fprintf( stderr, " data=" );
  1645. dump_varargs_bytes( cur_size );
  1646. }
  1647. static void dump_reply_message_request( const struct reply_message_request *req )
  1648. {
  1649. fprintf( stderr, " type=%d,", req->type );
  1650. fprintf( stderr, " result=%08x,", req->result );
  1651. fprintf( stderr, " remove=%d,", req->remove );
  1652. fprintf( stderr, " data=" );
  1653. dump_varargs_bytes( cur_size );
  1654. }
  1655. static void dump_get_message_reply_request( const struct get_message_reply_request *req )
  1656. {
  1657. fprintf( stderr, " cancel=%d", req->cancel );
  1658. }
  1659. static void dump_get_message_reply_reply( const struct get_message_reply_reply *req )
  1660. {
  1661. fprintf( stderr, " result=%08x,", req->result );
  1662. fprintf( stderr, " data=" );
  1663. dump_varargs_bytes( cur_size );
  1664. }
  1665. static void dump_set_win_timer_request( const struct set_win_timer_request *req )
  1666. {
  1667. fprintf( stderr, " win=%p,", req->win );
  1668. fprintf( stderr, " msg=%08x,", req->msg );
  1669. fprintf( stderr, " id=%08x,", req->id );
  1670. fprintf( stderr, " rate=%08x,", req->rate );
  1671. fprintf( stderr, " lparam=%08x", req->lparam );
  1672. }
  1673. static void dump_set_win_timer_reply( const struct set_win_timer_reply *req )
  1674. {
  1675. fprintf( stderr, " id=%08x", req->id );
  1676. }
  1677. static void dump_kill_win_timer_request( const struct kill_win_timer_request *req )
  1678. {
  1679. fprintf( stderr, " win=%p,", req->win );
  1680. fprintf( stderr, " msg=%08x,", req->msg );
  1681. fprintf( stderr, " id=%08x", req->id );
  1682. }
  1683. static void dump_get_serial_info_request( const struct get_serial_info_request *req )
  1684. {
  1685. fprintf( stderr, " handle=%p", req->handle );
  1686. }
  1687. static void dump_get_serial_info_reply( const struct get_serial_info_reply *req )
  1688. {
  1689. fprintf( stderr, " readinterval=%08x,", req->readinterval );
  1690. fprintf( stderr, " readconst=%08x,", req->readconst );
  1691. fprintf( stderr, " readmult=%08x,", req->readmult );
  1692. fprintf( stderr, " writeconst=%08x,", req->writeconst );
  1693. fprintf( stderr, " writemult=%08x,", req->writemult );
  1694. fprintf( stderr, " eventmask=%08x,", req->eventmask );
  1695. fprintf( stderr, " commerror=%08x", req->commerror );
  1696. }
  1697. static void dump_set_serial_info_request( const struct set_serial_info_request *req )
  1698. {
  1699. fprintf( stderr, " handle=%p,", req->handle );
  1700. fprintf( stderr, " flags=%d,", req->flags );
  1701. fprintf( stderr, " readinterval=%08x,", req->readinterval );
  1702. fprintf( stderr, " readconst=%08x,", req->readconst );
  1703. fprintf( stderr, " readmult=%08x,", req->readmult );
  1704. fprintf( stderr, " writeconst=%08x,", req->writeconst );
  1705. fprintf( stderr, " writemult=%08x,", req->writemult );
  1706. fprintf( stderr, " eventmask=%08x,", req->eventmask );
  1707. fprintf( stderr, " commerror=%08x", req->commerror );
  1708. }
  1709. static void dump_register_async_request( const struct register_async_request *req )
  1710. {
  1711. fprintf( stderr, " handle=%p,", req->handle );
  1712. fprintf( stderr, " type=%d,", req->type );
  1713. fprintf( stderr, " io_apc=%p,", req->io_apc );
  1714. fprintf( stderr, " io_sb=%p,", req->io_sb );
  1715. fprintf( stderr, " io_user=%p,", req->io_user );
  1716. fprintf( stderr, " count=%d", req->count );
  1717. }
  1718. static void dump_cancel_async_request( const struct cancel_async_request *req )
  1719. {
  1720. fprintf( stderr, " handle=%p", req->handle );
  1721. }
  1722. static void dump_create_named_pipe_request( const struct create_named_pipe_request *req )
  1723. {
  1724. fprintf( stderr, " openmode=%08x,", req->openmode );
  1725. fprintf( stderr, " pipemode=%08x,", req->pipemode );
  1726. fprintf( stderr, " maxinstances=%08x,", req->maxinstances );
  1727. fprintf( stderr, " outsize=%08x,", req->outsize );
  1728. fprintf( stderr, " insize=%08x,", req->insize );
  1729. fprintf( stderr, " timeout=%08x,", req->timeout );
  1730. fprintf( stderr, " inherit=%d,", req->inherit );
  1731. fprintf( stderr, " name=" );
  1732. dump_varargs_unicode_str( cur_size );
  1733. }
  1734. static void dump_create_named_pipe_reply( const struct create_named_pipe_reply *req )
  1735. {
  1736. fprintf( stderr, " handle=%p", req->handle );
  1737. }
  1738. static void dump_open_named_pipe_request( const struct open_named_pipe_request *req )
  1739. {
  1740. fprintf( stderr, " access=%08x,", req->access );
  1741. fprintf( stderr, " inherit=%d,", req->inherit );
  1742. fprintf( stderr, " name=" );
  1743. dump_varargs_unicode_str( cur_size );
  1744. }
  1745. static void dump_open_named_pipe_reply( const struct open_named_pipe_reply *req )
  1746. {
  1747. fprintf( stderr, " handle=%p", req->handle );
  1748. }
  1749. static void dump_connect_named_pipe_request( const struct connect_named_pipe_request *req )
  1750. {
  1751. fprintf( stderr, " handle=%p,", req->handle );
  1752. fprintf( stderr, " overlapped=%p,", req->overlapped );
  1753. fprintf( stderr, " func=%p", req->func );
  1754. }
  1755. static void dump_wait_named_pipe_request( const struct wait_named_pipe_request *req )
  1756. {
  1757. fprintf( stderr, " timeout=%08x,", req->timeout );
  1758. fprintf( stderr, " overlapped=%p,", req->overlapped );
  1759. fprintf( stderr, " func=%p,", req->func );
  1760. fprintf( stderr, " name=" );
  1761. dump_varargs_unicode_str( cur_size );
  1762. }
  1763. static void dump_disconnect_named_pipe_request( const struct disconnect_named_pipe_request *req )
  1764. {
  1765. fprintf( stderr, " handle=%p", req->handle );
  1766. }
  1767. static void dump_disconnect_named_pipe_reply( const struct disconnect_named_pipe_reply *req )
  1768. {
  1769. fprintf( stderr, " fd=%d", req->fd );
  1770. }
  1771. static void dump_get_named_pipe_info_request( const struct get_named_pipe_info_request *req )
  1772. {
  1773. fprintf( stderr, " handle=%p", req->handle );
  1774. }
  1775. static void dump_get_named_pipe_info_reply( const struct get_named_pipe_info_reply *req )
  1776. {
  1777. fprintf( stderr, " flags=%08x,", req->flags );
  1778. fprintf( stderr, " maxinstances=%08x,", req->maxinstances );
  1779. fprintf( stderr, " outsize=%08x,", req->outsize );
  1780. fprintf( stderr, " insize=%08x", req->insize );
  1781. }
  1782. static void dump_create_window_request( const struct create_window_request *req )
  1783. {
  1784. fprintf( stderr, " parent=%p,", req->parent );
  1785. fprintf( stderr, " owner=%p,", req->owner );
  1786. fprintf( stderr, " atom=%04x,", req->atom );
  1787. fprintf( stderr, " instance=%p", req->instance );
  1788. }
  1789. static void dump_create_window_reply( const struct create_window_reply *req )
  1790. {
  1791. fprintf( stderr, " handle=%p,", req->handle );
  1792. fprintf( stderr, " extra=%d,", req->extra );
  1793. fprintf( stderr, " class_ptr=%p", req->class_ptr );
  1794. }
  1795. static void dump_link_window_request( const struct link_window_request *req )
  1796. {
  1797. fprintf( stderr, " handle=%p,", req->handle );
  1798. fprintf( stderr, " parent=%p,", req->parent );
  1799. fprintf( stderr, " previous=%p", req->previous );
  1800. }
  1801. static void dump_link_window_reply( const struct link_window_reply *req )
  1802. {
  1803. fprintf( stderr, " full_parent=%p", req->full_parent );
  1804. }
  1805. static void dump_destroy_window_request( const struct destroy_window_request *req )
  1806. {
  1807. fprintf( stderr, " handle=%p", req->handle );
  1808. }
  1809. static void dump_set_window_owner_request( const struct set_window_owner_request *req )
  1810. {
  1811. fprintf( stderr, " handle=%p,", req->handle );
  1812. fprintf( stderr, " owner=%p", req->owner );
  1813. }
  1814. static void dump_set_window_owner_reply( const struct set_window_owner_reply *req )
  1815. {
  1816. fprintf( stderr, " full_owner=%p,", req->full_owner );
  1817. fprintf( stderr, " prev_owner=%p", req->prev_owner );
  1818. }
  1819. static void dump_get_window_info_request( const struct get_window_info_request *req )
  1820. {
  1821. fprintf( stderr, " handle=%p", req->handle );
  1822. }
  1823. static void dump_get_window_info_reply( const struct get_window_info_reply *req )
  1824. {
  1825. fprintf( stderr, " full_handle=%p,", req->full_handle );
  1826. fprintf( stderr, " last_active=%p,", req->last_active );
  1827. fprintf( stderr, " pid=%04x,", req->pid );
  1828. fprintf( stderr, " tid=%04x,", req->tid );
  1829. fprintf( stderr, " atom=%04x", req->atom );
  1830. }
  1831. static void dump_set_window_info_request( const struct set_window_info_request *req )
  1832. {
  1833. fprintf( stderr, " handle=%p,", req->handle );
  1834. fprintf( stderr, " flags=%08x,", req->flags );
  1835. fprintf( stderr, " style=%08x,", req->style );
  1836. fprintf( stderr, " ex_style=%08x,", req->ex_style );
  1837. fprintf( stderr, " id=%08x,", req->id );
  1838. fprintf( stderr, " instance=%p,", req->instance );
  1839. fprintf( stderr, " user_data=%p,", req->user_data );
  1840. fprintf( stderr, " extra_offset=%d,", req->extra_offset );
  1841. fprintf( stderr, " extra_size=%d,", req->extra_size );
  1842. fprintf( stderr, " extra_value=%08x", req->extra_value );
  1843. }
  1844. static void dump_set_window_info_reply( const struct set_window_info_reply *req )
  1845. {
  1846. fprintf( stderr, " old_style=%08x,", req->old_style );
  1847. fprintf( stderr, " old_ex_style=%08x,", req->old_ex_style );
  1848. fprintf( stderr, " old_id=%08x,", req->old_id );
  1849. fprintf( stderr, " old_instance=%p,", req->old_instance );
  1850. fprintf( stderr, " old_user_data=%p,", req->old_user_data );
  1851. fprintf( stderr, " old_extra_value=%08x", req->old_extra_value );
  1852. }
  1853. static void dump_get_window_parents_request( const struct get_window_parents_request *req )
  1854. {
  1855. fprintf( stderr, " handle=%p", req->handle );
  1856. }
  1857. static void dump_get_window_parents_reply( const struct get_window_parents_reply *req )
  1858. {
  1859. fprintf( stderr, " count=%d,", req->count );
  1860. fprintf( stderr, " parents=" );
  1861. dump_varargs_user_handles( cur_size );
  1862. }
  1863. static void dump_get_window_children_request( const struct get_window_children_request *req )
  1864. {
  1865. fprintf( stderr, " parent=%p,", req->parent );
  1866. fprintf( stderr, " atom=%04x,", req->atom );
  1867. fprintf( stderr, " tid=%04x", req->tid );
  1868. }
  1869. static void dump_get_window_children_reply( const struct get_window_children_reply *req )
  1870. {
  1871. fprintf( stderr, " count=%d,", req->count );
  1872. fprintf( stderr, " children=" );
  1873. dump_varargs_user_handles( cur_size );
  1874. }
  1875. static void dump_get_window_children_from_point_request( const struct get_window_children_from_point_request *req )
  1876. {
  1877. fprintf( stderr, " parent=%p,", req->parent );
  1878. fprintf( stderr, " x=%d,", req->x );
  1879. fprintf( stderr, " y=%d", req->y );
  1880. }
  1881. static void dump_get_window_children_from_point_reply( const struct get_window_children_from_point_reply *req )
  1882. {
  1883. fprintf( stderr, " count=%d,", req->count );
  1884. fprintf( stderr, " children=" );
  1885. dump_varargs_user_handles( cur_size );
  1886. }
  1887. static void dump_get_window_tree_request( const struct get_window_tree_request *req )
  1888. {
  1889. fprintf( stderr, " handle=%p", req->handle );
  1890. }
  1891. static void dump_get_window_tree_reply( const struct get_window_tree_reply *req )
  1892. {
  1893. fprintf( stderr, " parent=%p,", req->parent );
  1894. fprintf( stderr, " owner=%p,", req->owner );
  1895. fprintf( stderr, " next_sibling=%p,", req->next_sibling );
  1896. fprintf( stderr, " prev_sibling=%p,", req->prev_sibling );
  1897. fprintf( stderr, " first_sibling=%p,", req->first_sibling );
  1898. fprintf( stderr, " last_sibling=%p,", req->last_sibling );
  1899. fprintf( stderr, " first_child=%p,", req->first_child );
  1900. fprintf( stderr, " last_child=%p", req->last_child );
  1901. }
  1902. static void dump_set_window_pos_request( const struct set_window_pos_request *req )
  1903. {
  1904. fprintf( stderr, " handle=%p,", req->handle );
  1905. fprintf( stderr, " top_win=%p,", req->top_win );
  1906. fprintf( stderr, " previous=%p,", req->previous );
  1907. fprintf( stderr, " flags=%08x,", req->flags );
  1908. fprintf( stderr, " window=" );
  1909. dump_rectangle( &req->window );
  1910. fprintf( stderr, "," );
  1911. fprintf( stderr, " client=" );
  1912. dump_rectangle( &req->client );
  1913. fprintf( stderr, "," );
  1914. fprintf( stderr, " valid=" );
  1915. dump_varargs_rectangles( cur_size );
  1916. }
  1917. static void dump_set_window_pos_reply( const struct set_window_pos_reply *req )
  1918. {
  1919. fprintf( stderr, " new_style=%08x", req->new_style );
  1920. }
  1921. static void dump_get_window_rectangles_request( const struct get_window_rectangles_request *req )
  1922. {
  1923. fprintf( stderr, " handle=%p", req->handle );
  1924. }
  1925. static void dump_get_window_rectangles_reply( const struct get_window_rectangles_reply *req )
  1926. {
  1927. fprintf( stderr, " window=" );
  1928. dump_rectangle( &req->window );
  1929. fprintf( stderr, "," );
  1930. fprintf( stderr, " client=" );
  1931. dump_rectangle( &req->client );
  1932. }
  1933. static void dump_get_window_text_request( const struct get_window_text_request *req )
  1934. {
  1935. fprintf( stderr, " handle=%p", req->handle );
  1936. }
  1937. static void dump_get_window_text_reply( const struct get_window_text_reply *req )
  1938. {
  1939. fprintf( stderr, " text=" );
  1940. dump_varargs_unicode_str( cur_size );
  1941. }
  1942. static void dump_set_window_text_request( const struct set_window_text_request *req )
  1943. {
  1944. fprintf( stderr, " handle=%p,", req->handle );
  1945. fprintf( stderr, " text=" );
  1946. dump_varargs_unicode_str( cur_size );
  1947. }
  1948. static void dump_get_windows_offset_request( const struct get_windows_offset_request *req )
  1949. {
  1950. fprintf( stderr, " from=%p,", req->from );
  1951. fprintf( stderr, " to=%p", req->to );
  1952. }
  1953. static void dump_get_windows_offset_reply( const struct get_windows_offset_reply *req )
  1954. {
  1955. fprintf( stderr, " x=%d,", req->x );
  1956. fprintf( stderr, " y=%d", req->y );
  1957. }
  1958. static void dump_get_visible_region_request( const struct get_visible_region_request *req )
  1959. {
  1960. fprintf( stderr, " window=%p,", req->window );
  1961. fprintf( stderr, " top_win=%p,", req->top_win );
  1962. fprintf( stderr, " flags=%08x", req->flags );
  1963. }
  1964. static void dump_get_visible_region_reply( const struct get_visible_region_reply *req )
  1965. {
  1966. fprintf( stderr, " total_size=%d,", req->total_size );
  1967. fprintf( stderr, " region=" );
  1968. dump_varargs_rectangles( cur_size );
  1969. }
  1970. static void dump_get_window_region_request( const struct get_window_region_request *req )
  1971. {
  1972. fprintf( stderr, " window=%p", req->window );
  1973. }
  1974. static void dump_get_window_region_reply( const struct get_window_region_reply *req )
  1975. {
  1976. fprintf( stderr, " total_size=%d,", req->total_size );
  1977. fprintf( stderr, " region=" );
  1978. dump_varargs_rectangles( cur_size );
  1979. }
  1980. static void dump_set_window_region_request( const struct set_window_region_request *req )
  1981. {
  1982. fprintf( stderr, " window=%p,", req->window );
  1983. fprintf( stderr, " region=" );
  1984. dump_varargs_rectangles( cur_size );
  1985. }
  1986. static void dump_get_update_region_request( const struct get_update_region_request *req )
  1987. {
  1988. fprintf( stderr, " window=%p,", req->window );
  1989. fprintf( stderr, " flags=%08x", req->flags );
  1990. }
  1991. static void dump_get_update_region_reply( const struct get_update_region_reply *req )
  1992. {
  1993. fprintf( stderr, " child=%p,", req->child );
  1994. fprintf( stderr, " flags=%08x,", req->flags );
  1995. fprintf( stderr, " total_size=%d,", req->total_size );
  1996. fprintf( stderr, " region=" );
  1997. dump_varargs_rectangles( cur_size );
  1998. }
  1999. static void dump_redraw_window_request( const struct redraw_window_request *req )
  2000. {
  2001. fprintf( stderr, " window=%p,", req->window );
  2002. fprintf( stderr, " flags=%08x,", req->flags );
  2003. fprintf( stderr, " region=" );
  2004. dump_varargs_rectangles( cur_size );
  2005. }
  2006. static void dump_set_window_property_request( const struct set_window_property_request *req )
  2007. {
  2008. fprintf( stderr, " window=%p,", req->window );
  2009. fprintf( stderr, " atom=%04x,", req->atom );
  2010. fprintf( stderr, " string=%d,", req->string );
  2011. fprintf( stderr, " handle=%p", req->handle );
  2012. }
  2013. static void dump_remove_window_property_request( const struct remove_window_property_request *req )
  2014. {
  2015. fprintf( stderr, " window=%p,", req->window );
  2016. fprintf( stderr, " atom=%04x", req->atom );
  2017. }
  2018. static void dump_remove_window_property_reply( const struct remove_window_property_reply *req )
  2019. {
  2020. fprintf( stderr, " handle=%p", req->handle );
  2021. }
  2022. static void dump_get_window_property_request( const struct get_window_property_request *req )
  2023. {
  2024. fprintf( stderr, " window=%p,", req->window );
  2025. fprintf( stderr, " atom=%04x", req->atom );
  2026. }
  2027. static void dump_get_window_property_reply( const struct get_window_property_reply *req )
  2028. {
  2029. fprintf( stderr, " handle=%p", req->handle );
  2030. }
  2031. static void dump_get_window_properties_request( const struct get_window_properties_request *req )
  2032. {
  2033. fprintf( stderr, " window=%p", req->window );
  2034. }
  2035. static void dump_get_window_properties_reply( const struct get_window_properties_reply *req )
  2036. {
  2037. fprintf( stderr, " total=%d,", req->total );
  2038. fprintf( stderr, " props=" );
  2039. dump_varargs_properties( cur_size );
  2040. }
  2041. static void dump_attach_thread_input_request( const struct attach_thread_input_request *req )
  2042. {
  2043. fprintf( stderr, " tid_from=%04x,", req->tid_from );
  2044. fprintf( stderr, " tid_to=%04x,", req->tid_to );
  2045. fprintf( stderr, " attach=%d", req->attach );
  2046. }
  2047. static void dump_get_thread_input_request( const struct get_thread_input_request *req )
  2048. {
  2049. fprintf( stderr, " tid=%04x", req->tid );
  2050. }
  2051. static void dump_get_thread_input_reply( const struct get_thread_input_reply *req )
  2052. {
  2053. fprintf( stderr, " focus=%p,", req->focus );
  2054. fprintf( stderr, " capture=%p,", req->capture );
  2055. fprintf( stderr, " active=%p,", req->active );
  2056. fprintf( stderr, " foreground=%p,", req->foreground );
  2057. fprintf( stderr, " menu_owner=%p,", req->menu_owner );
  2058. fprintf( stderr, " move_size=%p,", req->move_size );
  2059. fprintf( stderr, " caret=%p,", req->caret );
  2060. fprintf( stderr, " rect=" );
  2061. dump_rectangle( &req->rect );
  2062. }
  2063. static void dump_get_key_state_request( const struct get_key_state_request *req )
  2064. {
  2065. fprintf( stderr, " tid=%04x,", req->tid );
  2066. fprintf( stderr, " key=%d", req->key );
  2067. }
  2068. static void dump_get_key_state_reply( const struct get_key_state_reply *req )
  2069. {
  2070. fprintf( stderr, " state=%02x,", req->state );
  2071. fprintf( stderr, " keystate=" );
  2072. dump_varargs_bytes( cur_size );
  2073. }
  2074. static void dump_set_key_state_request( const struct set_key_state_request *req )
  2075. {
  2076. fprintf( stderr, " tid=%04x,", req->tid );
  2077. fprintf( stderr, " keystate=" );
  2078. dump_varargs_bytes( cur_size );
  2079. }
  2080. static void dump_set_foreground_window_request( const struct set_foreground_window_request *req )
  2081. {
  2082. fprintf( stderr, " handle=%p", req->handle );
  2083. }
  2084. static void dump_set_foreground_window_reply( const struct set_foreground_window_reply *req )
  2085. {
  2086. fprintf( stderr, " previous=%p,", req->previous );
  2087. fprintf( stderr, " send_msg_old=%d,", req->send_msg_old );
  2088. fprintf( stderr, " send_msg_new=%d", req->send_msg_new );
  2089. }
  2090. static void dump_set_focus_window_request( const struct set_focus_window_request *req )
  2091. {
  2092. fprintf( stderr, " handle=%p", req->handle );
  2093. }
  2094. static void dump_set_focus_window_reply( const struct set_focus_window_reply *req )
  2095. {
  2096. fprintf( stderr, " previous=%p", req->previous );
  2097. }
  2098. static void dump_set_active_window_request( const struct set_active_window_request *req )
  2099. {
  2100. fprintf( stderr, " handle=%p", req->handle );
  2101. }
  2102. static void dump_set_active_window_reply( const struct set_active_window_reply *req )
  2103. {
  2104. fprintf( stderr, " previous=%p", req->previous );
  2105. }
  2106. static void dump_set_capture_window_request( const struct set_capture_window_request *req )
  2107. {
  2108. fprintf( stderr, " handle=%p,", req->handle );
  2109. fprintf( stderr, " flags=%08x", req->flags );
  2110. }
  2111. static void dump_set_capture_window_reply( const struct set_capture_window_reply *req )
  2112. {
  2113. fprintf( stderr, " previous=%p,", req->previous );
  2114. fprintf( stderr, " full_handle=%p", req->full_handle );
  2115. }
  2116. static void dump_set_caret_window_request( const struct set_caret_window_request *req )
  2117. {
  2118. fprintf( stderr, " handle=%p,", req->handle );
  2119. fprintf( stderr, " width=%d,", req->width );
  2120. fprintf( stderr, " height=%d", req->height );
  2121. }
  2122. static void dump_set_caret_window_reply( const struct set_caret_window_reply *req )
  2123. {
  2124. fprintf( stderr, " previous=%p,", req->previous );
  2125. fprintf( stderr, " old_rect=" );
  2126. dump_rectangle( &req->old_rect );
  2127. fprintf( stderr, "," );
  2128. fprintf( stderr, " old_hide=%d,", req->old_hide );
  2129. fprintf( stderr, " old_state=%d", req->old_state );
  2130. }
  2131. static void dump_set_caret_info_request( const struct set_caret_info_request *req )
  2132. {
  2133. fprintf( stderr, " flags=%08x,", req->flags );
  2134. fprintf( stderr, " handle=%p,", req->handle );
  2135. fprintf( stderr, " x=%d,", req->x );
  2136. fprintf( stderr, " y=%d,", req->y );
  2137. fprintf( stderr, " hide=%d,", req->hide );
  2138. fprintf( stderr, " state=%d", req->state );
  2139. }
  2140. static void dump_set_caret_info_reply( const struct set_caret_info_reply *req )
  2141. {
  2142. fprintf( stderr, " full_handle=%p,", req->full_handle );
  2143. fprintf( stderr, " old_rect=" );
  2144. dump_rectangle( &req->old_rect );
  2145. fprintf( stderr, "," );
  2146. fprintf( stderr, " old_hide=%d,", req->old_hide );
  2147. fprintf( stderr, " old_state=%d", req->old_state );
  2148. }
  2149. static void dump_set_hook_request( const struct set_hook_request *req )
  2150. {
  2151. fprintf( stderr, " id=%d,", req->id );
  2152. fprintf( stderr, " pid=%04x,", req->pid );
  2153. fprintf( stderr, " tid=%04x,", req->tid );
  2154. fprintf( stderr, " event_min=%d,", req->event_min );
  2155. fprintf( stderr, " event_max=%d,", req->event_max );
  2156. fprintf( stderr, " flags=%d,", req->flags );
  2157. fprintf( stderr, " proc=%p,", req->proc );
  2158. fprintf( stderr, " unicode=%d,", req->unicode );
  2159. fprintf( stderr, " module=" );
  2160. dump_varargs_unicode_str( cur_size );
  2161. }
  2162. static void dump_set_hook_reply( const struct set_hook_reply *req )
  2163. {
  2164. fprintf( stderr, " handle=%p", req->handle );
  2165. }
  2166. static void dump_remove_hook_request( const struct remove_hook_request *req )
  2167. {
  2168. fprintf( stderr, " handle=%p,", req->handle );
  2169. fprintf( stderr, " id=%d,", req->id );
  2170. fprintf( stderr, " proc=%p", req->proc );
  2171. }
  2172. static void dump_start_hook_chain_request( const struct start_hook_chain_request *req )
  2173. {
  2174. fprintf( stderr, " id=%d,", req->id );
  2175. fprintf( stderr, " event=%d,", req->event );
  2176. fprintf( stderr, " window=%p,", req->window );
  2177. fprintf( stderr, " object_id=%d,", req->object_id );
  2178. fprintf( stderr, " child_id=%d", req->child_id );
  2179. }
  2180. static void dump_start_hook_chain_reply( const struct start_hook_chain_reply *req )
  2181. {
  2182. fprintf( stderr, " handle=%p,", req->handle );
  2183. fprintf( stderr, " pid=%04x,", req->pid );
  2184. fprintf( stderr, " tid=%04x,", req->tid );
  2185. fprintf( stderr, " proc=%p,", req->proc );
  2186. fprintf( stderr, " unicode=%d,", req->unicode );
  2187. fprintf( stderr, " module=" );
  2188. dump_varargs_unicode_str( cur_size );
  2189. }
  2190. static void dump_finish_hook_chain_request( const struct finish_hook_chain_request *req )
  2191. {
  2192. fprintf( stderr, " id=%d", req->id );
  2193. }
  2194. static void dump_get_next_hook_request( const struct get_next_hook_request *req )
  2195. {
  2196. fprintf( stderr, " handle=%p,", req->handle );
  2197. fprintf( stderr, " event=%d,", req->event );
  2198. fprintf( stderr, " window=%p,", req->window );
  2199. fprintf( stderr, " object_id=%d,", req->object_id );
  2200. fprintf( stderr, " child_id=%d", req->child_id );
  2201. }
  2202. static void dump_get_next_hook_reply( const struct get_next_hook_reply *req )
  2203. {
  2204. fprintf( stderr, " next=%p,", req->next );
  2205. fprintf( stderr, " id=%d,", req->id );
  2206. fprintf( stderr, " pid=%04x,", req->pid );
  2207. fprintf( stderr, " tid=%04x,", req->tid );
  2208. fprintf( stderr, " proc=%p,", req->proc );
  2209. fprintf( stderr, " prev_unicode=%d,", req->prev_unicode );
  2210. fprintf( stderr, " next_unicode=%d,", req->next_unicode );
  2211. fprintf( stderr, " module=" );
  2212. dump_varargs_unicode_str( cur_size );
  2213. }
  2214. static void dump_create_class_request( const struct create_class_request *req )
  2215. {
  2216. fprintf( stderr, " local=%d,", req->local );
  2217. fprintf( stderr, " atom=%04x,", req->atom );
  2218. fprintf( stderr, " style=%08x,", req->style );
  2219. fprintf( stderr, " instance=%p,", req->instance );
  2220. fprintf( stderr, " extra=%d,", req->extra );
  2221. fprintf( stderr, " win_extra=%d,", req->win_extra );
  2222. fprintf( stderr, " client_ptr=%p", req->client_ptr );
  2223. }
  2224. static void dump_destroy_class_request( const struct destroy_class_request *req )
  2225. {
  2226. fprintf( stderr, " atom=%04x,", req->atom );
  2227. fprintf( stderr, " instance=%p", req->instance );
  2228. }
  2229. static void dump_destroy_class_reply( const struct destroy_class_reply *req )
  2230. {
  2231. fprintf( stderr, " client_ptr=%p", req->client_ptr );
  2232. }
  2233. static void dump_set_class_info_request( const struct set_class_info_request *req )
  2234. {
  2235. fprintf( stderr, " window=%p,", req->window );
  2236. fprintf( stderr, " flags=%08x,", req->flags );
  2237. fprintf( stderr, " atom=%04x,", req->atom );
  2238. fprintf( stderr, " style=%08x,", req->style );
  2239. fprintf( stderr, " win_extra=%d,", req->win_extra );
  2240. fprintf( stderr, " instance=%p,", req->instance );
  2241. fprintf( stderr, " extra_offset=%d,", req->extra_offset );
  2242. fprintf( stderr, " extra_size=%d,", req->extra_size );
  2243. fprintf( stderr, " extra_value=%08x", req->extra_value );
  2244. }
  2245. static void dump_set_class_info_reply( const struct set_class_info_reply *req )
  2246. {
  2247. fprintf( stderr, " old_atom=%04x,", req->old_atom );
  2248. fprintf( stderr, " old_style=%08x,", req->old_style );
  2249. fprintf( stderr, " old_extra=%d,", req->old_extra );
  2250. fprintf( stderr, " old_win_extra=%d,", req->old_win_extra );
  2251. fprintf( stderr, " old_instance=%p,", req->old_instance );
  2252. fprintf( stderr, " old_extra_value=%08x", req->old_extra_value );
  2253. }
  2254. static void dump_set_clipboard_info_request( const struct set_clipboard_info_request *req )
  2255. {
  2256. fprintf( stderr, " flags=%08x,", req->flags );
  2257. fprintf( stderr, " clipboard=%p,", req->clipboard );
  2258. fprintf( stderr, " owner=%p,", req->owner );
  2259. fprintf( stderr, " viewer=%p,", req->viewer );
  2260. fprintf( stderr, " seqno=%08x", req->seqno );
  2261. }
  2262. static void dump_set_clipboard_info_reply( const struct set_clipboard_info_reply *req )
  2263. {
  2264. fprintf( stderr, " flags=%08x,", req->flags );
  2265. fprintf( stderr, " old_clipboard=%p,", req->old_clipboard );
  2266. fprintf( stderr, " old_owner=%p,", req->old_owner );
  2267. fprintf( stderr, " old_viewer=%p,", req->old_viewer );
  2268. fprintf( stderr, " seqno=%08x", req->seqno );
  2269. }
  2270. static void dump_open_token_request( const struct open_token_request *req )
  2271. {
  2272. fprintf( stderr, " handle=%p,", req->handle );
  2273. fprintf( stderr, " flags=%08x", req->flags );
  2274. }
  2275. static void dump_open_token_reply( const struct open_token_reply *req )
  2276. {
  2277. fprintf( stderr, " token=%p", req->token );
  2278. }
  2279. static void dump_set_global_windows_request( const struct set_global_windows_request *req )
  2280. {
  2281. fprintf( stderr, " flags=%08x,", req->flags );
  2282. fprintf( stderr, " shell_window=%p,", req->shell_window );
  2283. fprintf( stderr, " shell_listview=%p,", req->shell_listview );
  2284. fprintf( stderr, " progman_window=%p,", req->progman_window );
  2285. fprintf( stderr, " taskman_window=%p", req->taskman_window );
  2286. }
  2287. static void dump_set_global_windows_reply( const struct set_global_windows_reply *req )
  2288. {
  2289. fprintf( stderr, " old_shell_window=%p,", req->old_shell_window );
  2290. fprintf( stderr, " old_shell_listview=%p,", req->old_shell_listview );
  2291. fprintf( stderr, " old_progman_window=%p,", req->old_progman_window );
  2292. fprintf( stderr, " old_taskman_window=%p", req->old_taskman_window );
  2293. }
  2294. static void dump_adjust_token_privileges_request( const struct adjust_token_privileges_request *req )
  2295. {
  2296. fprintf( stderr, " handle=%p,", req->handle );
  2297. fprintf( stderr, " disable_all=%d,", req->disable_all );
  2298. fprintf( stderr, " get_modified_state=%d,", req->get_modified_state );
  2299. fprintf( stderr, " privileges=" );
  2300. dump_varargs_LUID_AND_ATTRIBUTES( cur_size );
  2301. }
  2302. static void dump_adjust_token_privileges_reply( const struct adjust_token_privileges_reply *req )
  2303. {
  2304. fprintf( stderr, " len=%08x,", req->len );
  2305. fprintf( stderr, " privileges=" );
  2306. dump_varargs_LUID_AND_ATTRIBUTES( cur_size );
  2307. }
  2308. static void dump_get_token_privileges_request( const struct get_token_privileges_request *req )
  2309. {
  2310. fprintf( stderr, " handle=%p", req->handle );
  2311. }
  2312. static void dump_get_token_privileges_reply( const struct get_token_privileges_reply *req )
  2313. {
  2314. fprintf( stderr, " len=%08x,", req->len );
  2315. fprintf( stderr, " privileges=" );
  2316. dump_varargs_LUID_AND_ATTRIBUTES( cur_size );
  2317. }
  2318. static void dump_duplicate_token_request( const struct duplicate_token_request *req )
  2319. {
  2320. fprintf( stderr, " handle=%p,", req->handle );
  2321. fprintf( stderr, " access=%08x,", req->access );
  2322. fprintf( stderr, " inherit=%d,", req->inherit );
  2323. fprintf( stderr, " primary=%d,", req->primary );
  2324. fprintf( stderr, " impersonation_level=%d", req->impersonation_level );
  2325. }
  2326. static void dump_duplicate_token_reply( const struct duplicate_token_reply *req )
  2327. {
  2328. fprintf( stderr, " new_handle=%p", req->new_handle );
  2329. }
  2330. static const dump_func req_dumpers[REQ_NB_REQUESTS] = {
  2331. (dump_func)dump_new_process_request,
  2332. (dump_func)dump_get_new_process_info_request,
  2333. (dump_func)dump_new_thread_request,
  2334. (dump_func)dump_boot_done_request,
  2335. (dump_func)dump_init_process_request,
  2336. (dump_func)dump_get_startup_info_request,
  2337. (dump_func)dump_init_process_done_request,
  2338. (dump_func)dump_init_thread_request,
  2339. (dump_func)dump_terminate_process_request,
  2340. (dump_func)dump_terminate_thread_request,
  2341. (dump_func)dump_get_process_info_request,
  2342. (dump_func)dump_set_process_info_request,
  2343. (dump_func)dump_get_thread_info_request,
  2344. (dump_func)dump_set_thread_info_request,
  2345. (dump_func)dump_get_dll_info_request,
  2346. (dump_func)dump_suspend_thread_request,
  2347. (dump_func)dump_resume_thread_request,
  2348. (dump_func)dump_load_dll_request,
  2349. (dump_func)dump_unload_dll_request,
  2350. (dump_func)dump_queue_apc_request,
  2351. (dump_func)dump_get_apc_request,
  2352. (dump_func)dump_close_handle_request,
  2353. (dump_func)dump_set_handle_info_request,
  2354. (dump_func)dump_dup_handle_request,
  2355. (dump_func)dump_open_process_request,
  2356. (dump_func)dump_open_thread_request,
  2357. (dump_func)dump_select_request,
  2358. (dump_func)dump_create_event_request,
  2359. (dump_func)dump_event_op_request,
  2360. (dump_func)dump_open_event_request,
  2361. (dump_func)dump_create_mutex_request,
  2362. (dump_func)dump_release_mutex_request,
  2363. (dump_func)dump_open_mutex_request,
  2364. (dump_func)dump_create_semaphore_request,
  2365. (dump_func)dump_release_semaphore_request,
  2366. (dump_func)dump_open_semaphore_request,
  2367. (dump_func)dump_create_file_request,
  2368. (dump_func)dump_alloc_file_handle_request,
  2369. (dump_func)dump_get_handle_fd_request,
  2370. (dump_func)dump_flush_file_request,
  2371. (dump_func)dump_lock_file_request,
  2372. (dump_func)dump_unlock_file_request,
  2373. (dump_func)dump_create_socket_request,
  2374. (dump_func)dump_accept_socket_request,
  2375. (dump_func)dump_set_socket_event_request,
  2376. (dump_func)dump_get_socket_event_request,
  2377. (dump_func)dump_enable_socket_event_request,
  2378. (dump_func)dump_set_socket_deferred_request,
  2379. (dump_func)dump_alloc_console_request,
  2380. (dump_func)dump_free_console_request,
  2381. (dump_func)dump_get_console_renderer_events_request,
  2382. (dump_func)dump_open_console_request,
  2383. (dump_func)dump_get_console_wait_event_request,
  2384. (dump_func)dump_get_console_mode_request,
  2385. (dump_func)dump_set_console_mode_request,
  2386. (dump_func)dump_set_console_input_info_request,
  2387. (dump_func)dump_get_console_input_info_request,
  2388. (dump_func)dump_append_console_input_history_request,
  2389. (dump_func)dump_get_console_input_history_request,
  2390. (dump_func)dump_create_console_output_request,
  2391. (dump_func)dump_set_console_output_info_request,
  2392. (dump_func)dump_get_console_output_info_request,
  2393. (dump_func)dump_write_console_input_request,
  2394. (dump_func)dump_read_console_input_request,
  2395. (dump_func)dump_write_console_output_request,
  2396. (dump_func)dump_fill_console_output_request,
  2397. (dump_func)dump_read_console_output_request,
  2398. (dump_func)dump_move_console_output_request,
  2399. (dump_func)dump_send_console_signal_request,
  2400. (dump_func)dump_create_change_notification_request,
  2401. (dump_func)dump_next_change_notification_request,
  2402. (dump_func)dump_create_mapping_request,
  2403. (dump_func)dump_open_mapping_request,
  2404. (dump_func)dump_get_mapping_info_request,
  2405. (dump_func)dump_create_snapshot_request,
  2406. (dump_func)dump_next_process_request,
  2407. (dump_func)dump_next_thread_request,
  2408. (dump_func)dump_next_module_request,
  2409. (dump_func)dump_wait_debug_event_request,
  2410. (dump_func)dump_queue_exception_event_request,
  2411. (dump_func)dump_get_exception_status_request,
  2412. (dump_func)dump_output_debug_string_request,
  2413. (dump_func)dump_continue_debug_event_request,
  2414. (dump_func)dump_debug_process_request,
  2415. (dump_func)dump_debug_break_request,
  2416. (dump_func)dump_set_debugger_kill_on_exit_request,
  2417. (dump_func)dump_read_process_memory_request,
  2418. (dump_func)dump_write_process_memory_request,
  2419. (dump_func)dump_create_key_request,
  2420. (dump_func)dump_open_key_request,
  2421. (dump_func)dump_delete_key_request,
  2422. (dump_func)dump_flush_key_request,
  2423. (dump_func)dump_enum_key_request,
  2424. (dump_func)dump_set_key_value_request,
  2425. (dump_func)dump_get_key_value_request,
  2426. (dump_func)dump_enum_key_value_request,
  2427. (dump_func)dump_delete_key_value_request,
  2428. (dump_func)dump_load_registry_request,
  2429. (dump_func)dump_unload_registry_request,
  2430. (dump_func)dump_save_registry_request,
  2431. (dump_func)dump_load_user_registries_request,
  2432. (dump_func)dump_set_registry_notification_request,
  2433. (dump_func)dump_create_timer_request,
  2434. (dump_func)dump_open_timer_request,
  2435. (dump_func)dump_set_timer_request,
  2436. (dump_func)dump_cancel_timer_request,
  2437. (dump_func)dump_get_timer_info_request,
  2438. (dump_func)dump_get_thread_context_request,
  2439. (dump_func)dump_set_thread_context_request,
  2440. (dump_func)dump_get_selector_entry_request,
  2441. (dump_func)dump_add_atom_request,
  2442. (dump_func)dump_delete_atom_request,
  2443. (dump_func)dump_find_atom_request,
  2444. (dump_func)dump_get_atom_name_request,
  2445. (dump_func)dump_init_atom_table_request,
  2446. (dump_func)dump_get_msg_queue_request,
  2447. (dump_func)dump_set_queue_mask_request,
  2448. (dump_func)dump_get_queue_status_request,
  2449. (dump_func)dump_wait_input_idle_request,
  2450. (dump_func)dump_send_message_request,
  2451. (dump_func)dump_get_message_request,
  2452. (dump_func)dump_reply_message_request,
  2453. (dump_func)dump_get_message_reply_request,
  2454. (dump_func)dump_set_win_timer_request,
  2455. (dump_func)dump_kill_win_timer_request,
  2456. (dump_func)dump_get_serial_info_request,
  2457. (dump_func)dump_set_serial_info_request,
  2458. (dump_func)dump_register_async_request,
  2459. (dump_func)dump_cancel_async_request,
  2460. (dump_func)dump_create_named_pipe_request,
  2461. (dump_func)dump_open_named_pipe_request,
  2462. (dump_func)dump_connect_named_pipe_request,
  2463. (dump_func)dump_wait_named_pipe_request,
  2464. (dump_func)dump_disconnect_named_pipe_request,
  2465. (dump_func)dump_get_named_pipe_info_request,
  2466. (dump_func)dump_create_window_request,
  2467. (dump_func)dump_link_window_request,
  2468. (dump_func)dump_destroy_window_request,
  2469. (dump_func)dump_set_window_owner_request,
  2470. (dump_func)dump_get_window_info_request,
  2471. (dump_func)dump_set_window_info_request,
  2472. (dump_func)dump_get_window_parents_request,
  2473. (dump_func)dump_get_window_children_request,
  2474. (dump_func)dump_get_window_children_from_point_request,
  2475. (dump_func)dump_get_window_tree_request,
  2476. (dump_func)dump_set_window_pos_request,
  2477. (dump_func)dump_get_window_rectangles_request,
  2478. (dump_func)dump_get_window_text_request,
  2479. (dump_func)dump_set_window_text_request,
  2480. (dump_func)dump_get_windows_offset_request,
  2481. (dump_func)dump_get_visible_region_request,
  2482. (dump_func)dump_get_window_region_request,
  2483. (dump_func)dump_set_window_region_request,
  2484. (dump_func)dump_get_update_region_request,
  2485. (dump_func)dump_redraw_window_request,
  2486. (dump_func)dump_set_window_property_request,
  2487. (dump_func)dump_remove_window_property_request,
  2488. (dump_func)dump_get_window_property_request,
  2489. (dump_func)dump_get_window_properties_request,
  2490. (dump_func)dump_attach_thread_input_request,
  2491. (dump_func)dump_get_thread_input_request,
  2492. (dump_func)dump_get_key_state_request,
  2493. (dump_func)dump_set_key_state_request,
  2494. (dump_func)dump_set_foreground_window_request,
  2495. (dump_func)dump_set_focus_window_request,
  2496. (dump_func)dump_set_active_window_request,
  2497. (dump_func)dump_set_capture_window_request,
  2498. (dump_func)dump_set_caret_window_request,
  2499. (dump_func)dump_set_caret_info_request,
  2500. (dump_func)dump_set_hook_request,
  2501. (dump_func)dump_remove_hook_request,
  2502. (dump_func)dump_start_hook_chain_request,
  2503. (dump_func)dump_finish_hook_chain_request,
  2504. (dump_func)dump_get_next_hook_request,
  2505. (dump_func)dump_create_class_request,
  2506. (dump_func)dump_destroy_class_request,
  2507. (dump_func)dump_set_class_info_request,
  2508. (dump_func)dump_set_clipboard_info_request,
  2509. (dump_func)dump_open_token_request,
  2510. (dump_func)dump_set_global_windows_request,
  2511. (dump_func)dump_adjust_token_privileges_request,
  2512. (dump_func)dump_get_token_privileges_request,
  2513. (dump_func)dump_duplicate_token_request,
  2514. };
  2515. static const dump_func reply_dumpers[REQ_NB_REQUESTS] = {
  2516. (dump_func)dump_new_process_reply,
  2517. (dump_func)dump_get_new_process_info_reply,
  2518. (dump_func)dump_new_thread_reply,
  2519. (dump_func)0,
  2520. (dump_func)dump_init_process_reply,
  2521. (dump_func)dump_get_startup_info_reply,
  2522. (dump_func)0,
  2523. (dump_func)dump_init_thread_reply,
  2524. (dump_func)dump_terminate_process_reply,
  2525. (dump_func)dump_terminate_thread_reply,
  2526. (dump_func)dump_get_process_info_reply,
  2527. (dump_func)0,
  2528. (dump_func)dump_get_thread_info_reply,
  2529. (dump_func)0,
  2530. (dump_func)dump_get_dll_info_reply,
  2531. (dump_func)dump_suspend_thread_reply,
  2532. (dump_func)dump_resume_thread_reply,
  2533. (dump_func)0,
  2534. (dump_func)0,
  2535. (dump_func)0,
  2536. (dump_func)dump_get_apc_reply,
  2537. (dump_func)dump_close_handle_reply,
  2538. (dump_func)dump_set_handle_info_reply,
  2539. (dump_func)dump_dup_handle_reply,
  2540. (dump_func)dump_open_process_reply,
  2541. (dump_func)dump_open_thread_reply,
  2542. (dump_func)0,
  2543. (dump_func)dump_create_event_reply,
  2544. (dump_func)0,
  2545. (dump_func)dump_open_event_reply,
  2546. (dump_func)dump_create_mutex_reply,
  2547. (dump_func)dump_release_mutex_reply,
  2548. (dump_func)dump_open_mutex_reply,
  2549. (dump_func)dump_create_semaphore_reply,
  2550. (dump_func)dump_release_semaphore_reply,
  2551. (dump_func)dump_open_semaphore_reply,
  2552. (dump_func)dump_create_file_reply,
  2553. (dump_func)dump_alloc_file_handle_reply,
  2554. (dump_func)dump_get_handle_fd_reply,
  2555. (dump_func)dump_flush_file_reply,
  2556. (dump_func)dump_lock_file_reply,
  2557. (dump_func)0,
  2558. (dump_func)dump_create_socket_reply,
  2559. (dump_func)dump_accept_socket_reply,
  2560. (dump_func)0,
  2561. (dump_func)dump_get_socket_event_reply,
  2562. (dump_func)0,
  2563. (dump_func)0,
  2564. (dump_func)dump_alloc_console_reply,
  2565. (dump_func)0,
  2566. (dump_func)dump_get_console_renderer_events_reply,
  2567. (dump_func)dump_open_console_reply,
  2568. (dump_func)dump_get_console_wait_event_reply,
  2569. (dump_func)dump_get_console_mode_reply,
  2570. (dump_func)0,
  2571. (dump_func)0,
  2572. (dump_func)dump_get_console_input_info_reply,
  2573. (dump_func)0,
  2574. (dump_func)dump_get_console_input_history_reply,
  2575. (dump_func)dump_create_console_output_reply,
  2576. (dump_func)0,
  2577. (dump_func)dump_get_console_output_info_reply,
  2578. (dump_func)dump_write_console_input_reply,
  2579. (dump_func)dump_read_console_input_reply,
  2580. (dump_func)dump_write_console_output_reply,
  2581. (dump_func)dump_fill_console_output_reply,
  2582. (dump_func)dump_read_console_output_reply,
  2583. (dump_func)0,
  2584. (dump_func)0,
  2585. (dump_func)dump_create_change_notification_reply,
  2586. (dump_func)0,
  2587. (dump_func)dump_create_mapping_reply,
  2588. (dump_func)dump_open_mapping_reply,
  2589. (dump_func)dump_get_mapping_info_reply,
  2590. (dump_func)dump_create_snapshot_reply,
  2591. (dump_func)dump_next_process_reply,
  2592. (dump_func)dump_next_thread_reply,
  2593. (dump_func)dump_next_module_reply,
  2594. (dump_func)dump_wait_debug_event_reply,
  2595. (dump_func)dump_queue_exception_event_reply,
  2596. (dump_func)dump_get_exception_status_reply,
  2597. (dump_func)0,
  2598. (dump_func)0,
  2599. (dump_func)0,
  2600. (dump_func)dump_debug_break_reply,
  2601. (dump_func)0,
  2602. (dump_func)dump_read_process_memory_reply,
  2603. (dump_func)0,
  2604. (dump_func)dump_create_key_reply,
  2605. (dump_func)dump_open_key_reply,
  2606. (dump_func)0,
  2607. (dump_func)0,
  2608. (dump_func)dump_enum_key_reply,
  2609. (dump_func)0,
  2610. (dump_func)dump_get_key_value_reply,
  2611. (dump_func)dump_enum_key_value_reply,
  2612. (dump_func)0,
  2613. (dump_func)0,
  2614. (dump_func)0,
  2615. (dump_func)0,
  2616. (dump_func)0,
  2617. (dump_func)0,
  2618. (dump_func)dump_create_timer_reply,
  2619. (dump_func)dump_open_timer_reply,
  2620. (dump_func)dump_set_timer_reply,
  2621. (dump_func)dump_cancel_timer_reply,
  2622. (dump_func)dump_get_timer_info_reply,
  2623. (dump_func)dump_get_thread_context_reply,
  2624. (dump_func)0,
  2625. (dump_func)dump_get_selector_entry_reply,
  2626. (dump_func)dump_add_atom_reply,
  2627. (dump_func)0,
  2628. (dump_func)dump_find_atom_reply,
  2629. (dump_func)dump_get_atom_name_reply,
  2630. (dump_func)0,
  2631. (dump_func)dump_get_msg_queue_reply,
  2632. (dump_func)dump_set_queue_mask_reply,
  2633. (dump_func)dump_get_queue_status_reply,
  2634. (dump_func)dump_wait_input_idle_reply,
  2635. (dump_func)0,
  2636. (dump_func)dump_get_message_reply,
  2637. (dump_func)0,
  2638. (dump_func)dump_get_message_reply_reply,
  2639. (dump_func)dump_set_win_timer_reply,
  2640. (dump_func)0,
  2641. (dump_func)dump_get_serial_info_reply,
  2642. (dump_func)0,
  2643. (dump_func)0,
  2644. (dump_func)0,
  2645. (dump_func)dump_create_named_pipe_reply,
  2646. (dump_func)dump_open_named_pipe_reply,
  2647. (dump_func)0,
  2648. (dump_func)0,
  2649. (dump_func)dump_disconnect_named_pipe_reply,
  2650. (dump_func)dump_get_named_pipe_info_reply,
  2651. (dump_func)dump_create_window_reply,
  2652. (dump_func)dump_link_window_reply,
  2653. (dump_func)0,
  2654. (dump_func)dump_set_window_owner_reply,
  2655. (dump_func)dump_get_window_info_reply,
  2656. (dump_func)dump_set_window_info_reply,
  2657. (dump_func)dump_get_window_parents_reply,
  2658. (dump_func)dump_get_window_children_reply,
  2659. (dump_func)dump_get_window_children_from_point_reply,
  2660. (dump_func)dump_get_window_tree_reply,
  2661. (dump_func)dump_set_window_pos_reply,
  2662. (dump_func)dump_get_window_rectangles_reply,
  2663. (dump_func)dump_get_window_text_reply,
  2664. (dump_func)0,
  2665. (dump_func)dump_get_windows_offset_reply,
  2666. (dump_func)dump_get_visible_region_reply,
  2667. (dump_func)dump_get_window_region_reply,
  2668. (dump_func)0,
  2669. (dump_func)dump_get_update_region_reply,
  2670. (dump_func)0,
  2671. (dump_func)0,
  2672. (dump_func)dump_remove_window_property_reply,
  2673. (dump_func)dump_get_window_property_reply,
  2674. (dump_func)dump_get_window_properties_reply,
  2675. (dump_func)0,
  2676. (dump_func)dump_get_thread_input_reply,
  2677. (dump_func)dump_get_key_state_reply,
  2678. (dump_func)0,
  2679. (dump_func)dump_set_foreground_window_reply,
  2680. (dump_func)dump_set_focus_window_reply,
  2681. (dump_func)dump_set_active_window_reply,
  2682. (dump_func)dump_set_capture_window_reply,
  2683. (dump_func)dump_set_caret_window_reply,
  2684. (dump_func)dump_set_caret_info_reply,
  2685. (dump_func)dump_set_hook_reply,
  2686. (dump_func)0,
  2687. (dump_func)dump_start_hook_chain_reply,
  2688. (dump_func)0,
  2689. (dump_func)dump_get_next_hook_reply,
  2690. (dump_func)0,
  2691. (dump_func)dump_destroy_class_reply,
  2692. (dump_func)dump_set_class_info_reply,
  2693. (dump_func)dump_set_clipboard_info_reply,
  2694. (dump_func)dump_open_token_reply,
  2695. (dump_func)dump_set_global_windows_reply,
  2696. (dump_func)dump_adjust_token_privileges_reply,
  2697. (dump_func)dump_get_token_privileges_reply,
  2698. (dump_func)dump_duplicate_token_reply,
  2699. };
  2700. static const char * const req_names[REQ_NB_REQUESTS] = {
  2701. "new_process",
  2702. "get_new_process_info",
  2703. "new_thread",
  2704. "boot_done",
  2705. "init_process",
  2706. "get_startup_info",
  2707. "init_process_done",
  2708. "init_thread",
  2709. "terminate_process",
  2710. "terminate_thread",
  2711. "get_process_info",
  2712. "set_process_info",
  2713. "get_thread_info",
  2714. "set_thread_info",
  2715. "get_dll_info",
  2716. "suspend_thread",
  2717. "resume_thread",
  2718. "load_dll",
  2719. "unload_dll",
  2720. "queue_apc",
  2721. "get_apc",
  2722. "close_handle",
  2723. "set_handle_info",
  2724. "dup_handle",
  2725. "open_process",
  2726. "open_thread",
  2727. "select",
  2728. "create_event",
  2729. "event_op",
  2730. "open_event",
  2731. "create_mutex",
  2732. "release_mutex",
  2733. "open_mutex",
  2734. "create_semaphore",
  2735. "release_semaphore",
  2736. "open_semaphore",
  2737. "create_file",
  2738. "alloc_file_handle",
  2739. "get_handle_fd",
  2740. "flush_file",
  2741. "lock_file",
  2742. "unlock_file",
  2743. "create_socket",
  2744. "accept_socket",
  2745. "set_socket_event",
  2746. "get_socket_event",
  2747. "enable_socket_event",
  2748. "set_socket_deferred",
  2749. "alloc_console",
  2750. "free_console",
  2751. "get_console_renderer_events",
  2752. "open_console",
  2753. "get_console_wait_event",
  2754. "get_console_mode",
  2755. "set_console_mode",
  2756. "set_console_input_info",
  2757. "get_console_input_info",
  2758. "append_console_input_history",
  2759. "get_console_input_history",
  2760. "create_console_output",
  2761. "set_console_output_info",
  2762. "get_console_output_info",
  2763. "write_console_input",
  2764. "read_console_input",
  2765. "write_console_output",
  2766. "fill_console_output",
  2767. "read_console_output",
  2768. "move_console_output",
  2769. "send_console_signal",
  2770. "create_change_notification",
  2771. "next_change_notification",
  2772. "create_mapping",
  2773. "open_mapping",
  2774. "get_mapping_info",
  2775. "create_snapshot",
  2776. "next_process",
  2777. "next_thread",
  2778. "next_module",
  2779. "wait_debug_event",
  2780. "queue_exception_event",
  2781. "get_exception_status",
  2782. "output_debug_string",
  2783. "continue_debug_event",
  2784. "debug_process",
  2785. "debug_break",
  2786. "set_debugger_kill_on_exit",
  2787. "read_process_memory",
  2788. "write_process_memory",
  2789. "create_key",
  2790. "open_key",
  2791. "delete_key",
  2792. "flush_key",
  2793. "enum_key",
  2794. "set_key_value",
  2795. "get_key_value",
  2796. "enum_key_value",
  2797. "delete_key_value",
  2798. "load_registry",
  2799. "unload_registry",
  2800. "save_registry",
  2801. "load_user_registries",
  2802. "set_registry_notification",
  2803. "create_timer",
  2804. "open_timer",
  2805. "set_timer",
  2806. "cancel_timer",
  2807. "get_timer_info",
  2808. "get_thread_context",
  2809. "set_thread_context",
  2810. "get_selector_entry",
  2811. "add_atom",
  2812. "delete_atom",
  2813. "find_atom",
  2814. "get_atom_name",
  2815. "init_atom_table",
  2816. "get_msg_queue",
  2817. "set_queue_mask",
  2818. "get_queue_status",
  2819. "wait_input_idle",
  2820. "send_message",
  2821. "get_message",
  2822. "reply_message",
  2823. "get_message_reply",
  2824. "set_win_timer",
  2825. "kill_win_timer",
  2826. "get_serial_info",
  2827. "set_serial_info",
  2828. "register_async",
  2829. "cancel_async",
  2830. "create_named_pipe",
  2831. "open_named_pipe",
  2832. "connect_named_pipe",
  2833. "wait_named_pipe",
  2834. "disconnect_named_pipe",
  2835. "get_named_pipe_info",
  2836. "create_window",
  2837. "link_window",
  2838. "destroy_window",
  2839. "set_window_owner",
  2840. "get_window_info",
  2841. "set_window_info",
  2842. "get_window_parents",
  2843. "get_window_children",
  2844. "get_window_children_from_point",
  2845. "get_window_tree",
  2846. "set_window_pos",
  2847. "get_window_rectangles",
  2848. "get_window_text",
  2849. "set_window_text",
  2850. "get_windows_offset",
  2851. "get_visible_region",
  2852. "get_window_region",
  2853. "set_window_region",
  2854. "get_update_region",
  2855. "redraw_window",
  2856. "set_window_property",
  2857. "remove_window_property",
  2858. "get_window_property",
  2859. "get_window_properties",
  2860. "attach_thread_input",
  2861. "get_thread_input",
  2862. "get_key_state",
  2863. "set_key_state",
  2864. "set_foreground_window",
  2865. "set_focus_window",
  2866. "set_active_window",
  2867. "set_capture_window",
  2868. "set_caret_window",
  2869. "set_caret_info",
  2870. "set_hook",
  2871. "remove_hook",
  2872. "start_hook_chain",
  2873. "finish_hook_chain",
  2874. "get_next_hook",
  2875. "create_class",
  2876. "destroy_class",
  2877. "set_class_info",
  2878. "set_clipboard_info",
  2879. "open_token",
  2880. "set_global_windows",
  2881. "adjust_token_privileges",
  2882. "get_token_privileges",
  2883. "duplicate_token",
  2884. };
  2885. /* ### make_requests end ### */
  2886. /* Everything above this line is generated automatically by tools/make_requests */
  2887. static const char *get_status_name( unsigned int status )
  2888. {
  2889. #define NAME(status) { #status, STATUS_##status }
  2890. #define NAME_WIN32(error) { #error, 0xc0010000 | error }
  2891. static const struct
  2892. {
  2893. const char *name;
  2894. unsigned int value;
  2895. } status_names[] =
  2896. {
  2897. NAME(ACCESS_DENIED),
  2898. NAME(ACCESS_VIOLATION),
  2899. NAME(ALIAS_EXISTS),
  2900. NAME(BUFFER_OVERFLOW),
  2901. NAME(CHILD_MUST_BE_VOLATILE),
  2902. NAME(DIRECTORY_NOT_EMPTY),
  2903. NAME(DISK_FULL),
  2904. NAME(DLL_NOT_FOUND),
  2905. NAME(FILE_IS_A_DIRECTORY),
  2906. NAME(FILE_LOCK_CONFLICT),
  2907. NAME(INVALID_FILE_FOR_SECTION),
  2908. NAME(INVALID_HANDLE),
  2909. NAME(INVALID_PARAMETER),
  2910. NAME(KEY_DELETED),
  2911. NAME(MEDIA_WRITE_PROTECTED),
  2912. NAME(MUTANT_NOT_OWNED),
  2913. NAME(NOT_A_DIRECTORY),
  2914. NAME(NOT_IMPLEMENTED),
  2915. NAME(NOT_REGISTRY_FILE),
  2916. NAME(NO_DATA_DETECTED),
  2917. NAME(NO_MEMORY),
  2918. NAME(NO_MORE_ENTRIES),
  2919. NAME(NO_MORE_FILES),
  2920. NAME(NO_SUCH_FILE),
  2921. NAME(OBJECT_NAME_COLLISION),
  2922. NAME(OBJECT_NAME_INVALID),
  2923. NAME(OBJECT_NAME_NOT_FOUND),
  2924. NAME(OBJECT_PATH_INVALID),
  2925. NAME(OBJECT_TYPE_MISMATCH),
  2926. NAME(PENDING),
  2927. NAME(PIPE_BUSY),
  2928. NAME(PIPE_CONNECTED),
  2929. NAME(PIPE_DISCONNECTED),
  2930. NAME(PIPE_LISTENING),
  2931. NAME(PIPE_NOT_AVAILABLE),
  2932. NAME(SEMAPHORE_LIMIT_EXCEEDED),
  2933. NAME(SHARING_VIOLATION),
  2934. NAME(SUSPEND_COUNT_EXCEEDED),
  2935. NAME(TIMEOUT),
  2936. NAME(USER_APC),
  2937. NAME(WAS_LOCKED),
  2938. NAME_WIN32(ERROR_INVALID_INDEX),
  2939. NAME_WIN32(ERROR_INVALID_THREAD_ID),
  2940. NAME_WIN32(ERROR_NEGATIVE_SEEK),
  2941. NAME_WIN32(ERROR_SEEK),
  2942. { NULL, 0 } /* terminator */
  2943. };
  2944. #undef NAME
  2945. int i;
  2946. static char buffer[10];
  2947. if (status)
  2948. {
  2949. for (i = 0; status_names[i].name; i++)
  2950. if (status_names[i].value == status) return status_names[i].name;
  2951. }
  2952. sprintf( buffer, "%x", status );
  2953. return buffer;
  2954. }
  2955. void trace_request(void)
  2956. {
  2957. enum request req = current->req.request_header.req;
  2958. if (req < REQ_NB_REQUESTS)
  2959. {
  2960. fprintf( stderr, "%04x: %s(", current->id, req_names[req] );
  2961. if (req_dumpers[req])
  2962. {
  2963. cur_pos = 0;
  2964. cur_data = get_req_data();
  2965. cur_size = get_req_data_size();
  2966. req_dumpers[req]( &current->req );
  2967. }
  2968. fprintf( stderr, " )\n" );
  2969. }
  2970. else fprintf( stderr, "%04x: %d(?)\n", current->id, req );
  2971. }
  2972. void trace_reply( enum request req, const union generic_reply *reply )
  2973. {
  2974. if (req < REQ_NB_REQUESTS)
  2975. {
  2976. fprintf( stderr, "%04x: %s() = %s",
  2977. current->id, req_names[req], get_status_name(current->error) );
  2978. if (reply_dumpers[req])
  2979. {
  2980. fprintf( stderr, " {" );
  2981. cur_pos = 0;
  2982. cur_data = current->reply_data;
  2983. cur_size = reply->reply_header.reply_size;
  2984. reply_dumpers[req]( reply );
  2985. fprintf( stderr, " }" );
  2986. }
  2987. fputc( '\n', stderr );
  2988. }
  2989. else fprintf( stderr, "%04x: %d() = %s\n",
  2990. current->id, req, get_status_name(current->error) );
  2991. }