devenum: Implement IMoniker::GetClassID().
Signed-off-by: Jactry Zeng <jzeng@codeweavers.com> Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
b0a35bbcd2
commit
05ed831894
|
@ -355,12 +355,14 @@ static HRESULT WINAPI DEVENUM_IMediaCatMoniker_GetClassID(IMoniker *iface, CLSID
|
||||||
{
|
{
|
||||||
MediaCatMoniker *This = impl_from_IMoniker(iface);
|
MediaCatMoniker *This = impl_from_IMoniker(iface);
|
||||||
|
|
||||||
FIXME("(%p)->(%p): stub\n", This, pClassID);
|
TRACE("(%p)->(%p)\n", This, pClassID);
|
||||||
|
|
||||||
if (pClassID == NULL)
|
if (pClassID == NULL)
|
||||||
return E_POINTER;
|
return E_INVALIDARG;
|
||||||
|
|
||||||
return E_NOTIMPL;
|
*pClassID = CLSID_CDeviceMoniker;
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI DEVENUM_IMediaCatMoniker_IsDirty(IMoniker *iface)
|
static HRESULT WINAPI DEVENUM_IMediaCatMoniker_IsDirty(IMoniker *iface)
|
||||||
|
|
|
@ -79,6 +79,15 @@ static void test_devenum(IBindCtx *bind_ctx)
|
||||||
IPropertyBag* prop_bag = NULL;
|
IPropertyBag* prop_bag = NULL;
|
||||||
VARIANT var;
|
VARIANT var;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
CLSID clsid = {0};
|
||||||
|
|
||||||
|
hr = IMoniker_GetClassID(moniker, NULL);
|
||||||
|
ok(hr == E_INVALIDARG, "IMoniker_GetClassID should failed %x\n", hr);
|
||||||
|
|
||||||
|
hr = IMoniker_GetClassID(moniker, &clsid);
|
||||||
|
ok(hr == S_OK, "IMoniker_GetClassID failed with error %x\n", hr);
|
||||||
|
ok(IsEqualGUID(&clsid, &CLSID_CDeviceMoniker),
|
||||||
|
"Expected CLSID_CDeviceMoniker got %s\n", wine_dbgstr_guid(&clsid));
|
||||||
|
|
||||||
VariantInit(&var);
|
VariantInit(&var);
|
||||||
hr = IMoniker_BindToStorage(moniker, bind_ctx, NULL, &IID_IPropertyBag, (LPVOID*)&prop_bag);
|
hr = IMoniker_BindToStorage(moniker, bind_ctx, NULL, &IID_IPropertyBag, (LPVOID*)&prop_bag);
|
||||||
|
|
Loading…
Reference in New Issue