3.1.4.12.3 IWbemRefreshingServices::AddEnumToRefresher (Opnum 5)
The IWbemRefreshingServices::AddEnumToRefresher method MUST add all CIM instances that are identified by the CIM class name to the list of CIM instances to be refreshed.
-
HRESULT AddEnumToRefresher( [in] _WBEM_REFRESHER_ID* pRefresherId, [in, string] LPCWSTR wszClass, [in] long lFlags, [in] IWbemContext* pContext, [in] DWORD dwClientRefrVersion, [out] _WBEM_REFRESH_INFO* pInfo, [out] DWORD* pdwSvrRefrVersion );
pRefresherId: MUST be a pointer to the _WBEM_REFRESHER_ID structure, as specified in section 2.2.21, which identifies the client that is requesting refreshing services. This parameter MUST NOT be NULL.
wszClass: MUST be a string that MUST contain the enumeration CIM class name. This parameter MUST NOT be NULL.
lFlags: This parameter is not used, and its value SHOULD be 0x0.
pContext: MUST be a pointer to an IWbemContext interface object, which MUST contain additional information for the server refresher. If pContext is NULL, the parameter is ignored.
dwClientRefrVersion: MUST be the version of the client refresher. This value SHOULD<66> be 0x2. The server MUST allow all client versions.
pInfo: MUST be an output parameter that returns a _WBEM_REFRESH_INFO structure, as specified in section 2.2.20, which MUST contain refresher information about the CIM instance in wszPath. This parameter MUST NOT be NULL.
pdwSvrRefrVersion: MUST be an output parameter, which MUST be the version of the server refresher. The value of this parameter SHOULD be 0x1.
Return Values: This method MUST return an HRESULT value that MUST indicate the status of the method call. The server MUST return WBEM_S_NO_ERROR (specified in section 2.2.11) to indicate the successful completion of the method.
-
WBEM_S_NO_ERROR (0x00)
The security principal that makes the call MUST have WBEM_REMOTE_ENABLE and WBEM_ENABLE accesses to the namespace; otherwise, WBEM_E_ACCESS_DENIED MUST be returned.
In response to IWbemRefreshingServices::AddEnumToRefresher, the server MUST evaluate the wszClass parameter, and it MUST return information to the client so that the server knows how to handle the specific class as specified in this section.
This method MUST add all instances of a class, instead of a single instance of a class, as is the case for the IWbemRefreshingServices::AddObjectToRefresher and IWbemRefreshingServices::AddObjectToRefresherByTemplate methods.
A successful call to IWbemRefreshingServices::AddEnumToRefresher MUST return WBEM_S_NO_ERROR and MUST fill the output _WBEM_REFRESH_INFO structure as specified in section 2.2.20.
The server MUST locate the InstanceProviderId for the class in wszPath using the algorithm in section 3.1.4. If InstanceProviderId is not empty and the provider's SupportsRefresher field is TRUE, the server MUST return the _WBEM_REFRESH_INFO structure that has an m_lType that is set to _WBEM_REFRESH_INFO_REMOTE, otherwise returning one with m_lType set to _WBEM_REFRESH_TYPE_NON_HIPERF.
If the server sets m_lType to _WBEM_REFRESH_INFO_REMOTE, the server MUST return an IWbemRemoteRefresher interface pointer in _WBEM_REFRESH_INFO_REMOTE that is part of _WBEM_REFRESH_INFO.
If the server sets m_lType to _WBEM_REFRESH_TYPE_NON_HIPERF, the server MUST return the _WBEM_REFRESH_TYPE_NON_HIPERF structure as part of _WBEM_REFRESH_INFO.
In case of failure, the server MUST fill in the _WBEM_REFRESH_INFO structure with 0x0, set m_lType to WBEM_REFRESH_TYPE_INVALID, and return an error in the format that is specified in section 2.2.11.