IQueryAssociations::GetKey method (shlwapi.h)
Searches for and retrieves a file or protocol association-related key from the registry.
Syntax
HRESULT GetKey(
[in] ASSOCF flags,
[in] ASSOCKEY key,
[in, optional] LPCWSTR pszExtra,
[out] HKEY *phkeyOut
);
Parameters
[in] flags
Type: ASSOCF
The ASSOCF value that can be used to control the search.
[in] key
Type: ASSOCKEY
The ASSOCKEY value that specifies the type of key that is to be returned.
[in, optional] pszExtra
Type: LPCWSTR
A pointer to an optional null-terminated Unicode string with information about the location of the key. It is normally set to a Shell verb such as open. Set this parameter to NULL if it is not used.
[out] phkeyOut
Type: HKEY*
A pointer to the key's HKEY value.
Return value
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
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 | Shell32.dll (version 5.0 or later) |