|
Boost Users : |
From: E. Scott Larsen (yg-boost-users_at_[hidden])
Date: 2003-04-17 11:39:48
Vladimir Prus wrote:
> E. Scott Larsen wrote:
>
>
>>Just FYI to this thread in general. It's been a while since I've messed
>>with WinMain and command lines, but if my memory serves me right (it was
>>at a different place, so I don't have the code here), there's some
>>additional whacky issues here. WinMain recieves the first arguments
>>differently depending on how it is run:
>>*) from MSVC debugger
>>*) from a commandline
>>*) by clicking on an shortcut icon
>>*) by clicking in an explorer window
>>
>>don't remember which is which, but one gives just the executable name,
>>one gives the full path to the executable (seems like there's two
>>variations on this, like one is quoted and one is not, don't remember
>>the details), and it seems like there's one that doesn't give the
>>executable at all.
>
> The latter case is disturbing. If the program name is not passed, it will be
> hard to skip the first argv element. Does it ever happens when you have
> non-empty set of options?
I don't remember (I don't currently use command line parameters, nor
winmain, or I'd just generate some specific cases for you). I do
remember that figuring out how to skip the exectuable name was a big
trick (that app was always using a non-empty set of options, never tried
it with an empty set), and it seams like there was more than a couple
variations. Sorry I don't have the code or remember the details. I'm
all on unix now, so I can't run some tests to find out.
If nobody has a way to test or wants to fill in the details, then I
wouldn't worry about it, as that implies that there's no demand for a
solution! But if someone wants a solution, they should be able to
quickly generate some specific cases. I wasn't intending to generate a
problem where there was not demand for a solution, I was just FYI'n from
my memory. _I_ say you've done outstanding work already and have enough
you'd love to do instead of solving a problem that doesn't need to be
solved. Sure, if someone wants to pitch in with the specifics and would
like a solution, then you'd have some specifics and something to work
off of.
//Scott
>>Also, I _distinctly_ remember something very whacky when I used unicode,
>>I don't remember the details, but the commandline arguments were a
>>significant pain for a program built with unicode support using the
>>unicode windows entry function. That still tastes bad in my mouth.
>
>
> In fact, I'm not sure how to handle Unicode at all.
>
> - Volodya
>
>
>
> Info: <http://www.boost.org>
> Wiki: <http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl>
> Unsubscribe: <mailto:boost-users-unsubscribe_at_[hidden]>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net