7.8 WFMQueryValue

HRESULT WFMQueryValue ( hKey, lpszValueName, lpszData, lpcchData )

Retrieves the data for the value with the specified name, within the specified open key.

Parameters HKEY hKey

Handle to a currently open key, or the predefined handle value:
WFS_CFG_HKEY_XFS_ROOT
The value data returned is within the key identified by this parameter.

LPSTR lpszValueName

Pointer to a null-terminated string containing the name of the value being queried.

LPSTR lpszData

Pointer to a buffer that receives the data for the value entry, including the terminating null character.

LPDWORD lpcchData

Pointer to a variable that specifies the size, in characters, of the buffer pointed to by the lpszData parameter, including the terminating null character. When the function returns, this variable contains the the number of characters actually stored in the buffer, not including the terminating null character.

Comments

Error Codes If the function return is not WFS_SUCCESS, it is one of the following error conditions.

WFS_ERR_CFG_INVALID_HKEY
The specified hKey parameter does not correspond to a currently open key.
WFS_ERR_CFG_INVALID_NAME
The value specified by the lpszValueName parameter does not exist in the specified key.
WFS_ERR_CFG_VALUE_TOO_LONG
The length of the value to be returned exceeds the length of the buffer.
WFS_ERR_INVALID_POINTER
A pointer parameter does not point to accessible memory.