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.

701 lines
19 KiB

  1. /*++ BUILD Version: 0001 // Increment this if a change has global effects
  2. Copyright (c) 1985-1999, Microsoft Corporation
  3. Module Name:
  4. vdmdbg.h
  5. Abstract:
  6. Prodecure declarations, constant definitions, type definition and macros
  7. for the VDMDBG.DLL VDM Debugger interface.
  8. --*/
  9. #ifndef _VDMDBG_
  10. #define _VDMDBG_
  11. #if _MSC_VER > 1000
  12. #pragma once
  13. #endif
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17. #include <pshpack4.h>
  18. #define STATUS_VDM_EVENT STATUS_SEGMENT_NOTIFICATION
  19. #ifndef DBG_SEGLOAD
  20. #define DBG_SEGLOAD 0
  21. #define DBG_SEGMOVE 1
  22. #define DBG_SEGFREE 2
  23. #define DBG_MODLOAD 3
  24. #define DBG_MODFREE 4
  25. #define DBG_SINGLESTEP 5
  26. #define DBG_BREAK 6
  27. #define DBG_GPFAULT 7
  28. #define DBG_DIVOVERFLOW 8
  29. #define DBG_INSTRFAULT 9
  30. #define DBG_TASKSTART 10
  31. #define DBG_TASKSTOP 11
  32. #define DBG_DLLSTART 12
  33. #define DBG_DLLSTOP 13
  34. #define DBG_ATTACH 14
  35. #define DBG_TOOLHELP 15
  36. #define DBG_STACKFAULT 16
  37. #define DBG_WOWINIT 17
  38. #define DBG_TEMPBP 18
  39. #define DBG_MODMOVE 19
  40. #define DBG_INIT 20
  41. #define DBG_GPFAULT2 21
  42. #endif
  43. //
  44. // These flags are set in the same WORD as the DBG_ event id's (above).
  45. //
  46. #define VDMEVENT_NEEDS_INTERACTIVE 0x8000
  47. #define VDMEVENT_VERBOSE 0x4000
  48. #define VDMEVENT_PE 0x2000
  49. #define VDMEVENT_ALLFLAGS 0xe000
  50. //
  51. // These flags are set in the second WORD of the exception event
  52. // parameters.
  53. //
  54. #define VDMEVENT_V86 0x0001
  55. #define VDMEVENT_PM16 0x0002
  56. //
  57. // The following flags control the contents of the CONTEXT structure.
  58. //
  59. #define VDMCONTEXT_i386 0x00010000 // this assumes that i386 and
  60. #define VDMCONTEXT_i486 0x00010000 // i486 have identical context records
  61. #define VDMCONTEXT_CONTROL (VDMCONTEXT_i386 | 0x00000001L) // SS:SP, CS:IP, FLAGS, BP
  62. #define VDMCONTEXT_INTEGER (VDMCONTEXT_i386 | 0x00000002L) // AX, BX, CX, DX, SI, DI
  63. #define VDMCONTEXT_SEGMENTS (VDMCONTEXT_i386 | 0x00000004L) // DS, ES, FS, GS
  64. #define VDMCONTEXT_FLOATING_POINT (VDMCONTEXT_i386 | 0x00000008L) // 387 state
  65. #define VDMCONTEXT_DEBUG_REGISTERS (VDMCONTEXT_i386 | 0x00000010L) // DB 0-3,6,7
  66. #define VDMCONTEXT_EXTENDED_REGISTERS (VDMCONTEXT_i386 | 0x00000020L) // cpu specific extensions
  67. #define VDMCONTEXT_FULL (VDMCONTEXT_CONTROL | VDMCONTEXT_INTEGER |\
  68. VDMCONTEXT_SEGMENTS)
  69. #ifdef _X86_
  70. // On x86 machines, just copy the definition of the CONTEXT and LDT_ENTRY
  71. // structures.
  72. typedef struct _CONTEXT VDMCONTEXT;
  73. typedef struct _LDT_ENTRY VDMLDT_ENTRY;
  74. #else // _X86_
  75. //
  76. // Define the size of the 80387 save area, which is in the context frame.
  77. //
  78. #define SIZE_OF_80387_REGISTERS 80
  79. typedef struct _FLOATING_SAVE_AREA {
  80. ULONG ControlWord;
  81. ULONG StatusWord;
  82. ULONG TagWord;
  83. ULONG ErrorOffset;
  84. ULONG ErrorSelector;
  85. ULONG DataOffset;
  86. ULONG DataSelector;
  87. UCHAR RegisterArea[SIZE_OF_80387_REGISTERS];
  88. ULONG Cr0NpxState;
  89. } FLOATING_SAVE_AREA;
  90. //
  91. // Simulated context structure for the 16-bit environment
  92. //
  93. typedef struct _VDMCONTEXT {
  94. //
  95. // The flags values within this flag control the contents of
  96. // a CONTEXT record.
  97. //
  98. // If the context record is used as an input parameter, then
  99. // for each portion of the context record controlled by a flag
  100. // whose value is set, it is assumed that that portion of the
  101. // context record contains valid context. If the context record
  102. // is being used to modify a threads context, then only that
  103. // portion of the threads context will be modified.
  104. //
  105. // If the context record is used as an IN OUT parameter to capture
  106. // the context of a thread, then only those portions of the thread's
  107. // context corresponding to set flags will be returned.
  108. //
  109. // The context record is never used as an OUT only parameter.
  110. //
  111. // CONTEXT_FULL on some systems (MIPS namely) does not contain the
  112. // CONTEXT_SEGMENTS definition. VDMDBG assumes that CONTEXT_INTEGER also
  113. // includes CONTEXT_SEGMENTS to account for this.
  114. //
  115. ULONG ContextFlags;
  116. //
  117. // This section is specified/returned if CONTEXT_DEBUG_REGISTERS is
  118. // set in ContextFlags. Note that CONTEXT_DEBUG_REGISTERS is NOT
  119. // included in CONTEXT_FULL.
  120. //
  121. ULONG Dr0;
  122. ULONG Dr1;
  123. ULONG Dr2;
  124. ULONG Dr3;
  125. ULONG Dr6;
  126. ULONG Dr7;
  127. //
  128. // This section is specified/returned if the
  129. // ContextFlags word contians the flag CONTEXT_FLOATING_POINT.
  130. //
  131. FLOATING_SAVE_AREA FloatSave;
  132. //
  133. // This section is specified/returned if the
  134. // ContextFlags word contians the flag CONTEXT_SEGMENTS.
  135. //
  136. ULONG SegGs;
  137. ULONG SegFs;
  138. ULONG SegEs;
  139. ULONG SegDs;
  140. //
  141. // This section is specified/returned if the
  142. // ContextFlags word contians the flag CONTEXT_INTEGER.
  143. //
  144. ULONG Edi;
  145. ULONG Esi;
  146. ULONG Ebx;
  147. ULONG Edx;
  148. ULONG Ecx;
  149. ULONG Eax;
  150. //
  151. // This section is specified/returned if the
  152. // ContextFlags word contians the flag CONTEXT_CONTROL.
  153. //
  154. ULONG Ebp;
  155. ULONG Eip;
  156. ULONG SegCs; // MUST BE SANITIZED
  157. ULONG EFlags; // MUST BE SANITIZED
  158. ULONG Esp;
  159. ULONG SegSs;
  160. } VDMCONTEXT;
  161. //
  162. // LDT descriptor entry
  163. //
  164. typedef struct _VDMLDT_ENTRY {
  165. USHORT LimitLow;
  166. USHORT BaseLow;
  167. union {
  168. struct {
  169. UCHAR BaseMid;
  170. UCHAR Flags1; // Declare as bytes to avoid alignment
  171. UCHAR Flags2; // Problems.
  172. UCHAR BaseHi;
  173. } Bytes;
  174. struct {
  175. ULONG BaseMid : 8;
  176. ULONG Type : 5;
  177. ULONG Dpl : 2;
  178. ULONG Pres : 1;
  179. ULONG LimitHi : 4;
  180. ULONG Sys : 1;
  181. ULONG Reserved_0 : 1;
  182. ULONG Default_Big : 1;
  183. ULONG Granularity : 1;
  184. ULONG BaseHi : 8;
  185. } Bits;
  186. } HighWord;
  187. } VDMLDT_ENTRY;
  188. #endif // _X86_
  189. typedef VDMCONTEXT *LPVDMCONTEXT;
  190. typedef VDMLDT_ENTRY *LPVDMLDT_ENTRY;
  191. #define VDMCONTEXT_TO_PROGRAM_COUNTER(Context) (PVOID)((Context)->Eip)
  192. #define VDMCONTEXT_LENGTH (sizeof(VDMCONTEXT))
  193. #define VDMCONTEXT_ALIGN (sizeof(ULONG))
  194. #define VDMCONTEXT_ROUND (VDMCONTEXT_ALIGN - 1)
  195. #define V86FLAGS_CARRY 0x00001
  196. #define V86FLAGS_PARITY 0x00004
  197. #define V86FLAGS_AUXCARRY 0x00010
  198. #define V86FLAGS_ZERO 0x00040
  199. #define V86FLAGS_SIGN 0x00080
  200. #define V86FLAGS_TRACE 0x00100
  201. #define V86FLAGS_INTERRUPT 0x00200
  202. #define V86FLAGS_DIRECTION 0x00400
  203. #define V86FLAGS_OVERFLOW 0x00800
  204. #define V86FLAGS_IOPL 0x03000
  205. #define V86FLAGS_IOPL_BITS 0x12
  206. #define V86FLAGS_RESUME 0x10000
  207. #define V86FLAGS_V86 0x20000 // Used to detect RealMode v. ProtMode
  208. #define V86FLAGS_ALIGNMENT 0x40000
  209. #define MAX_MODULE_NAME 8 + 1
  210. #define MAX_PATH16 255
  211. typedef struct _SEGMENT_NOTE {
  212. WORD Selector1; // Selector of operation
  213. WORD Selector2; // Dest. Sel. for moving segments
  214. WORD Segment; // Segment within Module
  215. CHAR Module[MAX_MODULE_NAME+1]; // Module name
  216. CHAR FileName[MAX_PATH16+1]; // PathName to executable image
  217. WORD Type; // Code / Data, etc.
  218. DWORD Length; // Length of image
  219. } SEGMENT_NOTE;
  220. typedef struct _IMAGE_NOTE {
  221. CHAR Module[MAX_MODULE_NAME+1]; // Module
  222. CHAR FileName[MAX_PATH16+1]; // Path to executable image
  223. WORD hModule; // 16-bit hModule
  224. WORD hTask; // 16-bit hTask
  225. } IMAGE_NOTE;
  226. typedef struct {
  227. DWORD dwSize;
  228. char szModule[MAX_MODULE_NAME+1];
  229. HANDLE hModule;
  230. WORD wcUsage;
  231. char szExePath[MAX_PATH16+1];
  232. WORD wNext;
  233. } MODULEENTRY, *LPMODULEENTRY;
  234. #define SN_CODE 0 // Protect mode code segment
  235. #define SN_DATA 1 // Protect mode data segment
  236. #define SN_V86 2 // V86 mode segment
  237. typedef struct _TEMP_BP_NOTE {
  238. WORD Seg; // Dest. Segment or Selector
  239. DWORD Offset; // Dest. Offset
  240. BOOL bPM; // TRUE for PM, FALSE for V86
  241. } TEMP_BP_NOTE;
  242. typedef struct _VDM_SEGINFO {
  243. WORD Selector; // Selector or RM segment
  244. WORD SegNumber; // Logical segment number in executable
  245. DWORD Length; // Length of segment
  246. WORD Type; // Type (0=v86, 1=PM)
  247. CHAR ModuleName[MAX_MODULE_NAME]; // Module
  248. CHAR FileName[MAX_PATH16]; // Path to executable image
  249. } VDM_SEGINFO;
  250. /* GlobalFirst()/GlobalNext() flags */
  251. #define GLOBAL_ALL 0
  252. #define GLOBAL_LRU 1
  253. #define GLOBAL_FREE 2
  254. /* GLOBALENTRY.wType entries */
  255. #define GT_UNKNOWN 0
  256. #define GT_DGROUP 1
  257. #define GT_DATA 2
  258. #define GT_CODE 3
  259. #define GT_TASK 4
  260. #define GT_RESOURCE 5
  261. #define GT_MODULE 6
  262. #define GT_FREE 7
  263. #define GT_INTERNAL 8
  264. #define GT_SENTINEL 9
  265. #define GT_BURGERMASTER 10
  266. /* If GLOBALENTRY.wType==GT_RESOURCE, the following is GLOBALENTRY.wData: */
  267. #define GD_USERDEFINED 0
  268. #define GD_CURSORCOMPONENT 1
  269. #define GD_BITMAP 2
  270. #define GD_ICONCOMPONENT 3
  271. #define GD_MENU 4
  272. #define GD_DIALOG 5
  273. #define GD_STRING 6
  274. #define GD_FONTDIR 7
  275. #define GD_FONT 8
  276. #define GD_ACCELERATORS 9
  277. #define GD_RCDATA 10
  278. #define GD_ERRTABLE 11
  279. #define GD_CURSOR 12
  280. #define GD_ICON 14
  281. #define GD_NAMETABLE 15
  282. #define GD_MAX_RESOURCE 15
  283. typedef struct {
  284. DWORD dwSize;
  285. DWORD dwAddress;
  286. DWORD dwBlockSize;
  287. HANDLE hBlock;
  288. WORD wcLock;
  289. WORD wcPageLock;
  290. WORD wFlags;
  291. BOOL wHeapPresent;
  292. HANDLE hOwner;
  293. WORD wType;
  294. WORD wData;
  295. DWORD dwNext;
  296. DWORD dwNextAlt;
  297. } GLOBALENTRY, *LPGLOBALENTRY;
  298. typedef DWORD (CALLBACK* DEBUGEVENTPROC)( LPDEBUG_EVENT, LPVOID );
  299. // Macros to access VDM_EVENT parameters
  300. #define W1(x) ((USHORT)(x.ExceptionInformation[0]))
  301. #define W2(x) ((USHORT)(x.ExceptionInformation[0] >> 16))
  302. #define W3(x) ((USHORT)(x.ExceptionInformation[1]))
  303. #define W4(x) ((USHORT)(x.ExceptionInformation[1] >> 16))
  304. #define DW3(x) (x.ExceptionInformation[2])
  305. #define DW4(x) (x.ExceptionInformation[3])
  306. #include <poppack.h>
  307. BOOL
  308. WINAPI
  309. VDMProcessException(
  310. LPDEBUG_EVENT lpDebugEvent
  311. );
  312. BOOL
  313. WINAPI
  314. VDMGetThreadSelectorEntry(
  315. HANDLE hProcess,
  316. HANDLE hThread,
  317. WORD wSelector,
  318. LPVDMLDT_ENTRY lpSelectorEntry
  319. );
  320. ULONG
  321. WINAPI
  322. VDMGetPointer(
  323. HANDLE hProcess,
  324. HANDLE hThread,
  325. WORD wSelector,
  326. DWORD dwOffset,
  327. BOOL fProtMode
  328. );
  329. // VDMGetThreadContext, VDMSetThreadContext are obselete
  330. // Use VDMGetContext, VDMSetContext
  331. BOOL
  332. WINAPI
  333. VDMGetContext(
  334. HANDLE hProcess,
  335. HANDLE hThread,
  336. LPVDMCONTEXT lpVDMContext
  337. );
  338. BOOL
  339. WINAPI
  340. VDMSetContext(
  341. HANDLE hProcess,
  342. HANDLE hThread,
  343. LPVDMCONTEXT lpVDMContext
  344. );
  345. BOOL
  346. WINAPI
  347. VDMGetSelectorModule(
  348. HANDLE hProcess,
  349. HANDLE hThread,
  350. WORD wSelector,
  351. PUINT lpSegmentNumber,
  352. LPSTR lpModuleName,
  353. UINT nNameSize,
  354. LPSTR lpModulePath,
  355. UINT nPathSize
  356. );
  357. BOOL
  358. WINAPI
  359. VDMGetModuleSelector(
  360. HANDLE hProcess,
  361. HANDLE hThread,
  362. UINT wSegmentNumber,
  363. LPSTR lpModuleName,
  364. LPWORD lpSelector
  365. );
  366. BOOL
  367. WINAPI
  368. VDMModuleFirst(
  369. HANDLE hProcess,
  370. HANDLE hThread,
  371. LPMODULEENTRY lpModuleEntry,
  372. DEBUGEVENTPROC lpEventProc,
  373. LPVOID lpData
  374. );
  375. BOOL
  376. WINAPI
  377. VDMModuleNext(
  378. HANDLE hProcess,
  379. HANDLE hThread,
  380. LPMODULEENTRY lpModuleEntry,
  381. DEBUGEVENTPROC lpEventProc,
  382. LPVOID lpData
  383. );
  384. BOOL
  385. WINAPI
  386. VDMGlobalFirst(
  387. HANDLE hProcess,
  388. HANDLE hThread,
  389. LPGLOBALENTRY lpGlobalEntry,
  390. WORD wFlags,
  391. DEBUGEVENTPROC lpEventProc,
  392. LPVOID lpData
  393. );
  394. BOOL
  395. WINAPI
  396. VDMGlobalNext(
  397. HANDLE hProcess,
  398. HANDLE hThread,
  399. LPGLOBALENTRY lpGlobalEntry,
  400. WORD wFlags,
  401. DEBUGEVENTPROC lpEventProc,
  402. LPVOID lpData
  403. );
  404. typedef BOOL (WINAPI *PROCESSENUMPROC)( DWORD dwProcessId, DWORD dwAttributes, LPARAM lpUserDefined );
  405. typedef BOOL (WINAPI *TASKENUMPROC)( DWORD dwThreadId, WORD hMod16, WORD hTask16, LPARAM lpUserDefined );
  406. typedef BOOL (WINAPI *TASKENUMPROCEX)( DWORD dwThreadId, WORD hMod16, WORD hTask16,
  407. PSZ pszModName, PSZ pszFileName, LPARAM lpUserDefined );
  408. #define WOW_SYSTEM (DWORD)0x0001
  409. INT
  410. WINAPI
  411. VDMEnumProcessWOW(
  412. PROCESSENUMPROC fp,
  413. LPARAM lparam
  414. );
  415. INT
  416. WINAPI
  417. VDMEnumTaskWOW(
  418. DWORD dwProcessId,
  419. TASKENUMPROC fp,
  420. LPARAM lparam
  421. );
  422. //
  423. // VDMEnumTaskWOWEx is the same as VDMEnumTaskWOW except
  424. // the callback procedure gets two more parameters,
  425. // the module name of the EXE and the full path to the
  426. // EXE.
  427. //
  428. INT
  429. WINAPI
  430. VDMEnumTaskWOWEx(
  431. DWORD dwProcessId,
  432. TASKENUMPROCEX fp,
  433. LPARAM lparam
  434. );
  435. //
  436. // VDMTerminateTaskWOW rudely terminates a 16-bit WOW task
  437. // similar to the way TerminateProcess kills a Win32
  438. // process.
  439. //
  440. BOOL
  441. WINAPI
  442. VDMTerminateTaskWOW(
  443. DWORD dwProcessId,
  444. WORD htask
  445. );
  446. //
  447. // VDMStartTaskInWOW launches a Win16 task in a pre-existing
  448. // WOW VDM. Note that the caller is responsible for ensuring
  449. // the program is a 16-bit Windows program. If it is a DOS
  450. // or Win32 program, it will still be launched from within
  451. // the target WOW VDM.
  452. //
  453. // The supplied command line and show command are passed
  454. // unchanged to the 16-bit WinExec API in the target WOW VDM.
  455. //
  456. // Note this routine is ANSI-only.
  457. //
  458. BOOL
  459. WINAPI
  460. VDMStartTaskInWOW(
  461. DWORD dwProcessId,
  462. LPSTR lpCommandLine,
  463. WORD wShow
  464. );
  465. //
  466. // VDMKillWOW is not implemented.
  467. //
  468. BOOL
  469. WINAPI
  470. VDMKillWOW(
  471. VOID
  472. );
  473. //
  474. // VDMDetectWOW is not implemented.
  475. //
  476. BOOL
  477. WINAPI
  478. VDMDetectWOW(
  479. VOID
  480. );
  481. BOOL
  482. WINAPI
  483. VDMBreakThread(
  484. HANDLE hProcess,
  485. HANDLE hThread
  486. );
  487. DWORD
  488. WINAPI
  489. VDMGetDbgFlags(
  490. HANDLE hProcess
  491. );
  492. BOOL
  493. WINAPI
  494. VDMSetDbgFlags(
  495. HANDLE hProcess,
  496. DWORD dwFlags
  497. );
  498. #define VDMDBG_BREAK_DOSTASK 0x00000001
  499. #define VDMDBG_BREAK_WOWTASK 0x00000002
  500. #define VDMDBG_BREAK_LOADDLL 0x00000004
  501. #define VDMDBG_BREAK_EXCEPTIONS 0x00000008
  502. #define VDMDBG_BREAK_DEBUGGER 0x00000010
  503. #define VDMDBG_TRACE_HISTORY 0x00000080
  504. //
  505. // VDMIsModuleLoaded can be used to determine if the 16-bit
  506. // executable referenced by the full path name parameter is
  507. // loaded in ntvdm.
  508. //
  509. // Note that this function uses an internal table in vdmdbg.dll
  510. // to determine a module's existence. One important usage of this
  511. // function is to print a message when a particular module is
  512. // loaded for the first time. To accomplish this, call this
  513. // routine during a DBG_SEGLOAD notification BEFORE the entry
  514. // point VDMProcessException has been called. If it returns FALSE,
  515. // then the module has not yet been loaded.
  516. //
  517. BOOL
  518. WINAPI
  519. VDMIsModuleLoaded(
  520. LPSTR szPath
  521. );
  522. BOOL
  523. WINAPI
  524. VDMGetSegmentInfo(
  525. WORD Selector,
  526. ULONG Offset,
  527. BOOL bProtectMode,
  528. VDM_SEGINFO *pSegInfo
  529. );
  530. //
  531. // VDMGetSymbol
  532. //
  533. // This routine reads the standard .SYM file format.
  534. //
  535. // szModule - module name (max 9 chars)
  536. // SegNumber - logical segment number of segment (see VDM_SEGINFO)
  537. // Offset - offset in segment
  538. // bProtectMode - TRUE for PM, FALSE for V86 mode
  539. // bNextSymbol - FALSE to find nearest sym BEFORE offset, TRUE for AFTER
  540. // szSymbolName - receives symbol name (must point to 256 byte buffer)
  541. // pDisplacement - distance in bytes from nearest symbol
  542. //
  543. BOOL
  544. WINAPI
  545. VDMGetSymbol(
  546. LPSTR szModule,
  547. WORD SegNumber,
  548. DWORD Offset,
  549. BOOL bProtectMode,
  550. BOOL bNextSymbol,
  551. LPSTR szSymbolName,
  552. PDWORD pDisplacement
  553. );
  554. BOOL
  555. WINAPI
  556. VDMGetAddrExpression(
  557. LPSTR szModule,
  558. LPSTR szSymbol,
  559. PWORD Selector,
  560. PDWORD Offset,
  561. PWORD Type
  562. );
  563. #define VDMADDR_V86 2
  564. #define VDMADDR_PM16 4
  565. #define VDMADDR_PM32 16
  566. //
  567. // typedefs for main entry points
  568. //
  569. typedef BOOL (WINAPI *VDMPROCESSEXCEPTIONPROC)(LPDEBUG_EVENT);
  570. typedef BOOL (WINAPI *VDMGETTHREADSELECTORENTRYPROC)(HANDLE,HANDLE,DWORD,LPVDMLDT_ENTRY);
  571. typedef ULONG (WINAPI *VDMGETPOINTERPROC)(HANDLE,HANDLE,WORD,DWORD,BOOL);
  572. typedef BOOL (WINAPI *VDMGETCONTEXTPROC)(HANDLE,HANDLE,LPVDMCONTEXT);
  573. typedef BOOL (WINAPI *VDMSETCONTEXTPROC)(HANDLE,HANDLE,LPVDMCONTEXT);
  574. typedef BOOL (WINAPI *VDMKILLWOWPROC)(VOID);
  575. typedef BOOL (WINAPI *VDMDETECTWOWPROC)(VOID);
  576. typedef BOOL (WINAPI *VDMBREAKTHREADPROC)(HANDLE);
  577. typedef BOOL (WINAPI *VDMGETSELECTORMODULEPROC)(HANDLE,HANDLE,WORD,PUINT,LPSTR, UINT,LPSTR, UINT);
  578. typedef BOOL (WINAPI *VDMGETMODULESELECTORPROC)(HANDLE,HANDLE,UINT,LPSTR,LPWORD);
  579. typedef BOOL (WINAPI *VDMMODULEFIRSTPROC)(HANDLE,HANDLE,LPMODULEENTRY,DEBUGEVENTPROC,LPVOID);
  580. typedef BOOL (WINAPI *VDMMODULENEXTPROC)(HANDLE,HANDLE,LPMODULEENTRY,DEBUGEVENTPROC,LPVOID);
  581. typedef BOOL (WINAPI *VDMGLOBALFIRSTPROC)(HANDLE,HANDLE,LPGLOBALENTRY,WORD,DEBUGEVENTPROC,LPVOID);
  582. typedef BOOL (WINAPI *VDMGLOBALNEXTPROC)(HANDLE,HANDLE,LPGLOBALENTRY,WORD,DEBUGEVENTPROC,LPVOID);
  583. typedef INT (WINAPI *VDMENUMPROCESSWOWPROC)(PROCESSENUMPROC,LPARAM);
  584. typedef INT (WINAPI *VDMENUMTASKWOWPROC)(DWORD,TASKENUMPROC,LPARAM);
  585. typedef INT (WINAPI *VDMENUMTASKWOWEXPROC)(DWORD,TASKENUMPROCEX,LPARAM);
  586. typedef BOOL (WINAPI *VDMTERMINATETASKINWOWPROC)(DWORD,WORD);
  587. typedef BOOL (WINAPI *VDMSTARTTASKINWOWPROC)(DWORD,LPSTR,WORD);
  588. typedef DWORD (WINAPI *VDMGETDBGFLAGSPROC)(HANDLE);
  589. typedef BOOL (WINAPI *VDMSETDBGFLAGSPROC)(HANDLE,DWORD);
  590. typedef BOOL (WINAPI *VDMISMODULELOADEDPROC)(LPSTR);
  591. typedef BOOL (WINAPI *VDMGETSEGMENTINFOPROC)(WORD,ULONG,BOOL,VDM_SEGINFO);
  592. typedef BOOL (WINAPI *VDMGETSYMBOLPROC)(LPSTR, WORD, DWORD, BOOL, BOOL, LPSTR, PDWORD);
  593. typedef BOOL (WINAPI *VDMGETADDREXPRESSIONPROC)(LPSTR, LPSTR, PWORD, PDWORD, PWORD);
  594. #ifdef __cplusplus
  595. }
  596. #endif
  597. #endif // _VDMDBG_