DismGetImageInfo function

Returns an array of DismImageInfo structures that describe the images in a .wim or .vhd file.

Syntax

HRESULT WINAPI DismGetImageInfo(
  _In_  PCWSTR        ImageFilePath,
  _Out_ DismImageInfo **ImageInfo,
  _Out_ UINT          *Count
);

Parameters

ImageFilePath [in]
A relative or absolute path to a .wim or .vhd file.

ImageInfo [out]
A pointer to the address of an array of DismImageInfo structures.

Count [out]
The number of DismImageInfo structures that are returned.

Return value

Returns S_OK on success.

Remarks

The array of DismImageInfo structures are allocated by 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;
UINT* ImageInfoCount;
hr = DismGetImageInfo(L"C:\\Images\\Image1.vhd", &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

See also

DismImageInfo

DismGetMountedImageInfo

DismMountedImageInfo

DismDelete