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

C++ HX_RELEASE函数代码示例

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

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



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

示例1: HX_ASSERT

HX_RESULT HXCloakedV2TCPSocket::GetAddrInfoDone(HX_RESULT status,
                                                UINT32 nVecLen,
                                                IHXSockAddr** ppAddrVec)
{
    HX_RESULT res = HXR_FAIL;

    HX_ASSERT(0!=m_nProxyPort);

    //We are done getting the addr info for the proxy host.
    if( SUCCEEDED(status) && 1<=nVecLen )
    {
        HX_ASSERT(!m_pProxyAddr);
        HX_ASSERT(m_pTCPSocket);
        HX_RELEASE(m_pProxyAddr);
        ppAddrVec[0]->Clone(&m_pProxyAddr);
        m_pProxyAddr->SetPort(m_nProxyPort);
        if( m_pTCPSocket )
        {
            res = m_pTCPSocket->ConnectToOne(m_pProxyAddr);
        }
    }

    if( !SUCCEEDED(res) )
    {
        HX_RELEASE(m_pProxyAddr);
    }

    //hardcoded because I have no idea what the IHXSocket would do
    //with any other return code. Not sure why we return one at all.
    return HXR_OK;
}
开发者ID:muromec,项目名称:qtopia-ezx,代码行数:31,代码来源:hxcloaksockv2.cpp


示例2: _GeneratePostRequest

STDMETHODIMP HXCloakedV2TCPSocket::Write(IHXBuffer* pBuffer)
{
    IHXBuffer* pNew      = NULL;
    HX_RESULT  res       = HXR_FAIL;
    CHXString  GetString = "";
    
    
//    HX_ASSERT( csReady == m_CloakingState && pBuffer );

//    if( csReady == m_CloakingState && pBuffer )
    if( pBuffer )
    {
        pBuffer->AddRef();
        res = _GeneratePostRequest(pBuffer, pNew);
        HX_ASSERT(SUCCEEDED(res));
        if( SUCCEEDED(res) && pNew )
        {
            res = m_pTCPSocket->Write(pNew);
        }
        
        HX_RELEASE(pBuffer);
        HX_RELEASE(pNew);

        //We always follow our POST request with a Get request.
        GetString = _GenerateGetRequest();
        _WriteString(GetString);
    }
    
    return res;
}
开发者ID:muromec,项目名称:qtopia-ezx,代码行数:30,代码来源:hxcloaksockv2.cpp


示例3: OutputBuffers

void OutputBuffers(UINT16 ulStreamID, IHXValues* pHdr)
{
    const char* pName = 0;
    IHXBuffer* pValue = 0;
    HX_RESULT res = pHdr->GetFirstPropertyBuffer(pName, pValue);
    
    while (HXR_OK == res)
    {
	printf("GetBuffer %u \"%s\" \"", ulStreamID, pName);

	UCHAR* pCur = pValue->GetBuffer();
	UCHAR* pEnd = pCur + pValue->GetSize();

	static const char z_hexChars[] = "0123456789abcdef";

	for (;pCur < pEnd; pCur++)
	{
	    printf("%c%c", z_hexChars[*pCur >> 4], z_hexChars[*pCur & 0xf]);
	}

	printf("\"\n");
	
	HX_RELEASE(pValue);
	
	res = pHdr->GetNextPropertyBuffer(pName, pValue);
    }
    
    HX_RELEASE(pValue);
}
开发者ID:muromec,项目名称:qtopia-ezx,代码行数:29,代码来源:gensdptest.cpp


示例4: strlen

void CHXPrefList::SetPreferences(IUnknown* pContext)
{
    IHXPreferences* pPrefs = NULL;
    IHXCommonClassFactory* pCCF = NULL;

    if (pContext &&
        (HXR_OK == pContext->QueryInterface(IID_IHXPreferences,
                                            (void**)&pPrefs)) &&
        (HXR_OK == pContext->QueryInterface(IID_IHXCommonClassFactory,
                                            (void**)&pCCF)))
    {
        CHXSimpleList::Iterator itr = m_prefInfo.Begin();
        
        for(; itr != m_prefInfo.End(); ++itr)
        {
            CHXPrefInfo* pInfo = (CHXPrefInfo*)(*itr);
            
            IHXBuffer* pBuf = NULL;
            
            if ((HXR_OK == pCCF->CreateInstance(CLSID_IHXBuffer,
                                                (void**)&pBuf)) &&
                (HXR_OK == pBuf->Set((const unsigned char*)pInfo->Value(),
                                     strlen(pInfo->Value()))))
            {
                pPrefs->WritePref(pInfo->Key(), pBuf);
            }

            HX_RELEASE(pBuf);
        }
    }

    HX_RELEASE(pPrefs);
    HX_RELEASE(pCCF);
}
开发者ID:muromec,项目名称:qtopia-ezx,代码行数:34,代码来源:preflist.cpp


