IWMSContext.GetContextType (Visual Basic .NET)
Previous | Next |
IWMSContext.GetContextType (Visual Basic .NET)
The GetContextType method retrieves the type of context.
Syntax
Parameters
pType
Reference to a WMS_CONTEXT_TYPE enumeration value specifying the type of context. This must be one of the following values.
Value | Description |
WMS_UNKNOWN_CONTEXT_TYPE | The type of the context is unknown. |
WMS_SERVER_CONTEXT_TYPE | The context contains information about the server. |
WMS_USER_CONTEXT_TYPE | The context contains information about the client. |
WMS_PRESENTATION_CONTEXT_TYPE | The context contains information about the content being streamed to clients. |
WMS_CONTENT_DESCRIPTION_CONTEXT_TYPE | The context contains descriptive information about the content. |
WMS_COMMAND_REQUEST_CONTEXT_TYPE | The context contains information about client requests. |
WMS_COMMAND_RESPONSE_CONTEXT_TYPE | The context contains information about server responses to client requests. |
WMS_TRANSPORT_SPEC_CONTEXT_TYPE | The context contains information about the transport used to deliver the stream, either UDP, TCP, or multicast. |
WMS_PACKETIZER_CONTEXT_TYPE | The context contains information about data packets. |
WMS_CACHE_CONTENT_INFORMATION_CONTEXT_TYPE | The context contains information about a cache. |
WMS_ARCHIVE_CONTEXT_TYPE | The context contains information about an archive. |
Return Values
This method does not return a value.
If this method fails, it throws an exception.
Number | Description |
0x80004003 | pType is null. |
Example Code
Dim Context As IWMSContext Dim pUnknown As IntPtr Dim ContextType As WMS_CONTEXT_TYPE Try m_ClassFactory.AllocIWMSContext(GetType(IWMSContext).GUID, _ WMS_CONTEXT_TYPE.WMS_USER_CONTEXT_TYPE, _ pUserContext, pUnknown) Context = Marshal.GetTypedObjectForIUnknown(pUnknown, _ GetType(IWMSContext)) Context.SetStringValue(WMSDefines.WMS_CONTENT_DESCRIPTION_TITLE, _ WMSDefines.WMS_CONTENT_DESCRIPTION_TITLE_ID, _ "My Title", 0) Context.SetLongValue(WMSDefines.WMS_CONTENT_DESCRIPTION_NO_SKIP, _ WMSDefines.WMS_CONTENT_DESCRIPTION_NO_SKIP_ID, 1, 0) Context.GetContextType(ContextType) 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
Previous | Next |