• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ IsEqualIID函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中IsEqualIID函数的典型用法代码示例。如果您正苦于以下问题:C++ IsEqualIID函数的具体用法?C++ IsEqualIID怎么用?C++ IsEqualIID使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了IsEqualIID函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
开发者ID:austin987,项目名称:wine,代码行数:39,代码来源:filedlgbrowser.c


示例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;
}
开发者ID:Kelimion,项目名称:wine,代码行数:24,代码来源:bmpdecode.c


示例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;
}
开发者ID:CSRedRat,项目名称:RosWine,代码行数:24,代码来源:shelldispatch.c


示例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;
}
开发者ID:eladkarako,项目名称:locate32,代码行数:15,代码来源:LocateShellExtension.Cpp


示例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;
}
开发者ID:CSRedRat,项目名称:RosWine,代码行数:24,代码来源:shelldispatch.c


示例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;
}
开发者ID:klickverbot,项目名称:wine,代码行数:27,代码来源:folders.c


示例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;
}
开发者ID:wine-mirror,项目名称:wine,代码行数:36,代码来源:main.c


示例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;
}
开发者ID:SatishSara,项目名称:zxlooong,代码行数:24,代码来源:Dragsrc.Cpp


示例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;
}
开发者ID:AlexSteel,项目名称:wine,代码行数:24,代码来源:activeimmapp.c


示例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;
}
开发者ID:GeonHun,项目名称:wine,代码行数:24,代码来源:capture.c


示例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, &AMPROPSETID_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;
}
开发者ID:Dimillian,项目名称:wine,代码行数:15,代码来源:qcap.c


示例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;
}
开发者ID:bpowers,项目名称:wine,代码行数:16,代码来源:datainit.c


示例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;
}
开发者ID:howard5888,项目名称:wineT,代码行数:24,代码来源:oleproxy.c


示例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;
}
开发者ID:mutoso-mirrors,项目名称:reactos,代码行数:24,代码来源:memallocator.c


示例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;
}
开发者ID:DeltaYang,项目名称:wine,代码行数:25,代码来源:style.c


示例16: DllGetClassObject

STDAPI DllGetClassObject( REFCLSID rclsid, REFIID riid, LPVOID *ppv )
{
	*ppv = NULL;

	if (IsEqualIID(rclsid, CLSID_HashCheck))
	{
		LPCHASHCHECKCLASSFACTORY lpHashCheckClassFactory = new CHashCheckClassFactory;
		if (lpHashCheckClassFactory == NULL) return(E_OUTOFMEMORY);

		HRESULT hr = lpHashCheckClassFactory->QueryInterface(riid, ppv);
		lpHashCheckClassFactory->Release();
		return(hr);
	}

	return(CLASS_E_CLASSNOTAVAILABLE);
}
开发者ID:gurnec,项目名称:HashCheck,代码行数:16,代码来源:HashCheck.cpp


示例17: IDeskMonitor_IClassFactory_CreateInstance

static HRESULT STDMETHODCALLTYPE
IDeskMonitor_IClassFactory_CreateInstance(IClassFactory *iface,
                                          IUnknown * pUnkOuter,
                                          REFIID riid,
                                          PVOID *ppvObject)
{
    if (pUnkOuter != NULL &&
        !IsEqualIID(riid,
                    &IID_IUnknown))
    {
        return CLASS_E_NOAGGREGATION;
    }

    return IDeskMonitor_Constructor(riid,
                                    ppvObject);
}
开发者ID:GYGit,项目名称:reactos,代码行数:16,代码来源:shxiface.c


示例18: QueryInterface

	// IUnknown
HRESULT STDMETHODCALLTYPE EnumDragDropFormats::QueryInterface(REFIID riid, void **ppvObject)
{
	if (IsEqualIID(riid, IID_IEnumFORMATETC))
	{
		*ppvObject = static_cast<IEnumFORMATETC *>(this);
	}
    else
    {
        *ppvObject = NULL;
        return E_NOINTERFACE;
    }

    AddRef();

    return S_OK;
}
开发者ID:Templier,项目名称:desktopx,代码行数:17,代码来源:EnumDragDropFormats.cpp


