Code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include "dllheader.h"

DWORD WINAPI ShowMessage(LPVOID lParam)
{
MessageBox(NULL, _T("DLL Injection Success"), _T("MessageBox"), MB_OK);
return 0;
}

BOOL WINAPI DllMain(HINSTANCE hinstDll, DWORD fdwReason, LPVOID lpvReserved)
{
HANDLE hThread = NULL;

switch (fdwReason)
{
case DLL_PROCESS_ATTACH:
OutputDebugString(_T("<지뢰찾기.dll> Injection!!!"));
hThread = CreateThread(NULL, 0, ShowMessage, NULL, 0, NULL);
CloseHandle(hThread);
break;
}

return TRUE;
}