DllMain not called

Marco Atzeri marco.atzeri@gmail.com
Fri Feb 7 14:49:00 GMT 2020


Am 07.02.2020 um 09:46 schrieb Olivia Nelson:
> I have a simple C program that output something to DbgView on startup:
> 
> #include <windows.h>
> BOOL APIENTRY DllMain( HMODULE hModule,
>                         DWORD  ul_reason_for_call,
>                         LPVOID lpReserved
>                       )
> {
>      switch (ul_reason_for_call)
>      {
>      case DLL_PROCESS_ATTACH:
>          OutputDebugStringA("DLL_PROCESS_ATTACH called");
>      case DLL_THREAD_ATTACH:
>      case DLL_THREAD_DETACH:
>      case DLL_PROCESS_DETACH:
>          break;
>      }
>      return TRUE;
> }
> 
> I didn't observe anything when the DLL is loaded, what was wrong?
> 

This seems a pure Windows program, not a Unix like.

How you compiled it and how are you tring to run it ?

Regards
Marco

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list