Im not sure if this applies to you, but I did once have a DLL built with Visual Studio which was closed source and that I needed to access with a Mingw compiled program. what I did was use the
"LoadLibrary" and "LoadMethod" which you can look up in more detail in MSDN, but heres kindof how it works:
long someFunction () {
//get library names
const char* libraryName = "library.dll";
const char* methodName= "MethodInLibaray";
//boolean result
long result = 0;
//load library
HINSTANCE library = LoadLibrary(libraryName);
FARPROC methodPointer = loadMethod(env,library,libraryName,methodName);
if(methodPointer != NULL) {
result = ((LONGPROC_CCHAR)methodPointer)(text);
}
return result;
}
long someFunction () {
//get library names
const char* libraryName = "library.dll";
const char* methodName= "MethodInLibaray";
//boolean result
long result = 0;
//load library
HINSTANCE library = LoadLibrary(libraryName);
FARPROC methodPointer = loadMethod(env,library,libraryName,methodName);
if(methodPointer != NULL) {
result = ((LONGPROC_CCHAR)methodPointer)(text);
}
return result;
}
To copy to clipboard, switch view to plain text mode
Bookmarks