Alexandre, et. al,
Our WinMain doesn't get called because our patch prevents it. If it were
to get called, we'd be on a different (Wine-created) stack, with all kinds
of things that are hard to undo, like the exception handling, etc.
The goal of my patch was to have minimal impact on Wine, and allow the
*same* wine code/binaries to be used for regular use as well as shared
library, so any future Wine version you create will automatically also
support shared library use.
I modeled the global __wine_shared_lib variable after the __wine_main_argX
globals you introduced last year, assuming that following that style would
create the least resistance of getting my patch accepted.
Having Wine set up the TEB and stack environment and actually call our
WinMain and us then trying to 'undo' that in WinMain creates potential for
future breakage of our library, in case you change something related to
the TEB & stack. Having a variable in kernel that prevents creation of
these, on the other hand, is easy to maintain, and really has no impact on
performance or coding.
I will be happy to implement any suggestions you may have on how to solve
it another way in a single codebase that doesn't intruce the potential of
breaking it in the future. I may very well have overlooked something.
Regards,
Peter
-----Original Message-----
From: "Alexandre Julliard" <julliard(a)winehq.org>
To: "Miguel de Icaza" <miguel(a)ximian.com>
Cc: "Peter Dennis Bartok" <peter(a)novonyx.com>; "Robert Shearman"
<R.J.Shearman(a)warwick.ac.uk>; <wine-devel(a)winehq.org>
Date: 07 March, 2004 17:37
Subject: Re: Wine as shared library patch
>Miguel de Icaza <miguel(a)ximian.com> writes:
>
>> Well, the issue is that our WinMain is never called, and we would
>> rather not depend on this in our patch, but instead get the small
>> global that says `Hey Wine, just return'.
>
>The global variable thing is ugly; we could export a different entry
>point instead, but I'm not sure it's really necessary. Why doesn't
>your WinMain get called?
>
>--
>Alexandre Julliard
>julliard(a)winehq.org
>
>
>