Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1082 lines
38 KiB

  1. /*++
  2. Copyright (c) 1995 Microsoft Corporation
  3. All rights reserved.
  4. Module Name:
  5. localspl.cxx
  6. Abstract:
  7. SUR localspl structures.
  8. Author:
  9. Albert Ting (AlbertT) 19-Feb-1995
  10. Revision History:
  11. --*/
  12. #include "precomp.hxx"
  13. #pragma hdrstop
  14. extern "C" {
  15. #include "spltypes.h"
  16. }
  17. /********************************************************************
  18. Localspl structures; mostly defined in localspl\spltypes.h
  19. ********************************************************************/
  20. BOOL
  21. TDebugExt::
  22. bDumpIniSpooler(
  23. PVOID pIniSpooler_,
  24. ULONG_PTR dwAddr
  25. )
  26. {
  27. static DEBUG_FLAGS adfSpl[] = {
  28. { "UpdateWinIniDevices", SPL_UPDATE_WININI_DEVICES },
  29. { "PrinterChanges", SPL_PRINTER_CHANGES },
  30. { "LogEvents", SPL_LOG_EVENTS },
  31. { "FormsChange", SPL_FORMS_CHANGE },
  32. { "BroadcastChange", SPL_BROADCAST_CHANGE },
  33. { "SecurityCheck", SPL_SECURITY_CHECK },
  34. { "OpenCreatePorts", SPL_OPEN_CREATE_PORTS },
  35. { "FailOpenPrintersPendDel", SPL_FAIL_OPEN_PRINTERS_PENDING_DELETION },
  36. { "RemoteHandleCheck", SPL_REMOTE_HANDLE_CHECK },
  37. { "PrinterDriverEvent", SPL_PRINTER_DRIVER_EVENT },
  38. { "AlwaysCreateDriverShare", SPL_ALWAYS_CREATE_DRIVER_SHARE },
  39. { "NoUpdatePrinterIni", SPL_NO_UPDATE_PRINTERINI },
  40. { "NoUpdateJobShd", SPL_NO_UPDATE_JOBSHD },
  41. { "ClusterReg", SPL_CLUSTER_REG },
  42. { "Offline", SPL_OFFLINE },
  43. { "PendingDeletion", SPL_PENDING_DELETION },
  44. { "ServerThread", SPL_SERVER_THREAD },
  45. { "Print", SPL_PRINT },
  46. { "TypeLocal", SPL_TYPE_LOCAL },
  47. { "TypeCluster", SPL_TYPE_CLUSTER },
  48. { NULL, 0 }
  49. };
  50. PINISPOOLER pIniSpooler = (PINISPOOLER)pIniSpooler_;
  51. if( !( pIniSpooler->signature == ISP_SIGNATURE )){
  52. return FALSE;
  53. }
  54. Print( "IniSpooler*\n" );
  55. Print( " pIniNextSpooler %x\n", pIniSpooler->pIniNextSpooler );
  56. Print( " cRef <%d>\n", pIniSpooler->cRef );
  57. Print( " pMachineName " ); vDumpStr( pIniSpooler->pMachineName );
  58. Print( " cOtherNames <%d>\n", pIniSpooler->cOtherNames );
  59. Print( " ppszOtherNames @@ %x\n", pIniSpooler->ppszOtherNames );
  60. Print( " pDir " ); vDumpStr( pIniSpooler->pDir );
  61. Print( " pIniPrinter %x\n", pIniSpooler->pIniPrinter );
  62. Print( " pIniEnvironment %x\n", pIniSpooler->pIniEnvironment );
  63. Print( " pIniMonitor %x\n", pIniSpooler->pIniMonitor );
  64. Print( " pIniPort %x\n", pIniSpooler->pIniPort );
  65. Print( " pShared %x\n", pIniSpooler->pShared );
  66. Print( " pIniNetPrint %x\n", pIniSpooler->pIniNetPrint );
  67. Print( " pSpool %x\n", pIniSpooler->pSpool );
  68. Print( " pDefaultSpoolDir " ); vDumpStr( pIniSpooler->pDefaultSpoolDir );
  69. Print( " pszRegistryMonitors " ); vDumpStr( pIniSpooler->pszRegistryMonitors );
  70. Print( "pszRegistryEnvironments " ); vDumpStr( pIniSpooler->pszRegistryEnvironments );
  71. Print( " pszRegistryEventLog " ); vDumpStr( pIniSpooler->pszRegistryEventLog );
  72. Print( " pszRegistryProviders " ); vDumpStr( pIniSpooler->pszRegistryProviders );
  73. Print( " pszEventLogMsgFile " ); vDumpStr( pIniSpooler->pszEventLogMsgFile );
  74. Print( " pDriversShareInfo %x\n", pIniSpooler->pDriversShareInfo );
  75. Print( " pszDriversShare " ); vDumpStr( pIniSpooler->pszDriversShare );
  76. Print( " pszRegistryForms " ); vDumpStr( pIniSpooler->pszRegistryForms );
  77. Print( " SpoolerFlags " );
  78. vDumpFlags( pIniSpooler->SpoolerFlags, adfSpl );
  79. Print( " pfnReadRegistryExtra %x\n", pIniSpooler->pfnReadRegistryExtra );
  80. Print( " pfnWriteRegistryExtra %x\n", pIniSpooler->pfnWriteRegistryExtra );
  81. Print( " pfnFreePrinterExtra %x\n", pIniSpooler->pfnFreePrinterExtra );
  82. Print( " cEnumNetworkPrinters <%d>\n", pIniSpooler->cEnumerateNetworkPrinters );
  83. Print( " cAddNetPrinters <%d>\n", pIniSpooler->cAddNetPrinters );
  84. Print( " cFormOrderMax <%d>\n", pIniSpooler->cFormOrderMax );
  85. Print( " pNoRemotePrintDrivers " ); vDumpStr( pIniSpooler->pNoRemotePrintDrivers );
  86. Print( " cchNoRemotePrintDrivers <%d>\n", pIniSpooler->cchNoRemotePrintDrivers );
  87. Print( " hckRoot %x\n", pIniSpooler->hckRoot );
  88. Print( " hckPrinters %x\n", pIniSpooler->hckPrinters );
  89. Print( " cFullPrintingJobs <%d>\n", pIniSpooler->cFullPrintingJobs );
  90. Print( " hEventNoPrintingJobs %x\n", pIniSpooler->hEventNoPrintingJobs );
  91. Print( " hJobIdMap %x\n", pIniSpooler->hJobIdMap );
  92. Print( " dwEventLogging <%d>\n", pIniSpooler->dwEventLogging );
  93. Print( " bEnableNetPopups <%d>\n", pIniSpooler->bEnableNetPopups );
  94. Print( " dwJobCompletionTimeout <%d>\n", pIniSpooler->dwJobCompletionTimeout );
  95. Print( " dwBeepEnabled <%d>\n", pIniSpooler->dwBeepEnabled );
  96. Print( "bEnableNetPopupToComputer <%d>\n", pIniSpooler->bEnableNetPopupToComputer );
  97. Print( " bEnableRetryPopups <%d>\n", pIniSpooler->bEnableRetryPopups );
  98. Print( " pszClusterGUID " ); vDumpStr( pIniSpooler->pszClusterGUID );
  99. Print( " hClusterToken <%d>\n", pIniSpooler->hClusterToken );
  100. Print( "dwRestartJobOnPoolTimeout <%d>\n", pIniSpooler->dwRestartJobOnPoolTimeout );
  101. Print( " bRestartJobOnPoolEnabled <%d>\n", pIniSpooler->bRestartJobOnPoolEnabled );
  102. Print( " bImmortal <%d>\n", pIniSpooler->bImmortal );
  103. Print( " pszFullMachineName " ); vDumpStr( pIniSpooler->pszFullMachineName );
  104. return TRUE;
  105. }
  106. BOOL
  107. TDebugExt::
  108. bDumpIniPrintProc(
  109. PVOID pIniPrintProc_,
  110. ULONG_PTR dwAddr
  111. )
  112. {
  113. PINIPRINTPROC pIniPrintProc = (PINIPRINTPROC)pIniPrintProc_;
  114. static DEBUG_FLAGS adfSpl[] = {
  115. { "UpdateWinIniDevices", SPL_UPDATE_WININI_DEVICES },
  116. { NULL, 0 }
  117. };
  118. if( !( pIniPrintProc->signature == IPP_SIGNATURE )){
  119. return FALSE;
  120. }
  121. Print( "IniPrintProc*\n" );
  122. Print( " pNext %x\n", pIniPrintProc->pNext );
  123. Print( " cRef <%d>\n", pIniPrintProc->cRef );
  124. Print( " pName " ); vDumpStr( pIniPrintProc->pName );
  125. Print( " pDLLName " ); vDumpStr( pIniPrintProc->pDLLName );
  126. Print( " cbDatatypes %x\n", pIniPrintProc->cbDatatypes );
  127. Print( " cDatatypes %x\n", pIniPrintProc->cDatatypes );
  128. Print( " pDatatypes %x\n", pIniPrintProc->pDatatypes );
  129. Print( " hLibrary %x\n", pIniPrintProc->hLibrary );
  130. Print( " Install %x\n", pIniPrintProc->Install );
  131. Print( " EnumDatatypes %x\n", pIniPrintProc->EnumDatatypes );
  132. Print( " Open %x\n", pIniPrintProc->Open );
  133. Print( " Print %x\n", pIniPrintProc->Print );
  134. Print( " Close %x\n", pIniPrintProc->Close );
  135. Print( " Control %x\n", pIniPrintProc->Control );
  136. Print( " CriticalSection @ %x\n", dwAddr
  137. + OFFSETOF( INIPRINTPROC, CriticalSection ));
  138. return TRUE;
  139. }
  140. BOOL
  141. TDebugExt::
  142. bDumpIniDriver(
  143. PVOID pIniDriver_,
  144. ULONG_PTR dwAddr
  145. )
  146. {
  147. PINIDRIVER pIniDriver = (PINIDRIVER)pIniDriver_;
  148. static DEBUG_FLAGS adfSpl[] = {
  149. { "UpdateWinIniDevices", SPL_UPDATE_WININI_DEVICES },
  150. { NULL, 0 }
  151. };
  152. if( !( pIniDriver->signature == ID_SIGNATURE )){
  153. return FALSE;
  154. }
  155. Print( "IniDriver*\n" );
  156. Print( " pNext %x\n", pIniDriver->pNext );
  157. Print( " cRef <%d>\n", pIniDriver->cRef );
  158. Print( " pName " ); vDumpStr( pIniDriver->pName );
  159. Print( " pDriverFile " ); vDumpStr( pIniDriver->pDriverFile );
  160. Print( " pConfigFile " ); vDumpStr( pIniDriver->pConfigFile );
  161. Print( " pDataFile " ); vDumpStr( pIniDriver->pDataFile );
  162. Print( " pHelpFile " ); vDumpStr( pIniDriver->pHelpFile );
  163. Print( " cchDependentFiles %x\n", pIniDriver->cchDependentFiles );
  164. Print( " pDependentFiles %x\n", pIniDriver->pDependentFiles );
  165. Print( " pMonitorName " ); vDumpStr( pIniDriver->pMonitorName );
  166. Print( " pDefaultDataType " ); vDumpStr( pIniDriver->pDefaultDataType );
  167. Print( " cVersion %x\n", pIniDriver->cVersion );
  168. Print( " pIniLangMonitor %x\n", pIniDriver->pIniLangMonitor );
  169. return TRUE;
  170. }
  171. BOOL
  172. TDebugExt::
  173. bDumpIniVersion(
  174. PVOID pIniVersion_,
  175. ULONG_PTR dwAddr
  176. )
  177. {
  178. PINIVERSION pIniVersion = (PINIVERSION)pIniVersion_;
  179. if( !( pIniVersion->signature == IV_SIGNATURE )){
  180. return FALSE;
  181. }
  182. Print( "IniVersion*\n" );
  183. Print( " pNext %x\n", pIniVersion->pNext );
  184. Print( " pName " ); vDumpStr( pIniVersion->pName );
  185. Print( " szDirectory " ); vDumpStr( pIniVersion->szDirectory );
  186. Print( " cMajorVersion %x\n", pIniVersion->cMajorVersion );
  187. Print( " cMinorVersion %x\n", pIniVersion->cMinorVersion );
  188. Print( " pIniDriver %x\n", pIniVersion->pIniDriver );
  189. return TRUE;
  190. }
  191. BOOL
  192. TDebugExt::
  193. bDumpIniEnvironment(
  194. PVOID pIniEnvironment_,
  195. ULONG_PTR dwAddr
  196. )
  197. {
  198. PINIENVIRONMENT pIniEnvironment = (PINIENVIRONMENT)pIniEnvironment_;
  199. if( !( pIniEnvironment->signature == IE_SIGNATURE )){
  200. return FALSE;
  201. }
  202. Print( "IniEnvironment*\n" );
  203. Print( " pNext %x\n", pIniEnvironment->pNext );
  204. Print( " cRef <%d>\n", pIniEnvironment->cRef );
  205. Print( " pName " ); vDumpStr( pIniEnvironment->pName );
  206. Print( " pDirectory " ); vDumpStr( pIniEnvironment->pDirectory );
  207. Print( " pIniVersion %x\n", pIniEnvironment->pIniVersion );
  208. Print( " pIniPrintProc %x\n", pIniEnvironment->pIniPrintProc );
  209. Print( " pIniSpooler %x\n", pIniEnvironment->pIniSpooler );
  210. return TRUE;
  211. }
  212. BOOL
  213. TDebugExt::
  214. bDumpIniMonitor(
  215. PVOID pIniMonitor_,
  216. ULONG_PTR dwAddr
  217. )
  218. {
  219. PINIMONITOR pIniMonitor = (PINIMONITOR)pIniMonitor_;
  220. if( !( pIniMonitor->signature == IMO_SIGNATURE )){
  221. return FALSE;
  222. }
  223. Print( "IniMonitor*\n" );
  224. Print( " pNext %x\n", pIniMonitor->pNext );
  225. Print( " cRef <%d>\n", pIniMonitor->cRef );
  226. Print( " pName " ); vDumpStr( pIniMonitor->pName );
  227. Print( " pMonitorDll " ); vDumpStr( pIniMonitor->pMonitorDll );
  228. Print( " hModule %x\n", pIniMonitor->hModule );
  229. Print( " == Monitor2 ==\n" );
  230. Print( " EnumPorts %x\n", pIniMonitor->Monitor2.pfnEnumPorts );
  231. Print( " OpenPort %x\n", pIniMonitor->Monitor2.pfnOpenPort );
  232. Print( " OpenPortEx %x\n", pIniMonitor->Monitor2.pfnOpenPortEx );
  233. Print( " StartDocPort %x\n", pIniMonitor->Monitor2.pfnStartDocPort );
  234. Print( " WritePort %x\n", pIniMonitor->Monitor2.pfnWritePort );
  235. Print( " ReadPort %x\n", pIniMonitor->Monitor2.pfnReadPort );
  236. Print( " EndDocPort %x\n", pIniMonitor->Monitor2.pfnEndDocPort );
  237. Print( " ClosePort %x\n", pIniMonitor->Monitor2.pfnClosePort );
  238. Print( " AddPort %x\n", pIniMonitor->Monitor2.pfnAddPort );
  239. Print( " AddPortsEx %x\n", pIniMonitor->Monitor2.pfnAddPortEx );
  240. Print( " ConfigurePort %x\n", pIniMonitor->Monitor2.pfnConfigurePort );
  241. Print( " DeletePort %x\n", pIniMonitor->Monitor2.pfnDeletePort );
  242. Print( " GetPDFromPort %x\n", pIniMonitor->Monitor2.pfnGetPrinterDataFromPort );
  243. Print( " SetPortTimeOuts %x\n", pIniMonitor->Monitor2.pfnSetPortTimeOuts );
  244. Print( " XcvOpenPort %x\n", pIniMonitor->Monitor2.pfnXcvOpenPort );
  245. Print( " XcvDataPort %x\n", pIniMonitor->Monitor2.pfnXcvDataPort );
  246. Print( " XcvClosePort %x\n", pIniMonitor->Monitor2.pfnXcvClosePort );
  247. Print( " Shutdown %x\n", pIniMonitor->Monitor2.pfnShutdown );
  248. Print( " Monitor @ %x\n", dwAddr + OFFSETOF( INIMONITOR, Monitor ));
  249. Print( " pIniSpooler %x\n", pIniMonitor->pIniSpooler );
  250. return TRUE;
  251. }
  252. BOOL
  253. TDebugExt::
  254. bDumpIniPort(
  255. PVOID pIniPort_,
  256. ULONG_PTR dwAddr
  257. )
  258. {
  259. PINIPORT pIniPort = (PINIPORT)pIniPort_;
  260. if( !( pIniPort->signature == IPO_SIGNATURE )){
  261. return FALSE;
  262. }
  263. Print( "IniPort*\n" );
  264. Print( " pNext %x\n", pIniPort->pNext );
  265. Print( " cRef <%d>\n", pIniPort->cRef );
  266. Print( " pName " ); vDumpStr( pIniPort->pName );
  267. Print( " hProc %x\n", pIniPort->hProc );
  268. Print( " Status %x\n", pIniPort->Status );
  269. Print( " PrinterStatus %x\n", pIniPort->PrinterStatus );
  270. Print( " pszStatus " ); vDumpStr( pIniPort->pszStatus );
  271. Print( " Semaphore %x\n", pIniPort->Semaphore );
  272. Print( " pIniJob %x\n", pIniPort->pIniJob );
  273. Print( " cPrinters <%d>\n", pIniPort->cPrinters );
  274. Print( " ppIniPrinter %x\n", pIniPort->ppIniPrinter );
  275. Print( " pIniMonitor %x\n", pIniPort->pIniMonitor );
  276. Print( " pIniLangMonitor %x\n", pIniPort->pIniLangMonitor );
  277. Print( " hEvent %x\n", pIniPort->hEvent );
  278. Print( " hPort %x\n", pIniPort->hPort );
  279. Print( " Ready %x\n", pIniPort->Ready );
  280. Print( " hPortThread %x\n", pIniPort->hPortThread );
  281. Print( " pIniSpooler %x\n", pIniPort->pIniSpooler );
  282. Print( "InCriticalSection %x\n", pIniPort->InCriticalSection );
  283. return TRUE;
  284. }
  285. BOOL
  286. TDebugExt::
  287. bDumpIniJob(
  288. PVOID pIniJob_,
  289. ULONG_PTR dwAddr
  290. )
  291. {
  292. PINIJOB pIniJob = (PINIJOB)pIniJob_;
  293. static DEBUG_FLAGS adfJobStatus[] = {
  294. { "Printing", JOB_PRINTING },
  295. { "Paused", JOB_PAUSED },
  296. { "Error", JOB_ERROR },
  297. { "Offline", JOB_OFFLINE },
  298. { "PaperOut", JOB_PAPEROUT },
  299. { "PendingDeletion", JOB_PENDING_DELETION },
  300. { "Spooling", JOB_SPOOLING },
  301. { "Despooling", JOB_DESPOOLING },
  302. { "Direct", JOB_DIRECT },
  303. { "Complete", JOB_COMPLETE },
  304. { "Printed", JOB_PRINTED },
  305. { "Restart", JOB_RESTART },
  306. { "Remote", JOB_REMOTE },
  307. { "NotificationSent", JOB_NOTIFICATION_SENT },
  308. { "PrintToFile", JOB_PRINT_TO_FILE },
  309. { "TypeAddJob", JOB_TYPE_ADDJOB },
  310. { "BlockedDevQ", JOB_BLOCKED_DEVQ },
  311. { "SchecduleJob", JOB_SCHEDULE_JOB },
  312. { "Timeout", JOB_TIMEOUT },
  313. { "Abandon", JOB_ABANDON },
  314. { "Deleted", JOB_DELETED },
  315. { "TrueEOJ", JOB_TRUE_EOJ },
  316. { "Compound/Hidden", JOB_COMPOUND },
  317. { NULL, 0 }
  318. };
  319. if( !( pIniJob->signature == IJ_SIGNATURE )){
  320. return FALSE;
  321. }
  322. Print( "IniJob*\n" );
  323. Print( " pIniNextJob %x\n", pIniJob->pIniNextJob );
  324. Print( " pIniPrevJob %x\n", pIniJob->pIniPrevJob );
  325. Print( " cRef <%d>\n", pIniJob->cRef );
  326. Print( " Status " ); vDumpFlags( pIniJob->Status, adfJobStatus );
  327. Print( " JobId <%d>\n", pIniJob->JobId );
  328. Print( " Priority <%d>\n", pIniJob->Priority );
  329. Print( " pNotify " ); vDumpStr( pIniJob->pNotify );
  330. Print( " pUser " ); vDumpStr( pIniJob->pUser );
  331. Print( " pMachineName " ); vDumpStr( pIniJob->pMachineName );
  332. Print( " pDocument " ); vDumpStr( pIniJob->pDocument );
  333. Print( " pOutputFile " ); vDumpStr( pIniJob->pOutputFile );
  334. Print( " pIniPrinter %x\n", pIniJob->pIniPrinter );
  335. Print( " pIniDriver %x\n", pIniJob->pIniDriver );
  336. Print( " pDevMode %x\n", pIniJob->pDevMode );
  337. Print( " pIniPrintProc %x\n", pIniJob->pIniPrintProc );
  338. Print( " pDatatype " ); vDumpStr( pIniJob->pDatatype );
  339. Print( " pParameters " ); vDumpStr( pIniJob->pParameters );
  340. Print( " Submitted @ %x\n", dwAddr + OFFSETOF( INIJOB, Submitted ));
  341. Print( " Time %x\n", pIniJob->Time );
  342. Print( " StartTime %x\n", pIniJob->StartTime );
  343. Print( " UntilTime %x\n", pIniJob->UntilTime );
  344. Print( " Size %x\n", pIniJob->Size );
  345. Print( " hWriteFile %x\n", pIniJob->hWriteFile );
  346. Print( " pStatus " ); vDumpStr( pIniJob->pStatus );
  347. Print( " pBuffer %x\n", pIniJob->pBuffer );
  348. Print( " cbBuffer %x\n", pIniJob->cbBuffer );
  349. Print( " WaitForRead %x\n", pIniJob->WaitForRead );
  350. Print( " WaitForWrite %x\n", pIniJob->WaitForWrite );
  351. Print( "StartDocComplete %x\n", pIniJob->StartDocComplete );
  352. Print( " StartDocError %x\n", pIniJob->StartDocError );
  353. Print( " pIniPort %x\n", pIniJob->pIniPort );
  354. Print( " hToken %x\n", pIniJob->hToken );
  355. Print( " pSD %x\n", pIniJob->pSecurityDescriptor );
  356. Print( " cPagesPrinted %x\n", pIniJob->cPagesPrinted );
  357. Print( " cPages %x\n", pIniJob->cPages );
  358. Print( " GenerateOnClose %x\n", pIniJob->GenerateOnClose );
  359. Print( " cbPrinted %x\n", pIniJob->cbPrinted );
  360. Print( " NextJobId %x\n", pIniJob->NextJobId );
  361. Print( " pCurrentIniJob %x\n", pIniJob->pCurrentIniJob );
  362. return TRUE;
  363. }
  364. BOOL
  365. TDebugExt::
  366. bDumpSpool(
  367. PVOID pSpool_,
  368. ULONG_PTR dwAddr
  369. )
  370. {
  371. PSPOOL pSpool = (PSPOOL)pSpool_;
  372. if( !( pSpool->signature == SJ_SIGNATURE )){
  373. return FALSE;
  374. }
  375. Print( "Spool*\n" );
  376. Print( " pNext %x\n", pSpool->pNext );
  377. Print( " cRef <%d>\n", pSpool->cRef );
  378. Print( " pName " ); vDumpStr( pSpool->pName );
  379. Print( " pDatatpe " ); vDumpStr( pSpool->pDatatype );
  380. Print( " pIniPrintProc %x\n", pSpool->pIniPrintProc );
  381. Print( " pDevMode %x\n", pSpool->pDevMode );
  382. Print( " pIniPrinter %x\n", pSpool->pIniPrinter );
  383. Print( " pIniPort %x\n", pSpool->pIniPort );
  384. Print( " pIniJob %x\n", pSpool->pIniJob );
  385. Print( " TypeofHandle %x\n", pSpool->TypeofHandle );
  386. Print( " pIniNetPort %x\n", pSpool->pIniNetPort );
  387. Print( " hPort %x\n", pSpool->hPort );
  388. Print( " Status %x\n", pSpool->Status );
  389. Print( " GrantedAccess %x\n", pSpool->GrantedAccess );
  390. Print( " ChangeFlags %x\n", pSpool->ChangeFlags );
  391. Print( " WaitFlags %x\n", pSpool->WaitFlags );
  392. Print( " pChangeFlags %x\n", pSpool->pChangeFlags );
  393. Print( " ChangeEvent %x\n", pSpool->ChangeEvent );
  394. Print( " OpenPortError %x\n", pSpool->OpenPortError );
  395. Print( " hNotify %x\n", pSpool->hNotify );
  396. Print( " eStatus %x\n", pSpool->eStatus );
  397. Print( " pIniSpooler %x\n", pSpool->pIniSpooler );
  398. Print( " GenerateOnClose %x\n", pSpool->GenerateOnClose );
  399. Print( " hFile %x\n", pSpool->hFile );
  400. Print( "adwNotifyVectors @ %x\n", dwAddr
  401. + OFFSETOF( SPOOL, adwNotifyVectors ));
  402. Print( " pUserName " ); vDumpStr( pSpool->SplClientInfo1.pUserName );
  403. Print( " pMachineName " ); vDumpStr( pSpool->SplClientInfo1.pMachineName );
  404. return TRUE;
  405. }
  406. BOOL
  407. TDebugExt::
  408. bDumpIniPrinter(
  409. PVOID pIniPrinter_,
  410. ULONG_PTR dwAddr
  411. )
  412. {
  413. PINIPRINTER pIniPrinter = (PINIPRINTER)pIniPrinter_;
  414. static DEBUG_FLAGS adfStatus[] = {
  415. { "Paused", PRINTER_PAUSED },
  416. { "Error", PRINTER_ERROR },
  417. { "Offline", PRINTER_OFFLINE },
  418. { "PaperOut", PRINTER_PAPEROUT },
  419. { "PendingDeletion", PRINTER_PENDING_DELETION },
  420. { "ZombieObject", PRINTER_ZOMBIE_OBJECT },
  421. { "PendingCreation", PRINTER_PENDING_CREATION },
  422. { "Ok", PRINTER_OK },
  423. { "FromReg", PRINTER_FROM_REG },
  424. { "WasShared", PRINTER_WAS_SHARED },
  425. { NULL, 0 }
  426. };
  427. static DEBUG_FLAGS adfAttributes[] = {
  428. { "Queued", PRINTER_ATTRIBUTE_QUEUED },
  429. { "Direct", PRINTER_ATTRIBUTE_DIRECT },
  430. { "Default", PRINTER_ATTRIBUTE_DEFAULT },
  431. { "Shared", PRINTER_ATTRIBUTE_SHARED },
  432. { "Network", PRINTER_ATTRIBUTE_NETWORK },
  433. { "Hidden", PRINTER_ATTRIBUTE_HIDDEN },
  434. { "Local", PRINTER_ATTRIBUTE_LOCAL },
  435. { "DevQ", PRINTER_ATTRIBUTE_ENABLE_DEVQ },
  436. { "KeepPrintedJobs", PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS },
  437. { "DoCompletedFirst", PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST },
  438. { "WorkOffline", PRINTER_ATTRIBUTE_WORK_OFFLINE },
  439. { "EnableBidi", PRINTER_ATTRIBUTE_ENABLE_BIDI },
  440. { NULL, 0 }
  441. };
  442. if( !( pIniPrinter->signature == IP_SIGNATURE )){
  443. return FALSE;
  444. }
  445. Print( "IniPrinter*\n" );
  446. Print( " pNext %x\n", pIniPrinter->pNext );
  447. Print( " cRef %x\n", pIniPrinter->cRef );
  448. Print( " pName " ); vDumpStr( pIniPrinter->pName );
  449. Print( " pShareName " ); vDumpStr( pIniPrinter->pShareName );
  450. Print( " pIniPrintProc %x\n", pIniPrinter->pIniPrintProc );
  451. Print( " pDatatype " ); vDumpStr( pIniPrinter->pDatatype );
  452. Print( " pParameters " ); vDumpStr( pIniPrinter->pParameters );
  453. Print( " pComment " ); vDumpStr( pIniPrinter->pComment );
  454. Print( " pIniDriver %x\n", pIniPrinter->pIniDriver );
  455. Print( " cbDevMode %x\n", pIniPrinter->cbDevMode );
  456. Print( " pDevMode %x\n", pIniPrinter->pDevMode );
  457. Print( " Priority <%d>\n", pIniPrinter->Priority );
  458. Print( " DefaultPriority <%d>\n", pIniPrinter->DefaultPriority );
  459. Print( " StartTime %x\n", pIniPrinter->StartTime );
  460. Print( " UntilTime %x\n", pIniPrinter->UntilTime );
  461. Print( " pSepFile " ); vDumpStr( pIniPrinter->pSepFile );
  462. Print( " Status " );
  463. vDumpFlags( pIniPrinter->Status, adfStatus );
  464. Print( " pLocation " ); vDumpStr( pIniPrinter->pLocation );
  465. Print( " Attributes " );
  466. vDumpFlags( pIniPrinter->Attributes, adfAttributes );
  467. Print( " cJobs <%d>\n", pIniPrinter->cJobs );
  468. Print( " AveragePPM %x\n", pIniPrinter->AveragePPM );
  469. Print( " GenerateOnClose %x\n", pIniPrinter->GenerateOnClose );
  470. Print( " pIniNetPort %x\n", pIniPrinter->pIniNetPort );
  471. Print( " ==== pIniFirstJob %x\n", pIniPrinter->pIniFirstJob );
  472. Print( " pIniLastJob %x\n", pIniPrinter->pIniLastJob );
  473. Print( " pSecurityDescriptor %x\n", pIniPrinter->pSecurityDescriptor );
  474. Print( " pSpool %x\n", pIniPrinter->pSpool );
  475. Print( " pSpoolDir " ); vDumpStr( pIniPrinter->pSpoolDir );
  476. Print( " cTotalJobs %x\n", pIniPrinter->cTotalJobs );
  477. Print( " cTotalBytes %x\n", pIniPrinter->cTotalBytes );
  478. Print( " stUpTime " ); vDumpTime( pIniPrinter->stUpTime );
  479. Print( " MaxcRef %x\n", pIniPrinter->MaxcRef );
  480. Print( " cTotalPagesPrinted %x\n", pIniPrinter->cTotalPagesPrinted );
  481. Print( " cSpooling %x\n", pIniPrinter->cSpooling );
  482. Print( " cMaxSpooling %x\n", pIniPrinter->cMaxSpooling );
  483. Print( " cErrorOutOfPaper %x\n", pIniPrinter->cErrorOutOfPaper );
  484. Print( " cErrorNotReady %x\n", pIniPrinter->cErrorNotReady );
  485. Print( " cJobError %x\n", pIniPrinter->cJobError );
  486. Print( " pIniSpooler %x\n", pIniPrinter->pIniSpooler );
  487. Print( " cZombieRef %x\n", pIniPrinter->cZombieRef );
  488. Print( " dwLastError %x\n", pIniPrinter->dwLastError );
  489. Print( " pExtraData %x\n", pIniPrinter->pExtraData );
  490. Print( " cChangeID %x\n", pIniPrinter->cChangeID );
  491. Print( " dnsTimeout %x\n", pIniPrinter->dnsTimeout );
  492. Print( " txTimeout %x\n", pIniPrinter->txTimeout );
  493. Print( " pszObjectGUID " ); vDumpStr( pIniPrinter->pszObjectGUID );
  494. Print( " DsKeyUpdate %x\n", pIniPrinter->DsKeyUpdate );
  495. Print( "DsKeyUpdateForeground %x\n", pIniPrinter->DsKeyUpdateForeground );
  496. return TRUE;
  497. }
  498. /********************************************************************
  499. Devmodes
  500. ********************************************************************/
  501. DEBUG_FLAGS gadfDevModeFields[] = {
  502. { "Orientation", DM_ORIENTATION },
  503. { "PaperSize", DM_PAPERSIZE },
  504. { "PaperLength", DM_PAPERLENGTH },
  505. { "PaperWidth", DM_PAPERWIDTH },
  506. { "Scale", DM_SCALE },
  507. { "Copies", DM_COPIES },
  508. { "DefaultSource", DM_DEFAULTSOURCE },
  509. { "PrintQuality", DM_PRINTQUALITY },
  510. { "Color", DM_COLOR },
  511. { "Duplex", DM_DUPLEX },
  512. { "YResolution", DM_YRESOLUTION },
  513. { "TTOption", DM_TTOPTION },
  514. { "Collate", DM_COLLATE },
  515. { "FormName", DM_FORMNAME },
  516. { "LogPixels", DM_LOGPIXELS },
  517. { "BitsPerPel", DM_BITSPERPEL },
  518. { "PelsWidth", DM_PELSWIDTH },
  519. { "PelsHeight", DM_PELSHEIGHT },
  520. { "DisplayFlags", DM_DISPLAYFLAGS },
  521. { "DisplayFrequency", DM_DISPLAYFREQUENCY },
  522. { "ICMMethod", DM_ICMMETHOD },
  523. { "ICMIntent", DM_ICMINTENT },
  524. { "MediaType", DM_MEDIATYPE },
  525. { "DitherType", DM_DITHERTYPE },
  526. { NULL, 0 }
  527. };
  528. DEBUG_VALUES gadvDevModeDefaultSource[] = {
  529. { "Upper/OnlyOne", DMBIN_UPPER },
  530. { "Lower", DMBIN_LOWER },
  531. { "Middle", DMBIN_MIDDLE },
  532. { "Manual", DMBIN_MANUAL },
  533. { "Envelope", DMBIN_ENVELOPE },
  534. { "EnvManual", DMBIN_ENVMANUAL },
  535. { "Auto", DMBIN_AUTO },
  536. { "Tractor", DMBIN_TRACTOR },
  537. { "SmallFmt", DMBIN_SMALLFMT },
  538. { "LargeFmt", DMBIN_LARGEFMT },
  539. { "LargeCapacity", DMBIN_LARGECAPACITY },
  540. { "Cassette", DMBIN_CASSETTE },
  541. { "FormSource", DMBIN_FORMSOURCE },
  542. { NULL, 0 }
  543. };
  544. DEBUG_VALUES gadvDevModePapers[] = {
  545. { "Letter", DMPAPER_LETTER },
  546. { "Legal", DMPAPER_LEGAL },
  547. { "A4", DMPAPER_A4 },
  548. { "CSheet", DMPAPER_CSHEET },
  549. { "DSheet", DMPAPER_DSHEET },
  550. { "ESheet", DMPAPER_ESHEET },
  551. { "LetterSmall", DMPAPER_LETTERSMALL },
  552. { "Tabloid", DMPAPER_TABLOID },
  553. { "Ledger", DMPAPER_LEDGER },
  554. { "Statement", DMPAPER_STATEMENT },
  555. { "Executive", DMPAPER_EXECUTIVE },
  556. { "A3", DMPAPER_A3 },
  557. { "A4Small", DMPAPER_A4SMALL },
  558. { "A5", DMPAPER_A5 },
  559. { "B4", DMPAPER_B4 },
  560. { "B5", DMPAPER_B5 },
  561. { "Folio", DMPAPER_FOLIO },
  562. { "Quarto", DMPAPER_QUARTO },
  563. { "10x14", DMPAPER_10X14 },
  564. { "11x17", DMPAPER_11X17 },
  565. { "Note", DMPAPER_NOTE },
  566. { "Env_9", DMPAPER_ENV_9 },
  567. { "Env_10", DMPAPER_ENV_10 },
  568. { "Env_11", DMPAPER_ENV_11 },
  569. { "Env_12", DMPAPER_ENV_12 },
  570. { "Env_14", DMPAPER_ENV_14 },
  571. { "Env_DL", DMPAPER_ENV_DL },
  572. { "Env_C5", DMPAPER_ENV_C6 },
  573. { "Env_C65", DMPAPER_ENV_C65 },
  574. { "Env_B4", DMPAPER_ENV_B4 },
  575. { "Env_B5", DMPAPER_ENV_B5 },
  576. { "Env_B6", DMPAPER_ENV_B6 },
  577. { "Env_Italy", DMPAPER_ENV_ITALY },
  578. { "Env_Monarch", DMPAPER_ENV_MONARCH },
  579. { "Env_Personal", DMPAPER_ENV_PERSONAL },
  580. { "Fanfold_US", DMPAPER_FANFOLD_US },
  581. { "Fanfold_Std_German", DMPAPER_FANFOLD_STD_GERMAN },
  582. { "Fanfold_Lgl_German", DMPAPER_FANFOLD_LGL_GERMAN },
  583. { NULL, 0 }
  584. };
  585. DEBUG_VALUES gadvDevModePrintQuality[] = {
  586. { "High", (ULONG_PTR)DMRES_HIGH },
  587. { "Medium", (ULONG_PTR)DMRES_MEDIUM },
  588. { "Low", (ULONG_PTR)DMRES_LOW },
  589. { "Draft", (ULONG_PTR)DMRES_DRAFT },
  590. { NULL, 0 }
  591. };
  592. DEBUG_VALUES gadvDevModeColor[] = {
  593. { "Color", DMCOLOR_COLOR },
  594. { "Monochrome", DMCOLOR_MONOCHROME },
  595. { NULL, 0 }
  596. };
  597. DEBUG_VALUES gadvDevModeDuplex[] = {
  598. { "Simplex", DMDUP_SIMPLEX },
  599. { "Horizontal", DMDUP_HORIZONTAL },
  600. { "Vertical", DMDUP_VERTICAL },
  601. { NULL, 0 }
  602. };
  603. DEBUG_VALUES gadvDevModeTTOption[] = {
  604. { "Bitmap", DMTT_BITMAP },
  605. { "DownLoad", DMTT_DOWNLOAD },
  606. { "SubDev", DMTT_SUBDEV },
  607. { NULL, 0 }
  608. };
  609. DEBUG_VALUES gadvDevModeCollate[] = {
  610. { "True", DMCOLLATE_TRUE },
  611. { "False", DMCOLLATE_FALSE },
  612. { NULL, 0 }
  613. };
  614. DEBUG_VALUES gadvDevModeICMMethod[] = {
  615. { "None", DMICMMETHOD_NONE },
  616. { "System", DMICMMETHOD_SYSTEM },
  617. { "Driver", DMICMMETHOD_DRIVER },
  618. { "Device", DMICMMETHOD_DEVICE },
  619. { NULL, 0 }
  620. };
  621. DEBUG_VALUES gadvDevModeICMIntent[] = {
  622. { "Saturate", DMICM_SATURATE },
  623. { "Contrast", DMICM_CONTRAST },
  624. { "ColorMetric", DMICM_COLORIMETRIC },
  625. { NULL, 0 }
  626. };
  627. DEBUG_VALUES gadvDevModeMediaType[] = {
  628. { "Standard", DMMEDIA_STANDARD },
  629. { "Glossy", DMMEDIA_GLOSSY },
  630. { "Transparency", DMMEDIA_TRANSPARENCY },
  631. { NULL, 0 }
  632. };
  633. DEBUG_VALUES gadvDevModeDitherType[] = {
  634. { "None", DMDITHER_NONE },
  635. { "Coarse", DMDITHER_COARSE },
  636. { "Fine", DMDITHER_FINE },
  637. { "LineArt", DMDITHER_LINEART },
  638. { "GrayScale", DMDITHER_GRAYSCALE },
  639. { NULL, 0 }
  640. };
  641. DEBUG_VALUES gadvDevModeOrient[] = {
  642. { "Portrait", DMORIENT_PORTRAIT },
  643. { "Landscape", DMORIENT_LANDSCAPE },
  644. { NULL, 0 }
  645. };
  646. BOOL
  647. TDebugExt::
  648. bDumpDevMode(
  649. PVOID pDevMode_,
  650. ULONG_PTR dwAddr
  651. )
  652. {
  653. PDEVMODE pDevMode = (PDEVMODE)pDevMode_;
  654. ULONG_PTR dwTotalSize = pDevMode->dmSize + pDevMode->dmDriverExtra;
  655. Print( "DevMode*\n" );
  656. Print( " dmDeviceName %ws\n", pDevMode->dmDeviceName );
  657. Print( " dmSpecVersion %x\n", pDevMode->dmSpecVersion );
  658. Print( " dmDriverVersion %x\n", pDevMode->dmDriverVersion );
  659. Print( "==== dmSize %x <%d> TotalSize %x <%d>\n",
  660. pDevMode->dmSize,
  661. pDevMode->dmSize,
  662. dwTotalSize, dwTotalSize );
  663. Print( " dmDriverExtra %x <%d>\n",
  664. pDevMode->dmDriverExtra,
  665. pDevMode->dmDriverExtra );
  666. Print( " dmFields " );
  667. vDumpFlags( pDevMode->dmFields, gadfDevModeFields );
  668. Print( " dmOrientation " );
  669. vDumpValue( pDevMode->dmOrientation, gadvDevModeOrient );
  670. Print( " dmPaperSize " );
  671. vDumpValue( pDevMode->dmPaperSize, gadvDevModePapers );
  672. Print( " dmPaperLength %x\n", pDevMode->dmPaperLength );
  673. Print( " dmPaperWidth %x\n", pDevMode->dmPaperWidth );
  674. Print( " dmScale %x\n", pDevMode->dmScale );
  675. Print( " dmCopies %x\n", pDevMode->dmCopies );
  676. Print( " dmDefaultSource " );
  677. vDumpValue( pDevMode->dmDefaultSource, gadvDevModeDefaultSource );
  678. Print( " dmPrintQuality " );
  679. vDumpValue( pDevMode->dmPrintQuality, gadvDevModePrintQuality );
  680. Print( " dmColor " );
  681. vDumpValue( pDevMode->dmColor, gadvDevModeColor );
  682. Print( " dmDuplex " );
  683. vDumpValue( pDevMode->dmDuplex, gadvDevModeDuplex );
  684. Print( " dmYResolution %x\n", pDevMode->dmYResolution );
  685. Print( " dmTTOption " );
  686. vDumpValue( pDevMode->dmTTOption, gadvDevModeTTOption );
  687. Print( " dmCollate " );
  688. vDumpValue( pDevMode->dmCollate, gadvDevModeCollate );
  689. Print( "==== dmFormName %ws\n", pDevMode->dmFormName );
  690. Print( " dmLogPixels %x\n", pDevMode->dmLogPixels );
  691. Print( " dmBitsPerPel %x\n", pDevMode->dmBitsPerPel );
  692. Print( " dmPelsWidth %x\n", pDevMode->dmPelsWidth );
  693. Print( " dmPelsHeight %x\n", pDevMode->dmPelsHeight );
  694. Print( " dmDisplayFlags %x\n", pDevMode->dmDisplayFlags );
  695. Print( " dmDisplayFrequency %x\n", pDevMode->dmDisplayFrequency );
  696. Print( "==== dmICMMethod " );
  697. vDumpValue( pDevMode->dmICMMethod, gadvDevModeICMMethod );
  698. Print( " dmICMIntent " );
  699. vDumpValue( pDevMode->dmICMIntent, gadvDevModeICMIntent );
  700. Print( " dmMediaType " );
  701. vDumpValue( pDevMode->dmMediaType, gadvDevModeMediaType );
  702. Print( " dmDitherType " );
  703. vDumpValue( pDevMode->dmDitherType, gadvDevModeDitherType );
  704. Print( "==== Private at %x\n", dwAddr+pDevMode->dmSize );
  705. return TRUE;
  706. }
  707. BOOL
  708. TDebugExt::
  709. bDumpDevModeA(
  710. PVOID pDevModeA_,
  711. ULONG_PTR dwAddr
  712. )
  713. {
  714. PDEVMODEA pDevMode = (PDEVMODEA)pDevModeA_;
  715. ULONG_PTR dwTotalSize = pDevMode->dmSize + pDevMode->dmDriverExtra;
  716. Print( "DevModeA*\n" );
  717. Print( " dmDeviceName %hs\n", pDevMode->dmDeviceName );
  718. Print( " dmSpecVersion %x\n", pDevMode->dmSpecVersion );
  719. Print( " dmDriverVersion %x\n", pDevMode->dmDriverVersion );
  720. Print( "==== dmSize %x <%d> TotalSize %x <%d>\n",
  721. pDevMode->dmSize,
  722. pDevMode->dmSize,
  723. dwTotalSize, dwTotalSize );
  724. Print( " dmDriverExtra %x <%d>\n",
  725. pDevMode->dmDriverExtra,
  726. pDevMode->dmDriverExtra );
  727. Print( " dmFields " );
  728. vDumpFlags( pDevMode->dmFields, gadfDevModeFields );
  729. Print( " dmOrientation " );
  730. vDumpValue( pDevMode->dmOrientation, gadvDevModeOrient );
  731. Print( " dmPaperSize " );
  732. vDumpValue( pDevMode->dmPaperSize, gadvDevModePapers );
  733. Print( " dmPaperLength %x\n", pDevMode->dmPaperLength );
  734. Print( " dmPaperWidth %x\n", pDevMode->dmPaperWidth );
  735. Print( " dmScale %x\n", pDevMode->dmScale );
  736. Print( " dmCopies %x\n", pDevMode->dmCopies );
  737. Print( " dmDefaultSource " );
  738. vDumpValue( pDevMode->dmDefaultSource, gadvDevModeDefaultSource );
  739. Print( " dmPrintQuality " );
  740. vDumpValue( pDevMode->dmPrintQuality, gadvDevModePrintQuality );
  741. Print( " dmColor " );
  742. vDumpValue( pDevMode->dmColor, gadvDevModeColor );
  743. Print( " dmDuplex " );
  744. vDumpValue( pDevMode->dmDuplex, gadvDevModeDuplex );
  745. Print( " dmYResolution %x\n", pDevMode->dmYResolution );
  746. Print( " dmTTOption " );
  747. vDumpValue( pDevMode->dmTTOption, gadvDevModeTTOption );
  748. Print( " dmCollate " );
  749. vDumpValue( pDevMode->dmCollate, gadvDevModeCollate );
  750. Print( "==== dmFormName %hs\n", pDevMode->dmFormName );
  751. Print( " dmLogPixels %x\n", pDevMode->dmLogPixels );
  752. Print( " dmBitsPerPel %x\n", pDevMode->dmBitsPerPel );
  753. Print( " dmPelsWidth %x\n", pDevMode->dmPelsWidth );
  754. Print( " dmPelsHeight %x\n", pDevMode->dmPelsHeight );
  755. Print( " dmDisplayFlags %x\n", pDevMode->dmDisplayFlags );
  756. Print( " dmDisplayFrequency %x\n", pDevMode->dmDisplayFrequency );
  757. Print( "==== dmICMMethod " );
  758. vDumpValue( pDevMode->dmICMMethod, gadvDevModeICMMethod );
  759. Print( " dmICMIntent " );
  760. vDumpValue( pDevMode->dmICMIntent, gadvDevModeICMIntent );
  761. Print( " dmMediaType " );
  762. vDumpValue( pDevMode->dmMediaType, gadvDevModeMediaType );
  763. Print( " dmDitherType " );
  764. vDumpValue( pDevMode->dmDitherType, gadvDevModeDitherType );
  765. Print( "==== Private at %x\n", dwAddr+pDevMode->dmSize );
  766. return TRUE;
  767. }
  768. #if 0
  769. BOOL
  770. TDebugExt::
  771. bDumpIniPrinter(
  772. PVOID pIniPrinter_,
  773. ULONG_PTR dwAddr
  774. )
  775. {
  776. PIniPrinter pIniPrinter = (PIniPrinter)pIniPrinter_;
  777. static DEBUG_FLAGS adfSpl[] = {
  778. { "UpdateWinIniDevices", SPL_UPDATE_WININI_DEVICES },
  779. { NULL, 0 }
  780. };
  781. if( !( pIniPrinter->signature == ID_SIGNATURE )){
  782. return FALSE;
  783. }
  784. Print( "IniPrinter*\n" );
  785. return TRUE;
  786. }
  787. #endif
  788. /********************************************************************
  789. Extension entrypoints.
  790. ********************************************************************/
  791. DEBUG_EXT_ENTRY( ds, INISPOOLER, bDumpIniSpooler, "&localspl!pLocalIniSpooler", FALSE )
  792. DEBUG_EXT_ENTRY( ddev, DEVMODE, bDumpDevMode, NULL, FALSE )
  793. DEBUG_EXT_ENTRY( ddeva, DEVMODEA, bDumpDevModeA, NULL, FALSE )
  794. DEBUG_EXT_ENTRY( dlcs,
  795. MCritSec,
  796. bDumpCritSec,
  797. "&localspl!hcsSpoolerSection",
  798. TRUE )
  799. DEBUG_EXT_HEAD(lastlog)
  800. {
  801. DEBUG_EXT_SETUP_VARS();
  802. ULONG_PTR dwAddress = 0;
  803. //
  804. // Read in localspl's gDbgPointers.
  805. //
  806. DBG_POINTERS DbgPointers;
  807. ULONG_PTR ppDbgPointers = 0;
  808. ULONG_PTR pDbgPointers = 0;
  809. ppDbgPointers = EvalExpression( "&localspl!gpDbgPointers" );
  810. if( !ppDbgPointers ){
  811. Print( "<Unable to resolve localspl!gpDbgPointers>\n" );
  812. return;
  813. }
  814. move( pDbgPointers, ppDbgPointers );
  815. if( !pDbgPointers ){
  816. Print( "<Unable to read valid localspl!gpDbgPointers>\n" );
  817. return;
  818. }
  819. move( DbgPointers, pDbgPointers );
  820. if( !DbgPointers.pbtTraceLog ){
  821. Print( "<Unable to read valid DbgPointers.pbtTraceLog>\n" );
  822. return;
  823. }
  824. vDumpTraceWithFlags( lpArgumentString, (ULONG_PTR)DbgPointers.pbtTraceLog );
  825. }
  826. /********************************************************************
  827. Signature matching dump function.
  828. ********************************************************************/
  829. #define DEBUG_EXT_TRY_SETUP() \
  830. PBYTE var = (PBYTE)EvalExpression( lpArgumentString ); \
  831. PVOID pvData; \
  832. BOOL bDone; \
  833. Print( "%x ", var )
  834. #define DEBUG_EXT_TRY( struct, func ) \
  835. pvData = LocalAlloc( LPTR, sizeof( struct )); \
  836. move2( pvData, var, sizeof( struct )); \
  837. bDone = TDebugExt::func( pvData, (ULONG_PTR)var ); \
  838. LocalFree( pvData ); \
  839. \
  840. if( bDone ){ \
  841. return; \
  842. }
  843. #define DEBUG_EXT_TRY_DONE() \
  844. Print( "<No Match %x>\n", var )
  845. DEBUG_EXT_HEAD( d )
  846. {
  847. DEBUG_EXT_SETUP_VARS();
  848. DEBUG_EXT_TRY_SETUP();
  849. DEBUG_EXT_TRY( INISPOOLER, bDumpIniSpooler );
  850. DEBUG_EXT_TRY( INIPRINTER, bDumpIniPrinter );
  851. DEBUG_EXT_TRY( INIPRINTPROC, bDumpIniPrintProc );
  852. DEBUG_EXT_TRY( INIVERSION, bDumpIniVersion );
  853. DEBUG_EXT_TRY( INIDRIVER, bDumpIniDriver );
  854. DEBUG_EXT_TRY( INIENVIRONMENT, bDumpIniEnvironment );
  855. DEBUG_EXT_TRY( INIMONITOR, bDumpIniMonitor );
  856. DEBUG_EXT_TRY( INIJOB, bDumpIniJob );
  857. DEBUG_EXT_TRY( INIPORT, bDumpIniPort );
  858. DEBUG_EXT_TRY( SPOOL, bDumpSpool );
  859. DEBUG_EXT_TRY_DONE();
  860. }