ICOMAdminCatalog::GetCollectionByQuery method (comadmin.h)
Retrieves a collection on the COM+ catalog given the key property values for all of its parent items.
Syntax
HRESULT GetCollectionByQuery(
[in] BSTR bstrCollName,
[in] SAFEARRAY **ppsaVarQuery,
[out, retval] IDispatch **ppCatalogCollection
);
Parameters
[in] bstrCollName
The name of the collection to be retrieved.
[in] ppsaVarQuery
A reference to an array consisting of key property values for all parent items of the collection to be retrieved.
[out, retval] ppCatalogCollection
The ICatalogCollection interface for the collection.
Return value
This method can return the standard return values E_INVALIDARG, E_OUTOFMEMORY, E_UNEXPECTED, E_FAIL, and S_OK.
Remarks
The ICatalogObject::Key property value for an item is a GUID that serves to uniquely identify it in the COM+ catalog.
The GetCollectionByQuery method retrieves any collection on the catalog, given the key values for all of its parent items. However, with the ErrorInfo, PropertyInfo, and RelatedCollectionInfo collections, this method behaves differently. If you specify any of these collections, GetCollectionByQuery always returns that named collection immediately relative to the Root collection.
To get the ErrorInfo, PropertyInfo, or RelatedCollectionInfo collection that is relative to an arbitrary collection in the catalog and not relative to the Root collection, use the GetCollection method from the parent collection.
For a complete list of available collections, see COM+ Administration Collections.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | comadmin.h |