user454561
user454561

Reputation:

Import DLL c++ on VSC# 2010 (AdminPaq SDK )

I'm trying to import a library to my WCF project, the DLL was provided by Adminpaq.

i'm using the next following code:

 [DllImport("MGW_SDK.dll", EntryPoint = "fInicializaSDK")]
public static extern int fInicializaSDK();

When i debug the app say the next error : Unable to load DLL The specified module could not be found.

I've ready on web that the error could be by dependece but on the SDK documentation display a list of some files that must be added to the root project i'm currently adding al of them

Some info: Dll is build on: c++ Proyect type: c# Application service MCF I'm using: Windows 7 ultimate x64

Any further information required please don't hesitate to ask.

Upvotes: 0

Views: 1428

Answers (3)

Jose Rodriguez
Jose Rodriguez

Reputation: 1

you must install AdminPaq and have a registered license, after that the error will dissapear

Upvotes: 0

Alejandro Chavarria
Alejandro Chavarria

Reputation: 1

You must type the full and original path of the DLL, for example: @"C:\Program Files (x86)\Compacw\AdminPAQ\MGW_SDK.dll"

Upvotes: 0

Aragorn
Aragorn

Reputation: 46

You are right, usually it is related to some other library that your MGW_SDK.dll depends on. Try these:

1) Install the Microsoft Visual C++ redist (2005, 2008 or 2010, depending on which VS was used to build that dll)

2) If that does not help, try using dependency walker tool to see which files are missing (http://www.dependencywalker.com)

I hope that helps.

Upvotes: 1

Related Questions