0
votes

When using [DllImport("my.cool.library")] with .NET you get an error similar to the following:

"Unable to load DLL... The specified module could not be found..."

...even though all the required DLLs are in place and clearly accessible!?

1

1 Answers

0
votes

Turns out DLLImport only assumes the ".dll" extension if you do not have periods in the name. If DLLImport("my.cool.library.dll") was used, it would work, otherwise the DLL will have to be renamed to "my_cool_library.dll", and then DLLImport("my_cool_library") will work. ;)