I want to build 64 bit version.
Here's my setting, which I did according to examples provided by Debenu:
1. copy the three files shown below into the same directory as this README.txt file and add the .cpp and .h files to your project.
I added
* DebenuPDFLibraryDLL1016.cpp
* DebenuPDFLibraryDLL1016.h
into my project.
2. Add DebenuPDFLibraryDLL1016.dll into the same directory (?). Which one should I add DebenuPDFLibraryDLL1016.dll or DebenuPDFLibrary64DLL1016.dll ?
2.1. While creating the DebenuPDFLibraryDLL1016 class should I call:
DebenuPDFLibraryDLL1016 QP(L"DebenuPDFLibraryDLL1016.dll");
or
DebenuPDFLibraryDLL1016 QP(L"DebenuPDFLibrary64DLL1016.dll");
for 64 bit version? I think the second one.
3. I created the function, which I will call from Java:
JNIEXPORT jboolean JNICALL Java_com_ricoh_mdm_mie_jniconnector_JniManager_ping
(JNIEnv *env, jobject obj)
{
writeToLog("Ping started");
//create the library and release it
// Declare and load Quick PDF Library DLL
DebenuPDFLibraryDLL1016 QP(L"DebenuPDFLibrary64DLL1016.dll");
writeToLog("QP created - go to unlock");
writeToLog("Unlocked: " + QP.Unlocked());
// Library key
int iResult = QP.UnlockKey(L"MY_KEY_");
writeToLog("QP unlocked");
if (iResult == 1)
{
writeToLog("The Debenu has been loaded. Loaded:" + QP.LibraryLoaded());
return JNI_TRUE;
}
else
{
writeToLog("The Debenu has NOT been loaded. The result is " + iResult);
return JNI_FALSE;
}
//the library is closed in destructor
}
The function crushes and crush the JVM as well as soon as it came to first call of the QP.
The output is:
Ping started
QP created - go to unlock
if I comment out:
//writeToLog("Unlocked: " + QP.Unlocked());
The function crushes on the next line:
int iResult = QP.UnlockKey(L"MY_KEY_");
Which probably means that the DebenuPDFLibrary64DLL1016.dll was not loaded.
I did not find instructions how to set the C++ project for using the Debenu DLL's.
Can you please point me to the document which describes using the Debenu DLL from other DLL.
Setting the C++ project, using the Debenu DLL. What compiler options I have to use to compile and run the Debenu DLL from my C++ project.
I use eclipse with CDT plugin and minGW-w64 for compiling/Tool Chain Editor.