EwfMgrCommitFile (Standard 7 SP1)
7/8/2014
This function commits all current level data in the overlay for a specific file to the protected volume.
Note
Misuse of this function can corrupt the protected volume. The file to be committed must already exist on the protected volume before enabling EWF, and cannot have changed size or location. If any of these requirements are not met, using this function corrupts the underlying volume. This function does not verify that it is safe to commit the specified file.
Syntax
BOOL WINAPI EwfMgrCommitFile(
IN HANDLE hDevice,
IN LPWSTR lpFile
);
Parameters
- hDevice
[in] Handle to the EWF-protected volume.
- lpFile
[in] Null-terminated wide-character string that specifies the file and path of the file to commit (in relation to the root of hDevice).
Return Value
If the function succeeds, the return value is TRUE. If the function fails, the return value is FALSE. For extended error information, call GetLastError.
Remarks
The file is immediately committed. This is supported only on RAM overlays and on NTFS or FAT file systems.
With NTFS, very small files do not have their own cluster, and cannot be committed. Those files do not commit with an error ERROR_HANDLE_EOF.
Additionally, this function should not be used on a file that is compressed by using compressed NTFS, because the file size and location are likely to change.
Example
The DoEwfCommitFile function included in EWF API Code Sample (Sample.cpp) shows you how to use the EwfMgrCommitFile function.
Requirements
OS Versions: Standard 7
Header: Ewfapi.h
Link Library: Ewfapi.lib