Geoff Chappell - Software Analyst
Reads an Internet Explorer registry setting that’s defined to have REG_SZ type.
HRESULT IERegGetDw ( UINT uSetting, PWSTR pszData DWORD *pcchData);
The uSetting argument is an index that identifies the setting. For a list of supported settings, see the general notes on the Internet Explorer Registry API.
The pszData argument provides the address of a buffer that is to receive the setting’s REG_SZ data.
The pcchData argument provides the address of a variable, which gives the size of the buffer, measured in characters. On success, this variable receives the size of the setting’s string data, again measured in characters.
The function returns zero for success, else an error code.
If either pszData or pcchData is NULL, the function cannot do anything useful, and fails (returning E_FAIL).
If the given index is unsupported, the function fails (returning 0x80040704).
The function looks for the indicated setting at its allowed locations in the registry. It ignores values that are present but whose data does not have the type that is defined for that setting. Register errors while looking for a value just mean the value is not present. The function succeeds if either
and the data will fit the given buffer.
Possible error codes from the registry search are:
To determine what size of buffer would suffice, use the separate function IERegGetBufferSizeWz.
The IERegGetWz function is exported from IERTUTIL as ordinal 163 in version 8.0 and higher.