IWMSContext.GetContextType (C#)
Previous | Next |
IWMSContext.GetContextType (C#)
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
Guid ContextGuid = typeof(IWMSContext).GUID; IWMSContext Context; IntPtr pUnknown; WMS_CONTEXT_TYPE ContextType; try { m_ClassFactory.AllocIWMSContext(ref ContextGuid, WMS_CONTEXT_TYPE.WMS_USER_CONTEXT_TYPE, pUserContext, out pUnknown); Context = (IWMSContext)Marshal.GetTypedObjectForIUnknown(pUnknown, typeof(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(out ContextType); } 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 |