namespace WebApplication1.function1.kuhanshu { class mmm { [DllImport("user32.dll", EntryPoint = "MessageBoxA")] public static extern int MsgBox(int hWnd, string msg, string caption, int type); } public partial class call1 : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { mmm.MsgBox(0, " 调用库函数弹出消息框! ", " 库函数调用 ", 0x30); } } } |
|