FesfUtil2ReadHeaderExclusive Function

Reads and returns the Solution Header for an FESF encrypted file. Opens the file for exclusive access, and requires both read and write access to the file.

Syntax (C++)

FESF_UTIL2_SOLUTION_HEADER

FesfUtil2ReadHeaderExclusive(std::wstring_view FileToRead);

Syntax (C)

DWORD

FesfUtil2ReadHeaderExclusive_C(
     [in] LPCWSTR FileToRead,

     [out] PVOID HeaderBuffer,

     [inout] DWORD* HeaderLength)

Parameters

FileToRead

Fully qualified path name for the file.

Return value

Returns an FESF_UTIL2_SOLUTION_HEADER instance that describes and contains the file's Solution Policy Header.

Throws

Throws an FEU2Exception if an error is encountered.

Remarks

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

Replaces

IFesfDs:: ReadHeader