Author: akhaldi
Date: Sat Aug 17 11:20:05 2013
New Revision: 59758
URL:
http://svn.reactos.org/svn/reactos?rev=59758&view=rev
Log:
[PSDK]
* Annotate dbghelp.h.
Modified:
trunk/reactos/include/psdk/dbghelp.h
Modified: trunk/reactos/include/psdk/dbghelp.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/dbghelp.h?rev…
==============================================================================
--- trunk/reactos/include/psdk/dbghelp.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/dbghelp.h [iso-8859-1] Sat Aug 17 11:20:05 2013
@@ -668,7 +668,11 @@
} DUMMYUNIONNAME;
} MINIDUMP_CALLBACK_OUTPUT, *PMINIDUMP_CALLBACK_OUTPUT;
-typedef BOOL (WINAPI* MINIDUMP_CALLBACK_ROUTINE)(PVOID, const PMINIDUMP_CALLBACK_INPUT,
PMINIDUMP_CALLBACK_OUTPUT);
+typedef BOOL
+(WINAPI* MINIDUMP_CALLBACK_ROUTINE)(
+ _Inout_ PVOID,
+ _In_ const PMINIDUMP_CALLBACK_INPUT,
+ _Inout_ PMINIDUMP_CALLBACK_OUTPUT);
typedef struct _MINIDUMP_CALLBACK_INFORMATION
{
@@ -887,12 +891,25 @@
LastReservedStream = 0xffff
} MINIDUMP_STREAM_TYPE;
-BOOL WINAPI MiniDumpWriteDump(HANDLE, DWORD, HANDLE, MINIDUMP_TYPE,
- const PMINIDUMP_EXCEPTION_INFORMATION,
- const PMINIDUMP_USER_STREAM_INFORMATION,
- const PMINIDUMP_CALLBACK_INFORMATION);
-BOOL WINAPI MiniDumpReadDumpStream(PVOID, ULONG, PMINIDUMP_DIRECTORY*, PVOID*,
- ULONG*);
+BOOL
+WINAPI
+MiniDumpWriteDump(
+ _In_ HANDLE,
+ _In_ DWORD,
+ _In_ HANDLE,
+ _In_ MINIDUMP_TYPE,
+ _In_opt_ const PMINIDUMP_EXCEPTION_INFORMATION,
+ _In_opt_ const PMINIDUMP_USER_STREAM_INFORMATION,
+ _In_opt_ const PMINIDUMP_CALLBACK_INFORMATION);
+
+BOOL
+WINAPI
+MiniDumpReadDumpStream(
+ _In_ PVOID,
+ _In_ ULONG,
+ _Outptr_result_maybenull_ PMINIDUMP_DIRECTORY*,
+ _Outptr_result_maybenull_ PVOID*,
+ _Out_opt_ ULONG*);
#include <poppack.h>
@@ -904,23 +921,111 @@
#define SLMFLAG_VIRTUAL 0x1
#define SLMFLAG_NO_SYMBOLS 0x4
-typedef BOOL (CALLBACK *PENUMLOADED_MODULES_CALLBACK64)(PCSTR, DWORD64, ULONG, PVOID);
-BOOL WINAPI EnumerateLoadedModules64(HANDLE, PENUMLOADED_MODULES_CALLBACK64, PVOID);
-typedef BOOL (CALLBACK *PENUMLOADED_MODULES_CALLBACKW64)(PCWSTR, DWORD64, ULONG, PVOID);
-BOOL WINAPI EnumerateLoadedModulesW64(HANDLE, PENUMLOADED_MODULES_CALLBACKW64, PVOID);
-typedef BOOL (CALLBACK *PSYM_ENUMMODULES_CALLBACK64)(PCSTR, DWORD64, PVOID);
-BOOL WINAPI SymEnumerateModules64(HANDLE, PSYM_ENUMMODULES_CALLBACK64, PVOID);
-typedef BOOL (CALLBACK *PSYM_ENUMMODULES_CALLBACKW64)(PCWSTR, DWORD64, PVOID);
-BOOL WINAPI SymEnumerateModulesW64(HANDLE, PSYM_ENUMMODULES_CALLBACKW64, PVOID);
-BOOL WINAPI SymGetModuleInfo64(HANDLE, DWORD64, PIMAGEHLP_MODULE64);
-BOOL WINAPI SymGetModuleInfoW64(HANDLE, DWORD64, PIMAGEHLP_MODULEW64);
-DWORD64 WINAPI SymGetModuleBase64(HANDLE, DWORD64);
-DWORD64 WINAPI SymLoadModule64(HANDLE, HANDLE, PCSTR, PCSTR, DWORD64, DWORD);
-DWORD64 WINAPI SymLoadModuleEx(HANDLE, HANDLE, PCSTR, PCSTR, DWORD64, DWORD,
- PMODLOAD_DATA, DWORD);
-DWORD64 WINAPI SymLoadModuleExW(HANDLE, HANDLE, PCWSTR, PCWSTR, DWORD64, DWORD,
- PMODLOAD_DATA, DWORD);
-BOOL WINAPI SymUnloadModule64(HANDLE, DWORD64);
+typedef BOOL
+(CALLBACK *PENUMLOADED_MODULES_CALLBACK64)(
+ _In_ PCSTR,
+ _In_ DWORD64,
+ _In_ ULONG,
+ _In_opt_ PVOID);
+
+BOOL
+WINAPI
+EnumerateLoadedModules64(
+ _In_ HANDLE,
+ _In_ PENUMLOADED_MODULES_CALLBACK64,
+ _In_opt_ PVOID);
+
+typedef BOOL
+(CALLBACK *PENUMLOADED_MODULES_CALLBACKW64)(
+ _In_ PCWSTR,
+ _In_ DWORD64,
+ _In_ ULONG,
+ _In_opt_ PVOID);
+
+BOOL
+WINAPI
+EnumerateLoadedModulesW64(
+ _In_ HANDLE,
+ _In_ PENUMLOADED_MODULES_CALLBACKW64,
+ _In_opt_ PVOID);
+
+typedef BOOL
+(CALLBACK *PSYM_ENUMMODULES_CALLBACK64)(
+ _In_ PCSTR,
+ _In_ DWORD64,
+ _In_opt_ PVOID);
+
+BOOL
+WINAPI
+SymEnumerateModules64(
+ _In_ HANDLE,
+ _In_ PSYM_ENUMMODULES_CALLBACK64,
+ _In_opt_ PVOID);
+
+typedef BOOL
+(CALLBACK *PSYM_ENUMMODULES_CALLBACKW64)(
+ _In_ PCWSTR,
+ _In_ DWORD64,
+ _In_opt_ PVOID);
+
+BOOL
+WINAPI
+SymEnumerateModulesW64(
+ _In_ HANDLE,
+ _In_ PSYM_ENUMMODULES_CALLBACKW64,
+ _In_opt_ PVOID);
+
+BOOL
+WINAPI
+SymGetModuleInfo64(
+ _In_ HANDLE,
+ _In_ DWORD64,
+ _Out_ PIMAGEHLP_MODULE64);
+
+BOOL
+WINAPI
+SymGetModuleInfoW64(
+ _In_ HANDLE,
+ _In_ DWORD64,
+ _Out_ PIMAGEHLP_MODULEW64);
+
+DWORD64 WINAPI SymGetModuleBase64(_In_ HANDLE, _In_ DWORD64);
+
+DWORD64
+WINAPI
+SymLoadModule64(
+ _In_ HANDLE,
+ _In_opt_ HANDLE,
+ _In_opt_ PCSTR,
+ _In_opt_ PCSTR,
+ _In_ DWORD64,
+ _In_ DWORD);
+
+DWORD64
+WINAPI
+SymLoadModuleEx(
+ _In_ HANDLE,
+ _In_opt_ HANDLE,
+ _In_opt_ PCSTR,
+ _In_opt_ PCSTR,
+ _In_ DWORD64,
+ _In_ DWORD,
+ _In_opt_ PMODLOAD_DATA,
+ _In_opt_ DWORD);
+
+DWORD64
+WINAPI
+SymLoadModuleExW(
+ _In_ HANDLE,
+ _In_opt_ HANDLE,
+ _In_opt_ PCWSTR,
+ _In_opt_ PCWSTR,
+ _In_ DWORD64,
+ _In_ DWORD,
+ _In_opt_ PMODLOAD_DATA,
+ _In_opt_ DWORD);
+
+BOOL WINAPI SymUnloadModule64(_In_ HANDLE, _In_ DWORD64);
/*************************
* Symbol Handling *
@@ -1086,83 +1191,494 @@
#define SYMSEARCH_RECURSE 0x02
#define SYMSEARCH_GLOBALSONLY 0x04
-BOOL WINAPI SymGetTypeInfo(HANDLE, DWORD64, ULONG, IMAGEHLP_SYMBOL_TYPE_INFO, PVOID);
-BOOL WINAPI SymGetTypeInfoEx(HANDLE, DWORD64, PIMAGEHLP_GET_TYPE_INFO_PARAMS);
-typedef BOOL (CALLBACK *PSYM_ENUMERATESYMBOLS_CALLBACK)(PSYMBOL_INFO, ULONG, PVOID);
-typedef BOOL (CALLBACK *PSYM_ENUMERATESYMBOLS_CALLBACKW)(PSYMBOL_INFOW, ULONG, PVOID);
-BOOL WINAPI SymEnumTypes(HANDLE, ULONG64, PSYM_ENUMERATESYMBOLS_CALLBACK, PVOID);
-BOOL WINAPI SymEnumTypesW(HANDLE, ULONG64, PSYM_ENUMERATESYMBOLS_CALLBACKW, PVOID);
-BOOL WINAPI SymFromAddr(HANDLE, DWORD64, DWORD64*, SYMBOL_INFO*);
-BOOL WINAPI SymFromAddrW(HANDLE, DWORD64, DWORD64*, SYMBOL_INFOW*);
-BOOL WINAPI SymFromToken(HANDLE, DWORD64, DWORD, PSYMBOL_INFO);
-BOOL WINAPI SymFromTokenW(HANDLE, DWORD64, DWORD, PSYMBOL_INFOW);
-BOOL WINAPI SymFromName(HANDLE, PCSTR, PSYMBOL_INFO);
-BOOL WINAPI SymFromNameW(HANDLE, PCWSTR, PSYMBOL_INFOW);
-BOOL WINAPI SymGetSymFromAddr64(HANDLE, DWORD64, PDWORD64, PIMAGEHLP_SYMBOL64);
-BOOL WINAPI SymGetSymFromName64(HANDLE, PCSTR, PIMAGEHLP_SYMBOL64);
-BOOL WINAPI SymGetTypeFromName(HANDLE, ULONG64, PCSTR, PSYMBOL_INFO);
-BOOL WINAPI SymGetTypeFromNameW(HANDLE, ULONG64, PCWSTR, PSYMBOL_INFOW);
-BOOL WINAPI SymGetSymNext64(HANDLE, PIMAGEHLP_SYMBOL64);
-BOOL WINAPI SymGetSymNextW64(HANDLE, PIMAGEHLP_SYMBOLW64);
-BOOL WINAPI SymGetSymPrev64(HANDLE, PIMAGEHLP_SYMBOL64);
-BOOL WINAPI SymGetSymPrevW64(HANDLE, PIMAGEHLP_SYMBOLW64);
-BOOL WINAPI SymEnumSym(HANDLE,ULONG64,PSYM_ENUMERATESYMBOLS_CALLBACK,PVOID);
-BOOL WINAPI SymEnumSymbols(HANDLE, ULONG64, PCSTR, PSYM_ENUMERATESYMBOLS_CALLBACK,
- PVOID);
-BOOL WINAPI SymEnumSymbolsW(HANDLE, ULONG64, PCWSTR, PSYM_ENUMERATESYMBOLS_CALLBACKW,
- PVOID);
-typedef BOOL (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACK64)(PCSTR, DWORD64, ULONG, PVOID);
-typedef BOOL (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACK64W)(PCWSTR, DWORD64, ULONG, PVOID);
-BOOL WINAPI SymEnumerateSymbols64(HANDLE, ULONG64, PSYM_ENUMSYMBOLS_CALLBACK64, PVOID);
-BOOL WINAPI SymEnumerateSymbolsW64(HANDLE, ULONG64, PSYM_ENUMSYMBOLS_CALLBACK64W,
PVOID);
-BOOL WINAPI SymEnumSymbolsForAddr(HANDLE, DWORD64, PSYM_ENUMERATESYMBOLS_CALLBACK,
PVOID);
-BOOL WINAPI SymEnumSymbolsForAddrW(HANDLE, DWORD64, PSYM_ENUMERATESYMBOLS_CALLBACKW,
PVOID);
-typedef BOOL (CALLBACK *PSYMBOL_REGISTERED_CALLBACK64)(HANDLE, ULONG, ULONG64, ULONG64);
-BOOL WINAPI SymRegisterCallback64(HANDLE, PSYMBOL_REGISTERED_CALLBACK64, ULONG64);
-BOOL WINAPI SymRegisterCallbackW64(HANDLE, PSYMBOL_REGISTERED_CALLBACK64, ULONG64);
-BOOL WINAPI SymUnDName64(PIMAGEHLP_SYMBOL64, PSTR, DWORD);
-BOOL WINAPI SymMatchString(PCSTR, PCSTR, BOOL);
-BOOL WINAPI SymMatchStringA(PCSTR, PCSTR, BOOL);
-BOOL WINAPI SymMatchStringW(PCWSTR, PCWSTR, BOOL);
-BOOL WINAPI SymSearch(HANDLE, ULONG64, DWORD, DWORD, PCSTR, DWORD64,
PSYM_ENUMERATESYMBOLS_CALLBACK, PVOID, DWORD);
-BOOL WINAPI SymSearchW(HANDLE, ULONG64, DWORD, DWORD, PCWSTR, DWORD64,
PSYM_ENUMERATESYMBOLS_CALLBACKW, PVOID, DWORD);
-DWORD WINAPI UnDecorateSymbolName(PCSTR, PSTR, DWORD, DWORD);
-DWORD WINAPI UnDecorateSymbolNameW(PCWSTR, PWSTR, DWORD, DWORD);
-BOOL WINAPI SymGetScope(HANDLE, ULONG64, DWORD, PSYMBOL_INFO);
-BOOL WINAPI SymGetScopeW(HANDLE, ULONG64, DWORD, PSYMBOL_INFOW);
-BOOL WINAPI SymFromIndex(HANDLE, ULONG64, DWORD, PSYMBOL_INFO);
-BOOL WINAPI SymFromIndexW(HANDLE, ULONG64, DWORD, PSYMBOL_INFOW);
-BOOL WINAPI SymAddSymbol(HANDLE, ULONG64, PCSTR, DWORD64, DWORD, DWORD);
-BOOL WINAPI SymAddSymbolW(HANDLE, ULONG64, PCWSTR, DWORD64, DWORD, DWORD);
-BOOL WINAPI SymDeleteSymbol(HANDLE, ULONG64, PCSTR, DWORD64, DWORD);
-BOOL WINAPI SymDeleteSymbolW(HANDLE, ULONG64, PCWSTR, DWORD64, DWORD);
+BOOL
+WINAPI
+SymGetTypeInfo(
+ _In_ HANDLE,
+ _In_ DWORD64,
+ _In_ ULONG,
+ _In_ IMAGEHLP_SYMBOL_TYPE_INFO,
+ _Out_ PVOID);
+
+BOOL
+WINAPI
+SymGetTypeInfoEx(
+ _In_ HANDLE,
+ _In_ DWORD64,
+ _Inout_ PIMAGEHLP_GET_TYPE_INFO_PARAMS);
+
+typedef BOOL
+(CALLBACK *PSYM_ENUMERATESYMBOLS_CALLBACK)(
+ _In_ PSYMBOL_INFO,
+ _In_ ULONG,
+ _In_opt_ PVOID);
+
+typedef BOOL
+(CALLBACK *PSYM_ENUMERATESYMBOLS_CALLBACKW)(
+ _In_ PSYMBOL_INFOW,
+ _In_ ULONG,
+ _In_opt_ PVOID);
+
+BOOL
+WINAPI
+SymEnumTypes(
+ _In_ HANDLE,
+ _In_ ULONG64,
+ _In_ PSYM_ENUMERATESYMBOLS_CALLBACK,
+ _In_opt_ PVOID);
+
+BOOL
+WINAPI
+SymEnumTypesW(
+ _In_ HANDLE,
+ _In_ ULONG64,
+ _In_ PSYM_ENUMERATESYMBOLS_CALLBACKW,
+ _In_opt_ PVOID);
+
+BOOL
+WINAPI
+SymFromAddr(
+ _In_ HANDLE,
+ _In_ DWORD64,
+ _Out_opt_ DWORD64*,
+ _Inout_ SYMBOL_INFO*);
+
+BOOL
+WINAPI
+SymFromAddrW(
+ _In_ HANDLE,
+ _In_ DWORD64,
+ _Out_opt_ DWORD64*,
+ _Inout_ SYMBOL_INFOW*);
+
+BOOL
+WINAPI
+SymFromToken(
+ _In_ HANDLE,
+ _In_ DWORD64,
+ _In_ DWORD,
+ _Inout_ PSYMBOL_INFO);
+
+BOOL
+WINAPI
+SymFromTokenW(
+ _In_ HANDLE,
+ _In_ DWORD64,
+ _In_ DWORD,
+ _Inout_ PSYMBOL_INFOW);
+
+BOOL WINAPI SymFromName(_In_ HANDLE, _In_ PCSTR, _Inout_ PSYMBOL_INFO);
+BOOL WINAPI SymFromNameW(_In_ HANDLE, _In_ PCWSTR, _Inout_ PSYMBOL_INFOW);
+
+BOOL
+WINAPI
+SymGetSymFromAddr64(
+ _In_ HANDLE,
+ _In_ DWORD64,
+ _Out_opt_ PDWORD64,
+ _Inout_ PIMAGEHLP_SYMBOL64);
+
+BOOL
+WINAPI
+SymGetSymFromName64(
+ _In_ HANDLE,
+ _In_ PCSTR,
+ _Inout_ PIMAGEHLP_SYMBOL64);
+
+BOOL
+WINAPI
+SymGetTypeFromName(
+ _In_ HANDLE,
+ _In_ ULONG64,
+ _In_ PCSTR,
+ _Inout_ PSYMBOL_INFO);
+
+BOOL
+WINAPI
+SymGetTypeFromNameW(
+ _In_ HANDLE,
+ _In_ ULONG64,
+ _In_ PCWSTR,
+ _Inout_ PSYMBOL_INFOW);
+
+BOOL WINAPI SymGetSymNext64(_In_ HANDLE, _Inout_ PIMAGEHLP_SYMBOL64);
+BOOL WINAPI SymGetSymNextW64(_In_ HANDLE, _Inout_ PIMAGEHLP_SYMBOLW64);
+BOOL WINAPI SymGetSymPrev64(_In_ HANDLE, _Inout_ PIMAGEHLP_SYMBOL64);
+BOOL WINAPI SymGetSymPrevW64(_In_ HANDLE, _Inout_ PIMAGEHLP_SYMBOLW64);
+
+BOOL
+WINAPI
+SymEnumSym(
+ _In_ HANDLE,
+ _In_ ULONG64,
+ _In_ PSYM_ENUMERATESYMBOLS_CALLBACK,
+ _In_opt_ PVOID);
+
+BOOL
+WINAPI
+SymEnumSymbols(
+ _In_ HANDLE,
+ _In_ ULONG64,
+ _In_opt_ PCSTR,
+ _In_ PSYM_ENUMERATESYMBOLS_CALLBACK,
+ _In_opt_ PVOID);
+
+BOOL
+WINAPI
+SymEnumSymbolsW(
+ _In_ HANDLE,
+ _In_ ULONG64,
+ _In_opt_ PCWSTR,
+ _In_ PSYM_ENUMERATESYMBOLS_CALLBACKW,
+ _In_opt_ PVOID);
+
+typedef BOOL
+(CALLBACK *PSYM_ENUMSYMBOLS_CALLBACK64)(
+ _In_ PCSTR,
+ _In_ DWORD64,
+ _In_ ULONG,
+ _In_opt_ PVOID);
+
+typedef BOOL
+(CALLBACK *PSYM_ENUMSYMBOLS_CALLBACK64W)(
+ _In_ PCWSTR,
+ _In_ DWORD64,
+ _In_ ULONG,
+ _In_opt_ PVOID);
+
+BOOL
+WINAPI
+SymEnumerateSymbols64(
+ _In_ HANDLE,
+ _In_ ULONG64,
+ _In_ PSYM_ENUMSYMBOLS_CALLBACK64,
+ _In_opt_ PVOID);
+
+BOOL
+WINAPI
+SymEnumerateSymbolsW64(
+ _In_ HANDLE,
+ _In_ ULONG64,
+ _In_ PSYM_ENUMSYMBOLS_CALLBACK64W,
+ _In_opt_ PVOID);
+
+BOOL
+WINAPI
+SymEnumSymbolsForAddr(
+ _In_ HANDLE,
+ _In_ DWORD64,
+ _In_ PSYM_ENUMERATESYMBOLS_CALLBACK,
+ _In_opt_ PVOID);
+
+BOOL
+WINAPI
+SymEnumSymbolsForAddrW(
+ _In_ HANDLE,
+ _In_ DWORD64,
+ _In_ PSYM_ENUMERATESYMBOLS_CALLBACKW,
+ _In_opt_ PVOID);
+
+typedef BOOL
+(CALLBACK *PSYMBOL_REGISTERED_CALLBACK64)(
+ _In_ HANDLE,
+ _In_ ULONG,
+ _In_opt_ ULONG64,
+ _In_opt_ ULONG64);
+
+BOOL
+WINAPI
+SymRegisterCallback64(
+ _In_ HANDLE,
+ _In_ PSYMBOL_REGISTERED_CALLBACK64,
+ _In_ ULONG64);
+
+BOOL
+WINAPI
+SymRegisterCallbackW64(
+ _In_ HANDLE,
+ _In_ PSYMBOL_REGISTERED_CALLBACK64,
+ _In_ ULONG64);
+
+BOOL
+WINAPI
+SymUnDName64(
+ _In_ PIMAGEHLP_SYMBOL64,
+ _Out_writes_(UnDecNameLength) PSTR,
+ _In_ DWORD UnDecNameLength);
+
+BOOL WINAPI SymMatchString(_In_ PCSTR, _In_ PCSTR, _In_ BOOL);
+BOOL WINAPI SymMatchStringA(_In_ PCSTR, _In_ PCSTR, _In_ BOOL);
+BOOL WINAPI SymMatchStringW(_In_ PCWSTR, _In_ PCWSTR, _In_ BOOL);
+
+BOOL
+WINAPI
+SymSearch(
+ _In_ HANDLE,
+ _In_ ULONG64,
+ _In_opt_ DWORD,
+ _In_opt_ DWORD,
+ _In_opt_ PCSTR,
+ _In_opt_ DWORD64,
+ _In_ PSYM_ENUMERATESYMBOLS_CALLBACK,
+ _In_opt_ PVOID,
+ _In_ DWORD);
+
+BOOL
+WINAPI
+SymSearchW(
+ _In_ HANDLE,
+ _In_ ULONG64,
+ _In_opt_ DWORD,
+ _In_opt_ DWORD,
+ _In_opt_ PCWSTR,
+ _In_opt_ DWORD64,
+ _In_ PSYM_ENUMERATESYMBOLS_CALLBACKW,
+ _In_opt_ PVOID,
+ _In_ DWORD);
+
+DWORD
+WINAPI
+UnDecorateSymbolName(
+ _In_ PCSTR,
+ _Out_writes_(maxStringLength) PSTR,
+ _In_ DWORD maxStringLength,
+ _In_ DWORD);
+
+DWORD
+WINAPI
+UnDecorateSymbolNameW(
+ _In_ PCWSTR,
+ _Out_writes_(maxStringLength) PWSTR,
+ _In_ DWORD maxStringLength,
+ _In_ DWORD);
+
+BOOL
+WINAPI
+SymGetScope(
+ _In_ HANDLE,
+ _In_ ULONG64,
+ _In_ DWORD,
+ _Inout_ PSYMBOL_INFO);
+
+BOOL
+WINAPI
+SymGetScopeW(
+ _In_ HANDLE,
+ _In_ ULONG64,
+ _In_ DWORD,
+ _Inout_ PSYMBOL_INFOW);
+
+BOOL
+WINAPI
+SymFromIndex(
+ _In_ HANDLE,
+ _In_ ULONG64,
+ _In_ DWORD,
+ _Inout_ PSYMBOL_INFO);
+
+BOOL
+WINAPI
+SymFromIndexW(
+ _In_ HANDLE,
+ _In_ ULONG64,
+ _In_ DWORD,
+ _Inout_ PSYMBOL_INFOW);
+
+BOOL
+WINAPI
+SymAddSymbol(
+ _In_ HANDLE,
+ _In_ ULONG64,
+ _In_ PCSTR,
+ _In_ DWORD64,
+ _In_ DWORD,
+ _In_ DWORD);
+
+BOOL
+WINAPI
+SymAddSymbolW(
+ _In_ HANDLE,
+ _In_ ULONG64,
+ _In_ PCWSTR,
+ _In_ DWORD64,
+ _In_ DWORD,
+ _In_ DWORD);
+
+BOOL
+WINAPI
+SymDeleteSymbol(
+ _In_ HANDLE,
+ _In_ ULONG64,
+ _In_opt_ PCSTR,
+ _In_ DWORD64,
+ _In_ DWORD);
+
+BOOL
+WINAPI
+SymDeleteSymbolW(
+ _In_ HANDLE,
+ _In_ ULONG64,
+ _In_opt_ PCWSTR,
+ _In_ DWORD64,
+ _In_ DWORD);
/*************************
* Source Files *
*************************/
-typedef BOOL (CALLBACK *PSYM_ENUMSOURCEFILES_CALLBACK)(PSOURCEFILE, PVOID);
-typedef BOOL (CALLBACK *PSYM_ENUMSOURCEFILES_CALLBACKW)(PSOURCEFILEW, PVOID);
-
-BOOL WINAPI SymEnumSourceFiles(HANDLE, ULONG64, PCSTR, PSYM_ENUMSOURCEFILES_CALLBACK,
- PVOID);
-BOOL WINAPI SymEnumSourceFilesW(HANDLE, ULONG64, PCWSTR, PSYM_ENUMSOURCEFILES_CALLBACKW,
PVOID);
-BOOL WINAPI SymGetLineFromAddr64(HANDLE, DWORD64, PDWORD, PIMAGEHLP_LINE64);
-BOOL WINAPI SymGetLineFromAddrW64(HANDLE, DWORD64, PDWORD, PIMAGEHLP_LINEW64);
-BOOL WINAPI SymGetLinePrev64(HANDLE, PIMAGEHLP_LINE64);
-BOOL WINAPI SymGetLinePrevW64(HANDLE, PIMAGEHLP_LINEW64);
-BOOL WINAPI SymGetLineNext64(HANDLE, PIMAGEHLP_LINE64);
-BOOL WINAPI SymGetLineNextW64(HANDLE, PIMAGEHLP_LINEW64);
-BOOL WINAPI SymGetLineFromName64(HANDLE, PCSTR, PCSTR, DWORD, PLONG, PIMAGEHLP_LINE64);
-BOOL WINAPI SymGetLineFromNameW64(HANDLE, PCWSTR, PCWSTR, DWORD, PLONG,
PIMAGEHLP_LINEW64);
-ULONG WINAPI SymGetFileLineOffsets64(HANDLE, PCSTR, PCSTR, PDWORD64, ULONG);
-BOOL WINAPI SymGetSourceFile(HANDLE, ULONG64, PCSTR, PCSTR, PSTR, DWORD);
-BOOL WINAPI SymGetSourceFileW(HANDLE, ULONG64, PCWSTR, PCWSTR, PWSTR, DWORD);
-BOOL WINAPI SymGetSourceFileToken(HANDLE, ULONG64, PCSTR, PVOID*, DWORD*);
-BOOL WINAPI SymGetSourceFileTokenW(HANDLE, ULONG64, PCWSTR, PVOID*, DWORD*);
-BOOL WINAPI SymGetSourceFileFromToken(HANDLE, PVOID, PCSTR, PSTR, DWORD);
-BOOL WINAPI SymGetSourceFileFromTokenW(HANDLE, PVOID, PCWSTR, PWSTR, DWORD);
-BOOL WINAPI SymGetSourceVarFromToken(HANDLE, PVOID, PCSTR, PCSTR, PSTR, DWORD);
-BOOL WINAPI SymGetSourceVarFromTokenW(HANDLE, PVOID, PCWSTR, PCWSTR, PWSTR, DWORD);
+
+typedef BOOL
+(CALLBACK *PSYM_ENUMSOURCEFILES_CALLBACK)(
+ _In_ PSOURCEFILE,
+ _In_opt_ PVOID);
+
+typedef BOOL
+(CALLBACK *PSYM_ENUMSOURCEFILES_CALLBACKW)(
+ _In_ PSOURCEFILEW,
+ _In_opt_ PVOID);
+
+BOOL
+WINAPI
+SymEnumSourceFiles(
+ _In_ HANDLE,
+ _In_ ULONG64,
+ _In_opt_ PCSTR,
+ _In_ PSYM_ENUMSOURCEFILES_CALLBACK,
+ _In_opt_ PVOID);
+
+BOOL
+WINAPI
+SymEnumSourceFilesW(
+ _In_ HANDLE,
+ _In_ ULONG64,
+ _In_opt_ PCWSTR,
+ _In_ PSYM_ENUMSOURCEFILES_CALLBACKW,
+ _In_opt_ PVOID);
+
+BOOL
+WINAPI
+SymGetLineFromAddr64(
+ _In_ HANDLE,
+ _In_ DWORD64,
+ _Out_ PDWORD,
+ _Out_ PIMAGEHLP_LINE64);
+
+BOOL
+WINAPI
+SymGetLineFromAddrW64(
+ _In_ HANDLE,
+ _In_ DWORD64,
+ _Out_ PDWORD,
+ _Out_ PIMAGEHLP_LINEW64);
+
+BOOL WINAPI SymGetLinePrev64(_In_ HANDLE, _Inout_ PIMAGEHLP_LINE64);
+BOOL WINAPI SymGetLinePrevW64(_In_ HANDLE, _Inout_ PIMAGEHLP_LINEW64);
+BOOL WINAPI SymGetLineNext64(_In_ HANDLE, _Inout_ PIMAGEHLP_LINE64);
+BOOL WINAPI SymGetLineNextW64(_In_ HANDLE, _Inout_ PIMAGEHLP_LINEW64);
+
+BOOL
+WINAPI
+SymGetLineFromName64(
+ _In_ HANDLE,
+ _In_opt_ PCSTR,
+ _In_opt_ PCSTR,
+ _In_ DWORD,
+ _Out_ PLONG,
+ _Inout_ PIMAGEHLP_LINE64);
+
+BOOL
+WINAPI
+SymGetLineFromNameW64(
+ _In_ HANDLE,
+ _In_opt_ PCWSTR,
+ _In_opt_ PCWSTR,
+ _In_ DWORD,
+ _Out_ PLONG,
+ _Inout_ PIMAGEHLP_LINEW64);
+
+ULONG
+WINAPI
+SymGetFileLineOffsets64(
+ _In_ HANDLE,
+ _In_opt_ PCSTR,
+ _In_ PCSTR,
+ _Out_writes_(BufferLines) PDWORD64,
+ _In_ ULONG BufferLines);
+
+BOOL
+WINAPI
+SymGetSourceFile(
+ _In_ HANDLE,
+ _In_ ULONG64,
+ _In_opt_ PCSTR,
+ _In_ PCSTR,
+ _Out_writes_(Size) PSTR,
+ _In_ DWORD Size);
+
+BOOL
+WINAPI
+SymGetSourceFileW(
+ _In_ HANDLE,
+ _In_ ULONG64,
+ _In_opt_ PCWSTR,
+ _In_ PCWSTR,
+ _Out_writes_(Size) PWSTR,
+ _In_ DWORD Size);
+
+BOOL
+WINAPI
+SymGetSourceFileToken(
+ _In_ HANDLE,
+ _In_ ULONG64,
+ _In_ PCSTR,
+ _Outptr_ PVOID*,
+ _Out_ DWORD*);
+
+BOOL
+WINAPI
+SymGetSourceFileTokenW(
+ _In_ HANDLE,
+ _In_ ULONG64,
+ _In_ PCWSTR,
+ _Outptr_ PVOID*,
+ _Out_ DWORD*);
+
+BOOL
+WINAPI
+SymGetSourceFileFromToken(
+ _In_ HANDLE,
+ _In_ PVOID,
+ _In_opt_ PCSTR,
+ _Out_writes_(Size) PSTR,
+ _In_ DWORD Size);
+
+BOOL
+WINAPI
+SymGetSourceFileFromTokenW(
+ _In_ HANDLE,
+ _In_ PVOID,
+ _In_opt_ PCWSTR,
+ _Out_writes_(Size) PWSTR,
+ _In_ DWORD Size);
+
+BOOL
+WINAPI
+SymGetSourceVarFromToken(
+ _In_ HANDLE,
+ _In_ PVOID,
+ _In_opt_ PCSTR,
+ _In_ PCSTR,
+ _Out_writes_(Size) PSTR,
+ _In_ DWORD Size);
+
+BOOL
+WINAPI
+SymGetSourceVarFromTokenW(
+ _In_ HANDLE,
+ _In_ PVOID,
+ _In_opt_ PCWSTR,
+ _In_ PCWSTR,
+ _Out_writes_(Size) PWSTR,
+ _In_ DWORD Size);
typedef struct _SRCCODEINFO
{
@@ -1186,66 +1702,349 @@
DWORD64 Address;
} SRCCODEINFOW, *PSRCCODEINFOW;
-typedef BOOL (CALLBACK* PSYM_ENUMLINES_CALLBACK)(PSRCCODEINFO, PVOID);
-typedef BOOL (CALLBACK* PSYM_ENUMLINES_CALLBACKW)(PSRCCODEINFOW, PVOID);
-BOOL WINAPI SymEnumLines(HANDLE, ULONG64, PCSTR, PCSTR, PSYM_ENUMLINES_CALLBACK, PVOID);
-BOOL WINAPI SymEnumLinesW(HANDLE, ULONG64, PCWSTR, PCWSTR, PSYM_ENUMLINES_CALLBACKW,
PVOID);
-BOOL WINAPI SymEnumSourceLines(HANDLE, ULONG64, PCSTR, PCSTR, DWORD, DWORD,
PSYM_ENUMLINES_CALLBACK, PVOID);
-BOOL WINAPI SymEnumSourceLinesW(HANDLE, ULONG64, PCWSTR, PCWSTR, DWORD, DWORD,
PSYM_ENUMLINES_CALLBACKW, PVOID);
+typedef BOOL
+(CALLBACK* PSYM_ENUMLINES_CALLBACK)(
+ _In_ PSRCCODEINFO,
+ _In_opt_ PVOID);
+
+typedef BOOL
+(CALLBACK* PSYM_ENUMLINES_CALLBACKW)(
+ _In_ PSRCCODEINFOW,
+ _In_opt_ PVOID);
+
+BOOL
+WINAPI
+SymEnumLines(
+ _In_ HANDLE,
+ _In_ ULONG64,
+ _In_opt_ PCSTR,
+ _In_opt_ PCSTR,
+ _In_ PSYM_ENUMLINES_CALLBACK,
+ _In_opt_ PVOID);
+
+BOOL
+WINAPI
+SymEnumLinesW(
+ _In_ HANDLE,
+ _In_ ULONG64,
+ _In_opt_ PCWSTR,
+ _In_opt_ PCWSTR,
+ _In_ PSYM_ENUMLINES_CALLBACKW,
+ _In_opt_ PVOID);
+
+BOOL
+WINAPI
+SymEnumSourceLines(
+ _In_ HANDLE,
+ _In_ ULONG64,
+ _In_opt_ PCSTR,
+ _In_opt_ PCSTR,
+ _In_opt_ DWORD,
+ _In_ DWORD,
+ _In_ PSYM_ENUMLINES_CALLBACK,
+ _In_opt_ PVOID);
+
+BOOL
+WINAPI
+SymEnumSourceLinesW(
+ _In_ HANDLE,
+ _In_ ULONG64,
+ _In_opt_ PCWSTR,
+ _In_opt_ PCWSTR,
+ _In_opt_ DWORD,
+ _In_ DWORD,
+ _In_ PSYM_ENUMLINES_CALLBACKW,
+ _In_opt_ PVOID);
/*************************
* File & image handling *
*************************/
-BOOL WINAPI SymInitialize(HANDLE, PCSTR, BOOL);
-BOOL WINAPI SymInitializeW(HANDLE, PCWSTR, BOOL);
-BOOL WINAPI SymCleanup(HANDLE);
-
-HANDLE WINAPI FindDebugInfoFile(PCSTR, PCSTR, PSTR);
-typedef BOOL (CALLBACK *PFIND_DEBUG_FILE_CALLBACK)(HANDLE, PCSTR, PVOID);
-typedef BOOL (CALLBACK *PFIND_DEBUG_FILE_CALLBACKW)(HANDLE, PCWSTR, PVOID);
-HANDLE WINAPI FindDebugInfoFileEx(PCSTR, PCSTR, PSTR, PFIND_DEBUG_FILE_CALLBACK, PVOID);
-HANDLE WINAPI FindDebugInfoFileExW(PCWSTR, PCWSTR, PWSTR, PFIND_DEBUG_FILE_CALLBACKW,
PVOID);
-HANDLE WINAPI SymFindDebugInfoFile(HANDLE, PCSTR, PSTR, PFIND_DEBUG_FILE_CALLBACK,
PVOID);
-HANDLE WINAPI SymFindDebugInfoFileW(HANDLE, PCWSTR, PWSTR, PFIND_DEBUG_FILE_CALLBACKW,
PVOID);
-typedef BOOL (CALLBACK *PFINDFILEINPATHCALLBACK)(PCSTR, PVOID);
-typedef BOOL (CALLBACK *PFINDFILEINPATHCALLBACKW)(PCWSTR, PVOID);
+
+BOOL WINAPI SymInitialize(_In_ HANDLE, _In_opt_ PCSTR, _In_ BOOL);
+BOOL WINAPI SymInitializeW(_In_ HANDLE, _In_opt_ PCWSTR, _In_ BOOL);
+BOOL WINAPI SymCleanup(_In_ HANDLE);
+
+HANDLE
+WINAPI
+FindDebugInfoFile(
+ _In_ PCSTR,
+ _In_ PCSTR,
+ _Out_writes_(MAX_PATH + 1) PSTR);
+
+typedef BOOL
+(CALLBACK *PFIND_DEBUG_FILE_CALLBACK)(
+ _In_ HANDLE,
+ _In_ PCSTR,
+ _In_ PVOID);
+
+typedef BOOL
+(CALLBACK *PFIND_DEBUG_FILE_CALLBACKW)(
+ _In_ HANDLE,
+ _In_ PCWSTR,
+ _In_ PVOID);
+
+HANDLE
+WINAPI
+FindDebugInfoFileEx(
+ _In_ PCSTR,
+ _In_ PCSTR,
+ _Out_writes_(MAX_PATH + 1) PSTR,
+ _In_opt_ PFIND_DEBUG_FILE_CALLBACK,
+ _In_opt_ PVOID);
+
+HANDLE
+WINAPI
+FindDebugInfoFileExW(
+ _In_ PCWSTR,
+ _In_ PCWSTR,
+ _Out_writes_(MAX_PATH + 1) PWSTR,
+ _In_opt_ PFIND_DEBUG_FILE_CALLBACKW,
+ _In_opt_ PVOID);
+
+HANDLE
+WINAPI
+SymFindDebugInfoFile(
+ _In_ HANDLE,
+ _In_ PCSTR,
+ _Out_writes_(MAX_PATH + 1) PSTR,
+ _In_opt_ PFIND_DEBUG_FILE_CALLBACK,
+ _In_opt_ PVOID);
+
+HANDLE
+WINAPI
+SymFindDebugInfoFileW(
+ _In_ HANDLE,
+ _In_ PCWSTR,
+ _Out_writes_(MAX_PATH + 1) PWSTR,
+ _In_opt_ PFIND_DEBUG_FILE_CALLBACKW,
+ _In_opt_ PVOID);
+
+typedef BOOL
+(CALLBACK *PFINDFILEINPATHCALLBACK)(
+ _In_ PCSTR,
+ _In_ PVOID);
+
+typedef BOOL
+(CALLBACK *PFINDFILEINPATHCALLBACKW)(
+ _In_ PCWSTR,
+ _In_ PVOID);
+
BOOL WINAPI FindFileInPath(HANDLE, PCSTR, PCSTR, PVOID, DWORD, DWORD, DWORD,
PSTR, PFINDFILEINPATHCALLBACK, PVOID);
-BOOL WINAPI SymFindFileInPath(HANDLE, PCSTR, PCSTR, PVOID, DWORD, DWORD, DWORD,
- PSTR, PFINDFILEINPATHCALLBACK, PVOID);
-BOOL WINAPI SymFindFileInPathW(HANDLE, PCWSTR, PCWSTR, PVOID, DWORD, DWORD, DWORD,
- PWSTR, PFINDFILEINPATHCALLBACKW, PVOID);
-HANDLE WINAPI FindExecutableImage(PCSTR, PCSTR, PSTR);
-typedef BOOL (CALLBACK *PFIND_EXE_FILE_CALLBACK)(HANDLE, PCSTR, PVOID);
-typedef BOOL (CALLBACK *PFIND_EXE_FILE_CALLBACKW)(HANDLE, PCWSTR, PVOID);
-HANDLE WINAPI FindExecutableImageEx(PCSTR, PCSTR, PSTR, PFIND_EXE_FILE_CALLBACK, PVOID);
-HANDLE WINAPI FindExecutableImageExW(PCWSTR, PCWSTR, PWSTR, PFIND_EXE_FILE_CALLBACKW,
PVOID);
-HANDLE WINAPI SymFindExecutableImage(HANDLE, PCSTR, PSTR, PFIND_EXE_FILE_CALLBACK,
PVOID);
-HANDLE WINAPI SymFindExecutableImageW(HANDLE, PCWSTR, PWSTR, PFIND_EXE_FILE_CALLBACKW,
PVOID);
-PIMAGE_NT_HEADERS WINAPI ImageNtHeader(PVOID);
-PVOID WINAPI ImageDirectoryEntryToDataEx(PVOID, BOOLEAN, USHORT, PULONG,
- PIMAGE_SECTION_HEADER *);
-PVOID WINAPI ImageDirectoryEntryToData(PVOID, BOOLEAN, USHORT, PULONG);
-PIMAGE_SECTION_HEADER WINAPI ImageRvaToSection(PIMAGE_NT_HEADERS, PVOID, ULONG);
-PVOID WINAPI ImageRvaToVa(PIMAGE_NT_HEADERS, PVOID, ULONG, PIMAGE_SECTION_HEADER*);
-BOOL WINAPI SymGetSearchPath(HANDLE, PSTR, DWORD);
-BOOL WINAPI SymGetSearchPathW(HANDLE, PWSTR, DWORD);
-BOOL WINAPI SymSetSearchPath(HANDLE, PCSTR);
-BOOL WINAPI SymSetSearchPathW(HANDLE, PCWSTR);
-DWORD WINAPI GetTimestampForLoadedLibrary(HMODULE);
-BOOL WINAPI MakeSureDirectoryPathExists(PCSTR);
-BOOL WINAPI SearchTreeForFile(PCSTR, PCSTR, PSTR);
-BOOL WINAPI SearchTreeForFileW(PCWSTR, PCWSTR, PWSTR);
-typedef BOOL (CALLBACK *PENUMDIRTREE_CALLBACK)(PCSTR, PVOID);
-typedef BOOL (CALLBACK *PENUMDIRTREE_CALLBACKW)(PCWSTR, PVOID);
-BOOL WINAPI EnumDirTree(HANDLE, PCSTR, PCSTR, PSTR, PENUMDIRTREE_CALLBACK, PVOID);
-BOOL WINAPI EnumDirTreeW(HANDLE, PCWSTR, PCWSTR, PWSTR, PENUMDIRTREE_CALLBACKW, PVOID);
-BOOL WINAPI SymMatchFileName(PCSTR, PCSTR, PSTR*, PSTR*);
-BOOL WINAPI SymMatchFileNameW(PCWSTR, PCWSTR, PWSTR*, PWSTR*);
-PCHAR WINAPI SymSetHomeDirectory(HANDLE, PCSTR);
-PWSTR WINAPI SymSetHomeDirectoryW(HANDLE, PCWSTR);
-PCHAR WINAPI SymGetHomeDirectory(DWORD, PSTR, size_t);
-PWSTR WINAPI SymGetHomeDirectoryW(DWORD, PWSTR, size_t);
+
+BOOL
+WINAPI
+SymFindFileInPath(
+ _In_ HANDLE,
+ _In_opt_ PCSTR,
+ _In_ PCSTR,
+ _In_opt_ PVOID,
+ _In_ DWORD,
+ _In_ DWORD,
+ _In_ DWORD,
+ _Out_writes_(MAX_PATH + 1) PSTR,
+ _In_opt_ PFINDFILEINPATHCALLBACK,
+ _In_opt_ PVOID);
+
+BOOL
+WINAPI
+SymFindFileInPathW(
+ _In_ HANDLE,
+ _In_opt_ PCWSTR,
+ _In_ PCWSTR,
+ _In_opt_ PVOID,
+ _In_ DWORD,
+ _In_ DWORD,
+ _In_ DWORD,
+ _Out_writes_(MAX_PATH + 1) PWSTR,
+ _In_opt_ PFINDFILEINPATHCALLBACKW,
+ _In_opt_ PVOID);
+
+HANDLE
+WINAPI
+FindExecutableImage(
+ _In_ PCSTR,
+ _In_ PCSTR,
+ _Out_writes_(MAX_PATH + 1) PSTR);
+
+typedef BOOL
+(CALLBACK *PFIND_EXE_FILE_CALLBACK)(
+ _In_ HANDLE,
+ _In_ PCSTR,
+ _In_opt_ PVOID);
+
+typedef BOOL
+(CALLBACK *PFIND_EXE_FILE_CALLBACKW)(
+ _In_ HANDLE,
+ _In_ PCWSTR,
+ _In_opt_ PVOID);
+
+HANDLE
+WINAPI
+FindExecutableImageEx(
+ _In_ PCSTR,
+ _In_ PCSTR,
+ _Out_writes_(MAX_PATH + 1) PSTR,
+ _In_opt_ PFIND_EXE_FILE_CALLBACK,
+ _In_opt_ PVOID);
+
+HANDLE
+WINAPI
+FindExecutableImageExW(
+ _In_ PCWSTR,
+ _In_ PCWSTR,
+ _Out_writes_(MAX_PATH + 1) PWSTR,
+ _In_opt_ PFIND_EXE_FILE_CALLBACKW,
+ _In_opt_ PVOID);
+
+HANDLE
+WINAPI
+SymFindExecutableImage(
+ _In_ HANDLE,
+ _In_ PCSTR,
+ _Out_writes_(MAX_PATH + 1) PSTR,
+ _In_ PFIND_EXE_FILE_CALLBACK,
+ _In_ PVOID);
+
+HANDLE
+WINAPI
+SymFindExecutableImageW(
+ _In_ HANDLE,
+ _In_ PCWSTR,
+ _Out_writes_(MAX_PATH + 1) PWSTR,
+ _In_ PFIND_EXE_FILE_CALLBACKW,
+ _In_ PVOID);
+
+PIMAGE_NT_HEADERS WINAPI ImageNtHeader(_In_ PVOID);
+
+PVOID
+WINAPI
+ImageDirectoryEntryToDataEx(
+ _In_ PVOID,
+ _In_ BOOLEAN,
+ _In_ USHORT,
+ _Out_ PULONG,
+ _Out_opt_ PIMAGE_SECTION_HEADER *);
+
+PVOID
+WINAPI
+ImageDirectoryEntryToData(
+ _In_ PVOID,
+ _In_ BOOLEAN,
+ _In_ USHORT,
+ _Out_ PULONG);
+
+PIMAGE_SECTION_HEADER
+WINAPI
+ImageRvaToSection(
+ _In_ PIMAGE_NT_HEADERS,
+ _In_ PVOID,
+ _In_ ULONG);
+
+PVOID
+WINAPI
+ImageRvaToVa(
+ _In_ PIMAGE_NT_HEADERS,
+ _In_ PVOID,
+ _In_ ULONG,
+ _In_opt_ PIMAGE_SECTION_HEADER*);
+
+BOOL
+WINAPI
+SymGetSearchPath(
+ _In_ HANDLE,
+ _Out_writes_(SearchPathLength) PSTR,
+ _In_ DWORD SearchPathLength);
+
+BOOL
+WINAPI
+SymGetSearchPathW(
+ _In_ HANDLE,
+ _Out_writes_(SearchPathLength) PWSTR,
+ _In_ DWORD SearchPathLength);
+
+BOOL WINAPI SymSetSearchPath(_In_ HANDLE, _In_opt_ PCSTR);
+BOOL WINAPI SymSetSearchPathW(_In_ HANDLE, _In_opt_ PCWSTR);
+DWORD WINAPI GetTimestampForLoadedLibrary(_In_ HMODULE);
+BOOL WINAPI MakeSureDirectoryPathExists(_In_ PCSTR);
+
+BOOL
+WINAPI
+SearchTreeForFile(
+ _In_ PCSTR,
+ _In_ PCSTR,
+ _Out_writes_(MAX_PATH + 1) PSTR);
+
+BOOL
+WINAPI
+SearchTreeForFileW(
+ _In_ PCWSTR,
+ _In_ PCWSTR,
+ _Out_writes_(MAX_PATH + 1) PWSTR);
+
+typedef BOOL
+(CALLBACK *PENUMDIRTREE_CALLBACK)(
+ _In_ PCSTR,
+ _In_opt_ PVOID);
+
+typedef BOOL
+(CALLBACK *PENUMDIRTREE_CALLBACKW)(
+ _In_ PCWSTR,
+ _In_opt_ PVOID);
+
+BOOL
+WINAPI
+EnumDirTree(
+ _In_opt_ HANDLE,
+ _In_ PCSTR,
+ _In_ PCSTR,
+ _Out_writes_opt_(MAX_PATH + 1) PSTR,
+ _In_opt_ PENUMDIRTREE_CALLBACK,
+ _In_opt_ PVOID);
+
+BOOL
+WINAPI
+EnumDirTreeW(
+ _In_opt_ HANDLE,
+ _In_ PCWSTR,
+ _In_ PCWSTR,
+ _Out_writes_opt_(MAX_PATH + 1) PWSTR,
+ _In_opt_ PENUMDIRTREE_CALLBACKW,
+ _In_opt_ PVOID);
+
+BOOL
+WINAPI
+SymMatchFileName(
+ _In_ PCSTR,
+ _In_ PCSTR,
+ _Outptr_opt_ PSTR*,
+ _Outptr_opt_ PSTR*);
+
+BOOL
+WINAPI
+SymMatchFileNameW(
+ _In_ PCWSTR,
+ _In_ PCWSTR,
+ _Outptr_opt_ PWSTR*,
+ _Outptr_opt_ PWSTR*);
+
+PCHAR WINAPI SymSetHomeDirectory(_In_opt_ HANDLE, _In_opt_ PCSTR);
+PWSTR WINAPI SymSetHomeDirectoryW(_In_opt_ HANDLE, _In_opt_ PCWSTR);
+
+PCHAR
+WINAPI
+SymGetHomeDirectory(
+ _In_ DWORD,
+ _Out_writes_(size) PSTR,
+ _In_ size_t size);
+
+PWSTR
+WINAPI
+SymGetHomeDirectoryW(
+ _In_ DWORD,
+ _Out_writes_(size) PWSTR,
+ _In_ size_t size);
+
#define hdBase 0
#define hdSym 1
#define hdSrc 2
@@ -1254,7 +2053,13 @@
/*************************
* Context management *
*************************/
-BOOL WINAPI SymSetContext(HANDLE, PIMAGEHLP_STACK_FRAME, PIMAGEHLP_CONTEXT);
+
+BOOL
+WINAPI
+SymSetContext(
+ _In_ HANDLE,
+ _In_ PIMAGEHLP_STACK_FRAME,
+ _In_opt_ PIMAGEHLP_CONTEXT);
/*************************
@@ -1325,22 +2130,57 @@
KDHELP64 KdHelp;
} STACKFRAME64, *LPSTACKFRAME64;
-typedef BOOL (CALLBACK *PREAD_PROCESS_MEMORY_ROUTINE64)
- (HANDLE, DWORD64, PVOID, DWORD, PDWORD);
-typedef PVOID (CALLBACK *PFUNCTION_TABLE_ACCESS_ROUTINE64)(HANDLE, DWORD64);
-typedef DWORD64 (CALLBACK *PGET_MODULE_BASE_ROUTINE64)(HANDLE, DWORD64);
-typedef DWORD64 (CALLBACK *PTRANSLATE_ADDRESS_ROUTINE64)(HANDLE, HANDLE, LPADDRESS64);
-BOOL WINAPI StackWalk64(DWORD, HANDLE, HANDLE, LPSTACKFRAME64, PVOID,
- PREAD_PROCESS_MEMORY_ROUTINE64,
- PFUNCTION_TABLE_ACCESS_ROUTINE64,
- PGET_MODULE_BASE_ROUTINE64,
- PTRANSLATE_ADDRESS_ROUTINE64);
-
-PVOID WINAPI SymFunctionTableAccess64(HANDLE, DWORD64);
-
-typedef PVOID (CALLBACK *PSYMBOL_FUNCENTRY_CALLBACK64)(HANDLE, ULONG64, ULONG64);
-
-BOOL WINAPI SymRegisterFunctionEntryCallback64(HANDLE, PSYMBOL_FUNCENTRY_CALLBACK64,
ULONG64);
+typedef BOOL
+(CALLBACK *PREAD_PROCESS_MEMORY_ROUTINE64)(
+ _In_ HANDLE,
+ _In_ DWORD64,
+ _Out_writes_bytes_(nSize) PVOID,
+ _In_ DWORD nSize,
+ _Out_ PDWORD);
+
+typedef PVOID
+(CALLBACK *PFUNCTION_TABLE_ACCESS_ROUTINE64)(
+ _In_ HANDLE,
+ _In_ DWORD64);
+
+typedef DWORD64
+(CALLBACK *PGET_MODULE_BASE_ROUTINE64)(
+ _In_ HANDLE,
+ _In_ DWORD64);
+
+typedef DWORD64
+(CALLBACK *PTRANSLATE_ADDRESS_ROUTINE64)(
+ _In_ HANDLE,
+ _In_ HANDLE,
+ _In_ LPADDRESS64);
+
+BOOL
+WINAPI
+StackWalk64(
+ _In_ DWORD,
+ _In_ HANDLE,
+ _In_ HANDLE,
+ _Inout_ LPSTACKFRAME64,
+ _Inout_ PVOID,
+ _In_opt_ PREAD_PROCESS_MEMORY_ROUTINE64,
+ _In_opt_ PFUNCTION_TABLE_ACCESS_ROUTINE64,
+ _In_opt_ PGET_MODULE_BASE_ROUTINE64,
+ _In_opt_ PTRANSLATE_ADDRESS_ROUTINE64);
+
+PVOID WINAPI SymFunctionTableAccess64(_In_ HANDLE, _In_ DWORD64);
+
+typedef PVOID
+(CALLBACK *PSYMBOL_FUNCENTRY_CALLBACK64)(
+ _In_ HANDLE,
+ _In_ ULONG64,
+ _In_ ULONG64);
+
+BOOL
+WINAPI
+SymRegisterFunctionEntryCallback64(
+ _In_ HANDLE,
+ _In_ PSYMBOL_FUNCENTRY_CALLBACK64,
+ _In_ ULONG64);
/*************************
* Version, global stuff *
@@ -1357,7 +2197,7 @@
} API_VERSION, *LPAPI_VERSION;
LPAPI_VERSION WINAPI ImagehlpApiVersion(void);
-LPAPI_VERSION WINAPI ImagehlpApiVersionEx(LPAPI_VERSION);
+LPAPI_VERSION WINAPI ImagehlpApiVersionEx(_In_ LPAPI_VERSION);
typedef struct _IMAGE_DEBUG_INFORMATION
{
@@ -1395,14 +2235,20 @@
} IMAGE_DEBUG_INFORMATION, *PIMAGE_DEBUG_INFORMATION;
-PIMAGE_DEBUG_INFORMATION WINAPI MapDebugInformation(HANDLE, PCSTR, PCSTR, ULONG);
-
-BOOL WINAPI UnmapDebugInformation(PIMAGE_DEBUG_INFORMATION);
-
-DWORD WINAPI SymGetOptions(void);
-DWORD WINAPI SymSetOptions(DWORD);
-
-BOOL WINAPI SymSetParentWindow(HWND);
+PIMAGE_DEBUG_INFORMATION
+WINAPI
+MapDebugInformation(
+ _In_opt_ HANDLE,
+ _In_ PCSTR,
+ _In_opt_ PCSTR,
+ _In_ ULONG);
+
+BOOL WINAPI UnmapDebugInformation(_Out_ PIMAGE_DEBUG_INFORMATION);
+
+DWORD WINAPI SymGetOptions(void);
+DWORD WINAPI SymSetOptions(_In_ DWORD);
+
+BOOL WINAPI SymSetParentWindow(_In_ HWND);
/*************************
* Version, global stuff *
@@ -1485,45 +2331,215 @@
#else
-typedef BOOL (CALLBACK *PENUMLOADED_MODULES_CALLBACK)(PCSTR, ULONG, ULONG, PVOID);
-typedef PVOID (CALLBACK *PFUNCTION_TABLE_ACCESS_ROUTINE)(HANDLE, DWORD);
-typedef DWORD (CALLBACK *PGET_MODULE_BASE_ROUTINE)(HANDLE, DWORD);
-typedef BOOL (CALLBACK *PREAD_PROCESS_MEMORY_ROUTINE)(HANDLE, DWORD, PVOID, DWORD,
PDWORD);
-typedef BOOL (CALLBACK *PSYM_ENUMMODULES_CALLBACK)(PCSTR, ULONG, PVOID);
-typedef BOOL (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACK)(PCSTR, ULONG, ULONG, PVOID);
-typedef BOOL (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACKW)(PCWSTR, ULONG, ULONG, PVOID);
-typedef BOOL (CALLBACK *PSYMBOL_REGISTERED_CALLBACK)(HANDLE, ULONG, PVOID, PVOID);
-typedef PVOID (CALLBACK *PSYMBOL_FUNCENTRY_CALLBACK)(HANDLE, DWORD, PVOID);
-typedef DWORD (CALLBACK *PTRANSLATE_ADDRESS_ROUTINE)(HANDLE, HANDLE, LPADDRESS);
-
-BOOL WINAPI EnumerateLoadedModules(HANDLE, PENUMLOADED_MODULES_CALLBACK, PVOID);
-BOOL WINAPI StackWalk(DWORD, HANDLE, HANDLE, LPSTACKFRAME, PVOID,
PREAD_PROCESS_MEMORY_ROUTINE, PFUNCTION_TABLE_ACCESS_ROUTINE, PGET_MODULE_BASE_ROUTINE,
PTRANSLATE_ADDRESS_ROUTINE);
-BOOL WINAPI SymEnumerateModules(HANDLE, PSYM_ENUMMODULES_CALLBACK, PVOID);
-BOOL WINAPI SymEnumerateSymbols(HANDLE, ULONG, PSYM_ENUMSYMBOLS_CALLBACK, PVOID);
-BOOL WINAPI SymEnumerateSymbolsW(HANDLE, ULONG, PSYM_ENUMSYMBOLS_CALLBACKW, PVOID);
-PVOID WINAPI SymFunctionTableAccess(HANDLE, DWORD);
-BOOL WINAPI SymGetLineFromAddr(HANDLE, DWORD, PDWORD, PIMAGEHLP_LINE);
-BOOL WINAPI SymGetLineFromAddrW(HANDLE, DWORD, PDWORD, PIMAGEHLP_LINEW);
-BOOL WINAPI SymGetLineFromName(HANDLE, PCSTR, PCSTR, DWORD, PLONG, PIMAGEHLP_LINE);
-BOOL WINAPI SymGetLineNext(HANDLE, PIMAGEHLP_LINE);
-BOOL WINAPI SymGetLineNextW(HANDLE, PIMAGEHLP_LINEW);
-BOOL WINAPI SymGetLinePrev(HANDLE, PIMAGEHLP_LINE);
-BOOL WINAPI SymGetLinePrevW(HANDLE, PIMAGEHLP_LINEW);
-DWORD WINAPI SymGetModuleBase(HANDLE, DWORD);
-BOOL WINAPI SymGetModuleInfo(HANDLE, DWORD, PIMAGEHLP_MODULE);
-BOOL WINAPI SymGetModuleInfoW(HANDLE, DWORD, PIMAGEHLP_MODULEW);
-BOOL WINAPI SymGetSymFromAddr(HANDLE, DWORD, PDWORD, PIMAGEHLP_SYMBOL);
-BOOL WINAPI SymGetSymFromName(HANDLE, PCSTR, PIMAGEHLP_SYMBOL);
-BOOL WINAPI SymGetSymNext(HANDLE, PIMAGEHLP_SYMBOL);
-BOOL WINAPI SymGetSymNextW(HANDLE, PIMAGEHLP_SYMBOLW);
-BOOL WINAPI SymGetSymPrev(HANDLE, PIMAGEHLP_SYMBOL);
-BOOL WINAPI SymGetSymPrevW(HANDLE, PIMAGEHLP_SYMBOLW);
-DWORD WINAPI SymLoadModule(HANDLE, HANDLE, PCSTR, PCSTR, DWORD, DWORD);
-BOOL WINAPI SymRegisterCallback(HANDLE, PSYMBOL_REGISTERED_CALLBACK, PVOID);
-BOOL WINAPI SymRegisterFunctionEntryCallback(HANDLE, PSYMBOL_FUNCENTRY_CALLBACK,
PVOID);
-BOOL WINAPI SymRefreshModuleList(HANDLE);
-BOOL WINAPI SymUnDName(PIMAGEHLP_SYMBOL, PSTR, DWORD);
-BOOL WINAPI SymUnloadModule(HANDLE, DWORD);
+typedef BOOL
+(CALLBACK *PENUMLOADED_MODULES_CALLBACK)(
+ _In_ PCSTR,
+ _In_ ULONG,
+ _In_ ULONG,
+ _In_opt_ PVOID);
+
+typedef PVOID
+(CALLBACK *PFUNCTION_TABLE_ACCESS_ROUTINE)(
+ _In_ HANDLE,
+ _In_ DWORD);
+
+typedef DWORD
+(CALLBACK *PGET_MODULE_BASE_ROUTINE)(
+ _In_ HANDLE,
+ _In_ DWORD);
+
+typedef BOOL
+(CALLBACK *PREAD_PROCESS_MEMORY_ROUTINE)(
+ _In_ HANDLE,
+ _In_ DWORD,
+ _Out_writes_bytes_(nSize) PVOID,
+ _In_ DWORD nSize,
+ _Out_ PDWORD);
+
+typedef BOOL
+(CALLBACK *PSYM_ENUMMODULES_CALLBACK)(
+ _In_ PCSTR,
+ _In_ ULONG,
+ _In_opt_ PVOID);
+
+typedef BOOL
+(CALLBACK *PSYM_ENUMSYMBOLS_CALLBACK)(
+ _In_ PCSTR,
+ _In_ ULONG,
+ _In_ ULONG,
+ _In_opt_ PVOID);
+
+typedef BOOL
+(CALLBACK *PSYM_ENUMSYMBOLS_CALLBACKW)(
+ _In_ PCWSTR,
+ _In_ ULONG,
+ _In_ ULONG,
+ _In_opt_ PVOID);
+
+typedef BOOL
+(CALLBACK *PSYMBOL_REGISTERED_CALLBACK)(
+ _In_ HANDLE,
+ _In_ ULONG,
+ _In_opt_ PVOID,
+ _In_opt_ PVOID);
+
+typedef PVOID
+(CALLBACK *PSYMBOL_FUNCENTRY_CALLBACK)(
+ _In_ HANDLE,
+ _In_ DWORD,
+ _In_opt_ PVOID);
+
+typedef DWORD
+(CALLBACK *PTRANSLATE_ADDRESS_ROUTINE)(
+ _In_ HANDLE,
+ _In_ HANDLE,
+ _Out_ LPADDRESS);
+
+BOOL
+WINAPI
+EnumerateLoadedModules(
+ _In_ HANDLE,
+ _In_ PENUMLOADED_MODULES_CALLBACK,
+ _In_opt_ PVOID);
+
+BOOL
+WINAPI
+StackWalk(
+ _In_ DWORD,
+ _In_ HANDLE,
+ _In_ HANDLE,
+ _Inout_ LPSTACKFRAME,
+ _Inout_ PVOID,
+ _In_opt_ PREAD_PROCESS_MEMORY_ROUTINE,
+ _In_opt_ PFUNCTION_TABLE_ACCESS_ROUTINE,
+ _In_opt_ PGET_MODULE_BASE_ROUTINE,
+ _In_opt_ PTRANSLATE_ADDRESS_ROUTINE);
+
+BOOL
+WINAPI
+SymEnumerateModules(
+ _In_ HANDLE,
+ _In_ PSYM_ENUMMODULES_CALLBACK,
+ _In_opt_ PVOID);
+
+BOOL
+WINAPI
+SymEnumerateSymbols(
+ _In_ HANDLE,
+ _In_ ULONG,
+ _In_ PSYM_ENUMSYMBOLS_CALLBACK,
+ _In_opt_ PVOID);
+
+BOOL
+WINAPI
+SymEnumerateSymbolsW(
+ _In_ HANDLE,
+ _In_ ULONG,
+ _In_ PSYM_ENUMSYMBOLS_CALLBACKW,
+ _In_opt_ PVOID);
+
+PVOID WINAPI SymFunctionTableAccess(_In_ HANDLE, _In_ DWORD);
+
+BOOL
+WINAPI
+SymGetLineFromAddr(
+ _In_ HANDLE,
+ _In_ DWORD,
+ _Out_ PDWORD,
+ _Out_ PIMAGEHLP_LINE);
+
+BOOL
+WINAPI
+SymGetLineFromAddrW(
+ _In_ HANDLE,
+ _In_ DWORD,
+ _Out_ PDWORD,
+ _Out_ PIMAGEHLP_LINEW);
+
+BOOL
+WINAPI
+SymGetLineFromName(
+ _In_ HANDLE,
+ _In_opt_ PCSTR,
+ _In_opt_ PCSTR,
+ _In_ DWORD,
+ _Out_ PLONG,
+ _Inout_ PIMAGEHLP_LINE);
+
+BOOL WINAPI SymGetLineNext(_In_ HANDLE, _Inout_ PIMAGEHLP_LINE);
+BOOL WINAPI SymGetLineNextW(_In_ HANDLE, _Inout_ PIMAGEHLP_LINEW);
+BOOL WINAPI SymGetLinePrev(_In_ HANDLE, _Inout_ PIMAGEHLP_LINE);
+BOOL WINAPI SymGetLinePrevW(_In_ HANDLE, _Inout_ PIMAGEHLP_LINEW);
+DWORD WINAPI SymGetModuleBase(_In_ HANDLE, _In_ DWORD);
+
+BOOL
+WINAPI
+SymGetModuleInfo(
+ _In_ HANDLE,
+ _In_ DWORD,
+ _Out_ PIMAGEHLP_MODULE);
+
+BOOL
+WINAPI
+SymGetModuleInfoW(
+ _In_ HANDLE,
+ _In_ DWORD,
+ _Out_ PIMAGEHLP_MODULEW);
+
+BOOL
+WINAPI
+SymGetSymFromAddr(
+ _In_ HANDLE,
+ _In_ DWORD,
+ _Out_opt_ PDWORD,
+ _Inout_ PIMAGEHLP_SYMBOL);
+
+BOOL
+WINAPI
+SymGetSymFromName(
+ _In_ HANDLE,
+ _In_ PCSTR,
+ _Inout_ PIMAGEHLP_SYMBOL);
+
+BOOL WINAPI SymGetSymNext(_In_ HANDLE, _Inout_ PIMAGEHLP_SYMBOL);
+BOOL WINAPI SymGetSymNextW(_In_ HANDLE, _Inout_ PIMAGEHLP_SYMBOLW);
+BOOL WINAPI SymGetSymPrev(_In_ HANDLE, _Inout_ PIMAGEHLP_SYMBOL);
+BOOL WINAPI SymGetSymPrevW(_In_ HANDLE, _Inout_ PIMAGEHLP_SYMBOLW);
+
+DWORD
+WINAPI
+SymLoadModule(
+ _In_ HANDLE,
+ _In_opt_ HANDLE,
+ _In_opt_ PCSTR,
+ _In_opt_ PCSTR,
+ _In_ DWORD,
+ _In_ DWORD);
+
+BOOL
+WINAPI
+SymRegisterCallback(
+ _In_ HANDLE,
+ _In_ PSYMBOL_REGISTERED_CALLBACK,
+ _In_opt_ PVOID);
+
+BOOL
+WINAPI
+SymRegisterFunctionEntryCallback(
+ _In_ HANDLE,
+ _In_ PSYMBOL_FUNCENTRY_CALLBACK,
+ _In_opt_ PVOID);
+
+BOOL WINAPI SymRefreshModuleList(_In_ HANDLE);
+
+BOOL
+WINAPI
+SymUnDName(
+ _In_ PIMAGEHLP_SYMBOL,
+ _Out_writes_(UnDecNameLength) PSTR,
+ _In_ DWORD UnDecNameLength);
+
+BOOL WINAPI SymUnloadModule(_In_ HANDLE, _In_ DWORD);
#endif