Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Injected-Via-Gmane: http://gmane.org/ To: cygwin AT cygwin DOT com From: "BB" Subject: Bug in GUI App WinMain Arguements Date: Fri, 4 Apr 2003 11:34:59 -0600 Lines: 66 Message-ID: Reply-To: "BB" X-Complaints-To: usenet AT main DOT gmane DOT org X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 I'm having a problem running a windows gui app with arguments from a mounted directory if the Win32Path mounted to contains blanks. (i.e. mount -s -b "C:/foo bar" "/foobar"). It's not a mount specific problem because it also occurs if the directory has a space in it. Since mkpasswd defaulted my home directory to "/cygdrive/c/Documents and Settings/cygusr", I am assuming Cygwin supports directories with spaces in them. I have included a small program that illustrates the bug. By the way, I'm running on XP with the latest version of Cygwin newly installed. Also, according to the "Cygwin Users Guide", I have included the following line in the code. WinMainCRTStartup() { mainCRTStartup(); } It doesnt seem to be called. Is the User Guide correct? The same problem occurs if I omit the line and use the "-e _mainCRTStartup" as suggested in the User Guide. Any suggestions? BB. Assuming the program listed below (prtcmdline.exe) is in "/cygdrive/c/Documents and Settings/cygusr"... $ cd ~ $ pwd /cygdrive/c/Documents and Settings/cygusr $ ./prtcmdline arg1 arg2 | tail - default and Settings\cygusr\prtcmdline.exe" arg1 arg2 << wrong $ cp prtcmdline.exe /home/cygusr $ /home/cygusr/prtcmdline arg1 arg2 | tail - default arg1 arg2 < #include char *gstr = "default\r"; WinMainCRTStartup() { gstr = "WinMainCRTStartup() called\r"; mainCRTStartup(); } int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { puts(gstr); puts(lpCmdLine); return 0; } /****************************************************/ -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/