Platform SDK: Active Directory, ADSI, and Directory Services

OPENQUERYWINDOW

The OPENQUERYWINDOW structure describes the directory service query to perform and the characteristics of the window to display.

typedef struct
{
  DWORD   cbStruct;              
  DWORD   dwFlags;               
  CLSID   clsidHandler;          
  LPVOID  pHandlerParameters;    
  CLSID   clsidDefaultForm;      
  IPersistQueryW* pPersistQuery;        
  IPropertyBag* ppbFormParameters;
} OPENQUERYWINDOW, * LPOPENQUERYWINDOW;

Members

cbStruct
The size of the structure, used for versioning and parameter validation.
dwFlags
Flags used to add characteristics to the windows. This can include combinations of any flags in the following table.
dwFlags Description
OQWF_DEFAULTFORM Indicates that the clsidDefaultForm is valid for selection.
OQWF_HIDEMENUS Hides the menu bar.
OQWF_HIDESEARCHUI Invokes a window without the core search interface. This is used when you are building a filter dialog.
OQWF_ISSUEONOPEN When the query window is opened, initializes and performs a search.
OQWF_LOADQUERY When displaying the window, uses the IPersistQuery object to read the parameters back.
OQWF_OKCANCEL Places OK and cancel buttons on the bottom right corner.
OQWF_REMOVEFORMS Removes the "Find:" label and the drop-down feature from the window.
OQWF_REMOVESCOPES Removes the "In:" label and the drop-down feature from the window.
OQWF_SAVEQUERYONOK When the window is closed, persists the query using the IPersistQuery object.
OQWF_SHOWOPTIONAL Displays optional (admin) forms.
OQWF_SINGLESELECT Creates a single selection to view.

clsidHandler
This specifies a directory service query to be performed. Currently only CLSID_DsQuery is supported
pHandlerParameters
An opaque structure, specific to the clsidHandler. For a directory service query, this points a DSQUERYINITPARAMS structure.
clsidDefaultForm
Default form to be selected, if OQF_DEFAULTFORM = 1.
pPersistQuery
A pointer to the IPersistQuery interface, used for loading and saving query values (not result, just criteria).
ppbFormParameters
A pointer to the IPropertyBag interface, used for specifying form parameters.

Remarks

The OPENQUERYWINDOW structure is used in the ICommonQuery::OpenQueryWindow method for hosting the directory Service Find supported in Windows® 2000 and the DSCLIENT packs for Windows NT® 4.0, Windows 95 and Windows 98.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Header: Declared in Cmnquery.h.
  Unicode: Declared as Unicode and ANSI structures.

See Also

Active Directory Display Structures, DSQUERYINITPARAMS, ICommonQuery, IPersistQuery, IPropertyBag