ISelectionContainer.CountObjects Method
Returns either a count of the total number of objects available or a count of the objects in the current selection.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
Syntax
'Déclaration
Function CountObjects ( _
dwFlags As UInteger, _
<OutAttribute> ByRef pc As UInteger _
) As Integer
'Utilisation
Dim instance As ISelectionContainer
Dim dwFlags As UInteger
Dim pc As UInteger
Dim returnValue As Integer
returnValue = instance.CountObjects(dwFlags, _
pc)
int CountObjects(
uint dwFlags,
out uint pc
)
int CountObjects(
[InAttribute] unsigned int dwFlags,
[OutAttribute] unsigned int% pc
)
abstract CountObjects :
dwFlags:uint32 *
pc:uint32 byref -> int
function CountObjects(
dwFlags : uint,
pc : uint
) : int
Parameters
- dwFlags
Type: System.UInt32
[in] Flag that specifies which type of count to return. If set to GETOBJS_ALL, CountObjects returns the total number of objects. If set to GETOBJS_SELECTED, CountObjects returns the number of selected objects.
- pc
Type: System.UInt32%
[out] Pointer to the requested object count.
Return Value
Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.
Remarks
COM Signature
From designer.idl:
HRESULT ISelectionContainer::CountObjects(
[in] DWORD dwFlags,
[out] ULONG * pc
);
Many windows support only single item selection; they do not allow multiple items to be selected at any one time. Single selection windows always return one for their object count regardless of how dwFlags is set.
.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.