This documentation is archived and is not being maintained.

IVsSolutionEvents.OnQueryUnloadProject Method

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

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

int OnQueryUnloadProject(
	IVsHierarchy pRealHierarchy,
	out int pfCancel


Type: Microsoft.VisualStudio.Shell.Interop.IVsHierarchy

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

Type: System.Int32%

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

Return Value

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

COM Signature

From vsshell.idl:

HRESULT IVsSolutionEvents::OnQueryUnloadProject(
   [in] IVsHierarchy *pRealHierarchy,
   [in,out] BOOL *pfCancel