IWMSPacket.InsertBuffer (C#)

The InsertBuffer method inserts a new buffer immediately following the buffer at the specified index.

void IWMSPacket.InsertBuffer(
  uint dwBufferNum,
  INSSBuffer pBuffer,
  uint dwBufferOffset,
  uint dwBufferLen,
  ushort wFlags,
  uint dwExFlags
);

Arguments

uint containing the index at which to insert the new buffer. A value of -1 indicates that the new buffer will be inserted at the end of the list.

INSSBufferINSSBuffer Object (C#) containing the buffer to insert.

uint containing the offset into the buffer list.

uint containing the length of the buffer.

Member of the WMS_PACKET_BUFFER_FLAGS enumeration type.

Value

Description

WMS_INSERT_BUFFER_AT_END

The buffer should be inserted at the end of the list.

Member of the WMS_PACKET_BUFFER_EX_FLAGS enumeration type. This must be a bitwise OR of one or more of the following values.

Value

Description

WMS_BUFFER_COMBINE

This buffer should be combined with the list rather than appended.

WMS_BUFFER_NO_ADDREF

The reference count for the buffer should not be incremented.

WMS_BUFFER_NO_REFCOUNT

No reference count should be kept for this buffer.

WMS_BUFFER_NO_RELEASE

The buffer should not be released regardless of reference count.

Return Value

This method does not return a value.

If this method fails, it throws an exception.

Number

Description

0x80070057

dwBufferNum is not a valid index location.

0x8007000E

There is insufficient memory to complete the function.

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

Concepts

IWMSPacket Object (C#)