다음을 통해 공유


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 Microsoft.VisualStudio.Shell.Interop.dll)

Syntax

‘선언
Function QueryClose ( _
    <OutAttribute> ByRef pfCanClose As Integer _
) As Integer
‘사용 방법
Dim instance As IVsPackage
Dim pfCanClose As Integer
Dim returnValue As Integer

returnValue = instance.QueryClose(pfCanClose)
int QueryClose(
    out int pfCanClose
)
int QueryClose(
    [OutAttribute] int% pfCanClose
)
function QueryClose(
    pfCanClose : int
) : int

Parameters

  • pfCanClose
    Type: System.Int32%

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

Return Value

Type: System.Int32

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

Remarks

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

This method is called by the IDE only during manual shutdowns. Automated shutdowns, such as when installing critical updates, call the get_CanClose method instead.

COM Signature

From vsshell.idl:

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

Permissions

See Also

Reference

IVsPackage Interface

IVsPackage Members

Microsoft.VisualStudio.Shell.Interop Namespace