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


C++ ATLTRACE2函数代码示例

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


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

示例1: RemoveMessagesFromBuyThreadQueue

VOID RemoveMessagesFromBuyThreadQueue(CONTENT_PARTNER_THREAD_CONTEXT* pThreadCtx)
{
   BUY_CONTEXT* pBuyCtx = NULL;
   MSG msg = {0};

   while( PeekMessage( 
      &msg, 
      NULL, 
      pThreadCtx->buyThreadContext.msgBuy, 
      pThreadCtx->buyThreadContext.msgBuy, 
      PM_REMOVE ) )
   {  
      ATLTRACE2("%x: RemoveMessagesFromBuyThreadQueue: PeekMessage in cleanup retrieved message to buy.\n", GetCurrentThreadId());
      pBuyCtx = reinterpret_cast<BUY_CONTEXT*>(msg.lParam);

      if(NULL != pBuyCtx)
      {
         if(NULL != pBuyCtx->cookie)
         {
            pBuyCtx->pIStream->Release();
            pBuyCtx->pIStream = NULL;         
         }

         delete pBuyCtx;
         pBuyCtx = NULL;
      }
   } // while PeekMessage
}
开发者ID:AbdoSalem95,项目名称:WindowsSDK7-Samples,代码行数:28,代码来源:Threads.cpp

示例2: GetRestrictions

static void GetRestrictions(ULONG cRestrictions, const VARIANT *rgRestrictions, PWSTR tableName)
{
	//if (cRestrictions >= 3 && V_VT(&rgRestrictions[2]) == VT_BSTR && V_BSTR(&rgRestrictions[2]) != NULL)
	//{
	//	CW2A constraint(V_BSTR(&rgRestrictions[2]));
	//	ATLTRACE2("\tConstraint Name = %s\n", (LPSTR)constraint);

	//	strncpy(constraint, constraintName, 127);
	//	constraint[127] = '\0';
	//}

	if (cRestrictions >= 5 && V_VT(&rgRestrictions[5]) == VT_BSTR && V_BSTR(&rgRestrictions[5]) != NULL)
	{	
		ATLTRACE2(L"\tTable Name = %s\n", V_BSTR(&rgRestrictions[5]));
		wcsncpy(tableName, V_BSTR(&rgRestrictions[5]), 127);
		tableName[127] = '\0'; // ensure zero-terminated string
	}

	//if (cRestrictions >= 6 && V_VT(&rgRestrictions[5]) == VT_BSTR && V_BSTR(&rgRestrictions[5]) != NULL)
	//{
	//	CW2A column_name(V_BSTR(&rgRestrictions[5]));
	//	ATLTRACE2("\tColumn Name = %s\n", (LPSTR)column_name);

	//}
}
开发者ID:CUBRID,项目名称:cubrid-oledb,代码行数:25,代码来源:SRKeyColumnUsage.cpp

示例3: ATLTRACE2

STDMETHODIMP CDelay::Process(ULONG ulSize, BYTE *pData, REFERENCE_TIME refTimeStart, DWORD dwFlags)
{
    if (dwFlags &= ~DMO_INPLACE_ZERO)
        return E_INVALIDARG;

    if (!pData) 
    {
        return E_POINTER;
    }


	ATLTRACE2(atlTraceGeneral, 3, "Process: %d bytes. Time stamp: %f\n", 
		ulSize, RefTime2Double(refTimeStart));



    LockIt lock(this);
    
    if (!InputTypeSet(0) || !OutputTypeSet(0)) 
    {
        return DMO_E_TYPE_NOT_SET;
    }
    
    //  Make sure all streams have media types set and resources are allocated
    HRESULT hr = AllocateStreamingResources();
    
	if (SUCCEEDED(hr))
		hr = DoProcessOutput(pData, pData, ulSize / m_pWave->nBlockAlign);

	return hr;

    // If this DMO supported an effect tail, it would return S_FALSE until 
    // the tail was processed. See IMediaObjectInPlace::Process documentation.
}
开发者ID:eaglezhao,项目名称:tracnghiemweb,代码行数:34,代码来源:Delay.cpp

示例4: RemoveMessagesFromDownloadThreadQueue

