473,513 Members | 2,417 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

App root path


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
2 1400
"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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
3298
by: | last post by:
Is it possible to include my remote web server path eg: m:/html/root/site1 | m:/html/root/site2 etc ....in virtual includes.... Thus eliminating the need to create duplicate INC files in each...
5
2207
by: Jonathan | last post by:
I am creating a CD-ROM based website template. Things work fine under Windows but when I try to run the site under Linux the path is messed up. Therefore my JavaScript functions misinterpret the...
1
5837
by: William Stacey [MVP] | last post by:
I need a bullet proof way to combine a root and a relative path to form a FQ rooted path (similar to a VDir in IIS). Path.Combine alone will not do the job in all cases. I also need to be sure...
4
7844
by: Win, Pats | last post by:
I have a snippet of HTML that I inject into a number of pages throughout my Web site at runtime. My problem is that I'm not getting the image to appear in all documents into which this snippet is...
2
2291
by: Jordan Richard | last post by:
Put another way, is there any way I can tell ASP.NET to convert a path (imbedded in a string variable, "~/images/some_image.gif") to a root-relative path, that the client will understand, for the...
19
10163
by: Steve Franks | last post by:
I am using VS.NET 2005 beta 2. When I run my project locally using the default ASP.NET Development Web Server it runs using a root address like this: http://localhost:11243/testsite/ However...
3
1691
by: Nalaka | last post by:
Hi, I have an asp.net web application (www.myWebSite), and a subweb application (www.myWebSite/subSite). How do I set it so that, subweb application (www.myWebSite/subSite) be the root...
9
6609
by: MR | last post by:
I get the following Exception "The data at the root level is invalid. Line 1, position 642" whenever I try to deserialize an incoming SOAP message. The incoming message is formed well and its...
4
7568
by: Tee | last post by:
Hi, Can anyone tell me how to get the path of IIS root folder from coding? Eg: C:\Inetpub\wwwroot. I would like to detect it via coding as not everyone set it at the default folder. ...
15
6434
by: Lars Eighner | last post by:
Aside from the deaths of a few extra electrons to spell out the whole root relative path, is there any down side? It seems to me that theoretically it shouldn't make any difference, and it would...
0
7260
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7161
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
7101
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7525
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5089
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4746
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3222
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1596
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
802
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.