Results 1 to 3 of 3

Thread: Directory a DLL Resides

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2000
    Posts
    2
    I created a DLL that requires the use of an Access mdb file to pull some index values. They can install this file to any directory they wish, and I install the MDB file in the same directory. The problem I am having is that I have no way to pull the directory that the DLL file resides through code, so I can then figure out where to access the MDB file from the DLL.

    I tried using app.path, but that returns the location of the VB program that is calling the DLL, and not the path of the DLL itself.

    Does anyone know of a way to pull the directory a dll is in from inside the DLL?

    Any help would be appreciated.

    Dennis
    Dennis Main
    Manager Technical Development
    [email protected]

  2. #2
    Addicted Member
    Join Date
    Aug 1999
    Location
    Ottawa,ON,Canada
    Posts
    217
    I don't know if its what your looking for, but you could try the API function GetModuleFileName.

    Other than that I'm not sure I really understand what your looking for.

  3. #3

    Thread Starter
    New Member
    Join Date
    Apr 2000
    Posts
    2
    I tried to implement the getmodulefilename in the DLL, but it returns the name and path of the visual basic executable that I am running. What I need is a function that resides in the DLL that will tell me what directory the DLL is in.


    Dennis Main
    Manager Technical Development
    [email protected]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width