When you reference an unmanaged library (for example, "A.dll"), which in turn refers to another library ("B.dll") and B.dll, you will receive a runtime error message without loading "B .dll ".
But when you P / Invoke to "A.dll" from managed code, you will get a general exception to this form:
Unhandled Exception: System.DllNotFoundException: Unable to load DLL 'A.dll': The specified module was not found.
How can I get an error message that indicates a specific unmanaged dll file that failed to load when p / invoking from managed code?
Bek
source
share