Compartir a través de


DocumentProperties.CountObjects(UInt32, UInt32) Method

Definition

Returns the number of objects managed by this DocumentProperties object.

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

Parameters

flags
UInt32

[in] This is either GETOBJS_ALL to count all objects, or GETOBJS_SELECTED to count only the selected objects.

pc
UInt32

[out] Returns the number of objects.

Returns

If successful, returns S_OK; otherwise, returns an error code.

Implements

Remarks

This method is used to handle multiple selectable objects in the Properties window. A language service typically needs only the one DocumentProperties object and the base method handles this automatically.

This method is an implementation of the CountObjects method on the ISelectionContainer interface.

The base method returns a count of 1 if the DocumentProperties object is visible; otherwise, the base method returns 0. The base method always returns a success code of S_OK.

Applies to