Package.QueryClose Method
Called to ask the package if the shell can be closed.
Namespace: Microsoft.VisualStudio.Shell
Assemblies: Microsoft.VisualStudio.Shell.9.0 (in Microsoft.VisualStudio.Shell.9.0.dll)
Microsoft.VisualStudio.Shell (in Microsoft.VisualStudio.Shell.dll)
Microsoft.VisualStudio.Shell.10.0 (in Microsoft.VisualStudio.Shell.10.0.dll)
Syntax
'Declaration
Protected Overridable Function QueryClose ( _
<OutAttribute> ByRef canClose As Boolean _
) As Integer
'Usage
Dim canClose As Boolean
Dim returnValue As Integer
returnValue = Me.QueryClose(canClose)
protected virtual int QueryClose(
out bool canClose
)
protected:
virtual int QueryClose(
[OutAttribute] bool% canClose
)
abstract QueryClose :
canClose:bool byref -> int
override QueryClose :
canClose:bool byref -> int
protected function QueryClose(
canClose : boolean
) : int
Parameters
- canClose
Type: System.Boolean%
[out] Returns true if the shell can be closed, otherwise false.
Return Value
Type: System.Int32
S_OK if the method succeeded, otherwise an error code.
Remarks
By default this method returns canClose as true and S_OK.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.