Ejemplo n.º 1
0
STDMETHODIMP CCRMSub::OnCRMBegin(
            COMSVCSEVENTINFO * pInfo,
            GUID guidClerkCLSID,
            GUID guidActivity,
            GUID guidTx,
            WCHAR szProgIdCompensator[64],            // NOTE: hardcoded
            WCHAR szDescription[64])                // NOTE: hardcoded
{
    m_pSpy->AddEventToList(pInfo->perfCount, L"OnCRMBegin", GuidToBstr(pInfo->guidApp));

    m_pSpy->AddParamValueToList(L"Clerk CLSID", GuidToBstr(guidClerkCLSID));
    m_pSpy->AddParamValueToList(L"Activity ID", GuidToBstr(guidActivity));
    m_pSpy->AddParamValueToList(L"Transaction UOW ID", GuidToBstr(guidTx));
    m_pSpy->AddParamValueToList(L"Compensator Prog ID", szProgIdCompensator);
    m_pSpy->AddParamValueToList(L"Description", szDescription);

    IF_AUDIT_DO(OnCRMBegin)(pInfo->perfCount, GuidToBstr(pInfo->guidApp),
                                 GuidToBstr(guidClerkCLSID),
                                 GuidToBstr(guidActivity),
                                 GuidToBstr(guidTx),
                                 szProgIdCompensator,
                                 szDescription
                                 );

    return S_OK;

} // CCRMSub::OnCRMBegin
Ejemplo n.º 2
0
STDMETHODIMP CCRMSub::OnCRMDeliver(
            COMSVCSEVENTINFO * pInfo,
            GUID guidClerkCLSID,
            BOOL bVariants,
            DWORD dwRecordSize)
{
    m_pSpy->AddEventToList(pInfo->perfCount, L"OnCRMDeliver", GuidToBstr(pInfo->guidApp));

    m_pSpy->AddParamValueToList(L"Clerk CLSID", GuidToBstr(guidClerkCLSID));

    m_pSpy->AddParamValueToList(L"Variants?",  (bVariants ? L"Yes" : L"No"));

    WCHAR szRecordSize[32];
    StringCchPrintf(szRecordSize,ARRAYSIZE(szRecordSize),  L"%d", dwRecordSize);
    m_pSpy->AddParamValueToList(L"Record Size", szRecordSize);

    
    IF_AUDIT_DO(OnCRMDeliver)(pInfo->perfCount, GuidToBstr(pInfo->guidApp),
                         GuidToBstr(guidClerkCLSID),
                         bVariants,
                         dwRecordSize
                         );


    return S_OK;

} // CCRMSub::OnCRMDeliver
Ejemplo n.º 3
0
STDMETHODIMP CTxSub::OnTransactionCommit(COMSVCSEVENTINFO * pInfo, REFGUID guidTx)
{
	m_pSpy->AddEventToList(pInfo->perfCount, L"OnTransactionCommit", GuidToBstr(pInfo->guidApp));

	CComBSTR bstrGuidTx = GuidToBstr(guidTx);
	m_pSpy->AddParamValueToList(L"*guidTx", bstrGuidTx);

	IF_AUDIT_DO(OnTransactionCommit)(pInfo->perfCount, GuidToBstr(pInfo->guidApp),bstrGuidTx);
	return S_OK;
}
Ejemplo n.º 4
0
STDMETHODIMP CCRMSub::OnCRMCheckpoint(
            COMSVCSEVENTINFO * pInfo,
            GUID guidApp)
{
    m_pSpy->AddEventToList(pInfo->perfCount, L"OnCRMCheckpoint", GuidToBstr(pInfo->guidApp));

    IF_AUDIT_DO(OnCRMCheckpoint)(pInfo->perfCount, GuidToBstr(pInfo->guidApp));

    return S_OK;

} // CCRMSub::OnCRMCheckpoint
Ejemplo n.º 5
0
STDMETHODIMP CTxSub::OnTransactionPrepare(COMSVCSEVENTINFO * pInfo, REFGUID guidTx, BOOL bVoteYes)
{
	m_pSpy->AddEventToList(pInfo->perfCount, L"OnTransactionPrepare", GuidToBstr(pInfo->guidApp));

    CComBSTR bstrGuidTx = GuidToBstr(guidTx);
    m_pSpy->AddParamValueToList(L"*guidTx", bstrGuidTx);

	m_pSpy->AddParamValueToList(L"Vote",  bVoteYes == TRUE ? L"Yes" : L"No");

	IF_AUDIT_DO(OnTransactionPrepared)(pInfo->perfCount,GuidToBstr(pInfo->guidApp),							
									  bstrGuidTx,						
									  bVoteYes);
	return S_OK;
}
Ejemplo n.º 6
0
STDMETHODIMP CCRMSub::OnCRMAnalyze(
            COMSVCSEVENTINFO * pInfo,
            GUID guidClerkCLSID,
            DWORD dwCrmRecordType,
            DWORD dwRecordSize)
{
    // internals info from CrmLogRecordFormat.h
    static const LPCWSTR aRecordType[] =
    {
        L"None",            // 0x00
        L"LogInfo",            // 0x01
        L"NewClerk",        // 0x02
        L"ClerkList",        // 0x03
        L"ClerkBegin",        // 0x20
        L"Write",            // 0x21
        L"Forget",            // 0x22
        L"ClerkEnd",        // 0x23
    };

    DWORD dwRecordTypeIndex;
    if (dwCrmRecordType <= 0x03)
        dwRecordTypeIndex = dwCrmRecordType;
    else if (dwCrmRecordType < 0x20)
        return E_INVALIDARG;
    else if (dwCrmRecordType <= 0x23)
        dwRecordTypeIndex = dwCrmRecordType - 0x20 + 4;
    else
        return E_INVALIDARG;
    
    m_pSpy->AddEventToList(pInfo->perfCount, L"OnCRMAnalyze", GuidToBstr(pInfo->guidApp));

    m_pSpy->AddParamValueToList(L"Clerk CLSID", GuidToBstr(guidClerkCLSID));
    
    m_pSpy->AddParamValueToList(L"Record Type", aRecordType[dwRecordTypeIndex]);

    WCHAR szRecordSize[32];
    StringCchPrintf(szRecordSize, ARRAYSIZE(szRecordSize), L"%d", dwRecordSize);
    m_pSpy->AddParamValueToList(L"Record Size", szRecordSize);

    IF_AUDIT_DO(OnCRMAnalyze)(pInfo->perfCount, GuidToBstr(pInfo->guidApp),
                             GuidToBstr(guidClerkCLSID),
                             aRecordType[dwRecordTypeIndex],
                             dwRecordSize
                             );
    

    return S_OK;

} // CCRMSub::OnCRMAnalyze
Ejemplo n.º 7
0
STDMETHODIMP CCRMSub::OnCRMForget(
            COMSVCSEVENTINFO * pInfo,
            GUID guidClerkCLSID)
{
    m_pSpy->AddEventToList(pInfo->perfCount, L"OnCRMForget", GuidToBstr(pInfo->guidApp));

    m_pSpy->AddParamValueToList(L"Clerk CLSID", GuidToBstr(guidClerkCLSID));

    IF_AUDIT_DO(OnCRMForget)(pInfo->perfCount, GuidToBstr(pInfo->guidApp),
                         GuidToBstr(guidClerkCLSID)                         
                         );

    return S_OK;

} // CCRMSub::OnCRMForget
Ejemplo n.º 8
0
STDMETHODIMP CTxSub::OnTransactionStart(COMSVCSEVENTINFO * pInfo, REFGUID guidTx, REFGUID tsid, BOOL bRoot)
{
	m_pSpy->AddEventToList(pInfo->perfCount, L"OnTransactionStart", GuidToBstr(pInfo->guidApp));

    CComBSTR bstrGuidTx = GuidToBstr(guidTx);    
	m_pSpy->AddParamValueToList(L"GuidTx", bstrGuidTx);	

	CComBSTR bstrTsid = GuidToBstr(tsid);
	m_pSpy->AddParamValueToList(L"tsid", bstrTsid);	

	m_pSpy->AddParamValueToList(L"Is a Root Tx?", bRoot ? L"Yes" : L"No");

	IF_AUDIT_DO(OnTransactionStart)(pInfo->perfCount,GuidToBstr(pInfo->guidApp),							
									  bstrGuidTx,						
									  bstrTsid,
									  bRoot);
									  
	return S_OK;
}