IDsObjectPicker interface

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.

C++
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

The IDsObjectPicker interface has these methods.

Method Description
IDsObjectPicker::Initialize The IDsObjectPicker::Initialize method initializes the object picker dialog box with data about the scopes, filters, and options used by the object picker dialog box.
IDsObjectPicker::InvokeDialog Displays a modal object picker dialog box and returns the user 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

   
Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
Target Platform Windows
Header objsel.h

See Also

CoCreateInstance

Directory Object Picker