IWMSServer.DownloadContent (Visual Basic .NET)
Previous | Next |
IWMSServer.DownloadContent (Visual Basic .NET)
The DownloadContent method downloads audio or video media content locally using the WMS Archiver Data Writer plug-in.
Syntax
IWMSServer .DownloadContent( strSrcURL As String, strDestFile As String, lContentSizeLow As Integer, lContentSizeHigh As Integer, lBitRate As Integer )
Parameters
strSrcURL
[in] String containing the source URL of the content to be downloaded.
strDestFile
[in] String containing the destination file to store the downloaded content.
lContentSizeLow
[in] Integer containing the low-order bits of a 64-bit integer value indicating the maximum size for the destination file. The default value is 0xFFFFFFFF.
lContentSizeHigh
[in] Integer containing the high-order bits of a 64-bit integer value indicating the maximum size for the destination file. The default value is 0xFFFFFFFF.
lBitRate
[in] Integer specifying the maximum bit rate at which to download the content. The default value is 0, indicating that content will be downloaded based on the encoded bit rate of the content.
Return Values
If this method succeeds, it does not return a value. If it fails, it returns an error number.
Number | Description |
0x80070057 | One of the arguments is invalid. |
0x8007000E | There is insufficient memory to complete the function. |
Example Code
Imports Microsoft.WindowsMediaServices.Interop Imports System.Runtime.InteropServices Private Sub DownloadMediaContent() ' Declare variables. Dim Server As WMSServer Dim strSrc As String Dim strDest As String Try ' Create the WMSServer object. Server = New WMSServer() ' Download content from another server to a local file. strSrc = "https://server/Sample_Broadcast/Welcome1.asf" strDest = "c:\wmpub\wmroot\Download_<Y><m><d>.asf" Server.DownloadContent(strSrc, strDest, &HFFFFFFFF, &HFFFFFFFF, &HFFFFFFFF) Catch excCom As COMException ' TODO: Handle COM exceptions. Catch exc As Exception ' TODO: Handle errors. Finally ' TODO: Clean-up code goes here. End Try End Sub
Requirements
Reference: Add a reference to Microsoft.WindowsMediaServices.
Namespace: Microsoft.WindowsMediaServices.Interop.
Assembly: Microsoft.WindowsMediaServices.dll.
Library: WMSServerTypeLib.dll.
Platform: Windows Server 2003 family, Windows Server 2008 family.
See Also
Previous | Next |