using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
namespace NetMeeting.API
{
public class Win32
{
[DllImport("user32.dll", EntryPoint = "MessageBox", ExactSpelling = false)]
public static extern int MessageBox(int hWnd, string text, string caption, uint type);
}
}
//客户调用:
using System;
using NetMeeting.API;
class test
{
public static void Main(string[] agrs)
{
Win32.MessageBox(0,"hello ,this is a c# invoke win32 api","test",2);
}
}