Udostępnij za pośrednictwem


IVsSolutionEvents.OnQueryCloseProject(IVsHierarchy, Int32, Int32) Method

Definition

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

public:
 int OnQueryCloseProject(Microsoft::VisualStudio::Shell::Interop::IVsHierarchy ^ pHierarchy, int fRemoving, [Runtime::InteropServices::Out] int % pfCancel);
int OnQueryCloseProject(Microsoft::VisualStudio::Shell::Interop::IVsHierarchy const & pHierarchy, int fRemoving, [Runtime::InteropServices::Out] int & pfCancel);
public int OnQueryCloseProject (Microsoft.VisualStudio.Shell.Interop.IVsHierarchy pHierarchy, int fRemoving, out int pfCancel);
abstract member OnQueryCloseProject : Microsoft.VisualStudio.Shell.Interop.IVsHierarchy * int * int -> int
Public Function OnQueryCloseProject (pHierarchy As IVsHierarchy, fRemoving As Integer, ByRef pfCancel As Integer) As Integer

Parameters

pHierarchy
IVsHierarchy

[in] Pointer to the IVsHierarchy interface of the project to be closed.

fRemoving
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
Int32

[out] true if the client vetoed the closing of the project. false if the client approved the closing of the project.

Returns

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

Remarks

COM Signature

From vsshell.idl:

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

Applies to