IFileSaveDialog::GetFileName Method

Retrieves the text currently entered in the dialog's File name edit box.

Syntax

HRESULT GetFileName(      
    WCHAR **pszName
);

Parameters

  • pszName
    [out] The address of a pointer to a buffer that, when this method returns successfully, receives the text.

Return Value

Returns S_OK if successful, or an error value otherwise.

Remarks

The text in the File name edit box does not necessarily reflect the item the user chose. To get the item the user chose, use IFileDialog::GetResult.

The calling application is responsible for releasing the retrieved buffer by using the CoTaskMemFree function.