ISelectionContainer::CountObjects Method (UInt32, UInt32)
Visual Studio 2015
Returns either a count of the total number of objects available or a count of the objects in the current selection.
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
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::Int32If the method succeeds, it returns S_OK. If it fails, it returns an error code.
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.
Show: