Commit d2d85a1b authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

dbghelp: Implemented SymGetModuleInfoW and SymGetModuleInfoW64.

parent 922a7bd1
......@@ -83,8 +83,8 @@
@ stdcall SymGetModuleBase64(long double)
@ stdcall SymGetModuleInfo(long long ptr)
@ stdcall SymGetModuleInfo64(long double ptr)
@ stub SymGetModuleInfoW
@ stub SymGetModuleInfoW64
@ stdcall SymGetModuleInfoW(long long ptr)
@ stdcall SymGetModuleInfoW64(long double ptr)
@ stub SymGetOmapBlockBase
@ stdcall SymGetOptions()
@ stub SymGetScope
......
......@@ -661,6 +661,39 @@ BOOL WINAPI SymGetModuleInfo(HANDLE hProcess, DWORD dwAddr,
}
/******************************************************************
* SymGetModuleInfoW (DBGHELP.@)
*
*/
BOOL WINAPI SymGetModuleInfoW(HANDLE hProcess, DWORD dwAddr,
PIMAGEHLP_MODULEW ModuleInfo)
{
IMAGEHLP_MODULE mi;
IMAGEHLP_MODULEW miw;
if (sizeof(miw) < ModuleInfo->SizeOfStruct) FIXME("Wrong size\n");
mi.SizeOfStruct = sizeof(mi);
if (!SymGetModuleInfo(hProcess, dwAddr, &mi)) return FALSE;
miw.SizeOfStruct = mi.SizeOfStruct;
miw.BaseOfImage = mi.BaseOfImage;
miw.ImageSize = mi.ImageSize;
miw.TimeDateStamp = mi.TimeDateStamp;
miw.CheckSum = mi.CheckSum;
miw.NumSyms = mi.NumSyms;
miw.SymType = mi.SymType;
MultiByteToWideChar(CP_ACP, 0, mi.ModuleName, -1,
miw.ModuleName, sizeof(miw.ModuleName) / sizeof(WCHAR));
MultiByteToWideChar(CP_ACP, 0, mi.ImageName, -1,
miw.ImageName, sizeof(miw.ImageName) / sizeof(WCHAR));
MultiByteToWideChar(CP_ACP, 0, mi.LoadedImageName, -1,
miw.LoadedImageName, sizeof(miw.LoadedImageName) / sizeof(WCHAR));
memcpy(ModuleInfo, &miw, ModuleInfo->SizeOfStruct);
return TRUE;
}
/******************************************************************
* SymGetModuleInfo64 (DBGHELP.@)
*
*/
......@@ -720,6 +753,54 @@ BOOL WINAPI SymGetModuleInfo64(HANDLE hProcess, DWORD64 dwAddr,
return TRUE;
}
/******************************************************************
* SymGetModuleInfoW64 (DBGHELP.@)
*
*/
BOOL WINAPI SymGetModuleInfoW64(HANDLE hProcess, DWORD64 dwAddr,
PIMAGEHLP_MODULEW64 ModuleInfo)
{
IMAGEHLP_MODULE64 mi;
IMAGEHLP_MODULEW64 miw;
if (sizeof(miw) < ModuleInfo->SizeOfStruct) FIXME("Wrong size\n");
mi.SizeOfStruct = sizeof(mi);
if (!SymGetModuleInfo64(hProcess, dwAddr, &mi)) return FALSE;
miw.SizeOfStruct = mi.SizeOfStruct;
miw.BaseOfImage = mi.BaseOfImage;
miw.ImageSize = mi.ImageSize;
miw.TimeDateStamp = mi.TimeDateStamp;
miw.CheckSum = mi.CheckSum;
miw.NumSyms = mi.NumSyms;
miw.SymType = mi.SymType;
MultiByteToWideChar(CP_ACP, 0, mi.ModuleName, -1,
miw.ModuleName, sizeof(miw.ModuleName) / sizeof(WCHAR));
MultiByteToWideChar(CP_ACP, 0, mi.ImageName, -1,
miw.ImageName, sizeof(miw.ImageName) / sizeof(WCHAR));
MultiByteToWideChar(CP_ACP, 0, mi.LoadedImageName, -1,
miw.LoadedImageName, sizeof(miw.LoadedImageName) / sizeof(WCHAR));
miw.CVSig = mi.CVSig;
MultiByteToWideChar(CP_ACP, 0, mi.CVData, -1,
miw.CVData, sizeof(miw.CVData) / sizeof(WCHAR));
miw.PdbSig = mi.PdbSig;
miw.PdbSig70 = mi.PdbSig70;
miw.PdbAge = mi.PdbAge;
miw.PdbUnmatched = mi.PdbUnmatched;
miw.DbgUnmatched = mi.DbgUnmatched;
miw.LineNumbers = mi.LineNumbers;
miw.GlobalSymbols = mi.GlobalSymbols;
miw.TypeInfo = mi.TypeInfo;
miw.SourceIndexed = mi.SourceIndexed;
miw.Publics = mi.Publics;
memcpy(ModuleInfo, &miw, ModuleInfo->SizeOfStruct);
return TRUE;
}
/***********************************************************************
* SymGetModuleBase (DBGHELP.@)
*/
......
......@@ -172,7 +172,7 @@ typedef struct _IMAGEHLP_MODULE64
BOOL Publics;
} IMAGEHLP_MODULE64, *PIMAGEHLP_MODULE64;
typedef struct _IMAGEHLP_MODULE64W
typedef struct _IMAGEHLP_MODULEW64
{
DWORD SizeOfStruct;
DWORD64 BaseOfImage;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment