SetFileCompletionNotificationModes FILE_SKIP_COMPLETION_PORT_ON_SUCCESS

SetFileCompletionNotificationModes function

Sets the notification modes for a file handle, allowing you to specify how completion notifications work for the specified file.

Syntax

C++
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.

ValueMeaning
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.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值