Applies an image to a directory path from a Windows image (.wim) file.

BOOL
WINAPI
WIMApplyImage(
	HANDLE hImage,
	PCWSTR pszPath,
	DWORD  dwApplyFlags
	);

Parameters

hImage

[in] A handle to a volume image returned by the WIMLoadImage or WIMCaptureImage functions.

pszPath

[in] A pointer to a null-terminated string containing the root drive or the directory path where the image data will be applied.

dwApplyFlags

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

Flag Description

WIM_FLAG_VERIFY

Verified that files match original data.

WIM_FLAG_INDEX

Specifies that the image is to be sequentially read for caching or performance purposes.

WIM_FLAG_NO_APPLY

Applies the image without physically creating directories or files. Useful for obtaining a list of files and directories in the image.

WIM_FLAG_FILEINFO

Sends a WIM_MSG_FILEINFO message during the apply operation.

WIM_FLAG_NO_RP_FIX

Disables automatic path fixups 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

If the function succeeds, then the return value is nonzero.

If the function fails, then the return value is zero. To obtain extended error information, call the GetLastError function.

Remarks

To obtain more information during an image apply, see the WIMRegisterMessageCallback function.

To obtain the list of files in an image without actually applying the image, specify the WIM_FLAG_NO_APPLY flag and register a callback that handles the WIM_MSG_PROCESS message. To obtain additional file information from the WIM_MSG_FILEINFO message, specify the WIM_FLAG_FILEINFO.

See Also