DLL Import Failure

Started by
31 comments, last by myvraccount 9 years, 8 months ago

I may be wrong but I am quite sure that the 64-bit version of .NET has no problem calling 32-bit dlls. This should all be abstracted and marshalled anyway.

You are wrong. It's not that easy and it has nothing to do with .NET, but rather Windows. Perhaps it would have been possible to implement something that would work in the most simple cases, but it's very easy to come up with scenarios that just wouldn't work. :)

Advertisement
Here's another possible issue: DLLs can rely on even MORE DLLs. Perhaps it's not the DLL that you're putting everywhere that's the problem; perhaps it's one that it depends on.

There are tools like DependencyWalker ( http://www.dependencywalker.com/ ) which can analyze the dependencies. Try investigating that to see if there's anything else unexpectedly missing.

Well that's an interesting idea but given the nature of this DLL, I doubt it relies on any other ones. And because it's a professionally made DLL intended to be distributed and used, if it did require any other DLLs, they should have been mentioned in the documentation.

Actually though, since I can use it in C++, I suppose it can't rely on any that I don't have. I'm only unable to use it in C#.

And as I said, when I make my own DLL in C++ and put that into a C# project, I also put the third party DLL there with it.

This topic is closed to new replies.

Advertisement