Directory Services

IDsObjectPicker

The IDsObjectPicker interface is used by an application to initialize and display an object picker dialog box. To create an instance of this interface, call CoCreateInstance with the CLSID_DsObjectPicker class identifier as shown below.

HRESULT hr = S_OK;
IDsObjectPicker *pDsObjectPicker = NULL;
 
hr = CoCreateInstance(CLSID_DsObjectPicker,
			 NULL,
			 CLSCTX_INPROC_SERVER,
			 IID_IDsObjectPicker,
			 (void **) &pDsObjectPicker);

The IDsObjectPicker implemented by the system supports both apartment and free-threading models and is thread safe. In practice, this means that a call to the methods of this interface will block until no other thread of your application is calling any other method on that instance of the interface.

Methods in Vtable Order

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

In addition, IDsObjectPicker defines the following methods.

Method Description
Initialize Initializes the interface with data about the scopes, filters, and options used by the dialog box.
InvokeDialog Displays the dialog box and returns the user's selections.

Remarks

It is acceptable to create and initialize a single instance of the IDsObjectPicker interface and then make multiple calls to InvokeDialog without having to reinitializing the interface.

Requirements

Client: Included in Windows XP and Windows 2000 Professional.
Server: Included in Windows Server 2003 and Windows 2000 Server.
Header: Declared in Objsel.h.

See Also

CoCreateInstance, Directory Object Picker