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

📄 wmicore.moff

📁 书中的主要程序文件。在打开例题的.dsw文件后,请读者在 tools菜单下的 Options 的 Directories 标签中选择 Executable files
💻 MOFF
📖 第 1 页 / 共 5 页
字号:
/*++

Copyright (c) 1995 Microsoft Corporation

Module Name:

    wmicore.mof

Abstract:

    This file defines all of the MOF classes "built in" to WMI. Typically
    this will be for all data providers that are shipped by MS. The list
    includes:

        WMI specific internal classes
        Power Management
        NDIS
        SMBIOS Data
        Keyboard
        Mouse
        Disk
        IDE
        Serial
        Temperature via ACPI

Revision History:

--*/

#pragma classflags("forceupdate")

//
// Wmi internal classes

[abstract]
class MS_WmiInternal
{
};

[Dynamic, Provider("WMIProv"),
 WMI,
 Description("This class supplies the binary mof information"),
 guid("{05901221-D566-11d1-B2F0-00A0C9062910}"),
 locale("MS\\0x409")]
class MSWmi_MofData : MS_WmiInternal
{
    [key, read]
     string InstanceName;
    [read] boolean Active;

    [WmiDataId(1),
     read
    ] uint32 Unused1;

    [WmiDataId(2),
     read
    ] uint32 Unused2;



    [WmiDataId(3),
     read
    ] uint32 Size;

    [WmiDataId(4),
     read
   ] uint32 Unused4;


    [WmiDataId(5),
     WmiSizeIs("Size"),
     read
    ] uint8 BinaryMofData[];
};

[Dynamic, Provider("WMIProv"),
 WMI,
 Description("This class supplies additional information about a data provider. Querying this class with an instance name returned from another class query will return additional information about the instance"),
 guid("{C7BF35D0-AADB-11d1-BF4A-00A0C9062910}"),
 locale("MS\\0x409")]
class MSWmi_ProviderInfo : MS_WmiInternal
{
    [key, read]
     string InstanceName;
    [read] boolean Active;

    // CM_DRP_FRIENDLY_NAME
    [WmiDataId(1),
     read
    ] string FriendlyName;

    // CM_DRP_DEVICEDESC
    [WmiDataId(2),
     read
    ] string Description;

    // CM_DRP_LOCATION_INFORMATION
    [WmiDataId(3),
     read
    ] string Location;

    // CM_DRP_MFG
    [WmiDataId(4),
     read
    ] string Manufacturer;

    // CM_DRP_SERVICE
    [WmiDataId(5),
     read
    ] string Service;

    // CONSIDER: adding device capabilities
};

[Dynamic, Provider("WMIProv"),
 WMI,
 Description("This class supplies the PnPDeviceId for a specific device"),
 guid("{C7BF35D2-AADB-11d1-BF4A-00A0C9062910}"),
 GuidName1("DATA_PROVIDER_PNPID_GUID"),
 locale("MS\\0x409")]
class MSWmi_PnPDeviceId : MS_WmiInternal
{
//
// Note to driver developers:
//
//    Support for this guid is required if properties in the wmi namespace
//    are to be mapped into another namespace via the view provider. 
//
//    This guid is automatically supported by WMI if the following conditions
//    are met:
//
//    1. The device registers with PDO instance names for all guids
//       (ie, WMIREG_FLAG_PDO_INSTANCE_NAMES)
//
//    If the driver cannot follow the rules above and WMI cannot support 
//    the guid automatically, then the driver can support it in its own
//    driver code. 


    [key, read]
     string InstanceName;
    [read] boolean Active;

    // Pnp device id
    [WmiDataId(1),
     Description("PnP Device Id for the device. This property is useful for mapping from the wmi namespace to the cimv2 namespace classes using the view provider"),
     read
    ] string PnPDeviceId;
};


[Dynamic, Provider("WMIProv"),
 WMI,
 Description("This class supplies the Instance names associated with a PnP Device Instance Id"),
 guid("{C7BF35D3-AADB-11d1-BF4A-00A0C9062910}"),
 GuidName1("DATA_PROVIDER_PNPID_INSTANCE_NAMES_GUID"),
 locale("MS\\0x409")]
class MSWmi_PnPInstanceNames : MS_WmiInternal
{
//
// Note to driver developers:
//
//    Support for this guid is required if properties in the wmi namespace
//    are to be mapped into another namespace via the view provider. 
//
//    This guid is automatically supported by WMI if the following conditions
//    are met:
//
//    1. The device registers with PDO instance names for all guids
//       (ie, WMIREG_FLAG_PDO_INSTANCE_NAMES)
//
//    If the driver cannot follow the rules above and WMI cannot support 
//    the guid automatically, then the driver can support it in its own
//    driver code. 


