Behaviour of GetModuleFileName

Alexandre Julliard julliard at
Tue May 21 15:18:56 CDT 2002

Warren_Baird at writes:

> Isn't there a requirement that the wine libraries be in a directory that is
> mappable to a windows path?  I thought I ran into problems when I had forgotten
> to add an entry to my wine config to include my wine libraries...  If so, then
> there will always be a windows path for each dll...

No, by default builtins are in /usr/local/lib/wine and there is no
need to have a Windows drive for that, so you can't return a valid
Windows path. Right now you need to have a drive for Winelib
applications (which is probably the problem you had), but I'm working
on fixing that too.

> Well, the problem is that it's one of our libraries (compiled with winelib) that
> is causing the problem - and I have no idea where our libraries have been
> installed... I know I could force the users to set up an environment variable or
> something to point to the library directory, but this approach is much simpler,
> or would be if GetModuleFileName worked as it does on windows...

If the library is not installed in the default path you'll need to set
WINEDLLPATH for Wine to find it, so you could potentially use that
from your app too. Not as simple as GetModuleFileName I admit.

Alexandre Julliard
julliard at

More information about the wine-devel mailing list