c# 调用 WINDOW API DLL

using System.Runtime.InteropServices;



 [DllImport("user32.dll", CallingConvention = CallingConvention.StdCall)]
        public static extern int MessageBox(int hWnd, String strMessage, String strCaption, uint uiType); 


//调用

  MessageBox(0, "您好,这是 PInvoke!", ".net", 0); 

  

posted @ 2016-01-12 09:58  刀小爱  阅读(308)  评论(0编辑  收藏  举报