IWebApplicationCtxSvc.GetItemContext Method
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)
Syntax
'宣言
Function GetItemContext ( _
pHier As IVsHierarchy, _
itemid As UInteger, _
<OutAttribute> ByRef ppServiceProvider As IServiceProvider _
) As Integer
'使用
Dim instance As IWebApplicationCtxSvc
Dim pHier As IVsHierarchy
Dim itemid As UInteger
Dim ppServiceProvider As IServiceProvider
Dim returnValue As Integer
returnValue = instance.GetItemContext(pHier, _
itemid, ppServiceProvider)
int GetItemContext(
IVsHierarchy pHier,
uint itemid,
out IServiceProvider ppServiceProvider
)
int GetItemContext(
[InAttribute] IVsHierarchy^ pHier,
[InAttribute] unsigned int itemid,
[OutAttribute] IServiceProvider^% ppServiceProvider
)
function GetItemContext(
pHier : IVsHierarchy,
itemid : uint,
ppServiceProvider : IServiceProvider
) : int
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.
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.