SetFileCompletionNotificationModes function
Sets the notification modes for a file handle, allowing you to specify how completion notifications work for the specified file.
Syntax
BOOL WINAPI SetFileCompletionNotificationModes( _In_ HANDLE FileHandle, _In_ UCHAR Flags );
Parameters
-
FileHandle [in]
-
A handle to the file.
Flags [in]
-
The modes to be set. One or more modes can be set at the same time; however, after a mode has been set for a file handle, it cannot be removed.
Value Meaning -
FILE_SKIP_COMPLETION_PORT_ON_SUCCESS
0x1
If the following three conditions are true, the I/O Manager does not queue a completion entry to the port, when it would ordinarily do so. The conditions are:
- A completion port is associated with the file handle.
- The file is opened for asynchronous I/O.
- A request returns success immediately without returning ERROR_PENDING.
When the FileHandle parameter is a socket, this mode is only compatible with Layered Service Providers (LSP) that return Installable File Systems (IFS) handles. To detect whether a non-IFS LSP is installed, use the WSAEnumProtocols function and examine the dwServiceFlag1 member in each returned WSAPROTOCOL_INFO structure. If the XP1_IFS_HANDLES (0x20000) bit is cleared then the specified LSP is not an IFS LSP. Vendors that have non-IFS LSPs are encouraged to migrate to the Windows Filtering Platform (WFP).
-
FILE_SKIP_SET_EVENT_ON_HANDLE
0x2
The I/O Manager does not set the event for the file object if a request returns with a success code, or the error returned is ERROR_PENDING and the function that is called is not a synchronous function.
If an explicit event is provided for the request, it is still signaled.