Skip to content

Latest commit

 

History

History
126 lines (87 loc) · 4.32 KB

nf-wbemcli-iwbemrefresher-refresh.md

File metadata and controls

126 lines (87 loc) · 4.32 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:wbemcli.IWbemRefresher.Refresh
IWbemRefresher::Refresh (wbemcli.h)
The IWbemRefresher::Refresh method updates all refreshable objects, enumerators, and nested refreshers. The WMI Refresher calls this function in response to a client request to Refresh.
IWbemRefresher interface [Windows Management Instrumentation]
Refresh method
IWbemRefresher.Refresh
IWbemRefresher::Refresh
Refresh
Refresh method [Windows Management Instrumentation]
Refresh method [Windows Management Instrumentation]
IWbemRefresher interface
_hmm_iwbemrefresher_refresh
wbemcli/IWbemRefresher::Refresh
wmi.iwbemrefresher_refresh
wmi\iwbemrefresher_refresh.htm
wmi
6de85040-c938-41dc-8240-0e21e89c7716
12/05/2018
IWbemRefresher interface [Windows Management Instrumentation],Refresh method, IWbemRefresher.Refresh, IWbemRefresher::Refresh, Refresh, Refresh method [Windows Management Instrumentation], Refresh method [Windows Management Instrumentation],IWbemRefresher interface, _hmm_iwbemrefresher_refresh, wbemcli/IWbemRefresher::Refresh, wmi.iwbemrefresher_refresh
wbemcli.h
Wbemidl.h
Windows
Windows Vista
Windows Server 2008
Wbemuuid.lib
Windows
19H1
IWbemRefresher::Refresh
wbemcli/IWbemRefresher::Refresh
c++
APIRef
kbSyntax
COM
Wbemuuid.lib
Wbemuuid.dll
IWbemRefresher.Refresh

IWbemRefresher::Refresh

-description

The IWbemRefresher::Refresh method updates all refreshable objects, enumerators, and nested refreshers. The WMI Refresher calls this function in response to a client request to Refresh.

-parameters

-param lFlags [in]

Bitmask of flags that modify the behavior of this method.

If WBEM_FLAG_REFRESH_AUTO_RECONNECT is specified and if the connection is broken, the refresher attempts to reconnect to the provider automatically. This is the default behavior for this method.

If you do not want the refresher to attempt to reconnect to the provider, specify WBEM_FLAG_REFRESH_NO_AUTO_RECONNECT.

-returns

This method returns an HRESULT indicating the status of the method call. The following list lists the value contained within an HRESULT.

-remarks

When refreshing enumerators and objects, providers should take as little time as possible. Using the IWbemObjectAccess methods and caching property handles for reuse can dramatically improve performance. When updating enumerators, a provider can either remove and re-instantiate all objects, or simply remove and add the changed instances. It is up to you to choose the best approach. In either case, caching instances can improve performance.

The provider should only access the objects and enumerators in a refresher in response to a call to IWbemRefresher::Refresh. It would, however, be perfectly valid to have a background thread polling for data with which to fill these objects, to prepare for when Refresh is called.

Examples

The following code example describes how to implement Refresh.

HRESULT CMyHiPerfProviderRefresher::Refresh(
/* [in] */long lFlags
)
{
  // Run through all the objects and update their
  // data.

  // Now run through the enumerators.
  // Empty the enumerator and refill it.
   

  return WBEM_S_NO_ERROR;
}

-see-also

Developing a WMI Provider

IWbemHiPerfProvider

IWbemRefresher

Making an Instance Provider into a High-Performance Provider

Performance Counter Provider

Writing an Instance Provider