IDirect3DVolume9::LockBox method (d3d9helper.h)

Locks a box on a volume resource.

Syntax

HRESULT LockBox(
  [out] D3DLOCKED_BOX *pLockedVolume,
  [in]  const D3DBOX  *pBox,
  [in]  DWORD         Flags
);

Parameters

[out] pLockedVolume

Type: D3DLOCKED_BOX*

Pointer to a D3DLOCKED_BOX structure, describing the locked region.

[in] pBox

Type: const D3DBOX*

Pointer to a box to lock. Specified by a pointer to a D3DBOX structure. Specifying NULL for this parameter locks the entire volume.

[in] Flags

Type: DWORD

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_NOSYSLOCK
  • D3DLOCK_READONLY
For a description of the flags, see D3DLOCK.

Return value

Type: HRESULT

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.

Requirements

   
Target Platform Windows
Header d3d9helper.h (include D3D9.h)
Library D3D9.lib

See also

IDirect3DVolume9

IDirect3DVolume9::UnlockBox