Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
.gif)
| Previous | Next |
IWMSNamedValue.Value (Visual Basic .NET)
The Value property specifies and retrieves the value portion of the name-value pair.
Syntax
IWMSNamedValue .Value = Variant Variant = IWMSNamedValue.Value
Property Value
A Variant containing the value portion of the name-value pair.
If this property fails, it returns an error number.
| Number | Description |
| 0x8007000E | There is insufficient memory to complete the function. |
| 0xC00D138BL | Variant is an unsupported type. |
Remarks
You can use any Variant data type except Date.
Example Code
Imports Microsoft.WindowsMediaServices.Interop
Imports System.Runtime.InteropServices
Private Sub GetSetValue()
' Declare variables.
Dim Server As WMSServer
Dim NamedValues As IWMSNamedValues
Dim NamedValue As IWMSNamedValue
Dim varValue As Object
Try
' Create the WMSServer object.
Server = New WMSServer()
' Retrieve the IWMSNamedValues object
' containing descriptive information about the server.
NamedValues = Server.Properties
' Retrieve information about each name-value pair.
For Each NamedValue In NamedValues
' Retrieve the value associated with this pair.
varValue = NamedValue.Value
' Modify the value associated with this pair.
NamedValue.Value = "New Value"
Next
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 |