示例19: UNREFERENCED_PARAMETER

// This is called by IE to notify us of events
// http://msdn.microsoft.com/en-us/library/aa768283(VS.85).aspx
STDMETHODIMP CEventSink::Invoke(DISPID dispIdMember,REFIID riid,LCID lcid,WORD wFlags,DISPPARAMS *pDispParams,VARIANT *pVarResult,EXCEPINFO *pExcepInfo,UINT *puArgErr)
{
	UNREFERENCED_PARAMETER(lcid);
	UNREFERENCED_PARAMETER(wFlags);
	UNREFERENCED_PARAMETER(pVarResult);
	UNREFERENCED_PARAMETER(pExcepInfo);
	UNREFERENCED_PARAMETER(puArgErr);

	if(!IsEqualIID(riid,IID_NULL)) return DISP_E_UNKNOWNINTERFACE; // riid should always be IID_NULL

	/*
Order:
[6184] HTTPSEverywhere DISPID_COMMANDSTATECHANGE
[6184] HTTPSEverywhere DISPID_COMMANDSTATECHANGE
[6184] HTTPSEverywhere DISPID_DOWNLOADCOMPLETE
[6184] HTTPSEverywhere DISPID_COMMANDSTATECHANGE
[6184] HTTPSEverywhere DISPID_NAVIGATECOMPLETE2
*/
	
	if(dispIdMember == DISPID_DOCUMENTCOMPLETE) { // DWebBrowserEvents2::DocumentComplete
		//Debug::Log("DISPID_DOCUMENTCOMPLETE");
		CheckForUpdate();
	}
	else if(dispIdMember==DISPID_NAVIGATECOMPLETE2) { // DWebBrowserEvents2::NavigateComplete2
		Debug::Log("DISPID_NAVIGATECOMPLETE2");
		AttachEvent(pDispParams->rgvarg[1].pdispVal); // helps a bit but not enough for HTTP script
	}
	else if (dispIdMember==DISPID_WINDOWSTATECHANGED) {
		//Debug::Log("DISPID_WINDOWSTATECHANGED");

		DWORD dwMask = pDispParams->rgvarg[0].lVal;
		DWORD dwFlags = pDispParams->rgvarg[1].lVal;

		// Is tab visible?
		if (dwMask & OLECMDIDF_WINDOWSTATE_USERVISIBLE) {
			visible = dwFlags & OLECMDIDF_WINDOWSTATE_USERVISIBLE;
		}
	}
	/*else if (dispIdMember==DISPID_ONQUIT) {
		Debug::Log("ONQUIT");
		//WinInetRemoveHooks();
		//Debug::Log("Wininet hook removed");
	}*/

	return S_OK;
}
开发者ID:juliensobrier,项目名称:https-erverywhere-ie,代码行数:48,代码来源:EventSink.cpp


示例20: DllGetClassObject

/***********************************************************************
 *             DllGetClassObject ([email protected])
 */
HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv)
{
    IClassFactory   *pcf = NULL;

    TRACE("%s %s %p\n", debugstr_guid(rclsid), debugstr_guid(iid), ppv);

    if (!ppv)
        return E_INVALIDARG;
    *ppv = NULL;

    if (IsEqualIID(rclsid, &CLSID_wb_Neutral))
        pcf = &wb_cf.IClassFactory_iface;
    else
        return CLASS_E_CLASSNOTAVAILABLE;

    return IClassFactory_QueryInterface(pcf, iid, ppv);
}
开发者ID:AlexSteel,项目名称:wine,代码行数:20,代码来源:infosoft_main.c



注:本文中的IsEqualIID函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ IsEquivalent函数代码示例发布时间:2022-05-30
下一篇:
C++ IsEqualGUID函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap