⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 filter.mof

📁 This a sample Plug and Play filter driver that provides WMI data blocks. Typically, driver writers w
💻 MOF
📖 第 1 页 / 共 3 页
字号:
/*++

Copyright (c) 1999  Microsoft Corporation

Module Name:

   filter.mof

Abstract:

    Managed Object Format file that contains descriptions of the data blocks
    events and methods implemented by the driver


    Note that the classes have extra qualifiers so that they can be 
    displayed within device manager property pages using wmiprop.dll. 
    Wmiprop.dll is the generic property page provider. Note that changes 
    to your device's inf are required to enable wmiprop.dll to display 
    property pages; WmiProp.Dll must be made a class coinstaller and a 
    WmiConfigClasses registry value must be setup that includes the
    list of classes to display as property pages.

    The following qualifiers affect the display of classes within
    a device manager property page. 

	DisplayName - The text that is displayed as the property page title or
		  the text for a property element within a page.

	Description - Description of the property element that is displayed on 
		  the page

	Range       - Specifies the valid range for value of the property. This
		  range is enforced by the property page provider. Multiple
		  ranges can be given, ie  "1-7,9,11,13-54"

	ValueMap/Values  - Specifies an enumeration that contains the list of 
		       valid values and the name to display for them. 

	Write       - Specifies that the property is writable. If the qualifier
		  is not specified then the property page does not allow
		  the value to be changed.

	WmiDisplayInHex  - Specifies that the value of the property be displayed
		       as a hexadecimal number.



    Note that the class Vendor_IrpCount will be displayed in Sysmon (Perfmon).

    Don't Forget:
        - Replace Vendor with the name of the driver
        - Run guidgen.exe to generate your own guids. Do not use the guids
          in this sample
--*/

class WMIEvent : __ExtrinsicEvent
{
};



//
// Define EC1 and EC2 as embedded classes. Embedded classes are structures
// that are used within other classes.
//
[WMI,
 Locale("MS\\0x409"),
 HeaderName("EC1"),
 DisplayName("Embedded Class 1") : amended,
 Description("Description of embedeed class 1") : amended,
 guid("{A1C15015-B069-11d1-9290-00A0C9062910}")]
class Vendor_EC1
{
    [WmiDataId(1),
     read, write, 
     DisplayName("BOOLEAN") : amended,
     Description("boolean data") : amended
    ] boolean Xboolean;

    [WmiDataId(2),
     read, write,
     DisplayName("UCHAR") : amended,
     Description("unsigned character data") : amended
    ] uint8 Xuint8;

    [WmiDataId(3),
     read, write,
     DisplayName("USHORT") : amended,
     Description("unsigned short data") : amended
    ] uint16 Xuint16;

    [WmiDataId(4),
     read, write,
     DisplayName("ULONG") : amended,
     Description("unsigned long data") : amended
    ] uint32 Xuint32;

    [WmiDataId(5),
     read, write,
     WmiDisplayInHex,
     DisplayName("ULONGLONG") : amended,
     Description("unsigned long long data") : amended
    ] uint64 Xuint64;

    [WmiDataId(6),
     read, write,
     DisplayName("CHAR") : amended,
     Description("signed byte data") : amended
    ] sint8 Xint8;

    [WmiDataId(7),
     read, write,
     DisplayName("SHORT") : amended,
     Description("singed short data") : amended
    ] sint16 Xint16;

    [WmiDataId(8),
     read, write,
     DisplayName("LONG") : amended,
     Description("singed long data") : amended
    ] sint32 Xint32;

    [WmiDataId(9),
     read, write,
     WmiDisplayInHex,
     DisplayName("LONGLONG") : amended,
     Description("signed long long data") : amended
    ] sint64 Xint64;

    [WmiDataId(10),
     read, write,
     DisplayName("DateTime") : amended,
     Description("absolute or relative date and time") : amended
    ] datetime Xdatetime;

};

[WMI,
 Locale("MS\\0x409"),
 HeaderName("EC2"),
 DisplayName("Embedded Class 2"),
 Description("Description of embedeed class 2") : amended,
 guid("{A1C15016-B069-11d1-9290-00A0C9062910}")]
class Vendor_EC2
{
    [WmiDataId(1),
     read, write,
     DisplayName("Boolean Array") : amended,
     Description("Fixed length array of 8 booleans") : amended
    ] boolean Xboolean[8];

    [WmiDataId(2),
     read, write,
     DisplayName("UCHAR Array") : amended,
     Description("Fixed length array of 8 unsigned characters") : amended
    ] uint8 Xuint8[8];

    [WmiDataId(3),
     read, write,
     DisplayName("USHORT Array") : amended,
     Description("Fixed length array of 4 unsigned shorts") : amended
    ] uint16 Xuint16[4];

