سؤال

I need to integrate a 3rd party DLL file with my application, I have only the .DLL and the .pdf documentation of the DLL.

This is the pdf of the dll: http://www.whiteboxrobotics.com/Support/pdf/PC-BOT_dotNet_v1.0_documentation.pdf

I can load the DLL in Visual Studio just by dragging it into the toolbox, BUT, I would like to know how that is done in coding.

Since I only have the DLL, I guess the only option is dynamic loading, using the LoadLibrary() and GetProcAddress().

But it seems to be such a hassle, and I can't figure out how I would load any of the functions which receive some custom (enum) parameters, e.g. in the .pdf the function SendMessage(...) which takes PCBOTEventArgs.messageType as one of the parameters.

Yet loading the DLL through the design view is so simple and extracts the whole DLL.

Why is that?

Is there something else besides using function pointers and GetProcAddress()?

هل كانت مفيدة؟

المحلول

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

نصائح أخرى

3rd Party integration is done using connectivity of what you want to connect for ex you want to add a service to your website, For installing that particular DLL to your website ,first of all read the documentation and connectivity required and than copy paste the DLL files to your projects. You can make more clear when you can specify the services which want to opt as 3rd party integration

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top