Testing Debenu Quick PDF Library
-
- Posts: 23
- Joined: Sat Oct 22, 2005 8:22 pm
Testing Debenu Quick PDF Library
Hi,
I'm testing the Debenu Quick PDF Library with Fivewin + xHarbour but I'm having problems starting up.
I use:
cLicense := "jx4aq86h5ou5mk9i86644936y"
xId := DllCall( hDLL,nil,"DPLCreateLibrary" )
xVal := DllCall( hDLL,nil,"DPLUnlockKey",xId,StrPtr(cLicense) )
DllCall( hDLL,nil,"DPLReleaseLibrary",xId )
XId return a value (f.i. 83652944) but xVal allways return 0, what means that the library is not correct unlocked.
The problem according to the helpdesk of Debenu is that the string cLicense is not correcty parsed to the function.
I also tried:
xVal := DllCall( hDLL,nil,"DPLUnlockKey",xId,cLicense )
Can anyone help me?
Does anyone use the Debenu Quick PDF Library?
best regards,
Klaas den Dekker
I'm testing the Debenu Quick PDF Library with Fivewin + xHarbour but I'm having problems starting up.
I use:
cLicense := "jx4aq86h5ou5mk9i86644936y"
xId := DllCall( hDLL,nil,"DPLCreateLibrary" )
xVal := DllCall( hDLL,nil,"DPLUnlockKey",xId,StrPtr(cLicense) )
DllCall( hDLL,nil,"DPLReleaseLibrary",xId )
XId return a value (f.i. 83652944) but xVal allways return 0, what means that the library is not correct unlocked.
The problem according to the helpdesk of Debenu is that the string cLicense is not correcty parsed to the function.
I also tried:
xVal := DllCall( hDLL,nil,"DPLUnlockKey",xId,cLicense )
Can anyone help me?
Does anyone use the Debenu Quick PDF Library?
best regards,
Klaas den Dekker
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Testing Debenu Quick PDF Library
Klaas,
What FWH version are you using ?
Are you using Harbour or xHarbour ? Borland ?
thanks
What FWH version are you using ?
Are you using Harbour or xHarbour ? Borland ?
thanks
-
- Posts: 23
- Joined: Sat Oct 22, 2005 8:22 pm
Re: Testing Debenu Quick PDF Library
xHarbour 1.2.1 rev. 9421
Borland 5.82
Borland 5.82
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Testing Debenu Quick PDF Library
Klaas,
What FWH version are you using ?
What FWH version are you using ?
-
- Posts: 23
- Joined: Sat Oct 22, 2005 8:22 pm
Re: Testing Debenu Quick PDF Library
FWHX 12.07
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Testing Debenu Quick PDF Library
Klaas,
How are you initially setting the value of hDLL ?
How are you initially setting the value of hDLL ?
-
- Posts: 23
- Joined: Sat Oct 22, 2005 8:22 pm
Re: Testing Debenu Quick PDF Library
Yes, I am:
STATIC hDLL
IF DebLoadDLL()
cLicense := "jx4aq86h5ou5mk9i86644936y"
xId := DllCall( hDLL,nil,"DPLCreateLibrary" )
xRet := DllCall( hDLL,nil,"DPLUnlockKey",StrPtr(cLicense) )
DllCall( hDLL,nil,"DPLReleaseLibrary",xId )
ENDIF
....
** Load Debenu lib
FUNCTION DebLoadDLL()
LOCAL lResult := .T.
hDLL := LOADLIBRARY( GsExeDir()+"\"+DLLfile )
IF ABS( hDLL ) <= 32
lResult := .F.
ENDIF
RETURN lResult
STATIC hDLL
IF DebLoadDLL()
cLicense := "jx4aq86h5ou5mk9i86644936y"
xId := DllCall( hDLL,nil,"DPLCreateLibrary" )
xRet := DllCall( hDLL,nil,"DPLUnlockKey",StrPtr(cLicense) )
DllCall( hDLL,nil,"DPLReleaseLibrary",xId )
ENDIF
....
** Load Debenu lib
FUNCTION DebLoadDLL()
LOCAL lResult := .T.
hDLL := LOADLIBRARY( GsExeDir()+"\"+DLLfile )
IF ABS( hDLL ) <= 32
lResult := .F.
ENDIF
RETURN lResult
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Testing Debenu Quick PDF Library
Klaas,
Could you please email me the DLL in a ZIP file renamed as ZOP ? thanks
Could you please email me the DLL in a ZIP file renamed as ZOP ? thanks
- carlos vargas
- Posts: 1421
- Joined: Tue Oct 11, 2005 5:01 pm
- Location: Nicaragua
Re: Testing Debenu Quick PDF Library
no he podido registrar la clave de la licencia, aun la DEMO antonio, nUnlock siempre vale 0, probado con xharbour, modo consola.
http://castillolawyers.no-ip.info/owncl ... ec7252fb8d
http://castillolawyers.no-ip.info/owncl ... ec7252fb8d
Code: Select all
#define DC_CALL_CDECL 0x0010
#define DC_CALL_STD 0x0020
/*--------------------------------------------------------------*/
STATIC hDLL
/*--------------------------------------------------------------*/
PROCEDURE Main()
LOCAL nInstanceID
LOCAL nUnlock
PRIVATE cDllFile := "d:\compiler\t\DebenuPDFLibraryDLL1113.Dll"
PRIVATE cLicense1 := "jk7o53he84n6bo9np5cj9yb8y"
PRIVATE cLicense2 := "jx4aq86h5ou5mk9i86644936y"
cls
?
?"File exist:",File( cDllFile )
?"License Key", cLicense1
?
IF DebLoadDLL()
nInstanceID := DllCall( hDLL, DC_CALL_STD, "DPLCreateLibrary" )
?"InstanceID.:", nInstanceID
IF !HB_IsNIL( nInstanceID )
nUnlock := DllCall( hDLL, DC_CALL_STD, "DPLUnlockKey", nInstanceID, cLicense1 )
?"Unlock:", nUnlock
IF nUnlock==1
?"File created:"
DllCall( hDLL, DC_CALL_STD, "DPLDrawText", nInstanceID, 100, 500, "Hello Word!" )
DllCall( hDLL, DC_CALL_STD, "DPLSaveToFile", nInstanceID, "d:\test.pdf" )
ELSE
?"Error unlock:", GetLastError()
ENDIF
DllCall( hDLL, DC_CALL_STD, "DPLReleaseLibrary", nInstanceID )
ELSE
?"Error instance:", GetLastError()
ENDIF
ENDIF
DebUnLoadDLL()
RETURN
/*--------------------------------------------------------------*/
FUNCTION DebLoadDLL()
LOCAL lResult := .T.
hDLL := LoadLibrary( cDllFile )
IF Abs( hDLL ) <= 32
lResult := .F.
ENDIF
?"Dll loaded.:", lResult
?"hDLL.......:", hDll
RETURN lResult
/*--------------------------------------------------------------*/
FUNCTION DebUnLoadDLL()
IF Abs( hDLL ) <= 32
FreeLibrary( hDLL )
ENDIF
RETURN
/*--------------------------------------------------------------*/
/*
int InstanceID;
InstanceID = DPLCreateLibrary();
if (DPLUnlockKey(InstanceID, “your license key”) == 1) {
DPLDrawText(InstanceID, 100, 500, “Hello world”);
DPLSaveToFile(InstanceID, “C:\Docs\HelloFromDLL.pdf”);
}
DPLReleaseLibrary(InstanceID);
*/
/*
IF DebLoadDLL()
cLicense := "jx4aq86h5ou5mk9i86644936y"
xId := DllCall( hDLL,nil,"DPLCreateLibrary" )
xRet := DllCall( hDLL,nil,"DPLUnlockKey",StrPtr(cLicense) )
DllCall( hDLL,nil,"DPLReleaseLibrary",xId )
ENDIF
*/
Salu2
Carlos Vargas
Desde Managua, Nicaragua (CA)
Carlos Vargas
Desde Managua, Nicaragua (CA)
- carlos vargas
- Posts: 1421
- Joined: Tue Oct 11, 2005 5:01 pm
- Location: Nicaragua
Re: Testing Debenu Quick PDF Library
codigo tanto para xharbour como para harbour, ahora no me muestra ningun texto, ademas que la funcion DPLUnlockKey no funciona aun, pero si DPLUnlockKeyA
Code: Select all
#define DC_CALL_CDECL 0x0010
#define DC_CALL_STD 0x0020
/*--------------------------------------------------------------*/
STATIC hDLL
/*--------------------------------------------------------------*/
PROCEDURE Main()
LOCAL nInstanceID
LOCAL nUnlock
PRIVATE cDllFile := "d:\compiler\t\DebenuPDFLibraryDLL1113.Dll"
PRIVATE cLicense1 := "jk7o53he84n6bo9np5cj9yb8y"
PRIVATE cLicense2 := "jx4aq86h5ou5mk9i86644936y"
cls
?
?"File exist:",File( cDllFile )
?"License Key", cLicense1
?
IF DebLoadDLL()
nInstanceID := DllCall( hDLL, DC_CALL_STD, "DPLCreateLibrary" )
?"InstanceID.:", nInstanceID
IF !HB_IsNIL( nInstanceID )
nUnlock := DllCall( hDLL, DC_CALL_STD, "DPLUnlockKeyA", nInstanceID, cLicense1 ) //No funciona DPLUnlockKey
?"Unlock:", nUnlock
IF nUnlock==1
?"File created:"
DllCall( hDLL, DC_CALL_STD, "DPLDrawText", nInstanceID, 10, 10, AnsiToWide("Hello Word!") ) //Esto no funciona
DllCall( hDLL, DC_CALL_STD, "DPLSaveToFile", nInstanceID, AnsiToWide("d:\test.pdf") )
ELSE
?"Error unlock:", GetLastError()
ENDIF
DllCall( hDLL, DC_CALL_STD, "DPLReleaseLibrary", nInstanceID )
ELSE
?"Error instance:", GetLastError()
ENDIF
ENDIF
DebUnLoadDLL()
RETURN
/*--------------------------------------------------------------*/
FUNCTION DebLoadDLL()
LOCAL lResult := .T.
hDLL := LoadLibrary( cDllFile )
#ifdef __XHARBOUR__
IF Abs( hDLL ) <= 32
#else
IF empty(hDll)
#endif
lResult := .F.
ENDIF
?"Dll loaded.:", lResult
?"hDLL.......:", hDll
RETURN lResult
/*--------------------------------------------------------------*/
FUNCTION DebUnLoadDLL()
#ifdef __XHARBOUR__
IF Abs( hDLL ) <= 32
#else
IF !empty(hDll)
#endif
FreeLibrary( hDLL )
ENDIF
RETURN
/*--------------------------------------------------------------*/
#ifdef __HARBOUR__
#ifndef __XHARBOUR__
function FreeLibrary(hDll)
return DllUnload(hDll)
function LoadLibrary(cDll)
return DllLoad(cDll)
function GetLastError()
return WAPI_GETLASTERROR()
#endif
#endif
/*
int InstanceID;
InstanceID = DPLCreateLibrary();
if (DPLUnlockKey(InstanceID, “your license key”) == 1) {
DPLDrawText(InstanceID, 100, 500, “Hello world”);
DPLSaveToFile(InstanceID, “C:\Docs\HelloFromDLL.pdf”);
}
DPLReleaseLibrary(InstanceID);
*/
/*
IF DebLoadDLL()
cLicense := "jx4aq86h5ou5mk9i86644936y"
xId := DllCall( hDLL,nil,"DPLCreateLibrary" )
xRet := DllCall( hDLL,nil,"DPLUnlockKey",StrPtr(cLicense) )
DllCall( hDLL,nil,"DPLReleaseLibrary",xId )
ENDIF
*/
Salu2
Carlos Vargas
Desde Managua, Nicaragua (CA)
Carlos Vargas
Desde Managua, Nicaragua (CA)
- carlos vargas
- Posts: 1421
- Joined: Tue Oct 11, 2005 5:01 pm
- Location: Nicaragua
Re: Testing Debenu Quick PDF Library
ya acepta la licencia, crea el archivo, pero no imprime nada.
Code: Select all
#define DC_CALL_CDECL 0x0010
#define DC_CALL_STD 0x0020
/*--------------------------------------------------------------*/
STATIC hDLL
/*--------------------------------------------------------------*/
PROCEDURE Main()
LOCAL nInstanceID
LOCAL nUnlock
PRIVATE cDllFile := "d:\compiler\t\DebenuPDFLibraryDLL1113.Dll"
PRIVATE cLicense1 := "jk7o53he84n6bo9np5cj9yb8y"
PRIVATE cLicense2 := "jx4aq86h5ou5mk9i86644936y"
cls
?
?"File exist:",File( cDllFile )
?"License Key", cLicense1
?
IF DebLoadDLL()
nInstanceID := DllCall( hDLL, DC_CALL_STD, "DPLCreateLibrary" )
?"InstanceID.: ", nInstanceID
IF !HB_IsNIL( nInstanceID )
nUnlock := DllCall( hDLL, DC_CALL_STD, "DPLUnlockKey", nInstanceID, AnsiToWide(cLicense1) )
?"Unlock: ", nUnlock
IF nUnlock==1
?"File created: "
DllCall( hDLL, DC_CALL_STD, "DPLDrawText", nInstanceID, 100, 100, AnsiToWide("Hello Word!") ) //Esto no funciona
DllCall( hDLL, DC_CALL_STD, "DPLSaveToFile", nInstanceID, AnsiToWide("d:\test1.pdf") )
ELSE
?"Error unlock: ", GetLastError()
ENDIF
DllCall( hDLL, DC_CALL_STD, "DPLReleaseLibrary", nInstanceID )
ELSE
?"Error instance: ", GetLastError()
ENDIF
ENDIF
DebUnLoadDLL()
RETURN
/*--------------------------------------------------------------*/
FUNCTION DebLoadDLL()
LOCAL lResult := .T.
hDLL := LoadLibrary( cDllFile )
#ifdef __XHARBOUR__
IF Abs( hDLL ) <= 32
#else
IF empty(hDll)
#endif
lResult := .F.
ENDIF
?"Dll loaded.:", lResult
?"hDLL.......:", hDll
RETURN lResult
/*--------------------------------------------------------------*/
FUNCTION DebUnLoadDLL()
#ifdef __XHARBOUR__
IF hDLL <> 0
#else
IF !empty(hDll)
#endif
FreeLibrary( hDLL )
ENDIF
RETURN
/*--------------------------------------------------------------*/
#ifdef __HARBOUR__
#ifndef __XHARBOUR__
function FreeLibrary(hDll)
return DllUnload(hDll)
function LoadLibrary(cDll)
return DllLoad(cDll)
function GetLastError()
return WAPI_GETLASTERROR()
#endif
#endif
/*
int InstanceID;
InstanceID = DPLCreateLibrary();
if (DPLUnlockKey(InstanceID, “your license key”) == 1) {
DPLDrawText(InstanceID, 100, 500, “Hello world”);
DPLSaveToFile(InstanceID, “C:\Docs\HelloFromDLL.pdf”);
}
DPLReleaseLibrary(InstanceID);
*/
/*
IF DebLoadDLL()
cLicense := "jx4aq86h5ou5mk9i86644936y"
xId := DllCall( hDLL,nil,"DPLCreateLibrary" )
xRet := DllCall( hDLL,nil,"DPLUnlockKey",StrPtr(cLicense) )
DllCall( hDLL,nil,"DPLReleaseLibrary",xId )
ENDIF
*/
Salu2
Carlos Vargas
Desde Managua, Nicaragua (CA)
Carlos Vargas
Desde Managua, Nicaragua (CA)
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Testing Debenu Quick PDF Library
Carlos,
Excellent!
We did not considered this possibility, that a wide string was expected. Very good!
Code: Select all
nUnlock := DllCall( hDLL, DC_CALL_STD, "DPLUnlockKey", nInstanceID, AnsiToWide(cLicense1) )
We did not considered this possibility, that a wide string was expected. Very good!
-
- Posts: 23
- Joined: Sat Oct 22, 2005 8:22 pm
Re: Testing Debenu Quick PDF Library
Hi Antonio and Carlos,
Indeed, DPLUnlockKeyA works, thanks very much!
nUnlock := DllCall( hDLL, DC_CALL_STD, "DPLUnlockKeyA", nInstanceID, cLicenseUSD ) -> this works
nUnlock := DllCall( hDLL, DC_CALL_STD, "DPLUnlockKey", nInstanceID, AnsiToWide(cLicenseUSD) ) -> this does not work
Now I can continue with the conversion of EMF to PDF with this lib.
Best regards,
Klaas den Dekker
Indeed, DPLUnlockKeyA works, thanks very much!
nUnlock := DllCall( hDLL, DC_CALL_STD, "DPLUnlockKeyA", nInstanceID, cLicenseUSD ) -> this works
nUnlock := DllCall( hDLL, DC_CALL_STD, "DPLUnlockKey", nInstanceID, AnsiToWide(cLicenseUSD) ) -> this does not work
Now I can continue with the conversion of EMF to PDF with this lib.
Best regards,
Klaas den Dekker
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: Testing Debenu Quick PDF Library
Does the library provide for direct conversion of EMF to PDF ?Now I can continue with the conversion of EMF to PDF with this lib.
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Testing Debenu Quick PDF Library
Klaas,
A very good finding from Carlos, as we did not considered that possibility
That seems the right one as usually "A" stands for Ansi and "W" for wide. Thats the way Microsoft uses to name the Windows API functions.nUnlock := DllCall( hDLL, DC_CALL_STD, "DPLUnlockKeyA", nInstanceID, cLicenseUSD ) -> this works
A very good finding from Carlos, as we did not considered that possibility