    [WmiDataId(4),
     read, write,
     DisplayName("ULONG Array") : amended,
     Description("Fixed length array of 2 usingned long") : amended
    ] uint32 Xuint32[2];

    [WmiDataId(5),
     read, write,
     WmiDisplayInHex,
     DisplayName("ULONGLONG Array") : amended,
     Description("Unsigned long long") : amended
    ] uint64 Xuint64;

    [WmiDataId(6),
     read, write,
     DisplayName("CHAR Array") : amended,
     Description("Fixed length array of 8 signed characters") : amended
    ] sint8 Xint8[8];

    [WmiDataId(7),
     read, write,
     DisplayName("SHORT Array") : amended,
     Description("Fixed length array of 4 signed short") : amended
    ] sint16 Xint16[4];

    [WmiDataId(8),
     read, write,
     DisplayName("LONG Array") : amended,
     Description("Fixed length array of 2 signed long") : amended
    ] sint32 Xint32[2];

    [WmiDataId(9),
     read, write,
     WmiDisplayInHex,
     DisplayName("LONGLONG Array") : amended,
     Description("Signed long long") : amended
    ] sint64 Xint64;

    [WmiDataId(10),
     read, write,
     DisplayName("DateTime") : amended,
     Description("absolute or relative date and time") : amended
    ] datetime Xdatetime;
};



[WMI, 
 Dynamic,
 Provider("WmiProv"),
 Description("Description of sample class 1") : amended,
 DisplayName("Sample Class 1") : amended,
 Locale("MS\\0x409"),
 guid("{15D851F1-6539-11d1-A529-00A0C9062910}")]
class Vendor_SampleClass1
{
    [key, read] 
     string InstanceName;
    [read] boolean Active;

    [WmiDataId(1),
     read, write, 
     DisplayName("BOOLEAN") : amended,
     Description("boolean data") : amended
    ] boolean Xboolean;

    [WmiDataId(2),
     read, write,
     DisplayName("UCHAR") : amended,
     Description("unsigned character data") : amended
    ] uint8 Xuint8;

    [WmiDataId(3),
     read, write,
     DisplayName("USHORT") : amended,
     Description("unsigned short data") : amended
    ] uint16 Xuint16;

    [WmiDataId(4),
     read, write,
     DisplayName("ULONG") : amended,
     Description("unsigned long data") : amended
    ] uint32 Xuint32;

    [WmiDataId(5),
     read, write,
     WmiDisplayInHex,
     DisplayName("ULONGLONG") : amended,
     Description("unsigned long long data") : amended
    ] uint64 Xuint64;

    [WmiDataId(6),
     read, write,
     DisplayName("CHAR") : amended,
     Description("signed byte data") : amended
    ] sint8 Xint8;

    [WmiDataId(7),
     read, write,
     DisplayName("SHORT") : amended,
     Description("singed short data") : amended
    ] sint16 Xint16;

    [WmiDataId(8),
     read, write,
     DisplayName("LONG") : amended,
     Description("singed long data") : amended
    ] sint32 Xint32;

    [WmiDataId(9),
     read, write,
     WmiDisplayInHex,
     DisplayName("LONGLONG") : amended,
     Description("signed long long data") : amended
    ] sint64 Xint64;

    [WmiDataId(10),
     read, write,
     DisplayName("DateTime") : amended,
     Description("absolute or relative date and time") : amended
    ] datetime Xdatetime;
};

[WMI, 
 Dynamic,
 Provider("WmiProv"),
 Description("Description of Sample Class 2") : amended,
 DisplayName("Sample Class 2") : amended,
 Locale("MS\\0x409"),
 guid("{15D851F2-6539-11d1-A529-00A0C9062910}")]
class Vendor_SampleClass2
{
    [key, read] 
     string InstanceName;
    [read] boolean Active;

    [WmiDataId(1),
     read, write,
     DisplayName("Data") : amended,
     Description("Embedded class data") : amended
    ] Vendor_EC1 EmbeddedClass1;
    
};


[WMI, 
 Dynamic,
 Provider("WmiProv"),
 Description("Description of Sample Class 3") : amended,
 DisplayName("Sample Class 3") : amended,
 Locale("MS\\0x409"),
 guid("{15D851F3-6539-11d1-A529-00A0C9062910}")]
class Vendor_SampleClass3
{
    [key, read] 
     string InstanceName;
    [read] boolean Active;

    [WmiDataId(1),
     read, write,
     DisplayName("Data") : amended,
     Description("Fixed length array of 4 embedded classes") : amended
    ] Vendor_EC1 EmbeddedClass1[4];
    

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -