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!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - Unable to Unlock on Mac Version in Firemonkey
  FAQ FAQ  Forum Search   Register Register  Login Login

Unable to Unlock on Mac Version in Firemonkey

 Post Reply Post Reply
Author
Message
eddy2099 View Drop Down
Beginner
Beginner


Joined: 08 Feb 10
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote eddy2099 Quote  Post ReplyReply Direct Link To This Post Topic: Unable to Unlock on Mac Version in Firemonkey
    Posted: 02 Mar 13 at 12:24AM
I bought the Mac license and using the following codes, I am unable to unlock the library. I tried the trial key which comes with the zip file and still the same issue.

My codes in Firemonkey is as follows

==
unit Unit2;

interface

uses
System.SysUtils, System.Types, System.UITypes, System.Rtti, System.Classes,
System.Variants, FMX.Types, FMX.Controls, FMX.Forms, FMX.Dialogs;

type
TForm2 = class(TForm)
    Button1: TButton;
    Label1: TLabel;
    procedure Button1Click(Sender: TObject);
private
    { Private declarations }
public
    { Public declarations }
   ghandle : THandle;

end;

var
Form2: TForm2;

   type
   tsetkey = function(a : integer;key : pchar): integer;
   tpdfcreate = function() : integer;

implementation

{$R *.fmx}

procedure TForm2.Button1Click(Sender: TObject);
var p : Integer;
var setkey : tsetkey;
var pdfcreate : tpdfcreate;
begin

ghandle := LoadLibrary(PChar('libDebenuPDFLibraryDylib0913.dylib')) ;
@pdfcreate := GetProcAddress(ghandle,'DPLCreateLibrary');
   @setkey := GetProcAddress(ghandle,'DPLUnlockKey');
p := pdfcreate();
     label1.Text := IntToStr(p);
   if @setkey <> nil then
        begin

    if setkey(p,pChar('MyLicenseKey')) = 1 then
// this is the trial key
    ShowMessage('Unlocked Done')
    else
    begin

    ShowMessage('Still Locked');
    end;
      end;
end;

end.
==

The Integer P gave me a long integer so I know the CreateLibrary part works but I am just unable to do the unlock, it keeps giving me a 0.

I am feeling kind of stupid as I cannot even get through this stage. If someone would be kind enough to help, I would surely appreciate it.

Thank you.


Edited by Ingo - 02 Mar 13 at 1:58PM
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3529
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 02 Mar 13 at 2:08PM
Hi Eddy!

I've "changed" your key ;-)
Yes... i know it's only the testkey.

Cheers and welcome here,
Ingo

Back to Top
eddy2099 View Drop Down
Beginner
Beginner


Joined: 08 Feb 10
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote eddy2099 Quote  Post ReplyReply Direct Link To This Post Posted: 04 Mar 13 at 11:32AM
I really hope someone can help me. After I purchased the license after being told that I can be given the DCU version for firemonkey, support no longer replied me.

I am really not sure what is going on with support but I be happy just to be able to get this working.

Thanks,
Back to Top
AndrewC View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 08 Dec 10
Location: Geelong, Aust
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote AndrewC Quote  Post ReplyReply Direct Link To This Post Posted: 04 Mar 13 at 12:16PM
Eddy,  I have passed a message onto the developers to look into and get back to you.  For a case like this it would be quicker to go straight to the official QPL support.

Andrew.
Back to Top
eddy2099 View Drop Down
Beginner
Beginner


Joined: 08 Feb 10
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote eddy2099 Quote  Post ReplyReply Direct Link To This Post Posted: 04 Mar 13 at 12:42PM
I know but I've contacted them since Feb 28 via email at their help desk but so far no reply as yet, otherwise I wouldn't come by here in desperation.

Thank you Andrew for your help.
Back to Top
AndrewC View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 08 Dec 10
Location: Geelong, Aust
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote AndrewC Quote  Post ReplyReply Direct Link To This Post Posted: 05 Mar 13 at 10:38AM
I have has a quick chat with the developer who looked at your code.

1. The functions need to be declared as  cdecl
2. The GetProcAddress need to have the '@' characters removed.

Andrew
type
   tsetkey = function(a : integer; key: pWidechar): integer; cdecl;
   tpdfcreate = function() : integer; cdecl;
 pdfcreate := GetProcAddress(ghandle,'DPLCreateLibrary');
    setkey := GetProcAddress(ghandle,'DPLUnlockKey');
Back to Top
eddy2099 View Drop Down
Beginner
Beginner


Joined: 08 Feb 10
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote eddy2099 Quote  Post ReplyReply Direct Link To This Post Posted: 05 Mar 13 at 10:40AM
Thanks. I will give that a try
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store