I have a DLL (Test.dll) which contains some Excel Addin, i don’t know which version this is build with (might be with VB6, but i am not sure).
When i tried referencing this DLL in the VS2008 i get the message
A reference to the <DLL Name> could not be added. Please make sure that the file is accrssible, and that it is a valid assembly or COM Component.
If anyone could please help me in this, it will be great.
Any help is appreciated.
Thanks and Regards,
Tushar
It seems to me the DLL you’re trying to load isn’t a managed DLL, or one that the CLR can treat as managed.
One solution would be to use managed C++ (C++/CLI) to build a wrapper around the DLL. Another is to use PInvoke which is explained here and there’s a tool for it I came across here.
You can also look in this thread: Unable to Use DLL of VB6 Into ASP.NET.
Hope one these work out for you,
Asaf