Skip to content

Latest commit

 

History

History
73 lines (59 loc) · 2.73 KB

nf-mi-mi_application_close.md

File metadata and controls

73 lines (59 loc) · 2.73 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:mi.MI_Application_Close
MI_Application_Close function (mi.h)
Deinitializes the management infrastructure client API that was initialized through a call to MI_Application_Initialize.
MI_Application_Close
MI_Application_Close function [Windows Management Infrastructure (MI)]
mi/MI_Application_Close
wmi_v2.mi_application_close
wmi_v2\mi_application_close.htm
wmi_v2
e5ad3ed3-8ef6-4bb5-999a-7d2ee91f51d5
12/05/2018
MI_Application_Close, MI_Application_Close function [Windows Management Infrastructure (MI)], mi/MI_Application_Close, wmi_v2.mi_application_close
mi.h
Windows
Windows 8
Windows Server 2012
Windows
Windows Management Framework 3.0 on Windows Server 2008 R2 with SP1, Windows 7 with SP1, and Windows Server 2008 with SP2
19H1
MI_Application_Close
mi/MI_Application_Close
c++
APIRef
kbSyntax
HeaderDef
Mi.h
MI_Application_Close

MI_Application_Close function

-description

Deinitializes the management infrastructure client API that was initialized through a call to MI_Application_Initialize.

-parameters

-param application [in, out]

Application handle that was initialized through a call to MI_Application_Initialize.

-returns

This function returns MI_INLINE MI_Result.

-remarks

MI_Application_Close will unload the entire protocol handling infrastructure and background threads associated with the infrastructure.

MI_Application_Close cancels all active sessions and operations. Sessions created under the target application and those sessions' operations must close before this function will return. Once the API does so, Mi.dll can be unloaded and any caches held within the MI infrastructure are flushed.

MI_Application_Close must not be called from within an asynchronous callback, otherwise it will cause deadlocks.

To avoid a system hang when calling this function, reference count MI_Application and call the MI_Application_Close function only when the AppDomain is shutting down and after all sessions have been closed.