This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Windows API calls that don't work? (Was RE: Stupid stupi

Text item: 

     I just tried Smith's code under WinNT 4.0 using GNU-Win32 with no 
     source modifications.
     It compiled and ran properly with commented out code.  However, it 
     failed as he described with the code included.
     I also compiled it under VC++ 5.0 (though I had to change STDCALL to 
     WINAPI).  It worked fine in all cases.  The modified sample program 
     still wouldn't work when compiled with GCC.
> Are you using a completely vanilla version of GNU-Win32 or have you 
made changes to things (like the startup code for example)? Could you 
send me a copy of your silently failing binary?
     Out of the box GNU-Win32.  I'll send you a mime encoded version of my 
     gcc generated exe.  It's a little large to send to the mailing list.
> PS. Any confirmations on that statement about NT from other readers?
    Does stripping an executable make it work? Do you *have* to strip 
    on NT? Is there a difference between the -s link option and using 
    strip after linking?

     I tried the following commands:
        strip test.exe
        strip test.exe -o tests.exe
     Neither cases made any difference.
     Running the program from BASH under NTEmacs produces the 
     following stack dump:
     //f/pgming/cygtest$ ./test
     (test.exe 1279) In cygwin_except_handler
     (test.exe 1279) Exception trapped!
     (test.exe 1279) exception C0000005 at 4194
     (test.exe 1279) exception: ax 0 bx 240FB00 cx 240FDFC dx A00115C
     (test.exe 1279) exception: si 5 di 100113BF bp 240F258 sp 240F24C
     (test.exe 1279) exception is: STATUS_ACCESS_VIOLATION
     (test.exe 1279) Stack trace:
     (test.exe 1279) frame 0: sp = 0x240F080, pc = 0x1001282A
     (test.exe 1279) frame 1: sp = 0x240F09C, pc = 0x77F94072
     (test.exe 1279) frame 2: sp = 0x240F0C0, pc = 0x77F88A53
     (test.exe 1279) frame 3: sp = 0x240F14C, pc = 0x77F75E82
     (test.exe 1279) frame 4: sp = 0x240F258, pc = 0x10011BEB
     (test.exe 1279) frame 5: sp = 0x240FF9C, pc = 0x10011BFF
     (test.exe 1279) frame 6: sp = 0x240FFA8, pc = 0x4011B0
     (test.exe 1279) frame 7: sp = 0x240FFB8, pc = 0x401012
     (test.exe 1279) frame 8: sp = 0x240FFC0, pc = 0x77F1AFC1
     (test.exe 1279) frame 9: sp = 0x240FFF0, pc = 0x0
     (test.exe 1279) End of stack trace
     I compiled with symbols "-O -g" with gcc, then using GDB I set a brake 
     point on GetTopWindow().  The access violation was generated before it 
     got to the break point.
     BTW: DRS chill.  Phill is just trying to help.

Text item: External Message Header

The following mail header is for administrative use
and may be ignored unless there are problems.


Precedence: bulk
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Date: Mon, 24 Mar 1997 15:52:54 +0900
Subject: Windows API calls that don't work? (Was RE: Stupid stupid question :/)
Cc: "'GNU-Win32'" <>
To: "'A. Phillip Smith'" <>
From: Colin Peters <>
Message-ID: <01BC386B.709FACA0@gbird0>
Received: by gbird0 with Microsoft Mail
     id <01BC386B.709FACA0@gbird0>; Mon, 24 Mar 1997 15:52:56 +0900
Received: from gbird0 ([]) by (8.8.2/3.3W7-
bird) with SMTP id PAA10839; Mon, 24 Mar 1997 15:53:11 +0900 (JST)
Received: from ( [])

     by (8.8.5/8.8.5) with ESMTP id WAA08904
     for <>; Sun, 23 Mar 1997 22:54:42 -0800 (PST)
Received: (from daemon@localhost)
     by (8.8.5/8.8.5) id WAA08913
     for gnu-win32-outgoing; Sun, 23 Mar 1997 22:54:59 -0800 (PST)
Received: from ( []) by
(8.8.5/8.7.3) with ESMTP id GAA20943; Mon, 24 Mar 1997 06:25:38 -0800 (PST)
Received: from ( []) by re (8.7.6/8.7.3) with ESMTP id GAA06921; Mon, 24 Mar 1997 06:23:18
 -0800 (PST)
For help on using this list, send a message to
"" with one line of text: "help".

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]