WMEncBasicEdit.ErrorState
![]() |
The ErrorState property retrieves basic edit run-time errors.
Syntax
Long = WMEncBasicEdit.ErrorState
Parameters
This property takes no parameters.
Property Value
A Long that contains the Win32 error code.
Remarks
Use this method to retrieve errors that occur during the basic edit process. Use the RunState property to determine whether the basic edit process is stopped or started.
This property is read-only.
Example Code
' Create the WMEncBasicEdit object.
Dim BasicEdit As WMEncBasicEdit
Set BasicEdit = New WMEncBasicEdit
' Specify the input, output, and configuration files.
BasicEdit.MediaFile = "C:\InputFile.wmv"
BasicEdit.OutputFile = "C:\OutputFile.wmv"
BasicEdit.ConfigFile = "C:\ConfigFile.txt"
' Retrieve the duration of the input file, in seconds.
Dim lFileDur As Long
lFileDur = BasicEdit.Duration / 1000
' Retrieve the profile used by the input file.
Dim Pro As WMEncProfile2
Set Pro = BasicEdit.Profile
' Save the profile used by the input file.
BasicEdit.SaveProfile "C:\BasicEditPro.prx"
' Add indexing to the file.
BasicEdit.Index = True
' Specify a mark-in time of 5 seconds and a mark-out time of 10 seconds.
BasicEdit.MarkIn = 5000
BasicEdit.MarkOut = 10000
' Specify an output configuration file.
BasicEdit.SaveConfigFile "C:\ConfigFile2.txt"
' Start the basic edit process.
BasicEdit.Start
' Retrieve the run state.
Dim BERunState as WMENC_BASICEDIT_STATE
BERunState = BasicEdit.RunState
' Retrieve a run-time error.
Dim lError As Long
lError = BasicEdit.ErrorState
If lError = 123456 Then
' Process the error.
End If
' You can use a timer to retrieve the percentage complete.
Dim lPercentComplete As Long
lPercentComplete = BasicEdit.ProgressPercent
' Stop the edit process manually.
' BasicEdit.Stop
Requirements
Reference: Windows Media Encoder
Library: wmenc.exe
See Also
.gif)