哪位高人帮忙转一下这段VC代码啊?(50)

  • 主题发起人 主题发起人 xf_z
  • 开始时间 开始时间
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; }
 

Similar threads

后退
顶部