Forum Discussion

zortinspace's avatar
zortinspace
New Contributor
14 years ago

Loading delphi dll with package fail

Hi,

I'm trying to load an delphi compiled dll, witch is link with package (.bpl)  inside.

After severals test, i did find that the System path, is not used for searching (Dll and bpl).

The only solution, I've found, is to copy all our application binaries inside my testcomplete folder (witch contains my Tc Project), with this solution my Dll Is loading with bpl.. and is working.

But our Application don't. because It's load those same bpl.

So what I need to know, is how to force the CurrentPath or correctly add an system search path, before loading my .dll.

Durring my test I saw that after the dll loading, his working path is my testcomplete project path.

Hope you have an solution, thanks.

2 Replies

  • Lefevre,


    >> After severals test, i did find that the System path, is not used for searching (Dll and bpl).


    As far as I know, TestComplete uses standard WinAPI functions to find DLLs. So, place your DLL and BPL to a "common" folder like Windows\System32 or specify the path to them in the PATH environment variable; TestComplete should be able to find them.

    Alternatively, specify the DLL name with the path when calling the DLL.Load function.

  • Thanks for your answer,

    I finaly found an solution, using 2 Dll, one for TestComplete, with no package and set the current system path.

    Then load the second Dll with delphi Package.

    It's work fine.