ISelectionContainer::CountObjects Method (UInt32, UInt32)

 

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)

int CountObjects(
	unsigned int dwFlags,
	[OutAttribute] unsigned int% pc
)

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.

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.

Return to top
Show: