IWMEncFileArchiveStats.FileSize

Windows Media Encoder SDK banner art

The FileSize property retrieves the size of the archive file.

Syntax

WMENC_LONGLONG = IWMEncFileArchiveStats.FileSize

Parameters

This property takes no parameters.

Property Value

A WMENC_LONGLONG that indicates the size of the output file.

Remarks

The WMENC_LONGLONG data type is a typedef from the CURRENCY type. A 64-bit integer is needed to hold the size of the archive file, and CURRENCY is the only 64-bit integer type that Automation contains. However, CURRENCY is a fixed-point type that has the decimal point moved four places to the left. Therefore, to display the CURRENCY value as a true integer and retrieve the correct file size in bytes, you must multiply the return value by 10,000.

File size information does not persist after the encoding process has stopped. You can create a timer object to retrieve the archiving statistics.

Example Code

' See the IWMEncFile object for an example that explains how to
' create and use an archive file.
' The following example shows how to capture archiving statistics
' during the encoding process.

' Declare objects and variables.
  Dim Stats As IWMEncStatistics
  Dim FileStats As IWMEncFileArchiveStats
  Dim lDuration As WMENC_LONGLONG
  Dim lSize As WMENC_LONGLONG

' Create an IWMEncStatistics object and retrieve
' the IWMEncFileArchiveStats object from it.
  Set Stats = Encoder.Statistics
  Set FileStats = Stats.FileArchiveStats

' Find the duration (seconds) and size (bytes) of the archive file.
  lDuration = FileStats.FileDuration * 10
  lSize = FileStats.FileSize * 10000

Requirements

Reference: Windows Media Encoder

Library: wmenc.exe

See Also