IWebApplicationCtxSvc.GetItemContext Method (IVsHierarchy, UInt32, IServiceProvider)

 

Retrieve the IServiceProvider interface for a file.

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

int GetItemContext(
	IVsHierarchy pHier,
	uint itemid,
	out IServiceProvider ppServiceProvider
)

Parameters

pHier
Type: Microsoft.VisualStudio.Shell.Interop.IVsHierarchy

[in] Pointer to the IVsHierarchy interface for the item.

itemid
Type: System.UInt32

[in] Integer. The identifier (VSITEMID) for the item.

ppServiceProvider
Type: Microsoft.VisualStudio.OLE.Interop.IServiceProvider

[out] Pointer to an IServiceProvider interface for the item's file.

Return Value

Type: System.Int32

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

Return to top
Show: