Microsoft DirectX 8.1 (Visual Basic)

Direct3DVolume8.SetPrivateData

Associates data with the volume that is intended for use by the application, not by Microsoft® Direct3D®.

object.SetPrivateData( _ 
    RefGuid As DXGUID, _ 
    Data As Any, _ 
    SizeOfData As Long, _ 
    Flags As Long)

Parts

object
Object expression that resolves to a Direct3DVolume8 object.
RefGuid
A DXGUID type, the globally unique identifier that identifies the private data to set.
Data
A buffer that contains the data to associate with the surface.
SizeOfData
Size of the buffer at Data, in bytes.
Flags
Value that describes the type of data being passed, or indicates to the application that the data should be invalidated when the resource changes. This parameter can be the value defined by the CONST_D3DSPDFLAGS enumeration, or 0. If no flags are specified, Direct3D allocates memory to hold the data within the buffer and copies the data into the new buffer. The buffer allocated by Direct3D is automatically freed, as appropriate.

Error Codes

If the method fails, an error is raised and Err.Number can be set to one of the following values.

D3DERR_INVALIDCALL
E_OUTOFMEMORY

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

Remarks

Direct3D does not manage the memory at Data. If this buffer was dynamically allocated, it is the caller's responsibility to free the memory.

Data is passed by value, and multiple sets of data can be associated with a single volume.

See Also

Direct3DVolume8.FreePrivateData, Direct3DVolume8.GetPrivateData