VirtualBox

Changeset 105677 in vbox for trunk/src/VBox/Additions/common


Ignore:
Timestamp:
Aug 14, 2024 7:02:00 PM (9 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
164374
Message:

GA/Windows: Enable displayconfig subservice in VBoxService. bugref:10714

Location:
trunk/src/VBox/Additions/common/VBoxService
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxService/VBoxService.cpp

    r98103 r105677  
    186186#ifdef VBOX_WITH_SHARED_FOLDERS
    187187    { &g_AutoMount,     NIL_RTTHREAD, false, false, false, false, true },
     188#endif
     189#ifdef RT_OS_WINDOWS
     190    { &g_DisplayConfig, NIL_RTTHREAD, false, false, false, false, true },
    188191#endif
    189192};
  • trunk/src/VBox/Additions/common/VBoxService/VBoxServiceDisplayConfig.cpp

    r105651 r105677  
    2929
    3030#include <iprt/errcore.h>
     31#include <iprt/system.h>
    3132
    3233#include <VBox/VBoxGuestLib.h>
     
    6061static DECLCALLBACK(int) vgsvcDisplayConfigInit(void)
    6162{
     63    if (RTSystemGetNtVersion() < RTSYSTEM_MAKE_NT_VERSION(6, 0, 0))
     64    {
     65        VGSvcVerbose(1, "displayconfig requires Windows Vista or later\n");
     66        return VERR_SERVICE_DISABLED;
     67    }
     68
    6269    RTLDRMOD hLdrMod;
    6370    int rc = RTLdrLoadSystem("gdi32.dll", true /*fNoUnload*/, &hLdrMod);
     
    7582    }
    7683
    77     VGSvcVerbose(3, "DXGK d3dkmthk callbacks are %s\n", RT_SUCCESS(rc) ? "Ok" : "Fail");
     84    if (RT_FAILURE(rc))
     85    {
     86        VGSvcVerbose(1, "d3dkmthk API is not available (%Rrc)\n", rc);
     87        g_pfnD3DKMTEnumAdapters = NULL;
     88        g_pfnD3DKMTOpenAdapterFromLuid = NULL;
     89        g_pfnD3DKMTCloseAdapter = NULL;
     90        g_pfnD3DKMTEscape = NULL;
     91        return VERR_SERVICE_DISABLED;
     92    }
    7893
    7994    rc = RTLdrLoadSystem("wtsapi32.dll", true /*fNoUnload*/, &hLdrMod);
     
    91106    if (RT_FAILURE(rc))
    92107    {
    93         VGSvcVerbose(1, "WtsApi32.dll APIs are not available (%Rrc)\n", rc);
     108        VGSvcVerbose(1, "WtsApi32.dll API is not available (%Rrc)\n", rc);
    94109        g_pfnWTSFreeMemory = NULL;
    95110        g_pfnWTSQuerySessionInformationA = NULL;
    96111        g_pfnWTSEnumerateSessionsA = NULL;
    97         // Assert(RTSystemGetNtVersion() < RTSYSTEM_MAKE_NT_VERSION(5, 0, 0));
     112        return VERR_SERVICE_DISABLED;
    98113    }
    99114
  • trunk/src/VBox/Additions/common/VBoxService/VBoxServiceInternal.h

    r98103 r105677  
    213213extern VBOXSERVICE  g_AutoMount;
    214214#endif
     215
     216#ifdef RT_OS_WINDOWS
     217extern VBOXSERVICE g_DisplayConfig;
     218#endif
     219
    215220#ifdef DEBUG
    216221extern RTCRITSECT   g_csLog; /* For guest process stdout dumping. */
Note: See TracChangeset for help on using the changeset viewer.

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