WMEncoder.Archive

Windows Media Encoder SDK banner art

The Archive method starts, pauses, or stops the archiving process.

Syntax

WMEncoder.Archive(enumArchiveType, enumArchiveOp)

Parameters

enumArchiveType

[in]  Member of a WMENC_ARCHIVE_TYPE enumeration type indicating where encoded content is stored.

enumArchiveOp

[in]  Member of a WMENC_ARCHIVE_OPERATION enumeration type indicating the archiving state.

Return Values

If this method fails, it returns an error number.

Number Description
0xC00D1B7F This method cannot be called if the encoder engine is stopped.
0xC00D1B77 You can only save encoded content to a local file.
0xC00D1B78 You can only start, stop, or pause the archiving process.

Remarks

You can use the Archive method to override the WMEncoder.EnableAutoArchive and IWMEncSourceGroup.AutoArchive properties. If both of these are set to True, archiving automatically starts when encoding of the relevant source group starts.

Example Code

' Create a WMEncoder object.
Dim Encoder As WMEncoder
Set Encoder = New WMEncoder

' Load a predefined configuration from a file. The
' file name extension must be .wme.
Encoder.Load ("C:\filename.wme")

' Start the encoding process.
Encoder.Start

' Start the archiving process.
Encoder.Archive WMENC_ARCHIVE_LOCAL, WMENC_ARCHIVE_START

Requirements

Reference: Windows Media Encoder

Library: wmenc.exe

See Also