Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is .NET PInvoke available on Linux and Mac OS X platforms?

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.

like image 800
Amir Saniyan Avatar asked Jul 23 '11 03:07

Amir Saniyan


People also ask

What is PInvoke net?

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).

How does P invoke work?

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.


1 Answers

Interop with Native Libraries
http://www.mono-project.com/Interop_with_Native_Libraries

like image 82
Robert Harvey Avatar answered Oct 08 '22 22:10

Robert Harvey