Share via


GetValue function

Queries a specific Internet Explorer setting stored as a registry value. Retrieves the requested data based on the provided GUID and type, supporting various data types as specified by the TYPE enum in the SettingStore namespace.

Syntax

HRESULT GetValue(
    REFGUID Guid, 
    SettingStore::TYPE Type, 
    BOOL Expand, 
    PBYTE pData, 
    ULONG cbData, 
    PBYTE *ppData, 
    ULONG *pcbData
);

Parameters

  • Guid [in]
    A reference to a GUID that specifies the setting to be queried.

  • Type [in]
    An value from the SettingStore::TYPE enumeration that indicates the type of data being requested. This could be a string, DWORD, binary data, etc. See Remarks.

  • Expand [in]
    A boolean value indicating whether environment variables within the data should be expanded. If FALSE, environment variables will not be expanded.

  • pData [out]
    A pointer to a buffer that receives the data. This buffer must be large enough to hold the data, as indicated by cbData.

  • cbData [in]
    The size, in bytes, of the buffer pointed to by pData.

  • ppData [out]
    A pointer to a variable that receives the address of a buffer containing the retrieved data if pData is NULL. This buffer must be freed by the caller using HeapFree.

  • pcbData [out]
    A pointer to a variable that receives the size, in bytes, of the buffer containing the retrieved data if pData is NULL. This parameter can be NULL if only the size is needed.

Return value

If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

The SettingsStore::TYPE enumeration which specifies values for the Type parameter is defined with the following values:

Value Interpretation Remarks
0 BOOL REG_DWORD, with non-zero as true, zero as false;
REG_SZ, with case-insensitive "yes", "true" or "1" as true, and "no", "false" or "0" as false.
1 DWORD REG_DWORD;
REG_BINARY if exactly 4 bytes.
2 String REG_SZ
3 REG_EXPAND_SZ
4 StringArray REG_MULTI_SZ
5 Binary REG_BINARY
6 REG_BINARY
7 BOOLExt The same as 0 but with placeholders for the setting’s key and value.
8 DWORDExt The same as 1 but with placeholders for the setting’s key and value.
9 StringExt The same as 2 but with placeholders for the setting’s key and value.
10 The same as 4 but with placeholders for the setting’s key and value.
11 BinaryExt The same as 5 but with placeholders for the setting’s key and value.
12 REG_BINARY

Requirements

Minimum supported client

Windows 7

Header

Ieprocess.h

DLL

Iertutil.dll

See also