INSSBuffer.SetLength (C#)

The SetLength method specifies the length of the data segment that can be loaded into the buffer.

void INSSBuffer.SetLength(
  uint dwLength
);

Arguments

uint specifying the size of the buffer, in bytes. This must be less than 16 MB (16,777,216 or 2**24 bytes).

Return Value

This method does not return a value.

If this method fails, it throws an exception.

Number

Description

0x80070057

dwLength is greater than the maximum buffer length.

Remarks

You can use the IWMSBufferAllocatorIWMSBufferAllocator Object (C#) to allocate the buffer.

Example

// Specify the length of the buffer.
// The pBuffer pointer is user-defined.
pBuffer.SetLength(2048);

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

INSSBuffer Object (C#)