winebuild & (name, heap, init)

Alexandre Julliard julliard at
Tue Sep 10 13:15:17 CDT 2002

"Dimitrie O. Paun" <dimi at> writes:

> I was hoping to get rid of them, along with init. Once we do that,
> it's gonna be very easy to extract the .spec files from the .c files,
> and be done with it. I was thinking we can add empty macros
> for __export (16-bit) and __declspec(dllexport). When compiling
> in PE, we can directly use them, if not, we can scan for them
> and generate a .spec file. Moreover, we should support natively
> .DEF files, for stuff that can not be specified inside the .c files.

Well, the problem is that the __declspec stuff is usually inside
macros, so you have to run the code through the C preprocessor to find
them. It can be done, but it's not that trivial. Also one thing you
need to extract is the relay debugging information (and for 16-bit
code information for the relay routines), and this requires a C parser
(or some of Patrik's magic Perl stuff).

A related idea I had is to store the relay debugging independently
from the .spec file; you could then use it in other cases, notably
with snoop debugging of native dlls. And then you no longer need a
.spec, you can use a .def or directly extract the __declspecs, at
least for Win32. This would also potentially allow more intelligent
relay routines, maybe even per-dll relay code that knows about the dll
internal data structures; and hopefully also relay debugging of COM

> BTW, what does it take to default 'init' to DllMain?

Some linker magic, but mostly it requires dll separation so that all
dlls can be linked the same way. This will simplify many things.

Alexandre Julliard
julliard at

More information about the wine-devel mailing list