示例5: Close

CSymbIHXDataFile::~CSymbIHXDataFile(void)
{
    Close();
    HX_RELEASE(m_pFileName);
    HX_RELEASE(m_pSessionManager);
    HX_RELEASE(m_pContext);
}
开发者ID:muromec,项目名称:qtopia-ezx,代码行数:7,代码来源:symbihxdataf.cpp


示例6: HX_RELEASE

int DLLAccessClient::open(const char* dllName, 
			  UINT16 nLibType, 
			  IUnknown* pContext)
{
    HX_RESULT status;
    int retVal = DLLAccess::NO_LOAD;
    IHXCommonClassFactory* pCCF = NULL;

    HX_RELEASE(m_pDllAccessServer);

    status = pContext->QueryInterface(IID_IHXCommonClassFactory,
				      (void**) &pCCF);
    if (SUCCEEDED(status))
    {
	pCCF->CreateInstance(CLSID_IHXDllAccess,
			     (void**) &m_pDllAccessServer);
    }

    HX_RELEASE(pCCF);

    if (m_pDllAccessServer)
    {
	if (SUCCEEDED(m_pDllAccessServer->Open(dllName, nLibType)))
	{
	    retVal = DLLAccess::DLL_OK;
	}
    }
    
    return retVal;
}
开发者ID:muromec,项目名称:qtopia-ezx,代码行数:30,代码来源:dllaccesclient.cpp


示例7: HX_ASSERT

CAudioOutOpenwave::~CAudioOutOpenwave()
{
    //We must assume that _Imp_Close has already been called. If not, we are 
    //in big trouble.
    if ( m_wState != RA_AOS_CLOSED ) 
    {
        HX_ASSERT( "Device not closed in dtor." == NULL );
    }

    //Clean up the scheduler.
    HX_RELEASE( m_pScheduler );
    HX_DELETE(m_pPlaybackCountCBTime);
    HX_RELEASE(m_pCallback);
    //OpDPRINTF("dtor: Freeing sample buffer, expect an exception\n");
    for (int i=0; i<10; i++)
    	HX_DELETE(m_SndBuf[i].fSampleBuffer);
    //OpDPRINTF("dtor: Done freeing sample buffers \n");
    if (m_pSndDev) 
    {
    	//OpDPRINTF("dtor : before freeing the channel\n");
	op_sound_unregister_callback(m_pSndDev, iodone_callback);
	op_sound_freechan(m_pSndDev);
    	//OpDPRINTF("dtor : freeing the channel\n");
    }
    HX_DELETE(m_pWriteList); // Remove all elements in the list, if any
}
开发者ID:muromec,项目名称:qtopia-ezx,代码行数:26,代码来源:audOpwave.cpp


示例8: Close

HX_RESULT CMP4ADecoder::OpenNext(IHXValues* pHeader,
                                 IMP4APayloadFormat* pRssm, 
			         IHXAudioDecoder** pOutAudioDecoder,
			         IUnknown* pContext)
{
    HX_RESULT retVal = HXR_FAIL;

    if (pHeader && pOutAudioDecoder)
    {
        // Close the decoder
        Close();
        // Get the mime type
        IHXBuffer* pMimeType = NULL;
        pHeader->GetPropertyCString("MimeType", pMimeType);
        if (pMimeType)
        {
            m_pDecoderInfo = m_decInfoStore.GetInfoNext((const char*) pMimeType->GetBuffer(), pRssm);
            if (m_pDecoderInfo)
            {
                HX_RELEASE(*pOutAudioDecoder);
                retVal = BuildDLLAccessBridge(pOutAudioDecoder, pMimeType, pRssm, pContext);
            }
        }
        HX_RELEASE(pMimeType);
    }

    return retVal;
}
开发者ID:muromec,项目名称:qtopia-ezx,代码行数:28,代码来源:mp4adec.cpp


