Mapping a Registry Data Type to a WMI Data Type
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|
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.
|REG_DWORD||uint32, sint32 or Visual Basic integer|
Expanded strings are special strings that represent system environment variables. For example, the following VBScript code creates a string that represents the HKEY_LOCAL_USER environment variable TEMP.
The Multistring data type contains multiple strings. For example, the following VBScript code creates an array that fits this data type.
|REG_RESOURCE_LIST||As appropriate. For more information, see Describing a Resource for the Registry.|