C#调用 Windows API 过程

 1using System;
 2using System.Runtime.InteropServices;
 3
 4class Program
 5{
 6    [DllImport("user32.dll")]
 7    public static extern void MessageBoxA(IntPtr hWnd, string lpText, string lpCaption, long uType);
 8
 9    static void Main(string[] args)
10    {
11        MessageBoxA(IntPtr.Zero, "Hello World"""0x00000000L);
12    }

13}

14
posted @ 2005-12-28 18:06  Miles Chen  阅读(197)  评论(0)    收藏  举报