Mounts an image in a Windows image (.wim) file to the specified directory.

BOOL
WINAPI
WIMMountImage(
	 PWSTR  pszMountPath,
	 PWSTR  pszWimFileName,
	 DWORD  dwImageIndex,
	 PWSTR  pszTempPath
	);

Parameters

pszMountPath

[in] A pointer to the full file path of the directory to which the .wim file has to be mounted. This parameter is required and cannot be NULL. The specified path must not exceed MAX_PATH characters in length.

pszWimFileName

[in] A pointer to the full file name of the .wim file that has to be mounted. This parameter is required and cannot be NULL.

dwImageIndex

[in] An index of the image in the .wim file that has to be mounted.

pszTempPath

[in opt] A pointer to the full file path to the temporary directory in which changes to the .wim file can be tracked. If this parameter is NULL, the image will not be mounted for edits.

Return Value

Returns TRUE and sets the LastError to ERROR_SUCCESS on the successful completion of this function. Returns FALSE in case of a failure and sets the LastError to the appropriate Win32® error value.

Remarks

The WIMMountImage function maps the contents of the given image in a .wim file to the specified mount directory. After the successful completion of this operation, users or applications can access the contents of the image mapped under the mount directory.

Use the WIMUnmountImage function to unmount the image from the mount directory.

See Also