Dynamic path for dll

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Need to use functions from an external dll. When I start up i do not know in
advance the location for the dll but have to query registry to get the full
path. If I then assign this path pluss the dll name to a string variable
fullPath and use this as follows

Declare Function someFnction Lib fullPath .......

I get an error stating that the Lib must be a constant string. Is it
possible to get around this somehow when I do not know the location of the
dll on beforehand and the dll path is not included in the Path setting?
 
Depending on the type of dll, try temporarily switching to the directory
containing the dll

sCur = CurDir
ChDir sPathToDll
' call dll
ChDir sCur

and don't put a path in the Declare

Regards,
Peter T
 
Back
Top