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.