    [key, read]
     string InstanceName;
    [read] boolean Active;

    // Pnp device id
    [WmiDataId(1),
     Description("Count of instance names associated with this PnPId"),
     read
    ] uint32 Count;

    // Instance names
    [WmiDataId(2),
     WmiSizeIs("Count"),
     Description("Wmi Instance Names for the device. This property is useful for mapping from the wmi namespace to the cimv2 namespace classes using the view provider"),
     read
    ] string InstanceNameList[];
};

//
// SMBIOS data classes
//
[abstract]
class MS_SmBios
{
};

[Dynamic, Provider("WMIProv"),
 WMI,
 Description("Raw SMBIOS Tables"),
 guid("{8F680850-A584-11d1-BF38-00A0C9062910}"),
 locale("MS\\0x409")

]
class MSSmBios_RawSMBiosTables : MS_SmBios
{
    [key, read]
     string InstanceName;
    [read] boolean Active;

    [WmiDataId(1),
     read
    ] boolean Used20CallingMethod;

    [WmiDataId(2),
     read
    ] uint8 SmbiosMajorVersion;

    [WmiDataId(3),
     read
    ] uint8 SmbiosMinorVersion;

    [WmiDataId(4),
     read
    ] uint8 DmiRevision;


    [WmiDataId(5),
     read
    ] uint32 Size;

    [WmiDataId(6),
     WmiSizeIs("Size"),
     read
    ] uint8 SMBiosData[];

};

//
// Power management classes

[abstract]
class MSPower
{
};

[Dynamic, Provider("WMIProv"),
 WMI,
 Description("The control sets whether the device should dynamically power on and off while the system is working."),
 guid("827c0a6f-feb0-11d0-bd26-00aa00b7b32a"),
 locale("MS\\0x409")]
class MSPower_DeviceEnable : MSPower
{
    [key, read]
     string InstanceName;
    [read] boolean Active;

    [WmiDataId(1),
     read,
     write] boolean Enable;
};

[Dynamic, Provider("WMIProv"),
 WMI,
 Description("This control indicates whether the device should be configured to wake a sleeping system."),
 guid("a9546a82-feb0-11d0-bd26-00aa00b7b32a"),
 locale("MS\\0x409")]
class MSPower_DeviceWakeEnable : MSPower
{
    [key, read]
     string InstanceName;
    [read] boolean Active;

    [WmiDataId(1),
     read,
     write] boolean Enable;
};


//
// NDIS classes

[abstract]
class MSNdis
{
};

[WMI,
  guid("{B5BD98B7-0201-11d1-A50E-00A0C9062910}")]
class MSNdis_NetworkAddress : MSNdis
{
    [read, WmiDataId(1)]
      uint8    Address[6];
};

[WMI,
 guid("{B5BD98B8-0201-11d1-A50E-00A0C9062910}")]
class MSNdis_NetworkShortAddress : MSNdis
{
    [read, WmiDataId(1)]
      uint8    Address[2];
};

[WMI,
 guid("{60fc6b57-0f66-11d1-96a7-00c04fc3358c}")]
class MSNdis_NetworkLinkSpeed : MSNdis
{
	[read, WmiDataId(1)]    uint32	Outbound;
	[read, WmiDataId(2)]    uint32	Inbound;
};

///
///	GUIDs that do not translate to OIDs
///
///

[WMI, Dynamic, Provider("WMIProv"),
 guid("{981f2d7f-b1f3-11d0-8dd7-00c04fc3358c}"),
 locale("MS\\0x409"),
 WmiExpense(1),
 Description("NDIS Enumerate Adapter")]
class MSNdis_EnumerateAdapter : MSNdis
{
    [key, read]
    string		InstanceName;

    [read]
    boolean		Active;

    [read,
     Description("Device name."),
     WmiDataId(1)]    string	DeviceName;
};

[WMI, Dynamic, Provider("WMIProv"),
 guid("{981f2d80-b1f3-11d0-8dd7-00c04fc3358c}"),
 locale("MS\\0x409"),
 WmiExpense(1),
 Description("NDIS Notify Adapter Removal")]
class MSNdis_NotifyAdapterRemoval : WMIEvent
{
    [key, read]
    string		InstanceName;

