3.1.4.12.1 IWbemRefreshingServices::AddObjectToRefresher (Opnum 3)

The IWbemRefreshingServices::AddObjectToRefresher method MUST add a CIM instance, which is identified by its CIM path, to the list of CIM instances that can be refreshed.

 HRESULT AddObjectToRefresher(
   [in] _WBEM_REFRESHER_ID* pRefresherId,
   [in, string] LPCWSTR wszPath,
   [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.

wszPath: MUST be a string that MUST contain the CIM path of the CIM instance. 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 MUST be ignored.

dwClientRefrVersion: MUST be the version of the client refresher. This value SHOULD<64> be 0x2. The server MUST allow all client versions.

pInfo: MUST be an output parameter that MUST return a _WBEM_REFRESH_INFO structure, as specified in section 2.2.20, which MUST contain refresher information about the CIM instance in wszPath. It MUST NOT be NULL.

pdwSvrRefrVersion: MUST be an output parameter that 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::AddObjectToRefresher, the server MUST evaluate the CIM path to the CIM instance and MUST return information to the client to handle the specific CIM instance as specified in this section.

A successful call to IWbemRefreshingServices::AddObjectToRefresher 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 instance 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 a _WBEM_REFRESH_INFO_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 its m_lType member to WBEM_REFRESH_TYPE_INVALID, and return an HRESULT error in the format that is specified in section 2.2.11.