codematrix
codematrix

Reputation: 1621

The specified procedure could not be found. (Exception from HRESULT: 0x8007007F)

My C++ DLL (called from C# application) works fine with Debug version (main C# app in Debug ) but release version(main C# app in Release) gives The specified procedure could not be found. (Exception from HRESULT: 0x8007007F)] System.DllNotFoundException: Unable to load DLL 'D:\TestBluRay.dll': The specified procedure could not be found. (Exception from HRESULT: 0x8007007F) error. I've verified all project settings and those appear to be same for both debug and release. Any idea why this fails for release version only?

Upvotes: 7

Views: 7118

Answers (1)

gravity
gravity

Reputation: 2066

Validate that the .DLL is present, and fully up-to-date between both \bin\debug (which works), and \bin\release (which is failing).

Most likely, the .DLL needs either recompiling, or simply copying in if it's a 3rd-party library.

EDIT: Your error indicates that the file may be missing entirely (DllNotFoundException), or that you're referencing a path/directory, instead of a fully qualified path name. "\Drivers\Blu_ray.." isn't a fully-qualified path name, where "C:\Windows\System32\Drivers\Blu_ray.." etc., would be a fully qualified path name.

My guess is that \bin\release\ doesn't have \drivers\blu_ray, whereas \bin\debug\ probably does have \drivers\blu_ray...

Upvotes: 1

Related Questions