Microsoft Internet Security and Acceleration Server 2004 SDK |
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 on 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.
The IFWXIOBuffer interface inherits the methods of the standard COM interface IUnknown.
In addition, IFWXIOBuffer defines the following methods.
Method | Description |
---|---|
GetBufferAndSize | Gets the actual data from the memory buffer, and the actual size (not the allocated size) of the buffer. |
SetDataSize | Sets the actual size of the memory buffer that was used. |
Append | Appends a specified number of bytes of data to the buffer object. |
ReadAt | Reads a specified number of bytes starting at a specified offset from the beginning of the buffer. |
SendToBuffer | Copies a specified number of bytes starting at a specified offset from the beginning of the buffer to the given destination buffer. |
GetBufferSizes | 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 2003 or
Windows 2000.
Version: Requires Internet Security and Acceleration
Server 2004.
Header: Declared in Wspfwext.idl.