Rediger

Del via


CImageSample.CImageSample constructor

[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

Constructor method.

Syntax

CImageSample(
   CBaseAllocator *pAllocator,
   TCHAR          *pName,
   HRESULT        *phr,
   LPBYTE         pBuffer,
   LONG           length
);

Parameters

pAllocator

Pointer to the allocator that created this sample.

pName

Ignored.

phr

Ignored.

pBuffer

Pointer to a memory buffer allocated by the caller, of size length. The buffer should contain a GDI device-independent bitmap (DIB).

length

Length of the buffer.

Remarks

The CImageAllocator class creates a DIB using a file-mapping object that is backed by the operating-system paging file. The handle to the file-mapping object is stored in the hMapping member of the m_DibData structure.

Requirements

Requirement Value
Header
Winutil.h (include Streams.h)
Library
Strmbase.lib (retail builds);
Strmbasd.lib (debug builds)

See also

CImageSample Class