InitializeFastIo

BOOL CNdisApi::InitializeFastIo ( PFAST_IO_SECTION pFastIo, DWORD dwSize );

Initializes Fast I/O to fetch packets from the driver through the shared memory section. Once initialized driver writes intercepted packets into this section until memory space is available (and application read operation not in progress). Otherwise packets are queued into the internal packets queue and can be retrieved from the driver using ReadPacketsUnsorted.

Return Value:
TRUE if call was successful, FALSE otherwise

Parameters:
pFastIo
Memory buffer allocated for the Fast I/O.

dwSize
Size of the memory buffer above.

Available starting version 3.2.20. Fast I/O is supported for Windows Vista and later. WOW64 mode is not supported.

Example:

using fast_io_storage_type_t = std::aligned_storage_t<fast_io_size, 0x1000>;
const auto fast_io_ptr = std::make_unique<fast_io_storage_type_t>();
const auto fast_io_section = reinterpret_cast<PFAST_IO_SECTION>(fast_io_ptr.get());
		
if (InitializeFastIo(fast_io_section, fast_io_size))
{
    std::cout << std::endl << "Successfully initialized fast I/O functionality" << std::endl;
}
else
{
    std::cout << std::endl << "Failed tp initialize fast I/O functionality" << std::endl;
}

This member calls driver with IOCTL_NDISRD_INITIALIZE_FAST_IO control code (see details below).

IOCTL_NDISRD_INITIALIZE_FAST_IO

Input Buffer INITIALIZE_FAST_IO_PARAMS
Input Buffer Size sizeof (INITIALIZE_FAST_IO_PARAMS)
Output Buffer None
Output Buffer Size 0