Determine OS version at run-time

Hi,

How can I determine OS version during run-time?
I know RtlIsNtDdiVersionAvailable can be used but it is available only from vista and I would like to have this information on XP as well. Is there any other simpler way to obtain this information?

Thanks

Hi,

Does RtlGetVersion solve your problem?

Regards,

Fernando Roberto da Silva
DriverEntry Kernel Development

Your statement that RtlIsNtDdiVersionAvailable is only available from Vista is erroneous. http://msdn.microsoft.com/en-us/library/windows/hardware/ff561954(v=vs.85).aspx

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@hotmail.com
Sent: Friday, March 01, 2013 11:16 AM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] Determine OS version at run-time

Hi,

How can I determine OS version during run-time?
I know RtlIsNtDdiVersionAvailable can be used but it is available only from vista and I would like to have this information on XP as well. Is there any other simpler way to obtain this information?

Thanks


NTFSD is sponsored by OSR

OSR is hiring!! Info at http://www.osr.com/careers

For our schedule of debugging and file system seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

I saw you can use their static lib as well.

From MSDN:
"The Windows kernel implements RtlIsNtDdiVersionAvailable only in Windows Vista and later versions of Windows. However, a compatibility library, Rtlver.lib, implements a version of RtlIsNtDdiVersionAvailable that runs in Windows 2000 and later versions of Windows. For kernel-mode drivers that include the Wdm.h header file, calls to RtlIsNtDdiVersionAvailable go to the version of this routine that is implemented in Rtlver.lib."

Regards,

Fernando Roberto da Silva
DriverEntry Kernel Development