VOID RemoveMessagesFromDownloadThreadQueue(CONTENT_PARTNER_THREAD_CONTEXT* pThreadCtx)
{
   DOWNLOAD_BATCH_CONTEXT* pBatchCtx = NULL;
   MSG msg = {0};

   while( PeekMessage( 
             &msg, 
             NULL, 
             pThreadCtx->downloadThreadContext.msgDownloadBatch, 
             pThreadCtx->downloadThreadContext.msgDownloadBatch, 
             PM_REMOVE ) )
      {  
         ATLTRACE2("%x: RemoveMessagesFromDownloadThreadQueue: PeekMessage in cleanup retrieved message to download a batch.\n", GetCurrentThreadId());
         pBatchCtx = reinterpret_cast<DOWNLOAD_BATCH_CONTEXT*>(msg.lParam);

         if(NULL != pBatchCtx)
         {
            if(NULL != pBatchCtx->pIStream)
            {
               pBatchCtx->pIStream->Release();
               pBatchCtx->pIStream = NULL;         
            }

            delete pBatchCtx;
            pBatchCtx = NULL;
         }

      } // while PeekMessage
}
开发者ID:AbdoSalem95,项目名称:WindowsSDK7-Samples,代码行数:29,代码来源:Threads.cpp

示例5: RemoveMessagesFromListThreadQueue

VOID RemoveMessagesFromListThreadQueue(CONTENT_PARTNER_THREAD_CONTEXT* pThreadCtx)
{
   LIST_CONTEXT* pListCtx = NULL;
   MSG msg = {0};

   while( PeekMessage( 
      &msg, 
      NULL, 
      pThreadCtx->listThreadContext.msgGetListContents,
      pThreadCtx->listThreadContext.msgGetListContents, 
      PM_REMOVE ) )
   {  
      ATLTRACE2("%x: RemoveMessagesFromListThreadQueue: PeekMessage in cleanup retrieved a get-list-contents message.\n", GetCurrentThreadId());
      pListCtx = reinterpret_cast<LIST_CONTEXT*>(msg.lParam);

      if(NULL != pListCtx)
      {
         SysFreeString(pListCtx->location);  // OK to pass NULL. 
         VariantClear( &(pListCtx->context) );  
         SysFreeString(pListCtx->bstrListType);
         SysFreeString(pListCtx->bstrParams);       
         delete pListCtx;
         pListCtx = NULL;
      }

   } // while PeekMessage
}
开发者ID:AbdoSalem95,项目名称:WindowsSDK7-Samples,代码行数:27,代码来源:Threads.cpp

示例6: _ASSERTE

HRESULT CDelay::InternalProcessInput(DWORD dwInputStreamIndex, IMediaBuffer *pBuffer,
                                          DWORD dwFlags, REFERENCE_TIME rtTimestamp,
                                          REFERENCE_TIME rtTimelength)
{
    _ASSERTE(m_pBuffer == NULL);

    HRESULT hr = pBuffer->GetBufferAndLength(&m_pbInputData, &m_cbInputLength);
    if (FAILED(hr))
    {
        return hr;
    }


	ATLTRACE2(atlTraceGeneral, 3, "Process Input: %d bytes. Time stamp: %f/%f\n", 
		m_cbInputLength, RefTime2Double(rtTimestamp), RefTime2Double(rtTimelength));

    if (m_cbInputLength <= 0) 
        return E_FAIL;
    
    m_pBuffer = pBuffer;
    
    if (dwFlags & DMO_INPUT_DATA_BUFFERF_TIME)
    {
        m_bValidTime = true;
        m_rtTimestamp = rtTimestamp;
    }
    else
    {
        m_bValidTime = false;
    }
    
    return S_OK;
}
开发者ID:eaglezhao,项目名称:tracnghiemweb,代码行数:33,代码来源:Delay.cpp

示例7: ATLTRACE2

void CDonutView::OnMultiDlImages(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/)
{
	ATLTRACE2( atlTraceGeneral, 4, _T("CDonutView::OnMultiDlImages\n") );

	if ( _ToggleFlag(ID_DLCTL_DLIMAGES, DLCTL_DLIMAGES) )
		_LightRefresh();
}
开发者ID:Runcy,项目名称:unDonut,代码行数:7,代码来源:DonutView.cpp

