Directory Services


The IPersistQuery::ReadStruct method reads a structure from the query store.

HRESULT ReadStruct( 
  LPCWSTR pSection,
  LPCWSTR pValueName,
  LPVOID pStruct,
  DWORD cbStruct


[in] Pointer to a null-terminated Unicode string that represents the section name that the structure should be read from.
[in] Pointer to a null-terminated Unicode string that represents the name of the structure value to be read.
[out] Pointer to a buffer that will receive the structure. The cbStruct parameter specifies the size of this buffer, in bytes.
[out] Specifies the size, in bytes, of the buffer represented by the pStruct parameter.

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 structure cannot be read or the size represented by the cbStruct parameter is not large enough to receive the structure.
E_INVALDIARG One or more parameters are invalid.


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