VirtualBox

Changeset 59392 in vbox for trunk/src/VBox/Main/src-all/win


Ignore:
Timestamp:
Jan 19, 2016 2:01:58 AM (9 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
105089
Message:

VBoxProxyStub: Some adjustments to follow what MSI does rather than regsvr32/comregister.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-all/win/VBoxProxyStub.c

    r59391 r59392  
    12551255    /* VBoxC */
    12561256    VbpsRegisterClassName(pState, "VirtualBox.Session.1", "Session Class", &CLSID_Session, NULL);
    1257     VbpsRegisterClassName(pState, "VirtualBox.Session", "Session Class", &CLSID_Session, "VirtualBox.Session.1");
     1257    VbpsRegisterClassName(pState, "VirtualBox.Session", "Session Class", &CLSID_Session, ".1");
    12581258    VbpsRegisterClassId(pState, &CLSID_Session, "Session Class", pszAppId, "VirtualBox.Session", ".1",
    12591259                        &LIBID_VirtualBox, "InprocServer32", pwszVBoxDir, pszInprocDll, "Free");
     
    13131313        {
    13141314            RTUTF16 wszBuf[MAX_PATH * 2];
    1315 #if 0
    1316             size_t  off;
    1317 #endif
    13181315
    13191316            /* {UUID}/Major.Minor/0. */
     
    13331330            vbpsCreateRegKeyWithDefaultValueAA(pState, hkeyMajMin, "FLAGS", "0", __LINE__);
    13341331
    1335 #if 0 /* Skip it. It's for non-existing help files and regsvr32 and msi have different ides about trailing slashes. */
    13361332            /* {UUID}/Major.Minor/HELPDIR */
    13371333            rc = RTUtf16Copy(wszBuf, MAX_PATH, pwszVBoxDir); AssertRC(rc);
    1338             off = RTUtf16Len(wszBuf);
    1339             while (off > 2 && wszBuf[off - 2] != ':' && RTPATH_IS_SLASH(wszBuf[off - 1]))
    1340                 off--;
    1341             wszBuf[off] = '\0';
     1334#if 0 /* MSI: trailing slash;  regsvr32/comregister: strip unnecessary trailing slash.  Go with MSI to avoid user issues. */
     1335            {
     1336                size_t off = RTUtf16Len(wszBuf);
     1337                while (off > 2 && wszBuf[off - 2] != ':' && RTPATH_IS_SLASH(wszBuf[off - 1]))
     1338                    off--;
     1339                wszBuf[off] = '\0';
     1340            }
     1341#endif
    13421342            vbpsCreateRegKeyWithDefaultValueAW(pState, hkeyMajMin, "HELPDIR", wszBuf, __LINE__);
    1343 #endif
    13441343
    13451344            vbpsCloseKey(pState, hkeyMajMin, __LINE__);
     
    13971396    LSTATUS               rc;
    13981397    char                  szProxyClsId[CURLY_UUID_STR_BUF_SIZE];
     1398    char                  szTypeLibId[CURLY_UUID_STR_BUF_SIZE];
     1399    char                  szTypeLibVersion[64];
    13991400
    14001401    vbpsFormatUuidInCurly(szProxyClsId, &g_ProxyClsId);
     1402    vbpsFormatUuidInCurly(szTypeLibId, &LIBID_VirtualBox);
     1403    sprintf(szTypeLibVersion, "%u.%u", kTypeLibraryMajorVersion, kTypeLibraryMinorVersion);
    14011404
    14021405    Assert(pState->fUpdate && !pState->fDelete);
     
    14391442            if (rc == ERROR_SUCCESS)
    14401443            {
     1444                HKEY hkeyTypeLib;
    14411445                vbpsCreateRegKeyWithDefaultValueAA(pState, hkeyIfId, "ProxyStubClsid32", szProxyClsId, __LINE__);
    14421446                vbpsCreateRegKeyWithDefaultValueAA(pState, hkeyIfId, "NumMethods", szMethods, __LINE__);
    1443                 /** @todo Not having the typelib here means we'll have to fix the orphan cleanup
    1444                  *        code below.
    1445                  *  Update: MSI puts the typelib here. Hmm. */
     1447
     1448                /* The MSI seems to still be putting TypeLib keys here. So, let's do that too. */
     1449                rc = vbpsCreateRegKeyWithDefaultValueAAEx(pState, hkeyIfId, "TypeLib", szTypeLibId, &hkeyTypeLib, __LINE__);
     1450                if (rc == ERROR_SUCCESS)
     1451                {
     1452                    vbpsSetRegValueAA(pState, hkeyTypeLib, "Version", szTypeLibVersion, __LINE__);
     1453                    vbpsCloseKey(pState, hkeyTypeLib, __LINE__);
     1454                }
    14461455
    14471456                vbpsCloseKey(pState, hkeyIfId, __LINE__);
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