tags:

views:

116

answers:

3

I have an SDK that is written primarily in C#. We have some native code that was written for security and performance reasons. We use DllImport to interop with the native code. There are a few functions that I get an "Unable to find an entry point named '...' in DLL '...'.":"" error. I have verified that the function that is not found is exported. I have verified that it does not have a mangled name. I have verified that the parameters line up. I have tried a couple different calling conventions in the DllImport attribute. I guess I can keep trying this sort of randomly, but I am hoping there is a more direct approach.

Does anyone know of a tool or method to get more information in a case like this? How confident should I be that the dll has been located? Would I get this exception if the parameters are wrong? Any help would be appreciated.

Pat O

A: 

I use Dependency Walker to find the exported functions in a C++ DLL. This will help ensure you're trying to import the right name, etc.

C. Ross
Thanks, I have verified that the dll exports are as I expected.
Pat O
A: 

I use dumpbin to get my list of exports...

Good luck!

Christopher Karper
+1  A: 

Not if this works in the Full Framework or not, but you can try:

http://blogs.msdn.com/stevenpr/archive/2005/06/22/431612.aspx

Bryan