Share via


Volume.LockBox(Type,Box,LockFlags,LockedBox,Int32[]) Method (Microsoft.DirectX.Direct3D)

Locks a box on a volume resource.

Definition

Visual Basic Public Function LockBox( _
    ByVal typeLock As TypeLeave Site, _
    ByVal box As Box, _
    ByVal flags As LockFlags, _
    ByRef lockedVolume As LockedBox, _
    ByVal ranks() As Integer _
) As ArrayLeave Site
C# public ArrayLeave Site LockBox(
    TypeLeave Site typeLock,
    Box box,
    LockFlags flags,
    out LockedBox lockedVolume,
    int[] ranks
);
C++ public:
ArrayLeave SiteLockBox(
    TypeLeave SitetypeLock,
    Box box,
    LockFlags flags,
    [Out] LockedBoxlockedVolume,
    array<int>^ ranks
);
JScript public function LockBox(
    typeLock : TypeLeave Site,
    box : Box,
    flags : LockFlags,
    lockedVolume : LockedBox,
    ranks : int[]
) : ArrayLeave Site;

Parameters

typeLock System.Type
Value that specifies the TypeLeave Site of the lock.
box Microsoft.DirectX.Direct3D.Box
A Box object that represents the box to lock.
flags Microsoft.DirectX.Direct3D.LockFlags
Combination of zero or more LockFlags that describe the type of lock to perform. See Remarks.
lockedVolume Microsoft.DirectX.Direct3D.LockedBox
A LockedBox object that describes the locked region.
ranks System.Int32[]
Array of one to three Int32Leave Site values that indicate the dimensions of the returned array. The maximum number of ranks allowed is three.

Return Value

System.Array
An ArrayLeave Site that represents the locked box region.

Remarks

The valid lock flags for this method are:

For performance reasons, dirty regions are recorded only for level zero of a texture. Dirty regions are automatically recorded when Volume.LockBox is called without LockFlags.NoDirtyUpdate or LockFlags.ReadOnly. For more information, see Device.UpdateTexture.

Exceptions

InvalidCallException

The method call is invalid. For example, a method's parameter might contain an invalid value.