Re: DllMain not called in CreateRemoteThread

2020-02-10 Thread Andrey Repin
Greetings, Olivia Nelson! > I need to use unix socket() interface, mingw does not seem to provide > the following headers: There's no UNIX interfaces in native applications. Choose one or another, not both. > #include > #include > #include > #include Also, please no top posting in this lis

Re: DllMain not called in CreateRemoteThread

2020-02-09 Thread Olivia Nelson
I need to use unix socket() interface, mingw does not seem to provide the following headers: #include #include #include #include On Sat, Feb 8, 2020 at 1:40 PM Marco Atzeri wrote: > > please bottom post on this mailing list > > Am 08.02.2020 um 01:12 schrieb Olivia Nelson: > > Sorry, I made

Re: DllMain not called in CreateRemoteThread

2020-02-07 Thread Marco Atzeri
please bottom post on this mailing list Am 08.02.2020 um 01:12 schrieb Olivia Nelson: Sorry, I made a mistake. I've updated the title .. To summarize: 1. I can load the DLL compiled with cygwin with LoadLibraryA, but not remotely with CreateRemoteThread. 2. The same DLL compiled with msv

Re: DllMain not called in CreateRemoteThread

2020-02-07 Thread Olivia Nelson
Sorry, I made a mistake. I've updated the title .. To summarize: 1. I can load the DLL compiled with cygwin with LoadLibraryA, but not remotely with CreateRemoteThread. 2. The same DLL compiled with msvc works with both LoadLibraryA and CreateRemoteThread Answer to Joost: constructor and de

Re: DllMain not called

2020-02-07 Thread Joost Kraaijeveld
Does static void __attribute__((constructor)) static void __attribute__((destructor)) work? See e.g. https://stackoverflow.com/questions/2053029/how-exactly-does-attribute-constructor-work -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/

Re: DllMain not called

2020-02-07 Thread Joost Kraaijeveld
Does static void __attribute__((constructor)) static void __attribute__((destructor)) work? See also: https://stackoverflow.com/questions/2053029/how-exactly-does-attribute-constructor-work -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/

Re: DllMain not called

2020-02-07 Thread Marco Atzeri
Am 07.02.2020 um 16:07 schrieb Olivia Nelson: I compile it like this: gcc dll.c -shared -fPIC -o dll.dll I tried to run it with LoadLibraryA But DllMain is not called. you are building a Cygwin dll, that requires the Cygwin1.dll but probably do you not intend it and need a standalone one th

Re: DllMain not called

2020-02-07 Thread Olivia Nelson
I compile it like this: gcc dll.c -shared -fPIC -o dll.dll I tried to run it with LoadLibraryA But DllMain is not called. On Fri, Feb 7, 2020 at 10:49 PM Marco Atzeri wrote: > > Am 07.02.2020 um 09:46 schrieb Olivia Nelson: > > I have a simple C program that output something to DbgView on star

Re: DllMain not called

2020-02-07 Thread Marco Atzeri
Am 07.02.2020 um 09:46 schrieb Olivia Nelson: I have a simple C program that output something to DbgView on startup: #include BOOL APIENTRY DllMain( HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { switc

DllMain not called

2020-02-07 Thread Olivia Nelson
I have a simple C program that output something to DbgView on startup: #include BOOL APIENTRY DllMain( HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { switch (ul_reason_for_call) { case DLL_PROCESS_AT