网站首页  词典首页

请输入您要查询的函数:

 

术语 flushviewoffile
释义 FlushViewOfFile
语法:
C++
BOOL WINAPI FlushViewOfFile(
__in LPCVOID lpBaseAddress,
__in SIZE_T dwNumberOfBytesToFlush
);
FlushViewOfFile功能
写入到磁盘内的文件映射视图字节范围。
参数
lpBaseAddress [in]
阿对字节范围的基址指针被刷新到磁盘映射文件的代表性。
dwNumberOfBytesToFlush [in]
的字节数被刷新。如果dwNumberOfBytesToFlush是零,该文件是刷新从基地址的映射结束。
返回值
如果函数成功,返回值为非零。
如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。
备注
法拉盛的一个映射鉴于在该范围内的磁盘写脏页启动范围。脏页是那些内容已经更改,因为该文件认为映射。该FlushViewOfFile函数不刷新文件元数据,并且它不等待返回,直到改变污染物从底层硬件和物理磁盘缓存写入磁盘。要刷新所有的脏页加上该文件的元数据,并确保他们在身体写入磁盘,调用FlushViewOfFile,然后调用FlushFileBuffers函数。
当冲洗内存映射文件在网络上,FlushViewOfFile保证了数据写入从本地计算机,而不是该数据远程计算机上驻留。缓存服务器可以在远程端的数据。因此,FlushViewOfFile可以返回数据之前已实际写入磁盘。
实例
有关示例,请参见读,从文件视图写作。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinbase.h(头文件:winuser.h)
LibraryKernel32.lib
DLLKernel32.dll
参见
CreateFile
创建一个文件视图
文件映射函数
MapViewOfFile
UnmapViewOfFile
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年8月27日
==英文原文==FlushViewOfFile Function
Writes to the disk a byte range within a mapped view of a file.
Syntax
C++
BOOL WINAPI FlushViewOfFile(
__in LPCVOID lpBaseAddress,
__in SIZE_T dwNumberOfBytesToFlush
);
Parameters
lpBaseAddress [in]
A pointer to the base address of the byte range to be flushed to the disk representation of the mapped file.
dwNumberOfBytesToFlush [in]
The number of bytes to be flushed. If dwNumberOfBytesToFlush is zero, the file is flushed from the base address to the end of the mapping.
Return Value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError .
Remarks
Flushing a range of a mapped view initiates writing of dirty pages within that range to the disk. Dirty pages are those whose contents have changed since the file view was mapped. The FlushViewOfFile function does not flush the file metadata, and it does not wait to return until the changes are flushed from the underlying hardware disk cache and physically written to disk. To flush all the dirty pages plus the metadata for the file and ensure that they are physically written to disk, call FlushViewOfFile and then call the FlushFileBuffers function.
When flushing a memory-mapped file over a network, FlushViewOfFile guarantees that the data has been written from the local computer, but not that the data resides on the remote computer. The server can cache the data on the remote side. Therefore, FlushViewOfFile can return before the data has been physically written to disk.
Examples
For an example, see Reading and Writing From a File View .
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinbase.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll
See Also
CreateFile
Creating a File View
File Mapping Functions
MapViewOfFile
UnmapViewOfFile
Send comments about this topic to Microsoft
Build date: 8/27/2009
==原始网址==http://msdn.microsoft.com/en-us/library/aa366563(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 11:27:14