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 - DLL won't load
  FAQ FAQ  Forum Search   Register Register  Login Login

DLL won't load

 Post Reply Post Reply
Author
Message
RAG View Drop Down
Beginner
Beginner
Avatar

Joined: 05 Jan 11
Location: Oregon. USA
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote RAG Quote  Post ReplyReply Direct Link To This Post Topic: DLL won't load
    Posted: 05 Jan 11 at 11:48PM
We update client programs remotely by storing the *.exe in a database blob record on a central server. When updates are available, they are loaded from the server to the client and written to the local PC.

With Windows 7, that means that we can't use \program files\* since it would take elevated permissions, etc.

So, we install and update the programs for the client in \user\app data\roaming\subdir\*

That works fine... except... the DLL version (also placed in the roaming directory), will not load in our report programs.

We use a declare to create the library:
soft declare function QuickPDFCreateLibrary lib pdflib () as integer

The programming platform is RealSoftware, so the syntax of the declare may be a bit different that VB6, etc. The pdflib is a string constant with the name of the dll "QuickPDFDLL0722.dll"

I can get it to load if I place the DLL in "\Program Files\subdir\QuickPDFDLL0722.dll" and reference the pdflib constant to that address, but it just won't load if it is in the roaming directory.

The programs on the client all run from the roaming directory.

Help!

RAG
------------
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: 09 Jan 11 at 1:35AM
What is the exact error message when the program runs on the client PC and it cannot find / load the DLL.

I also assume you are trying this in a debugger.  What is the return value of the LoadLibrary call.  Maybe that will give you more information.

An EXE file should also search for DLL's in the current directory.  ie .  The same directory as the EXE file itself.  This sounds like what you want to happen but it is not working.

Have your tried posting a support call to RealSoftware.  It you can get the DLL to load in a different location then it is unlikely to be related to QuickPDF but more to RealSoftware.  Do you use other DLL's in the same way with RealSoftware.  If not you many want to quickly load a different DLL to see if it has the same problem.
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: 09 Jan 11 at 3:41PM
Hi RAG!

Normally applications using dlls are looking first in system32
or sysWow64 and after this they are looking in the own app-directory.
If there are different dlls on the system (in system32 and app-path for example)
this can be a problem?

Cheers and welcome here,
Ingo



Back to Top
Dimitry View Drop Down
Team Player
Team Player


Joined: 18 Feb 10
Status: Offline
Points: 37
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dimitry Quote  Post ReplyReply Direct Link To This Post Posted: 12 Jan 11 at 2:33AM
System path variable %USERPROFILE% value should be used for proper access to
..\Application Data (..\AppData\Roaming). 
The %USERPROFILE% path is usually used to store application data including executable files and libraries which actually can be executed/loaded.
The problem may appear with %USERPROFILE% folders access rights.
 
Here is Delphi code snippet that may help you. It was tested with Windows XP and Windows 7.
If it doesn't work you should check user and folders access rights matching.
 
uses
  QuickPDFDLL0723;
 
const
  USER_PROFILE = 'USERPROFILE';
  APPLICATION_DATA = '\Application Data';
  WORK_DIR = '\subdir';
  LIBRARY_NAME = '\QuickPDFDLL0723.dll';

var
  libpath: string;
  qpl: TQuickPDFDLL0723;

begin
  libpath := GetEnvironmentVariable(USER_PROFILE) +
    APPLICATION_DATA + WORK_DIR + LIBRARY_NAME;
  // Check is QuickPDF*.dll exists at libpath
  if not FileExists(libpath) then
    Exit;
  qpl := TQuickPDFDLL0723.Create(libpath);
  try
    with qpl do
    begin
      UnlockKey('type your license key here');
      SetOrigin(1);
      DrawText(100, 100, 'Hello DLL!');
      SaveToFile('sample.pdf');
    end;
  finally
    qpl.Free;
  end;
end;
 
 
Regards,
Dmitry
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