Share via


EwfMgrSetPersistentData

3/21/2011

This function sets the persistent data for an Enhanced Write Filter (EWF)-protected volume. Persistent data (32 bytes per protected volume) is retained through all EWF operations. This includes Disable, Enable, and Restore operations.

Syntax

BOOL EwfMgrSetPeristentData(
  HANDLE hDevice,
  LPBYTE lpPersistentData,
  DWORD cbPersistentData
);

Parameters

  • hDevice
    [in] Handle to the EWF-protected volume.
  • lpPersistentData
    [in] Long pointer to a buffer that contains the persistent data to save.
  • cbPersistentData
    [in] Specifies the size, in bytes, of the buffer pointed to by lpPersistentData. Only the first 32 bytes (EWF_MAX_PERSISTENT_DATA) are saved.

Return Value

If the function succeeds, the return value is TRUE. If the function fails, the return value is FALSE. Call GetLastError for extended error information.

Remarks

This function is supported on RAM overlays with an associated EWF overlay store tracking its protection settings. However, it is not supported on RAM overlays that are described only within the registry.

This function stores EWF-specific state information and can be useful when you update a device. Persistent data is stored in the EWF volume store.

Example

The DoEwfPersistCommands function included in EWF API Code Sample (Sample.cpp), show you how to use the EwfMgrSetPeristentData function.

Requirements

OS Versions: Standard 7

Header: Ewfapi.h

Link Library: Ewfapi.lib

See Also

Reference

EwfMgrGetPersistentData

Concepts

EWF API Functions