DllMain not being called!

This is a discussion on DllMain not being called! within the Windows Programming forums, part of the Platform Specific Boards category; I know how to properly create and link dlls using dev-c++. I just finished a decent sized DLL. But when ...

  1. #1
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    1,626

    Exclamation DllMain not being called!

    I know how to properly create and link dlls using dev-c++. I just finished a decent sized DLL. But when my program runs (this program is linked to my DLL) the library's entry point is not called. Why? What can I do to fix this?
    A class that doesn't overload all operators just isn't finished yet. -- SmugCeePlusPlusWeenie
    A year spent in artificial intelligence is enough to make one believe in God. -- Alan J. Perlis

  2. #2
    Deathray Engineer MacGyver's Avatar
    Join Date
    Mar 2007
    Posts
    3,211
    Without more information, you're probably going to be asked questions like, "Did you change your DLL's entry point?" or something of that nature. I'm too tired at the moment to see anything obviously wrong with what you described.

  3. #3
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    1,626
    No I didn't. It's plain & simple DllMain(). If I exclude it, the compiler complains.
    I looked this up in google, and it seems to have something to do with linker settings for other people, but I've found nothing.
    A class that doesn't overload all operators just isn't finished yet. -- SmugCeePlusPlusWeenie
    A year spent in artificial intelligence is enough to make one believe in God. -- Alan J. Perlis

  4. #4
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    1,626
    Okay, I got it working now. I didn't have dllmain as an export function. I assumed to much!
    A class that doesn't overload all operators just isn't finished yet. -- SmugCeePlusPlusWeenie
    A year spent in artificial intelligence is enough to make one believe in God. -- Alan J. Perlis

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Should I export DllMain() function?
    By chiefmonkey in forum Windows Programming
    Replies: 4
    Last Post: 07-12-2009, 05:32 AM
  2. Destructor being called on SGI hash_map key
    By cunnus88 in forum C++ Programming
    Replies: 4
    Last Post: 02-10-2009, 11:05 PM
  3. Replies: 4
    Last Post: 09-21-2008, 02:27 PM
  4. when is the constructor of a global object called??
    By mynickmynick in forum C++ Programming
    Replies: 6
    Last Post: 08-28-2008, 04:57 AM
  5. DllMain
    By George2 in forum C Programming
    Replies: 1
    Last Post: 10-19-2007, 02:33 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21