DWORD64 WINAPI SymLoadModuleExA(
  _In_ HANDLE        hProcess,
  _In_ HANDLE        hFile,
  _In_ PCSTR        ImageName,
  _In_ PCSTR        ModuleName,
  _In_ DWORD64       BaseOfDll,
  _In_ DWORD         DllSize,
  _In_ PMODLOAD_DATA Data,
  _In_ DWORD         Flags
);


DWORD64 WINAPI SymLoadModuleExW(
  _In_ HANDLE        hProcess,
  _In_ HANDLE        hFile,
  _In_ PCWSTR        ImageName,
  _In_ PCWSTR        ModuleName,
  _In_ DWORD64       BaseOfDll,
  _In_ DWORD         DllSize,
  _In_ PMODLOAD_DATA Data,
  _In_ DWORD         Flags
);


BOOL WINAPI SymFromAddr(
  _In_      HANDLE       hProcess,
  _In_      DWORD64      Address,
  _Out_opt_ PDWORD64     Displacement,
  _Inout_   PSYMBOL_INFO Symbol
);


BOOL WINAPI SymGetModuleInfo64(
  _In_  HANDLE             hProcess,
  _In_  DWORD64            dwAddr,
  _Out_ PIMAGEHLP_MODULE64 ModuleInfo
);

BOOL WINAPI SymGetModuleInfoW64(
  _In_  HANDLE              hProcess,
  _In_  DWORD64             qwAddr,
  _Out_ PIMAGEHLP_MODULEW64 ModuleInfo
);

BOOL WINAPI SymInitialize(
  _In_     HANDLE hProcess,
  _In_opt_ LPCSTR UserSearchPath,
  _In_     BOOL   fInvadeProcess
);

BOOL WINAPI SymFromName(
  _In_    HANDLE       hProcess,
  _In_    LPCSTR       Name,
  _Inout_ PSYMBOL_INFO Symbol
);

BOOL WINAPI SymFromNameW(
  _In_ HANDLE        hProcess,
  _In_ PCWSTR        Name,
  _Inout_ PSYMBOL_INFOW Symbol
);

DWORD64 WINAPI SymLoadModuleEx(
  _In_ HANDLE        hProcess,
  _In_ HANDLE        hFile,
  _In_ LPCSTR        ImageName,
  _In_ LPCSTR        ModuleName,
  _In_ DWORD64       BaseOfDll,
  _In_ DWORD         DllSize,
  _In_ PMODLOAD_DATA Data,
  _In_ DWORD         Flags
);

DWORD WINAPI SymSetOptions(
  _In_ DWORD SymOptions
);

DWORD SymGetOptions(
);

BOOL WINAPI SymEnumSymbols(
  _In_ HANDLE                         hProcess,
  _In_ ULONG64                        BaseOfDll,
  _In_ PCSTR                          Mask,
  _In_ PVOID                          EnumSymbolsCallback,
  _In_ PVOID                          UserContext
);


BOOL WINAPI SymEnumSymbolsEx(
  _In_ HANDLE                         hProcess,
  _In_ ULONG64                        BaseOfDll,
  _In_ PCSTR                          Mask,
  _In_ PVOID                          EnumSymbolsCallback,
  _In_ PVOID                          UserContext,
  _In_ DWORD                          Options
);

BOOL WINAPI SymEnumTypes(
  _In_ HANDLE                         hProcess,
  _In_ ULONG64                        BaseOfDll,
  _In_ PVOID                          EnumSymbolsCallback,
  _In_ PVOID                          UserContext
);

BOOL WINAPI SymEnumTypesByName(
  _In_ HANDLE                         hProcess,
  _In_ ULONG64                        BaseOfDll,
  _In_ PCSTR                          mask,
  _In_ PVOID                          EnumSymbolsCallback,
  _In_ PVOID                          UserContext
);

BOOL WINAPI SymEnumerateModules64(
  _In_ HANDLE                      hProcess,
  _In_ PVOID                        EnumModulesCallback,
  _In_ PVOID                       UserContext
);

BOOL SymNext(
  HANDLE       hProcess,
  PSYMBOL_INFO si
);

