Microsoft DirectX 8.1 (Visual Basic)

Direct3DResource8.SetPriority

Assigns the resource-management priority for this resource.

object.SetPriority( _ 
    PriorityNew As Long) As Long

Parts

object
Object expression that resolves to a Direct3DResource8 object.
PriorityNew
Long value that specifies the new resource-management priority for the resource.

Return Values

Returns the previous priority value for the resource.

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.

Remarks

SetPriority is used for priority control of managed resources. This method returns 0 on nonmanaged resources.

Priorities are used to determine when managed resources are to be removed from memory. A resource assigned a low priority is removed before a resource with a high priority. If two resources have the same priority, the resource that was used more recently is kept in memory; the other resource is removed. Managed resources have a default priority of 0.

See Also

Direct3DResource8.GetPriority