corduroy9
asked on
VB.NET project refrence C++ DLL
When I try to reference a C++ DLL from a VB.NET Project I get this error message.
"A reference to '..... dll' could not be added. This is not a valid assembly or COM Component. Only assemblies with extension 'dll' and COM components can be referenced. Please make sure that the file is accessible, and that it is a valid assembly of COM component."
I know the dll works because it is currently working in a VB.60 Project. Any Ideas yet?
"A reference to '..... dll' could not be added. This is not a valid assembly or COM Component. Only assemblies with extension 'dll' and COM components can be referenced. Please make sure that the file is accessible, and that it is a valid assembly of COM component."
I know the dll works because it is currently working in a VB.60 Project. Any Ideas yet?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
At VB6 create a project that access the functions you need in the C++ DLL. The VB6 functions have to be dessigned with byref parameters and always with simple types (Int, String, etc). Then your VB.NET app talks only with the VB6 DLL without any trouble related to unmanaged code and so on ...
I've used this approach on several projects with success.
Hope it helps!