BOOL SymNextW(
  HANDLE        hProcess,
  PSYMBOL_INFOW siw
);

BOOL SymPrev(
  HANDLE       hProcess,
  PSYMBOL_INFO si
);

BOOL SymPrevW(
  HANDLE        hProcess,
  PSYMBOL_INFOW siw
);

BOOL SymSetContext(
  HANDLE                hProcess,
  PIMAGEHLP_STACK_FRAME StackFrame,
  PIMAGEHLP_CONTEXT     Context
);

BOOL SymSetExtendedOption(
  IMAGEHLP_EXTENDED_OPTIONS option,
  BOOL                      value
);

BOOL SymSrvGetFileIndexes(
  PCSTR  File,
  GUID   *Id,
  PDWORD Val1,
  PDWORD Val2,
  DWORD  Flags
);


BOOL SymSrvGetFileIndexesW(
  PCWSTR File,
  GUID   *Id,
  PDWORD Val1,
  PDWORD Val2,
  DWORD  Flags
);

BOOL SymSrvGetFileIndexInfo(
  PCSTR              File,
  PSYMSRV_INDEX_INFO Info,
  DWORD              Flags
);

BOOL SymSrvGetFileIndexInfoW(
  PCWSTR              File,
  PSYMSRV_INDEX_INFOW Info,
  DWORD               Flags
);

BOOL SymSrvGetFileIndexString(
  HANDLE hProcess,
  PCSTR  SrvPath,
  PCSTR  File,
  PSTR   Index,
  SIZE_T Size,
  DWORD  Flags
);

BOOL SymSrvGetFileIndexStringW(
  HANDLE hProcess,
  PCWSTR SrvPath,
  PCWSTR File,
  PWSTR  Index,
  SIZE_T Size,
  DWORD  Flags
);

BOOL SymUnDName(
  PIMAGEHLP_SYMBOL sym,
  PSTR             UnDecName,
  DWORD            UnDecNameLength
);

BOOL SymUnDName64(
  PIMAGEHLP_SYMBOL64 sym,
  PSTR               UnDecName,
  DWORD              UnDecNameLength
);


BOOL SymUnloadModule(
  HANDLE hProcess,
  DWORD  BaseOfDll
);

BOOL SymUnloadModule64(
  HANDLE  hProcess,
  DWORD64 BaseOfDll
);

DWORD UnDecorateSymbolName(
  PCSTR name,
  PSTR  outputString,
  DWORD maxStringLength,
  DWORD flags
);

DWORD UnDecorateSymbolNameW(
  PCWSTR name,
  PWSTR  outputString,
  DWORD  maxStringLength,
  DWORD  flags
);

BOOL SymCleanup(
  HANDLE hProcess
);


BOOL SymEnumProcesses(
  PSYM_ENUMPROCESSES_CALLBACK EnumProcessesCallback,
  PVOID                       UserContext
);


BOOL SymEnumSymbolsForAddr(
  HANDLE                         hProcess,
  DWORD64                        Address,
  PSYM_ENUMERATESYMBOLS_CALLBACK EnumSymbolsCallback,
  PVOID                          UserContext
);


BOOL SymEnumSymbolsForAddrW(
  HANDLE                          hProcess,
  DWORD64                         Address,
  PSYM_ENUMERATESYMBOLS_CALLBACKW EnumSymbolsCallback,
  PVOID                           UserContext
);


BOOL WINAPI SymGetTypeFromName(
  _In_ HANDLE hProcess,
  _In_ ULONG64 BaseOfDll,
  _In_ PCSTR Name,
  _Inout_ PSYMBOL_INFO Symbol
);


BOOL WINAPI SymGetTypeInfo(
  _In_  HANDLE                    hProcess,
  _In_  DWORD64                   ModBase,
  _In_  ULONG                     TypeId,
  _In_  IMAGEHLP_SYMBOL_TYPE_INFO GetType,
  _Out_ PVOID                     pInfo
);


