本文整理汇总了C++中IsEqualIID函数的典型用法代码示例。如果您正苦于以下问题:C++ IsEqualIID函数的具体用法?C++ IsEqualIID怎么用?C++ IsEqualIID使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了IsEqualIID函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: IShellBrowserImpl_QueryInterface
/***************************************************************************
* IShellBrowserImpl_QueryInterface
*/
static HRESULT WINAPI IShellBrowserImpl_QueryInterface(IShellBrowser *iface,
REFIID riid,
LPVOID *ppvObj)
{
IShellBrowserImpl *This = (IShellBrowserImpl *)iface;
TRACE("(%p)\n\t%s\n", This, debugstr_guid(riid));
*ppvObj = NULL;
if(IsEqualIID(riid, &IID_IUnknown)) /*IUnknown*/
{ *ppvObj = This;
}
else if(IsEqualIID(riid, &IID_IOleWindow)) /*IOleWindow*/
{ *ppvObj = This;
}
else if(IsEqualIID(riid, &IID_IShellBrowser)) /*IShellBrowser*/
{ *ppvObj = This;
}
else if(IsEqualIID(riid, &IID_ICommDlgBrowser)) /*ICommDlgBrowser*/
{ *ppvObj = &(This->lpVtblCommDlgBrowser);
}
else if(IsEqualIID(riid, &IID_IServiceProvider)) /* IServiceProvider */
{ *ppvObj = &(This->lpVtblServiceProvider);
}
if(*ppvObj)
{ IUnknown_AddRef( (IShellBrowser*) *ppvObj);
return S_OK;
}
FIXME("Unknown interface requested\n");
return E_NOINTERFACE;
}
示例2: BmpFrameDecode_QueryInterface
static HRESULT WINAPI BmpFrameDecode_QueryInterface(IWICBitmapFrameDecode *iface, REFIID iid,
void **ppv)
{
BmpDecoder *This = impl_from_IWICBitmapFrameDecode(iface);
TRACE("(%p,%s,%p)\n", iface, debugstr_guid(iid), ppv);
if (!ppv) return E_INVALIDARG;
if (IsEqualIID(&IID_IUnknown, iid) ||
IsEqualIID(&IID_IWICBitmapSource, iid) ||
IsEqualIID(&IID_IWICBitmapFrameDecode, iid))
{
*ppv = &This->IWICBitmapFrameDecode_iface;
}
else
{
*ppv = NULL;
return E_NOINTERFACE;
}
IUnknown_AddRef((IUnknown*)*ppv);
return S_OK;
}
示例3: ShellDispatch_QueryInterface
static HRESULT WINAPI ShellDispatch_QueryInterface(IShellDispatch2 *iface,
REFIID riid, LPVOID *ppv)
{
ShellDispatch *This = impl_from_IShellDispatch2(iface);
TRACE("(%p,%p,%p)\n", iface, riid, ppv);
if (!ppv) return E_INVALIDARG;
if (IsEqualIID(&IID_IUnknown, riid) ||
IsEqualIID(&IID_IDispatch, riid) ||
IsEqualIID(&IID_IShellDispatch, riid) ||
IsEqualIID(&IID_IShellDispatch2, riid))
*ppv = This;
else
{
FIXME("not implemented for %s\n", shdebugstr_guid(riid));
*ppv = NULL;
return E_NOINTERFACE;
}
IShellDispatch2_AddRef(iface);
return S_OK;
}
示例4: DllGetClassObject
STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppvOut)
{
ODS("In DllGetClassObject");
*ppvOut = NULL;
if (IsEqualIID(rclsid, CLSID_ShellExtension))
{
CShellExtClassFactory *pcf = new CShellExtClassFactory;
return pcf->QueryInterface(riid, ppvOut);
}
return CLASS_E_CLASSNOTAVAILABLE;
}
示例5: FolderImpl_QueryInterface
static HRESULT WINAPI FolderImpl_QueryInterface(Folder3 *iface, REFIID riid,
LPVOID *ppv)
{
FolderImpl *This = impl_from_Folder(iface);
TRACE("(%p,%p,%p)\n", iface, riid, ppv);
if (!ppv) return E_INVALIDARG;
if (IsEqualIID(&IID_IUnknown, riid) ||
IsEqualIID(&IID_IDispatch, riid) ||
IsEqualIID(&IID_Folder, riid) ||
IsEqualIID(&IID_Folder2, riid) ||
IsEqualIID(&IID_Folder3, riid))
*ppv = This;
else
{
FIXME("not implemented for %s\n", shdebugstr_guid(riid));
*ppv = NULL;
return E_NOINTERFACE;
}
IUnknown_AddRef((IUnknown*)*ppv);
return S_OK;
}
示例6: IExtractIconW_fnQueryInterface
/**************************************************************************
* IExtractIconW::QueryInterface
*/
static HRESULT WINAPI IExtractIconW_fnQueryInterface(IExtractIconW *iface, REFIID riid,
void **ppv)
{
IExtractIconWImpl *This = impl_from_IExtractIconW(iface);
TRACE("(%p)->(\n\tIID:\t%s,%p)\n", This, debugstr_guid(riid), ppv);
*ppv = NULL;
if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IExtractIconW))
*ppv = iface;
else if (IsEqualIID(riid, &IID_IPersistFile))
*ppv = &This->IPersistFile_iface;
else if (IsEqualIID(riid, &IID_IExtractIconA))
*ppv = &This->IExtractIconA_iface;
if(*ppv)
{
IUnknown_AddRef((IUnknown*)*ppv);
TRACE("-- Interface: (%p)->(%p)\n", ppv, *ppv);
return S_OK;
}
TRACE("-- Interface: E_NOINTERFACE\n");
return E_NOINTERFACE;
}
示例7: QISearch
HRESULT WINAPI QISearch(void *base, const QITAB *table, REFIID riid, void **obj)
{
const QITAB *ptr;
IUnknown *unk;
TRACE("%p, %p, %s, %p\n", base, table, debugstr_guid(riid), obj);
if (!obj)
return E_POINTER;
for (ptr = table; ptr->piid; ++ptr)
{
TRACE("trying (offset %d) %s\n", ptr->dwOffset, debugstr_guid(ptr->piid));
if (IsEqualIID(riid, ptr->piid))
{
unk = (IUnknown *)((BYTE *)base + ptr->dwOffset);
TRACE("matched, returning (%p)\n", unk);
*obj = unk;
IUnknown_AddRef(unk);
return S_OK;
}
}
if (IsEqualIID(riid, &IID_IUnknown))
{
unk = (IUnknown *)((BYTE *)base + table->dwOffset);
TRACE("returning first for IUnknown (%p)\n", unk);
*obj = unk;
IUnknown_AddRef(unk);
return S_OK;
}
WARN("Not found %s.\n", debugstr_guid(riid));
*obj = NULL;
return E_NOINTERFACE;
}
示例8: if
STDMETHODIMP CDragSource::QueryInterface(REFIID riid, LPVOID* ppvOut)
{
*ppvOut = NULL;
//IUnknown
if(IsEqualIID(riid, IID_IUnknown))
{
*ppvOut = this;
}
//IDropSource
else if(IsEqualIID(riid, IID_IDropSource))
{
*ppvOut = (IDropSource*)this;
}
if(*ppvOut)
{
(*(LPUNKNOWN*)ppvOut)->AddRef();
return S_OK;
}
return E_NOINTERFACE;
}
示例9: ActiveIMMApp_QueryInterface
static HRESULT WINAPI ActiveIMMApp_QueryInterface (IActiveIMMApp* iface,
REFIID iid, LPVOID *ppvOut)
{
ActiveIMMApp *This = impl_from_IActiveIMMApp(iface);
*ppvOut = NULL;
if (IsEqualIID(iid, &IID_IUnknown) || IsEqualIID(iid, &IID_IActiveIMMApp))
{
*ppvOut = This;
}
else if (IsEqualIID(iid, &IID_IActiveIMMMessagePumpOwner))
{
*ppvOut = &This->IActiveIMMMessagePumpOwner_iface;
}
if (*ppvOut)
{
IUnknown_AddRef(iface);
return S_OK;
}
WARN("unsupported interface: %s\n", debugstr_guid(iid));
return E_NOINTERFACE;
}
示例10: IUnknownImpl_QueryInterface
static HRESULT WINAPI IUnknownImpl_QueryInterface(IUnknown *iface, REFIID riid, void **ppv)
{
IDirectSoundCaptureImpl *This = impl_from_IUnknown(iface);
TRACE("(%p,%s,%p)\n", This, debugstr_guid(riid), ppv);
if (!ppv) {
WARN("invalid parameter\n");
return E_INVALIDARG;
}
*ppv = NULL;
if (IsEqualIID(riid, &IID_IUnknown))
*ppv = &This->IUnknown_inner;
else if (IsEqualIID(riid, &IID_IDirectSoundCapture))
*ppv = &This->IDirectSoundCapture_iface;
else {
WARN("unknown IID %s\n", debugstr_guid(riid));
return E_NOINTERFACE;
}
IUnknown_AddRef((IUnknown*)*ppv);
return S_OK;
}
示例11: KsPropertySet_Get
static HRESULT WINAPI KsPropertySet_Get(IKsPropertySet *iface, REFGUID guidPropSet, DWORD dwPropID,
LPVOID pInstanceData, DWORD cbInstanceData, LPVOID pPropData, DWORD cbPropData, DWORD *pcbReturned)
{
test_filter *This = impl_from_IKsPropertySet(iface);
check_calls_list("KsPropertySet_Get", KSPROPERTYSET_GET, This->filter_type);
ok(IsEqualIID(guidPropSet, &ROPSETID_Pin), "guidPropSet = %s\n", debugstr_guid(guidPropSet));
ok(dwPropID == 0, "dwPropID = %d\n", dwPropID);
ok(pInstanceData == NULL, "pInstanceData != NULL\n");
ok(cbInstanceData == 0, "cbInstanceData != 0\n");
ok(cbPropData == sizeof(GUID), "cbPropData = %d\n", cbPropData);
*pcbReturned = sizeof(GUID);
memcpy(pPropData, &PIN_CATEGORY_EDS, sizeof(GUID));
return S_OK;
}
示例12: datainit_GetDataSource
/*** IDataInitialize methods ***/
static HRESULT WINAPI datainit_GetDataSource(IDataInitialize *iface, IUnknown *pUnkOuter, DWORD dwClsCtx,
LPWSTR pwszInitializationString, REFIID riid, IUnknown **ppDataSource)
{
datainit *This = impl_from_IDataInitialize(iface);
FIXME("(%p)->(%p %d %s %s %p)\n", This, pUnkOuter, dwClsCtx, debugstr_w(pwszInitializationString),
debugstr_guid(riid), ppDataSource);
if(IsEqualIID(riid, &IID_IDBInitialize))
{
return create_db_init( (LPVOID*)ppDataSource);
}
return E_NOTIMPL;
}
示例13: PSFacBuf_CreateStub
static HRESULT WINAPI
PSFacBuf_CreateStub(
LPPSFACTORYBUFFER iface, REFIID riid,IUnknown *pUnkServer,
IRpcStubBuffer** ppStub
) {
HRESULT hres;
TRACE("(%s,%p,%p)\n",debugstr_guid(riid),pUnkServer,ppStub);
if (IsEqualIID(&IID_IClassFactory, riid) ||
IsEqualIID(&IID_IUnknown, riid) /* FIXME: fixup stub manager and remove this*/) {
hres = CFStub_Construct(ppStub);
if (!hres)
IRpcStubBuffer_Connect((*ppStub),pUnkServer);
return hres;
} else if (IsEqualIID(&IID_IRemUnknown,riid)) {
hres = RemUnkStub_Construct(ppStub);
if (!hres)
IRpcStubBuffer_Connect((*ppStub),pUnkServer);
return hres;
}
FIXME("stubbing not implemented for (%s) yet!\n",debugstr_guid(riid));
return E_FAIL;
}
示例14: StdMediaSample2_QueryInterface
static HRESULT WINAPI StdMediaSample2_QueryInterface(IMediaSample2 * iface, REFIID riid, LPVOID * ppv)
{
StdMediaSample2 *This = (StdMediaSample2 *)iface;
TRACE("(%s, %p)\n", qzdebugstr_guid(riid), ppv);
*ppv = NULL;
if (IsEqualIID(riid, &IID_IUnknown))
*ppv = This;
else if (IsEqualIID(riid, &IID_IMediaSample))
*ppv = This;
else if (IsEqualIID(riid, &IID_IMediaSample2))
*ppv = This;
if (*ppv)
{
IUnknown_AddRef((IUnknown *)(*ppv));
return S_OK;
}
FIXME("No interface for %s!\n", qzdebugstr_guid(riid));
return E_NOINTERFACE;
}
示例15: IDirectMusicStyle8Impl_QueryInterface
/* DirectMusicStyle8Impl IDirectMusicStyle8 part: */
static HRESULT WINAPI IDirectMusicStyle8Impl_QueryInterface(IDirectMusicStyle8 *iface, REFIID riid,
void **ret_iface)
{
IDirectMusicStyle8Impl *This = impl_from_IDirectMusicStyle8(iface);
TRACE("(%p, %s, %p)\n", This, debugstr_dmguid(riid), ret_iface);
*ret_iface = NULL;
if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IDirectMusicStyle) ||
IsEqualIID(riid, &IID_IDirectMusicStyle8))
*ret_iface = iface;
else if (IsEqualIID(riid, &IID_IDirectMusicObject))
*ret_iface = &This->ObjectVtbl;
else if (IsEqualIID(riid, &IID_IPersistStream))
*ret_iface = &This->PersistStreamVtbl;
else {
WARN("(%p, %s, %p): not found\n", This, debugstr_dmguid(riid), ret_iface);
return E_NOINTERFACE;
}
IUnknown_AddRef((IUnknown*)*ret_iface);
return S_OK;
}