Searches for and retrieves a file or protocol association-related string from the registry.
HRESULT GetString( ASSOCF flags, ASSOCSTR str, LPCWSTR pszExtra, LPWSTR pszOut, DWORD *pcchOut );
A flag that can be used to control the search. It can be any combination of the following ASSOCF values.
An ASSOCSTR value that specifies the type of string that is to be returned.
A pointer to an optional, null-terminated Unicode string with information about the location of the string. It is typically set to a Shell verb such as open. Set this parameter to NULL if it is not used.
A pointer to a null-terminated Unicode string used to return the requested string. Set this parameter to NULL to retrieve the required buffer size.
A pointer to a value that, on entry, is set to the number of characters in the pwszOut buffer. When the function returns successfully, it points to the number of characters placed in the buffer.
If the ASSOCF_NOTRUNCATE flag is set in flags and the buffer specified in pwszOut is too small, the function returns E_POINTER and pcchOut points to the required size of the buffer.
If pwszOut is NULL, the function returns S_FALSE and pcchOut points to the required size of the buffer.
Returns a standard COM error value, including the following:
|E_POINTER||The pwszOut buffer is too small to hold the entire string.|
|S_FALSE||pwszOut is NULL. pcchOut contains the required buffer size.|
|Minimum supported client||Windows 2000 Professional, Windows XP [desktop apps only]|
|Minimum supported server||Windows 2000 Server [desktop apps only]|
|DLL||Shell32.dll (version 5.0 or later)|