custom fake dll

Vitaliy Margolen wine-devel at kievinfo.com
Wed Mar 10 08:37:21 CST 2010


Before answering your questions, let me get some definitions for you:
- Builtin dll is a Wine's .dll.so file which is a standard ELF shared
library that can be loaded by libc. It contains code as well as some extra
Wine specific information like resources
- Native dll is a Windows PE library that contains code and resources. It
can not be loaded by libc directly only by Wine itself.
- Wine's "fake dll" is a Windows PE library that contains no code but only
resources. It can not by loaded by libc directly
- Winelib dll - same as builtin

On 03/10/2010 01:01 AM, Ilya Basin wrote:
> Hi. Is it possible to make a custom dll that wraps some native linux
> API?
Yes, but then it won't be a fake dll. You probably talking about winelib here

> Will a newer version of Wine be able to load a fake dll built for
> older release?
Fake dll is a standard windows PE library and can be loaded by any Wine
version. Winelib dll might work with older Wine versions but it's not
guaranteed.

> Is it necessary to create a new directory under dlls/ and update
> configure scripts? Or I can use Wine's Makefile to build in a separate
> directory, just like when you make custom kernel modules on linux?
If you want to add custom dll to Wine then it needs to be a part of the
source tree. If you building winelib all you need is a winebuild & co.

> Why every dll/exe that comes with wine is fake and real code is
> located in the corresponding *.so file?
Because to create a real dll/exe Wine needs a compiler that can do it.
Regular gcc can't create Win PE executables / libraries.

Wine didn't have fake dlls for a long time until bugzilla accumulated big
enough list of brain damaged windows applications that insist on verifying
that a particular exe/dll is in _the_ specific place. Or they won't start.
The list of applications that want a real Win PE dll instead of Wine's fake
dll is relatively small. If it grows too large then Wine might need to
create real Win PE dlls instead of fake ones.

Vitaliy.



More information about the wine-devel mailing list