By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,197 Members | 1,205 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,197 IT Pros & Developers. It's quick & easy.

App root path

P: n/a

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

--
"The best way to predict the future, is to invent it"
Mar 22 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"Hector Y. Martinez" <He*************@discussions.microsoft.com> wrote in
message news:CE**********************************@microsof t.com...
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
Mar 22 '06 #2

P: n/a
If it is a managed app, you may also use
AppDomain::CurrentDomain->BaseDirectory and the System::IO::Path helper.

"William DePalo [MVP VC++]" <wi***********@mvps.org> wrote in message
news:OG**************@tk2msftngp13.phx.gbl...
"Hector Y. Martinez" <He*************@discussions.microsoft.com> wrote in
message news:CE**********************************@microsof t.com...
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

Mar 23 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.