IWMEncFileTransferSource.Send
![]() |
The Send method sends the HTML files in the specified file set.
Syntax
IWMEncFileTransferSource.Send(IWMEncFileSet)
Parameters
IWMEncFileSet
[in] Specifies an IWMEncFileSet object.
Return Values
If this method fails, it returns an error number.
| Return code | Number | Description |
| NS_E_INVALID_REQUEST | 0xC00D002BL | You cannot call this method if UserDrivenMode is False. |
| NS_E_INVALIDCALL_WHILE_ENCODER_STOPPED | 0xC00D1B7FL | This method cannot be called if the encoding process is not running. |
Example Code
' Create a WMEncoder object.
Dim Encoder As WMEncoder
Set Encoder = New WMEncoder
' Retrieve the source group collection and add a source group.
Dim SrcGrpColl As IWMEncSourceGroupCollection
Dim SrcGrp As IWMEncSourceGroup2
Set SrcGrpColl = Encoder.SourceGroupCollection
Set SrcGrp = SrcGrpColl.Add("SG_1")
' Add an audio, video, and HTML source.
Dim SrcAud As IWMEncAudioSource
Dim SrcVid As IWMEncVideoSource
Dim SrcHTML As IWMEncSource
Set SrcAud = SrcGrp.AddSource(WMENC_AUDIO)
Set SrcVid = SrcGrp.AddSource(WMENC_VIDEO)
Set SrcHTML = SrcGrp.AddSource(WMENC_FILETRANSFER)
' Use the default audio and video devices.
SrcAud.SetInput ("Device://Default_Audio_Device")
SrcVid.SetInput ("Device://Default_Video_Device")
' The HTML scheme is FileTransfer, and the resource string is not used.
SrcHTML.SetInput ("FileTransfer://placeholdertext")
' Set the HTML stream to repeat.
SrcHTML.Repeat = True
' Continue configuring the encoding session, including the HTML profile
' and broadcast settings.
' Start encoding.
Encoder.Start
' Retrieve the file transfer plug-in from the HTML source.
Dim pUnkFileSrcPlugin As IUnknown
Set pUnkFileSrcPlugin = SrcHTML.GetSourcePlugin
Dim FileTransSrc As IWMEncFileTransferSource
Set FileTransSrc = pUnkFileSrcPlugin
' Create a file set, add HTML content, and then send it.
Dim FileSet As IWMEncFileSet
Set FileSet = FileTransSrc.Add
FileSet.Add "C:\HTML\image.jpg", "https://YourWebSite/image.jpg"
FileTransSrc.Send FileSet
Requirements
Reference: Windows Media Encoder
Library: wmenc.exe
See Also
.gif)