On Tue, Feb 17, 2009 at 6:42 AM, Martin Hinner martin@hinner.info wrote:
hdll = LoadLibraryA("libwine.dll"); wine_dlopen = GetProcAdress(hdll, "wine_dlopen"); wine_dlsym = GetProcAdress(hdll, "wine_dlsym"); wine_dlclose = GetProcAdress(hdll, "wine_dlclose");
The above doesn't work ... LoadLibraryA fails (returns NULL).
Aha, you're right. libwine is shipped as an .so, not as a .dll.so.
But have a look at wine_dlopen and wine_dlsym, http://source.winehq.org/source/libs/wine/loader.c#L677 http://source.winehq.org/source/libs/wine/loader.c#L742 They really are very simple wrappers around Unix system calls. There's no reason you can't write your own wrappers in assembly inside your winegate, they would probably only be ten lines or so each. That would let you compile it as a real .dll instead of a winelib dll. It's possible this would be less of a maintenance hassle than shipping winegate as a winelib dll. - Dan