VirtualBox

Changeset 105809 in vbox


Ignore:
Timestamp:
Aug 22, 2024 8:09:33 AM (5 weeks ago)
Author:
vboxsync
Message:

Main: Print the host's Windows Features to the release log. bugref:10753

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/glue/VBoxLogRelCreate.cpp

    r98103 r105809  
    144144                   RTProcSelf(),
    145145                   VBOX_PACKAGE_STRING);
     146
     147#ifdef RT_OS_WINDOWS
     148            static struct
     149            {
     150                const char    *pszDesc;
     151                RTSYSNTFEATURE enmFeature;
     152            } s_aNtFeatures[] =
     153            {
     154                { "Core Isolation (Memory Integrity)", RTSYSNTFEATURE_CORE_ISOLATION_MEMORY_INTEGRITY }
     155            };
     156            pfnLog(pReleaseLogger, "Windows Features:\n");
     157            for (size_t i = 0; i < RT_ELEMENTS(s_aNtFeatures); i++)
     158            {
     159                pfnLog(pReleaseLogger, "  %s: ", s_aNtFeatures[i].pszDesc);
     160                bool fEnabled;
     161                vrc = RTSystemQueryNtFeatureEnabled(s_aNtFeatures[i].enmFeature, &fEnabled);
     162                if (RT_SUCCESS(vrc))
     163                    pfnLog(pReleaseLogger, "%s", fEnabled ? "ENABLED\n" : "DISABLED\n");
     164                else if (vrc == VERR_NOT_SUPPORTED)
     165                    pfnLog(pReleaseLogger, "Not supported\n");
     166                else
     167                    pfnLog(pReleaseLogger, "Failed to query (%Rrc)\n", vrc);
     168            }
     169#endif
    146170            RTLogSetBuffering(pReleaseLogger, fOldBuffered);
    147171            break;
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