VirtualBox

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


Ignore:
Timestamp:
Nov 26, 2018 3:44:41 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
126937
Message:

HGCM: Replace C++-style inline members on VBOXHGCMSVCPARM with simple functions.
bugref:9172: Shared folder performance tuning
Changes in bugref:9172 caused a build regression on Ubuntu 18.10 due to the
use of RT_ZERO on a structure containing an embedded VBOXHGCMSVCPARM, as
VBOXHGCMSVCPARM had member functions and was therefore not a simple plain-
old-data structure. Rather than just doing the sensible thing and zeroing
it in a different way, I converted the inline member getters and setters to
standard inline C functions, including fixing callers. Actually I had planned
this for some time, as the member function use seemed a bit gratuitous in
hindsight.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/GuestDnDPrivate.h

    r74714 r75737  
    887887        }
    888888
    889         pParm->setPointer(pvTmp, cbBuf);
     889        HGCMSvcSetPv(pParm, pvTmp, cbBuf);
    890890        return VINF_SUCCESS;
    891891    }
     
    901901            return VERR_NO_MEMORY;
    902902
    903         pParm->setString(pszTemp);
     903        HGCMSvcSetStr(pParm, pszTemp);
    904904        return VINF_SUCCESS;
    905905    }
     
    911911            return VERR_NO_MEMORY;
    912912
    913         pParm->setUInt32(u32Val);
     913        HGCMSvcSetU32(pParm, u32Val);
    914914        return VINF_SUCCESS;
    915915    }
     
    921921            return VERR_NO_MEMORY;
    922922
    923         pParm->setUInt64(u64Val);
     923        HGCMSvcSetU64(pParm, u64Val);
    924924        return VINF_SUCCESS;
    925925    }
  • trunk/src/VBox/Main/src-client/ConsoleImpl.cpp

    r75574 r75737  
    86498649        SHFLSTRING_TO_HGMC_PARAM(&aParams[0], pHostPath);
    86508650        SHFLSTRING_TO_HGMC_PARAM(&aParams[1], pName);
    8651         aParams[2].setUInt32(  (aData.m_fWritable  ? SHFL_ADD_MAPPING_F_WRITABLE : 0)
    8652                              | (aData.m_fAutoMount ? SHFL_ADD_MAPPING_F_AUTOMOUNT : 0)
    8653                              | (fSymlinksCreate    ? SHFL_ADD_MAPPING_F_CREATE_SYMLINKS : 0)
    8654                              | (fMissing           ? SHFL_ADD_MAPPING_F_MISSING : 0));
     8651        HGCMSvcSetU32(&aParams[2],
     8652                        (aData.m_fWritable  ? SHFL_ADD_MAPPING_F_WRITABLE : 0)
     8653                      | (aData.m_fAutoMount ? SHFL_ADD_MAPPING_F_AUTOMOUNT : 0)
     8654                      | (fSymlinksCreate    ? SHFL_ADD_MAPPING_F_CREATE_SYMLINKS : 0)
     8655                      | (fMissing           ? SHFL_ADD_MAPPING_F_MISSING : 0));
    86558656        SHFLSTRING_TO_HGMC_PARAM(&aParams[3], pAutoMountPoint);
    86568657        AssertCompile(SHFL_CPARMS_ADD_MAPPING == 4);
  • trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp

    r75700 r75737  
    30683068                    /* Setup the service. */
    30693069                    VBOXHGCMSVCPARM parm;
    3070                     parm.type = VBOX_HGCM_SVC_PARM_32BIT;
    3071                     parm.setUInt32(!i_useHostClipboard());
     3070                    HGCMSvcSetU32(&parm, !i_useHostClipboard());
    30723071                    pVMMDev->hgcmHostCall("VBoxSharedClipboard",
    30733072                                          VBOX_SHARED_CLIPBOARD_HOST_FN_SET_HEADLESS, 1, &parm);
     
    60726071int configSetGlobalPropertyFlags(VMMDev * const pVMMDev, uint32_t fFlags)
    60736072{
    6074     VBOXHGCMSVCPARM paParm;
    6075     paParm.setUInt32(fFlags);
    6076     int rc = pVMMDev->hgcmHostCall("VBoxGuestPropSvc", GUEST_PROP_FN_HOST_SET_GLOBAL_FLAGS, 1, &paParm);
     6073    VBOXHGCMSVCPARM parm;
     6074    HGCMSvcSetU32(&parm, fFlags);
     6075    int rc = pVMMDev->hgcmHostCall("VBoxGuestPropSvc", GUEST_PROP_FN_HOST_SET_GLOBAL_FLAGS, 1, &parm);
    60776076    if (RT_FAILURE(rc))
    60786077    {
  • trunk/src/VBox/Main/src-client/GuestCtrlImpl.cpp

    r73003 r75737  
    106106    {
    107107        uint32_t uContextID;
    108         int rc = pSvcCb->mpaParms[0].getUInt32(&uContextID);
     108        int rc = HGCMSvcGetU32(&pSvcCb->mpaParms[0], &uContextID);
    109109        AssertMsgRCReturn(rc, ("Unable to extract callback context ID, pvData=%p\n", pSvcCb),
    110110                          VINF_SUCCESS /* Never return any errors back to the guest here */);
     
    166166            CALLBACKDATA_PROC_STATUS dataCb;
    167167            /* pSvcCb->mpaParms[0] always contains the context ID. */
    168             pSvcCb->mpaParms[1].getUInt32(&dataCb.uPID);
    169             pSvcCb->mpaParms[2].getUInt32(&dataCb.uStatus);
    170             pSvcCb->mpaParms[3].getUInt32(&dataCb.uFlags);
    171             pSvcCb->mpaParms[4].getPointer(&dataCb.pvData, &dataCb.cbData);
     168            HGCMSvcGetU32(&pSvcCb->mpaParms[1], &dataCb.uPID);
     169            HGCMSvcGetU32(&pSvcCb->mpaParms[2], &dataCb.uStatus);
     170            HGCMSvcGetU32(&pSvcCb->mpaParms[3], &dataCb.uFlags);
     171            HGCMSvcGetPv(&pSvcCb->mpaParms[4], &dataCb.pvData, &dataCb.cbData);
    172172
    173173            if (   (         dataCb.uStatus == PROC_STS_ERROR)
  • trunk/src/VBox/Main/src-client/GuestCtrlPrivate.cpp

    r74752 r75737  
    748748                    CALLBACKDATA_MSG_REPLY dataCb;
    749749                    /* pSvcCb->mpaParms[0] always contains the context ID. */
    750                     vrc = pSvcCb->mpaParms[idx++].getUInt32(&dataCb.uType);
     750                    vrc = HGCMSvcGetU32(&pSvcCb->mpaParms[idx++], &dataCb.uType);
    751751                    AssertRCReturn(vrc, vrc);
    752                     vrc = pSvcCb->mpaParms[idx++].getUInt32(&dataCb.rc);
     752                    vrc = HGCMSvcGetU32(&pSvcCb->mpaParms[idx++], &dataCb.rc);
    753753                    AssertRCReturn(vrc, vrc);
    754                     vrc = pSvcCb->mpaParms[idx++].getPointer(&dataCb.pvPayload, &dataCb.cbPayload);
     754                    vrc = HGCMSvcGetPv(&pSvcCb->mpaParms[idx++], &dataCb.pvPayload,
     755                                       &dataCb.cbPayload);
    755756                    AssertRCReturn(vrc, vrc);
    756757
  • trunk/src/VBox/Main/src-client/GuestDirectoryImpl.cpp

    r73063 r75737  
    180180            CALLBACKDATA_DIR_NOTIFY dataCb;
    181181            /* pSvcCb->mpaParms[0] always contains the context ID. */
    182             pSvcCb->mpaParms[idx++].getUInt32(&dataCb.uType);
    183             pSvcCb->mpaParms[idx++].getUInt32(&dataCb.rc);
     182            HGCMSvcGetU32(&pSvcCb->mpaParms[idx++], &dataCb.uType);
     183            HGCMSvcGetU32(&pSvcCb->mpaParms[idx++], &dataCb.rc);
    184184
    185185            LogFlowFunc(("uType=%RU32, vrcGguest=%Rrc\n", dataCb.uType, (int)dataCb.rc));
  • trunk/src/VBox/Main/src-client/GuestFileImpl.cpp

    r75094 r75737  
    379379    VBOXHGCMSVCPARM paParms[4];
    380380    int i = 0;
    381     paParms[i++].setUInt32(pEvent->ContextID());
    382     paParms[i++].setUInt32(mObjectID /* Guest file ID */);
     381    HGCMSvcSetU32(&paParms[i++], pEvent->ContextID());
     382    HGCMSvcSetU32(&paParms[i++], mObjectID /* Guest file ID */);
    383383
    384384    vrc = sendCommand(HOST_FILE_CLOSE, i, paParms);
     
    441441    CALLBACKDATA_FILE_NOTIFY dataCb;
    442442    /* pSvcCb->mpaParms[0] always contains the context ID. */
    443     pSvcCbData->mpaParms[idx++].getUInt32(&dataCb.uType);
    444     pSvcCbData->mpaParms[idx++].getUInt32(&dataCb.rc);
     443    HGCMSvcGetU32(&pSvcCbData->mpaParms[idx++], &dataCb.uType);
     444    HGCMSvcGetU32(&pSvcCbData->mpaParms[idx++], &dataCb.rc);
    445445
    446446    int rcGuest = (int)dataCb.rc; /* uint32_t vs. int. */
     
    476476            if (pSvcCbData->mParms == 4)
    477477            {
    478                 rc = pSvcCbData->mpaParms[idx++].getUInt32(&dataCb.u.open.uHandle);
     478                rc = HGCMSvcGetU32(&pSvcCbData->mpaParms[idx++], &dataCb.u.open.uHandle);
    479479                if (RT_FAILURE(rc))
    480480                    break;
     
    496496            if (pSvcCbData->mParms == 4)
    497497            {
    498                 rc = pSvcCbData->mpaParms[idx++].getPointer(&dataCb.u.read.pvData, &dataCb.u.read.cbData);
     498                rc = HGCMSvcGetPv(&pSvcCbData->mpaParms[idx++], &dataCb.u.read.pvData,
     499                                  &dataCb.u.read.cbData);
    499500                if (RT_FAILURE(rc))
    500501                    break;
     
    523524            if (pSvcCbData->mParms == 4)
    524525            {
    525                 rc = pSvcCbData->mpaParms[idx++].getUInt32(&dataCb.u.write.cbWritten);
     526                rc = HGCMSvcGetU32(&pSvcCbData->mpaParms[idx++], &dataCb.u.write.cbWritten);
    526527                if (RT_FAILURE(rc))
    527528                    break;
     
    545546            if (pSvcCbData->mParms == 4)
    546547            {
    547                 rc = pSvcCbData->mpaParms[idx++].getUInt64(&dataCb.u.seek.uOffActual);
     548                rc = HGCMSvcGetU64(&pSvcCbData->mpaParms[idx++], &dataCb.u.seek.uOffActual);
    548549                if (RT_FAILURE(rc))
    549550                    break;
     
    566567            if (pSvcCbData->mParms == 4)
    567568            {
    568                 rc = pSvcCbData->mpaParms[idx++].getUInt64(&dataCb.u.tell.uOffActual);
     569                rc = HGCMSvcGetU64(&pSvcCbData->mpaParms[idx++], &dataCb.u.tell.uOffActual);
    569570                if (RT_FAILURE(rc))
    570571                    break;
     
    713714    VBOXHGCMSVCPARM paParms[8];
    714715    int i = 0;
    715     paParms[i++].setUInt32(pEvent->ContextID());
    716     paParms[i++].setPointer((void*)mData.mOpenInfo.mFileName.c_str(),
    717                             (ULONG)mData.mOpenInfo.mFileName.length() + 1);
    718     paParms[i++].setString(pszAccessMode);
    719     paParms[i++].setString(pszOpenAction);
    720     paParms[i++].setString(pszSharingMode);
    721     paParms[i++].setUInt32(mData.mOpenInfo.mCreationMode);
    722     paParms[i++].setUInt64(mData.mOpenInfo.muOffset);
     716    HGCMSvcSetU32(&paParms[i++], pEvent->ContextID());
     717    HGCMSvcSetPv(&paParms[i++], (void*)mData.mOpenInfo.mFileName.c_str(),
     718                 (ULONG)mData.mOpenInfo.mFileName.length() + 1);
     719    HGCMSvcSetStr(&paParms[i++], pszAccessMode);
     720    HGCMSvcSetStr(&paParms[i++], pszOpenAction);
     721    HGCMSvcSetStr(&paParms[i++], pszSharingMode);
     722    HGCMSvcSetU32(&paParms[i++], mData.mOpenInfo.mCreationMode);
     723    HGCMSvcSetU64(&paParms[i++], mData.mOpenInfo.muOffset);
    723724    /** @todo Next protocol version: add flags, replace strings, remove initial offset. */
    724725
     
    774775    VBOXHGCMSVCPARM paParms[4];
    775776    int i = 0;
    776     paParms[i++].setUInt32(pEvent->ContextID());
    777     paParms[i++].setUInt32(mObjectID /* File handle */);
    778     paParms[i++].setUInt32(uSize /* Size (in bytes) to read */);
     777    HGCMSvcSetU32(&paParms[i++], pEvent->ContextID());
     778    HGCMSvcSetU32(&paParms[i++], mObjectID /* File handle */);
     779    HGCMSvcSetU32(&paParms[i++], uSize /* Size (in bytes) to read */);
    779780
    780781    alock.release(); /* Drop write lock before sending. */
     
    833834    VBOXHGCMSVCPARM paParms[4];
    834835    int i = 0;
    835     paParms[i++].setUInt32(pEvent->ContextID());
    836     paParms[i++].setUInt32(mObjectID /* File handle */);
    837     paParms[i++].setUInt64(uOffset /* Offset (in bytes) to start reading */);
    838     paParms[i++].setUInt32(uSize /* Size (in bytes) to read */);
     836    HGCMSvcSetU32(&paParms[i++], pEvent->ContextID());
     837    HGCMSvcSetU32(&paParms[i++], mObjectID /* File handle */);
     838    HGCMSvcSetU64(&paParms[i++], uOffset /* Offset (in bytes) to start reading */);
     839    HGCMSvcSetU32(&paParms[i++], uSize /* Size (in bytes) to read */);
    839840
    840841    alock.release(); /* Drop write lock before sending. */
     
    894895    VBOXHGCMSVCPARM paParms[4];
    895896    int i = 0;
    896     paParms[i++].setUInt32(pEvent->ContextID());
    897     paParms[i++].setUInt32(mObjectID /* File handle */);
    898     paParms[i++].setUInt32(eSeekType /* Seek method */);
     897    HGCMSvcSetU32(&paParms[i++], pEvent->ContextID());
     898    HGCMSvcSetU32(&paParms[i++], mObjectID /* File handle */);
     899    HGCMSvcSetU32(&paParms[i++], eSeekType /* Seek method */);
    899900    /** @todo uint64_t vs. int64_t! */
    900     paParms[i++].setUInt64((uint64_t)iOffset /* Offset (in bytes) to start reading */);
     901    HGCMSvcSetU64(&paParms[i++], (uint64_t)iOffset /* Offset (in bytes) to start reading */);
    901902
    902903    alock.release(); /* Drop write lock before sending. */
     
    11591160    VBOXHGCMSVCPARM paParms[8];
    11601161    int i = 0;
    1161     paParms[i++].setUInt32(pEvent->ContextID());
    1162     paParms[i++].setUInt32(mObjectID /* File handle */);
    1163     paParms[i++].setUInt32(cbData /* Size (in bytes) to write */);
    1164     paParms[i++].setPointer(pvData, cbData);
     1162    HGCMSvcSetU32(&paParms[i++], pEvent->ContextID());
     1163    HGCMSvcSetU32(&paParms[i++], mObjectID /* File handle */);
     1164    HGCMSvcSetU32(&paParms[i++], cbData /* Size (in bytes) to write */);
     1165    HGCMSvcSetPv(&paParms[i++], pvData, cbData);
    11651166
    11661167    alock.release(); /* Drop write lock before sending. */
     
    12221223    VBOXHGCMSVCPARM paParms[8];
    12231224    int i = 0;
    1224     paParms[i++].setUInt32(pEvent->ContextID());
    1225     paParms[i++].setUInt32(mObjectID /* File handle */);
    1226     paParms[i++].setUInt64(uOffset /* Offset where to starting writing */);
    1227     paParms[i++].setUInt32(cbData /* Size (in bytes) to write */);
    1228     paParms[i++].setPointer(pvData, cbData);
     1225    HGCMSvcSetU32(&paParms[i++], pEvent->ContextID());
     1226    HGCMSvcSetU32(&paParms[i++], mObjectID /* File handle */);
     1227    HGCMSvcSetU64(&paParms[i++], uOffset /* Offset where to starting writing */);
     1228    HGCMSvcSetU32(&paParms[i++], cbData /* Size (in bytes) to write */);
     1229    HGCMSvcSetPv(&paParms[i++], pvData, cbData);
    12291230
    12301231    alock.release(); /* Drop write lock before sending. */
  • trunk/src/VBox/Main/src-client/GuestProcessImpl.cpp

    r73505 r75737  
    610610    CALLBACKDATA_PROC_INPUT dataCb;
    611611    /* pSvcCb->mpaParms[0] always contains the context ID. */
    612     int vrc = pSvcCbData->mpaParms[1].getUInt32(&dataCb.uPID);
     612    int vrc = HGCMSvcGetU32(&pSvcCbData->mpaParms[1], &dataCb.uPID);
    613613    AssertRCReturn(vrc, vrc);
    614     vrc = pSvcCbData->mpaParms[2].getUInt32(&dataCb.uStatus);
     614    vrc = HGCMSvcGetU32(&pSvcCbData->mpaParms[2], &dataCb.uStatus);
    615615    AssertRCReturn(vrc, vrc);
    616     vrc = pSvcCbData->mpaParms[3].getUInt32(&dataCb.uFlags);
     616    vrc = HGCMSvcGetU32(&pSvcCbData->mpaParms[3], &dataCb.uFlags);
    617617    AssertRCReturn(vrc, vrc);
    618     vrc = pSvcCbData->mpaParms[4].getUInt32(&dataCb.uProcessed);
     618    vrc = HGCMSvcGetU32(&pSvcCbData->mpaParms[4], &dataCb.uProcessed);
    619619    AssertRCReturn(vrc, vrc);
    620620
     
    684684    CALLBACKDATA_PROC_STATUS dataCb;
    685685    /* pSvcCb->mpaParms[0] always contains the context ID. */
    686     int vrc = pSvcCbData->mpaParms[1].getUInt32(&dataCb.uPID);
     686    int vrc = HGCMSvcGetU32(&pSvcCbData->mpaParms[1], &dataCb.uPID);
    687687    AssertRCReturn(vrc, vrc);
    688     vrc = pSvcCbData->mpaParms[2].getUInt32(&dataCb.uStatus);
     688    vrc = HGCMSvcGetU32(&pSvcCbData->mpaParms[2], &dataCb.uStatus);
    689689    AssertRCReturn(vrc, vrc);
    690     vrc = pSvcCbData->mpaParms[3].getUInt32(&dataCb.uFlags);
     690    vrc = HGCMSvcGetU32(&pSvcCbData->mpaParms[3], &dataCb.uFlags);
    691691    AssertRCReturn(vrc, vrc);
    692     vrc = pSvcCbData->mpaParms[4].getPointer(&dataCb.pvData, &dataCb.cbData);
     692    vrc = HGCMSvcGetPv(&pSvcCbData->mpaParms[4], &dataCb.pvData, &dataCb.cbData);
    693693    AssertRCReturn(vrc, vrc);
    694694
     
    794794    CALLBACKDATA_PROC_OUTPUT dataCb;
    795795    /* pSvcCb->mpaParms[0] always contains the context ID. */
    796     int vrc = pSvcCbData->mpaParms[1].getUInt32(&dataCb.uPID);
     796    int vrc = HGCMSvcGetU32(&pSvcCbData->mpaParms[1], &dataCb.uPID);
    797797    AssertRCReturn(vrc, vrc);
    798     vrc = pSvcCbData->mpaParms[2].getUInt32(&dataCb.uHandle);
     798    vrc = HGCMSvcGetU32(&pSvcCbData->mpaParms[2], &dataCb.uHandle);
    799799    AssertRCReturn(vrc, vrc);
    800     vrc = pSvcCbData->mpaParms[3].getUInt32(&dataCb.uFlags);
     800    vrc = HGCMSvcGetU32(&pSvcCbData->mpaParms[3], &dataCb.uFlags);
    801801    AssertRCReturn(vrc, vrc);
    802     vrc = pSvcCbData->mpaParms[4].getPointer(&dataCb.pvData, &dataCb.cbData);
     802    vrc = HGCMSvcGetPv(&pSvcCbData->mpaParms[4], &dataCb.pvData, &dataCb.cbData);
    803803    AssertRCReturn(vrc, vrc);
    804804
     
    909909        VBOXHGCMSVCPARM paParms[8];
    910910        int i = 0;
    911         paParms[i++].setUInt32(pEvent->ContextID());
    912         paParms[i++].setUInt32(mData.mPID);
    913         paParms[i++].setUInt32(uHandle);
    914         paParms[i++].setUInt32(0 /* Flags, none set yet. */);
     911        HGCMSvcSetU32(&paParms[i++], pEvent->ContextID());
     912        HGCMSvcSetU32(&paParms[i++], mData.mPID);
     913        HGCMSvcSetU32(&paParms[i++], uHandle);
     914        HGCMSvcSetU32(&paParms[i++], 0 /* Flags, none set yet. */);
    915915
    916916        alock.release(); /* Drop the write lock before sending. */
     
    10941094        VBOXHGCMSVCPARM paParms[16];
    10951095        int i = 0;
    1096         paParms[i++].setUInt32(pEvent->ContextID());
    1097         paParms[i++].setCppString(mData.mProcess.mExecutable);
    1098         paParms[i++].setUInt32(mData.mProcess.mFlags);
    1099         paParms[i++].setUInt32((uint32_t)mData.mProcess.mArguments.size());
    1100         paParms[i++].setPointer(pszArgs, (uint32_t)cbArgs);
    1101         paParms[i++].setUInt32(mData.mProcess.mEnvironmentChanges.count());
    1102         paParms[i++].setUInt32((uint32_t)cbEnvBlock);
    1103         paParms[i++].setPointer(pszzEnvBlock, (uint32_t)cbEnvBlock);
     1096        HGCMSvcSetU32(&paParms[i++], pEvent->ContextID());
     1097        HGCMSvcSetRTCStr(&paParms[i++], mData.mProcess.mExecutable);
     1098        HGCMSvcSetU32(&paParms[i++], mData.mProcess.mFlags);
     1099        HGCMSvcSetU32(&paParms[i++], (uint32_t)mData.mProcess.mArguments.size());
     1100        HGCMSvcSetPv(&paParms[i++], pszArgs, (uint32_t)cbArgs);
     1101        HGCMSvcSetU32(&paParms[i++], mData.mProcess.mEnvironmentChanges.count());
     1102        HGCMSvcSetU32(&paParms[i++], (uint32_t)cbEnvBlock);
     1103        HGCMSvcSetPv(&paParms[i++], pszzEnvBlock, (uint32_t)cbEnvBlock);
    11041104        if (uProtocol < 2)
    11051105        {
     
    11071107             * call. In newer protocols these credentials are part of the opened guest
    11081108             * session, so not needed anymore here. */
    1109             paParms[i++].setCppString(sessionCreds.mUser);
    1110             paParms[i++].setCppString(sessionCreds.mPassword);
     1109            HGCMSvcSetRTCStr(&paParms[i++], sessionCreds.mUser);
     1110            HGCMSvcSetRTCStr(&paParms[i++], sessionCreds.mPassword);
    11111111        }
    11121112        /*
     
    11171117         */
    11181118        if (mData.mProcess.mFlags & ProcessCreateFlag_WaitForProcessStartOnly)
    1119             paParms[i++].setUInt32(UINT32_MAX /* Infinite timeout */);
     1119            HGCMSvcSetU32(&paParms[i++], UINT32_MAX /* Infinite timeout */);
    11201120        else
    1121             paParms[i++].setUInt32(mData.mProcess.mTimeoutMS);
     1121            HGCMSvcSetU32(&paParms[i++], mData.mProcess.mTimeoutMS);
    11221122        if (uProtocol >= 2)
    11231123        {
    1124             paParms[i++].setUInt32(mData.mProcess.mPriority);
     1124            HGCMSvcSetU32(&paParms[i++], mData.mProcess.mPriority);
    11251125            /* CPU affinity: We only support one CPU affinity block at the moment,
    11261126             * so that makes up to 64 CPUs total. This can be more in the future. */
    1127             paParms[i++].setUInt32(1);
     1127            HGCMSvcSetU32(&paParms[i++], 1);
    11281128            /* The actual CPU affinity blocks. */
    1129             paParms[i++].setPointer((void *)&mData.mProcess.mAffinity, sizeof(mData.mProcess.mAffinity));
     1129            HGCMSvcSetPv(&paParms[i++], (void *)&mData.mProcess.mAffinity, sizeof(mData.mProcess.mAffinity));
    11301130        }
    11311131
     
    12461246            VBOXHGCMSVCPARM paParms[4];
    12471247            int i = 0;
    1248             paParms[i++].setUInt32(pEvent->ContextID());
    1249             paParms[i++].setUInt32(mData.mPID);
     1248            HGCMSvcSetU32(&paParms[i++], pEvent->ContextID());
     1249            HGCMSvcSetU32(&paParms[i++], mData.mPID);
    12501250
    12511251            alock.release(); /* Drop the write lock before sending. */
     
    17241724    VBOXHGCMSVCPARM paParms[5];
    17251725    int i = 0;
    1726     paParms[i++].setUInt32(pEvent->ContextID());
    1727     paParms[i++].setUInt32(mData.mPID);
    1728     paParms[i++].setUInt32(uFlags);
    1729     paParms[i++].setPointer(pvData, (uint32_t)cbData);
    1730     paParms[i++].setUInt32((uint32_t)cbData);
     1726    HGCMSvcSetU32(&paParms[i++], pEvent->ContextID());
     1727    HGCMSvcSetU32(&paParms[i++], mData.mPID);
     1728    HGCMSvcSetU32(&paParms[i++], uFlags);
     1729    HGCMSvcSetPv(&paParms[i++], pvData, (uint32_t)cbData);
     1730    HGCMSvcSetU32(&paParms[i++], (uint32_t)cbData);
    17311731
    17321732    alock.release(); /* Drop the write lock before sending. */
  • trunk/src/VBox/Main/src-client/GuestSessionImpl.cpp

    r75605 r75737  
    713713    VBOXHGCMSVCPARM paParms[4];
    714714    int i = 0;
    715     paParms[i++].setUInt32(pEvent->ContextID());
    716     paParms[i++].setUInt32(uFlags);
     715    HGCMSvcSetU32(&paParms[i++], pEvent->ContextID());
     716    HGCMSvcSetU32(&paParms[i++], uFlags);
    717717
    718718    alock.release(); /* Drop the write lock before waiting. */
     
    10661066    VBOXHGCMSVCPARM paParms[8];
    10671067    int i = 0;
    1068     paParms[i++].setUInt32(pEvent->ContextID());
    1069     paParms[i++].setPointer((void*)strPath.c_str(),
     1068    HGCMSvcSetU32(&paParms[i++], pEvent->ContextID());
     1069    HGCMSvcSetPv(&paParms[i++], (void*)strPath.c_str(),
    10701070                            (ULONG)strPath.length() + 1);
    1071     paParms[i++].setUInt32(uFlags);
     1071    HGCMSvcSetU32(&paParms[i++], uFlags);
    10721072
    10731073    alock.release(); /* Drop write lock before sending. */
     
    17821782    CALLBACKDATA_SESSION_NOTIFY dataCb;
    17831783    /* pSvcCb->mpaParms[0] always contains the context ID. */
    1784     int vrc = pSvcCbData->mpaParms[1].getUInt32(&dataCb.uType);
     1784    int vrc = HGCMSvcGetU32(&pSvcCbData->mpaParms[1], &dataCb.uType);
    17851785    AssertRCReturn(vrc, vrc);
    1786     vrc = pSvcCbData->mpaParms[2].getUInt32(&dataCb.uResult);
     1786    vrc = HGCMSvcGetU32(&pSvcCbData->mpaParms[2], &dataCb.uResult);
    17871787    AssertRCReturn(vrc, vrc);
    17881788
     
    19341934
    19351935    int i = 0;
    1936     paParms[i++].setUInt32(pEvent->ContextID());
    1937     paParms[i++].setUInt32(mData.mProtocolVersion);
    1938     paParms[i++].setPointer((void*)mData.mCredentials.mUser.c_str(),
     1936    HGCMSvcSetU32(&paParms[i++], pEvent->ContextID());
     1937    HGCMSvcSetU32(&paParms[i++], mData.mProtocolVersion);
     1938    HGCMSvcSetPv(&paParms[i++], (void*)mData.mCredentials.mUser.c_str(),
    19391939                            (ULONG)mData.mCredentials.mUser.length() + 1);
    1940     paParms[i++].setPointer((void*)mData.mCredentials.mPassword.c_str(),
     1940    HGCMSvcSetPv(&paParms[i++], (void*)mData.mCredentials.mPassword.c_str(),
    19411941                            (ULONG)mData.mCredentials.mPassword.length() + 1);
    1942     paParms[i++].setPointer((void*)mData.mCredentials.mDomain.c_str(),
     1942    HGCMSvcSetPv(&paParms[i++], (void*)mData.mCredentials.mDomain.c_str(),
    19431943                            (ULONG)mData.mCredentials.mDomain.length() + 1);
    1944     paParms[i++].setUInt32(mData.mSession.mOpenFlags);
     1944    HGCMSvcSetU32(&paParms[i++], mData.mSession.mOpenFlags);
    19451945
    19461946    alock.release(); /* Drop write lock before sending. */
     
    21442144    VBOXHGCMSVCPARM paParms[8];
    21452145    int i = 0;
    2146     paParms[i++].setUInt32(pEvent->ContextID());
    2147     paParms[i++].setPointer((void*)strSource.c_str(),
     2146    HGCMSvcSetU32(&paParms[i++], pEvent->ContextID());
     2147    HGCMSvcSetPv(&paParms[i++], (void*)strSource.c_str(),
    21482148                            (ULONG)strSource.length() + 1);
    2149     paParms[i++].setPointer((void*)strDest.c_str(),
     2149    HGCMSvcSetPv(&paParms[i++], (void*)strDest.c_str(),
    21502150                            (ULONG)strDest.length() + 1);
    2151     paParms[i++].setUInt32(uFlags);
     2151    HGCMSvcSetU32(&paParms[i++], uFlags);
    21522152
    21532153    alock.release(); /* Drop write lock before sending. */
     
    21902190    VBOXHGCMSVCPARM paParms[2];
    21912191    int i = 0;
    2192     paParms[i++].setUInt32(pEvent->ContextID());
     2192    HGCMSvcSetU32(&paParms[i++], pEvent->ContextID());
    21932193
    21942194    alock.release(); /* Drop write lock before sending. */
     
    22402240    VBOXHGCMSVCPARM paParms[2];
    22412241    int i = 0;
    2242     paParms[i++].setUInt32(pEvent->ContextID());
     2242    HGCMSvcSetU32(&paParms[i++], pEvent->ContextID());
    22432243
    22442244    alock.release(); /* Drop write lock before sending. */
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