SHRegGetBoolUSValueA function (shlwapi.h)

Retrieves a Boolean value from a registry subkey in a user-specific subtree (HKEY_CURRENT_USER or HKEY_LOCAL_MACHINE).

Syntax

BOOL SHRegGetBoolUSValueA(
  [in]           LPCSTR pszSubKey,
  [in, optional] LPCSTR pszValue,
  [in]           BOOL   fIgnoreHKCU,
  [in]           BOOL   fDefault
);

Parameters

[in] pszSubKey

Type: LPCTSTR

A pointer to a null-terminated string with the name of the subkey relative to HKEY_LOCAL_MACHINE and HKEY_CURRENT_USER. For example, "Software\MyCompany\MyProduct".

[in, optional] pszValue

Type: LPCTSTR

A pointer to a null-terminated string that specifies the name of the value. This value can be NULL.

[in] fIgnoreHKCU

Type: BOOL

A variable that specifies which key to look under. When set to TRUE, SHRegGetUSValue ignores HKEY_CURRENT_USER and returns a value from HKEY_LOCAL_MACHINE.

[in] fDefault

Type: BOOL

A value that is returned if there is no registry value.

Return value

Type: BOOL

Returns either the value from the registry, or fDefault if none is found.

Remarks

Note

The shlwapi.h header defines SHRegGetBoolUSValue as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional, Windows XP [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header shlwapi.h
Library Shlwapi.lib
DLL Shlwapi.dll (version 4.71 or later)