IERegDeleteValue

Deletes an Internet Explorer registry setting.

Declaration

HRESULT 
IERegDeleteValue (
    UINT uValue,
    BOOL bFromHKLM);

Parameters

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 bFromHKLM argument is non-zero to delete the setting from the HKEY_LOCAL_MACHINE\Software branch, else from HKEY_CURRENT_USER\Software.

Return Value

The function returns zero for success, else an error code.

Behaviour

The function tries to open all four possible branches for Internet Explorer registry settings, if this has not yet been done. Failure to open a branch just means that this function and others cannot operate later in that branch.

If the given index is unsupported, the function fails (returning 0x80040704).

The function also fails (returning 0x80040700) if the selected setting is not supported in the indicated branch or if IERTUTIL does not have this branch open.

The function opens the containing key for the selected value, asking for KEY_SET_VALUE access rights, deletes the value, and closes the key. Failure to open or delete is failure for the function. The error code is necessarily 0x80040703.

Availability

The IERegDeleteValue function is exported from IERTUTIL as ordinal 168 in version 8.0 and higher.