B
Boris
We have a native Windows DLL (let's call it native.dll) we developed a .NET
interface for (let's say managed.dll). When a .NET application now uses the
..NET interface to talk to the Windows DLL we always thought that managed.dll
must be copied to the application directory (where the .NET application
runs) and that native.dll can be anywhere as long it is in PATH or is
somehow else found by Windows.
The problem is however that the .NET application hangs on some computers
unless native.dll is copied to the application directory. The problem is
reproducable but exists only on some computers. On one computer native.dll
can be copied to the Windows directory and everything works fine. On the
other computer native.dll must be in the applicaton directory as otherwise
the .NET application hangs when it tries to access native.dll.
I used Dependency Walker (from http://www.dependencywalker.com/) to make
sure that in every scenario all DLLs can be found. Thus I wonder why on some
computer native.dll must be copied to the application directory for the .NET
application not to hang. Is there a deployment recommendation like this? Or
is this a bug in the .NET framework or CLR which doesn't locate DLLs
correctly sometimes?
Boris
interface for (let's say managed.dll). When a .NET application now uses the
..NET interface to talk to the Windows DLL we always thought that managed.dll
must be copied to the application directory (where the .NET application
runs) and that native.dll can be anywhere as long it is in PATH or is
somehow else found by Windows.
The problem is however that the .NET application hangs on some computers
unless native.dll is copied to the application directory. The problem is
reproducable but exists only on some computers. On one computer native.dll
can be copied to the Windows directory and everything works fine. On the
other computer native.dll must be in the applicaton directory as otherwise
the .NET application hangs when it tries to access native.dll.
I used Dependency Walker (from http://www.dependencywalker.com/) to make
sure that in every scenario all DLLs can be found. Thus I wonder why on some
computer native.dll must be copied to the application directory for the .NET
application not to hang. Is there a deployment recommendation like this? Or
is this a bug in the .NET framework or CLR which doesn't locate DLLs
correctly sometimes?
Boris