내보내기(0) 인쇄
모두 확장
EN
이 콘텐츠는 한국어로 제공되지 않아 영어 버전으로 표시됩니다.

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.

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.

 

Return value

Returns nonzero if successful or zero otherwise.

To get extended error information, call GetLastError.

Remarks

To compile an application that uses this function, define the _WIN32_WINNT macro as 0x0600 or later. For more information, see Using the Windows Headers.

In Windows 8 and Windows Server 2012, this function is supported by the following technologies.

TechnologySupported

Server Message Block (SMB) 3.0 protocol

Yes

SMB 3.0 Transparent Failover (TFO)

Yes

SMB 3.0 with Scale-out File Shares (SO)

Yes

Cluster Shared Volume File System (CsvFS)

Yes

Resilient File System (ReFS)

Yes

 

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

WinBase.h (include Windows.h)

Library

Kernel32.lib

DLL

Kernel32.dll

See also

File Management Functions

 

 

커뮤니티 추가 항목

추가
표시:
© 2014 Microsoft