Changeset 25984 in vbox for trunk/src/VBox/Main
- Timestamp:
- Jan 23, 2010 12:19:47 AM (15 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/AudioSnifferInterface.cpp
r25966 r25984 126 126 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 127 127 return &pDrvIns->IBase; 128 if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_AUDIO_SNIFFER_CONNECTOR) == 0) 129 return &pDrv->Connector; 128 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIAUDIOSNIFFERCONNECTOR, &pDrv->Connector); 130 129 return NULL; 131 130 } … … 181 180 * Get the Audio Sniffer Port interface of the above driver/device. 182 181 */ 183 pThis->pUpPort = (PPDMIAUDIOSNIFFERPORT)pDrvIns->pUpBase->pfnQueryInterface(pDrvIns->pUpBase, PDMINTERFACE_AUDIO_SNIFFER_PORT);182 pThis->pUpPort = PDMIBASE_QUERY_INTERFACE(pDrvIns->pUpBase, PDMIAUDIOSNIFFERPORT); 184 183 if (!pThis->pUpPort) 185 184 { -
trunk/src/VBox/Main/ConsoleImpl.cpp
r25981 r25984 1787 1787 Assert(pBase); 1788 1788 1789 PPDMIACPIPORT pPort = 1790 (PPDMIACPIPORT) pBase->pfnQueryInterface(pBase, PDMINTERFACE_ACPI_PORT); 1789 PPDMIACPIPORT pPort = PDMIBASE_QUERY_INTERFACE(pBase, PDMIACPIPORT); 1791 1790 1792 1791 vrc = getVMMDev()->getVMMDevPort()->pfnCpuHotUnplug(getVMMDev()->getVMMDevPort(), idCpuCore, idCpuPackage); … … 2083 2082 { 2084 2083 Assert(pBase); 2085 PPDMIACPIPORT pPort = 2086 (PPDMIACPIPORT) pBase->pfnQueryInterface(pBase, PDMINTERFACE_ACPI_PORT); 2084 PPDMIACPIPORT pPort = PDMIBASE_QUERY_INTERFACE(pBase, PDMIACPIPORT); 2087 2085 vrc = pPort ? pPort->pfnPowerButtonPress(pPort) : VERR_INVALID_POINTER; 2088 2086 } … … 2128 2126 { 2129 2127 Assert(pBase); 2130 PPDMIACPIPORT pPort = 2131 (PPDMIACPIPORT) pBase->pfnQueryInterface(pBase, PDMINTERFACE_ACPI_PORT); 2128 PPDMIACPIPORT pPort = PDMIBASE_QUERY_INTERFACE(pBase, PDMIACPIPORT); 2132 2129 vrc = pPort ? pPort->pfnGetPowerButtonHandled(pPort, &handled) : VERR_INVALID_POINTER; 2133 2130 } … … 2175 2172 { 2176 2173 Assert(pBase); 2177 PPDMIACPIPORT pPort = 2178 (PPDMIACPIPORT) pBase->pfnQueryInterface(pBase, PDMINTERFACE_ACPI_PORT); 2174 PPDMIACPIPORT pPort = PDMIBASE_QUERY_INTERFACE(pBase, PDMIACPIPORT); 2179 2175 vrc = pPort ? pPort->pfnGetGuestEnteredACPIMode(pPort, &entered) : VERR_INVALID_POINTER; 2180 2176 } … … 2209 2205 { 2210 2206 Assert(pBase); 2211 PPDMIACPIPORT pPort = 2212 (PPDMIACPIPORT) pBase->pfnQueryInterface(pBase, PDMINTERFACE_ACPI_PORT); 2207 PPDMIACPIPORT pPort = PDMIBASE_QUERY_INTERFACE(pBase, PDMIACPIPORT); 2213 2208 vrc = pPort ? pPort->pfnSleepButtonPress(pPort) : VERR_INVALID_POINTER; 2214 2209 } … … 8137 8132 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 8138 8133 return &pDrvIns->IBase; 8139 if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_LED_CONNECTORS) == 0) 8140 return &pThis->ILedConnectors; 8134 PDMIBASE_RETURN_INTERFACE(pszIID, PDMILEDCONNECTORS, &pThis->ILedConnectors); 8141 8135 return NULL; 8142 8136 } … … 8224 8218 * query the LEDs we want. 8225 8219 */ 8226 pData->pLedPorts = (PPDMILEDPORTS)pDrvIns->pUpBase->pfnQueryInterface(pDrvIns->pUpBase, PDMINTERFACE_LED_PORTS); 8227 if (!pData->pLedPorts) 8228 { 8229 AssertMsgFailed(("Configuration error: No led ports interface above!\n")); 8230 return VERR_PDM_MISSING_INTERFACE_ABOVE; 8231 } 8220 pData->pLedPorts = PDMIBASE_QUERY_INTERFACE(pDrvIns->pUpBase, PDMILEDPORTS); 8221 AssertMsgReturn(pData->pLedPorts, ("Configuration error: No led ports interface above!\n"), 8222 VERR_PDM_MISSING_INTERFACE_ABOVE); 8232 8223 8233 8224 for (unsigned i = pData->iFirstLUN; i <= pData->iLastLUN; ++i) -
trunk/src/VBox/Main/VMMDevInterface.cpp
r25973 r25984 661 661 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 662 662 return &pDrvIns->IBase; 663 if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_VMMDEV_CONNECTOR) == 0) 664 return &pDrv->Connector; 665 #ifdef VBOX_WITH_HGCM 666 if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_HGCM_CONNECTOR) == 0) 667 return &pDrv->HGCMConnector; 663 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIVMMDEVCONNECTOR, &pDrv->Connector); 664 #ifdef VBOX_WITH_HGCM 665 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIHGCMCONNECTOR, &pDrv->HGCMConnector); 668 666 #endif 669 667 return NULL; … … 751 749 * Get the IVMMDevPort interface of the above driver/device. 752 750 */ 753 pData->pUpPort = (PPDMIVMMDEVPORT)pDrvIns->pUpBase->pfnQueryInterface(pDrvIns->pUpBase, PDMINTERFACE_VMMDEV_PORT); 754 if (!pData->pUpPort) 755 { 756 AssertMsgFailed(("Configuration error: No VMMDev port interface above!\n")); 757 return VERR_PDM_MISSING_INTERFACE_ABOVE; 758 } 759 760 #ifdef VBOX_WITH_HGCM 761 pData->pHGCMPort = (PPDMIHGCMPORT)pDrvIns->pUpBase->pfnQueryInterface(pDrvIns->pUpBase, PDMINTERFACE_HGCM_PORT); 762 if (!pData->pHGCMPort) 763 { 764 AssertMsgFailed(("Configuration error: No HGCM port interface above!\n")); 765 return VERR_PDM_MISSING_INTERFACE_ABOVE; 766 } 751 pData->pUpPort = PDMIBASE_QUERY_INTERFACE(pDrvIns->pUpBase, PDMIVMMDEVPORT); 752 AssertMsgReturn(pData->pUpPort, ("Configuration error: No VMMDev port interface above!\n"), VERR_PDM_MISSING_INTERFACE_ABOVE); 753 754 #ifdef VBOX_WITH_HGCM 755 pData->pHGCMPort = PDMIBASE_QUERY_INTERFACE(pDrvIns->pUpBase, PDMIHGCMPORT); 756 AssertMsgReturn(pData->pHGCMPort, ("Configuration error: No HGCM port interface above!\n"), VERR_PDM_MISSING_INTERFACE_ABOVE); 767 757 #endif 768 758 … … 791 781 792 782 LogRel(("Shared Folders service loaded.\n")); 793 pLedPort = (PPDMILEDPORTS)pDrvIns->pUpBase->pfnQueryInterface(pDrvIns->pUpBase, PDMINTERFACE_LED_PORTS); 794 if (!pLedPort) 795 { 796 AssertMsgFailed(("Configuration error: No LED port interface above!\n")); 797 return VERR_PDM_MISSING_INTERFACE_ABOVE; 798 } 783 pLedPort = PDMIBASE_QUERY_INTERFACE(pDrvIns->pUpBase, PDMILEDPORTS); 784 AssertMsgReturn(pLedPort, ("Configuration error: No LED port interface above!\n"), VERR_PDM_MISSING_INTERFACE_ABOVE); 799 785 rc = pLedPort->pfnQueryStatusLed(pLedPort, 0, &pLed); 800 786 if (RT_SUCCESS(rc) && pLed)
Note:
See TracChangeset
for help on using the changeset viewer.