IWMSPacket::GetBuffer

The GetBuffer method retrieves the location of a specific buffer region that contains the packet's data.

HRESULT GetBuffer(
  DWORD  dwBufferNum,
  INSSBuffer**  ppBuffer,
  DWORD*  pdwBufferOffset,
  DWORD*  pdwBufferLen,
  WORD*  pwFlags,
  DWORD  dwExFlags
);

Arguments

dwBufferNum

[in] DWORD containing the index of the buffer to retrieve.

ppBuffer

[out] Pointer to a pointer to an INSSBufferINSSBuffer Interface containing the buffer retrieved.

pdwBufferOffset

[out] Pointer to a DWORD containing the offset into the buffer list.

pdwBufferLen

[out] Pointer to a DWORD containing the length of the buffer.

pwFlags

[out] Member of the WMS_PACKET_BUFFER_FLAGS enumeration type. This must be the following value.

Value

Description

WMS_INSERT_BUFFER_AT_END

The buffer was inserted at the end of the list.

dwExFlags

[in] 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

If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code.

Return code

Number

Description

E_INVALIDARG

0x80070057

dwBufferNum is not a valid index location.

Requirements

Header: wmspacket.h.

Library: WMSServerTypeLib.dll.

Platform: Windows Server 2003, Enterprise Edition; Windows Server 2003, Datacenter Edition; Windows Server 2008.

See Also

Concepts

IWMSPacket Interface