IWMSClassObject.AllocIWMSContext (Visual Basic .NET)
Previous | Next |
IWMSClassObject.AllocIWMSContext (Visual Basic .NET)
The AllocIWMSContext method allocates an IWMSContext object.
Syntax
Parameters
riid
Reference to a Guid specifying the data structure IID. This must be equal to IID_IWMSContext.
ContextType
A WMS_CONTEXT_TYPE enumeration value specifying the context type that is allowed.
pRelatedContext
Object containing a context object. This object can be null.
ppunk
Reference to an IntPtr containing a newly created IWMSContext object.
Return Values
This method does not return a value.
If this method fails, it throws an exception.
Number | Description |
0x80070057 | ppunk is null. |
0x8007000E | There is insufficient memory to complete the function. |
Remarks
The pRelatedContext parameter contains an IWMSContext object. For performance reasons, the server might share critical sections between contexts.
Example Code
Dim Context As IWMSContext Dim pUnknown As IntPtr Try m_ClassFactory.AllocIWMSContext( _ GetType(IWMSContext).GUID, _ WMS_CONTEXT_TYPE.WMS_USER_CONTEXT_TYPE, _ pUserContext, pUnknown) Context = Marshal.GetTypedObjectForIUnknown(pUnknown, _ GetType(IWMSContext)) 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 |