IPersistQuery::ReadString method (cmnquery.h)

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

Syntax

HRESULT ReadString(
  [in]  LPCWSTR pSection,
  [in]  LPCWSTR pValueName,
  [out] LPWSTR  pBuffer,
  [in]  INT     cchBuffer
);

Parameters

[in] pSection

Pointer to a null-terminated Unicode string that represents the section name that the string should be read from.

[in] pValueName

Pointer to a null-terminated Unicode string that represents the name of the string value to be read.

[out] pBuffer

Pointer to a character buffer that receives the string value. The cchBuffer parameter specifies the size of this buffer including the null terminator.

[in] cchBuffer

Contains the size, in characters, of the pBuffer buffer including the null terminator.

Return value

Returns S_OK if successful or a standard HRESULT value otherwise. Possible error codes include the following.

Requirements

Requirement Value
Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
Target Platform Windows
Header cmnquery.h
Library Uuid.lib
DLL Dsquery.dll

See also

Display Interfaces in Active Directory Domain Services

IPersistQuery