[Help needed] DLL not working

Hey guys.
Recently, I decided to get into DLL programming with C++.
I made a simple DLL but when I inject it into a process, nothing happens.
Here's the code:
1
2
3
4
5
6
7
8
9
10
11
#include <windows.h>



BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
    if(fdwReason == DLL_PROCESS_ATTACH){
    MessageBoxA(0,"Injected","Injected",MB_OK);
    }
    return TRUE; // succesful
}

It's supposed to display a message box when it gets injected into a process, but it doesn't work.
Any help would be appreciated.
Topic archived. No new replies allowed.