示例9: HX_RELEASE

/*
 * ClientRegTree::RegTreeInit()
 *
 * This object is meant to be passed from client to client as the sequential
 * WMT HTTP requests come in.  Therefore, only one client at a time is 
 * accessing it (so no mutex needed), but we must ensure that this object has
 * the context and registry for the current proc.  Thus, it must be init'ed
 * every time a new client picks it up.
 */
HX_RESULT
ClientRegTree::RegTreeInit(Client* pClient, IHXBuffer* pStartTime)
{
    HX_RELEASE(m_pContext);
    HX_RELEASE(m_pRegistry);
    HX_RELEASE(m_pClassFactory);

    m_pProc = pClient->proc;        // don't addref/release
    m_pProc->pc->server_context->
        QueryInterface(IID_IUnknown, (void**) &m_pContext);

    m_pContext->QueryInterface(IID_IHXRegistry, (void**) &m_pRegistry);
    m_pContext->QueryInterface(IID_IHXCommonClassFactory,
                               (void**) &m_pClassFactory);

    // The seqnum (session id) is persistent across calls.
    // Only set up the registry tree once.

    if (!m_ulRegistryConnId)
    {
        m_ulRegistryConnId = m_pProc->pc->server_info->
            IncrementTotalClientCount(m_pProc);

        InitRegistry(pStartTime);
    }

    return HXR_OK;
}
开发者ID:muromec,项目名称:qtopia-ezx,代码行数:37,代码来源:clientregtree.cpp


示例10: HX_RELEASE

	WebkitClientAdviseSink::~WebkitClientAdviseSink(void)
	{
		HX_RELEASE(m_pRegistry);
		HX_RELEASE(m_pPlayer);
		HX_RELEASE(m_pUnknown);
		HX_RELEASE(m_pWebkitContext);
	}
开发者ID:zhxinx,项目名称:HelixInWebkit,代码行数:7,代码来源:advisesink.cpp


示例11: OnEndOfPackets

void
HXRecordControl::Cleanup()
{
    OnEndOfPackets();

    for(UINT16 nStream = 0; nStream < m_PendingGetPackets.GetSize(); nStream++)
    {
	IHXPacket* pPacket = (IHXPacket*)m_PendingGetPackets.GetAt(nStream);
	m_PendingGetPackets.SetAt(nStream, NULL);
	HX_RELEASE(pPacket);
    }

    if(m_pRecordService)
	m_pRecordService->CloseRecordSource(m_pRecordSource);

    HX_RELEASE(m_pRecordService);
    HX_RELEASE(m_pRecordSource);
    HX_VECTOR_DELETE(m_pStreamInfo);
#if defined(HELIX_FEATURE_RECORDCONTROL_MERGESORT)
    HX_DELETE(m_pMergeSorter);
#endif /* #if defined(HELIX_FEATURE_RECORDCONTROL_MERGESORT) */

    while(!m_PendingPutPackets.IsEmpty())
    {
	PendingPutPacket* pPutPacket = (PendingPutPacket*)m_PendingPutPackets.RemoveHead();
	HX_ASSERT(pPutPacket);
	HX_RELEASE(pPutPacket->pPacket);
	HX_DELETE(pPutPacket);
    }
}
开发者ID:muromec,项目名称:qtopia-ezx,代码行数:30,代码来源:recordctl.cpp


示例12: HX_VECTOR_DELETE

STDMETHODIMP
StaticPushSource::Done()
{
    HX_VECTOR_DELETE(m_pStreams);
    HX_RELEASE(m_pSinkControl);
    HX_RELEASE(m_pFileObject);
    HX_RELEASE(m_pBWEValues);
    HX_RELEASE(m_pRequest);

    if (m_pSink)
    {
	m_pSink->SourceDone();
	m_pSink->Release();
	m_pSink = NULL;
    }

    if (m_pFileFormat)
    {
        /*
         * Close() must be called before Release() so that the
         * IHXFileFormatObject will properly free its IHXFileObject
         */

        m_pFileFormat->Close();
        m_pFileFormat->Release();
        m_pFileFormat = NULL;
    }

    return HXR_OK;
}
开发者ID:muromec,项目名称:qtopia-ezx,代码行数:30,代码来源:inputsrc_push.cpp


