Re: How to determine at runtime where the application is launched from
- From: "Norm Dresner" <ndrez@xxxxxxx>
- Date: Tue, 18 Oct 2005 05:27:37 GMT
"Victor Bazarov" <v.Abazarov@xxxxxxxxxxxx> wrote in message news:%230hqsm40FHA.2008@xxxxxxxxxxxxxxxxxxxxxxx
Norm Dresner wrote:"hereafter" <hereafter@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:BF905576-638F-461A-94F1-76759BBBFAC8@xxxxxxxxxxxxxxxxI notice some .exe program under \WIndows folder when i click on them, the display a dialog shows the version info and when i type their names in a command prompt, they display the credit within the command prompt
Is there a way to determine where the application is launched? from console or double click LButton?
1. An icon on the desktop can provide a program with optional command-line information and switches to alter it's behavior.
Yes, an icon could. But if you just launch it from explorer by double-clicking on the exe file?
2. A trick that's common in Unix is to have a program do several different things depending on the name by which it's executed (mv -- cp for example). Since the program's execution name is argv[0], it's readily available.
Yes, but if there were two executables with different names, they wouldn't be the same program, would they?
Ah, but links can have different names from the targets they point to, can't they?
Norm
.
- Follow-Ups:
- Re: How to determine at runtime where the application is launched from
- From: Victor Bazarov
- Re: How to determine at runtime where the application is launched from
- References:
- Re: How to determine at runtime where the application is launched from
- From: Norm Dresner
- Re: How to determine at runtime where the application is launched from
- From: Victor Bazarov
- Re: How to determine at runtime where the application is launched from
- Prev by Date: Accessing Alt & Ctrl Keys in 32 Bit Dos Applications
- Next by Date: Re: Web-based tutorial for C++ templates
- Previous by thread: Re: How to determine at runtime where the application is launched from
- Next by thread: Re: How to determine at runtime where the application is launched from
- Index(es):