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 May 13, 2020
  • Items count: 340878
  • Parsed files count: 8447
  • Windows SDK version: 10.0.19041.0
  • NetFx SDK version: 4.8
  • MSVC Tools version: 14.25.28610

 Rest API

There is a JSON version API (you will have to figure out the schema, it's pretty obvious) that you can call here (the search query is the 'q' parameter):

   https://www.magnumdb.com/api.aspx?q=0xC000000D&key=you-api-key-goes-here

Note this API also has a 400 items maximum limit and the server is monitored for excessive usage (the key can be removed without notice). If you want to get a key, send us an email.

 

 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-2021 Simon Mourier V1.3.2. 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.815966 ActivationKind::Launch Int32 0 0x00000000 0 System.Int32
Launch                              = 0,
%ProgramFiles(x86)%\Windows Kits\10\Include\10.0.19041.0\winrt\Windows.Applicationmodel.Activation.idl(639,0)
2 3.87731 OLESTATUS::OLE_ERROR_LAUNCH Int32 35 0x00000023 35 System.Int32
OLE_ERROR_LAUNCH,           /* 35  Failed to launch server                 */
    OLE_ERROR_LAUNCH,           /* 35  Failed to launch server                 */
%ProgramFiles(x86)%\Windows Kits\10\Include\10.0.19041.0\um\ole.h(133,0)
3 3.427091 COMSD::SD_LAUNCHPERMISSIONS Int32 0 0x00000000 0 System.Int32
SD_LAUNCHPERMISSIONS = 0,       // Machine wide launch permissions
%ProgramFiles(x86)%\Windows Kits\10\Include\10.0.19041.0\um\objbase.h(97,0)
  • If !defined( _OBJBASE_H_ )
  • If WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
  • If (_WIN32_WINNT >= 0x0501)
4 3.427091 COMSD::SD_LAUNCHRESTRICTIONS Int32 2 0x00000002 2 System.Int32
SD_LAUNCHRESTRICTIONS = 2,      // Machine wide launch limits
%ProgramFiles(x86)%\Windows Kits\10\Include\10.0.19041.0\um\objbase.h(99,0)
  • If !defined( _OBJBASE_H_ )
  • If WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
  • If (_WIN32_WINNT >= 0x0501)
5 3.427091 IURL_INVOKECOMMAND_FLAGS::IURL_INVOKECOMMAND_FL_LOG_USAGE Int32 16 0x00000010 16 System.Int32
IURL_INVOKECOMMAND_FL_LOG_USAGE                 = 0x0010,    // Record launch with UA system
%ProgramFiles(x86)%\Windows Kits\10\Include\10.0.19041.0\um\IntShCut.h(101,0)
  • If WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
6 3.427091 cmdidEditPage Int32 177 0x000000B1 -79 System.Int32
#define cmdidEditPage           177 // Launch editor for url
%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Professional\VSSDK\VisualStudioIntegration\Common\Inc\stdidcmd.h(282,0)
7 3.427091 __magnumdb__enum_msodm_h_13::msodmicleOpenInBrowser Int32 8 0x00000008 8 System.Int32
msodmicleOpenInBrowser,		// Launch in default browser
%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Professional\VSSDK\VisualStudioIntegration\Common\Inc\office10\msodm.h(337,0)
8 2.741673 cmdidViewLinks Int32 178 0x000000B2 -78 System.Int32
#define cmdidViewLinks          178 // Launch new webscope for url
%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Professional\VSSDK\VisualStudioIntegration\Common\Inc\stdidcmd.h(283,0)
9 2.423319 COMSD Enum
typedef enum tagCOMSD
{
    SD_LAUNCHPERMISSIONS = 0,       // Machine wide launch permissions
    SD_ACCESSPERMISSIONS = 1,       // Machine wide acesss permissions
    SD_LAUNCHRESTRICTIONS = 2,      // Machine wide launch limits
    SD_ACCESSRESTRICTIONS = 3       // Machine wide access limits

} COMSD;
%ProgramFiles(x86)%\Windows Kits\10\Include\10.0.19041.0\um\objbase.h(95,0)
  • If !defined( _OBJBASE_H_ )
  • If WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
  • If (_WIN32_WINNT >= 0x0501)
10 2.398963 KnownGamingPrivileges::XPRIVILEGE_PREMIUM_CONTENT Int32 214 0x000000D6 -42 System.Int32
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
%ProgramFiles(x86)%\Windows Kits\10\Include\10.0.19041.0\um\gamingtcui.h(132,0)
  • If NTDDI_VERSION >= NTDDI_THRESHOLD
11 2.056254 IURL_INVOKECOMMAND_FLAGS Enum
typedef enum iurl_invokecommand_flags
{
   IURL_INVOKECOMMAND_FL_ALLOW_UI                  = 0x0001,
   IURL_INVOKECOMMAND_FL_USE_DEFAULT_VERB          = 0x0002,    // Ignore pcszVerb
   IURL_INVOKECOMMAND_FL_DDEWAIT                   = 0x0004,    // pass DDEWAIT to ShellExec
   IURL_INVOKECOMMAND_FL_ASYNCOK                   = 0x0008,    // pass SEE_MASK_ASYNCOK to ShellExec
   IURL_INVOKECOMMAND_FL_LOG_USAGE                 = 0x0010,    // Record launch with UA system
}
IURL_INVOKECOMMAND_FLAGS;
%ProgramFiles(x86)%\Windows Kits\10\Include\10.0.19041.0\um\IntShCut.h(95,0)
  • If WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
12 0.8567727 __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.6854181 ActivationKind Enum
enum ActivationKind
            {
                Launch                              = 0,
                Search                              = 1,
                ShareTarget                         = 2,
                File                                = 3,
                Protocol                            = 4,
                FileOpenPicker                      = 5,
                FileSavePicker                      = 6,
                CachedFileUpdater                   = 7,
                ContactPicker                       = 8,
                Device                              = 9,
                PrintTaskSettings                   = 10,
                CameraSettings                      = 11,
                [contract(Windows.Foundation.UniversalApiContract, 1.0)]
                RestrictedLaunch                    = 12,
                [contract(Windows.Foundation.UniversalApiContract, 1.0)]
                AppointmentsProvider                = 13,
                [contract(Windows.Foundation.UniversalApiContract, 1.0)]
                Contact                             = 14,
                [contract(Windows.Foundation.UniversalApiContract, 1.0)]
                LockScreenCall                      = 15,
                [contract(Windows.Foundation.UniversalApiContract, 1.0)]
                VoiceCommand                        = 16,
                [contract(Windows.Foundation.UniversalApiContract, 1.0)]
                LockScreen                          = 17,
                [contract(Windows.Foundation.UniversalApiContract, 1.0)]
                PickerReturned                      = 1000,
                [contract(Windows.Foundation.UniversalApiContract, 1.0)]
                WalletAction                        = 1001,
                [contract(Windows.Foundation.UniversalApiContract, 1.0)]
                PickFileContinuation                = 1002,
                [contract(Windows.Foundation.UniversalApiContract, 1.0)]
                PickSaveFileContinuation            = 1003,
                [contract(Windows.Foundation.UniversalApiContract, 1.0)]
                PickFolderContinuation              = 1004,
                [contract(Windows.Foundation.UniversalApiContract, 1.0)]
                WebAuthenticationBrokerContinuation = 1005,
                [contract(Windows.Foundation.UniversalApiContract, 1.0)]
                WebAccountProvider                  = 1006,
                [contract(Windows.Foundation.UniversalApiContract, 1.0)]
                ComponentUI                         = 1007,
                [contract(Windows.Foundation.UniversalApiContract, 1.0)]
                ProtocolForResults                  = 1009,
                [contract(Windows.Foundation.UniversalApiContract, 1.0)]
                ToastNotification                   = 1010,
                [contract(Windows.Foundation.UniversalApiContract, 2.0)]
                Print3DWorkflow                     = 1011,
                [contract(Windows.Foundation.UniversalApiContract, 1.0)]
                DialReceiver                        = 1012,
                [contract(Windows.Foundation.UniversalApiContract, 2.0)]
                DevicePairing                       = 1013,
                [contract(Windows.Foundation.UniversalApiContract, 3.0)]
                UserDataAccountsProvider            = 1014,
                [contract(Windows.Foundation.UniversalApiContract, 3.0)]
                FilePickerExperience                = 1015,
                [contract(Windows.Foundation.UniversalApiContract, 4.0)]
                LockScreenComponent                 = 1016,
                [contract(Windows.Foundation.UniversalApiContract, 4.0)]
                ContactPanel                        = 1017,
                [contract(Windows.Foundation.UniversalApiContract, 5.0)]
                PrintWorkflowForegroundTask         = 1018,
                [contract(Windows.Foundation.UniversalApiContract, 5.0)]
                GameUIProvider                      = 1019,
                [contract(Windows.Foundation.UniversalApiContract, 5.0)]
                StartupTask                         = 1020,
                [contract(Windows.Foundation.UniversalApiContract, 5.0)]
                CommandLineLaunch                   = 1021,
                [contract(Windows.Foundation.UniversalApiContract, 6.0)]
                BarcodeScannerProvider              = 1022
            };
%ProgramFiles(x86)%\Windows Kits\10\Include\10.0.19041.0\winrt\Windows.Applicationmodel.Activation.idl(637,0)
14 0.5997409 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.19041.0\um\gamingtcui.h(120,0)
  • If NTDDI_VERSION >= NTDDI_THRESHOLD
15 0.4846638 OLESTATUS Enum
typedef enum
{
    OLE_OK,                     /* 0   Function operated correctly             */
    OLE_OK,                     /* 0   Function operated correctly             */

    OLE_WAIT_FOR_RELEASE,       /* 1   Command has been initiated, client      */
    OLE_WAIT_FOR_RELEASE,       /* 1   Command has been initiated, client      */
                                /*     must wait for release. keep dispatching */
                                /*     must wait for release. keep dispatching */
                                /*     messages till OLE_RELESE in callback    */
                                /*     messages till OLE_RELESE in callback    */

    OLE_BUSY,                   /* 2   Tried to execute a method while another */
    OLE_BUSY,                   /* 2   Tried to execute a method while another */
                                /*     method is in progress.                  */
                                /*     method is in progress.                  */

    OLE_ERROR_PROTECT_ONLY,     /* 3   Ole APIs are called in real mode        */
    OLE_ERROR_PROTECT_ONLY,     /* 3   Ole APIs are called in real mode        */
    OLE_ERROR_MEMORY,           /* 4   Could not alloc or lock memory          */
    OLE_ERROR_MEMORY,           /* 4   Could not alloc or lock memory          */
    OLE_ERROR_STREAM,           /* 5  (OLESTREAM) stream error                 */
    OLE_ERROR_STREAM,           /* 5  (OLESTREAM) stream error                 */
    OLE_ERROR_STATIC,           /* 6   Non static object expected              */
    OLE_ERROR_STATIC,           /* 6   Non static object expected              */
    OLE_ERROR_BLANK,            /* 7   Critical data missing                   */
    OLE_ERROR_BLANK,            /* 7   Critical data missing                   */
    OLE_ERROR_DRAW,             /* 8   Error while drawing                     */
    OLE_ERROR_DRAW,             /* 8   Error while drawing                     */
    OLE_ERROR_METAFILE,         /* 9   Invalid metafile                        */
    OLE_ERROR_METAFILE,         /* 9   Invalid metafile                        */
    OLE_ERROR_ABORT,            /* 10  Client chose to abort metafile drawing  */
    OLE_ERROR_ABORT,            /* 10  Client chose to abort metafile drawing  */
    OLE_ERROR_CLIPBOARD,        /* 11  Failed to get/set clipboard data        */
    OLE_ERROR_CLIPBOARD,        /* 11  Failed to get/set clipboard data        */
    OLE_ERROR_FORMAT,           /* 12  Requested format is not available       */
    OLE_ERROR_FORMAT,           /* 12  Requested format is not available       */
    OLE_ERROR_OBJECT,           /* 13  Not a valid object                      */
    OLE_ERROR_OBJECT,           /* 13  Not a valid object                      */
    OLE_ERROR_OPTION,           /* 14  Invalid option(link update / render)    */
    OLE_ERROR_OPTION,           /* 14  Invalid option(link update / render)    */
    OLE_ERROR_PROTOCOL,         /* 15  Invalid protocol                        */
    OLE_ERROR_PROTOCOL,         /* 15  Invalid protocol                        */
    OLE_ERROR_ADDRESS,          /* 16  One of the pointers is invalid          */
    OLE_ERROR_ADDRESS,          /* 16  One of the pointers is invalid          */
    OLE_ERROR_NOT_EQUAL,        /* 17  Objects are not equal                   */
    OLE_ERROR_NOT_EQUAL,        /* 17  Objects are not equal                   */
    OLE_ERROR_HANDLE,           /* 18  Invalid handle encountered              */
    OLE_ERROR_HANDLE,           /* 18  Invalid handle encountered              */
    OLE_ERROR_GENERIC,          /* 19  Some general error                      */
    OLE_ERROR_GENERIC,          /* 19  Some general error                      */
    OLE_ERROR_CLASS,            /* 20  Invalid class                           */
    OLE_ERROR_CLASS,            /* 20  Invalid class                           */
    OLE_ERROR_SYNTAX,           /* 21  Command syntax is invalid               */
    OLE_ERROR_SYNTAX,           /* 21  Command syntax is invalid               */
    OLE_ERROR_DATATYPE,         /* 22  Data format is not supported            */
    OLE_ERROR_DATATYPE,         /* 22  Data format is not supported            */
    OLE_ERROR_PALETTE,          /* 23  Invalid color palette                   */
    OLE_ERROR_PALETTE,          /* 23  Invalid color palette                   */
    OLE_ERROR_NOT_LINK,         /* 24  Not a linked object                     */
    OLE_ERROR_NOT_LINK,         /* 24  Not a linked object                     */
    OLE_ERROR_NOT_EMPTY,        /* 25  Client doc contains objects.            */
    OLE_ERROR_NOT_EMPTY,        /* 25  Client doc contains objects.            */
    OLE_ERROR_SIZE,             /* 26  Incorrect buffer size passed to the api */
    OLE_ERROR_SIZE,             /* 26  Incorrect buffer size passed to the api */
                                /*     that places some string in caller's     */
                                /*     that places some string in caller's     */
                                /*     buffer                                  */
                                /*     buffer                                  */

    OLE_ERROR_DRIVE,            /* 27  Drive letter in doc name is invalid     */
    OLE_ERROR_DRIVE,            /* 27  Drive letter in doc name is invalid     */
    OLE_ERROR_NETWORK,          /* 28  Failed to establish connection to a     */
    OLE_ERROR_NETWORK,          /* 28  Failed to establish connection to a     */
                                /*     network share on which the document     */
                                /*     network share on which the document     */
                                /*     is located                              */
                                /*     is located                              */

    OLE_ERROR_NAME,             /* 29  Invalid name(doc name, object name),    */
    OLE_ERROR_NAME,             /* 29  Invalid name(doc name, object name),    */
                                /*     etc.. passed to the APIs                */
                                /*     etc.. passed to the APIs                */

    OLE_ERROR_TEMPLATE,         /* 30  Server failed to load template          */
    OLE_ERROR_TEMPLATE,         /* 30  Server failed to load template          */
    OLE_ERROR_NEW,              /* 31  Server failed to create new doc         */
    OLE_ERROR_NEW,              /* 31  Server failed to create new doc         */
    OLE_ERROR_EDIT,             /* 32  Server failed to create embedded        */
    OLE_ERROR_EDIT,             /* 32  Server failed to create embedded        */
                                /*     instance                                */
                                /*     instance                                */
    OLE_ERROR_OPEN,             /* 33  Server failed to open document,         */
    OLE_ERROR_OPEN,             /* 33  Server failed to open document,         */
                                /*     possible invalid link                   */
                                /*     possible invalid link                   */

    OLE_ERROR_NOT_OPEN,         /* 34  Object is not open for editing          */
    OLE_ERROR_NOT_OPEN,         /* 34  Object is not open for editing          */
    OLE_ERROR_LAUNCH,           /* 35  Failed to launch server                 */
    OLE_ERROR_LAUNCH,           /* 35  Failed to launch server                 */
    OLE_ERROR_COMM,             /* 36  Failed to communicate with server       */
    OLE_ERROR_COMM,             /* 36  Failed to communicate with server       */
    OLE_ERROR_TERMINATE,        /* 37  Error in termination                    */
    OLE_ERROR_TERMINATE,        /* 37  Error in termination                    */
    OLE_ERROR_COMMAND,          /* 38  Error in execute                        */
    OLE_ERROR_COMMAND,          /* 38  Error in execute                        */
    OLE_ERROR_SHOW,             /* 39  Error in show                           */
    OLE_ERROR_SHOW,             /* 39  Error in show                           */
    OLE_ERROR_DOVERB,           /* 40  Error in sending do verb, or invalid    */
    OLE_ERROR_DOVERB,           /* 40  Error in sending do verb, or invalid    */
                                /*     verb                                    */
                                /*     verb                                    */
    OLE_ERROR_ADVISE_NATIVE,    /* 41  Item could be missing                   */
    OLE_ERROR_ADVISE_NATIVE,    /* 41  Item could be missing                   */
    OLE_ERROR_ADVISE_PICT,      /* 42  Item could be missing or server doesn't */
    OLE_ERROR_ADVISE_PICT,      /* 42  Item could be missing or server doesn't */
                                /*     this format.                            */
                                /*     this format.                            */

    OLE_ERROR_ADVISE_RENAME,    /* 43  Server doesn't support rename           */
    OLE_ERROR_ADVISE_RENAME,    /* 43  Server doesn't support rename           */
    OLE_ERROR_POKE_NATIVE,      /* 44  Failure of poking native data to server */
    OLE_ERROR_POKE_NATIVE,      /* 44  Failure of poking native data to server */
    OLE_ERROR_REQUEST_NATIVE,   /* 45  Server failed to render native data     */
    OLE_ERROR_REQUEST_NATIVE,   /* 45  Server failed to render native data     */
    OLE_ERROR_REQUEST_PICT,     /* 46  Server failed to render presentation    */
    OLE_ERROR_REQUEST_PICT,     /* 46  Server failed to render presentation    */
                                /*     data                                    */
                                /*     data                                    */
    OLE_ERROR_SERVER_BLOCKED,   /* 47  Trying to block a blocked server or     */
    OLE_ERROR_SERVER_BLOCKED,   /* 47  Trying to block a blocked server or     */
                                /*     trying to revoke a blocked server       */
                                /*     trying to revoke a blocked server       */
                                /*     or document                             */
                                /*     or document                             */

    OLE_ERROR_REGISTRATION,     /* 48  Server is not registered in regestation */
    OLE_ERROR_REGISTRATION,     /* 48  Server is not registered in regestation */
                                /*     data base                               */
                                /*     data base                               */
    OLE_ERROR_ALREADY_REGISTERED,/*49  Trying to register same doc multiple    */
    OLE_ERROR_ALREADY_REGISTERED,/*49  Trying to register same doc multiple    */
                                 /*    times                                   */
                                 /*    times                                   */
    OLE_ERROR_TASK,             /* 50  Server or client task is invalid        */
    OLE_ERROR_TASK,             /* 50  Server or client task is invalid        */
    OLE_ERROR_OUTOFDATE,        /* 51  Object is out of date                   */
    OLE_ERROR_OUTOFDATE,        /* 51  Object is out of date                   */
    OLE_ERROR_CANT_UPDATE_CLIENT,/* 52 Embed doc's client doesn't accept       */
    OLE_ERROR_CANT_UPDATE_CLIENT,/* 52 Embed doc's client doesn't accept       */
                                /*     updates                                 */
                                /*     updates                                 */
    OLE_ERROR_UPDATE,           /* 53  erorr while trying to update            */
    OLE_ERROR_UPDATE,           /* 53  erorr while trying to update            */
    OLE_ERROR_SETDATA_FORMAT,   /* 54  Server app doesn't understand the       */
    OLE_ERROR_SETDATA_FORMAT,   /* 54  Server app doesn't understand the       */
                                /*     format given to its SetData method      */
                                /*     format given to its SetData method      */
    OLE_ERROR_STATIC_FROM_OTHER_OS,/* 55 trying to load a static object created */
    OLE_ERROR_STATIC_FROM_OTHER_OS,/* 55 trying to load a static object created */
                                   /*    on another Operating System           */
                                   /*    on another Operating System           */
    OLE_ERROR_FILE_VER,

    /*  Following are warnings */
    /*  Following are warnings */
    OLE_WARN_DELETE_DATA = 1000 /*     Caller must delete the data when he is  */
    OLE_WARN_DELETE_DATA = 1000 /*     Caller must delete the data when he is  */
                                /*     done with it.                           */
                                /*     done with it.                           */
} OLESTATUS;
%ProgramFiles(x86)%\Windows Kits\10\Include\10.0.19041.0\um\ole.h(79,0)