Originally Posted by
Steve A.
True.
I have SDKs for 2003,..,2008 and they are pretty much the same, except where they are noted.
I too am using XP.
That's it... all you do is check which OS versions a given API call is supported on and it's all good.
If you are forced to do something where you have to specify "Minimum Operating System" requirements it's easy enough to test for them...
The following tests for XP-SP2....
Code:
// handle versioning
VOID CheckWindowsVersion(void)
{ OSVERSIONINFOEX os = {0}; // version information
DWORDLONG cm = 0; // conditioning value
// precondition struct
os.dwOSVersionInfoSize = sizeof(os);
os.dwMajorVersion = 5;
os.dwMinorVersion = 1;
os.wServicePackMajor = 2;
// condition the results
VER_SET_CONDITION(cm,VER_MAJORVERSION,VER_GREATER_EQUAL);
VER_SET_CONDITION(cm,VER_MINORVERSION,VER_GREATER_EQUAL);
VER_SET_CONDITION(cm,VER_SERVICEPACKMAJOR,VER_GREATER_EQUAL);
// exit on older versions
if (!VerifyVersionInfo(&os,VER_MAJORVERSION | VER_MINORVERSION |
VER_SERVICEPACKMAJOR,cm))
ReportError(20020,TRUE); }