DMI Operations Using WBEMDMIP.DLL

[This is preliminary documentation and subject to change.]

This section briefly describes the WBEM methods used for common DMI management tasks. See the DMITEST sample application included in this SDK for an example of how to use the DMI access methods.

DmiGetVersion
Use IWbemServices::CreateInstanceEnum with the class set to the singleton instance of DmiNodeData.
DmiGetConfig
Use IWbemServices::GetObject with the path for the singleton instance of DmiNodeData.
DmiSetConfig
Use the IWbemServices::ExecMethod with the path for the singleton instance of DmiNodeData, the method SetDefaultLanguage, and the instance of DmiLanguageMethodParams with the Language property set to the desired language string.
DmiListComponents
Use the IWbemServices::CreateInstanceEnum method with the class set to DmiComponent.
DmiListLanguages
Use the IWbemServices::CreateInstanceEnum method with the class set to DmiLanguage.
DmiListGroups
Use the IWbemServices::CreateClassEnum method with the superclass set to DmiGroupRoot.
DmiListAttributes
Use the IWbemServices::GetObject method with the path set to the desired instance of the desired dynamic group class.
DmiGetAttribute
Use the IWbemServices::GetObject method with the path set to the desired instance of the desired dynamic group class.

Note  This gives you all the attributes in the group. There is no way to access just one attribute. Once you get the object that contains all the attributes, you can perform the Get operations on the object to get the class property representing a given DMI attribute.

DmiSetAttribute
Use the IWbemServices::GetObject method with the path set to the desired instance of the desired dynamic group class. Use the WBEM's PUT method on the object to modify the instance returned, then use IWbemServices::PutInstance.
DmiGetMultiple
Use the IWbemServices::GetObject method with the path set to the desired instance of the desired dynamic group class.

Note  This gives you all the attributes in the group.

DmiSetMultiple
Use the IWbemServices::GetObject method with the path set to the desired instance of the desired dynamic group class. Modify the instance returned. Then use IWbemServices::PutInstance.
DmiAddRow
Use the IWbemServices::GetObject method with the path set to the desired instance of the desired dynamic group class. Modify the instance returned then use IWbemServices::PutInstance.

Note  The RowId property must be changed to a nonexistent RowId.

DmiDeleteRow
Use the IWbemServices::DeleteInstance with the path set to the desired dynamic instance of the dynamic class.
DmiAddComponent
Use the IWbemServices::ExecMethod with the path for the singleton instance of DmiNodeData, the method of AddComponent, and the MifFile property of the instance of the DmiAddMethodParams set to the desired MIF file path.
DmiAddLanguage
Use the IWbemServices::ExecMethod with the path to the instance of the component to which the language is to be added. Set the method to AddLanguage, and the MifFile property of the instance of the DmiAddMethodParams set to the desired MIF file path.
DmiAddGroup
Use the IWbemServices::ExecMethod with the path to the instance of the component to which the language is to be added. Set the method to AddGroup, and the MifFile property of the instance of the DmiAddMethodParams set to the desired MIF file path.
DmiDeleteComponent
Use IWbemServices::DeleteInstance with the path set to the desired dynamic instance of the DmiComponent class.
DmiDeleteLanguage
Use the IWbemServices::ExecMethod with the path to the instance of component to which the language is going to be deleted. Set the method to DeleteLanguage, and the Language property of the instance of the DmiLanguageMethodParams set to the language string to be deleted.
DmiDeleteGroup
Use IWbemServices::DeleteClass with the path set to the desired dynamic group class.