App root path

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello:
I'm developing an app, with a plugins system, and I have a folder,
plugins, thats in the same directory with the app, then a need a function or
something that tell me what is the App root directoy... can u understand my
bad english ???

Thanx in advance
 
Hector Y. Martinez said:
I'm developing an app, with a plugins system, and I have a folder,
plugins, thats in the same directory with the app, then a need a function
or
something that tell me what is the App root directoy... can u understand
my
bad english ???

You can use GetModuleFileName() to return the fully qualified name of the
executable. The result you can pass to _splitpath() to get the drive and
directory which you pass to _makepath() which, think, will get you what you
want.

Regards,
Will
 
If it is a managed app, you may also use
AppDomain::CurrentDomain->BaseDirectory and the System::IO::Path helper.
 
Back
Top