Hi,
I'm trying to work out if and how I can port a windows dll to Linux and build a shared library that I can use in an ordinary Linux program.
To be more specific: Supose I have sources for a Windows dll (mydll.c and mydll.def):
mydll.c #include <windows.h>
int ShowBox(void) { MessageBox(NULL, "DLL", "DLL", MB_OK);
return 0; }
mydll.def LIBRARY "mydll"
DESCRIPTION 'Show a MessageBox'
EXPORTS ShowBox @1
Is it possible with wine(lib) to buuild a library (preferably shared) that I can link with an ordinary Linux program, so that it becomes possible to call the function ShowBox from the Linux program. Possibly requiring to link additional wine(lib) libraries.
Regards,
Louis
On Wed, 27 Aug 2003, Louis wrote:
Is it possible with wine(lib) to buuild a library (preferably shared) that I can link with an ordinary Linux program, so that it becomes possible to call the function ShowBox from the Linux program. Possibly requiring to link additional wine(lib) libraries.
It depends, but in general, the short answer is no -- you need to turn your app into a Winelib app.
could that mydll.so below dynamically pull the calling process to be a winelib app with out the original app being involved? Lets say that mydll imposes an Init(..) API. Than at that point wine is pulled in. couldn't that be done? how does CodeWeavers do it in the mozilla plug-ins than? mozilla being a linux app. Do they (mozilla) have an Out of process concept of plug ins? (X embedded in the original app). Couldn't one at that Init() call do the necessary registration with the WineServer and all. Kind of like a later binding. Could some of the Wine Loader code be hacked into a library?
Mybe the only solution than is a proxy-IPC-process pair. Process been the winlib app.
I think the above subject is very important. For example: I can easily use MS native DLLs to ODBC with MSSQL in a winelib app. (yes it works!) I thought then why not write a unixODBC wine driver that lets Unix apps enjoy what is available in wine. Hence the above problem. (unixODBC driver been the shared library)
Dimitrie O. Paun wrote:
On Wed, 27 Aug 2003, Louis wrote:
Is it possible with wine(lib) to buuild a library (preferably shared) that I can link with an ordinary Linux program, so that it becomes possible to call the function ShowBox from the Linux program. Possibly requiring to link additional wine(lib) libraries.
It depends, but in general, the short answer is no -- you need to turn your app into a Winelib app.
On Wed, 27 Aug 2003, Boaz Harrosh wrote:
Mybe the only solution than is a proxy-IPC-process pair. Process been the winlib app.
This seems to be the case, yes. But than again, I haven't thought it through...
I think the above subject is very important. For example: I can easily use MS native DLLs to ODBC with MSSQL in a winelib app. (yes it works!) I thought then why not write a unixODBC wine driver that lets Unix apps enjoy what is available in wine. Hence the above problem. (unixODBC driver been the shared library)
Yes, I think this is a nice application. Or have a ghostscript wine driver that would open ghostscript to all Windows printer drivers.
However, this is not a simple problem. But maybe in such cases as these, where we have to interface through a well defined (and small) interface, the IPC idea may be feasible.
Are you game? :)