VirtualBox

Changeset 66279 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Mar 28, 2017 7:23:33 AM (8 years ago)
Author:
vboxsync
Message:

Main/Frontends/Installer: bugref:3300: tabs, spaces, doxygen

Location:
trunk/src/VBox/Main
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/Makefile.kmk

    r66274 r66279  
    7575        $(if $(VBOX_WITH_HOSTNETIF_API),VBOX_WITH_HOSTNETIF_API,) \
    7676        $(if $(VBOX_WITH_MIDL_PROXY_STUB),VBOX_WITH_MIDL_PROXY_STUB,) \
    77     $(if $(VBOX_WITH_SDS),VBOX_WITH_SDS,) \
     77        $(if $(VBOX_WITH_SDS),VBOX_WITH_SDS,) \
    7878
    7979# Unconditionally enable the new semaphore key generation code
     
    127127        $(VBOX_PATH_SDK)/bindings/xpcom/idl \
    128128        $(VBOX_PATH_SDK)/bindings/xpcom/include
    129  # switch off VBoxSDS in XPCOM 
    130  override VBOX_WITH_SDS = 
     129 # disable VBoxSDS for XPCOM   
     130 override VBOX_WITH_SDS =
    131131endif # xpcom
    132132
     
    735735        $(if $(VBOX_WITH_PCI_PASSTHROUGH),VBOX_WITH_PCI_PASSTHROUGH,) \
    736736        $(if $(VBOX_WITH_VRDEAUTH_IN_VBOXSVC),VBOX_WITH_VRDEAUTH_IN_VBOXSVC,) \
    737     $(if $(VBOX_WITH_SDS),VBOX_WITH_SDS,)
     737        $(if $(VBOX_WITH_SDS),VBOX_WITH_SDS,)
    738738ifdef VBOX_WITH_CRHGSMI
    739739 VBoxC_DEFS += VBOX_WITH_CRHGSMI
     
    11471147 VBoxProxyStub_TEMPLATE = VBOXMAINCOMP
    11481148 VBoxProxyStub_DEFS     = REGISTER_PROXY_DLL PROXY_CLSID_IS="$(VBOX_MIDL_PROXY_CLSID_IS)" \
    1149      $(if $(VBOX_WITH_SDS),VBOX_WITH_SDS,)
     1149        $(if $(VBOX_WITH_SDS),VBOX_WITH_SDS,)
    11501150 VBoxProxyStub_DEFS.win.x86 = WIN32
    11511151 VBoxProxyStub_SDKS     = VBOX_NTDLL
     
    12211221        $(call MSG_TOOL,xsltproc,VBoxSVC,$<,$@)
    12221222        $(QUIET)$(VBOX_XSLTPROC) -o $@ \
    1223      $(if $(VBOX_WITH_MIDL_PROXY_STUB),-stringparam g_fGenProxy yes,) \
    1224      $(if $(VBOX_WITH_SDS),-stringparam g_fVBoxWithSDS yes,) \
    1225      $< $(VBOX_XIDL_FILE)
     1223                $(if $(VBOX_WITH_MIDL_PROXY_STUB),-stringparam g_fGenProxy yes,) \
     1224                $(if $(VBOX_WITH_SDS),-stringparam g_fVBoxWithSDS yes,) \
     1225                $< $(VBOX_XIDL_FILE)
    12261226
    12271227# Aliases for testing purposes.
  • trunk/src/VBox/Main/include/VirtualBoxSDSImpl.h

    r66274 r66279  
    7979    /**
    8080    *  Prints current user name of this thread to the log
    81     *  @prefix - strigng fragment that will be inserted at beginning of logging line
     81    *  @param prefix    string fragment that will be inserted at the beginning
     82    *                   of the logging line
    8283    */
    8384    void LogUserName(char *prefix);
    8485
    85     /** 
     86    /**
    8687    *  Thread that periodically checks items in cache and cleans obsolete items
    8788    */
  • trunk/src/VBox/Main/src-all/win/VBoxProxyStub.c

    r66274 r66279  
    10161016 * @returns Windows error code (errors are rememberd in the state).
    10171017 * @param   pState              The registry modifier state.
     1018 * @param   pszModuleName       The module name.
    10181019 * @param   pszAppId            The application UUID string.
    10191020 * @param   pszDescription      The description string.
    1020  * @param   bIsService          The application is windows service
    1021  */
    1022 LSTATUS VbpsRegisterAppId(
    1023     VBPSREGSTATE *pState,
    1024     const char *pszModuleName,
    1025     const char *pszAppId,
    1026     const char *pszDescription,
    1027     bool bIsService)
     1021 * @param   fIsService          The application is windows service
     1022 */
     1023LSTATUS VbpsRegisterAppId(VBPSREGSTATE *pState, const char *pszModuleName, const char *pszAppId,
     1024                          const char *pszDescription, bool fIsService)
    10281025{
    10291026    LSTATUS rc;
     
    10521049        rc = RegCreateKeyExW(pState->hkeyClassesRootDst, L"AppID", 0 /*Reserved*/, NULL /*pszClass*/, 0 /*fOptions*/,
    10531050                             pState->fSamBoth, NULL /*pSecAttr*/, &hkeyAppIds, NULL /*pdwDisposition*/);
    1054 
    10551051    else
    10561052    {
     
    10671063    }
    10681064
    1069         if (pState->fUpdate)
     1065    if (pState->fUpdate)
     1066    {
     1067        vbpsCreateRegKeyWithDefaultValueAA(pState, hkeyAppIds, pszAppId, pszDescription, __LINE__);
     1068
     1069        if (fIsService)
    10701070        {
    1071             //HKEY hkeyApp;
    1072             HKEY hkeyServiceExe;
    1073    
    1074             vbpsCreateRegKeyWithDefaultValueAA(pState, hkeyAppIds, pszAppId, pszDescription, __LINE__);
    1075    
    1076             if (bIsService)
    1077             {
    1078                 HKEY hkeyApp;
    1079 
    1080                 char szModule[MAX_PATH + 2];
    1081                 size_t len = RTStrNLen(pszModuleName, MAX_PATH);
    1082                 Assert(len);
    1083                 Assert(len < MAX_PATH);
    1084                 rc = RTStrCopy(szModule, sizeof(szModule), pszModuleName);
    1085                 AssertRC(rc);
    1086                 szModule[len - 4] = '\0';
    1087 
    1088                 rc = RegOpenKeyExA(hkeyAppIds, pszAppId, 0 /*fOptions*/, pState->fSamBoth, &hkeyApp);
    1089                 if (rc == ERROR_FILE_NOT_FOUND)
    1090                     return ERROR_SUCCESS;
    1091                 // create the value "Service" with the service name
    1092                 vbpsSetRegValueAA(pState, hkeyApp, "LocalService", szModule, __LINE__);
    1093                 vbpsCloseKey(pState, hkeyApp, __LINE__);
    1094             }
    1095    
    1096             vbpsCreateRegKeyWithDefaultValueAA(pState, hkeyAppIds, pszModuleName, "", __LINE__);
    1097             rc = RegOpenKeyExA(hkeyAppIds, pszModuleName, 0 /*fOptions*/, pState->fSamBoth, &hkeyServiceExe);
     1071            char szModule[MAX_PATH + 2];
     1072            size_t len = RTStrNLen(pszModuleName, MAX_PATH);
     1073            Assert(len);
     1074            Assert(len < MAX_PATH);
     1075            rc = RTStrCopy(szModule, sizeof(szModule), pszModuleName);
     1076            AssertRC(rc);
     1077            szModule[len - 4] = '\0';
     1078
     1079            HKEY hkeyApp;
     1080            rc = RegOpenKeyExA(hkeyAppIds, pszAppId, 0 /*fOptions*/, pState->fSamBoth, &hkeyApp);
    10981081            if (rc == ERROR_FILE_NOT_FOUND)
    10991082                return ERROR_SUCCESS;
    1100             vbpsSetRegValueAA(pState, hkeyServiceExe, "AppID", pszAppId, __LINE__);
    1101             vbpsCloseKey(pState, hkeyServiceExe, __LINE__);
     1083            // create the value "Service" with the service name
     1084            vbpsSetRegValueAA(pState, hkeyApp, "LocalService", szModule, __LINE__);
     1085            vbpsCloseKey(pState, hkeyApp, __LINE__);
    11021086        }
     1087
     1088        vbpsCreateRegKeyWithDefaultValueAA(pState, hkeyAppIds, pszModuleName, "", __LINE__);
     1089
     1090        HKEY hkeyServiceExe;
     1091        rc = RegOpenKeyExA(hkeyAppIds, pszModuleName, 0 /*fOptions*/, pState->fSamBoth, &hkeyServiceExe);
     1092        if (rc == ERROR_FILE_NOT_FOUND)
     1093            return ERROR_SUCCESS;
     1094        vbpsSetRegValueAA(pState, hkeyServiceExe, "AppID", pszAppId, __LINE__);
     1095        vbpsCloseKey(pState, hkeyServiceExe, __LINE__);
     1096    }
    11031097
    11041098    vbpsCloseKey(pState, hkeyAppIds, __LINE__);
     
    12881282
    12891283            /* AppID = pszAppId */
    1290             if(pszAppId && fQuoteIt)
     1284            if (pszAppId && fQuoteIt)
    12911285                vbpsSetRegValueAA(pState, hkeyClass, "AppID", pszAppId, __LINE__);
    12921286
     
    13391333    const char *pszInprocDll = !fIs32On64 ? "VBoxC.dll" : "x86\\VBoxClient-x86.dll";
    13401334    const char *pszLocalServer      = "VBoxSVC.exe";
    1341        
     1335
    13421336    VbpsRegisterAppId(pState, pszLocalServer, pszAppId, "VirtualBox Application", false);
    13431337
  • trunk/src/VBox/Main/src-client/VirtualBoxClientImpl.cpp

    r66274 r66279  
    7070
    7171    HRESULT rc = CoCreateInstance(CLSID_VirtualBoxSDS, /* the VirtualBoxSDS object */
    72         NULL,                   /* no aggregation */
    73         CLSCTX_LOCAL_SERVER,  /* the object lives in the current process */
    74         IID_IVirtualBoxSDS,  /* IID of the interface */
    75         (void **)aVirtualBoxSDS.asOutParam());
     72                                  NULL,                /* no aggregation */
     73                                  CLSCTX_LOCAL_SERVER, /* the object lives in the current process */
     74                                  IID_IVirtualBoxSDS,  /* IID of the interface */
     75                                  (void **)aVirtualBoxSDS.asOutParam());
    7676    if (FAILED(rc))
    7777    {
     
    9797
    9898    HRESULT rc = CoCreateInstance(CLSID_VirtualBoxSDS, /* the VirtualBoxSDS object */
    99         NULL,                   /* no aggregation */
    100         CLSCTX_LOCAL_SERVER,  /* the object lives in the current process */
    101         IID_IVirtualBoxSDS,  /* IID of the interface */
    102         (void **)aVirtualBoxSDS.asOutParam());
     99                                  NULL,                /* no aggregation */
     100                                  CLSCTX_LOCAL_SERVER, /* the object lives in the current process */
     101                                  IID_IVirtualBoxSDS,  /* IID of the interface */
     102                                  (void **)aVirtualBoxSDS.asOutParam());
    103103    if (FAILED(rc))
    104104    {
     
    132132    // TODO: AM rework for final version
    133133    // setup COM Security to enable impersonation
    134     // This works for console Virtual Box clients, GUI has own security settings 
     134    // This works for console Virtual Box clients, GUI has own security settings
    135135    //  For GUI Virtual Box it will be second call so can return TOO_LATE error
    136136    HRESULT hrGUICoInitializeSecurity = CoInitializeSecurity(NULL,
    137         -1,
    138         NULL,
    139         NULL,
    140         RPC_C_AUTHN_LEVEL_DEFAULT,
    141         RPC_C_IMP_LEVEL_IMPERSONATE, //RPC_C_IMP_LEVEL_DELEGATE,//RPC_C_IMP_LEVEL_IMPERSONATE,
    142         NULL,
    143         EOAC_NONE,//EOAC_NONE,//EOAC_DYNAMIC_CLOAKING,//EOAC_STATIC_CLOAKING, 
    144         NULL);
     137                                                             -1,
     138                                                             NULL,
     139                                                             NULL,
     140                                                             RPC_C_AUTHN_LEVEL_DEFAULT,
     141                                                             RPC_C_IMP_LEVEL_IMPERSONATE,
     142                                                             NULL,
     143                                                             EOAC_NONE,
     144                                                             NULL);
    145145    //Assert(RPC_E_TOO_LATE != hrGUICoInitializeSecurity);
    146146    Assert(SUCCEEDED(hrGUICoInitializeSecurity) || hrGUICoInitializeSecurity == RPC_E_TOO_LATE);
     
    170170        mData.m_ThreadWatcher = NIL_RTTHREAD;
    171171        mData.m_SemEvWatcher = NIL_RTSEMEVENT;
    172        
     172
    173173#ifdef VBOX_WITH_SDS
    174         // TODO: AM create virtual box through SDS 
     174        // TODO: AM create virtual box through SDS
    175175        rc = CreateVirtualBoxThroughSDS(mData.m_pVirtualBox);
    176176#else
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