Re: main() command line arguments of console application
- From: "John Spaith [MS]" <jspaith@xxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 30 Jun 2005 10:30:20 -0700
Does
http://groups-beta.google.com/group/microsoft.public.windowsce.embedded.vc/browse_frm/thread/31ef446e75a77110/447e086c21d66afb?q=spaith+warrington&rnum=1&hl=en#447e086c21d66afb
help? You have to have the EXE built with the right entry points. I think
you'd want mainACRTStartup for ANSI.
--
John Spaith
Software Design Engineer, Windows CE
Microsoft Corporation
Check out the new CE Networking Team Blog at http://blogs.msdn.com/cenet/.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2003 Microsoft Corporation. All rights
reserved.
"Jimbo" <cjavajim@xxxxxxxxx> wrote in message
news:1120147511.556096.59750@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>I want to use command line arguments in a console application. Yet
> regardless of what was entered on the command line, argc and argv
> contain bogus values. Why?
>
> Setup:
>
> Platform Builder 5.0, target is a CEPC, and yes, the OS does include
> the console component.
>
> Embedded VC++ 4.0 with SP4.
>
> Code:
>
> int main (int argc, char *argv[])
> {
> printf("argc = %d (0x%0X), argv = %s\n",
> argc, argc, argv ? argv[0] : "NULL");
>
> getchar();
>
> return 0;
> }
>
> Sample output:
>
> argc = 981293930 (0x3A7D5B6A), argv = NULL
>
> Issue: the command line arguments contain bogus values regardless of
> what was entered on the command line. That is, regardless of _how
> many_ (argc) values I entered, argc is always incorrect and argv is
> always NULL.
>
.
- Follow-Ups:
- References:
- Prev by Date: Re: Need Remote Control of a CE 5.0 device.
- Next by Date: Re: Need Remote Control of a CE 5.0 device.
- Previous by thread: main() command line arguments of console application
- Next by thread: Re: main() command line arguments of console application
- Index(es):
Relevant Pages
|