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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top