日期:2014-05-20  浏览次数:20741 次

请问怎么知道C++的.dll里的函数,并调用它?
请问怎么知道C++的.dll里的函数,并调用它?

------解决方案--------------------
using System;
using System.Runtime.InteropServices;
class MainClass
{
[DllImport( "User32.dll ")]
public static extern int MessageBox(int h, string m, string c, int type);

static int Main()
{
string myString;
Console.Write( "Enter your message: ");
myString = Console.ReadLine();
return MessageBox(0, myString, "My Message Box ", 0);
}
}
//--User32.dll换成你c++的dll 类型做相应的变换即可
------解决方案--------------------
想要知道C++的.dll里的函数的话,可在.h文件里查找
------解决方案--------------------
看msdn
------解决方案--------------------
使用vc自带的dependence工具查看,可以看到
------解决方案--------------------
google "WIN32API.txt "