GetTrueFileSize method

This method is deprecated.

Retrieves the actual on-disk size of an FESF encrypted file, including the size of the Client Solution Policy Header and any FESF metadata.

Syntax

HRESULT

GetTrueFileSize(

    [in]           BSTR FullPath,

    [out, retval]  __int64* TrueSize

)

Parameters

FullPath [in]

A string containing the fully qualified path to an FESF encrypted file.

TrueSize [out, retval]

A pointer to a 64-bit integer location into which the actual on-disk size of the file is stored.

Return value

If the method succeeds, S_OK is returned.

If the method fails for any reason, an appropriate error code is returned.

Remarks

Important: This method is deprecated and is pending removal from FESF. Do not use it. Convert existing code that uses it as soon as possible. Use the equivalent function provided by the FesfUtil2 Library.

When FESF encrypts a file, additional data is stored along with that file.  This data includes both the Client Solution's Policy Header, and a small amount of FESF metadata.  When file size information is retrieved by standard means, FESF corrects the file size to represent only the size of the data in the file.  Therefore, the file size ordinarily does not reflect the actual number of bytes a given file occupies on disk.

A Client Solution may use the GetTrueFileSize method to retrieve the actual number of bytes that a file occupies on disk, including the Solution's Policy Header and FESF metadata.

The calling COM client must be able to access the file for this operation to succeed.

Examples

 

See Also

The UM_FESF solution contains an example that illustrates the use of GetTrueFileSize.

Requirements

Software version

FESF V1 (or later)

DLL

FESFUtility.DLL

Supported FESF State

FESF Online State.

Type Library

\UM_FESF\UMLIB\FESFUTILITY.TLB

IID

IFesfUtil  (please use the defintion from the Type Library)

CLSID

FesfUtil (please use the definition from the Type Library)