找回密码
 注册
搜索
热搜: 回贴
微赢网络技术论坛 门户 站长资讯 业界 查看内容

调用动态链接库API

2009-12-25 00:05| 发布者: admin| 查看: 48| 评论: 0|原作者: 潇潇雨

using System;
using System.Runtime.InteropServices;
namespace TransferAPI
{
///
/// APIClass 的摘要说明。
///
class APIClass
{
[DllImport("user32.dll")]
public static extern int MessageBox(int hWnd, string lpText, string lpCaption, int uType);
///
/// 应用程序的主入口点。
///
[STAThread]
static void Main(string[] args)
{
MessageBox(0, "调用C写的动态链接库与调用系统API函数类似", "调用系统API函数", 0);
}
}
}

最新评论

QQ|小黑屋|最新主题|手机版|微赢网络技术论坛 ( 苏ICP备08020429号 )

GMT+8, 2024-9-30 05:34 , Processed in 0.176531 second(s), 12 queries , Gzip On, MemCache On.

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

返回顶部