I'm having some difficulties trying to use unmanaged code dllfrom my application (written in C # framework 4.0). Im using import dllas follows
[DllImport(@"C:\MGW_SDK.dll", EntryPoint = "fInicializaSDK")]
public static extern int fInicializaSDK();
It is strange that when it is called from my development environment (Windows XP), it works fine, but the following exception is thrown on the production server (Windows7):
System.DllNotFoundException: unable to load DLL ' C:\MGW_SDK.dll': the specified module was not found. (Exception from HRESULT: 0x8007007E) in Comtpaq.AdminPack.SDKWrapper.fInicializaSDK()in Comtpaq.AdminPack.AdminPaqRepository.InitializeSDK()in C:\Work\AgroIn\AdminPaqRepository.cs: line 30
I already ran Dependency Walker , which shows the following dependency as conflicting:C:\windows\system32\SHLWAPI.DLL
I already tried to copy this dllto my deployment directory
MGW_SDK.dll c:\ ( )
C Runtime Library
: C:\Work\AgroIn\AdminPaqRepository.cs:line 30
?
extern/dllimport, MGW_SDK.dll, ( DllNotFoundException), , -, , ( WCF). WAS, .