Directory Services

IDsObjectPicker::InvokeDialog

The IDsObjectPicker::InvokeDialog method displays a modal object picker dialog box and returns the user selections.

HRESULT InvokeDialog( 
  HWND hwndParent,
  IDataObject** ppdoSelections
);

Parameters

hwndParent
Handle to the owner window of the dialog box. This parameter cannot be NULL or the result of the GetDesktopWindow function.
ppdoSelections
Pointer to an IDataObject interface pointer that receives a data object that contains data about the user selections. This data is supplied in the CFSTR_DSOP_DS_SELECTION_LIST data format. This parameter receives NULL if the user cancels the dialog box.

Return Values

Returns a standard error code or one of the following values.
S_OK
The method succeeded.
S_FALSE
The user cancelled the dialog box. ppdoSelections receives NULL.
E_UNEXPECTED
The IDsObjectPicker object has not been initialized.

Remarks

Before IDsObjectPicker::InvokeDialog is called, the IDsObjectPicker object must be initialized by calling IDsObjectPicker::Initialize. After the IDsObjectPicker object is initialized, InvokeDialog can be called multiple times without 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

CFSTR_DSOP_DS_SELECTION_LIST, IDataObject, IDsObjectPicker, DS_SELECTION, DS_SELECTION_LIST, Directory Object Picker