我创建了一个简单的 dll。我将它注入到一个进程中,但它没有显示消息框。消息框的代码是用 dll 编写的。
dll代码:
//DLL TEST
#include <windows.h>
BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) {
if(callReason == DLL_PROCESS_ATTACH)
MessageBox(0, "Dll Injection Successful! ", "Dll Injector", MB_ICONEXCLAMATION | MB_OK);
return TRUE;
}