Export (0) Print
Expand All

IVsSolutionEvents.OnQueryCloseProject Method

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)

int OnQueryCloseProject (
	[InAttribute] IVsHierarchy pHierarchy,
	[InAttribute] int fRemoving,
	[InAttribute] out int pfCancel
int OnQueryCloseProject (
	/** @attribute InAttribute() */ IVsHierarchy pHierarchy, 
	/** @attribute InAttribute() */ int fRemoving, 
	/** @attribute InAttribute() */ /** @attribute OutAttribute() */ /** @ref */ int pfCancel
JScript does not support passing value-type arguments by reference.



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


[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.


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

Return Value

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

COM Signature

From vsshell.idl:

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

Community Additions

© 2015 Microsoft