IWMSServer.MonikerName (Visual Basic .NET)
.gif)
| Previous | Next |
IWMSServer.MonikerName (Visual Basic .NET)
The MonikerName property retrieves the moniker display name that can be used to create and initialize a WMSServer object.
Syntax
String = IWMSServer.MonikerName
Property Value
A String containing the display name.
If this property fails, it returns an error number.
| Number | Description |
| 0x8007000E | There is insufficient memory to complete the function. |
Remarks
This property is read-only. A moniker is a persistent COM component that encapsulates both the ability to locate an object or data and to retrieve that object or data into memory. The display name can be used to create the object.
Example Code
This example appears circuitous because it uses an IWMSServer method to create an IWMSServer object by using the moniker.
Imports Microsoft.WindowsMediaServices.Interop
Imports System.Runtime.InteropServices
Private Sub GetMonikerName()
' Declare variables.
Dim Server, VerifiedServer As WMSServer
Dim Moniker As String
Dim ServerFromMoniker As Object
Try
' Create the WMSServer object.
Server = New WMSServer()
Moniker = Server.MonikerName
ServerFromMoniker = GetObject(Moniker)
' Verify that the moniker created a WMSServer object.
VerifiedServer = ServerFromMoniker
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 |