Returns a WIM handle and an image handle corresponding to a mounted image directory.

BOOL
WINAPI
WIMGetMountedImageHandle(
	PWSTR  pszMountPath,
	DWORD   dwFlags,
	PHANDLE phWimHandle,
	PHANDLE phImageHandle
	);

Parameters

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.

dwFlags

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

Flag Description

WIM_FLAG_MOUNT_READONLY

Returns a handle that cannot commit changes, regardless of the access level requested at mount time.

phWimHandle

[out] Pointer to receive a WIM handle corresponding to the image mounted at the specified path. This parameter is required and cannot be NULL.

phImageHandle

[out] Pointer to receive an WIM handle corresponding to the image mounted at the specified path. This parameter is required and cannot be NULL.

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

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

See Also