次の方法で共有


IWebApplicationCtxSvc.GetItemContext Method

Definition

Retrieve the IServiceProvider interface for a file.

public:
 int GetItemContext(Microsoft::VisualStudio::Shell::Interop::IVsHierarchy ^ pHier, System::UInt32 itemid, [Runtime::InteropServices::Out] Microsoft::VisualStudio::OLE::Interop::IServiceProvider ^ % ppServiceProvider);
public:
 int GetItemContext(Microsoft::VisualStudio::Shell::Interop::IVsHierarchy ^ pHier, unsigned int itemid, [Runtime::InteropServices::Out] Microsoft::VisualStudio::OLE::Interop::IServiceProvider ^ &  ppServiceProvider);
int GetItemContext(Microsoft::VisualStudio::Shell::Interop::IVsHierarchy const & pHier, unsigned int itemid, [Runtime::InteropServices::Out] Microsoft::VisualStudio::OLE::Interop::IServiceProvider const & & ppServiceProvider);
public int GetItemContext (Microsoft.VisualStudio.Shell.Interop.IVsHierarchy pHier, uint itemid, out Microsoft.VisualStudio.OLE.Interop.IServiceProvider ppServiceProvider);
abstract member GetItemContext : Microsoft.VisualStudio.Shell.Interop.IVsHierarchy * uint32 * IServiceProvider -> int
Public Function GetItemContext (pHier As IVsHierarchy, itemid As UInteger, ByRef ppServiceProvider As IServiceProvider) As Integer

Parameters

pHier
IVsHierarchy

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

itemid
UInt32

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

ppServiceProvider
IServiceProvider

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

Returns

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

Applies to