BOOL SymSearch(
  HANDLE                         hProcess,
  ULONG64                        BaseOfDll,
  DWORD                          Index,
  DWORD                          SymTag,
  PCSTR                          Mask,
  DWORD64                        Address,
  PSYM_ENUMERATESYMBOLS_CALLBACK EnumSymbolsCallback,
  PVOID                          UserContext,
  DWORD                          Options
);


BOOL SymSearchW(
  HANDLE                          hProcess,
  ULONG64                         BaseOfDll,
  DWORD                           Index,
  DWORD                           SymTag,
  PCWSTR                          Mask,
  DWORD64                         Address,
  PSYM_ENUMERATESYMBOLS_CALLBACKW EnumSymbolsCallback,
  PVOID                           UserContext,
  DWORD                           Options
);

PVOID SymFunctionTableAccess(
  HANDLE hProcess,
  DWORD  AddrBase
);

PVOID SymFunctionTableAccess64(
  HANDLE  hProcess,
  DWORD64 AddrBase
);

DWORD SymGetModuleBase(
  HANDLE hProcess,
  DWORD  dwAddr
);

DWORD64 SymGetModuleBase64(
  HANDLE  hProcess,
  DWORD64 qwAddr
);

BOOL SymRefreshModuleList(
  HANDLE hProcess
);

BOOL SymRegisterCallback(
  HANDLE                      hProcess,
  PSYMBOL_REGISTERED_CALLBACK CallbackFunction,
  PVOID                       UserContext
);

BOOL SymRegisterCallback64(
  HANDLE                        hProcess,
  PSYMBOL_REGISTERED_CALLBACK64 CallbackFunction,
  ULONG64                       UserContext
);


BOOL SymRegisterCallbackW64(
  HANDLE                        hProcess,
  PSYMBOL_REGISTERED_CALLBACK64 CallbackFunction,
  ULONG64                       UserContext
);

/* Stack walking */

BOOL StackWalk64(
  DWORD                            MachineType,
  HANDLE                           hProcess,
  HANDLE                           hThread,
  LPSTACKFRAME64                   StackFrame,
  PVOID                            ContextRecord,
  PREAD_PROCESS_MEMORY_ROUTINE64   ReadMemoryRoutine,
  PFUNCTION_TABLE_ACCESS_ROUTINE64 FunctionTableAccessRoutine,
  PGET_MODULE_BASE_ROUTINE64       GetModuleBaseRoutine,
  PTRANSLATE_ADDRESS_ROUTINE64     TranslateAddress
);

BOOL StackWalkEx(
  DWORD                            MachineType,
  HANDLE                           hProcess,
  HANDLE                           hThread,
  LPSTACKFRAME_EX                  StackFrame,
  PVOID                            ContextRecord,
  PREAD_PROCESS_MEMORY_ROUTINE64   ReadMemoryRoutine,
  PFUNCTION_TABLE_ACCESS_ROUTINE64 FunctionTableAccessRoutine,
  PGET_MODULE_BASE_ROUTINE64       GetModuleBaseRoutine,
  PTRANSLATE_ADDRESS_ROUTINE64     TranslateAddress,
  DWORD                            Flags
);


BOOL StackWalk(
  DWORD                          MachineType,
  HANDLE                         hProcess,
  HANDLE                         hThread,
  LPSTACKFRAME                   StackFrame,
  PVOID                          ContextRecord,
  PREAD_PROCESS_MEMORY_ROUTINE   ReadMemoryRoutine,
  PFUNCTION_TABLE_ACCESS_ROUTINE FunctionTableAccessRoutine,
  PGET_MODULE_BASE_ROUTINE       GetModuleBaseRoutine,
  PTRANSLATE_ADDRESS_ROUTINE     TranslateAddress
);

BOOL SymGetSearchPath(
  HANDLE hProcess,
  PSTR   SearchPath,
  DWORD  SearchPathLength
);

BOOL SymGetSearchPathW(
  HANDLE hProcess,
  PWSTR  SearchPath,
  DWORD  SearchPathLength
);

BOOL SymSetSearchPath(
  HANDLE hProcess,
  PCSTR  SearchPath
);

BOOL SymSetSearchPathW(
  HANDLE hProcess,
  PCWSTR SearchPath
);