IFWXExternalIOCompletion::CompleteAsyncIO

IFWXExternalIOCompletion::CompleteAsyncIO is the I/O completion notification used with asynchronous I/O for operating system files. If the Microsoft Firewall service has a handle for an operating system file, and needs to read the file or write to it, this operation will be asynchronous, so that it can take place in the background. An example of an asynchronous I/O operation for operating system files is writing to or reading from a disk.

There are four sequential steps to this process:

  1. The Firewall service calls IFWXFirewall::HookToCompletionPort, which connects the file handle to the service completion port. This step takes place once per connection.
  2. The Firewall service calls IFWXFirewall::CreateOverlapped to create the overlapped object, which implements the IFWXOverlapped interface.
  3. The Firewall service uses IFWXOverlapped::GetOverlapped to get a pointer to the Winsock OVERLAPPED structure, and IFWXOverlapped::SetNotificationInterface to send notification when the I/O operation is completed.
  4. IFWXExternalIOCompletion::CompleteAsyncIO receives the notification, including a succeed or fail message, information regarding the user, and the number of bytes transferred.

The following figure summarizes the process of asynchronous I/O for operating system files.


Send comments about this topic to Microsoft

Build date: 11/30/2009

© 2008 Microsoft Corporation. All rights reserved.