There is no way for the run-time to know what DLL's are dynamically loaded
by the imported DLL, these are not loaded by the assembly loader, they are
loaded by the OS loader. It's up to the DLL author to report load failures,
but most just test the return value of "LoadLibrary" and just bail out when
the DLL is not found without leaving any trace why it failed, all the
run-time knows is that a load failed with an error code 2 (that is file not
found), but that's all.
Willy.
"Bart" <Ba**@discussions.microsoft.com> wrote in message
news:71**********************************@microsof t.com...
| Hi Stoitcho,
|
| I did test the a.dll - b.dll case. Personally, I think that the (default)
| behaviour is a bit confusing. The run time complains about not finding a
call
| in a.dll, while the actual problem is the absence of b.dll.
| This is particulary annoying while interfacing with matlab : matlab
| instructs to use "dependency walker" to find all dependent dlls. In such a
| case, it would be nice if the run time informs you about missing dlls.
|
| Regards,
| Bart
| --
|
www.xenopz.com
|
|
| "Stoitcho Goutsev (100)" wrote:
|
| > Bart,
| >
| > The easiest way to find out is to test the case. Did you test it? What
was
| > the result?
| >
| > I can see both possible. I'd peffer to get an arror anout a.dll, but
never
| > tried.
| >
| >
| > --
| >
| > Stoitcho Goutsev (100)
| >
| > "Bart" <Ba**@discussions.microsoft.com> wrote in message
| > news:A1**********************************@microsof t.com...
| > > Hi,
| > >
| > > Imagine the following situation : a.dll depends on b.dll and a.dll is
| > > imported in C# with DllImport["a.dll"].
| > > Is it correct that if b.dll cannot be found, you get an error about
a.dll
| > > and *not* about b.dll ?
| > >
| > > Thanks,
| > > Bart
| > >
| > > --
| > >
www.xenopz.com
| >
| >
| >