IPersistQuery::WriteStruct method (cmnquery.h)

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

Syntax

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

Parameters

[in] pSection

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

[in] pValueName

Pointer to a null-terminated Unicode string that represents the name of the structure.

[in] pStruct

Pointer to the structure to be written. The cbStruct parameter contains the number of bytes to be written.

[in] cbStruct

Contains the size, in bytes, of the structure to be written.

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