delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2017/05/13/12:20:20

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:reply-to:message-id:to:subject
:in-reply-to:references:mime-version:content-type
:content-transfer-encoding; q=dns; s=default; b=GBjnQCXHZQEGGuzW
nqIhJUR1B0y2l8FPzCadsYOl/Zo0uPBOx1/+Di7cpzrptSv0AROUKHYjCFsnFXPN
1uVjU1wSDsF25SOgYQzhAL5aUZJDwqCkYawgXhYmFNELkZaKArmZ1UXchhscxhPq
SzPSmHxlCqQnF6E2ogIRiqmbx7k=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:reply-to:message-id:to:subject
:in-reply-to:references:mime-version:content-type
:content-transfer-encoding; s=default; bh=WGzQFQ2A35x1nNhODg1GRZ
BanR8=; b=BSGCpKcmiQPwRaGx3pgvEQwNB4Ml32+digx4baGexNEF1FOMzvst0y
4xIDHgd7EHFFeCNNV2ZqR0vTNXWOIl0hJpwdZmZCuovbaNJdblB6792TDKdUzLOX
6Ut/jJpfpDaxb23IfHFHUg8PPRjmQdfGLAusTe5s3o2369ipmYb4s=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=0.8 required=5.0 tests=AWL,BAYES_05,FREEMAIL_FROM,KAM_THEBAT,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 spammy=H*UA:Bat!, H*x:Bat!, H*M:yandex, H*F:D*yandex.ru
X-HELO: forward5m.cmail.yandex.net
Authentication-Results: smtp3h.mail.yandex.net; dkim=pass header.i=@yandex.ru
X-Yandex-Suid-Status: 1 0,1 0
Date: Sat, 13 May 2017 19:05:49 +0300
From: Andrey Repin <anrdaemon AT yandex DOT ru>
Reply-To: cygwin AT cygwin DOT com
Message-ID: <153439448.20170513190549@yandex.ru>
To: Mike Barry <mikebarry AT gmail DOT com>, cygwin AT cygwin DOT com
Subject: Re: BUG: winmain GetCommandLine only returning program name and path with no arguments
In-Reply-To: <CAF_6hF4+jNWuqA-7jSn2=Jqb2X--MDmY0qhbNwtLxBcHwkrxbA@mail.gmail.com>
References: <CAF_6hF4+jNWuqA-7jSn2=Jqb2X--MDmY0qhbNwtLxBcHwkrxbA AT mail DOT gmail DOT com>
MIME-Version: 1.0
X-IsSubscribed: yes

Greetings, Mike Barry!

> Below is a sample program that demonstrates that the GetCommandLine
> function is not returning the command line arguments.  I attached
> cygcheck.out.

> #include <windows.h>
> #include <stdio.h>

> int WINAPI
> WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR szCmdLine, int sw) {
>         char* text = GetCommandLine();
>         printf("getcmdline: %s\n", text);
>         return 0;
> }

> gcc test_wmain.c -o test

> $ ./test hello world
> getcmdline: "C:\cygwin64\home\mbarry\game-repos\greenbeam\src\test.exe"

What about CYGWIN=wincmdln ?


-- 
With best regards,
Andrey Repin
Saturday, May 13, 2017 19:05:36

Sorry for my terrible english...


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019