Calling Native DLL in C#

Bageshkumarbagi
Posted by Bageshkumarbagi under C# category on | Points: 40 | Views : 1044
using System.Runtime.InteropServices;

public class CallingNativeDLL
{
[DllImport("user32.dll")]
public static extern int MessageBox(int h, string m,
string c, int type);
public static void Main()
{
int retval = MessageBox(0, "Hello in Native", "Caption", 0);
}
}

Comments or Responses

Login to post response