CopyAndMoveBoth method

Copies the specified number of samples from the current position of the source surface to the current position of the output surface.


void retVal = object.CopyAndMoveBoth(pScratchBuffer, pSrc, cSamples, bIsOpaque);


  • pScratchBuffer [in]
    Type: [DXBASESAMPLE](aa743779(v=vs.85).md)

    Pointer to a buffer that can be used by the method. The initial contents of the buffer are ignored, and the contents are undefined when the call returns the buffer. The buffer must be at least [cSamples * sizeof(DXBASESAMPLE)] bytes in size. If the surface pixel format is either ARGB32 or PMARGB32, this buffer is not required and pScratchBuffer can be NULL.

  • pSrc [in]
    Type: [IDXARGBReadPtr](aa743694(v=vs.85).md)

    Source surface read pointer to copy from.

  • cSamples [in]
    Type: unsigned long

    Number of samples to copy.

  • bIsOpaque [in]
    Type: BOOL

    Value that specifies whether the samples are opaque or transparent. If TRUE, the caller guarantees that all the samples being copied have an alpha channel value of 255. In some cases this enables faster code performance. If you are not sure that all samples are opaque, specify FALSE.


After a call to this method, the positions of both the source and destination surfaces are advanced by cSamples.

See also