[EMAIL PROTECTED] wrote:

> Dll's getting loaded in MAIN_WinelibInit with LoadLibrary receiving the call.
> 
> To fix this I put after the
> ... LoadLibrary("USER32.DLL")) 
>   ExitProcess(1);
> ----- start ---
> /* call DLLProcessAttach for all other loaded dll's  */
> EnterCriticalSection()
> PE_InitTls()
> Module_DllProcessAttach(PROCESS_Current()->exe_modref, ...);
> LeaveCriticalSection()
> ---- end ---
> THUNK_InitCallout();
> 
> Is this the correct fix - it works nicely? 

Ah!  Yes, of course, most of the stuff done in PROCESS_Start should
in fact be done for the initial process as well -- it would probably
be best if the initial process did in fact run through PROCESS_Start
itself ...

But as long as the startup is as it is now, it definitly can't hurt
to perform that initialization in MAIN_WineLibInit.

So, you'll want to have the DllProcessAttach calls, and depending on
what the exe does, you might want the debug event calls, the USER
signal proc calls, and the AllocConsole call as well.

Bye,
Ulrich


-- 
  Ulrich Weigand,
  IMMD 1, Universitaet Erlangen-Nuernberg,
  Martensstr. 3, D-91058 Erlangen, Phone: +49 9131 85-27688

Reply via email to