Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. why was my dllmain() not called?

why was my dllmain() not called?

Scheduled Pinned Locked Moved C / C++ / MFC
question
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    derek7
    wrote on last edited by
    #1

    // app #include extern "C" void fun(); main() { fun(); } // dll #include extern "C" { _declspec(dllexport) void fun() { std::cout<<"fun() call in Dll\n"; } } _stdcall DllMain() { std::cout<<"dllmain() \n"; }

    N 1 Reply Last reply
    0
    • D derek7

      // app #include extern "C" void fun(); main() { fun(); } // dll #include extern "C" { _declspec(dllexport) void fun() { std::cout<<"fun() call in Dll\n"; } } _stdcall DllMain() { std::cout<<"dllmain() \n"; }

      N Offline
      N Offline
      Nibu babu thomas
      wrote on last edited by
      #2

      derek7 wrote:

      _stdcall DllMain()

      This is not the signature for DLLMain

      BOOL WINAPI DllMain(
      HINSTANCE hinstDLL,
      DWORD fdwReason,
      LPVOID lpvReserved
      );

      More Information[^]


      Nibu thomas Software Developer

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups