IWMSClassObject.CreateInstance (Visual Basic .NET)
Previous | Next |
IWMSClassObject.CreateInstance (Visual Basic .NET)
The CreateInstance method is a generic method for creating objects for the server.
Syntax
Parameters
riid
Reference to a Guid specifying the requested object. This must be one of the following values.
Value | Description |
IID_IWMSContentDescriptionList | GUID identifying an IWMSContentDescriptionList object. |
IID_IWMSDataContainerVersion | GUID identifying an IWMSDataContainerVersion object. |
IID_IWMSPacket | GUID identifying an IWMSPacket object. |
IID_IWMSPacketList | GUID identifying an IWMSPacketList object. |
IID_IWMSStreamHeader | GUID identifying an IWMSStreamHeader object. |
IID_IWMSStreamHeaderList | GUID identifying an IWMSStreamHeaderList object. |
ppunk
Reference to an IntPtr containing a newly created object.
Return Values
This method does not return a value.
If this method fails, it throws an exception.
Number | Description |
0x80070057 | ppunk is null or riid is not equal to one of the expected values. |
0x8007000E | There is insufficient memory to complete the function. |
Example Code
Dim ContentDescList As IWMSContentDescriptionList Dim pUnknown As IntPtr Try m_ClassFactory.CreateInstance( _ GetType(IWMSContentDescriptionList).GUID, _ pUnknown) ContentDescList = Marshal.GetTypedObjectForIUnknown(pUnknown, _ GetType(IWMSContentDescriptionList)) 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 |