Partager via


IVsSolution3.CheckForAndSaveDeferredSaveSolution Method

Definition

Checks if the solution is in the deferred-save state.

public:
 int CheckForAndSaveDeferredSaveSolution(int fCloseSolution, System::String ^ pszMessage, System::String ^ pszTitle, System::UInt32 grfFlags);
public:
 int CheckForAndSaveDeferredSaveSolution(int fCloseSolution, Platform::String ^ pszMessage, Platform::String ^ pszTitle, unsigned int grfFlags);
int CheckForAndSaveDeferredSaveSolution(int fCloseSolution, std::wstring const & pszMessage, std::wstring const & pszTitle, unsigned int grfFlags);
public int CheckForAndSaveDeferredSaveSolution (int fCloseSolution, string pszMessage, string pszTitle, uint grfFlags);
abstract member CheckForAndSaveDeferredSaveSolution : int * string * string * uint32 -> int
Public Function CheckForAndSaveDeferredSaveSolution (fCloseSolution As Integer, pszMessage As String, pszTitle As String, grfFlags As UInteger) As Integer

Parameters

fCloseSolution
Int32

[in] Boolean value; specifies whether to close the solution after it is saved.

pszMessage
String

[in] A string specifying the text displayed when the user is prompted to save or discard changes.

pszTitle
String

[in] A string specifying the title of the dialog box prompting the user to save or discard changes.

grfFlags
UInt32

[in] A __VSSAVEDEFERREDSAVEFLAGS value specifying save options.

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

This method checks if the solution is in the deferred-save state, and if it is, it will prompt with a MessageBox-like dialog for confirmation then a Save dialog will appear. If fCloseSolution is set to TRUE, the solution will be closed after it is saved and the user will be given the option of discarding changes. If fCloseSolution is set to FALSE, the solution will not be closed after it is saved.

The title and message of the prompt dialog are set similarly as for a MessageBox. The buttons on the prompt dialog are Save, Discard and Cancel. If fCloseSolution is FALSE, Discard will not appear. The default button is always Save.

COM Signature

From vsshell80.idl:

HRESULT IVsSolution3::CheckForAndSaveDeferredSaveSolution(  
   [in] BOOL fCloseSolution,   
   [in] LPCOLESTR pszMessage,   
   [in] LPCOLESTR pszTitle,   
   [in] VSSAVEDEFERREDSAVEFLAGS grfFlags  
);  

Applies to