I am loading the cdintf300.dll dynamically, in order to call concatenateFiles.
Thats how I implemented it so far:
Code: Select all
typedef BOOL (CALLBACK *lpfnConcatenateFiles)(LPCSTR file1, LPCSTR file2, LPCSTR fileDest);
// C-tor of class
HINSTANCE hModule = LoadLibrary( _T("CDINTF300.DLL") );
if (NULL == hModule)
THROW("Error");
ConcatenateFiles = (lpfnConcatenateFiles)GetProcAddress( hModule, _T("ConcatenateFiles") );
...
//; memberfunction of class
for (i = 0; i < 10; i++){
ret = ConcatenateFiles(strFinalName.c_str(),strFile2.c_str(),strFinalName.c_str());
}
...
// d-tor of class
FreeLibrary(hModule);
On some systems the crash happens during the first call of the for loop on other systems the second or even later. It also doesnt seem to matter wether our company PDF printer is installed or not.
I experimented a little bit and it seemed like loading and freeing the library before every single call of ConcatenateFiles, helps a little bit, but doesnt cure the crash.
Am I missing something or doing something wrong?
Is it neccessary to call pdf-Initialization /-Deinitialization functions (e.g. DriverInit, DriverEnd) to make sure that concatenateFiles is successful?
Is it neccessary to have the PDF-printer installed?
We are using AMYUNI PDF Converter developer professional v3.00.
I couldnt find any further information in the documentation,
so any ideas or help and some answers are greatly appreciated.
Thanks in advance, DCo