示例8: ATLTRACE2

CMultipleResult::~CMultipleResult()
{
	ATLTRACE2(atlTraceDBProvider, 2, _T("CMultipleResult::~CMultipleResult()\n"));
	this->GetSessionPtr()->AutoCommit(NULL);
	if(m_spUnkSite)
		GetSessionPtr()->RegisterTxnCallback(this, false);
}
开发者ID:dong1,项目名称:testsize,代码行数:7,代码来源:MultipleResult.cpp

示例9: ATLASSERT

void CComSafeArray::Create(VARTYPE vtSrc, DWORD dwDims, SAFEARRAYBOUND *rgsabound)
{
	ATLASSERT(dwDims > 0);
	ATLASSERT(rgsabound != NULL);

	// Validate the VARTYPE for SafeArrayCreate call
	ATLASSERT( !(vtSrc & VT_ARRAY) );
	ATLASSERT( !(vtSrc & VT_BYREF) );
	ATLASSERT( !(vtSrc & VT_VECTOR) );
	ATLASSERT(vtSrc != VT_EMPTY);
	ATLASSERT(vtSrc != VT_NULL);

	// Free up old safe array if necessary
	Clear();

	ATLTRY( parray = ::SafeArrayCreate(vtSrc, dwDims, rgsabound) );

	if (parray == NULL) {
		ATLTRACE2(atlTraceDBProvider, 0, "CComSafeArray::Create Error : OOM\n");
		return;
	}

	vt				= unsigned short (vtSrc | VT_ARRAY);
	m_dwDims		= dwDims;
	m_dwElementSize = GetElemSize();
}
开发者ID:plus7,项目名称:DonutG,代码行数:26,代码来源:MtlCom.cpp

示例10: RemoveMessagesFromSendMessageThreadQueue

VOID RemoveMessagesFromSendMessageThreadQueue(CONTENT_PARTNER_THREAD_CONTEXT* pThreadCtx)
{
   SEND_MESSAGE_CONTEXT* pSendMsgCtx = NULL;
   MSG msg = {0};

   while( PeekMessage( 
      &msg, 
      NULL, 
      pThreadCtx->sendMessageThreadContext.msgSendMessage,
      pThreadCtx->sendMessageThreadContext.msgSendMessage, 
      PM_REMOVE ) )
   {  
      ATLTRACE2("%x: RemoveMessagesFromSendMessageThreadQueue: PeekMessage in cleanup retrieved a send-message message.\n", GetCurrentThreadId());
      pSendMsgCtx = reinterpret_cast<SEND_MESSAGE_CONTEXT*>(msg.lParam);

      if(NULL != pSendMsgCtx)
      {
         SysFreeString(pSendMsgCtx->bstrMsg);  // OK to pass NULL.
         SysFreeString(pSendMsgCtx->bstrParam);
         delete pSendMsgCtx;
         pSendMsgCtx = NULL;
      }

   } // while PeekMessage
}
开发者ID:AbdoSalem95,项目名称:WindowsSDK7-Samples,代码行数:25,代码来源:Threads.cpp

示例11: ATLTRACE2

const FileStatusCacheEntry * GitFolderStatus::GetCachedItem(const CTGitPath& filepath)
{
    sCacheKey.assign(filepath.GetWinPath());
    FileStatusMap::const_iterator iter;
    const FileStatusCacheEntry *retVal;

    if(m_mostRecentPath.IsEquivalentTo(CTGitPath(sCacheKey.c_str())))
    {
        // We've hit the same result as we were asked for last time
        ATLTRACE2(_T("fast cache hit for %s\n"), filepath);
        retVal = m_mostRecentStatus;
    }
    else if ((iter = m_cache.find(sCacheKey)) != m_cache.end())
    {
        ATLTRACE2(_T("cache found for %s\n"), filepath);
        retVal = &iter->second;
        m_mostRecentStatus = retVal;
        m_mostRecentPath = CTGitPath(sCacheKey.c_str());
    }
    else
    {
        retVal = NULL;
    }

    if(retVal != NULL)
    {
        // We found something in a cache - check that the cache is not timed-out or force-invalidated
        DWORD now = GetTickCount();

        if ((now >= m_TimeStamp)&&((now - m_TimeStamp) > GetTimeoutValue()))
        {
            // Cache is timed-out
            ATLTRACE("Cache timed-out\n");
            ClearCache();
            retVal = NULL;
        }
        else if(WaitForSingleObject(m_hInvalidationEvent, 0) == WAIT_OBJECT_0)
        {
            // TortoiseProc has just done something which has invalidated the cache
            ATLTRACE("Cache invalidated\n");
            ClearCache();
            retVal = NULL;
        }
        return retVal;
    }
    return NULL;
}
开发者ID:andmedsantana,项目名称:TortoiseGit,代码行数:47,代码来源:GitFolderStatus.cpp

