Directory Services


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.

IDsObjectPicker *pDsObjectPicker = NULL;
hr = CoCreateInstance(CLSID_DsObjectPicker,
			 (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.


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.


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