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

BOOL
WINAPI
WIMMountImageHandle(
	 HANDLE  hImage,
	 PCWSTR  pszMountPath,
	 DWORD   dwMountFlags
	);

Parameters

hImage

[in] A handle to a volume image returned by the WIMLoadImage or WIMCaptureImage function. The WIM file must have been opened with WIM_GENERIC_MOUNT flag in call to WIMCreateFile.

pszMountPath

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

dwMountFlags

[in] Specifies how the file is to be treated and what features are to be used.

Flag Description

WIM_FLAG_MOUNT_READONLY

Mounts the image without the ability to save changes, regardless of WIM access level.

WIM_FLAG_VERIFY

Verifies that files match original data.

WIM_FLAG_NO_RP_FIX

Disables automatic path repairs for junctions and symbolic links.

WIM_FLAG_NO_DIRACL

Disables restoring security information for directories.

WIM_FLAG_NO_FILEACL

Disables restoring security information for files.

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 WIMMountImageHandle 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. The WIM file containing the image must be opened with WIM_GENERIC_MOUNT access. Use the WIMUnmountImageHandle function to unmount the image from the mount directory.

See Also