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

C++ IClassFactory_AddRef函数代码示例

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

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



在下文中一共展示了IClassFactory_AddRef函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: DllGetClassObject

/***********************************************************************
 *		DllGetClassObject ([email protected])
 */
HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv)
{
    *ppv = NULL;
    if (IsEqualGUID(rclsid,&CLSID_StdFont)) {
	if (IsEqualGUID(iid,&IID_IClassFactory)) {
	    _get_STDFONT_CF(ppv);
	    IClassFactory_AddRef((IClassFactory*)*ppv);
	    return S_OK;
	}
    }
    if (IsEqualGUID(rclsid,&CLSID_StdPicture)) {
	if (IsEqualGUID(iid,&IID_IClassFactory)) {
	    _get_STDPIC_CF(ppv);
	    IClassFactory_AddRef((IClassFactory*)*ppv);
	    return S_OK;
	}
    }
    if (IsEqualCLSID(rclsid, &CLSID_PSDispatch) && IsEqualIID(iid, &IID_IPSFactoryBuffer)) {
        *ppv = &pPSDispatchFacBuf;
        IPSFactoryBuffer_AddRef((IPSFactoryBuffer *)*ppv);
        return S_OK;
    }
    if (IsEqualGUID(rclsid,&CLSID_PSOAInterface)) {
	if (S_OK==TMARSHAL_DllGetClassObject(rclsid,iid,ppv))
	    return S_OK;
	/*FALLTHROUGH*/
    }
    if (IsEqualCLSID(rclsid, &CLSID_PSTypeInfo) ||
        IsEqualCLSID(rclsid, &CLSID_PSTypeLib) ||
        IsEqualCLSID(rclsid, &CLSID_PSDispatch) ||
        IsEqualCLSID(rclsid, &CLSID_PSEnumVariant))
        return OLEAUTPS_DllGetClassObject(&CLSID_PSFactoryBuffer, iid, ppv);

    return OLEAUTPS_DllGetClassObject(rclsid, iid, ppv);
}
开发者ID:lucianolorenti,项目名称:wine,代码行数:38,代码来源:oleaut.c


示例2: InstanceObjectFactory_Constructor

HRESULT InstanceObjectFactory_Constructor(REFCLSID rclsid, IPropertyBag *pPropertyBag, REFIID riid,
    LPVOID *ppvObject)
{
    InstanceObjectFactory *pInstanceObjectFactory;
    HRESULT hr = E_FAIL;

    TRACE("(RegistryPropertyBag=%p, riid=%s, ppvObject=%p)\n", pPropertyBag,
        debugstr_guid(riid), ppvObject);

    pInstanceObjectFactory = shdocvw_alloc(sizeof(InstanceObjectFactory));
    if (pInstanceObjectFactory) {
        pInstanceObjectFactory->lpIClassFactoryVtbl = &InstanceObjectFactory_IClassFactoryVtbl;
        pInstanceObjectFactory->m_cRef = 0;
        memcpy(&pInstanceObjectFactory->m_clsidInstance, rclsid, sizeof(CLSID));
        pInstanceObjectFactory->m_pPropertyBag = pPropertyBag;
        IPropertyBag_AddRef(pPropertyBag);

        IClassFactory_AddRef(STATIC_CAST(IClassFactory, pInstanceObjectFactory));
        hr = IClassFactory_QueryInterface(STATIC_CAST(IClassFactory, pInstanceObjectFactory),
                                          riid, ppvObject);
        IClassFactory_Release(STATIC_CAST(IClassFactory, pInstanceObjectFactory));
    }

    return hr;
}
开发者ID:howard5888,项目名称:wineT,代码行数:25,代码来源:shlinstobj.c


示例3: InstanceObjectFactory_Constructor

