This topic documents a feature of Visual Filters and Transitions, which is deprecated as of Windows Internet Explorer 9 and obsolete as of Internet Explorer 10.
Unpacks the specified number of samples into the supplied buffer in ARGB32 pixel format. This method can only unpack a single row. Use IDXARGBReadPtr::UnpackRect to unpack multiple rows.
DXSAMPLE Unpack( DXSAMPLE *pSamples, ULONG cSamples, BOOL bMove );
- [in] Pointer to a buffer to store the samples. If the native type of the surface is ARGB32, this pointer can be NULL. Otherwise, it must point to a buffer large enough to hold the samples.
- [in] Number of samples to retrieve.
- [in] Value that indicates whether to advance the read pointer. Specify TRUE to advance the horizontal position. Specify FALSE to leave the pointer set to the current location.
Returns a pointer to a buffer that contains the unpacked, converted samples. If pSamples is non-NULL, the return value is always equal to pSamples. If pSamples is NULL, the returned pointer points directly to the ARGB samples in the surface memory.
This method converts the pixel format of the underlying surface into ARGB32 format in the process of extracting the surface samples into a buffer. If the underlying data is in an alpha-premultiplied format, the method converts the data to ARGB32 as it is being copied.
If you supply a pointer to a buffer in the pSamples parameter, the samples are stored in that location, and this method returns a pointer to your buffer. If the underlying samples are already in ARGB32 format, the user can obtain a pointer directly to the samples by specifying NULL for the pSamples parameter. In this case, the returned pointer points directly at the surface memory. This avoids the step of copying the samples to the buffer, which speeds up the operation.
This method uses the DXSAMPLE structure to store color information about the samples.
Note Do not use the returned pointer to modify a read-only surface. Good coding practice for read-locked surfaces is to assign the returned pointer to a constant DXSAMPLE pointer.