DismGetMountedImageInfo function
Returns an array of DismMountedImageInfo structures describing currently mounted images.
Syntax
HRESULT WINAPI DismGetMountedImageInfo(
_Out_ DismMountedImageInfo **MountedImageInfo,
_Out_ UINT *Count
);
Parameters
MountedImageInfo [out]
A pointer to the address of an array of DismMountedImageInfo structures.
Count [out]
The number of DismMountedImageInfo structures that are returned.
Return value
Returns S_OK on success.
Remarks
Important
Only images mounted using the DISM infrastructure will be returned. If a .vhd file is mounted outside of DISM, such as with the DiskPart tool, this call will not return information about that image. You must use DismMountImage to mount the image.
The array of DismMountedImageInfo structures are allocated by the DISM API on the heap.
Important
You must call DismDelete, passing the ImageInfo pointer, to free the resources associated with the DismImageInfo structures.
Example
HRESULT hr = S_OK;
DismMountedImageInfo* ImageInfo;
UINT& ImageInfoCount;
hr = DismGetMountedImageInfo(&ImageInfo, &ImageInfoCount);
Requirements
Requirement | Description |
---|---|
Supported host platform for .wim images | 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. |
Supported host platform for .vhd images | Windows 7, Windows Server 2008 R2, Windows 8, Windows Server 2012, Windows 8.1, Windows Server 2012 R2, Windows 10, Windows Server 2016 |
Supported image platforms | Windows 7, Windows Server 2008 R2, Windows PE 3.0, Windows 8, Windows Server 2012, Windows Preinstallation Environment (Windows PE) 4.0, Windows 8.1, Windows Server 2012 R2, Windows 10, Windows Server 2016 |
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 |