在 2025-01-05 01:46, Pali Rohár 写道:
But the mentioned comment applies also for the main application EXE module? Or only for DLL libraries? Because I have feeling that only for DLL libraries...
It's called both in 'dll_dllmain.cpp' and 'exe_common.inl'. The latter implements all the four variants of narrow/wide `main`/`WinMain` startup routines.
But IIRC DLL library has no way to cause execution of main EXE application entry point. LoadLibrary does not call entry point for EXE binaries if for some reason dll library hook in some DllMain do that. And I'm not aware of any WinAPI function which is doing to call EXE entry point. The only known option is when process starts execution. And I highly double that CLR/.net is going to explicitly execute entry point of EXE application file for some case. It is just a big mystery for me what is the code path which can trigger this for EXE applications.
Those comments seem to say that error handling functions for managed modules may reenter startup code, which sounds plausible if those functions wish to display some nice dialog boxes. However I am currently out of ideas now; haven't studied managed code at all.
-- Best regards, LIU Hao
OpenPGP_signature.asc
Description: OpenPGP digital signature
_______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public