VirtualBox

Changeset 25984 in vbox for trunk/src/VBox/Devices/Parallel


Ignore:
Timestamp:
Jan 23, 2010 12:19:47 AM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
56849
Message:

pdmifs.h: the penultimate batch of refactored interface ID code.

Location:
trunk/src/VBox/Devices/Parallel
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Parallel/DevParallel.cpp

    r25966 r25984  
    658658    if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0)
    659659        return &pThis->IBase;
    660     if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_HOST_PARALLEL_PORT) == 0)
    661         return &pThis->IHostParallelPort;
     660    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIHOSTPARALLELPORT, &pThis->IHostParallelPort);
    662661    return NULL;
    663662}
     
    832831    if (RT_SUCCESS(rc))
    833832    {
    834         pThis->pDrvHostParallelConnector = (PDMIHOSTPARALLELCONNECTOR *)pThis->pDrvBase->pfnQueryInterface(pThis->pDrvBase,
    835                                                                                                            PDMINTERFACE_HOST_PARALLEL_CONNECTOR);
    836         if (!pThis->pDrvHostParallelConnector)
    837         {
    838             AssertMsgFailed(("Configuration error: instance %d has no host parallel interface!\n", iInstance));
    839             return VERR_PDM_MISSING_INTERFACE;
    840         }
     833        pThis->pDrvHostParallelConnector = PDMIBASE_QUERY_INTERFACE(pThis->pDrvBase, PDMIHOSTPARALLELCONNECTOR);
     834        AssertMsgReturn(pThis->pDrvHostParallelConnector,
     835                        ("Configuration error: instance %d has no host parallel interface!\n", iInstance),
     836                        VERR_PDM_MISSING_INTERFACE);
    841837        /** @todo provide read notification interface!!!! */
    842838    }
  • trunk/src/VBox/Devices/Parallel/DrvHostParallel.cpp

    r25971 r25984  
    9393    if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0)
    9494        return &pDrvIns->IBase;
    95     if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_HOST_PARALLEL_CONNECTOR) == 0)
    96         return &pThis->IHostParallelConnector;
     95    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIHOSTPARALLELCONNECTOR, &pThis->IHostParallelConnector);
    9796    return NULL;
    9897}
     
    323322     * Get the IHostParallelPort interface of the above driver/device.
    324323     */
    325     pThis->pDrvHostParallelPort = (PPDMIHOSTPARALLELPORT)pDrvIns->pUpBase->pfnQueryInterface(pDrvIns->pUpBase, PDMINTERFACE_HOST_PARALLEL_PORT);
     324    pThis->pDrvHostParallelPort = PDMIBASE_QUERY_INTERFACE(pDrvIns->pUpBase, PDMIHOSTPARALLELPORT);
    326325    if (!pThis->pDrvHostParallelPort)
    327326        return PDMDrvHlpVMSetError(pDrvIns, VERR_PDM_MISSING_INTERFACE_ABOVE, RT_SRC_POS, N_("Parallel#%d has no parallel port interface above"),
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