Allocates a new stream sample object for the current media stream.

HRESULT AllocateSample(
DWORD dwFlags,
IStreamSample **ppSample);


  • dwFlags
    [in] Flags. Must be zero.
  • ppSample
    [out] Address of a pointer to the newly created stream sample's IStreamSample interface.

Return Values

Returns one of the following values.

E_OUTOFMEMORY There isn't enough memory available to create a stream sample.
E_POINTER A parameter is invalid.
S_OK Success.


This method allocates the sample and its associated backing object or buffer. The backing object is either the DirectDraw surface for video or the IAudioData object for audio.

 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.