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);
  }
}


Logo

CSDN联合极客时间,共同打造面向开发者的精品内容学习社区,助力成长!

更多推荐