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.

107 lines
2.5 KiB

  1. /*++
  2. Copyright (C) 1996-1999 Microsoft Corporation
  3. Module Name:
  4. IMAGEHELP.H
  5. Abstract:
  6. Re-director for imagehlp.dll.
  7. History:
  8. --*/
  9. #ifndef ESPUTIL_IMAGEHLP_H
  10. #define ESPUTIL_IMAGEHLP_H
  11. class LTAPIENTRY CImageHelp
  12. {
  13. public:
  14. CImageHelp();
  15. BOOL ImagehlpAvailable(void);
  16. BOOL EnumerateLoadedModules(HANDLE, PENUMLOADED_MODULES_CALLBACK, void *);
  17. PIMAGE_NT_HEADERS ImageNtHeader(LPVOID);
  18. LPAPI_VERSION ImagehlpApiVersion(void);
  19. BOOL StackWalk(
  20. DWORD MachineType,
  21. HANDLE hProcess,
  22. HANDLE hThread,
  23. LPSTACKFRAME StackFrame,
  24. LPVOID ContextRecord,
  25. PREAD_PROCESS_MEMORY_ROUTINE ReadMemoryRoutine,
  26. PFUNCTION_TABLE_ACCESS_ROUTINE FunctionTableAccessRoutine,
  27. PGET_MODULE_BASE_ROUTINE GetModuleBaseRoutine,
  28. PTRANSLATE_ADDRESS_ROUTINE TranslateAddress
  29. );
  30. BOOL SymGetModuleInfo(
  31. IN HANDLE hProcess,
  32. IN DWORD dwAddr,
  33. OUT PIMAGEHLP_MODULE ModuleInfo
  34. );
  35. LPVOID SymFunctionTableAccess(
  36. HANDLE hProcess,
  37. DWORD AddrBase
  38. );
  39. BOOL SymGetSymFromAddr(
  40. IN HANDLE hProcess,
  41. IN DWORD dwAddr,
  42. OUT PDWORD pdwDisplacement,
  43. OUT PIMAGEHLP_SYMBOL Symbol
  44. );
  45. BOOL SymInitialize(
  46. IN HANDLE hProcess,
  47. IN LPSTR UserSearchPath,
  48. IN BOOL fInvadeProcess
  49. );
  50. BOOL SymUnDName(
  51. IN PIMAGEHLP_SYMBOL sym, // Symbol to undecorate
  52. OUT LPSTR UnDecName, // Buffer to store undecorated name in
  53. IN DWORD UnDecNameLength // Size of the buffer
  54. );
  55. DWORD SymLoadModule(
  56. IN HANDLE hProcess,
  57. IN HANDLE hFile,
  58. IN PSTR ImageName,
  59. IN PSTR ModuleName,
  60. IN DWORD BaseOfDll,
  61. IN DWORD SizeOfDll
  62. );
  63. DWORD UnDecorateSymbolName(
  64. LPSTR DecoratedName, // Name to undecorate
  65. LPSTR UnDecoratedName, // If NULL, it will be allocated
  66. DWORD UndecoratedLength, // The maximym length
  67. DWORD Flags // See IMAGEHLP.H
  68. );
  69. DWORD SymGetOptions(void);
  70. DWORD SymSetOptions(DWORD);
  71. PIMAGE_NT_HEADERS CheckSumMappedFile(
  72. LPVOID BaseAddress,
  73. DWORD FileLength,
  74. LPDWORD HeaderSum,
  75. LPDWORD CheckSum
  76. );
  77. BOOL MakeSureDirectoryPathExists(const TCHAR *);
  78. private:
  79. void LoadImageHelp(void);
  80. };
  81. #endif