Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This method copies rectangular subsets of pixels from one surface to another.

Syntax

HRESULT CopyRects(
  IDirect3DMobileSurface* 
pSourceSurface,
  CONST RECT* 
pSourceRectsArray,
  UINT 
cRects,
  IDirect3DMobileSurface* 
pDestinationSurface,
  CONST POINT* 
pDestPointsArray
);

Parameters

pSourceSurface

[in] Pointer to an IDirect3DMobileSurfaceinterface, which represents the source surface. This parameter must point to a different surface than pDestinationSurface.

pSourceRectsArray

[in] Pointer to an array of RECTstructures, which represents the rectangles to be transferred. Each rectangle will be transferred to the destination surface, with its top-left pixel at the position identified by the corresponding element of pDestPointsArray. Specifying NULL for this parameter causes the entire surface to be copied.

cRects

[in] Number of RECTstructures contained in pSourceRectsArray.

pDestinationSurface

[in] Pointer to an IDirect3DMobileSurfaceinterface, which represents the destination surface. This parameter must point to a different surface than pSourceSurface.

pDestPointsArray

[in] Pointer to an array of POINTstructures, which identifies the top-left pixel position of each rectangle contained in pSourceRectsArray. If this parameter is NULL, the RECTs are copied to the same offset (same top/left location) as the source rectangle.

Return Value

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

If the method fails, the return value can be one of the following D3DMERR Values.

  • D3DMERR_DEVICELOST

  • D3DMERR_INVALIDCALL

Remarks

This method does not support stretch, color key, alpha blend, format conversion, or clipping of either source or destination rectangles. Note that this method will fail unless all the source rectangles and their corresponding destination rectangles are completely contained within the source and destination surfaces respectively. The format of the two surfaces must match, but they can have different dimensions.

If the destination surface is level zero of a texture, then it will be marked dirty. For more information, see IDirect3DMobileDevice::UpdateTextureand IDirect3DMobileTexture::AddDirtyRect.

This method cannot be applied to surfaces whose formats are classified as depth stencil formats.

Requirements

Header d3dm.h
Library D3dm.lib, D3dmguid.lib
Windows Embedded CE Windows CE 5.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

500 Internal Server Error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at webmaster@systemmanager.forsenergy.ru to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.