int _tmain(int argc, _TCHAR* argv[]) { SymSetOptions( SymGetOptions() | SYMOPT_UNDNAME|SYMOPT_DEFERRED_LOADS|SYMOPT_DEBUG); DWORD64 dwBaseAddr = 0; g_hProcess = OpenProcess(PROCESS_ALL_ACCESS,FALSE,1696); BOOL status = SymInitialize(g_hProcess,"D:\\TF_Sandbox\\SandBx_BL\\INTERN_91F\\TestSim\\debug",TRUE); if(status == FALSE) { } DWORD test = SymLoadModuleEx(g_hProcess, // target process NULL,"D:\\TF_Sandbox\\SandBx_BL\\INTERN_91F\\TestSim\\debug\\TestSim.exe", // name of image file NULL, // name of module - not required dwBaseAddr, // base address - not required 0, // size of image - not required NULL, // MODLOAD_DATA used for special cases 0);//) // flags - not required PIMAGEHLP_MODULE64 mod_Image; mod_Image->SizeOfStruct = sizeof(IMAGEHLP_MODULE64); BOOL retVal = SymGetModuleInfo64(g_hProcess,dwBaseAddr,mod_Image); if(test == 0) { SymCleanup(g_hProcess); return 0; } }
GetLastError
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)