IVsWindowFrameNotify2.OnClose Method

Notifies the VSPackage that a window frame is closing and tells the environment what action to take.

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

Syntax

'宣言
Function OnClose ( _
    <OutAttribute> ByRef pgrfSaveOptions As UInteger _
) As Integer
'使用
Dim instance As IVsWindowFrameNotify2
Dim pgrfSaveOptions As UInteger
Dim returnValue As Integer

returnValue = instance.OnClose(pgrfSaveOptions)
int OnClose(
    out uint pgrfSaveOptions
)
int OnClose(
    [InAttribute] [OutAttribute] unsigned int% pgrfSaveOptions
)
function OnClose(
    pgrfSaveOptions : uint
) : int

Parameters

  • pgrfSaveOptions
    Type: System.UInt32%

    [in, out] Specifies options for saving window content. Values are taken from the __FRAMECLOSE enumeration.

Return Value

Type: System.Int32

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

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsWindowFrameNotify2::OnClose(
   [in, out] FRAMECLOSE *pgrfSaveOptions
);

Implementers should develop code to notify users and prompt for save and close and relay those decisions to the environment through IVsWindowFrameNotify2.

Permissions

See Also

Reference

IVsWindowFrameNotify2 Interface

IVsWindowFrameNotify2 Members

Microsoft.VisualStudio.Shell.Interop Namespace