-
DLL Import
Hi.
I have a little problem that i just keep hitting brick walls. :confused:
I have a Class that has been compiled into a Dll. I did this by using the new project option and selecting the Win32 application and selecting the dll option. The development Environment is Visual Studio .net.
Please could someone explain to me (In simple english!) how to include this class into a C# project.
I've searched on practically everything and I cant seem to grasp the idea.
Thanks in advance
Hyder Ali
-
Search for <DLLImport> in the help section of your MSVC. I did so and found several articles that should at least get you started. I have MSVC version 6 not .NET, but I'm sure that makes little difference.
-
-
Thanks
Thanks for helping,
But i still can't get my head around it, i know how to include functions from a C++ dll but i was wanting to include a Class.
I'll leave it and just convert the class into separate functions.
Thanks for the help :)
Hyder Ali
-
I'm not sure if you can include a C++ class in .NET. You can however create a Managed C++ dll that contains a .NET class that is a wrapper for your native class.
You can check out this link for an easy example.
-
hi
Go to the Solution Explorer then right click on references then choose add references.Then select projects tab then click on browse button, bring up the dll file ( you will find it in bin)
then click ok
and in your code use this
using mydll
where mydll is your dll file