Add a dll file to using VC++ and use its functions
-
When i try to add a Dll file into the project ,using Add Reference-->under properties .The Dll file was created VC6. The followwing error was shown Could not add reference: ..\..\\ for one of the reasons , -Targets a higher of the.net framework -Not a.Net assembly, -Not a registered ActiveX control suggest how to use the dll in the project
-
When i try to add a Dll file into the project ,using Add Reference-->under properties .The Dll file was created VC6. The followwing error was shown Could not add reference: ..\..\\ for one of the reasons , -Targets a higher of the.net framework -Not a.Net assembly, -Not a registered ActiveX control suggest how to use the dll in the project
The error message is telling you the reason. The DLL created in VC6 is not a .NET assembly. If you want to use it in your project, you will have to use P/Invoke. EDIT: Since this is the C++/CLI forum, I forgot to mention that you can also call the DLL functions directly from C++. But there is no way to add it as a .NET reference.
The difficult we do right away... ...the impossible takes slightly longer.