    [read]
    boolean		Active;

    [read,
     Description("Device name."),
     WmiDataId(1)]    string	DeviceName;
};

[WMI, Dynamic, Provider("WMIProv"),
 guid("{981f2d81-b1f3-11d0-8dd7-00c04fc3358c}"),
 locale("MS\\0x409"),
 WmiExpense(1),
 Description("NDIS Notify Adapter Arrival")]
class MSNdis_NotifyAdapterArrival : WMIEvent
{
    [key, read]
    string		InstanceName;

    [read]
    boolean		Active;

    [read,
     Description("Device name."),
     WmiDataId(1)]    string	DeviceName;
};


[WMI, Dynamic, Provider("WMIProv"),
 guid("{981f2d82-b1f3-11d0-8dd7-00c04fc3358c}"),
 locale("MS\\0x409"),
 WmiExpense(1),
 Description("NDIS Enumerate VC")]
class MSNdis_NdisEnumerateVc : MSNdis
{
    [key, read]
    string		InstanceName;

    [read]
    boolean		Active;
};

[WMI, Dynamic, Provider("WMIProv"),
 guid("{981f2d79-b1f3-11d0-8dd7-00c04fc3358c}"),
 locale("MS\\0x409"),
 WmiExpense(1),
 Description("NDIS Notify VC Removal")]
class MSNdis_NotifyVcRemoval : WmiEvent
{
    [key, read]
    string		InstanceName;

    [read]
    boolean		Active;
};

[WMI, Dynamic, Provider("WMIProv"),
 guid("{182f9e0c-b1f3-11d0-8dd7-00c04fc3358c}"),
 locale("MS\\0x409"),
 WmiExpense(1),
 Description("NDIS Notify VC Arrival")]
class MSNdis_NotifyVcArrival : WMIEvent
{
    [key, read]
    string		InstanceName;

    [read]
    boolean		Active;
};


///
///
/// 	General GUIDs
///
///
[WMI, Dynamic, Provider("WMIProv"),
 guid("{5ec10354-a61a-11d0-8dd4-00c04fc3358c}"),
 locale("MS\\0x409"),
 WmiExpense(1),
 Description("NDIS Hardware Status")]
class MSNdis_HardwareStatus : MSNdis
{
    [key, read]
    string		InstanceName;

    [read]
    boolean		Active;

    [read,
     Description("Current hardware status of the underlying NIC."),
     Values{"NdisHardwareStatusReady",
             "NdisHardwareStatusInitializing",
             "NdisHardwareStatusReset",
             "NdisHardwareStatusClosing",
             "NdisHardwarestatusNotReady"},
     ValueMap{"0",
             "1",
             "2",
             "3",
             "4"},
     WmiDataId(1)]    uint32    NdisHardwareStatus;

//
//	This is of the type:
//	typedef enum _NDIS_HARDWARE_STATUS
//	{
//	 	NdisHardwareStatusReady,
//		NdisHardwareStatusInitializing,
//		NdisHardwareStatusReset,
//		NdisHardwareStatusClosing,
//		NdisHardwarestatusNotReady
//	} NDIS_HARDWARE_STATUS, *PNDIS_HARDWARE_STATUS;
//
};

[WMI,Dynamic, Provider("WMIProv"),
 guid("{5ec10355-a61a-11d0-8dd4-00c04fc3358c}"),
 locale("MS\\0x409"),
 WmiExpense(1),
 Description("NDIS Media Types Supported")]
class MSNdis_MediaSupported : MSNdis
{
    [key, read]
	string		InstanceName;

    [read]
    boolean		Active;

	[read,
     	Description("Number of media types supported."),
		WmiDataId(1)]    uint32  NumberElements;
    [read,
     	Description("List of media types the NIC supports."),
		WmiDataId(2),
		WmiSizeIs("NumberElements")]    uint32    NdisMediaSupported[];
};

[WMI,Dynamic, Provider("WMIProv"),
 guid("{5ec10356-a61a-11d0-8dd4-00c04fc3358c}"),
 locale("MS\\0x409"),
 WmiExpense(1),
 Description("NDIS Media Types In Use")]
class  MSNdis_MediaInUse : MSNdis
{
    [key, read]
	string		InstanceName;

    [read]
	boolean		Active;

	[read,
     	Description("Number of media types in use."),
		WmiDataId(1)]    uint32  NumberElements;
    [read,
     	Description("List of media types the NIC is currently supporting."),
		WmiDataId(2),

⌨️ 快捷键说明

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