EwfMgrCommitFile

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, and cannot have changed in size or location. If any of these requirements are not met, using this function will corrupt the underlying volume. This function does not verify that it is safe to commit the specified file.

  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 (relative to the root of hDevice).

Return Values

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 will fail to 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.

See Also

EWF API Functions

Last updated on Wednesday, October 18, 2006

© 2006 Microsoft Corporation. All rights reserved.