Platform Invokation in .NET Framework available on Windows.
[DllImport("user32.dll", CharSet=CharSet.Auto)]
public static extern MessageBoxResult MessageBox(IntPtr hWnd, String text, String caption, int options);
Is PInvoke available on Linux and Mac OS X platforms? for example for Mono project?
If Linux and Mac OS X supported PInvoke, Can you give me some example or references in your answer.
Thanks.
PInvoke.net is primarily a wiki, allowing developers to find, edit and add PInvoke* signatures, user-defined types, and any other information related to calling Win32 and other unmanaged APIs from managed code (written in languages such as C# or VB.NET).
P/Invoke is the technique a programmer can use to access functions in these libraries. Calls to functions within these libraries occur by declaring the signature of the unmanaged function within managed code, which serves as the actual function that can be called like any other managed method.
Interop with Native Libraries
http://www.mono-project.com/Interop_with_Native_Libraries
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With