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!
![]() |
DLL won't load |
Post Reply ![]() |
Author | |
RAG ![]() Beginner ![]() ![]() Joined: 05 Jan 11 Location: Oregon. USA Status: Offline Points: 1 |
![]() ![]() ![]() ![]() ![]() 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 ------------ |
|
![]() |
|
AndrewC ![]() Moderator Group ![]() ![]() Joined: 08 Dec 10 Location: Geelong, Aust Status: Offline Points: 841 |
![]() ![]() ![]() ![]() ![]() |
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.
|
|
![]() |
|
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3529 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
Dimitry ![]() Team Player ![]() Joined: 18 Feb 10 Status: Offline Points: 37 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
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