Microsoft DirectX 8.1 (Visual Basic)

Direct3DDevice8.CaptureStateBlock

Updates the values within an existing state block to the values set for the device.

object.CaptureStateBlock( _ 
    Token As Long)

Parts

object
Object expression that resolves to a Direct3DDevice8 object.
Token
Handle to the state block into which the device state is captured.

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

The value &hFFFFFFFF& is an invalid state block handle.

This method captures updated values for states within an existing state block. It does not capture the entire state of the device.

CaptureStateBlock does not capture information for lights that are explicitly or implicitly created after the stateblock is created. For example, capturing the current state into a stateblock of type D3DSBT_ALL does not store information for lights that are created post-capture.

See Also

Direct3DDevice8.ApplyStateBlock, Direct3DDevice8.BeginStateBlock, Direct3DDevice8.CreateStateBlock, Direct3DDevice8.EndStateBlock, Direct3DDevice8.DeleteStateBlock