Compartir a través de


IVsSolutionEvents3.OnQueryCloseProject Method (IVsHierarchy, Int32, Int32%)

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

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

Syntax

'Declaración
Function OnQueryCloseProject ( _
    pHierarchy As IVsHierarchy, _
    fRemoving As Integer, _
    <OutAttribute> ByRef pfCancel As Integer _
) As Integer
'Uso
Dim instance As IVsSolutionEvents3
Dim pHierarchy As IVsHierarchy
Dim fRemoving As Integer
Dim pfCancel As Integer
Dim returnValue As Integer

returnValue = instance.OnQueryCloseProject(pHierarchy, _
    fRemoving, pfCancel)
int OnQueryCloseProject(
    IVsHierarchy pHierarchy,
    int fRemoving,
    out int pfCancel
)
int OnQueryCloseProject(
    [InAttribute] IVsHierarchy^ pHierarchy, 
    [InAttribute] int fRemoving, 
    [InAttribute] [OutAttribute] int% pfCancel
)
abstract OnQueryCloseProject : 
        pHierarchy:IVsHierarchy * 
        fRemoving:int * 
        pfCancel:int byref -> int 
function OnQueryCloseProject(
    pHierarchy : IVsHierarchy, 
    fRemoving : int, 
    pfCancel : int
) : int

Parameters

  • fRemoving
    Type: System.Int32
    [in] true if the project is being removed from the solution before the solution is closed. false if the project is being removed from the solution while the solution is being closed.
  • pfCancel
    Type: System.Int32%
    [out] true if the client vetoed the closing of the project. false if the client approved the closing of the project.

Return Value

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

Implements

IVsSolutionEvents2.OnQueryCloseProject(IVsHierarchy, Int32, Int32%)

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsSolutionEvents3::OnQueryCloseProject(
   [in] IVsHierarchy *pHierarchy,
   [in] BOOL fRemoving,
   [in,out] BOOL *pfCancel
);

.NET Framework Security

See Also

Reference

IVsSolutionEvents3 Interface

IVsSolutionEvents3 Members

OnQueryCloseProject Overload

Microsoft.VisualStudio.Shell.Interop Namespace