user919789
user919789

Reputation: 171

Error: Unable to load DLL '.dll' : The specified module could not be found. (Exception from HRESULT: 0x8007007E) - What is this error?

The Situation:

I'm trying to run CharLS JPEG-LS Compression algorithm implementation

There is source code in the site about where you can download a C# VS 2010 Solution. In the Solution there are, 2 C# Class Library Projects, 1 Unmanaged VC++ project and 1 C# Console App. The console App calls one of the class libraries, `using CharLS;', and that particular library references the unmanaged VC++ project. The console application works perfectly on debug mode.

The Problem:

But when I compiled the console app for "Release", and ran the .exe (executable file), when a particular function is called during the process, it gives me this error:

Error: Unable to load DLL 'CharLS.dll' : The specified module could not be found. (Exception from HRESULT: 0x8007007E)

I've also tried to create another project and reference the class library from there, but I get the same error.

I've tried reading other solutions for this over the net but they have not helped me.

Upvotes: 2

Views: 15599

Answers (4)

Joe Shakely
Joe Shakely

Reputation: 913

If you have the dll just add it manually to the build output folder (bin).

Upvotes: 0

Panduranga Rao Sadhu
Panduranga Rao Sadhu

Reputation: 497

Some of the reasons for this error could be:

  1. the name you are providing to the "EntryPoint" property of "DllImport" attribute is not matching with the function you are exporting from the native component.

  2. Another reason could be missing dll itself/or any of its dependencies(use dependency walker and check)

  3. Third reason could be it could be debug/release version mismatch.

Upvotes: 2

Dave Hogan
Dave Hogan

Reputation: 3221

Ensure it's definitely registered on the server. Also have you got the Application Pool (assuming IIS7+) set to allow 32-bit processes?

Upvotes: 0

abatishchev
abatishchev

Reputation: 100268

Have you (re-)built the project before run in Release mode? Looks like you didn't and release output contains no such lib. Check it anyway.

Upvotes: 0

Related Questions