Link to home
Start Free TrialLog in
Avatar of gvector1
gvector1

asked on

Directory Question

I have an application that makes use of a configuration file and an open file dialog.  I actually make changes to some of the settings in the configuation file from a dll.  This dll is actually a class that allows me to modify my configuration file(xxxxx.exe.cfg).  My question is that once I use the open file dialog, the current directory is different than the location of the exe file and the configuration file.  Is there some way that from within that dll(which would be located in the same spot as the configuration file) I could find the applications default directory.  How could I do this other that making a public variable within the dll and setting that variable from within the application.  I would like the dll to be able to self determine the directory that the configuration file is located in.

Thanks,
Kendal
SOLUTION
Avatar of lgawlik
lgawlik

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of gvector1
gvector1

ASKER

I will split the points between the two answers. I prefer Application.StartupPath as it is simpler to implement over the long getexecutingassembly.location property, but lgawlik answered first.  I believe it's only fair to split the points.

Thank you both,
Kendal