VirtualBox

Changeset 76073 in vbox for trunk


Ignore:
Timestamp:
Dec 8, 2018 7:55:23 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
127314
Message:

IPRT: Added RTSystemGetNtVersion.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/system.h

    r71295 r76073  
    268268RTDECL(uint32_t) RTSystemGetNtBuildNo(void);
    269269
     270/** Makes an NT version for comparison with RTSystemGetNtVersion(). */
     271# define RTSYSTEM_MAKE_NT_VERSION(a_uMajor, a_uMinor, a_uBuild) \
     272    ( ((uint64_t)(a_uMajor) << 52) | ((uint64_t)((a_uMinor) & 0xfffU) << 40) | ((uint32_t)(a_uBuild)) )
     273
     274/**
     275 * Get the Windows NT version number.
     276 *
     277 * @returns Version formatted using RTSYSTEM_MAKE_NT_VERSION().
     278 *
     279 * @remarks Windows NT only.  Requires IPRT to be initialized.
     280 */
     281RTDECL(uint32_t) RTSystemGetNtVersion(void);
     282
    270283#endif /* RT_OS_WINDOWS */
    271284
  • trunk/src/VBox/Runtime/r3/win/RTSystemQueryOSInfo-win.cpp

    r71294 r76073  
    347347}
    348348
     349
     350RTDECL(uint32_t) RTSystemGetNtVersion(void)
     351{
     352    return RTSYSTEM_MAKE_NT_VERSION(g_WinOsInfoEx.dwMajorVersion, g_WinOsInfoEx.dwMinorVersion, g_WinOsInfoEx.dwBuildNumber);
     353}
     354
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette