Microsoft DirectX 8.1 (Visual Basic)

Direct3DSurface8.GetDevice

Retrieves the device associated with a surface.

object.GetDevice() As Direct3DDevice8

Parts

object
Object expression that resolves to a Direct3DSurface8 object.

Return Values

The Direct3DDevice8 associated with the surface, 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.

Remarks

This method enables navigation to the owning device object.