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

DECLINLINE ( PVDINTERFACECONFIG   ) 

Get configuration information interface from opaque callback table.

Returns:
Pointer to the callback table.
Parameters:
pInterface Pointer to the interface descriptor.

Definition at line 772 of file VBoxHDD.h.

References AssertMsgReturn, VDINTERFACECONFIG::cbSize, VDINTERFACECONFIG::enmInterface, NULL, and VDINTERFACETYPE_CONFIG.

{
    /* Check that the interface descriptor is a config interface. */
    AssertMsgReturn(   (pInterface->enmInterface == VDINTERFACETYPE_CONFIG)
                    && (pInterface->cbSize == sizeof(VDINTERFACE)),
                    ("Not a config interface"), NULL);

    PVDINTERFACECONFIG pInterfaceConfig = (PVDINTERFACECONFIG)pInterface->pCallbacks;

    /* Do basic checks. */
    AssertMsgReturn(   (pInterfaceConfig->cbSize == sizeof(VDINTERFACECONFIG))
                    && (pInterfaceConfig->enmInterface == VDINTERFACETYPE_CONFIG),
                    ("A non config callback table attached to a config interface descriptor\n"), NULL);

    return pInterfaceConfig;
}


Generated by  Doxygen 1.6.0   Back to index