Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!
DPLUnlockkey not working with Powerbuilder 8 |
Post Reply |
Author | |
jfields
Beginner Joined: 24 Jul 13 Location: Houston Status: Offline Points: 7 |
Post Options
Thanks(0)
Posted: 21 Aug 13 at 3:36AM |
Hi all,
We have purchased a license and the license works with the vb6 sample code and 9.15 active X object.
I am now trying to implement the license in Powerbuilder 8 with the 9.15 dll.
DPLCreateLibrary is returning a nonzero number, so I am assuming that the instance id is good.
When I pass the instance id to DPLUnlockkey with our license, DPLUnlockkey returns 0 with no messages.
Any ideas what I am doing wrong? My code is similar to http://www.quickpdf.org/forum/dplloadfromstring-for-powerbuilder_topic2560.html?KW=unlockkey
I loaded the Powerbuild import header that was for PB version > 10 and removed the "ALIAS FOR" part for these 2 functions.
Any help would be appreciated.
Thanks,
-Jean
|
|
Wheeley
Senior Member Joined: 30 Oct 05 Location: United States Status: Offline Points: 146 |
Post Options
Thanks(1)
|
Powerbuilder 8 uses Ansi strings internally. So you need to use the alias for clause for your external function declaration. Unfortunately, Debenu hasn't been keeping up their include file correctly. From the file for 9.15 I see this:
FUNCTION long DPLUnlockKey(long InstanceID, string LicenseKey) LIBRARY "DebenuPDFLibraryDLL0915.dll" ALIAS FOR "DPLUnlockKey;ansi" But it should be this: FUNCTION long DPLUnlockKey(long InstanceID, string LicenseKey) LIBRARY "DebenuPDFLibraryDLL0915.dll" ALIAS FOR "DPLUnlockKeyA;ansi" So, for every function you use you need to append an A character to the function name so you direct Powerbuilder to use the ansi function not the unicode function. Hope this helps Wheeley |
|
jfields
Beginner Joined: 24 Jul 13 Location: Houston Status: Offline Points: 7 |
Post Options
Thanks(0)
|
Thanks Wheeley for your reply. My application is not getting to the DPLUnlockKey function, it is throwing an error at DPLCreateLibrary
FUNCTION long DPLCreateLibrary() LIBRARY "DebenuPDFLibraryDLL0915.dll" ALIAS FOR "DPLCreateLibrary;ansi"
When I run my application, I get the following error: Powerbuilder Application Execution Error (R0015) Application Terminated Error: Error calling external function DPLCreateLibrary;ansi at line... As far as I can tell, the DLL is loading into memory correctly. Anything else I should check? Thanks in advance, Edit: I had tried DPLCreateLibraryA, but used DLLExport to find there was no DPLCreateLibraryA function. Edited by jfields - 04 Sep 13 at 2:07AM |
|
Wheeley
Senior Member Joined: 30 Oct 05 Location: United States Status: Offline Points: 146 |
Post Options
Thanks(0)
|
You only need the ";ansi" when you are passing string arguments. So it should be
FUNCTION long DPLCreateLibrary() LIBRARY "DebenuPDFLibraryDLL0915.dll" ALIAS FOR "DPLCreateLibrary" OR just FUNCTION long CreateLibrary() LIBRARY "DebenuPDFLibraryDLL0915.dll" ALIAS FOR "DPLCreateLibrary" Wheeley |
|
jfields
Beginner Joined: 24 Jul 13 Location: Houston Status: Offline Points: 7 |
Post Options
Thanks(0)
|
Hi all,
Just to let everyone know I finally figured it out through trial and error:
Here is how I modified the header file:
removed all ";ansi" from every line
next, I used a DLL Exporter to find all the function names in the DLL
for functions with corresponding "A" functions, for these functions I added the "A" to the ALIAS FOR name in the header
for those functions without corresponding "A" functions, I removed the whole ALIAS FOR part
Thanks to all that helped.
-Jean
|
|
AndrewC
Moderator Group Joined: 08 Dec 10 Location: Geelong, Aust Status: Offline Points: 841 |
Post Options
Thanks(0)
|
Jean,
We do not have access here to PowerBuilder 8. It sounds like version 8 works a little differently to to 9 and 10. If you can send us your final import file we should be able to include it automatically in future QPL releases. You can email to to support@debenu.com. Andrew.
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store