3.1.4.21.5 GetRunningContainers (Opnum 7)

This method is called by a client to get a list of instance containers for a conglomeration, or to get a list of all running instance containers.

 HRESULT GetRunningContainers(
   [in] GUID* PartitionId,
   [in] GUID* ConglomerationId,
   [out] DWORD* pdwNumContainers,
   [out, size_is(,*pdwNumContainers)] 
     InstanceContainer** ppContainers
 );

PartitionId: The partition identifier of a partition.

ConglomerationId: The conglomeration identifier of a conglomeration, or GUID_NULL for all instance containers.

pdwNumContainers: A pointer to a variable that, upon successful completion, MUST be set to the number of elements in ppContainers.

ppContainers: An array of InstanceContainer (section 2.2.9) structures, each of which represents an instance container for the conglomeration specified in ConglomerationId.

Return Values: This method MUST return S_OK (0x00000000) on success, and a failure result, as specified in [MS-ERREF] section 2.1, on failure. All failure results MUST be treated identically.

Upon receiving a call to this method, the server MUST attempt to select instance containers as follows:

  • If ConglomerationId is GUID_NULL, the server MUST attempt to select all instance containers, and fail if it cannot.

  • If ConglomerationId is not GUID_NULL, the server MAY verify that there exists a conglomeration with the conglomeration identifier specified in ConglomerationId in the partition identified by PartitionId, and fail the call if not.

  • If ConglomerationId is not GUID_NULL, the server MUST attempt to select all instance containers for the conglomeration identifier specified in ConglomerationId, and fail the call if it cannot.

If no such instance containers exist, the server SHOULD set the value referenced by pdwNum to 0 and the value referenced by ppContainers to NULL, and return S_OK (0x00000000). In particular, the server MUST NOT fail the call because there are no such instance containers.

Otherwise, the server MUST attempt to construct an array of InstanceContainer (section 2.2.9) structures for the instance containers, and fail the call if it cannot.

The server then MUST set the value referenced by pdwNum to the number of instance containers, and the value referenced by ppContainers to the constructed InstanceContainer structures.