VirtualBox

source: vbox/trunk/src/VBox/Runtime/r0drv/nt/symdb.h@ 62448

Last change on this file since 62448 was 56290, checked in by vboxsync, 9 years ago

IPRT: Updated (C) year.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.8 KB
Line 
1/* $Id: symdb.h 56290 2015-06-09 14:01:31Z vboxsync $ */
2/** @file
3 * IPRT - Internal Header for the NT Ring-0 Driver Symbol DB.
4 */
5
6/*
7 * Copyright (C) 2013-2015 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 *
17 * The contents of this file may alternatively be used under the terms
18 * of the Common Development and Distribution License Version 1.0
19 * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
20 * VirtualBox OSE distribution, in which case the provisions of the
21 * CDDL are applicable instead of those of the GPL.
22 *
23 * You may elect to license modified versions of this file under the
24 * terms and conditions of either the GPL or the CDDL or both.
25 */
26
27#ifndef ___internal_r0drv_nt_symdb_h
28#define ___internal_r0drv_nt_symdb_h
29
30#include <iprt/types.h>
31
32
33/**
34 * NT Version info.
35 */
36typedef struct RTNTSDBOSVER
37{
38 /** The major version number. */
39 uint8_t uMajorVer;
40 /** The minor version number. */
41 uint8_t uMinorVer;
42 /** Set if checked build, clear if free (retail) build. */
43 uint8_t fChecked : 1;
44 /** Set if multi processor kernel. */
45 uint8_t fSmp : 1;
46 /** The service pack number. */
47 uint8_t uCsdNo : 6;
48 /** The build number. */
49 uint32_t uBuildNo;
50} RTNTSDBOSVER;
51/** Pointer to NT version info. */
52typedef RTNTSDBOSVER *PRTNTSDBOSVER;
53/** Pointer to const NT version info. */
54typedef RTNTSDBOSVER const *PCRTNTSDBOSVER;
55
56
57/**
58 * Compare NT OS version structures.
59 *
60 * @retval 0 if equal
61 * @retval 1 if @a pInfo1 is newer/greater than @a pInfo2
62 * @retval -1 if @a pInfo1 is older/less than @a pInfo2
63 *
64 * @param pInfo1 The first version info structure.
65 * @param pInfo2 The second version info structure.
66 */
67DECLINLINE(int) rtNtOsVerInfoCompare(PCRTNTSDBOSVER pInfo1, PCRTNTSDBOSVER pInfo2)
68{
69 if (pInfo1->uMajorVer != pInfo2->uMajorVer)
70 return pInfo1->uMajorVer > pInfo2->uMajorVer ? 1 : -1;
71 if (pInfo1->uMinorVer != pInfo2->uMinorVer)
72 return pInfo1->uMinorVer > pInfo2->uMinorVer ? 1 : -1;
73 if (pInfo1->uBuildNo != pInfo2->uBuildNo)
74 return pInfo1->uBuildNo > pInfo2->uBuildNo ? 1 : -1;
75 if (pInfo1->uCsdNo != pInfo2->uCsdNo)
76 return pInfo1->uCsdNo > pInfo2->uCsdNo ? 1 : -1;
77 if (pInfo1->fSmp != pInfo2->fSmp)
78 return pInfo1->fSmp > pInfo2->fSmp ? 1 : -1;
79 if (pInfo1->fChecked != pInfo2->fChecked)
80 return pInfo1->fChecked > pInfo2->fChecked ? 1 : -1;
81 return 0;
82}
83
84#endif
85
Note: See TracBrowser for help on using the repository browser.

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