示例13: Cleanup

ConfigWatcher::~ConfigWatcher()
{
    Cleanup();
    HX_RELEASE(m_pRegistry);
    HX_RELEASE(m_pActiveRegistry);
    HX_RELEASE(m_pPropWatch);
}
开发者ID:muromec,项目名称:qtopia-ezx,代码行数:7,代码来源:configwatcher.cpp


示例14: HX_RELEASE

HXFileSystemManager::~HXFileSystemManager()
{
    if (m_pContext)
    {
	m_pContext->Release();
	m_pContext = 0;
    }

    if(m_pSamePool)
    {
	m_pSamePool->Release();
	m_pSamePool = NULL;
    }

    if (m_pFSManagerResponse)
    {
	m_pFSManagerResponse->Release();
	m_pFSManagerResponse = 0;
    }

    HX_RELEASE(m_pRequest);

    if (m_pCallback &&
	m_pCallback->m_bIsCallbackPending &&
	m_pScheduler)
    {
	m_pScheduler->Remove(m_pCallback->m_Handle);
    }

    HX_RELEASE(m_pCallback);
    HX_RELEASE(m_pScheduler);
    HX_RELEASE(m_pOriginalObject);
    HX_VECTOR_DELETE(m_pRelativePath);
}
开发者ID:muromec,项目名称:qtopia-ezx,代码行数:34,代码来源:hxfsmgr.cpp


示例15: MatchClass

static /* private */
bool MatchClass(IHXSockAddr* pAddr, HXIN4AddrClass addrClassIN4, 
                HXIN6AddrClass addrClassIN6)
{
    HX_ASSERT(HX_IN6_CLASS_V4MAPPED != addrClassIN6);

    bool isMatch = false;
    HX_RESULT hxr = HXR_FAILED;
    
    IHXSockAddrIN6* pAddr6 = 0;
    hxr = pAddr->QueryInterface(IID_IHXSockAddrIN6, 
                    reinterpret_cast<void**>(&pAddr6));
    if(SUCCEEDED(hxr))
    {
        isMatch = MatchClassIN6(pAddr6, addrClassIN4, addrClassIN6);
        HX_RELEASE(pAddr6);
    }
    else
    {
        IHXSockAddrIN4* pAddr4 = 0;
        hxr = pAddr->QueryInterface(IID_IHXSockAddrIN4, 
                        reinterpret_cast<void**>(&pAddr4));
        if(SUCCEEDED(hxr))
        {
            isMatch = (addrClassIN4 == pAddr4->GetAddrClass());
            HX_RELEASE(pAddr4);
        }
    }
    return isMatch;
}
开发者ID:muromec,项目名称:qtopia-ezx,代码行数:30,代码来源:hxsockutil.cpp


示例16: HX_RELEASE

STDMETHODIMP
DataRevertController::RevertedFileHeaderReady(HX_RESULT status,
						IHXValues* pHeader)
{
    if (pHeader)
    {
	HX_RELEASE(m_pFileHeaders);
	m_pFileHeaders = pHeader;
	pHeader->AddRef();
    }

    pHeader = (IHXValues*)m_pStreamHeaders->RemoveHead(); 
    if (!pHeader)
    {
	m_pControlResp->RevertHeadersDone(m_pFileHeaders,
					  m_pRevertedStreamHeaders, 
					  m_pResponseHeaders,
					  TRUE);
	return HXR_OK;
    }
    
    HX_RELEASE(m_pCurrentStreamHeader);
    m_pCurrentStreamHeader = pHeader;
    m_pDataRevert->RevertStreamHeader(pHeader);

    return HXR_OK;
}
开发者ID:muromec,项目名称:qtopia-ezx,代码行数:27,代码来源:dtrvtcon.cpp


示例17: HX_DELETE

HXExternalResourceManager::~HXExternalResourceManager()
{
    delete[] m_pExternalResDir;

    if(m_pResourceList)
    {
	CHXSimpleList::Iterator i = m_pResourceList->Begin();
	for (; i != m_pResourceList->End(); ++i)
	{
	    IHXXResFile* pRes = (IHXXResFile*)(*i);
	    pRes->Close();
	    pRes->Release();
	}
    }

    HX_DELETE(m_pResourceList);
    HX_RELEASE(m_pPrefs);
    HX_RELEASE(m_pRegistry);
    HX_RELEASE(m_pContext);
    HX_RELEASE(m_pHXXResPlugin);

#if defined(HELIX_CONFIG_NOSTATICS)
    HXExternalResourceManager*& m_pResourceManager =
	(HXExternalResourceManager*&)HXGlobalPtr::Get(
	    &HXExternalResourceManager::m_pResourceManager);
#endif
    m_pResourceManager = NULL;
}
开发者ID:muromec,项目名称:qtopia-ezx,代码行数:28,代码来源:hxresmg.cpp


