Reads and returns the Solution Header for an FESF encrypted file. Opens the file "shared" and therefore presents a risk of other programs simultaneously accessing (and possibly updating) the file's header directly via a call to FesfUtil2 or via FESF. When possible, use the function FesfUtil2ReadHeaderExclusive in preference to this function.
FESF_UTIL2_SOLUTION_HEADER
FesfUtil2ReadHeaderUnsafe(std::wstring_view FileToRead);
DWORD
FesfUtil2ReadHeaderUnsafe_C(
[in] LPCWSTR FileToRead,
[out] PVOID HeaderBuffer,
[inout] DWORD* HeaderLength,
[Out] DWORD* MaxHeaderSize)
FileToRead
Fully qualified path name for the file.
Returns an FESF_UTIL2_SOLUTION_HEADER instance that describes and contains the file's Solution Policy Header.
Throws an FEU2Exception if an error is encountered.
Requires the caller to have SeRestorePrivilege. If the privilege is not already activated, it will be activated by the function and deactivated before return.
This function only supports local files. It can NOT be used to read the header of a file that is accessed via the network.
IFesfUtil2:: ReadHeaderUnsafe and IFesfUtil2:: ReadHeaderUnsafeFQP