Tells the service control manager to flush any cached RPC binding handles for the specified computer.
Only administrators may call this function.
HRESULT CoInvalidateRemoteMachineBindings( LPOLESTR pszMachineName );
The computer name for which binding handles should be flushed, or an empty string to signify that all handles in the cache should be flushed.
This function can return the following values.
||Indicates that the specified computer name was not found or that the binding handle cache was empty, indicating that an empty string was passed instead of a specific computer name.|
||Indicates the caller was not an administrator for this computer.|
||Indicates that a NULL value was passed for pszMachineName.|
The OLE Service Control Manager is used by COM to send component activation requests to other machines. To do this, the OLE Service Control Manager maintains a cache of RPC binding handles to send activation requests to computer, keyed by computer name. Under normal circumstances, this works well, but in some scenarios, such as Web farms and load-balancing situations, the ability to purge this cache of specific handles might be needed in order to facilitate rebinding to a different physical server by the same name. CoInvalidateRemoteMachineBindings is used for this purpose.
The OLE Service Control Manager will flush unused binding handles over time. It is not necessary to call CoInvalidateRemoteMachineBindings to do this.
|Minimum supported client||Windows XP [desktop apps only]|
|Minimum supported server||Windows Server 2003 [desktop apps only]|
|Header||combaseapi.h (include Objbase.h)|