Compartir a través de


ISelectionContainer.CountObjects(UInt32, UInt32) Method

Definition

Returns either a count of the total number of objects available or a count of the objects in the current selection.

public:
 int CountObjects(System::UInt32 dwFlags, [Runtime::InteropServices::Out] System::UInt32 % pc);
int CountObjects(unsigned int dwFlags, [Runtime::InteropServices::Out] unsigned int & pc);
public int CountObjects (uint dwFlags, out uint pc);
abstract member CountObjects : uint32 * uint32 -> int
Public Function CountObjects (dwFlags As UInteger, ByRef pc As UInteger) As Integer

Parameters

dwFlags
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
UInt32

[out] Pointer to the requested object count.

Returns

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.

Applies to