This documentation is archived and is not being maintained.

IVsPackage.QueryClose Method

Enables a VSPackage that requires user intervention to abort the shutdown process.

Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in

int QueryClose (
	out int pfCanClose
int QueryClose (
	/** @attribute OutAttribute() */ /** @ref */ int pfCanClose
JScript does not support passing value-type arguments by reference.



[out] Flag indicating whether the VSPackage can close. Is set to true if the VSPackage can close.

Return Value

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

COM Signature

From vsshell.idl:

HRESULT IVsPackage::QueryClose(
   [out] BOOL *pfCanClose

true if the VSPackage can close. If false, the environment can then cancel the exit procedure.