static HRESULT InstanceObjectFactory_Constructor(REFCLSID rclsid, IPropertyBag *pPropertyBag,
                                                 REFIID riid, LPVOID *ppvObject)
{
    InstanceObjectFactory *pInstanceObjectFactory;
    HRESULT hr = E_FAIL;

    TRACE("(RegistryPropertyBag=%p, riid=%s, ppvObject=%p)\n", pPropertyBag,
        debugstr_guid(riid), ppvObject);

    pInstanceObjectFactory = heap_alloc(sizeof(InstanceObjectFactory));
    if (pInstanceObjectFactory) {
        pInstanceObjectFactory->IClassFactory_iface.lpVtbl = &InstanceObjectFactory_IClassFactoryVtbl;
        pInstanceObjectFactory->m_cRef = 0;
        pInstanceObjectFactory->m_clsidInstance = *rclsid;
        pInstanceObjectFactory->m_pPropertyBag = pPropertyBag;
        IPropertyBag_AddRef(pPropertyBag);

        IClassFactory_AddRef(&pInstanceObjectFactory->IClassFactory_iface);
        hr = IClassFactory_QueryInterface(&pInstanceObjectFactory->IClassFactory_iface,
                                          riid, ppvObject);
        IClassFactory_Release(&pInstanceObjectFactory->IClassFactory_iface);
    }

    return hr;
}
开发者ID:Moteesh,项目名称:reactos,代码行数:25,代码来源:shlinstobj.c


示例4: DXDiagCF_QueryInterface

static HRESULT WINAPI DXDiagCF_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv)
{
  if (ppv == NULL)
    return E_POINTER;

  if (IsEqualGUID(&IID_IUnknown, riid))
    TRACE("(%p)->(IID_IUnknown %p)\n", iface, ppv);
  else if (IsEqualGUID(&IID_IClassFactory, riid))
    TRACE("(%p)->(IID_IClassFactory %p)\n", iface, ppv);
  else if (IsEqualGUID(&IID_IExternalConnection, riid) ||
           IsEqualGUID(&IID_IMarshal, riid)) {
    TRACE("(%p)->(%s) ignoring\n", iface, debugstr_guid(riid));
    *ppv = NULL;
    return E_NOINTERFACE;
  }
  else {
    FIXME("(%p)->(%s %p)\n", iface, debugstr_guid(riid), ppv);
    *ppv = NULL;
    return E_NOINTERFACE;
  }

  *ppv = iface;
  IClassFactory_AddRef(iface);
  return S_OK;
}
开发者ID:GYGit,项目名称:reactos,代码行数:25,代码来源:dxdiag_main.c


示例5: DllGetClassObject

/******************************************************************
 *		DllGetClassObject ([email protected])
 *
 *
 */
HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
{
    TRACE("(%s, %s, %p)\n", debugstr_dmguid(rclsid), debugstr_dmguid(riid), ppv);

    if (IsEqualCLSID(rclsid, &CLSID_DirectMusicSynth) && IsEqualIID(riid, &IID_IClassFactory)) {
        *ppv = &Synth_CF;
        IClassFactory_AddRef((IClassFactory*)*ppv);
        return S_OK;
    } else if (IsEqualCLSID(rclsid, &CLSID_DirectMusicSynthSink) && IsEqualIID(riid, &IID_IClassFactory)) {
        *ppv = &SynthSink_CF;
        IClassFactory_AddRef((IClassFactory*)*ppv);
        return S_OK;
    }

    WARN("(%s,%s,%p): no interface found.\n", debugstr_dmguid(rclsid), debugstr_dmguid(riid), ppv);
    return CLASS_E_CLASSNOTAVAILABLE;
}
开发者ID:AmesianX,项目名称:RosWine,代码行数:22,代码来源:dmsynth_main.c


示例6: ClassMonikerCF_QueryInterface

static HRESULT WINAPI ClassMonikerCF_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv)
{
    *ppv = NULL;
    if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IClassFactory))
    {
        *ppv = iface;
        IClassFactory_AddRef(iface);
        return S_OK;
    }
    return E_NOINTERFACE;
}
开发者ID:RareHare,项目名称:reactos,代码行数:11,代码来源:classmoniker.c


示例7: IMAPTransportCF_QueryInterface

