?/TD>
Microsoft DirectX 9.0

IDirect3DVolume9::LockBox Method


Locks a box on a volume resource.

Syntax

HRESULT LockBox(      

    D3DLOCKED_BOX *pLockedVolume,     const D3DBOX *pBox,     DWORD Flags );

Parameters

pLockedVolume
[out] Pointer to a D3DLOCKED_BOX structure, describing the locked region.
pBox
[in] Pointer to a box to lock. Specified by a pointer to a D3DBOX structure. Specifying NULL for this parameter locks the entire volume.
Flags
[in] Combination of zero or more locking flags that describe the type of lock to perform. For this method, the valid flags are:
  • D3DLOCK_DISCARD
  • D3DLOCK_NO_DIRTY_UPDATE
  • D3DLOCK_NO_SYSLOCK
  • D3DLOCK_READONLY

For a description of the flags, see D3DLOCK.

Return Value

If the method succeeds, the return value is D3D_OK.

If the method fails, the return value can be D3DERR_INVALIDCALL.



Remarks

For performance reasons, dirty regions are only recorded for level zero of a texture. Dirty regions are automatically recorded when IDirect3DVolume9::LockBox is called without D3DLOCK_NO_DIRTY_UPDATE or D3DLOCK_READONLY. See IDirect3DDevice9::UpdateTexture for more information.

See Also

IDirect3DVolume9::UnlockBox


© 2002 Microsoft Corporation. All rights reserved.