VirtualBox

Changeset 94321 in vbox for trunk/src/VBox/Main/src-client


Ignore:
Timestamp:
Mar 22, 2022 11:27:12 AM (3 years ago)
Author:
vboxsync
Message:

Main/UsbCardReader: Drop passing pointers through CFGM in favor of using VMM2USERMETHODS::pfnQueryGenericObject, bugref:10053

Location:
trunk/src/VBox/Main/src-client
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/ConsoleImpl.cpp

    r94246 r94321  
    1094610946        return pConsole->m_pVMMDev;
    1094710947
     10948    if (UuidCopy == USBCARDREADER_OID)
     10949        return pConsole->mUsbCardReader;
     10950
    1094810951    if (UuidCopy == COM_IIDOF(ISnapshot))
    1094910952        return ((MYVMM2USERMETHODS *)pThis)->pISnapshot;
  • trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp

    r94070 r94321  
    22422242                InsertConfigString(pLunL0, "Driver", "UsbCardReader");
    22432243                InsertConfigNode(pLunL0,   "Config", &pCfg);
    2244                 InsertConfigInteger(pCfg,  "Object", (uintptr_t)mUsbCardReader);
    22452244# endif
    22462245             }
  • trunk/src/VBox/Main/src-client/UsbCardReader.cpp

    r93444 r94321  
    18861886    AssertMsgRCReturn(rc, ("Configuration error: No/bad \"Object\" value! rc=%Rrc\n", rc), rc);
    18871887
    1888     pThis->pUsbCardReader = (UsbCardReader *)pv;
     1888    com::Guid uuid(USBCARDREADER_OID);
     1889    pThis->pUsbCardReader = (UsbCardReader *)PDMDrvHlpQueryGenericUserObject(pDrvIns, uuid.raw());
     1890    AssertMsgReturn(RT_VALID_PTR(pThis->pUsbCardReader), ("Configuration error: No/bad USB card reader object value!\n"), VERR_NOT_FOUND);
     1891
    18891892    pThis->pUsbCardReader->mpDrv = pThis;
    18901893    pThis->pDrvIns = pDrvIns;
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