[vlc-devel] [PATCH]Replace GetVersion by GetVersionEx
geo.couprie at gmail.com
Wed Jun 4 21:11:58 CEST 2008
On Wed, Jun 4, 2008 at 8:47 PM, Rémi Denis-Courmont
<rdenis at simphalempin.com> wrote:
> Le mercredi 4 juin 2008 21:27:23 Geoffroy Couprie, vous avez écrit :
>> With all my workarounds to build a Windows CE version of VLC, I find
>> some code that could be used in Windows CE and the other Windows.
>> Could you please review this patch? I think it should be in the master
>> repository instead of my gsoc repo.
> By the way, this patch looks horribly wrong. It breaks forward compatibility
> with future non-NT Windows version.
That's why I asked for review :)
For the forward compatibility, that's not really a problem, the
VER_PLATFORM_* are incremented with each new version:
VER_PLATFORM_WIN32s = 0 (3.1)
VER_PLATFORM_WIN32_WINDOWS = 1 (95 or 98)
VER_PLATFORM_WIN32_NT = 2 (NT and higher)
VER_PLATFORM_WIN32_CE = 3 (embedded)
So with a >1 test that would be the same as the previous code.
For the backward compatibility, it seems it will work for 95, it is
part of the win32 and there are parts that didn't change much since
this old version. And the function recognize 95 :)
I propose this because it seems more readable that "if( GetVersion() <
0x80000000 )", but that's just an idea.
This patch needs also some factorizations, I'll do it if the idea is accepted.
More information about the vlc-devel