VirtualBox

Changeset 59389 in vbox


Ignore:
Timestamp:
Jan 19, 2016 1:27:17 AM (9 years ago)
Author:
vboxsync
Message:

Config.kmk,Main: VBOX_MIDL_PROXY_CLSID and corresponding VBOX_MIDL_PROXY_CLSID_IS now in Config and not duplicated around the place.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Config.kmk

    r59362 r59389  
    545545# The main api.
    546546VBOX_WITH_MAIN = 1
     547# Enables proxy stub for MS COM (speeds up setting IPC for objects).
     548# (The VBOX_MIDL_PROXY_CLSID and VBOX_MIDL_PROXY_CLSID_IS are just two
     549#  representations of the class ID for the proxy stub.)
     550#VBOX_WITH_MIDL_PROXY_STUB = 1
     551VBOX_MIDL_PROXY_CLSID    := {0bb3b78c-1807-4249-5ba5-ea42d66af0bf}
     552VBOX_MIDL_PROXY_CLSID_IS := {0x0bb3b78c,0x1807,0x4249,{0x5b,0xa5,0xea,0x42,0xd6,0x6a,0xf0,0xbf}}
    547553# Whether to also ship 32-bit main API on 64-bit systems.
    548554if1of ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH), solaris.amd64 win.amd64)
  • trunk/src/VBox/Main/Makefile.kmk

    r59385 r59389  
    10441044 DLLS += VBoxProxyStub
    10451045 VBoxProxyStub_TEMPLATE = VBOXMAINCOMP
    1046  VBoxProxyStub_DEFS     = REGISTER_PROXY_DLL \
    1047         PROXY_CLSID_IS="{0x0bb3b78c,0x1807,0x4249,{0x5b,0xa5,0xea,0x42,0xd6,0x6a,0xf0,0xbf}}"
    1048         # => 0bb3b78c-1807-4249-5ba5-ea42d66af0bf: Also hardcoded in VBoxMergeCOM32On64.wxi and VBoxMergeApp.wxi!
     1046 VBoxProxyStub_DEFS     = REGISTER_PROXY_DLL PROXY_CLSID_IS="$(VBOX_MIDL_PROXY_CLSID_IS)"
    10491047 VBoxProxyStub_DEFS.win.x86 = WIN32
    10501048 VBoxProxyStub_SDKS     = VBOX_NTDLL
  • trunk/src/VBox/Main/src-all/win/VBoxProxyStub.c

    r59385 r59389  
    401401    rc = RegOpenKeyExA(hkeyRoot, pszSubRoot, 0 /*fOptions*/, pState->fSamBoth, &pState->hkeyClassesRootDst);
    402402    AssertMsgReturn(rc == ERROR_SUCCESS, ("%u\n", rc), pState->rc = rc);
    403     rc = RegOpenKeyExA(pState->hkeyClassesRootDst, "CLSID", 0 /*fOptions*/, pState->fSamBoth, &pState->hkeyClsidRootDst);
     403    rc = RegCreateKeyExW(pState->hkeyClassesRootDst, L"CLSID", 0 /*Reserved*/, NULL /*pszClass*/, 0 /*fOptions*/,
     404                         pState->fSamBoth, NULL /*pSecAttr*/, &pState->hkeyClsidRootDst, NULL /*pdwDisposition*/);
    404405    AssertMsgReturn(rc == ERROR_SUCCESS, ("%u\n", rc), pState->rc = rc);
    405406
     
    491492    {
    492493        /* Try open the CLSID subkey, it's fine if it doesn't exists. */
    493         rc = RegOpenKeyExA(pState->aAltDeletes[i].hkeyClasses, "CLSID", 0 /*fOptions*/, pState->fSamDelete,
     494        rc = RegOpenKeyExW(pState->aAltDeletes[i].hkeyClasses, L"CLSID", 0 /*fOptions*/, pState->fSamDelete,
    494495                           &pState->aAltDeletes[i].hkeyClsid);
    495496        if (rc == ERROR_SUCCESS || rc == ERROR_FILE_NOT_FOUND)
     
    537538    if (pState->hkeyInterfaceRootDst == NULL)
    538539    {
    539         rc = RegOpenKeyExW(pState->hkeyClassesRootDst, L"Interface", 0 /*fOptions*/, pState->fSamBoth,
    540                            &pState->hkeyInterfaceRootDst);
     540        if (pState->fSamUpdate)
     541            rc = RegCreateKeyExW(pState->hkeyClassesRootDst, L"Interface", 0 /*Reserved*/, NULL /*pszClass*/, 0 /*fOptions*/,
     542                                 pState->fSamBoth, NULL /*pSecAttr*/, &pState->hkeyClsidRootDst, NULL /*pdwDisposition*/);
     543        else
     544            rc = RegOpenKeyExW(pState->hkeyClassesRootDst, L"Interface", 0 /*fOptions*/, pState->fSamBoth,
     545                               &pState->hkeyClsidRootDst);
    541546        AssertMsgReturnStmt(rc == ERROR_SUCCESS, ("%u\n", rc), pState->hkeyInterfaceRootDst = NULL,  pState->rc = rc);
    542547    }
     
    10151020    }
    10161021
    1017     rc = RegOpenKeyExW(pState->hkeyClassesRootDst, L"AppID", 0 /*fOptions*/, pState->fSamBoth, &hkeyAppIds);
     1022    if (pState->fUpdate)
     1023        rc = RegCreateKeyExW(pState->hkeyClassesRootDst, L"AppID", 0 /*Reserved*/, NULL /*pszClass*/, 0 /*fOptions*/,
     1024                             pState->fSamBoth, NULL /*pSecAttr*/, &hkeyAppIds, NULL /*pdwDisposition*/);
     1025
     1026    else
     1027    {
     1028        rc = RegOpenKeyExW(pState->hkeyClassesRootDst, L"AppID", 0 /*fOptions*/, pState->fSamBoth, &hkeyAppIds);
     1029        if (rc == ERROR_FILE_NOT_FOUND)
     1030            return ERROR_SUCCESS;
     1031    }
    10181032    AssertMsgReturn(rc == ERROR_SUCCESS, ("%u\n", rc), pState->rc = rc);
    10191033
     
    13171331            vbpsCreateRegKeyWithDefaultValueAA(pState, hkeyMajMin, "FLAGS", "0", __LINE__);
    13181332
     1333#if 0 /* Skip it. It's for non-existing help files and regsvr32 and msi have different ides about trailing slashes. */
    13191334            /* {UUID}/Major.Minor/HELPDIR */
    13201335            rc = RTUtf16Copy(wszBuf, MAX_PATH, pwszVBoxDir); AssertRC(rc);
     
    13241339            wszBuf[off] = '\0';
    13251340            vbpsCreateRegKeyWithDefaultValueAW(pState, hkeyMajMin, "HELPDIR", wszBuf, __LINE__);
     1341#endif
    13261342
    13271343            vbpsCloseKey(pState, hkeyMajMin, __LINE__);
     
    14241440                vbpsCreateRegKeyWithDefaultValueAA(pState, hkeyIfId, "NumMethods", szMethods, __LINE__);
    14251441                /** @todo Not having the typelib here means we'll have to fix the orphan cleanup
    1426                  *        code below. */
     1442                 *        code below.
     1443                 *  Update: MSI puts the typelib here. Hmm. */
    14271444
    14281445                vbpsCloseKey(pState, hkeyIfId, __LINE__);
     
    22012218#endif
    22022219
     2220    /** @todo Should probably skip this when VBoxSVC is already running...  Use
     2221     *        some mutex or something for checking. */
     2222
    22032223    /*
    22042224     * Find the VirtualBox application directory first.
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