GetTrueSize function

This method is deprecated.

Retrieves the total on-disk size of a file stored in FESF encrypted format.

Syntax

HRESULT

GetTrueSize(

    [in]           REFGUID Volume,

    [in]           BSTR    Path,

    [out, retval]  __int64* TrueSize

)

Parameters

Volume [in]

A reference to a GUID that identifies the volume on which the file resides.  See Remarks for further information.

Path [in]

A string containing the path of a file to check.  This may be a fully qualified path or a path relative to the Volume argument.  Refer to the Remarks section.

TrueSize [out, retval]

A pointer to a 64-bit location that will receive the size, in bytes, of the file on success.

Return value

S_OK on success

Other standard HRESULT values may be returned indicating the failure of the operation.

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.

If Volume is equal to FE_SHADOW_VOLUME_GUID (indicating that Path refers to a file in a shadow), or FE_NETWORK_GUID (indicating that Path refers to a file on the network) or to GUID_NULL (indicating that no GUID is provided),  then Path is interpreted as either as a fully qualified path, suitable for direct evaluation, or as the concatenation of the shadow device name and path.

Otherwise, Volume represents a local volume and Path is interpreted as relative to that volume.

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 GetTrueSize function 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 have read access to the file to call this function.

Examples

 

See Also

The provided UM_Sample solution contains examples that illustrates the use of this function.

Requirements

Software version

FESF V1 (or later)

DLL/Server

FesfDs.exe

Supported FESF State

FESF Online State or FESF Offline State (as long as FesfDs in accessible via COM).

Type Library

\UM_FESF\UMLIB\FESFDS.TLB

IID

IFesfDs  (please use the defintion from the Type Library)

CLSID

FesfDs (please use the definition from the Type Library)