IWMSContext.GetAndQueryIUnknownValue (C#)

banner art

Previous Next

IWMSContext.GetAndQueryIUnknownValue (C#)

The GetAndQueryIUnknownValue method retrieves a specified object.

Syntax

  

Parameters

pstrName

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

lNameHint

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

riid

Reference to a Guid identifying the requested object.

pResult

Reference to the specified object.

lOptions

Reserved for future use.

Return Values

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 Code

Guid ServerGuid = typeof(IWMSServer).GUID;
object            pServer;

try
{          
    pServerContext.GetAndQueryIUnknownValue(WMSDefines.WMS_SERVER,
                                            WMSDefines.WMS_SERVER_ID,
                                            ref ServerGuid,
                                            out pServer,
                                            0);
}
catch( Exception e )
{
    // TODO: Handle exceptions.
}

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

Previous Next