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.
|
- 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 0x0501 or later. For more
information, see Using the Windows
Headers.
Requirements
| Minimum supported client | Windows Vista |
| Minimum supported server | Windows Server 2008 |
| Header | WinBase.h |
| Library | Kernel32.lib |
| DLL | Kernel32.dll |
See Also
- File Management Functions
Send comments about this topic to Microsoft
Build date: 11/12/2009