-
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
-
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.
-
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.