当前位置: 首页>>代码示例>>C++>>正文


C++ HX_RELEASE函数代码示例

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


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


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