Commit 1f93f535 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

msdmo: Implement IEnumDMO_Clone(), fix trace messages.

parent 06c52ce9
...@@ -436,43 +436,38 @@ lerr: ...@@ -436,43 +436,38 @@ lerr:
return hr; return hr;
} }
/****************************************************************************** /******************************************************************************
* IEnumDMO_fnAddRef * IEnumDMO_fnAddRef
*/ */
static ULONG WINAPI IEnumDMO_fnAddRef(IEnumDMO * iface) static ULONG WINAPI IEnumDMO_fnAddRef(IEnumDMO * iface)
{ {
IEnumDMOImpl *This = impl_from_IEnumDMO(iface); IEnumDMOImpl *This = impl_from_IEnumDMO(iface);
return InterlockedIncrement(&This->ref); ULONG refCount = InterlockedIncrement(&This->ref);
TRACE("(%p)->(%d)\n", This, refCount);
return refCount;
} }
/************************************************************************** /**************************************************************************
* EnumDMO_QueryInterface * EnumDMO_QueryInterface
*/ */
static HRESULT WINAPI IEnumDMO_fnQueryInterface( static HRESULT WINAPI IEnumDMO_fnQueryInterface(IEnumDMO* iface, REFIID riid, void **ppvObj)
IEnumDMO* iface,
REFIID riid,
LPVOID *ppvObj)
{ {
IEnumDMOImpl *This = impl_from_IEnumDMO(iface);
TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppvObj);
*ppvObj = NULL; *ppvObj = NULL;
if (IsEqualIID(riid, &IID_IEnumDMO) || if (IsEqualIID(riid, &IID_IEnumDMO) ||
IsEqualIID(riid, &IID_IUnknown)) IsEqualIID(riid, &IID_IUnknown))
{ {
*ppvObj = iface; *ppvObj = iface;
IEnumDMO_fnAddRef(iface);
} }
if(*ppvObj) return *ppvObj ? S_OK : E_NOINTERFACE;
{
IEnumDMO_fnAddRef(*ppvObj);
return S_OK;
}
return E_NOINTERFACE;
} }
/****************************************************************************** /******************************************************************************
* IEnumDMO_fnRelease * IEnumDMO_fnRelease
*/ */
...@@ -481,6 +476,8 @@ static ULONG WINAPI IEnumDMO_fnRelease(IEnumDMO * iface) ...@@ -481,6 +476,8 @@ static ULONG WINAPI IEnumDMO_fnRelease(IEnumDMO * iface)
IEnumDMOImpl *This = impl_from_IEnumDMO(iface); IEnumDMOImpl *This = impl_from_IEnumDMO(iface);
ULONG refCount = InterlockedDecrement(&This->ref); ULONG refCount = InterlockedDecrement(&This->ref);
TRACE("(%p)->(%d)\n", This, refCount);
if (!refCount) if (!refCount)
{ {
IEnumDMOImpl_Destructor(This); IEnumDMOImpl_Destructor(This);
...@@ -512,7 +509,7 @@ static HRESULT WINAPI IEnumDMO_fnNext( ...@@ -512,7 +509,7 @@ static HRESULT WINAPI IEnumDMO_fnNext(
IEnumDMOImpl *This = impl_from_IEnumDMO(iface); IEnumDMOImpl *This = impl_from_IEnumDMO(iface);
TRACE("--> (%p) %d %p %p %p\n", iface, cItemsToFetch, pCLSID, Names, pcItemsFetched); TRACE("(%p)->(%d %p %p %p)\n", This, cItemsToFetch, pCLSID, Names, pcItemsFetched);
if (!pCLSID || !Names || !pcItemsFetched) if (!pCLSID || !Names || !pcItemsFetched)
return E_POINTER; return E_POINTER;
...@@ -651,6 +648,7 @@ static HRESULT WINAPI IEnumDMO_fnSkip(IEnumDMO * iface, DWORD cItemsToSkip) ...@@ -651,6 +648,7 @@ static HRESULT WINAPI IEnumDMO_fnSkip(IEnumDMO * iface, DWORD cItemsToSkip)
{ {
IEnumDMOImpl *This = impl_from_IEnumDMO(iface); IEnumDMOImpl *This = impl_from_IEnumDMO(iface);
TRACE("(%p)->(%d)\n", This, cItemsToSkip);
This->index += cItemsToSkip; This->index += cItemsToSkip;
return S_OK; return S_OK;
...@@ -664,6 +662,7 @@ static HRESULT WINAPI IEnumDMO_fnReset(IEnumDMO * iface) ...@@ -664,6 +662,7 @@ static HRESULT WINAPI IEnumDMO_fnReset(IEnumDMO * iface)
{ {
IEnumDMOImpl *This = impl_from_IEnumDMO(iface); IEnumDMOImpl *This = impl_from_IEnumDMO(iface);
TRACE("(%p)\n", This);
This->index = -1; This->index = -1;
return S_OK; return S_OK;
...@@ -673,13 +672,12 @@ static HRESULT WINAPI IEnumDMO_fnReset(IEnumDMO * iface) ...@@ -673,13 +672,12 @@ static HRESULT WINAPI IEnumDMO_fnReset(IEnumDMO * iface)
/****************************************************************************** /******************************************************************************
* IEnumDMO_fnClone * IEnumDMO_fnClone
*/ */
static HRESULT WINAPI IEnumDMO_fnClone(IEnumDMO * iface, IEnumDMO **ppEnum) static HRESULT WINAPI IEnumDMO_fnClone(IEnumDMO *iface, IEnumDMO **ppEnum)
{ {
IEnumDMOImpl *This = impl_from_IEnumDMO(iface); IEnumDMOImpl *This = impl_from_IEnumDMO(iface);
TRACE("(%p)->(%p)\n", This, ppEnum);
FIXME("(%p)->() to (%p)->() E_NOTIMPL\n", This, ppEnum); return IEnumDMO_Constructor(This->guidCategory, This->dwFlags, This->cInTypes, This->pInTypes,
This->cOutTypes, This->pOutTypes, ppEnum);
return E_NOTIMPL;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment