devenum: COM cleanup for IParseDisplayName.
This commit is contained in:
parent
91203006e1
commit
448986f1c4
|
@ -67,7 +67,7 @@ typedef struct
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
const IParseDisplayNameVtbl *lpVtbl;
|
IParseDisplayName IParseDisplayName_iface;
|
||||||
} ParseDisplayNameImpl;
|
} ParseDisplayNameImpl;
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
|
|
|
@ -27,31 +27,28 @@
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(devenum);
|
WINE_DEFAULT_DEBUG_CHANNEL(devenum);
|
||||||
|
|
||||||
static HRESULT WINAPI DEVENUM_IParseDisplayName_QueryInterface(
|
static HRESULT WINAPI DEVENUM_IParseDisplayName_QueryInterface(IParseDisplayName *iface,
|
||||||
LPPARSEDISPLAYNAME iface,
|
REFIID riid, void **ppv)
|
||||||
REFIID riid,
|
|
||||||
LPVOID *ppvObj)
|
|
||||||
{
|
{
|
||||||
TRACE("\n\tIID:\t%s\n",debugstr_guid(riid));
|
TRACE("\n\tIID:\t%s\n",debugstr_guid(riid));
|
||||||
|
|
||||||
if (ppvObj == NULL) return E_POINTER;
|
if (!ppv)
|
||||||
|
return E_POINTER;
|
||||||
|
|
||||||
if (IsEqualGUID(riid, &IID_IUnknown) ||
|
if (IsEqualGUID(riid, &IID_IUnknown) ||
|
||||||
IsEqualGUID(riid, &IID_IParseDisplayName))
|
IsEqualGUID(riid, &IID_IParseDisplayName))
|
||||||
{
|
{
|
||||||
*ppvObj = iface;
|
*ppv = iface;
|
||||||
IParseDisplayName_AddRef(iface);
|
IParseDisplayName_AddRef(iface);
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
FIXME("- no interface IID: %s\n", debugstr_guid(riid));
|
FIXME("- no interface IID: %s\n", debugstr_guid(riid));
|
||||||
|
*ppv = NULL;
|
||||||
return E_NOINTERFACE;
|
return E_NOINTERFACE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************
|
static ULONG WINAPI DEVENUM_IParseDisplayName_AddRef(IParseDisplayName *iface)
|
||||||
* DEVENUM_IParseDisplayName_AddRef (also IUnknown)
|
|
||||||
*/
|
|
||||||
static ULONG WINAPI DEVENUM_IParseDisplayName_AddRef(LPPARSEDISPLAYNAME iface)
|
|
||||||
{
|
{
|
||||||
TRACE("\n");
|
TRACE("\n");
|
||||||
|
|
||||||
|
@ -60,10 +57,7 @@ static ULONG WINAPI DEVENUM_IParseDisplayName_AddRef(LPPARSEDISPLAYNAME iface)
|
||||||
return 2; /* non-heap based object */
|
return 2; /* non-heap based object */
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************
|
static ULONG WINAPI DEVENUM_IParseDisplayName_Release(IParseDisplayName *iface)
|
||||||
* DEVENUM_IParseDisplayName_Release (also IUnknown)
|
|
||||||
*/
|
|
||||||
static ULONG WINAPI DEVENUM_IParseDisplayName_Release(LPPARSEDISPLAYNAME iface)
|
|
||||||
{
|
{
|
||||||
TRACE("\n");
|
TRACE("\n");
|
||||||
|
|
||||||
|
@ -81,12 +75,8 @@ static ULONG WINAPI DEVENUM_IParseDisplayName_Release(LPPARSEDISPLAYNAME iface)
|
||||||
* Might not handle more complicated strings properly (ie anything
|
* Might not handle more complicated strings properly (ie anything
|
||||||
* not in "@device:sw:{CLSID1}\<filter name or CLSID>" format
|
* not in "@device:sw:{CLSID1}\<filter name or CLSID>" format
|
||||||
*/
|
*/
|
||||||
static HRESULT WINAPI DEVENUM_IParseDisplayName_ParseDisplayName(
|
static HRESULT WINAPI DEVENUM_IParseDisplayName_ParseDisplayName(IParseDisplayName *iface,
|
||||||
LPPARSEDISPLAYNAME iface,
|
IBindCtx *pbc, LPOLESTR pszDisplayName, ULONG *pchEaten, IMoniker **ppmkOut)
|
||||||
IBindCtx *pbc,
|
|
||||||
LPOLESTR pszDisplayName,
|
|
||||||
ULONG *pchEaten,
|
|
||||||
IMoniker **ppmkOut)
|
|
||||||
{
|
{
|
||||||
LPOLESTR pszBetween = NULL;
|
LPOLESTR pszBetween = NULL;
|
||||||
LPOLESTR pszClass = NULL;
|
LPOLESTR pszClass = NULL;
|
||||||
|
@ -163,4 +153,4 @@ static const IParseDisplayNameVtbl IParseDisplayName_Vtbl =
|
||||||
};
|
};
|
||||||
|
|
||||||
/* The one instance of this class */
|
/* The one instance of this class */
|
||||||
ParseDisplayNameImpl DEVENUM_ParseDisplayName = { &IParseDisplayName_Vtbl };
|
ParseDisplayNameImpl DEVENUM_ParseDisplayName = { { &IParseDisplayName_Vtbl } };
|
||||||
|
|
Loading…
Reference in New Issue