![]() |
| ||
| Problem in loading VC++ Win32 dll in C# Hi sir, I am making a win32 dll in VC++.NET 2005. I make an add funtion in it and then i call it from C# using System.Runtime.InteropServices; [DllImport("MXFWrapperMarvel.dll", EntryPoint = "add")] static extern int add(int a, int b); ----------------------MXFWrapperMarvel.dll------------without header files---------------My code is compiled successfully, no errors and warnings. But when calling the add() function then, a runtime exception is raising while calling add() fuction... "Unable to load DLL 'MXFWrapperMarvel.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)" The dll is also placed on the right path but still raising exception. If I remove the above header files from dll code then my code also compiled successfully as well as add() function is also functioning correctly. But after just including those header files in dll code, it is compiled successfully but raised the above exception at runtime while calling add() function and my code jumps to the catch block . Please guide me how can I resolve this problem. -- Regards, Asif |
| ||
| Re: Problem in loading VC++ Win32 dll in C#
|
| All times are GMT -4. The time now is 1:22 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC