IBitmapData::CopyBytesTo method (xamlom.h)

Copies up to the specified maximum number of bytes from the given offset in the bitmap data into the caller’s buffer (pvBytes), and returns the number of bytes copied.

Syntax

HRESULT CopyBytesTo(
  [in]  unsigned int sourceOffsetInBytes,
  [in]  unsigned int maxBytesToCopy,
  [out] byte         *pvBytes,
  [out] unsigned int *numberOfBytesCopied
);

Parameters

[in] sourceOffsetInBytes

The place in the bitmap data to start copying from, in bytes.

[in] maxBytesToCopy

The maximum number of bytes to copy.

[out] pvBytes

The buffer into which the bytes are copied.

[out] numberOfBytesCopied

The number of bytes copied.

Return value

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Requirements

Requirement Value
Minimum supported client Windows 10, version 1607 [desktop apps only]
Minimum supported server Windows Server 2016 [desktop apps only]
Target Platform Windows
Header xamlom.h

See also

IBitmapData