In this article

Mapping a Registry Data Type to a WMI Data Type

05/31/2018

2 minutes to read

In this article

The application must create the properties with a data type that maps to the registry data type. You do not need to specify the registry data type in the methods that create, get, or set registry values. However, the input parameter that contains the value must be in the correct WMI data type. For example, if an application receives REG_DWORD data from the registry, the class that receives the data must include a Uint32 property.

The following table lists the mapping between registry and WMI data types used in the StdRegProv methods.

Registry data type

WMI data type

REG_BINARY

uint8 array An array of values that do not exceed 255 or hex FF. For example, the following Visual Basic Script code creates an array that fits this data type.BinArray = Array(&H01, &Ha2) The StdRegProv class method SetBinaryValue requires the REG_BINARY data type.