FesfUtil2FixFileTag Function

Corrects the file size tagging "hint" on an FESF encrypted file. See the remarks section for more information.

Syntax (C++)

void

FesfUtil2FixFileTag(std::wstring_view PathToFix);

Syntax (C)

DWORD

FesfUtil2FixFileTag_C(

      [in] LPCWSTR PathToFix);

Parameters

PathToFix

The fully qualified path to an FESF encrypted file to be updated.

Throws

Throws an FEU2Exception if an error is encountered.

Remarks

FESF uses a file's allocation size as a "hint" as to whether the file is encrypted by FESF. This allows FESF to identify files as being FESF encrypted without having to open each file and look for FESF meta-data. In rare cases, if a file is backed-up or otherwise altered, that file's length hint can become "broken" causing FESF to no longer recognize an FESF encrypted file as being encrypted. This function fixes the tagging for that file.

Requires the caller to have SeRestorePrivilege. If the privilege is not already activated, it will be activated by the function and deactivated before return.