Groups | Blog | Home
all groups > dotnet interop > october 2006 >

dotnet interop : Using DLL Import - Unamanaged C++ within C# Sharp ASP.NET


NCW Support
10/9/2006 12:00:00 AM
Hi,

I have a dll which has been written in unmanaged C++. I successfully called
the method I need from the dll in a ASP.NET application (C#) when I run it
on my development machine (Win XP, VS .NET 2K5).

When I transfered the web site to our production server (Win 2K3
Enterprise), a dll not found error is thrown up. We tried recompiling the
dll using different flags and settings, to no avail. We finally decided to
install VS .NET 2K5 on our production server and the dll was being used
successfully and the application ran fine.

Would anyone know what settings has been set by Visual Studio for the
unmanaged dll to work?

Thanks,
Raihaan
NCW Support

William DePalo [MVP VC++]
10/9/2006 11:57:35 AM
[quoted text, click to view]

My _guess_ is that the DLL that you built with VS2005 depends on some other
DLL which is not present in your production setup. It could be a different
version of the runtime or a debug / release issue.

You should be able to find the dependency walker - depends.exe - in the

tools\bin

subdirectory of your VS installation. Running it on your DLL should tell you
what it requires.

Regards,
Will



AddThis Social Bookmark Button