Microsoft DirectX 8.1 (Visual Basic)

Direct3DResource8.GetDevice

Retrieves the device associated with a resource.

object.GetDevice( _ 
    Riid As GUID) As Direct3DDevice8

Parts

object
Object expression that resolves to a Direct3DResource8 object.
Riid
A GUID type, the reference identifier of the device being requested.

Return Values

An Unknown object to fill with the device object, if the query succeeds.

Error Codes

If the method fails, an error is raised and Err.Number can be set to D3DERR_INVALIDCALL.

For information on trapping errors, see the Microsoft® Visual Basic® Error Handling topic.

Applies To

This method applies to the following classes, which implement methods from Direct3DResource8.