IVsSimpleObjectList2.CountSourceItems Method
Returns the hierarchy and the number of ItemIDs corresponding to source files for the given list item.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop.8.0 (in Microsoft.VisualStudio.Shell.Interop.8.0.dll)
Syntax
'Declaration
Function CountSourceItems ( _
index As UInteger, _
<OutAttribute> ByRef ppHier As IVsHierarchy, _
<OutAttribute> ByRef pItemid As UInteger, _
<OutAttribute> ByRef pcItems As UInteger _
) As Integer
int CountSourceItems(
uint index,
out IVsHierarchy ppHier,
out uint pItemid,
out uint pcItems
)
int CountSourceItems(
[InAttribute] unsigned int index,
[OutAttribute] IVsHierarchy^% ppHier,
[OutAttribute] unsigned int% pItemid,
[OutAttribute] unsigned int% pcItems
)
abstract CountSourceItems :
index:uint32 *
ppHier:IVsHierarchy byref *
pItemid:uint32 byref *
pcItems:uint32 byref -> int
function CountSourceItems(
index : uint,
ppHier : IVsHierarchy,
pItemid : uint,
pcItems : uint
) : int
Parameters
index
Type: UInt32[in] Specifies the index of the list item of interest.
ppHier
Type: Microsoft.VisualStudio.Shell.Interop.IVsHierarchy%[out] Pointer to an IVsHierarchy interface.
pItemid
Type: UInt32%[out] Specifies the itemid of an item within the hierarchy. Values are described in VSITEMID.
pcItems
Type: UInt32%[out] Pointer to the count of items.
Return Value
Type: Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.
Remarks
COM Signature
From vsshell80.idl:
HRESULT IVsSimpleObjectList2::CountSourceItems(
[in] ULONG Index,
[out] IVsHierarchy **ppHier,
[out] VSITEMID *pitemid,
[out, retval] ULONG *pcItems
);
Return the count of items (these must be from a single hierarchy) that make up the source files for the list element at index. Also return a pointer to the hierarchy in ppHier and pitemid if requested. If there is more than 1 item, return VSITEMID_SELECTION and a subsequent call is made on GetMultipleSourceItems to get them. If there are no available source items, return VSITEMID_ROOT to indicate the root of the hierarchy as a whole.
This method applies to class view only, and must be implemented. This enables class view to act as an alternate hierarchy so that all your project level commands continue to work.
.NET Framework Security
- 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.