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

#define PDMIBASER0_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##R0 *pReturnInterfaceTypeCheck = (pInterface); \
            return (uintptr_t)pReturnInterfaceTypeCheck \
                 - PDMINS_2_DATA(pIns, uintptr_t) \
                 + PDMINS_2_DATA_R0PTR(pIns); \
        } \
    } while (0)
Helper macro for implementing PDMIBASER0::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 R0. 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 253 of file pdmifs.h.


Generated by  Doxygen 1.6.0   Back to index