473,503 Members | 2,289 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How do I get the application directory

3 New Member
with windows o/s, C++, using mfc or not, how do I programmatically get the directory the running application resides in? GetCurrentDirectory is unreliable because if the user starts the application with a shortcut on the desktop without a 'Start In' directory property, the directory I want is incorrect.
Sep 14 '07 #1
4 10284
sicarie
4,677 Recognized Expert Moderator Specialist
What do you mean by "the running application"? Your app? The current app in focus? If it is your app, I believe you can use the Win32 API to search for the location of the name of your executable.
Sep 16 '07 #2
xoinki
110 New Member
hi,
use getmodulefilename()
xoinki
Sep 17 '07 #3
webster1766
3 New Member
What do you mean by "the running application"? Your app? The current app in focus? If it is your app, I believe you can use the Win32 API to search for the location of the name of your executable.
Sorry for being unclear. Yes, it's my application. Is getmodulefilename() the Win32 API call you're referring to?
Sep 20 '07 #4
webster1766
3 New Member
hi,
use getmodulefilename()
xoinki
That was what I needed. Thanks a million!
Sep 20 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
1825
by: Dennis | last post by:
Hi, I am wondering that the Application Name in Virtual Directory is compulsory be non-empty field when configuring Virtual Directory for ASP.NET application? I realized some of my ASP.NET...
5
3655
by: Leszek | last post by:
Hello, Could anybody explain what's a difference between a virtual directory and an application root under IIS? I'm a little bit confused. This is mu problem: Let's assume the following...
9
1879
by: Wayne Wengert | last post by:
I built an ASP application and it runs fine on my local IIS. I am trying to move the application to my web service (ISP) out on the internet. I've read several of the help articles but they all...
10
1785
by: Steve Taylor | last post by:
I am having trouble understanding the ASP.NET application boundaries. Here's my setup: 1. Win2003 Server with IIS 6 and an application defined at the root "SalesNow" (www.salesnow.com). 2. A...
21
2144
by: Chris | last post by:
I'm trying to get an existing VS.NET project up on my Win2003 server and I get the following error (on the actual website page): "It is an error to use a section registered as...
9
1307
by: Andy Sutorius | last post by:
Hi, Do you always have to make a folder an application if you have a web.config in that folder? Thanks, Andy
6
4542
by: Martin Bischoff | last post by:
Hi, I'm creating temporary directories in my web app (e.g. ~/data/temp/temp123) to allow users to upload files. When I later delete these directories (from the code behind), the application...
7
2078
by: Rabbit | last post by:
Dear all, Does anyone know how to resolve following setup problem, I developed my application(using .net 2.0) which will connect Access database on my Win XP, everything works fine, but when I...
5
1420
by: Oriane | last post by:
Hi, I'm developinf an Asp.Net 3.5 site on W2k3, and I use a Web application Visual Studio 2008 project. This Web app is configured on IIS 6 as an "application" under a web site. When I start...
1
1511
by: =?Utf-8?B?RmFtaWx5IFRyZWUgTWlrZQ==?= | last post by:
For in-house tools, the approach of writing to the program files folder is fine. Here are a few ways that it can be problematic if the code goes out of your team, such as to a customer: 1....
0
7207
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
7468
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...
0
5598
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4690
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
3180
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3171
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1522
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
748
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
402
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.