Skip to content

Latest commit

 

History

History
160 lines (127 loc) · 3.62 KB

nf-fileapi-setfileiooverlappedrange.md

File metadata and controls

160 lines (127 loc) · 3.62 KB
UIDtitledescriptionhelpviewer_keywordsold-locationtech.rootms.assetidms.datems.keywordsreq.headerreq.include-headerreq.target-typereq.target-min-winverclntreq.target-min-winversvrreq.kmdf-verreq.umdf-verreq.ddi-compliancereq.unicode-ansireq.idlreq.max-supportreq.namespacereq.assemblyreq.type-libraryreq.libreq.dllreq.irqltargetosreq.typenamesreq.redistms.customf1_keywordsdev_langstopic_typeapi_typeapi_locationapi_name
NF:fileapi.SetFileIoOverlappedRange
SetFileIoOverlappedRange function (fileapi.h)
Associates a virtual address range with the specified file handle.
SetFileIoOverlappedRange
SetFileIoOverlappedRange function [Files]
fileapi/SetFileIoOverlappedRange
fs.setfileiooverlappedrange_func
fs\setfileiooverlappedrange_func.htm
fs
4e7eff5e-2877-4524-8f76-55d41afe521d
12/05/2018
SetFileIoOverlappedRange, SetFileIoOverlappedRange function [Files], fileapi/SetFileIoOverlappedRange, fs.setfileiooverlappedrange_func
fileapi.h
Windows.h, WinBase.h
Windows
Windows Vista [desktop apps only]
Windows Server 2008 [desktop apps only]
Kernel32.lib
Kernel32.dll
Windows
19H1
SetFileIoOverlappedRange
fileapi/SetFileIoOverlappedRange
c++
APIRef
kbSyntax
DllExport
Kernel32.dll
API-MS-Win-Core-File-l1-2-1.dll
KernelBase.dll
API-MS-Win-Core-File-l1-2-2.dll
API-MS-Win-DownLevel-Kernel32-l1-1-0.dll
MinKernelBase.dll
SetFileIoOverlappedRange

SetFileIoOverlappedRange function

-description

Associates a virtual address range with the specified file handle. This indicates that the kernel should optimize any further asynchronous I/O requests with overlapped structures inside this range. The overlapped range is locked in memory, and then unlocked when the file is closed. After a range is associated with a file handle, it cannot be disassociated.

-parameters

-param FileHandle [in]

A handle to the file.

This file handle must be opened with FILE_READ_ATTRIBUTES access rights.

-param OverlappedRangeStart [in]

The starting address for the range.

-param Length [in]

The length of the range, in bytes.

-returns

Returns nonzero if successful or zero otherwise.

To get extended error information, call GetLastError.

-remarks

SetFileIoOverlappedRange can be used to improve performance in an application that issues a high number of asynchronous unbuffered I/O and uses a defined range of overlapped structures. Because this range of structures is locked in memory, the kernel can avoid acquiring certain locks when updating the overlapped structures with the results of the I/O request.

SetFileIoOverlappedRange requires the caller to have the SeLockMemoryPrivilege access privilege.

This function has no effect on buffered and synchronous I/O.

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

-see-also

File Management Functions

close