Export (0) Print
Expand All

UnLoad method of the MSFT_Providers class

The UnLoad Windows Management Instrumentation (WMI) class method unloads the COM server associated with the specific instance of the provider. Subsequent calls into the provider with the same class identifier (CLSID) returns WBEM_E_PROVIDER_DISABLED. If the COM server implementation is an in-process server hosted in the provider host process, it receives calls to the exported function DllCanUnloadNow. If the provider responds by returning TRUE, then the server unloads the executable image. COM is configured to unload the executable file approximately 2 minutes after the first successful call to DllCanUnloadNow. The provider can be re-enabled using the MSFT Providers.Load method, changing to the associated instance of __Win32Provider, or restarting the service.

This topic uses Managed Object Format (MOF) syntax. For more information about using this method see Calling a Method.


uint32 UnLoad();


This method has no parameters.


For script code examples, see WMI Tasks for Scripts and Applications and the TechNet ScriptCenter Script Repository.

For C++ code examples, see WMI C++ Application Examples.


Minimum supported client

Windows XP

Minimum supported server

Windows Server 2003





See also




© 2014 Microsoft