ReactOS  0.4.14-dev-998-g623dd26
enum_mediatypes.cpp File Reference
#include "precomp.h"
Include dependency graph for enum_mediatypes.cpp:

Go to the source code of this file.

Classes

class  CEnumMediaTypes
 

Functions

HRESULT WINAPI CEnumMediaTypes_fnConstructor (IUnknown *pUnknown, ULONG MediaTypeCount, AM_MEDIA_TYPE *MediaTypes, REFIID riid, LPVOID *ppv)
 

Function Documentation

◆ CEnumMediaTypes_fnConstructor()

HRESULT WINAPI CEnumMediaTypes_fnConstructor ( IUnknown pUnknown,
ULONG  MediaTypeCount,
AM_MEDIA_TYPE MediaTypes,
REFIID  riid,
LPVOID ppv 
)

Definition at line 157 of file enum_mediatypes.cpp.

163 {
164  CEnumMediaTypes * handler = new CEnumMediaTypes(MediaTypeCount, MediaTypes);
165 
166 #ifdef MSDVBNP_TRACE
168  LPOLESTR lpstr;
170  swprintf(Buffer, L"CEnumMediaTypes_fnConstructor riid %s pUnknown %p\n", lpstr, pUnknown);
172 #endif
173 
174  if (!handler)
175  {
176  CoTaskMemFree(MediaTypes);
177  return E_OUTOFMEMORY;
178  }
179 
180  if (FAILED(handler->QueryInterface(riid, ppv)))
181  {
182  /* not supported */
183  delete handler;
184  return E_NOINTERFACE;
185  }
186 
187  return NOERROR;
188 }
#define E_NOINTERFACE
Definition: winerror.h:2364
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:420
#define NOERROR
Definition: winerror.h:2354
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
static LPOLESTR
Definition: stg_prop.c:27
void WINAPI SHIM_OBJ_NAME() OutputDebugStringW(LPCWSTR lpOutputString)
Definition: ignoredbgout.c:23
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
Definition: bufpool.h:45
_In_ PUNKNOWN pUnknown
Definition: drmk.h:76
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define MAX_PATH
Definition: compat.h:26
#define swprintf(buf, format,...)
Definition: sprintf.c:56
static const WCHAR L[]
Definition: oid.c:1250
static LPCSTR lpstr
Definition: font.c:51
UINT(* handler)(MSIPACKAGE *)
Definition: action.c:7786
HRESULT WINAPI StringFromCLSID(REFCLSID id, LPOLESTR *idstr)
Definition: compobj.c:2412