Tuesday, July 17, 2012

Oh, why that DLL is not found!

I was testing a piece of code to do with KMIP (Key Management Interoperability Protocol). The KMIP client code includes a C# wrapper that loads a C++ client library. However, I was stuck in a weird problem where I was getting the exception saying that this particular C++ KmipClient.dll is not found. But in fact, the file is located where the program expects it to be. So a chat with a fellow worker led me to check the DLL dependency for the DLL. I then went onto using the Dependency Walker tool. Below is the result of loading the KmipClient.dll.


The issue has been discovered! The root cause was the INGICAPI.DLL which is needed by KmipClient.dll was not loaded because it was not placed along with KmipClient.dll. So check your dependencies, folks :)

No comments:

Post a Comment