Directory Services

CQAddPagesProc

The CQAddPagesProc callback function is called by a query form extension to add a page to a query form in the query dialog box. A pointer to this function is supplied to the query form extension in the pAddPagesProc parameter of the IQueryForm::AddPages method. CQAddPagesProc is a placeholder for the query handler-defined function name.

HRESULT CALLBACK CQAddPagesProc(
  LPARAM lParam,
  REFCLSID clsidForm,
  LPCQPAGE pPage
);

Parameters

lParam
Contains a 32-bit value defined by the query handler. This value is passed to the query form extension as the lParam parameter in the IQueryForm::AddPages call.
clsidForm
Contains the CLSID of the form that the page should be added to. This member can contain the CLSID of a custom query form or one of the system-supplied forms defined for the clsidDefaultForm member of the OPENQUERYWINDOW structure.
pPage
Pointer to a CQPAGE structure that defines the page to be added.

Return Values

Returns an HRESULT value that indicates the success or failure of the page add operation. The following table lists possible return values.
Return Code Description
S_OK The page was added successfully.
E_INVALIDARG One or more parameters are invalid.
E_OUTOFMEMORY A memory allocation failure occurred.
E_FAIL An unspecified error occurred.

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

IQueryForm::AddPages, OPENQUERYWINDOW, CQPAGE