Export (0) Print
Expand All

IQueryAssociations::GetKey method

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 pwszExtra,
  [out]           HKEY *phkeyOut
);

Parameters

flags [in]

Type: ASSOCF

The ASSOCF value that can be used to control the search.

key [in]

Type: ASSOCKEY

The ASSOCKEY value that specifies the type of key that is to be returned.

pwszExtra [in, optional]

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.

phkeyOut [out]

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

Minimum supported client

Windows 2000 Professional, Windows XP [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Shlwapi.h

Library

Shlwapi.lib

DLL

Shell32.dll (version 5.0 or later)

See also

IQueryAssociations

 

 

Community Additions

ADD
Show:
© 2014 Microsoft