On So, 2009-02-15 at 01:02 +0100, Martin Hinner wrote:
- It's already present in Wine:
libwine.dll has exports for wine_dlopen/wine_dlclose/wine_dlsym please read: libs/wine/loader.c
I saw it, but I don't understand how is it exported to the "Win32 world", i.e. how do I import these using GetProcAddress() Win32 API ?
As I already mentioned:
libwine.dll has exports for wine_dlopen/wine_dlclose/wine_dlsym
Just use this infos: hdll = LoadLibraryA("libwine.dll"); wine_dlopen = GetProcAdress(hdll, "wine_dlopen"); wine_dlsym = GetProcAdress(hdll, "wine_dlsym"); wine_dlclose = GetProcAdress(hdll, "wine_dlclose");
Keep attention on the calling convention.
find /usr/src/wine* -name '*.spec' | xargs -n 10 grep dlopen did not reveal anything except winegate.dll :-).
A "*.spec" is used as input for winebuild to build a "*.def". Keep it as simple as possible and use only grep: "grep -r dlopen <wine-source>/libs/" You find the exported functions in "libs/wine/wine.def"