2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS BDA Proxy
4 * FILE: dll/directx/msvidctl/enumtuningspaces.cpp
5 * PURPOSE: ITuningSpace interface
7 * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org)
11 class CEnumTuningSpaces
: public IEnumTuningSpaces
14 STDMETHODIMP
QueryInterface( REFIID InterfaceId
, PVOID
* Interface
);
16 STDMETHODIMP_(ULONG
) AddRef()
18 InterlockedIncrement(&m_Ref
);
21 STDMETHODIMP_(ULONG
) Release()
23 InterlockedDecrement(&m_Ref
);
32 // IEnumTuningSpaces methods
33 HRESULT STDMETHODCALLTYPE
Next(ULONG celt
, ITuningSpace
**rgelt
, ULONG
*pceltFetched
);
34 HRESULT STDMETHODCALLTYPE
Skip(ULONG celt
);
35 HRESULT STDMETHODCALLTYPE
Reset();
36 HRESULT STDMETHODCALLTYPE
Clone(IEnumTuningSpaces
**ppEnum
);
38 CEnumTuningSpaces() : m_Ref(0){};
40 virtual ~CEnumTuningSpaces(){};
48 CEnumTuningSpaces::QueryInterface(
52 if (IsEqualGUID(refiid
, IID_IUnknown
))
54 *Output
= PVOID(this);
55 reinterpret_cast<IUnknown
*>(*Output
)->AddRef();
59 if (IsEqualGUID(refiid
, IID_IEnumTuningSpaces
))
61 *Output
= (IEnumTuningSpaces
*)this;
62 reinterpret_cast<IEnumTuningSpaces
*>(*Output
)->AddRef();
66 WCHAR Buffer
[MAX_PATH
];
68 StringFromCLSID(refiid
, &lpstr
);
69 swprintf(Buffer
, L
"CEnumTuningSpaces::QueryInterface: NoInterface for %s\n", lpstr
);
70 OutputDebugStringW(Buffer
);
76 //-------------------------------------------------------------------
81 CEnumTuningSpaces::Next(ULONG celt
, ITuningSpace
**rgelt
, ULONG
*pceltFetched
)
83 OutputDebugStringW(L
"CEnumTuningSpaces::Next : stub\n");
84 return CTuningSpace_fnConstructor(NULL
, IID_ITuningSpace
, (void**)rgelt
);
90 CEnumTuningSpaces::Skip(ULONG celt
)
92 OutputDebugStringW(L
"CEnumTuningSpaces::Skip : NotImplemented\n");
98 CEnumTuningSpaces::Reset()
100 OutputDebugStringW(L
"CEnumTuningSpaces::Reset : NotImplemented\n");
106 CEnumTuningSpaces::Clone(IEnumTuningSpaces
**ppEnum
)
108 OutputDebugStringW(L
"CEnumTuningSpaces::Clone : NotImplemented\n");
114 CEnumTuningSpaces_fnConstructor(
119 // construct device control
120 CEnumTuningSpaces
* tuningspaces
= new CEnumTuningSpaces();
122 #ifdef MSVIDCTL_TRACE
123 WCHAR Buffer
[MAX_PATH
];
125 StringFromCLSID(riid
, &lpstr
);
126 swprintf(Buffer
, L
"CEnumTuningSpaces_fnConstructor riid %s pUnknown %p\n", lpstr
, pUnknown
);
127 OutputDebugStringW(Buffer
);
131 return E_OUTOFMEMORY
;
133 if (FAILED(tuningspaces
->QueryInterface(riid
, ppv
)))
137 return E_NOINTERFACE
;