IFileSaveDialog::GetResult Method

Gets the choice that the user made in the dialog.

Syntax

HRESULT GetResult(      
    IShellItem **ppsi
);

Parameters

  • ppsi
    [out] The address of a pointer to an IShellItem that represents the user's choice.

Return Value

Returns S_OK if successful, or an error value otherwise.

Remarks

IFileSaveDialog::GetResult can be called after the dialog has closed or during the handling of an IFileDialogEvents::OnFileOk event. Calling this method at any other time will fail. If multiple items were chosen, this method will fail. In the case of multiple items, call IFileOpenDialog::GetResults

IFileDialog::Show must return a success code for a result to be available to IFileSaveDialog::GetResult.

See Also

IFileDialog::GetCurrentSelection