2025-04-27 07:49:33 -04:00

128 lines
2.9 KiB
Plaintext

// © 1999-2000 Microsoft Corporation. All rights reserved.
#pragma namespace ("\\\\.\\root\\cimv2")
//////////////////////////////////////////////////////////////////////////////
// An event with a single DWORD.
class MSFT_NCETest_DWORDEvent : __ExtrinsicEvent
{
uint32 Index;
};
//////////////////////////////////////////////////////////////////////////////
// A small event with three properties.
class MSFT_NCETest_3PropEvent : __ExtrinsicEvent
{
uint32 Index;
boolean BoolParam;
string StringParam;
};
//////////////////////////////////////////////////////////////////////////////
// An event with all possible data types.
class MSFT_NCETest_AllPropTypesEvent : __ExtrinsicEvent
{
string StringParam;
string StringArray[];
datetime DateParam;
datetime DateArray[];
object ref RefParam;
object ref RefArray[];
boolean BoolParam;
boolean BoolArray[];
char16 Char16Param;
char16 Char16Array[];
object ObjParam;
object ObjArray[];
object WbemClassObjParam;
object WbemClassObjArray[];
real32 Real32Param;
real32 Real32Array[];
real64 Real64Param;
real64 Real64Array[];
uint8 Uint8Param;
uint8 Uint8Array[];
sint8 Sint8Param;
sint8 Sint8Array[];
uint16 Uint16Param;
uint16 Uint16Array[];
sint16 Sint16Param;
sint16 Sint16Array[];
uint32 Uint32Param;
uint32 Uint32Array[];
sint32 Sint32Param;
sint32 Sint32Array[];
uint64 Uint64Param;
uint64 Uint64Array[];
sint64 Sint64Param;
sint64 Sint64Array[];
};
//////////////////////////////////////////////////////////////////////////////
// A blob event.
[
// This is the CLSID of the COM object that decodes the blob.
DecodeCLSID("{4957BDA2-85B7-4581-8939-63A047ADC3E6}"),
Description(
"This event demonstrates a non-COM event that uses a blob and a "
"blob decoder. This event is fired using WmiReportEventBlob.")
]
class MSFT_NCETest_BlobEvent : __ExtrinsicEvent
{
[DecodeHandle(0)]
string Name;
[DecodeHandle(1)]
uint32 Index;
[DecodeHandle(2)]
uint8 ByteArray[];
[DecodeHandle(3)]
string StringArray[];
};
//////////////////////////////////////////////////////////////////////////////
// Non-COM event provider registration. Use the value of Name when connecting
// to the API via WmiEventSourceConnect.
instance of MSFT_WMI_NonCOMEventProvider as $P1
{
Name = "NCETest Event Provider";
};
instance of __EventProviderRegistration
{
Provider = $P1;
EventQueryList =
{
"select * from MSFT_NCETest_DWORDEvent",
"select * from MSFT_NCETest_3PropEvent",
"select * from MSFT_NCETest_AllPropTypesEvent",
"select * from MSFT_NCETest_BlobEvent",
"select * from MSFT_WMI_GenericNonCOMEvent"
};
};