Share via


D3DM_LOCKSURFACE_DATA (Windows Embedded CE 6.0)

1/6/2010

This structure describes the properties of a surface lock requested by the Direct3D Mobile middleware. A pointer to this structure is passed as a parameter to D3DM_LockSurface.

Syntax

typedef struct _D3DM_LOCKSURFACE_DATA {
  RECT Rect;
  D3DMLOCKED_RECT LockedRect;
  ULONG nSurfaceId;
  ULONG Flags;
  HRESULT rval;
} D3DM_LOCKSURFACE_DATA;

Members

  • Rect
    A RECT value defining the portion of a surface that needs to be locked. If this parameter is NULL, the whole surface should be locked. Note that in retail builds, the Direct3D Mobile middleware does not check the parameters defined by this member they are valid values.

    For a display surfaces data in this member specifies a rectangular area on the display surface in the normal way.

    For one-dimensional surfaces, such as vertex and index buffers, the following table shows how the data for this member will be specified by the middleware.

    Member Value

    Rect.left

    The first index that will be locked.

    Rect.top

    0

    Rect.right

    The last index that will be locked.

    Rect.bottom

    1

    The driver determines the number of bytes per vertex or index through the flexible vertex format (FVF) data provided when the buffer was created.

  • LockedRect
    A D3DMLOCKED_RECT value returned by the driver that describes the region it locked. This structure contains a pointer to the region and the locked region's stride.
  • nSurfaceId
    A ULONG value containing a handle to the surface to be locked.
  • Flags
    A ULONG value containing flags from the D3DMLOCK Values that specify additional behavior that the driver should execute or expect.
  • rval
    An HRESULT value containing an error code reported by the driver to describe any problems it encountered while trying to lock the surface. If the driver did not encounter any errors, it sets this value to D3DM_OK to indicate success.

Requirements

Header d3dmddk.h
Windows Embedded CE Windows CE 5.0

See Also

Reference

Direct3D Mobile Driver Structures
D3DM_LockSurface

Concepts

Surface Locks in Direct3D Mobile

Other Resources

RECT
D3DMLOCKED_RECT
D3DMLOCK Values