X
xf_z
Unregistered / Unconfirmed
GUEST, unregistred user!
BOOL GetDllName(HANDLE hProcess, LPLOAD_DLL_DEBUG_INFO lddi, LPSTR dll_name, int nSize) { LPVOID ptr = 0; ReadProcessMemory(hProcess, lddi->lpImageName, &ptr, sizeof(ptr), NULL); if( ptr == 0 ) return FALSE; WCHAR dll_name_u[MAX_PATH + 1] = {0}; ReadProcessMemory(hProcess, ptr, dll_name_u, sizeof(dll_name_u), NULL); if( dll_name_u[0] == 0 ) return FALSE; if( lddi->fUnicode ) wcstombs(dll_name, dll_name_u, nSize); else lstrcpyn(dll_name, (LPSTR)dll_name_u, nSize); return TRUE; }