Directory Services

IPersistQuery::ReadString

The IPersistQuery::ReadString method reads a string from the query store.

HRESULT ReadString( 
  LPCWSTR pSection,
  LPCWSTR pValueName,
  LPWSTR pBuffer,
  INT cchBuffer
);

Parameters

pSection
[in] Pointer to a null-terminated Unicode string that represents the section name that the string should be read from.
pValueName
[in] Pointer to a null-terminated Unicode string that represents the name of the string value to be read.
pBuffer
[out] Pointer to a characater buffer that receives the string value. The cchBuffer parameter specifies the size of this buffer including the null terminator.
cchBuffer
[out] Contains the size, in characters, of the pBuffer buffer including the null terminator.

Return Values

Returns S_OK if successful or a standard HRESULT value otherwise. Possible error codes include the following.
Return Code Description
E_FAIL The string value cannot be read, or the size represented by the cchBuffer parameter is not large enough to receive the string value, including the null terminator.
E_INVALDIARG One or more parameters are invalid.

Requirements

Client: Included in Windows XP and Windows 2000 Professional.
Server: Included in Windows Server 2003 and Windows 2000 Server.
Header: Declared in Cmnquery.h.

See Also

IPersistQuery, Active Directory Display Interfaces