LoadLibrary failes

This Forum is for the use of Software Developers requiring help and assistance for Tracker Software's PDF-Tools SDK of Library DLL functions(only) - Please use the PDF-XChange Drivers API SDK Forum for assistance with all PDF Print Driver related topics or PDF-XChange Viewer SDK if appropriate.

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan

Post Reply
ADeeg
User
Posts: 24
Joined: Tue Jan 04, 2005 1:30 pm
Location: Berlin

LoadLibrary failes

Post by ADeeg »

Hi Support,

I use LoadLibrary for dynamic linking of the xcpro40.dll (Delphi IDE).
That worked fine in the past but with the current version 4.0.0165 I get a zero-handle, GetLastError returns 127 ("The specified procedure could not be found").
My last previously testet version was 4.0.0161 - without any problems.
I tried to load the DLL directly from your bin-directory, so any dependent Module should be available (also DependencyWalker doen't show any missing library).
There are no older versions of your DLLs in the path and I set the bin-directory as working directory.

Any Ideas?

Many thanks and best regards.
Corwin - Tracker Sup
User
Posts: 664
Joined: Tue Nov 14, 2006 12:23 pm

Re: LoadLibrary failes

Post by Corwin - Tracker Sup »

Can you tell exactly on what procedure you get such problem?
ADeeg
User
Posts: 24
Joined: Tue Jan 04, 2005 1:30 pm
Location: Berlin

Re: LoadLibrary failes

Post by ADeeg »

Hi Corwin,

the error occurs before I call any procedure.

Code: Select all

procedure Test;
var
  errNo,
  hdll : Cardinal;

begin
  hdll := LoadLibrary('C:\Program Files\Tracker Software\PDF-Tools 4 SDK\Examples\Bin\xcpro40.dll');
  if hdll = 0 then
  begin
    errNo := GetLastError;
    ShowMessage(SysErrorMessage(errNo) + ' (' + inttostr(errNo) + ')');
  end
  else
  begin
    FreeLibrary(hdll);
  end;
end;
The errNo in this case is 127.
User avatar
Lzcat - Tracker Supp
Site Admin
Posts: 677
Joined: Thu Jun 28, 2007 8:42 am

Re: LoadLibrary failes

Post by Lzcat - Tracker Supp »

Please list all dll which you have in this folder, with versions (all should be same). If you wish - you may pack and send/post all content of your Bin directory and we will check here.
And please say which version of Windows you are using.
Victor
Tracker Software
Project manager

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
ADeeg
User
Posts: 24
Joined: Tue Jan 04, 2005 1:30 pm
Location: Berlin

Re: LoadLibrary failes

Post by ADeeg »

I found the reason. Although there was no xcpro40.dll in any of the path's directories, but on old build (150) of dscrt40.dll, which was obviously loaded instead of the version in the working directory.

Many thanks for your support and sorry for dissipating your time :roll:
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17901
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: LoadLibrary failes

Post by Tracker Supp-Stefan »

ADeeg,

We are pleased that the problem is solved, and no worries - we are here to help :)

Regards,
Stefan
Post Reply