Microsoft Internet Security and Acceleration Server 2000


IFWXExternalIOCompletion::CompleteAsyncIO is the I/O completion notification used with asynchronous I/O for operating system files. If the Firewall service has a handle for an operating system file, and needs to call 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's 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 has been 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.