Share via


CMediaSample::SetPointer

 
Microsoft DirectShow 9.0

CMediaSample::SetPointer

The SetPointer method sets the pointer to the memory buffer.

Syntax

  HRESULT SetPointer(
    BYTE *ptr,
    LONG cBytes
); 

Parameters

ptr

Pointer to a memory buffer allocated by the caller, of size cBytes.

cBytes

Length of the buffer, in bytes.

Return Value

Returns S_OK.

Remarks

This method enables the allocator to set a new pointer for the sample.

This method is not available through the IMediaSample interface. The object that creates the sample can access this method (through CMediaSample), but other objects cannot.

Requirements

**  Header:** Declared in Amfilter.h; include Streams.h.

**  Library:** Use Strmbase.lib (retail builds) or Strmbasd.lib (debug builds).

See Also