我的第一個問題在這裏:D 我想在C++中製作一個DLL,它將製作一個MessageBox,但我得到這個奇怪的錯誤:「成員MessageBox沒有定義」。我搜索在谷歌,但沒有幫助我...:/不調用MessageBox的C++ DLL; 「成員MessageBox沒有被定義」
這裏是我的代碼:
#include<windows.h>
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
MessageBox(0, "DLL Loaded", "SUCCESS STATUS", MB_OK); //here is the error :(
switch (fdwReason)
{
case DLL_PROCESS_ATTACH:
// attach to process
// return FALSE to fail DLL load
break;
case DLL_PROCESS_DETACH:
// detach from process
break;
case DLL_THREAD_ATTACH:
// attach to thread
break;
case DLL_THREAD_DETACH:
// detach from thread
break;
}
return TRUE; // succesful
}
任何想法?我從來沒有過:(