How does it work?

MagNumDB is a database that contains about 350,000 items. These items are constants, names, values all extracted from more than 6,000 header files (.h, .hxx, .hpp, .idl, etc.) provided by standard Windows and Visual Studio SDKs and WDKs.

Some values have been extracted from the very special uuid.lib file that contains the value of thousands of guids and property keys, not present anywhere else in header files. This can explain some duplicates (because names in uuid.lib are not always exactly the same as names in .h parsed files...).

It also contains around 36,0000 undocumented guids that we found ... meeeeep ...

 "C2P5"

To build this database, we have tried many existing parsers, things like CLANG or other fine tools, but they just don't suit our needs. They can't handle thousands of files that don't compile together, they can't handle some specific (or just very old) Microsoft constructs or annotations, they don't remember the stack of #define directives that led to a definition, they only give you a final AST, not a partial one, etc.

So, in the end, we have written a C/C++ parser named C2P5 (for C/CPP/PreProcessor/Parser), tailored specifically for computing constants. C2P5 is capable of preprocessing, parsing and partially evaluating all header files as if they were included in a one big virtual project (that of course, does not compile) on a 32G RAM machine. It currently supports the following preprocessor and C/C++ constructs:

  • #define preprocessor that define constants
  • #define preprocessor that define expression to compute constants
  • C and C++ constants, strings and enum definitions, and some level of pointerness
  • Special GUID constructs like DECLSPEC_UUID, DEFINE_GUIDSTRUCT, MIDL_INTERFACE, you name it
  • PROPERTYKEY constructs
  • Some IDL constructs
  • Etc.

