當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。