2012/3/22 Jim Michaels <[email protected]>:
> code which used to work now no longer works.  this mailing list once told me
> to no longer use OSVERSIONINFOEX but instead use OSVERSIONINFOEXA.
> well, I have code which looks like below, and the dots version number
> doesn't even print.
> so what's going on?
> I am using 4.7.0 20111127, which is the only compiler which works, and
> apparently was removed from the auto builds. (Why?)

I tested your code with a recent 4.7.0 gcc based toolchain for 32-bit
and 64-bit and it works without flaws.  The version of gcc you are
using is pretty old and still had a lot of bugs,  so I would recomment
to use a more recent version.

Your code on 64-bit shows for me:

$ x86_64-w64-mingw32-gcc -o t.exe t_mich1.c

ktietz@neptun ~/test/mingw
$ ./t.exe
dwPlatformId.dwMajorVersion.dwMinorVersion.dwBuildNumber=2.6.1.7601
wServicePackMajor.wServicePackMinor=1.0
szCSDVersion="Service Pack 1"
wProductType=VER_NT_WORKSTATION=1
wReserved=0
wSuiteMask=0x300
wSuiteMask&VER_SUITE_PERSONAL 0x200
wSuiteMask&VER_SUITE_SINGLEUSERTS 0x100
1=GetSystemMetrics(SM_MEDIACENTER)
0=GetSystemMetrics(SM_STARTER)
0=GetSystemMetrics(SM_TABLETPC)
0=GetSystemMetrics(SM_SERVERR2)

For 32-bit it shows:

$ i686-w64-mingw32-gcc -o t.exe t_mich1.c

ktietz@neptun ~/test/mingw
$ ./t.exe
dwPlatformId.dwMajorVersion.dwMinorVersion.dwBuildNumber=2.6.1.7601
wServicePackMajor.wServicePackMinor=1.0
szCSDVersion="Service Pack 1"
wProductType=VER_NT_WORKSTATION=1
wReserved=0
wSuiteMask=0x300
wSuiteMask&VER_SUITE_PERSONAL 0x200
wSuiteMask&VER_SUITE_SINGLEUSERTS 0x100
1=GetSystemMetrics(SM_MEDIACENTER)
0=GetSystemMetrics(SM_STARTER)
0=GetSystemMetrics(SM_TABLETPC)
0=GetSystemMetrics(SM_SERVERR2)

I don't get why you shouldn't use OSVERSIONINFOEX.  For Ascii mode it
is an alias of OSVERSIONINFOEXA and for wide-character mode it is an
alias of OSVERSIONINFOEXW.

Regards,
Kai

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to