Delen via


ModelingEditorFactory.OnQueryCloseProject Method

Queries listening clients as to whether the project can be closed.

Namespace:  Microsoft.VisualStudio.Modeling.Shell
Assembly:  Microsoft.VisualStudio.Modeling.Sdk.Shell.12.0 (in Microsoft.VisualStudio.Modeling.Sdk.Shell.12.0.dll)

Syntax

'Declaration
Public Function OnQueryCloseProject ( _
    pHierarchy As IVsHierarchy, _
    fRemoving As Integer, _
    ByRef pfCancel As Integer _
) As Integer
public int OnQueryCloseProject(
    IVsHierarchy pHierarchy,
    int fRemoving,
    ref int pfCancel
)
public:
virtual int OnQueryCloseProject(
    IVsHierarchy^ pHierarchy, 
    int fRemoving, 
    int% pfCancel
) sealed
abstract OnQueryCloseProject : 
        pHierarchy:IVsHierarchy * 
        fRemoving:int * 
        pfCancel:int byref -> int  
override OnQueryCloseProject : 
        pHierarchy:IVsHierarchy * 
        fRemoving:int * 
        pfCancel:int byref -> int
public final function OnQueryCloseProject(
    pHierarchy : IVsHierarchy, 
    fRemoving : int, 
    pfCancel : int
) : int

Parameters

  • fRemoving
    Type: System.Int32

    true to query clients if the project is being removed from the modeling editor before the modeling editor is closed; otherwise, false.

  • pfCancel
    Type: System.Int32%

    true to query clients if a client prevented the project from closing; otherwise, false.

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Implements

IVsSolutionEvents.OnQueryCloseProject(IVsHierarchy, Int32, Int32%)

.NET Framework Security

See Also

Reference

ModelingEditorFactory Class

Microsoft.VisualStudio.Modeling.Shell Namespace

IVsEditorFactory