次の方法で共有


IWMSContext.GetAndQueryIUnknownValue (Visual Basic .NET)

The GetAndQueryIUnknownValue method retrieves a specified object.

IWMSContext.GetAndQueryIUnknownValue(  pstrName As String,
  lNameHint As Int32,
  ByRef riid As Guid,
  ByRef pResult As Object,
  lOptions As Int32
)

Arguments

String specifying the name portion of the name-value pair in the context.

Int32 containing an optional key that can be used to more efficiently access a value.

Reference to a Guid identifying the requested object.

Reference to the specified Object.

Reserved for future use.

Return Value

This method does not return a value.

If this method fails, it throws an exception.

Number

Description

0x8002000B

The property specified by the pstrName parameter could not be found.

0x80020005

The data type of the property specified by the pstrName parameter is not VT_UNKNOWN.

0x80004003

pResult is null.

Example

Try
    pServerContext.GetAndQueryIUnknownValue("WMS_SERVER", _
                                            0, _
                                            GetType(IWMSServer).GUID, _
                                            pServer, _
                                            0)

Catch e As Exception
    ' TODO: Handle exceptions.
End Try

Requirements

Reference: Add a reference to Microsoft.WindowsMediaServices.

Namespace: Microsoft.WindowsMediaServices.Interop.

Assembly: Microsoft.WindowsMediaServices.dll.

Library: WMSServerTypeLib.dll.

Platform: Windows Server 2003, Enterprise Edition; Windows Server 2003, Datacenter Edition; Windows Server 2008.

See Also

Concepts

IWMSContext Object (Visual Basic .NET)