Share via


IWMSClassObject.AllocIWMSPacketList (C#)

banner art

Previous Next

IWMSClassObject.AllocIWMSPacketList (C#)

The AllocIWMSPacketList method allocates an IWMSPacketList object.

Syntax

  

Parameters

riid

Reference to a Guid specifying the data structure IID. This must be IID_IWMSPacketList.

ppunk

Reference to an IntPtr containing a newly created IWMSPacketList 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.

Example Code

Guid PacketGuid = typeof(IWMSPacketList).GUID;;
IWMSPacketList  PacketList;
IntPtr          pUnknown;
            
try
{
    m_ClassFactory.AllocIWMSPacket(ref PacketGuid, out pUnknown);
    PacketList = (IWMSPacketList)Marshal.GetTypedObjectForIUnknown(
                                                  pUnknown,
                                                  typeof(IWMSPacketList));
}
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