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 - C++ header files for iSED dll
  FAQ FAQ  Forum Search   Register Register  Login Login

C++ header files for iSED dll

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


Joined: 02 Nov 05
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote Almi Quote  Post ReplyReply Direct Link To This Post Topic: C++ header files for iSED dll
    Posted: 02 Nov 05 at 9:36AM

Does anybody have header files for C++ for iSED?

Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 03 Nov 05 at 5:08AM
Hi Almi!

I've "googeled" a bit ... and i've found an old forum-post where somebody have the same problems with QuickPDF. Perhpas this could help you, too.

Try this link:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/_core_getprocaddress.asp

You basically call LoadLibrary passing in the dll path. Then call GetProcAddress for the function pointers you want to use.
Cheers,
Ingo

Back to Top
Stephen0838 View Drop Down
Beginner
Beginner
Avatar

Joined: 06 Dec 05
Location: United States
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote Stephen0838 Quote  Post ReplyReply Direct Link To This Post Posted: 12 Dec 05 at 4:37PM

I have built a wrapper class in vc++6 that loads the DLL, Registers the reg code and has the commands I use  using the load libary function. a small sample of the code is below.

First create a data type for each command argument

the syntax is typdef return value (CALLBACK* type name)(input values);

typedef long (CALLBACK* ISED_Oint_PTR)();
typedef long (CALLBACK* ISED_Oint_Iint_PTR)(long);
typedef long (CALLBACK* ISED_Oint_Ichar_PTR)(char *);
typedef long (CALLBACK* ISED_Oint_Ichar_Iint_PTR)(char *, long);
typedef long (CALLBACK* ISED_Oint_Iddddiii_PTR)(double, double, double, double, long, long, long);
typedef long (CALLBACK* ISED_Oint_Iddd_PTR)(double, double, double);

Next declare the commands in a class

class CSECiSEDDLL
{
 public:
 //Methods
  CSECiSEDDLL();
  ~CSECiSEDDLL();
 //Data
  long      ErrorCode;
  bool      Loaded;
  bool      UnLocked;
  ISED_Oint_PTR    NewDocument;   
  ISED_Oint_Iint_PTR   SetOrigin;    
  ISED_Oint_Iint_PTR   SetMeasurementUnits; 
  ISED_Oint_Ichar_PTR   SetPageSize;   

private:
 //Methods
  void Unlock();
  void Init();
 //Data
  HINSTANCE     DLL_Handle;    // Handle to DLL
  string      UnlockCode;
  ISED_Oint_Ichar_PTR   UnlockKey;

};

Now code the class remember that the commands in the DLL are all prefaced with iSED

//start wrapper
CSECiSEDDLL::CSECiSEDDLL()
{
 UnLocked = false;
 Loaded = false;
 Init();
 UnlockCode = "XXXXXXXXXXXXX";
 Unlock();
}

CSECiSEDDLL::~CSECiSEDDLL()
{
 FreeLibrary(DLL_Handle);
}

void CSECiSEDDLL::Unlock()
{
 int errorcode;
 errorcode = UnlockKey (const_cast <char *> (UnlockCode.c_str()));
 if (errorcode != 0)
 {
  UnLocked = true;
 }
}

void CSECiSEDDLL::Init()
{
 DLL_Handle = LoadLibrary("iSEDQuickPDF.dll");
 if (DLL_Handle != NULL)
 {
  ErrorCode = 0;
  Loaded = true;

  UnlockKey = (ISED_Oint_Ichar_PTR)GetProcAddress(DLL_Handle,"iSEDUnlockKey");
  NewDocument = (ISED_Oint_PTR)GetProcAddress(DLL_Handle,"iSEDNewDocument");
  SetOrigin = (ISED_Oint_Iint_PTR)GetProcAddress(DLL_Handle,"iSEDSetOrigin");
  SetMeasurementUnits = (ISED_Oint_Iint_PTR)GetProcAddress(DLL_Handle,"iSEDSetMeasurementUnits");
  SetPageSize = (ISED_Oint_Ichar_PTR)GetProcAddress(DLL_Handle,"iSEDSetPageSize");
  NewPages = (ISED_Oint_Iint_PTR)GetProcAddress(DLL_Handle,"iSEDNewPages");
  SelectPage = (ISED_Oint_Iint_PTR)GetProcAddress(DLL_Handle,"iSEDSelectPage");
  AddImageFromFile = (ISED_Oint_Ichar_Iint_PTR)GetProcAddress(DLL_Handle,"iSEDAddImageFromFile");
  SaveToFile = (ISED_Oint_Ichar_PTR)GetProcAddress(DLL_Handle,"iSEDSaveToFile");
  }
}

 

To use declare an instance of the wrapper and use the commands

CSECiSEDDLL ISED;
long  rv;
rv = ISED.LoadFromFile(const_cast <char *> (filename.c_str()));

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