I\'m creating a little dll to use in a DLL-INJECTION POC (proof-of-concept). I\'m using codeblocks\' c++ ide.
My dll\'s main (dllmain) looks like this:
See this question to read about the huge number of limitations in DllMain. It's not just security problems. Anything exported by user32 falls into this category.
In other words, you cannot use MessageBox in DllMain. Use something like OutputDebugString instead, which is in kernel32 and does not display any UI.