[Wine] Re: Help! How to mix win32 and native os calls in code?

vitamin wineforum-user at winehq.org
Mon Jul 27 00:50:13 CDT 2009

droidvideo wrote:
> If Wine doesn't have an api to detect Wine vs native Win32, I can check for $WINEPREFIX and use that to detect Wine. Not a big deal. I appreciate if you can point me to a better method.

Again, DO NOT do it! Period and of story. You will create a defective application that will fail in the future Wine versions.

If you do not know how to check availability of some features, let user choose what platform they are running on.

droidvideo wrote:
> What is not clear is how you can call into native .so from win32 code.

You didn't read what I said. You can't, unless it's a winelib application (something compiled with winegcc and that can only be run under Wine). 

The only possibility is to write a separate winelib dll that you can load on Wine. Then your entire program can remain win32.

More information about the wine-users mailing list