Click to See Complete Forum and Search --> : Add VC++ DLL to ASP .NET web application?


fongjeffrey
May 7th, 2004, 10:12 PM
Hi there,
I have several DLLS which were written in VC++, and I have started a new ASP .net project which needs to reference to those DLLs. However, when I tried to add those DLLs reference to my project, I am getting the following error "This DLL is not a valid assembly or COM components. Only assemblies w/ extension "dll" or COM components can be added to project.
Does anyone know how I can resolve this problem.
Thank you very much for ur help and I am appreciated!

Jeffrey

itomatik
March 22nd, 2007, 08:04 PM
Hi,

you should use technique called P/Invoke. You can not add the DLL because it's based on unmanaged code and you're C# code is managed.
Google "PInvoke".

good luck.