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

C++ ATLTRACE2函数代码示例

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

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



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


示例16: _CreateSimpleReBarCtrl

// この関数もMtlWin.hの中で浮いていたので隔離した
// もしかしたら作ったの自分かも
HWND _CreateSimpleReBarCtrl(HWND hWndParent, DWORD dwStyle, UINT nID)
{
	// Ensure style combinations for proper rebar painting
	if (dwStyle & CCS_NODIVIDER && dwStyle & WS_BORDER)
		dwStyle &= ~WS_BORDER;
	else if ( !(dwStyle & WS_BORDER) && !(dwStyle & CCS_NODIVIDER) )
		dwStyle |= CCS_NODIVIDER;

	// Create rebar window
	HWND	  hWndReBar = ::CreateWindowEx(
								0,
								REBARCLASSNAME,
								NULL,
								dwStyle,
								0,
								0,
								100,
								100,
								hWndParent,
								(HMENU) LongToHandle(nID),
								_Module.GetModuleInstance(),
								NULL );

	if (hWndReBar == NULL) {
		ATLTRACE2( atlTraceUI, 0, _T("Failed to create rebar.\n") );
		return NULL;
	}

	// Initialize and send the REBARINFO structure
	REBARINFO rbi;
	rbi.cbSize = sizeof (REBARINFO);
	rbi.fMask  = 0;

	if ( !::SendMessage(hWndReBar, RB_SETBARINFO, 0, (LPARAM) &rbi) ) {
		ATLTRACE2( atlTraceUI, 0, _T("Failed to initialize rebar.\n") );
		::DestroyWindow(hWndReBar);
		return NULL;
	}

	return hWndReBar;
}
开发者ID:Runcy,项目名称:unDonut,代码行数:43,代码来源:MtlCtrls.cpp


示例17: luaX_showtable

LUALIB_API void luaX_showtable(lua_State* L, int ix, const char* label/* = 0*/)
{
	lua_checkstack(L, 6);
	if (lua_istable(L, ix))
	{
		ATLTRACE2("%s:: Contents of table at index %i.\n", label, ix);
		int aix = ix; if (aix < 0) aix = lua_gettop(L) + aix + 1;
		lua_pushnil(L);
		while (lua_next(L, aix) != 0)
		{
			const char* ke = luaC_pushdstring(L, -2, 20);
			const char* vl = luaC_pushdstring(L, -2, 40);
			ATLTRACE2("++ Key: %s; Value: %s.\n", ke, vl);
			lua_pop(L, 3);
		}
	}
	else
	{
		ATLTRACE2("%s:: Value at index %i is not a table.\n", label, ix);
	}
}
开发者ID:radioflash,项目名称:Winsh.lua,代码行数:21,代码来源:JHCLua.cpp


示例18: GetRestrictions

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

	if(cRestrictions>=3 && V_VT(&rgRestrictions[2])==VT_BSTR && V_BSTR(&rgRestrictions[2])!=NULL)
	{	// TABLE_NAME restriction
		ATLTRACE2(L"\tView Name = %s\n", V_BSTR(&rgRestrictions[2]));
		wcsncpy(view_name, V_BSTR(&rgRestrictions[2]), 255);
		view_name[255] = 0; // ensure zero-terminated string
	}
}
开发者ID:CUBRID,项目名称:cubrid-oledb,代码行数:12,代码来源:SRViewColumnUsage.cpp


示例19: GetInstalledBoardInfo

void GetInstalledBoardInfo(short *ids, short *len)
{
    short   cnt=0;
    int     MaxBoards=0;      // Maximum number of boards UL will support.   
    char    BoardName[BOARDNAMELEN];
    _ASSERT(ids);

    cbGetConfig(GLOBALINFO,0,0,GINUMBOARDS,&MaxBoards);
    ATLTRACE2(MCC_UL_CALL,3,"cbGetConfig (GLOBALINFO,0,0,GINUMBOARDS, &MaxBoards); result: MaxBoards=%d\n",MaxBoards);

    for (int i=0; i<MaxBoards; i++)
    {
        // Just use this call to determine if board num is valid. 
        if (!cbGetBoardName(i,BoardName))
        {
            ATLTRACE2(MCC_UL_CALL,3,"cbGetBoardName (i = %d,BoardName); result: BoardName=%s\n",i,BoardName);
            ids[cnt++]=i;
        }
    }
    *len=cnt;    
}
开发者ID:motor,项目名称:clock_stimulus,代码行数:21,代码来源:cbUtil.cpp


示例20: EnumSubsystems

// id is the BoardNumber
void EnumSubsystems(short id, bool *ai, bool *ao, bool *dio)
{
    // The following information, for now, is only used to determine
    // what subsytems the HW supports.
    int ADchans;        // Number of A/D chans.
    int DAchans;        // Number of D/A chans.
    int DIOdevs;        // Number of Digital IO devices on board.

    // Determine the capability of each board, AIn, AOut, DIO
    cbGetConfig(BOARDINFO, id, 0, BINUMADCHANS, &ADchans);
    ATLTRACE2(MCC_UL_CALL,3,"cbGetConfig (BOARDINFO,id = %d,0,BINUMADCHANS, &ADchans); result: ADchans=%d\n",id,ADchans);
    if (ADchans) *ai=true;

    cbGetConfig(BOARDINFO, id, 0, BINUMDACHANS, &DAchans);
    ATLTRACE2(MCC_UL_CALL,3,"cbGetConfig (BOARDINFO,id = %d,0,BINUMDACHANS, &DAchans); result: DAchans=%d\n",id,DAchans);
    if (DAchans) *ao=true;
    
    cbGetConfig(BOARDINFO, id, 0, BIDINUMDEVS, &DIOdevs);
    ATLTRACE2(MCC_UL_CALL,3,"cbGetConfig (BOARDINFO,id = %d,0,BIDINUMDEVS, &DIOdevs); result: DIOdevs=%d\n",id,DIOdevs);
    if (DIOdevs) *dio=true;
}
开发者ID:motor,项目名称:clock_stimulus,代码行数:22,代码来源:cbUtil.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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