示例18: while

void
HXOverlayManager::Close()
{ 
    CSiteStats* pStats;
    CStatPoint* pPoint;

    while (m_ListOfSiteStats.GetCount())
    {
        pStats = (CSiteStats*) m_ListOfSiteStats.RemoveHead();
        while(pStats->samples.GetCount())
        {
            pPoint = (CStatPoint*) pStats->samples.RemoveHead();
            HX_DELETE(pPoint);
        }
        HX_DELETE(pStats);
    }

    if (m_CallbackHandle)
    {
        m_pScheduler->Remove(m_CallbackHandle);
        m_CallbackHandle = 0;
    }

    HX_RELEASE(m_pContext);
    HX_RELEASE(m_pScheduler);
    HX_RELEASE(m_pMutex);
}
开发者ID:muromec,项目名称:qtopia-ezx,代码行数:27,代码来源:hxovmgr.cpp


示例19: KillThreadAndEvent

HX_RESULT CHXAudioDeviceDS::InternalClose()
{
    HX_RESULT	theErr = HXR_OK;

    KillThreadAndEvent();

    HX_RELEASE(m_pAudioHookDMO);
    HX_RELEASE(m_pPrimaryBuffer);
    HX_RELEASE(m_pSecondaryBuffer);
    HX_RELEASE(m_pDSDev);
    m_pAudioPtrStart = NULL;
    m_ulLastPlayCursor = 0;
    m_ulLastWriteCursor =0;
    m_eState = E_DEV_CLOSED;
    m_ulLoops = 0;
    m_ulLoopTime = 0;
    m_nBlocksPerBuffer = 0;
    m_ulCurrPlayTime = 0;
	m_ulCurrLoopTime = 0;

    if (m_hwnd)
    {
	SetWindowLong(m_hwnd, GWL_USERDATA, NULL);
    }

    return HXR_OK;
}
开发者ID:muromec,项目名称:qtopia-ezx,代码行数:27,代码来源:hxaudevds.cpp


示例20: HX_RELEASE

HX_RESULT
FileFormatSource::Init(IHXPSinkControl* pSink)
{
    HX_RESULT			h_result = HXR_OK;
    IHXFileObject*             pFileObject;
    IHXBandwidthNegotiator*    pBandwidthNegotiator;

    HX_RELEASE(m_pSinkControl);
    pSink->AddRef();
    m_pSinkControl = pSink;

    AddRef();
    if (HXR_OK == h_result)
    {
        if(HXR_OK == m_pFileObject->QueryInterface(IID_IHXFileObject,
                                                 (void**)&pFileObject))
        {
          
            if(m_bwe_values && 
               (HXR_OK == m_file_format->QueryInterface(
                IID_IHXBandwidthNegotiator,
                (void**)&pBandwidthNegotiator)))
            {
                pBandwidthNegotiator->SetBandwidthInfo(m_bwe_values);
                pBandwidthNegotiator->Release();
                m_bwe_values->Release();
                m_bwe_values = NULL;
            }

            HX_ASSERT(m_file_format != NULL);
            if (m_bFileFormatInitialized)
            {
                InitDone(HXR_OK);
            }
            else
            {
                m_bFileFormatInitialized = TRUE;
                h_result = m_file_format->InitFileFormat(m_pRequest, this,
                                                     pFileObject);
            }

            HX_RELEASE(pFileObject);

            if (HXR_OK != h_result)
            {
                ERRMSG(m_proc->pc->error_handler,
                       "File Format initialization failed\n");
                m_file_format->Close();
                m_file_format->Release();
                m_file_format = 0;
                m_bFileFormatInitialized = FALSE;
            }
        }

    }

    Release();

    return h_result;
}
开发者ID:muromec,项目名称:qtopia-ezx,代码行数:60,代码来源:ff_source.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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