Transfers the data of an image from one Windows image (.wim) file to another.
BOOL WINAPI WIMExportImage( HANDLE hImage, HANDLE hWim, DWORD dwFlags );
Parameters
hImage
[in] A handle to an image opened by the WIMLoadImage function.
hWim
[in] A handle to a .wim file returned by the WIMCreateFile function. This handle must have WIM_GENERIC_WRITE access to accept the exported image. Split .wim files are not supported.
dwFlags
[in] Specifies how the image will be exported to the destination .wim file.
Value | Description |
---|---|
WIM_EXPORT_ALLOW_DUPLICATES |
The image will be exported to the destination .wim file even if it is already stored in that .wim file. |
WIM_EXPORT_ONLY_RESOURCES |
File resources will be exported to the destination .wim file and no image resources or XML information will be included. |
WIM_EXPORT_ONLY_METADATA |
Image resources and XML information are exported to the destination .wim file and no supporting file resources are included. |
Return Value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To obtain extended error information, call the GetLastError function.
Remarks
You must call the WIMSetTemporaryPath function for both the source and the destination .wim files before calling the WIMExportImage function.
If zero is passed in for the dwFlags parameter and the image is already stored in the destination, the function will return FALSE and set the LastError to ERROR_ALREADY_EXISTS.