DismShutdown function

[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]

Shuts down DISM API. DismShutdown must be called once per process. Other DISM API function calls will fail after DismShutdown has been called.

Syntax

HRESULT WINAPI DismShutdown(void);

Parameters

This function has no parameters.

Return value

Returns S_OK on success.

Returns DISMAPI_E_DISMAPI_NOT_INITIALIZED if DismInitialize has not been called.

Returns DISMAPI_E_OPEN_SESSION_HANDLES if any open DismSession have not been closed.

Remarks

You must call DismShutdown once per process. Calls to DismShutdown must be matched to an earlier call to DismInitialize. DISM API will serialize concurrent calls to DismShutdown. The first call will succeed and the other calls will fail.

Before calling DismShutdown, you must close all DismSession using DismCloseSession. If there are open DismSessions when calling DismShutdown, then the DismShutdown call will fail. For more information, see Using the DISM API.

Example

HRESULT hr = S_OK; 
hr = DismShutdown();

Requirements

Supported host platforms:

DISM API can be used on any operating system supported by the Windows® Assessment and Deployment Kit (Windows ADK). For more information, see the Windows ADK Technical Reference.

Requirements

Minimum supported client

Windows 7 [desktop apps only]

Minimum supported server

Windows Server 2008 R2 [desktop apps only]

Header

DismAPI.h

Library

DismAPI.lib

DLL

DismAPI.dll

See also

DismInitialize

DismSession

DismCloseSession