Event Tracing Provider Framework  

CBaseEvent

This base class is the basis for all fixed length events. Derive from this class to create your own custom events.

For a list of all members of this type, see CBaseEvent Members.

CBaseEvent

[C++]
class CBaseEvent

Example

[C++]
class CEventFixedLen : 
    public CBaseEvent<EVENT_FIXED_LEN, &MY_EVENTCLASS>
{
public:
    CEventFixedLen(DWORD dwMoreInfo) 
    { 
        //
        // Simply set your event data
        //
        m_data.Data.dwProcessID = GetCurrentProcessId();
        m_data.Data.dwThreadID = GetCurrentThreadId();
        m_data.Data.dwMoreInfo = dwMoreInfo;

        // If you need to, you can set specific values in the event header 
        // through m_data.Header. One such example would be to set the 
        // version of the event...

        // Don't forget to set the event type
        SetEventType(EVENT_TRACE_TYPE_INFO);
        //
        // Set text equivelent of the event for verbose debug output
        //
        SetTextEvent("Process ID = 0x%X, Thread ID = 0x%X, Info = %d\n", 
            m_data.Data.dwProcessID, m_data.Data.dwThreadID, dwMoreInfo);
    }
};

Requirements

Platforms:  Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Header: Declared in WMIEventTracing.h

 

See Also

CVariableLengthBaseEvent Members | CTraceEvent Members | CTraceController Members | CBaseEvent Members

Contact Me   |  Developing WMI Solutions    |   Gwyn Cole's Developer Blog    |   Legal
 © 2003 Content by Gwyn Cole. All rights reserved.