static HRESULT WINAPI IMAPTransportCF_QueryInterface(IClassFactory *iface,
    REFIID riid, LPVOID *ppv)
{
    *ppv = NULL;
    if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IClassFactory))
    {
        *ppv = iface;
        IClassFactory_AddRef(iface);
        return S_OK;
    }
    return E_NOINTERFACE;
}
开发者ID:GYGit,项目名称:reactos,代码行数:12,代码来源:imaptransport.c


示例8: wucf_QueryInterface

static HRESULT WINAPI wucf_QueryInterface( IClassFactory *iface, REFIID riid, LPVOID *ppobj )
{
    if (IsEqualGUID(riid, &IID_IUnknown) ||
        IsEqualGUID(riid, &IID_IClassFactory))
    {
        IClassFactory_AddRef( iface );
        *ppobj = iface;
        return S_OK;
    }
    FIXME("interface %s not implemented\n", debugstr_guid(riid));
    return E_NOINTERFACE;
}
开发者ID:MichaelMcDonnell,项目名称:wine,代码行数:12,代码来源:main.c


示例9: RegistrarCF_QueryInterface

static HRESULT WINAPI RegistrarCF_QueryInterface(IClassFactory *iface, REFIID riid, void **ppvObject)
{
    TRACE("(%p)->(%s %p)\n", iface, debugstr_guid(riid), ppvObject);

    if(IsEqualGUID(&IID_IUnknown, riid) || IsEqualGUID(&IID_IClassFactory, riid)) {
        *ppvObject = iface;
        IClassFactory_AddRef( iface );
        return S_OK;
    }

    return E_NOINTERFACE;
}
开发者ID:Moteesh,项目名称:reactos,代码行数:12,代码来源:atl30.c


示例10: FileMonikerCF_QueryInterface

static HRESULT WINAPI FileMonikerCF_QueryInterface(LPCLASSFACTORY iface,
                                                  REFIID riid, LPVOID *ppv)
{
    *ppv = NULL;
    if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IClassFactory))
    {
        *ppv = iface;
        IClassFactory_AddRef(iface);
        return S_OK;
    }
    return E_NOINTERFACE;
}
开发者ID:Barrell,项目名称:wine,代码行数:12,代码来源:filemoniker.c


示例11: ClassFactory_QueryInterface

static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFGUID riid, void **ppvObject)
{
    if(IsEqualGUID(&IID_IClassFactory, riid) || IsEqualGUID(&IID_IUnknown, riid)) {
        IClassFactory_AddRef(iface);
        *ppvObject = iface;
        return S_OK;
    }

    WARN("not supported iid %s\n", debugstr_guid(riid));
    *ppvObject = NULL;
    return E_NOINTERFACE;
}
开发者ID:MichaelMcDonnell,项目名称:wine,代码行数:12,代码来源:main.c


示例12: ClassFactory_QueryInterface

static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, LPVOID *ppvOut)
{
    *ppvOut = NULL;
    if (IsEqualIID(riid, &IID_IClassFactory) || IsEqualIID(riid, &IID_IUnknown)) {
        IClassFactory_AddRef(iface);
        *ppvOut = iface;
        return S_OK;
    }

    WARN("Unknown interface %s\n", debugstr_guid(riid));
    return E_NOINTERFACE;
}
开发者ID:devyn,项目名称:wine,代码行数:12,代码来源:browseui_main.c


示例13: OBJSEL_IClassFactory_LockServer

/**********************************************************************
 * OBJSEL_IClassFactory_LockServer
 */
static HRESULT WINAPI OBJSEL_IClassFactory_LockServer(
    LPCLASSFACTORY iface,
    BOOL fLock)
{
    TRACE("\n");

    if (fLock)
        IClassFactory_AddRef(iface);
    else
        IClassFactory_Release(iface);
    return S_OK;
}
开发者ID:GYGit,项目名称:reactos,代码行数:15,代码来源:factory.c


示例14: MSTASK_IClassFactory_LockServer

static HRESULT WINAPI MSTASK_IClassFactory_LockServer(
        IClassFactory *iface,
        BOOL fLock)
{
    TRACE("\n");

    if (fLock)
        IClassFactory_AddRef(iface);
    else
        IClassFactory_Release(iface);
    return S_OK;
}
开发者ID:hoangduit,项目名称:reactos,代码行数:12,代码来源:factory.c


