IFWXIOBuffer Interface

The IFWXIOBuffer interface points to a reference counted memory buffer and provides the means of managing the buffer. The interface is a wrapper around a memory buffer. This allows the buffer to be used by many filters in a chain, avoiding the inefficient copying of buffers. For more information about memory buffers, see Buffer Objects.

The following rules apply to these buffers:

The IFWXSocket::Send, IFWXSocket::SendTo, and IFWXSocket::Recv methods increment the reference count on the buffer. This reference count is maintained until the IFWXIOCompletion::CompleteAsyncIO method returns. You must call the Release method for each AddRef method that you called, and once more if you also created the buffer. Call AddRef if you keep a pointer to the buffer.

For more information about how the IFWXSocket interface is used in application filters, see Filter Object Model.


interface IFWXIOBuffer : IUnknown


The IFWXIOBuffer interface inherits the methods of the IUnknown interface.

In addition, IFWXIOBuffer defines the following methods.

Method Description


Gets the actual data from the memory buffer, and the actual size (not the allocated size) of the buffer.


Sets the actual size of the memory buffer that was used.


Appends a specified number of bytes of data to the buffer object.


Reads a specified number of bytes starting at a specified offset from the beginning of the buffer.


Copies a specified number of bytes starting at a specified offset from the beginning of the buffer to the given destination buffer.


Gets the allocated and actual buffer sizes.


Consider the size of the buffer needed. Data length information provided on the Internet may be inaccurate and may result in a buffer overflow.

This interface is generally implemented by the Microsoft Firewall service. You may want to implement IFWXIOBuffer in your filter if:

You can rely on the Firewall service implementation of IFWXIOBuffer, and not code a filter implementation, if:


Server Requires Windows Server 2008.
Version Requires Forefront Threat Management Gateway (TMG).

Declared in Wspfwext.idl.

See Also

Filter Interfaces

Send comments about this topic to Microsoft

Build date: 11/30/2009

© 2008 Microsoft Corporation. All rights reserved.