2

我需要将第 3 方 DLL 文件与我的应用程序集成,我只有 .DLL 和 DLL 的 .pdf 文档。

这是 dll 的 pdf:http: //www.whiteboxrobotics.com/Support/pdf/PC-BOT_dotNet_v1.0_documentation.pdf

我可以通过将 DLL 拖到工具箱中来在 Visual Studio 中加载 DLL,但是,我想知道在编码中是如何完成的。

由于我只有 DLL,我猜唯一的选择是动态加载,使用 LoadLibrary() 和 GetProcAddress()。

但这似乎很麻烦,而且我不知道如何加载任何接收一些自定义(枚举)参数的函数,例如在.pdf 中使用PCBOTEventArgs 的函数SendMessage(...)。 messageType 作为参数之一。

然而,通过设计视图加载 DLL 非常简单,并且可以提取整个 DLL。

这是为什么?

除了使用函数指针和 GetProcAddress() 还有什么别的吗?

4

2 回答 2

2

A dotNET = (Mircosoft) .NET Framework is not the same as a "normal" dll, you can't use GetProcAddress and LoadLibrary with .NET dlls

.Net Dlls are normally packed classes, by dragging the dll into your workspace you just import the dlls scope, see for your self in the object browser

to load a .net dll (Assembly) during runtime, for example for a plugin, look here http://support.microsoft.com/kb/837908

于 2011-12-15T10:18:05.383 回答
0

3rd 方集成是使用您想要连接的连接来完成的到您的项目。当您可以指定要选择作为第 3 方集成的服务时,您可以更清楚地说明

于 2011-12-15T10:43:32.270 回答