示例15: DllGetClassObject

/***********************************************************************
 *		DllGetClassObject ([email protected])
 */
HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
{
    TRACE("(%s,%s,%p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
    if ( IsEqualCLSID( &IID_IClassFactory, riid ) ) {
        *ppv = &DINPUT8_CF;
        IClassFactory_AddRef((IClassFactory*)*ppv);
        return S_OK;
    }

    FIXME("(%s,%s,%p): no interface found.\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
    return CLASS_E_CLASSNOTAVAILABLE;
}
开发者ID:AlexSteel,项目名称:wine,代码行数:15,代码来源:dinput8_main.c


示例16: DllGetClassObject

/***********************************************************************
 *		DllGetClassObject ([email protected])
 */
HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
{
    TRACE("(%s,%s,%p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);

    if (IsEqualGUID(rclsid, &CLSID_DxDiagProvider)) {
      IClassFactory_AddRef(&DXDiag_CF.IClassFactory_iface);
      *ppv = &DXDiag_CF.IClassFactory_iface;
      return S_OK;
    }

    FIXME("(%s,%s,%p): no interface found.\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
    return CLASS_E_CLASSNOTAVAILABLE;
}
开发者ID:GYGit,项目名称:reactos,代码行数:16,代码来源:dxdiag_main.c


示例17: COMCAT_IClassFactory_LockServer

/**********************************************************************
 * COMCAT_IClassFactory_LockServer
 */
static HRESULT WINAPI COMCAT_IClassFactory_LockServer(
    LPCLASSFACTORY iface,
    BOOL fLock)
{
    TRACE("\n");

    if (fLock != FALSE) {
	IClassFactory_AddRef(iface);
    } else {
	IClassFactory_Release(iface);
    }
    return S_OK;
}
开发者ID:WASSUM,项目名称:longene_travel,代码行数:16,代码来源:factory.c


示例18: IClassFactory_fnQueryInterface

static HRESULT WINAPI IClassFactory_fnQueryInterface(IClassFactory *iface, REFIID riid,
        void **ppobj)
{
  TRACE("(%p,%s,%p)\n", iface, debugstr_guid(riid), ppobj);

  if ((IsEqualGUID(&IID_IUnknown, riid)) ||
      (IsEqualGUID(&IID_IClassFactory, riid))) {
    *ppobj = iface;
    IClassFactory_AddRef(iface);
    return S_OK;
  }

  return E_NOINTERFACE;
}
开发者ID:mvardan,项目名称:ros-svn-mirror,代码行数:14,代码来源:factory.c


示例19: IClassFactory_fnQueryInterface

static HRESULT WINAPI IClassFactory_fnQueryInterface(LPCLASSFACTORY iface,
						     REFIID riid,LPVOID *ppobj)
{
  TRACE("(%p,%p,%p)\n", iface, riid, ppobj);

  if ((IsEqualGUID(&IID_IUnknown, riid)) ||
      (IsEqualGUID(&IID_IClassFactory, riid))) {
    *ppobj = iface;
    IClassFactory_AddRef(iface);
    return S_OK;
  }

  return E_NOINTERFACE;
}
开发者ID:awoland,项目名称:wine,代码行数:14,代码来源:factory.c


示例20: DSCF_QueryInterface

static HRESULT WINAPI DSCF_QueryInterface(IClassFactory *iface, REFIID riid, void **ppobj)
{
    if (IsEqualGUID(riid, &IID_IUnknown)
        || IsEqualGUID(riid, &IID_IClassFactory))
    {
        IClassFactory_AddRef(iface);
        *ppobj = iface;
        return S_OK;
    }

    *ppobj = NULL;
    WARN("(%p)->(%s,%p), not found\n", iface, debugstr_guid(riid), ppobj);
    return E_NOINTERFACE;
}
开发者ID:hoangduit,项目名称:reactos,代码行数:14,代码来源:main.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ IClassFactory_QueryInterface函数代码示例发布时间:2022-05-30
下一篇:
C++ ICOM_THIS_MULTI函数代码示例发布时间: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