The parser remembers dynamic preprocessor definitions (#if, #ifdef, etc.) that are conditions for constants definitions and expression computation. All parsed items are saved in the database, as well as the associated conditions. There may be more than one item corresponding to a given name, if there are differences in their associated conditions stack.

C2P5 supports the following types of constants, regardless of the way they are defined in source files:

  • integer, signed or unsigned, from 8-bit to 128-bit
  • floating point number, single (32-bit) or double (64-bit)
  • globally unique identifier, or guid, uuid, CLSID, IID, etc.
  • string, in narrow, wide, or utf-8/16/32 formats
  • character, in narrow, wide, or utf-8/16/32 formats
  • pointer, a constant cast as a pointer
  • property key, or PROPERTYKEY, or PKEY, a combination of a guid (fmtid) and a 32-bit integer (id).

 Powered by

C2P5 and this MagNumDB web site are written in C# and use a Lucene database as a full-text search engine. C2P5 uses a custom ANTLR4cs C grammar for expression parsing, not for preprocessor parsing.

 

 Frequently Asked Questions

  • Q: Can I run custom queries?
    A: Yes. You can use Lucene's query syntax. Note the Database is case insensitive. Check out the list of columns with their corresponding database column names:

    • Index: the item's index.
    • Name: the item's name, or title. For enum values, it's prefixed with the enum's name.
      Corresponding database field: title.
    • Type: the item's type, expressed in a specific, universal system.
      Corresponding database's field: valuetype, but use the value of the Storage type column for queries on items type.
    • Value: the item's value. For string values, it's displayed as is w/o quotes nor escaping.
      Corresponding database field: value. There is also a typedvalue field that can contain database's Int32, Int64, Float, Double or String typed values.
    • Hex Value: the item's hexadecimal value, only valid for integer types.
      There is no corresponding database field.
    • Signed Value: the item's signed value, only valid for integer and double types. Useful when you found a unsigned number and want to get the corresponding signed value (uint -> int for example).
      There is no corresponding database field.
    • Source lines(s): the source lines from which the item was extracted. Comments and characters such as TAB, CR are preserved.
      Corresponding database field: source.
    • File path: the file path from which the item was extracted, terminated by the line index.
      Corresponding database field: filepath. There are also directory and filename fields. filename is useful to query for values in a given file.
    • Score: Database's score value. Items are returned sorted by score.
    • Guid formats: a utility columns that proposes all possible guid formats. Only valid for guid types.
      There is no corresponding database field
    • Char type: the character encoding (narrow, wide, etc.). Only valid for char and string values.
      Corresponding database field: chartype.
    • Storage type: the exact storage type in the database. Only used for specific queries.
      Corresponding database field: valuetype.
    • Conditions: the list of preprocessor conditions for a given item. If a condition is surrounded with a REVERSE function, it means the reverse condition of what's surrounded was the condition.
      Corresponding database field: conditions. There may be multiple conditions fields for one item.

    Some important points to note:

    • If you search for a negative number (like error codes expressed using signed integers), you can surround the search with double quotes, for example searching for "-2147009290" is equivalent to searching for 0x80073CF6, 80073CF6 (or even 3CF6 in this specific case). If you don't surround negative numbers with double quotes, the system will search for signed and unsigned corresponding values.
    • The full-text search uses items' name, value, hex value, guid formats, source lines, etc. so refine your search if you get back too many items.
    • You can search for guid binary values using just a part of their full definition. For example, if you search for '79eac9c5', it will get you 3 guid entries
    • Leading wild card search (*whatever) is allowed, but it may slow down the search significantly.

    Here are some example or custom queries:

    title:wm_user returns the WM_USER Windows message item, not all items that reference the WM_USER token.

    title:wm_u* returns all items (Windows messages probably) whose name starts with WM_U*.

    value:1024 AND title:wm_* returns all items (Windows messages probably) whose name starts with WM_U* and value is 1024. Note AND must be UPPERCASE for database to understand it as an AND operator.

    value:"00000002-0000-0000-C000-000000000046" returns the IMalloc IID guid value.

  • Q: I always get back 400 items at most. Why?
    A: The MagNumDb site currently limits the number of returned items to this value by design. This should be enough for most real search scenarios (like enums with a big list of values).

  • Q: Some values are empty. Why?
    A: The expression evaluator cannot always compute the final value, because it sometimes require contextual information (custom defines, compiler architecture, etc.) that the parser doesn't have at parsing time. You can enable the Source line(s) column to check what's the corresponding source and try to work it out by yourself. The origin file path and line number is also included.

  • Q: Can I get all values for a given enum?
    A: Sure. For example, __VSHPROPID is the name of an enum, and a query like this: parent:__VSHPROPID will get all the enum's values (66 entries).

  • Q: I sometimes get back items whose name starts with "__magnumdb__enum_". Why?
    A: C allows unnamed enums. The MagNumDb parser just gives them a name, using the defining file name and a counter.

  • Q: I sometimes get back the same item/name twice or more with different values. For example:  TARGET_IS_NT60_OR_LATER. Why?
    A: This can be the case with defines. Their value may be different if they were surrounded by # directives (#if, #else, etc.) in the original source code. You can enable the Condition(s) column to check what are the corresponding conditions for a given item.
    Note: if a condition is surrounded with a funny REVERSE function token, it means the reverse condition of what's surrounded.

 Database Metrics

  • Last update date: Thursday August 29, 2019
  • Items count: 350276
  • Parsed files count: 7563
  • Windows SDK version: 10.0.18362.0
  • NetFx SDK version: 4.8
  • MSVC Tools version: 14.22.27905

 

 Contact

We welcome feedback.
Seen anything missing? A bug? A wrong value? Do you have any suggestion for improvements? Do you have an idea for a cool new feature?

Please contact us here

 About MagNumDB

MagNumDB  2017-2019 Simon Mourier V1.3.1. All rights reserved.

Profile for Simon Mourier at Stack Overflow, Q&A for professional and enthusiast programmers


All product names, logos, and brands are property of their respective owners. All company, product and service names used in this website are for identification purposes only.

All values, names, source code fragments displayed here have been extracted from files that are property of their respective owners.

THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND OTHER THAN AS SPECIFICALLY SET FORTH IN THE LICENSE AGREEMENT, INCLUDING WITHOUT LIMITATION WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Index Score Name Type Value Hex value Signed value Guid formats Char type Storage type Source line(s) File path Condition(s)
Index Score Name Type Value Hex value Signed value Guid formats Char type Storage type Source line(s) File path Condition(s)
1 5.830389 wszCERTMANAGE_SUFFIX String Manage Narrow System.TypedString
#define wszCERTMANAGE_SUFFIX TEXT("Manage")
%ProgramFiles(x86)%\Windows Kits\10\Include\10.0.18362.0\um\CertSrv.h(728,0)
  • If !defined( _CERTSRV_H_ )
  • If WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
2 5.830389 SupportedWebAccountActions::Manage Int32 8 0x00000008 8 System.Int32
Manage      = 0x8,
%ProgramFiles(x86)%\Windows Kits\10\Include\10.0.18362.0\winrt\windows.ui.applicationsettings.idl(222,0)
3 5.830389 WebAccountAction::Manage Int32 3 0x00000003 3 System.Int32
Manage      = 3,
%ProgramFiles(x86)%\Windows Kits\10\Include\10.0.18362.0\winrt\windows.ui.applicationsettings.idl(232,0)
4 5.830389 Symbol::Manage Int32 57720 0x0000E178 -7816 System.Int32
Manage                 = 57720,
%ProgramFiles(x86)%\Windows Kits\10\Include\10.0.18362.0\winrt\windows.ui.xaml.controls.idl(4060,0)
5 4.122708 __magnumdb__enum_msodm_h_13::msodmicleManage Int32 37 0x00000025 37 System.Int32
msodmicleManage,				// Manage webdrives
%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Professional\VSSDK\VisualStudioIntegration\Common\Inc\office10\msodm.h(375,0)
6 3.43559 RESTRICTIONS::REST_NOMANAGEMYCOMPUTERVERB Int32 1073741884 0x4000003C 1073741884 System.Int32
REST_NOMANAGEMYCOMPUTERVERB     = 0x4000003C,   // No Manage verb on My Computer
%ProgramFiles(x86)%\Windows Kits\10\Include\10.0.18362.0\um\shlobj_core.h(2567,0)
  • If WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
7 2.748472 SDDL_NETWORK_CONFIGURATION_OPS String NO Narrow System.TypedString
#define SDDL_NETWORK_CONFIGURATION_OPS      TEXT("NO")      // Network configuration operators ( to manage configuration of networking features)
%ProgramFiles(x86)%\Windows Kits\10\Include\10.0.18362.0\shared\sddl.h(186,0)
  • If WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
8 2.748472 SupportedWebAccountActions Enum
enum SupportedWebAccountActions
            {
                None        = 0x0,
                Reconnect   = 0x1,
                Remove      = 0x2,
                ViewDetails = 0x4,
                Manage      = 0x8,
                More        = 0x10
            };
%ProgramFiles(x86)%\Windows Kits\10\Include\10.0.18362.0\winrt\windows.ui.applicationsettings.idl(216,0)
9 2.748472 WebAccountAction Enum
enum WebAccountAction
            {
                Reconnect   = 0,
                Remove      = 1,
                ViewDetails = 2,
                Manage      = 3,
                More        = 4
            };
%ProgramFiles(x86)%\Windows Kits\10\Include\10.0.18362.0\winrt\windows.ui.applicationsettings.idl(227,0)
10 2.404913 E_DAO_REPCantSetExchange UInt32 2148142508 0x800A0DAC -2146824788 System.UInt32
#define E_DAO_REPCantSetExchange			DBDAOERR(3500) //You cannot specify two different Synchronizers to manage the same replica.
%ProgramFiles(x86)%\Windows Kits\10\Include\10.0.18362.0\um\dbdaoerr.h(530,0)
  • If WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
11 2.061354 KnownGamingPrivileges::XPRIVILEGE_CLOUD_GAMING_MANAGE_SESSION Int32 207 0x000000CF -49 System.Int32
XPRIVILEGE_CLOUD_GAMING_MANAGE_SESSION = 207,   // The user can allocate a cloud compute cluster and manage a cloud compute cluster for a hosted game session if this privilege is present
%ProgramFiles(x86)%\Windows Kits\10\Include\10.0.18362.0\um\gamingtcui.h(128,0)
  • If NTDDI_VERSION >= NTDDI_THRESHOLD
12 0.8588975 __magnumdb__enum_msodm_h_13 Enum
enum
	{
	msodmicleOpenDefault = 0,	// Perform default button action (Open/Save)
	msodmicleOpenRO,				// Open read only from the command button
	msodmicleOpenAsCopy,			// Open As Copy from the command button
	msodmicleSorting,				// Sorting command list entry
	msodmicleIncludeSubfolders,		// Include Subfolders command list entry
	msodmicleShowGroups,			// Show Groups command list entry
	msodmicleFtpSites,			// Open the FTP sites control dlg
	msodmicleToggleFuzzy,		// Toggle fuzzy find on/off (FOR DBCS)
	msodmicleOpenInBrowser,		// Launch in default browser
	msodmicleOpenInNativeApp,	// Open the file in native app of dialog
	msodmicleFind,				// Bring up the Find dialog
	msodmicleDelete,			// Delete file
	msodmicleRename,				// Rename file in place
	msodmiclePrint,					// Print from the command button
	msodmicleAddToFavs,				// Add to Favorites
	msodmicleAddToPlaces,			// Add to My Places
	msodmicleMapNetworkDrive,		// Map Network Drive command list entry
	msodmicleProperties,			// Properties command list entry

	msodmicleAppToolsFirst,
	msodmicleAppTools1 = msodmicleAppToolsFirst,
	msodmicleAppTools2,
	msodmicleAppTools3,
	msodmicleAppTools4,
	msodmicleAppTools5,
	msodmicleAppTools6,
	msodmicleAppTools7,
	msodmicleAppTools8,
	msodmicleAppTools9,
	msodmicleAppToolsLast = msodmicleAppTools9,

	msodmicleAppOpenDropdnFirst,
	msodmicleAppOpenDropdn1 = msodmicleAppOpenDropdnFirst,
	msodmicleAppOpenDropdn2,
	msodmicleAppOpenDropdn3,
	msodmicleAppOpenDropdn4,
	msodmicleAppOpenDropdn5,
	msodmicleAppOpenDropdn6,
	msodmicleAppOpenDropdn7,
	msodmicleAppOpenDropdn8,
	msodmicleAppOpenDropdn9,
	msodmicleAppOpenDropdnLast = msodmicleAppOpenDropdn9,

	msodmicleClearHistory,			// Clear the shortcuts in History Folder
	msodmicleManage,				// Manage webdrives

	msodmicleMax
	};
%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Professional\VSSDK\VisualStudioIntegration\Common\Inc\office10\msodm.h(327,0)
13 0.6012282 KnownGamingPrivileges Enum
typedef enum KnownGamingPrivileges{
    XPRIVILEGE_BROADCAST = 190,                     // The user can broadcast live gameplay
    XPRIVILEGE_VIEW_FRIENDS_LIST = 197,             // The user can view other user's friends list if this privilege is present
    XPRIVILEGE_GAME_DVR = 198,                      // The user can upload recorded in-game videos to the cloud if this privilege is present. Viewing GameDVRs is subject to privacy controls.
    XPRIVILEGE_SHARE_KINECT_CONTENT = 199,          // Kinect recorded content can be uploaded to the cloud for the user and made accessible to anyone if this privilege is present. Viewing other user's Kinect content is subject to a privacy setting.
    XPRIVILEGE_MULTIPLAYER_PARTIES = 203,           // The user can join a party session if this privilege is present
    XPRIVILEGE_COMMUNICATION_VOICE_INGAME = 205,    // The user can participate in voice chat during parties and multiplayer game sessions if this privilege is present. Communicating with other users is subject to additional privacy permission checks
    XPRIVILEGE_COMMUNICATION_VOICE_SKYPE = 206,     // The user can use voice communication with Skype on Xbox One if this privilege is present
    XPRIVILEGE_CLOUD_GAMING_MANAGE_SESSION = 207,   // The user can allocate a cloud compute cluster and manage a cloud compute cluster for a hosted game session if this privilege is present
    XPRIVILEGE_CLOUD_GAMING_JOIN_SESSION = 208,     // The user can join a cloud compute session if this privilege is present
    XPRIVILEGE_CLOUD_SAVED_GAMES = 209,             // The user can save games in cloud title storage if this privilege is present
    XPRIVILEGE_SHARE_CONTENT = 211,                 // The user can share content with others if this privilege is present
    XPRIVILEGE_PREMIUM_CONTENT = 214,               // The user can purchase, download and launch premium content available with the Xbox LIVE Gold subscription if this privilege is present
    XPRIVILEGE_SUBSCRIPTION_CONTENT = 219,          // The user can purchase and download premium subscription content and use premium subscription features when this privilege is present
    XPRIVILEGE_SOCIAL_NETWORK_SHARING = 220,        // The user is allowed to share progress information on social networks when this privilege is present
    XPRIVILEGE_PREMIUM_VIDEO = 224,                 // The user can access premium video services if this privilege is present
    XPRIVILEGE_VIDEO_COMMUNICATIONS = 235,          // The user can use video communication with Skype or other providers when this privilege is present. Communicating with other users is subject to additional privacy permission checks
    XPRIVILEGE_PURCHASE_CONTENT = 245,              // The user is authorized to purchase content when this privilege is present
    XPRIVILEGE_USER_CREATED_CONTENT = 247,          // The user is authorized to download and view online user created content when this privilege is present.
    XPRIVILEGE_PROFILE_VIEWING = 249,               // The user is authorized to view other user's profiles when this privilege is present. Viewing other user's profiles is subject to additional privacy checks
    XPRIVILEGE_COMMUNICATIONS = 252,                // The user can use asynchronous text messaging with anyone when this privilege is present. Extra privacy permissions checks are required to determine who the user is authorized to communicate with. Communicating with other users is subject to additional privacy permission checks
    XPRIVILEGE_MULTIPLAYER_SESSIONS = 254,          // The user can join a multiplayer sessions for a game when this privilege is present.
    XPRIVILEGE_ADD_FRIEND = 255,                    // The user can follow other Xbox LIVE users and add Xbox LIVE friends when this privilege is present
} KnownGamingPrivileges;
%ProgramFiles(x86)%\Windows Kits\10\Include\10.0.18362.0\um\gamingtcui.h(120,0)
  • If NTDDI_VERSION >= NTDDI_THRESHOLD
14 0.5153385 Symbol Enum
enum Symbol
                {
                    Previous               = 57600,
                    Next                   = 57601,
                    Play                   = 57602,
                    Pause                  = 57603,
                    Edit                   = 57604,
                    Save                   = 57605,
                    Clear                  = 57606,
                    Delete                 = 57607,
                    Remove                 = 57608,
                    Add                    = 57609,
                    Cancel                 = 57610,
                    Accept                 = 57611,
                    More                   = 57612,
                    Redo                   = 57613,
                    Undo                   = 57614,
                    Home                   = 57615,
                    Up                     = 57616,
                    Forward                = 57617,
                    Back                   = 57618,
                    Favorite               = 57619,
                    Camera                 = 57620,
                    Setting                = 57621,
                    Video                  = 57622,
                    Sync                   = 57623,
                    Download               = 57624,
                    Mail                   = 57625,
                    Find                   = 57626,
                    Help                   = 57627,
                    Upload                 = 57628,
                    Emoji                  = 57629,
                    TwoPage                = 57630,
                    LeaveChat              = 57631,
                    MailForward            = 57632,
                    Clock                  = 57633,
                    Send                   = 57634,
                    Crop                   = 57635,
                    RotateCamera           = 57636,
                    People                 = 57637,
                    OpenPane               = 57638,
                    ClosePane              = 57639,
                    World                  = 57640,
                    Flag                   = 57641,
                    PreviewLink            = 57642,
                    Globe                  = 57643,
                    Trim                   = 57644,
                    AttachCamera           = 57645,
                    ZoomIn                 = 57646,
                    Bookmarks              = 57647,
                    Document               = 57648,
                    ProtectedDocument      = 57649,
                    Page                   = 57650,
                    Bullets                = 57651,
                    Comment                = 57652,
                    MailFilled             = 57653,
                    ContactInfo            = 57654,
                    HangUp                 = 57655,
                    ViewAll                = 57656,
                    MapPin                 = 57657,
                    Phone                  = 57658,
                    VideoChat              = 57659,
                    Switch                 = 57660,
                    Contact                = 57661,
                    Rename                 = 57662,
                    Pin                    = 57665,
                    MusicInfo              = 57666,
                    Go                     = 57667,
                    Keyboard               = 57668,
                    DockLeft               = 57669,
                    DockRight              = 57670,
                    DockBottom             = 57671,
                    Remote                 = 57672,
                    Refresh                = 57673,
                    Rotate                 = 57674,
                    Shuffle                = 57675,
                    List                   = 57676,
                    Shop                   = 57677,
                    SelectAll              = 57678,
                    Orientation            = 57679,
                    Import                 = 57680,
                    ImportAll              = 57681,
                    BrowsePhotos           = 57685,
                    WebCam                 = 57686,
                    Pictures               = 57688,
                    SaveLocal              = 57689,
                    Caption                = 57690,
                    Stop                   = 57691,
                    ShowResults            = 57692,
                    Volume                 = 57693,
                    Repair                 = 57694,
                    Message                = 57695,
                    Page2                  = 57696,
                    CalendarDay            = 57697,
                    CalendarWeek           = 57698,
                    Calendar               = 57699,
                    Character              = 57700,
                    MailReplyAll           = 57701,
                    Read                   = 57702,
                    Link                   = 57703,
                    Account                = 57704,
                    ShowBcc                = 57705,
                    HideBcc                = 57706,
                    Cut                    = 57707,
                    Attach                 = 57708,
                    Paste                  = 57709,
                    Filter                 = 57710,
                    Copy                   = 57711,
                    Emoji2                 = 57712,
                    Important              = 57713,
                    MailReply              = 57714,
                    SlideShow              = 57715,
                    Sort                   = 57716,
                    Manage                 = 57720,
                    AllApps                = 57721,
                    DisconnectDrive        = 57722,
                    MapDrive               = 57723,
                    NewWindow              = 57724,
                    OpenWith               = 57725,
                    ContactPresence        = 57729,
                    Priority               = 57730,
                    GoToToday              = 57732,
                    Font                   = 57733,
                    FontColor              = 57734,
                    Contact2               = 57735,
                    Folder                 = 57736,
                    Audio                  = 57737,
                    Placeholder            = 57738,
                    View                   = 57739,
                    SetLockScreen          = 57740,
                    SetTile                = 57741,
                    ClosedCaption          = 57744,
                    StopSlideShow          = 57745,
                    Permissions            = 57746,
                    Highlight              = 57747,
                    DisableUpdates         = 57748,
                    UnFavorite             = 57749,
                    UnPin                  = 57750,
                    OpenLocal              = 57751,
                    Mute                   = 57752,
                    Italic                 = 57753,
                    Underline              = 57754,
                    Bold                   = 57755,
                    MoveToFolder           = 57756,
                    LikeDislike            = 57757,
                    Dislike                = 57758,
                    Like                   = 57759,
                    AlignRight             = 57760,
                    AlignCenter            = 57761,
                    AlignLeft              = 57762,
                    Zoom                   = 57763,
                    ZoomOut                = 57764,
                    OpenFile               = 57765,
                    OtherUser              = 57766,
                    Admin                  = 57767,
                    Street                 = 57795,
                    Map                    = 57796,
                    ClearSelection         = 57797,
                    FontDecrease           = 57798,
                    FontIncrease           = 57799,
                    FontSize               = 57800,
                    CellPhone              = 57801,
                    ReShare                = 57802,
                    Tag                    = 57803,
                    RepeatOne              = 57804,
                    RepeatAll              = 57805,
                    OutlineStar            = 57806,
                    SolidStar              = 57807,
                    Calculator             = 57808,
                    Directions             = 57809,
                    Target                 = 57810,
                    Library                = 57811,
                    PhoneBook              = 57812,
                    Memo                   = 57813,
                    Microphone             = 57814,
                    PostUpdate             = 57815,
                    BackToWindow           = 57816,
                    FullScreen             = 57817,
                    NewFolder              = 57818,
                    CalendarReply          = 57819,
                    UnSyncFolder           = 57821,
                    ReportHacked           = 57822,
                    SyncFolder             = 57823,
                    BlockContact           = 57824,
                    SwitchApps             = 57825,
                    AddFriend              = 57826,
                    TouchPointer           = 57827,
                    GoToStart              = 57828,
                    ZeroBars               = 57829,
                    OneBar                 = 57830,
                    TwoBars                = 57831,
                    ThreeBars              = 57832,
                    FourBars               = 57833,
                    Scan                   = 58004,
                    Preview                = 58005,
                    [contract(Windows.Foundation.UniversalApiContract, 5.0)]
                    GlobalNavigationButton = 59136,
                    [contract(Windows.Foundation.UniversalApiContract, 5.0)]
                    Share                  = 59181,
                    [contract(Windows.Foundation.UniversalApiContract, 5.0)]
                    Print                  = 59209,
                    [contract(Windows.Foundation.UniversalApiContract, 5.0)]
                    XboxOneConsole         = 59792
                };
%ProgramFiles(x86)%\Windows Kits\10\Include\10.0.18362.0\winrt\windows.ui.xaml.controls.idl(3947,0)
15 0.343559 RESTRICTIONS Enum
typedef enum RESTRICTIONS
{
    REST_NONE                       = 0x00000000,
    REST_NORUN                      = 0x00000001,
    REST_NOCLOSE                    = 0x00000002,
    REST_NOSAVESET                  = 0x00000004,
    REST_NOFILEMENU                 = 0x00000008,
    REST_NOSETFOLDERS               = 0x00000010,
    REST_NOSETTASKBAR               = 0x00000020,
    REST_NODESKTOP                  = 0x00000040,
    REST_NOFIND                     = 0x00000080,
    REST_NODRIVES                   = 0x00000100,
    REST_NODRIVEAUTORUN             = 0x00000200,
    REST_NODRIVETYPEAUTORUN         = 0x00000400,
    REST_NONETHOOD                  = 0x00000800,
    REST_STARTBANNER                = 0x00001000,
    REST_RESTRICTRUN                = 0x00002000,
    REST_NOPRINTERTABS              = 0x00004000,
    REST_NOPRINTERDELETE            = 0x00008000,
    REST_NOPRINTERADD               = 0x00010000,
    REST_NOSTARTMENUSUBFOLDERS      = 0x00020000,
    REST_MYDOCSONNET                = 0x00040000,
    REST_NOEXITTODOS                = 0x00080000,
    REST_ENFORCESHELLEXTSECURITY    = 0x00100000,
    REST_LINKRESOLVEIGNORELINKINFO  = 0x00200000,
    REST_NOCOMMONGROUPS             = 0x00400000,
    REST_SEPARATEDESKTOPPROCESS     = 0x00800000,
    REST_NOWEB                      = 0x01000000,
    REST_NOTRAYCONTEXTMENU          = 0x02000000,
    REST_NOVIEWCONTEXTMENU          = 0x04000000,
    REST_NONETCONNECTDISCONNECT     = 0x08000000,
    REST_STARTMENULOGOFF            = 0x10000000,
    REST_NOSETTINGSASSIST           = 0x20000000,
    REST_NOINTERNETICON             = 0x40000001,
    REST_NORECENTDOCSHISTORY        = 0x40000002,
    REST_NORECENTDOCSMENU           = 0x40000003,
    REST_NOACTIVEDESKTOP            = 0x40000004,
    REST_NOACTIVEDESKTOPCHANGES     = 0x40000005,
    REST_NOFAVORITESMENU            = 0x40000006,
    REST_CLEARRECENTDOCSONEXIT      = 0x40000007,
    REST_CLASSICSHELL               = 0x40000008,
    REST_NOCUSTOMIZEWEBVIEW         = 0x40000009,
    REST_NOHTMLWALLPAPER            = 0x40000010,
    REST_NOCHANGINGWALLPAPER        = 0x40000011,
    REST_NODESKCOMP                 = 0x40000012,
    REST_NOADDDESKCOMP              = 0x40000013,
    REST_NODELDESKCOMP              = 0x40000014,
    REST_NOCLOSEDESKCOMP            = 0x40000015,
    REST_NOCLOSE_DRAGDROPBAND       = 0x40000016,   // Disable Close and Drag & Drop on ALL Bands
    REST_NOMOVINGBAND               = 0x40000017,   // Disable Moving ALL Bands
    REST_NOEDITDESKCOMP             = 0x40000018,
    REST_NORESOLVESEARCH            = 0x40000019,
    REST_NORESOLVETRACK             = 0x4000001A,
    REST_FORCECOPYACLWITHFILE       = 0x4000001B,
    REST_NOLOGO3CHANNELNOTIFY       = 0x4000001C,
    REST_NOFORGETSOFTWAREUPDATE     = 0x4000001D,
    REST_NOSETACTIVEDESKTOP         = 0x4000001E,   // No Active desktop on Settings Menu
    REST_NOUPDATEWINDOWS            = 0x4000001F,   // No Windows Update on Settings Menu
    REST_NOCHANGESTARMENU           = 0x40000020,   // No Context menu or Drag and Drop on Start menu
    REST_NOFOLDEROPTIONS            = 0x40000021,   // No Folder Options on Settings Menu
    REST_HASFINDCOMPUTERS           = 0x40000022,   // Show Start/Search/Computers
    REST_INTELLIMENUS               = 0x40000023,
    REST_RUNDLGMEMCHECKBOX          = 0x40000024,
    REST_ARP_ShowPostSetup          = 0x40000025,   // ARP: Show Post-Setup page
    REST_NOCSC                      = 0x40000026,   // Disable the ClientSide caching on SM
    REST_NOCONTROLPANEL             = 0x40000027,   // Remove the Control Panel only from SM|Settings
    REST_ENUMWORKGROUP              = 0x40000028,   // Enumerate workgroup in root of nethood
    REST_ARP_NOARP                  = 0x40000029,   // ARP: Don't Allow ARP to come up at all
    REST_ARP_NOREMOVEPAGE           = 0x4000002A,   // ARP: Don't allow Remove page
    REST_ARP_NOADDPAGE              = 0x4000002B,   // ARP: Don't allow Add page
    REST_ARP_NOWINSETUPPAGE         = 0x4000002C,   // ARP: Don't allow opt components page
    REST_GREYMSIADS                 = 0x4000002D,    // SM: Allow the greying of Darwin Ads in SM
    REST_NOCHANGEMAPPEDDRIVELABEL   = 0x4000002E,   // Don't enable the UI which allows users to rename mapped drive labels
    REST_NOCHANGEMAPPEDDRIVECOMMENT = 0x4000002F,   // Don't enable the UI which allows users to change mapped drive comments
    REST_MaxRecentDocs              = 0x40000030,
    REST_NONETWORKCONNECTIONS       = 0x40000031,   // No Start Menu | Settings |Network Connections
    REST_FORCESTARTMENULOGOFF       = 0x40000032,   // Force logoff on the Start Menu
    REST_NOWEBVIEW                  = 0x40000033,   // Disable Web View
    REST_NOCUSTOMIZETHISFOLDER      = 0x40000034,   // Disable Customize This Folder
    REST_NOENCRYPTION               = 0x40000035,   // Don't allow file encryption
    REST_DONTSHOWSUPERHIDDEN        = 0x40000037,   // don't show super hidden files
    REST_NOSHELLSEARCHBUTTON        = 0x40000038,
    REST_NOHARDWARETAB              = 0x40000039,   // No Hardware tab on Drives or in control panel
    REST_NORUNASINSTALLPROMPT       = 0x4000003A,   // Don't bring up "Run As" prompt for install programs
    REST_PROMPTRUNASINSTALLNETPATH  = 0x4000003B,   // Force the  "Run As" prompt for install programs on unc/network shares
    REST_NOMANAGEMYCOMPUTERVERB     = 0x4000003C,   // No Manage verb on My Computer
    REST_DISALLOWRUN                = 0x4000003E,   // don't allow certain apps to be run
    REST_NOWELCOMESCREEN            = 0x4000003F,   // don't allow the welcome screen to be displayed.
    REST_RESTRICTCPL                = 0x40000040,   // only allow certain cpls to be run
    REST_DISALLOWCPL                = 0x40000041,   // don't allow certain cpls to be run
    REST_NOSMBALLOONTIP             = 0x40000042,   // No Start Menu Balloon Tip
    REST_NOSMHELP                   = 0x40000043,   // No Help on the Start Menu
    REST_NOWINKEYS                  = 0x40000044,   // No Windows-X Hot keys
    REST_NOENCRYPTONMOVE            = 0x40000045,   // Don't automatically try to encrypt files that are moved to encryped directories
    REST_NOLOCALMACHINERUN          = 0x40000046,   // ignore HKLM\sw\ms\win\cv\Run and all of it's sub keys
    REST_NOCURRENTUSERRUN           = 0x40000047,   // ignore HKCU\sw\ms\win\cv\Run and all of it's sub keys
    REST_NOLOCALMACHINERUNONCE      = 0x40000048,   // ignore HKLM\sw\ms\win\cv\RunOnce and all of it's sub keys
    REST_NOCURRENTUSERRUNONCE       = 0x40000049,   // ignore HKCU\sw\ms\win\cv\RunOnce and all of it's sub keys
    REST_FORCEACTIVEDESKTOPON       = 0x4000004A,   // Force ActiveDesktop to be turned ON all the time.
    REST_NOVIEWONDRIVE              = 0x4000004C,   // disallows CreateViewObject() on specified drives (CFSFolder only)
    REST_NONETCRAWL                 = 0x4000004D,   // disables the crawling of the WNet namespace.
    REST_NOSHAREDDOCUMENTS          = 0x4000004E,   // don't auto share the Shared Documents/create link
    REST_NOSMMYDOCS                 = 0x4000004F,   // Don't show the My Documents item on the Start Menu.
    REST_NOSMMYPICS                 = 0x40000050,   // Don't show the My Pictures item on the Start Menu
    REST_ALLOWBITBUCKDRIVES         = 0x40000051,   // Bit mask indicating which which drives have bit bucket support
    REST_NONLEGACYSHELLMODE         = 0x40000052,   // new consumer shell modes
    REST_NOCONTROLPANELBARRICADE    = 0x40000053,   // The webview barricade in Control Panel
    REST_NOSTARTPAGE                = 0x40000054,   // Whistler Start Page on desktop.
    REST_NOAUTOTRAYNOTIFY           = 0x40000055,   // Whistler auto-tray notify feature
    REST_NOTASKGROUPING             = 0x40000056,   // Whistler taskbar button grouping feature
    REST_NOCDBURNING                = 0x40000057,   // whistler cd burning feature
    REST_MYCOMPNOPROP               = 0x40000058,   // disables Properties on My Computer's context menu
    REST_MYDOCSNOPROP               = 0x40000059,   // disables Properties on My Documents' context menu
    REST_NOSTARTPANEL               = 0x4000005A,   // Windows start panel (New start menu) for Whistler.
    REST_NODISPLAYAPPEARANCEPAGE    = 0x4000005B,   // disable Themes and Appearance tabs in the Display Control Panel.
    REST_NOTHEMESTAB                = 0x4000005C,   // disable the Themes tab in the Display Control Panel.
    REST_NOVISUALSTYLECHOICE        = 0x4000005D,   // disable the visual style drop down in the Appearance tab of the Display Control Panel.
    REST_NOSIZECHOICE               = 0x4000005E,   // disable the size drop down in the Appearance tab of the Display Control Panel.
    REST_NOCOLORCHOICE              = 0x4000005F,   // disable the color drop down in the Appearance tab of the Display Control Panel.
    REST_SETVISUALSTYLE             = 0x40000060,   // Load the specified file as the visual style.
    REST_STARTRUNNOHOMEPATH         = 0x40000061,   // dont use the %HOMEPATH% env var for the Start-Run dialog
    REST_NOUSERNAMEINSTARTPANEL     = 0x40000062,   // don't show the username is the startpanel.
    REST_NOMYCOMPUTERICON           = 0x40000063,   // don't show my computer anywhere, hide its contents
    REST_NOSMNETWORKPLACES          = 0x40000064,   // don't show network places in startpanel.
    REST_NOSMPINNEDLIST             = 0x40000065,   // don't show the pinned list in startpanel.
    REST_NOSMMYMUSIC                = 0x40000066,   // don't show MyMusic folder in startpanel
    REST_NOSMEJECTPC                = 0x40000067,   // don't show "Undoc PC" command in startmenu
    REST_NOSMMOREPROGRAMS           = 0x40000068,   // don't show "More Programs" button in StartPanel.
    REST_NOSMMFUPROGRAMS            = 0x40000069,   // don't show the MFU programs list in StartPanel.
    REST_NOTRAYITEMSDISPLAY         = 0x4000006A,   // disables the display of the system tray
    REST_NOTOOLBARSONTASKBAR        = 0x4000006B,   // disables toolbar display on the taskbar
    REST_NOSMCONFIGUREPROGRAMS      = 0x4000006F,   // No Configure Programs on Settings Menu
    REST_HIDECLOCK                  = 0x40000070,   // don't show the clock
    REST_NOLOWDISKSPACECHECKS       = 0x40000071,   // disable the low disk space checking
    REST_NOENTIRENETWORK            = 0x40000072,   // removes the "Entire Network" link (i.e. from "My Network Places")
    REST_NODESKTOPCLEANUP           = 0x40000073,   // disable the desktop cleanup wizard
    REST_BITBUCKNUKEONDELETE        = 0x40000074,   // disables recycling of files
    REST_BITBUCKCONFIRMDELETE       = 0x40000075,   // always show the delete confirmation dialog when deleting files
    REST_BITBUCKNOPROP              = 0x40000076,   // disables Properties on Recycle Bin's context menu
    REST_NODISPBACKGROUND           = 0x40000077,   // disables the Desktop tab in the Display CPL
    REST_NODISPSCREENSAVEPG         = 0x40000078,   // disables the Screen Saver tab in the Display CPL
    REST_NODISPSETTINGSPG           = 0x40000079,   // disables the Settings tab in the Display CPL
    REST_NODISPSCREENSAVEPREVIEW    = 0x4000007A,   // disables the screen saver on the Screen Saver tab in the Display CPL
    REST_NODISPLAYCPL               = 0x4000007B,   // disables the Display CPL
    REST_HIDERUNASVERB              = 0x4000007C,   // hides the "Run As..." context menu item
    REST_NOTHUMBNAILCACHE           = 0x4000007D,   // disables use of the thumbnail cache
    REST_NOSTRCMPLOGICAL            = 0x4000007E,   // dont use StrCmpLogical() instead use default CompareString()
    REST_NOPUBLISHWIZARD            = 0x4000007F,   // disables publishing wizard (WPW)
    REST_NOONLINEPRINTSWIZARD       = 0x40000080,   // disables online prints wizard (OPW)
    REST_NOWEBSERVICES              = 0x40000081,   // disables the web specified services for both OPW and WPW
    REST_ALLOWUNHASHEDWEBVIEW       = 0x40000082,   // allow the user to be promted to accept web view templates that don't already have an md5 hash in the registry
    REST_ALLOWLEGACYWEBVIEW         = 0x40000083,   // allow legacy webview template to be shown.
    REST_REVERTWEBVIEWSECURITY      = 0x40000084,   // disable added webview security measures (revert to w2k functionality).
    REST_INHERITCONSOLEHANDLES      = 0x40000086,   // ShellExec() will check for the current process and target process being console processes to inherit handles
    REST_SORTMAXITEMCOUNT           = 0x40000087,   // Do not sort views with more items than this key. Useful for viewing big amount of files in one folder.
    REST_NOREMOTERECURSIVEEVENTS    = 0x40000089,   // Dont register network change events recursively to avoid network traffic
    REST_NOREMOTECHANGENOTIFY       = 0x40000091,   // Do not notify for remote changy notifies
    REST_NOSIMPLENETIDLIST          = 0x40000092,   // No simple network IDLists
    REST_NOENUMENTIRENETWORK        = 0x40000093,   // Don't enumerate entire network if we happen to get to it (in conjunction with REST_NOENTIRENETWORK)
    REST_NODETAILSTHUMBNAILONNETWORK= 0x40000094,   // Disable Thumbnail for Network files in DUI Details pane
    REST_NOINTERNETOPENWITH         = 0x40000095,   // dont allow looking on the internet for file associations
    REST_DONTRETRYBADNETNAME        = 0x4000009B,   // In Network Places: if provider returns ERROR_BAD_NET_NAME, give up
    REST_ALLOWFILECLSIDJUNCTIONS    = 0x4000009C,   // re-enable legacy support for file.{guid} junctions in FileSystem Folder
    REST_NOUPNPINSTALL              = 0x4000009D,   // disable "install UPnP" task in My Net Places
    REST_ARP_DONTGROUPPATCHES       = 0x400000AC,   //List individual patches in Add/Remove Programs
    REST_ARP_NOCHOOSEPROGRAMSPAGE   = 0x400000AD,   //Choose programs page

    REST_NODISCONNECT               = 0x41000001,   // No Disconnect option in Start menu
    REST_NOSECURITY                 = 0x41000002,   // No Security option in start menu
    REST_NOFILEASSOCIATE            = 0x41000003,   // Do not allow user to change file association
    REST_ALLOWCOMMENTTOGGLE         = 0x41000004,   // Allow the user to toggle the positions of the Comment and the Computer Name
    REST_USEDESKTOPINICACHE         = 0x41000005,   // Cache desktop.ini entries from network folders
} RESTRICTIONS;
%ProgramFiles(x86)%\Windows Kits\10\Include\10.0.18362.0\um\shlobj_core.h(2479,0)
  • If WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
  • If (NTDDI_VERSION < NTDDI_VISTA)
  • If (NTDDI_VERSION >= NTDDI_WINXP) || defined(IE_BACKCOMPAT_VERSION)
  • If (NTDDI_VERSION >= NTDDI_WINXP)
  • If (NTDDI_VERSION >= NTDDI_WIN2KSP3)
  • If (NTDDI_VERSION >= NTDDI_WIN2KSP4)
  • If (NTDDI_VERSION >= NTDDI_WINXPSP1) || defined(IE_BACKCOMPAT_VERSION)
  • If (NTDDI_VERSION >= NTDDI_WINXPSP2 && NTDDI_VERSION < NTDDI_VISTA)
  • If (NTDDI_VERSION >= NTDDI_WINXPSP2)