示例12: m_hAccel

CAccelerator::CAccelerator() : 
	m_hAccel(NULL), 
	m_hAdditionalAccel(NULL), 
	m_pEntriesTable(new stAccelEntry[ACCEL_COUNT]), 
	m_pAccelTable(new ACCEL[ACCEL_COUNT])
{
	ATLTRACE2(atlTraceGeneral, 0, "Accelerator: Accelerator table contains %d items\n", ACCEL_COUNT);
}
开发者ID:christopherpow,项目名称:nesicide,代码行数:8,代码来源:Accelerator.cpp

示例13: ATLTRACE2

HRESULT STDMETHODCALLTYPE C[!output Safe_root]::DownloadTrackComplete( 
   HRESULT hrResult,
   ULONG contentID,
   BSTR /*downloadTrackParam*/)
{
   if(FAILED(hrResult))
   {
      ATLTRACE2("%x: DownloadTrackComplete: Windows Media Player failed to download track %d.\n", GetCurrentThreadId(), contentID);
      ++g.totalDownloadFailures;
   }
   else
   {
      ATLTRACE2("%x: DownloadTrackComplete: Windows Media Player has completed the download for track %d.\n", GetCurrentThreadId(), contentID);
   }

   return S_OK;
} // DownloadTrackComplete
开发者ID:Essjay1,项目名称:Windows-classic-samples,代码行数:17,代码来源:Download.cpp

示例14: DEBUGOUT

// a macro that outputs the message to the Debug console if a debug build
void DEBUGOUT(const char * fmt, ...) 
{ 
#if _DEBUG
    va_list ap;
    va_start(ap, fmt);
    ATLTRACE2(fmt, ap);
    ATLTRACE("\n");
    va_end(ap);
#endif
}
开发者ID:Alois-xx,项目名称:EasyHook,代码行数:11,代码来源:entry.cpp

示例15: GetRestrictions

static void GetRestrictions(ULONG cRestrictions, const VARIANT *rgRestrictions,
							PWSTR table_name, PWSTR column_name)
{
	// restriction이 없다고 항상 cRestrictions==0은 아니다.
	// 따라서 vt!=VT_EMPTY인지 등도 검사해줘야 한다.

	if(cRestrictions>=3 && V_VT(&rgRestrictions[2])==VT_BSTR && V_BSTR(&rgRestrictions[2])!=NULL)
	{	// TABLE_NAME restriction
		wcsncpy(table_name, V_BSTR(&rgRestrictions[2]), 1023);
		ATLTRACE2(L"\tTable Name = %s\n", V_BSTR(&rgRestrictions[2]));
		table_name[1023] = 0; // ensure zero-terminated string
	}

	if(cRestrictions>=4 && V_VT(&rgRestrictions[3])==VT_BSTR && V_BSTR(&rgRestrictions[3])!=NULL)
	{	// COLUMN_NAME restriction
		wcsncpy(column_name, V_BSTR(&rgRestrictions[3]), 1023);
		ATLTRACE2("\tColumn Name = %s\n", V_BSTR(&rgRestrictions[3]));
		column_name[1023] = 0; // ensure zero-terminated string
	}
}
开发者ID:CUBRID,项目名称:cubrid-oledb,代码行数:20,代码来源:SRColumns.cpp


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