This may not be the best way to do this, but until someone suggests something
better, something like this would work.

First, have a method to detect the platform:

public static bool IsWindows()
{
        if (Environment.OSVersion.Platform == PlatformID.Win32NT ||
Environment.OSVersion.Platform == PlatformID.Win32Windows)
        {
                return true;
        }
        return false;
}

And then you could have a static variable to store the extension...

DllExtension = IsWindows() ? "dll" : "so";

And then simply do: "unmanagedFileName" + MyClass.DllExtension;


real_bastie wrote:
> 
> Hello,
> 
> I develop a small application for windows and linux. On both os I need to
> call not managed code - dll under windows, so under linux.
> 
> How can I do the right call at application runtime? 
> 
> Thanx
> 

-- 
View this message in context: 
http://www.nabble.com/searching-the-right-way---call-dll-or-so-tp23830117p23852606.html
Sent from the Mono - General mailing list archive at Nabble.com.

_______________________________________________
Mono-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to