Leaked source code of windows server 2003
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.

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