IFileSaveDialog::Close Method

Closes the dialog.

Syntax

HRESULT Close(      
    HRESULT hr
);

Parameters

  • hr
    [in] The code that will be returned by IFileDialog::Show to indicate that the dialog was closed before a selection was made.

Return Value

Returns S_OK if successful, or an error value otherwise.

Remarks

An application can call this method from a callback method or function while the dialog is open. The dialog will close and the IFileDialog::Show method will return with the HRESULT specified in hr.

If this method is called, there is no result available for the IFileDialog::GetResult or IFileOpenDialog::GetResults methods, and they will fail if called.