Partager via


IDirect3DMobileSurface::LockRect (Windows CE 5.0)

Send Feedback

Locks a rectangle on a surface.

HRESULT LockRect(  D3DMLOCKED_RECT* pLockedRect,  CONST RECT* pRect,  DWORD Flags);

Parameters

  • pLockedRect
    [out] Pointer to a D3DMLOCKED_RECT structure that describes the locked region.
  • pRect
    [in] Pointer to a rectangle to lock. Specified by a pointer to a RECT structure. Specifying NULL for this parameter expands the dirty region to cover the entire surface.
  • Flags
    [in] One of the D3DMLOCK Values to describe the type of lock to perform. The only allowable value for this parameter is D3DMLOCK_READONLY.

Return Values

If the method succeeds, the return value is D3DM_OK (see D3DM Values).

If the method fails, the return value can be D3DMERR_INVALIDCALL (see D3DMERR Values).

Remarks

For performance reasons, dirty regions are only recorded for level zero of a texture. Dirty regions are automatically recorded when IDirect3DMobileSurface::LockRect is called without D3DMLOCK_NO_DIRTY_UPDATE or D3DLOCK_READONLY (see D3DMLOCK Values). For more information, see IDirect3DMobileDevice::UpdateTexture.

A multisample backbuffer cannot be locked.

Requirements

OS Versions: Windows CE 5.0 and later.
Header: D3dm.h.
Link Library: D3dm.lib, D3dmguid.lib.

See Also

IDirect3DMobileSurface | D3DMLOCKED_RECT | RECT | D3DMLOCK Values | IDirect3DMobileDevice::UpdateTexture

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.