Re: process' command line
From: Jochen Kalmbach (nospam-Jochen.Kalmbach_at_holzma.de)
Date: 11/09/04
- Next message: Harry Potter: "NDIS for wireless networks"
- Previous message: qfel: "Re: process' command line"
- In reply to: qfel: "Re: process' command line"
- Next in thread: Gary Chanson: "Re: process' command line"
- Reply: Gary Chanson: "Re: process' command line"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 09 Nov 2004 10:25:24 -0800
Hi qfel,
> Nope; If I call CreateProcess with both exe path and cmdline set,
> they're not merged, so I don't get exe path in command line.
> BTW
> "Console processes written in C can use the argc and argv arguments to
> parse the command line. Because argv[0] is the module name, C
> programmers generally repeat the module name as the first token in the
> command line." Generally means you have no guarantee that it will be
> so.
But GetCommandLine *will* always return the command line.
Or at least: this is the only function to get something like a command-
line.
You can use "GtModuleFileName(NULL, ...)" to get the real EXE-Name and then
you can check with the first paremeter if this is the EXE-Name (of course
this is not trivial, because it might be with(out) path and/or short-
filename).
The first paremeter is always until the first space occurs, or if it is
queoted, until the next quote (") occurs.
-- Greetings Jochen My blog about Win32 and .NET http://blog.kalmbachnet.de/
- Next message: Harry Potter: "NDIS for wireless networks"
- Previous message: qfel: "Re: process' command line"
- In reply to: qfel: "Re: process' command line"
- Next in thread: Gary Chanson: "Re: process' command line"
- Reply: Gary Chanson: "Re: process' command line"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|