IWMSAdminArchiveSink.AvailableDiskSpace (Visual Basic .NET)
.gif)
| Previous | Next |
IWMSAdminArchiveSink.AvailableDiskSpace (Visual Basic .NET)
The AvailableDiskSpace property retrieves the amount of remaining disk space that can be used for archiving.
Syntax
Integer = IWMSAdminArchiveSink.AvailableDiskSpace
Property Value
Integer containing the available disk space in kilobytes.
If this property fails, it throws an exception.
| Number | Description |
| 0x8000FFFF | The WMS Archive Data Writer plug-in cannot be found. |
Remarks
This property is read-only. The value returned is relative to a valid template path. For example, if you try to access a folder and do not have the proper permissions for it, the value returned by calling AvailableDiskSpace will be relative to the previous valid template path.
Example Code
Imports Microsoft.WindowsMediaServices.Interop
Imports System.Runtime.InteropServices
Private Sub GetDiskSpace()
' Declare variables.
Dim Server As WMSServer
Dim BCPubPoint As IWMSBroadcastPublishingPoint
Dim Plugin As IWMSPlugin
Dim AdminArchiveSink As IWMSAdminArchiveSink
Dim iDiskSpace As Integer
Try
' Create the WMSServer object.
Server = New WMSServer()
' Add a new broadcast publishing point.
BCPubPoint = Server.PublishingPoints.Add("NewPubPoint", _
WMS_PUBLISHING_POINT_CATEGORY.WMS_PUBLISHING_POINT_BROADCAST, _
"c:\wmpub\wmroot\playlist.wsx")
' Retrieve the plug-in to be configured.
Plugin = BCPubPoint.BroadcastDataSinks.Item( _
"WMS Archive Data Writer")
' Retrieve the custom interface of the plug-in.
AdminArchiveSink = Plugin.CustomInterface
' Retrieve the amount of disk space available for archiving.
iDiskSpace = AdminArchiveSink.AvailableDiskSpace
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 |