Bewerken

Delen via


SWbemObject.Subclasses_ method

The Subclasses_ method of the SWbemObject object returns an SWbemObjectSet object. This object is a collection of subclasses of the current object, which must be a class. Items in the returned collection can be obtained using standard collection methods. For more information, see Accessing a Collection.

For an explanation of this syntax, see Document Conventions for the Scripting API.

Syntax

objWbemObjectSet = .Subclasses_( _
  [ ByVal iFlags ], _
  [ ByVal objwbemNamedValueSet ] _
)

Parameters

iFlags [in, optional]

Integer that determines how detailed the call enumerates. This parameter can accept the following values.

wbemQueryFlagDeep (0 (0x0))

Forces recursive enumeration into all subclasses derived from the specified parent class. The parent class itself is not returned in the enumeration.

wbemQueryFlagShallow (1 (0x1))

Default value for this parameter. It forces the enumeration to include only immediate subclasses of the specified parent class.

WbemFlagReturnImmediately (16 (0x10))

Causes the call to return immediately

wbemFlagReturnWhenComplete (0 (0x0))

Causes this call to block until the call has completed.

wbemFlagUseAmendedQualifiers (131072 (0x20000))

Causes WMI to return class amendment data along with the base class definition.

objwbemNamedValueSet [in, optional]

Typically, this is undefined. Otherwise, this is an SWbemNamedValueSet object whose elements represent the context information that can be used by the provider that is servicing the request. A provider that supports or requires such information must document the recognized value names, data type of the value, allowed values, and semantics.

Return value

If the call is successful, an SWbemObjectSet object is returned.

Error codes

After the completion of the Subclasses_ method, the Err object may contain one of the error codes in the following list.

wbemErrAccessDenied - 2147749891 (0x80041003)

Current user does not have permission to view one or more of the classes returned by the call.

wbemErrFailed - 2147749889 (0x80041001)

Unspecified error.

wbemErrInvalidClass - 2147749904 (0x80041010)

Specified class did not exist.

wbemErrInvalidParameter - 2147749896 (0x80041008)

Invalid parameter was specified.

wbemErrOutOfMemory - 2147749894 (0x80041006)

Not enough memory to complete the operation.

Remarks

It is not an error for the returned collection to have zero elements if there are no subclasses of the current object. The Subclasses_ method only works for class objects.

Requirements

Requirement Value
Minimum supported client
Windows Vista
Minimum supported server
Windows Server 2008
Header
Wbemdisp.h
Type library
Wbemdisp.tlb
DLL
Wbemdisp.dll
CLSID
CLSID_SWbemObject
IID
IID_ISWbemObject

See also

SWbemObject

SWbemObjectSet