ReactOS  0.4.15-dev-484-g89e716a7
mediasample.cpp File Reference
#include "precomp.h"
Include dependency graph for mediasample.cpp:

Go to the source code of this file.

Classes

class  CMediaSample
 

Functions

HRESULT WINAPI CMediaSample_Constructor (IMemAllocator *Allocator, BYTE *pBuffer, ULONG BufferSize, REFIID riid, LPVOID *ppv)
 

Function Documentation

◆ CMediaSample_Constructor()

HRESULT WINAPI CMediaSample_Constructor ( IMemAllocator Allocator,
BYTE pBuffer,
ULONG  BufferSize,
REFIID  riid,
LPVOID ppv 
)

Definition at line 342 of file mediasample.cpp.

348 {
349 #ifdef KSPROXY_TRACE
350  OutputDebugStringW(L"CMediaSample_Constructor\n");
351 #endif
352 
353  CMediaSample * handler = new CMediaSample(Allocator, pBuffer, BufferSize);
354 
355  if (!handler)
356  return E_OUTOFMEMORY;
357 
358  if (FAILED(handler->QueryInterface(riid, ppv)))
359  {
360  /* not supported */
361  delete handler;
362  return E_NOINTERFACE;
363  }
364 
365  return NOERROR;
366 }
#define E_NOINTERFACE
Definition: winerror.h:2364
#define NOERROR
Definition: winerror.h:2354
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
void WINAPI SHIM_OBJ_NAME() OutputDebugStringW(LPCWSTR lpOutputString)
Definition: ignoredbgout.c:23
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
PVOID pBuffer
#define BufferSize
Definition: classpnp.h:419
static const WCHAR L[]
Definition: oid.c:1250
UINT(* handler)(MSIPACKAGE *)
Definition: action.c:7786

Referenced by CKsAllocator::Commit().