Captures an image from a directory path and stores it in an image file.
HANDLE WINAPI WIMCaptureImage( HANDLE hWim, PCWSTR pszPath, DWORD dwCaptureFlags );
Parameters
hWim
[in] The handle to a .wim file returned by WIMCreateFile.
pszPath
[in] A pointer to a null-terminated string containing the root drive or directory path from where the image data is captured.
dwCaptureFlags
[in] Specifies the features to use during the capture.
Flag | Description |
---|---|
WIM_FLAG_VERIFY |
Capture verifies single-instance files byte by byte. |
WIM_FLAG_NO_RP_FIX |
Disables automatic path fixups for junctions and symbolic links. |
WIM_FLAG_NO_DIRACL |
Disables capturing security information for directories. |
WIM_FLAG_NO_FILEACL |
Disables capturing security information for files. |
Return Value
If the function succeeds, then the return value is a handle to an object representing the volume image. If the function fails, then the return value is NULL. To obtain extended error information, call GetLastError.
Remarks
To obtain information during an image capture, see the WIMRegisterMessageCallback function.