Share via


EwfMgrCommitFile (Standard 8)

7/8/2014

Review the use, syntax, parameters, and return values of the EwfMgrCommitFile function of the EWF API in Windows Embedded 8 Standard (Standard 8).

This function commits all current level data in the overlay for a specific file to the protected volume.

Warning

Misuse of this function can corrupt the protected volume. The file to be committed must already exist on the protected volume before you enable EWF, and it cannot have changed size or location. If any of these requirements are not met, 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

Returns TRUE if successful; otherwise, returns FALSE. For extended error information, call GetLastError.

Remarks

The file is immediately committed. This function 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 that is included in EWF API Code Sample (Sample.cpp) shows you how to use the EwfMgrCommitFile function.

Requirements

Header

ewfapi.h

Library

ewfapi.lib

See Also

Concepts

EWF API Functions