Platform SDK: Exchange Server

IExchExtCallback::ChooseFolder

Displays a dialog box that enables users to choose a specific message store and folder.

Quick Info

See IExchExtCallback : IUnknown.

HRESULT ChooseFolder(
  LPEXCHEXTCHOOSEFOLDER peecf  
);
 

Parameters

peecf
[in] Pointer to a structure that describes the Choose Folder dialog box. The structure also includes output members that provide information about the selections made by the user when the user chooses the OK button. The structure has the following members:
UINT cbLength
Input member indicating the size of the structure.
HWND hwnd
Input member indicating the parent window of the Choose Folder dialog box.
LPTSTR szCaption
Input member indicating the caption that is displayed in the dialog box’s title bar.
LPTSTR szLabel
Input member indicating a label that is displayed at the top of the list box of folders.
LPTSTR szHelpFile
Input member specifying which Help file should be launched when the user chooses the Help button.
ULONG ulHelpID
Input member indicating the topic that should be referenced in the Help file.
HINSTANCE hinst
Input member indicating the instance handle containing the resource of a custom dialog box. Set this value only if you want to supply your own dialog box template.
UINT uiDlgID
Input member indicating the resource identifier of the instance of the custom dialog box template. Set this value only if you set the hinst parameter.
LPEECFHOOKPROC lpeecfhp
Input member indicating a hook proc pointer. Set this value only if you want to do special processing of messages within the dialog box.
DWORD dwHookData
Input member used to cache additional information about events that occur while the dialog box is displayed. Use this member if you are providing a hook process for handling dialog box messages.
ULONG ulFlags
Input member containing a bitmask of flags. The following flags can be set:
    EECBCF_GETNAME The name of the folder selected by the user is returned. This name must be freed using the MAPIFreeBuffer function.
    EECBCF_HIDENEW Hides the New button on the Choose Folder dialog box. This button enables users to create a new folder.
    EECBCF_PREVENTROOT Disables the OK button when the root is the currently selected folder. In most cases, this flag should be specified because the root folder is not a valid container of messages.

LPMDB pmdb
Output member that is an interface pointer to the message store object selected in the Choose Folder dialog box.
LPMAPIFOLDER pfld
Output member that is an interface pointer to the folder object selected in the Choose Folder dialog box.
LPTSTR szName
Output member indicating the name of the folder the user selected. This value enables you to get the name of the folder without using a MAPI GetProps method. This value is only provided if the EECBCF_GETNAME flag is set.
DWORD dwReserved1 - dwReserved3
These three members are reserved for future use and should be set to NULL by extensions.

Return Values

S_OK
No errors occurred.

Remarks

Extension objects call the IExchExtCallback::ChooseFolder method to enable users to select a specific message store or folder. For example, if your application provides a backup command, you might want to prompt the user to specify which folder in which message store should be backed up.