0

I'v Visual studio 2013 Professional with update-4. I have a DLL library, written in Visual C++ and compiled in Visual studio 2012.

I wrote a wrapper (DLLImport attribute) to call native c++ dll function through my C# methods. I have also installed Visual C++ redistributable 2012 for visual studio 2013. I have also placed C++ DLL file in current working directory (debug directory)... I also used dependency walker, but could't get any idea from dependency walker, because dependency walker has same error and message from those .exe and .dll modules which are properly working and this native c++ dll. So I can't get help from dependency walker. but even all doing above, I'm unable to load C++ dll file through my code ... I receive this error "unable to load dll, the specified module couldn't be found. (Exception from HRESULT: 0x8007007E) Please help me. Thanks

  • Have you tried this: http://stackoverflow.com/questions/9003072/unable-to-load-dll-module-could-not-be-found-hresult-0x8007007e? – Stefan Aug 29 '15 at 18:14
  • I have read this question more than 4 times, I applied all its recommendation and suggestion... but really I couldn't come with solution. I don't know what I'm missing ... again and again I'm doing what this question has told me, but every time I'm getting same result.. module is not found – Shafiq Hussain Aug 29 '15 at 18:19
  • Same native C++ module, works very finely with Visual Studio 2013 Ultimate edition on my friend's PC, but what is problem with visual studio 2013 professional edition? – Shafiq Hussain Aug 29 '15 at 18:21
  • I can give you the dll, I will also give you a code snippet to wrap a single method from C++ dll module to C# method.. please you can try it, see if I'm wrong... thanks – Shafiq Hussain Aug 29 '15 at 18:25
  • .. public class MyWrapper { [DllImport("sa_api.dll", CallingConvention = CallingConvention.Cdecl)] public static extern saStatus saOpenDevice(ref int device); } .. – Shafiq Hussain Aug 29 '15 at 18:27
  • Its not really my expertise but have you tried the `the dependency walker` as well? – Stefan Aug 29 '15 at 18:32
  • Yes, as I told earlier in my question, I used dependency resolver. I tested dependency walker with different modules. serviceable modules and dependent module, I receive almost same errors in all modules rather the modules are serviceable or not (module means .dll and .exe files) – Shafiq Hussain Aug 29 '15 at 18:47

0 Answers0