Code::Blocks

User forums => Using Code::Blocks => Topic started by: BigAngryDog on March 14, 2006, 02:11:43 am

Title: Building a DLL - DllMain not being Called
Post by: BigAngryDog on March 14, 2006, 02:11:43 am
Hi there,

I've built a DLL with C::B and am loading it into an app built with BCB.

However, the "BOOL WINAPI DllMain" function does not seem to be called in the DLL when it is loaded.

Is there anyway to rectify this? Could I be doing something wrong?

Thanks
Title: Re: Building a DLL - DllMain not being Called
Post by: BigAngryDog on March 14, 2006, 02:14:49 am
Don't matter. Got it.

Had saved the main file as cpp. Therefore, I needed:

Code: [Select]
extern "C" {
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
...