Directory Services


The IQueryForm interface is implemented by a query form extension object to allow the form object to add forms and pages to the system-supplied directory service query dialog box.

Methods in Vtable Order

The IQueryForm interface inherits the methods of the standard COM interface IUnknown.

In addition, IQueryForm defines the following methods.

Method Description
Initialize Initializes the query form object.
AddForms Add forms.
AddPages Add pages.


A query form extension object must be registered in the Windows registry to be available to the query handler. This is accomplished by adding the following registry key.

HKEY_CLASSES_ROOT\CLSID\<query handler CLSID>\Forms\
     <name of query form extension>

The <query handler CLSID> key is the class identifier of the form handler. The <name of query form extension> key is the unique name of the query form extension. This name must be unique within the Forms key. It is suggested that the string form of the class identifier of the query form extension be used for the name.

Under the above key, the following registry entries must be made.

Registry Entry Description
CLSID A string value that contains the class identifier of the object that implements IQueryForm.
Flags A numeric value that contains a set of flags that define the behavior of the form. This can be zero or a combination of one or more of the following values.
The form should be visible in the normal form list.
The form should be visible in the optional form list.


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

Active Directory Display Interfaces