   DLL Main in DEV C++ 4.9.9.2
  Basically, I need to create a DLL that runs code when it is loaded from the BOOL WINAPI DllMain function thingy. I have researched a lot of this topic and found all instances of it to be identical to the default that is in the template of DEV when you create a dll project. I tried testing this by putting a message box in the dll process attach...and thread attach...and everything and I have found now way to actually make it work. Can anyone help me figure out what is needed to be done in order to make that run code when the library is loaded.My Current Code is:/* Replace "dll.h" with the name of your header */#include "dll.h"#include <windows.h>DllClass::DllClass(){}DllClass::~DllClass (){}BOOL APIENTRY DllMain(HANDLE hModule, DWORD reason, LPVOID lpReserved){switch(reason){case DLL_PROCESS_ATTACH:MessageBox(NULL, "Hello", "xD", NULL);break;case DLL_THREAD_ATTACH:break;case DLL_THREAD_DETACH:break;case DLL_PROCESS_DETACH:break;}return TRUE;}[Edited by - MySacrafice on May 27, 2006 9:24:21 PM]
  *BUMP*Might it have somthing to do with my header file? Here is my header code:#ifndef _DLL_H_#define _DLL_H_#if BUILDING_DLL# define DLLIMPORT __declspec (dllexport)#else /* Not BUILDING_DLL */# define DLLIMPORT __declspec (dllimport)#endif /* Not BUILDING_DLL */class DLLIMPORT DllClass{  public:    DllClass();    virtual ~DllClass(void);  private:};#endif /* _DLL_H_ */