Пример:
Windows:
[DllImport("User32.dll")]
public static extern void SetWindowText(int h, String s);
Linux:
[System.Runtime.InteropServices.DllImport("/root/Desktop/q3noclient/libnoclient.so")]
static extern int DisconnectClient (string strServerIP, int iServerPort, string strClientIP, int iClientPort);
C #:
[DllImport("Comdlg32.dll", CharSet=CharSet.Auto, SetLastError=true)]
private static extern bool GetSaveFileName(ref OPENFILENAME lpofn);
VB.NET:
<DllImport("Comdlg32.dll", CharSet:=CharSet.Auto, SetLastError:=True)> _
Private Shared Function GetSaveFileName(ByRef lpofn As OPENFILENAME) As Boolean
End Function