Logo Search packages:      
Sourcecode: virtualbox-ose version File versions  Download package

#define PDMIBASERC_RETURN_INTERFACE ( pIns,
pszIID,
InterfaceType,
pInterface   ) 

Value:

do { \
        Assert((uintptr_t)pInterface - PDMINS_2_DATA(pIns, uintptr_t) < _4M); \
        if (RTUuidCompare2Strs((pszIID), InterfaceType##_IID) == 0) \
        { \
            InterfaceType##RC *pReturnInterfaceTypeCheck = (pInterface); \
            return (uintptr_t)pReturnInterfaceTypeCheck \
                 - PDMINS_2_DATA(pIns, uintptr_t) \
                 + PDMINS_2_DATA_RCPTR(pIns); \
        } \
    } while (0)
Helper macro for implementing PDMIBASERC::pfnQueryInterface.

Return pInterface if pszIID matches the InterfaceType. This will perform basic type checking.

Parameters:
pIns Pointer to the instance data.
pszIID The ID of the interface that is being queried.
InterfaceType The interface type base name, no trailing RC. The interface ID is derived from this by appending _IID.
pInterface The interface address expression. This must resolve to some address within the instance data.
Remarks:
Don't use with PDMIBASE.

Definition at line 182 of file pdmifs.h.


Generated by  Doxygen 1.6.0   Back to index