
Signature
English is not my first, or second, language
so anything strange, or insulting, is due to
the translation.
Please correct me so I may improve my English!
Thank you for your replies Anders.
Actually Anders I am using managed code or at least I am using managed code
in my application.
So, surely I have to declare the structure, don't I?
Basically, I am using the DLLIMPORT Attribute so maybe I can declare the
GetVersionEx in that way. Is that correct?
Awaiting a reponse,

Signature
Newbie Coder
(It's just a name)
> >> I need to check to see that the user is using Windows 2000 or later on
> >> program startup. If not, to disable one radiobutton
[quoted text clipped - 19 lines]
>
> // Anders
Ben Voigt - 07 Mar 2007 22:27 GMT
> Thank you for your replies Anders.
>
[quoted text clipped - 6 lines]
> Basically, I am using the DLLIMPORT Attribute so maybe I can declare the
> GetVersionEx in that way. Is that correct?
From C++, you can just #include <windows.h> just like a native program.
Only C# has to mess with DllImport.
> Awaiting a reponse,
>
[quoted text clipped - 22 lines]
>>
>> // Anders
Willy Denoyette [MVP] - 07 Mar 2007 23:43 GMT
> Thank you for your replies Anders.
>
[quoted text clipped - 7 lines]
>
> Awaiting a reponse,
No need to call into native code, the FCL is your friend, take a look at the
System.Diagnostics namespace class OperatingSystem.
Willy.
Newbie Coder - 08 Mar 2007 11:01 GMT
This has now been resolved. Here's the code I used:
using namespace system;
bool Is2000OrLater()
{
OperatingSystem* osInfo = Environment::OSVersion;
PlatformID pID = osInfo->Platform;
switch(pID)
{
case PlatformID::Win32NT:
if (osInfo->Version->Major == 5 && osInfo->Version->Minor >= 0)
return true;
else
return false;
default:
return false;
}
}
Thanks for all your replies,

Signature
Newbie Coder
(It's just a name)