Platform SDK: Hardware

DELETE_USN_JOURNAL_DATA

The DELETE_USN_JOURNAL_DATA structure contains information on the deletion of an NTFS change journal using the FSCTL_DELETE_USN_JOURNAL DeviceIoControl operation.

typedef struct {
  DWORDLONG UsnJournalID;
  DWORD DeleteFlags;
} DELETE_USN_JOURNAL_DATA, *PDELETE_USN_JOURNAL_DATA;

Members

UsnJournalID
Identifier of the change journal to delete.

If the journal is active and deletion is requested by setting the USN_DELETE_FLAG_DELETE flag in the DeleteFlags member, then this identifier must specify the change journal for the current volume. Use the FSCTL_QUERY_USN_JOURNAL DeviceIoControl operation to obtain the identifier of this change journal. If in this case the identifier is not for the current volume's change journal, the FSCTL_DELETE_USN_JOURNAL operation fails.

If notification instead of deletion is requested by setting only the USN_DELETE_FLAG_NOTIFY flag in DeleteFlags, UsnJournalID is ignored.

DeleteFlags
Value that indicates whether deletion or notification regarding deletion is performed, or both. The DeleteFlags member must contain one or both of the following values.
Value Meaning
USN_DELETE_FLAG_DELETE If this flag is set and the USN_DELETE_FLAG_NOTIFY flag is not set, the FSCTL_DELETE_USN_JOURNAL operation starts the journal deletion process and returns immediately. The journal deletion process continues, if necessary, across system restarts.
If this flag is set and the USN_DELETE_FLAG_NOTIFY flag is also set, both deletion and notification occur.
If this flag is set and the journal is active, you must provide the identifier for the change journal for the current volume in UsnJournalID or the operation fails. If the journal is not active, then UsnJournalID is ignored and the journal is deleted.
USN_DELETE_FLAG_NOTIFY If this flag is set, the call sets up notification about when deletion is complete. The journal deletion request is completed when the journal deletion process is complete. If this flag is set and the USN_DELETE_FLAG_DELETE flag is not set, then the call sets up notification of a deletion that may already be in progress. For example, when your application starts, it might use this flag to determine if a deletion is in progress.
If this flag is set and the USN_DELETE_FLAG_DELETE flag is also set, both deletion and notification occur.
The notification is performed using an I/O completion port or another mechanism for asynchronous event notification.

Remarks

For more information on deleting a change journal, see Creating, Modifying, and Deleting a Change Journal.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Unsupported.
  Header: Declared in Winioctl.h.

See Also

Device Input and Output Overview, Device Input and Output Structures, DeviceIoControl, FSCTL_DELETE_USN_JOURNAL, FSCTL_QUERY_USN_JOURNAL