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:
Jactry Zeng 2017-03-10 18:26:53 +08:00 committed by Alexandre Julliard
parent b0a35bbcd2
commit 05ed831894
2 changed files with 14 additions and 3 deletions

View File

@ -355,12 +355,14 @@ static HRESULT WINAPI DEVENUM_IMediaCatMoniker_GetClassID(IMoniker *iface, CLSID
{
MediaCatMoniker *This = impl_from_IMoniker(iface);
FIXME("(%p)->(%p): stub\n", This, pClassID);
TRACE("(%p)->(%p)\n", This, pClassID);
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)

View File

@ -79,6 +79,15 @@ static void test_devenum(IBindCtx *bind_ctx)
IPropertyBag* prop_bag = NULL;
VARIANT var;
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);
hr = IMoniker_BindToStorage(moniker, bind_ctx, NULL, &IID_IPropertyBag, (LPVOID*)&prop_bag);