mirror of https://github.com/tongzx/nt5src
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
154 lines
4.0 KiB
154 lines
4.0 KiB
[WMI, guid("{F883CBB0-CCA4-11d0-A4F8-00A0C9062910}")]
|
|
class UnicodeString
|
|
{
|
|
[read, Id(1)]
|
|
short Length;
|
|
|
|
[read, Id(2), WmiSizeIs("Length")]
|
|
short String[];
|
|
};
|
|
|
|
|
|
//
|
|
// Standard class for reporting serial port information
|
|
//
|
|
[WMI, guid("{85F64E01-5A9B-11d0-A838-00AA0060D45C}"),
|
|
locale("ms\\0x409"),
|
|
WmiHelp009("English.hlp"),
|
|
WmiHelp010("French.hlp"),
|
|
WmiBaseHelpId(0x20),
|
|
WmiClassHelpId(0x1f),
|
|
WmiExpense(1)]
|
|
class StandardSerialInformation
|
|
{
|
|
|
|
//
|
|
// InstanceName and Active are the required properties for WBEM to be able to
|
|
// manage WMI data blocks. The must not have Id's associated with them.
|
|
[key, read]
|
|
UnicodeString embedding InstanceName; // Instance name returned from WMI
|
|
|
|
[read]
|
|
boolean Active;
|
|
|
|
//
|
|
// This is the first data item in the blob and is a 64 bit integer and is readonly
|
|
[read,
|
|
Id(1),
|
|
WmiScale(0),
|
|
WmiCounterType(0x00000000),
|
|
WmiComplexity(1),
|
|
WmiVolatility(1000)]
|
|
uint64 BytesSent; // bytes sent on port
|
|
|
|
//
|
|
// This is the second data item in the blob and is also a 64 bit integer and is
|
|
// readable or writable.
|
|
[read,
|
|
write,
|
|
Id(2),
|
|
WmiScale(0),
|
|
WmiCounterType(0x00000000),
|
|
WmiVolatility(1000)]
|
|
uint64 BytesReceived; // Bytes received on port
|
|
|
|
//
|
|
// This data item is only present in version 2 or higher of the data block and is the
|
|
// fourth data item in the data block. It is a read only counted unicode string.
|
|
[read,
|
|
WmiVersion(2),
|
|
Id(4),
|
|
WmiScale(0),
|
|
WmiCounterType(0x00000b00),
|
|
WmiVolatility(60000)]
|
|
UnicodeString embedding Owner; // Who owns the port
|
|
|
|
|
|
//
|
|
// This is the third data item in the data block and is part of version 1 and higher
|
|
// of the data block. It is a fixed length array of 16 bytes. Note that the order in
|
|
// the MOF class definition is not relevant to the order in the data block
|
|
[read, write,
|
|
Id(3),
|
|
WmiScale(0),
|
|
WmiCounterType(0x00000300)]
|
|
byte Status[/*16*/]; // Status bit array
|
|
|
|
//
|
|
// This the fifth data item in the data block and is only in version 3 and higher
|
|
// of the data block.
|
|
[read,
|
|
Id(5),
|
|
WmiVersion(3),
|
|
WmiScale(0),
|
|
WmiCounterType(0x00000000),
|
|
WmiComplexity(1),
|
|
WmiVolatility(1000)]
|
|
uint32 XmitDescriptorCount;
|
|
|
|
//
|
|
// This the sixth data item in the data block and is only in version 3 and higher
|
|
// of the data block. It is a variable length array of XmitDescriptor structures.
|
|
// The number of elements in the array can be found in the XmitDescriptorCount
|
|
// property.
|
|
[read,
|
|
Id(6),
|
|
WmiSizeIs("XmitDescriptorCount"),
|
|
WmiScale(0),
|
|
WmiCounterType(0x00000000),
|
|
WmiComplexity(1),
|
|
WmiVolatility(1000)]
|
|
XmitDescriptor embedding XmitBufferSize[];
|
|
|
|
};
|
|
|
|
[WMI, guid("{F883CBB1-CCA4-11d0-A4F8-00A0C9062910}")]
|
|
class XmitDescriptor
|
|
{
|
|
[read, Id(1)] int32 DestinationIndex;
|
|
[read, Id(2)] int32 DestinationTarget;
|
|
};
|
|
|
|
[guid("{85F64E02-5A9B-11d0-A838-00AA0060D45C}"),
|
|
locale("ms\\0x409"),
|
|
WmiHelp009("English.hlp"),
|
|
WmiHelp010("French.hlp"),
|
|
WmiBaseHelpId(0x20),
|
|
WmiClassHelpId(0x1f),
|
|
WmiExpense(1),
|
|
WmiEvent]
|
|
class SerialSendEvent
|
|
{
|
|
//
|
|
// InstanceName and Active are the required properties for WBEM to be able to
|
|
// manage WMI data blocks. The must not have Id's associated with them.
|
|
[key, read]
|
|
UnicodeString embedding InstanceName;
|
|
|
|
[read]
|
|
boolean Active;
|
|
|
|
//
|
|
// This data item is an event that can be enabled by a data consumer. The
|
|
// SendEventTrigger data item can be used to set or read the trigger for event
|
|
// generation while the SendEventRate data item can be set or read to regulate the
|
|
// event generation rate.
|
|
[read,
|
|
Id(1),
|
|
WmiScale(0),
|
|
WmiCounterType(0x00000000),
|
|
WmiEvent,
|
|
WmiEventTrigger("SendEventTrigger"),
|
|
WmiEventRate("SendEventRate")]
|
|
int32 SendEventValue;
|
|
|
|
[read,
|
|
write,
|
|
Id(2)]
|
|
int32 SendEventRate;
|
|
|
|
[read,
|
|
write,
|
|
Id(3)]
|
|
int32 SendEventTrigger;
|
|
};
|