Directory Services

IPersistQuery::WriteStruct

The IPersistQuery::WriteStruct method writes a structure to the query store.

HRESULT WriteStruct( 
  LPCWSTR pSection,
  LPCWSTR pValueName,
  LPVOID pStruct,
  DWORD cbStruct
);

Parameters

pSection
[in] Pointer to a null-terminated Unicode string that represents the section name that the structure should be written to.
pValueName
[in] Pointer to a null-terminated Unicode string that represents the name of the structure.
pStruct
[in] Pointer to the structure to be written. The cbStruct parameter contains the number of bytes to be written.
cbStruct
[in] Contains the size, in bytes, of the structure to be written.

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 written.
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