网站首页  词典首页

请输入您要查询的函数:

 

术语 findnextfile
释义 FindNextFile
语法:
C++
BOOL WINAPI FindNextFile(
__in HANDLE hFindFile,
__out LPWIN32_FIND_DATA lpFindFileData
);
FindNextFile函数
继续从以前调用文件搜索到FindFirstFile或FindFirstFileEx功能。
参数
hFindFile [in]
返回的搜索处理因先前调用FindFirstFile或FindFirstFileEx功能。
lpFindFileData [out]
向WIN32_FIND_DATA结构,收到约找到的文件或子目录信息的指针。
该结构可用于后续调用的FindNextFile表明从哪个文件,继续搜索。
返回值
如果函数成功,返回值为非零和lpFindFileData参数包含下一个文件或目录信息找到。
如果函数失败,返回值为零和lpFindFileData的内容是不确定的。为了获得更多错误信息,调用GetLastError函数。
如果函数失败,因为没有更多的匹配的文件可以发现,GetLastError函数返回ERROR_NO_MORE_FILES。
备注
这个函数使用相同的搜索,用于创建搜索处理参数传递的hFindFile过滤器。有关其他信息,请参见FindFirstFile和FindFirstFileEx。
在返回的搜索,如按字母顺序排列的文件,不能保证秩序,并在文件系统的依赖。如果数据要进行排序,应用程序必须执行命令后,获得所有的结果。
注意:在极少数情况下,文件属性信息在NTFS文件系统可能无法在当您调用这个函数电流。为了放心,让目前的NTFS文件系统文件属性,调用GetFileInformationByHandle功能。
该命令在本函数返回的文件名是依赖于文件系统类型。用NTFS文件系统和CDFS文件的名称通常是按字母顺序返回系统。由于FAT文件系统,通常的名称中返回的文件被写入到磁盘,这可能是也可能不是按字母顺序排列顺序。然而,如前所述,这些行为都不能保证。
如果路径指向一个符号链接,WIN32_FIND_DATA缓冲区包含符号链接信息,而不是目标。
交易业务
如果绑定到文件枚举处理事务,那么返回的文件是受事务隔离规则。
实例
有关示例,请参见清单目录中的文件。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinBase.h(头文件:winuser.h)
LibraryKernel32.lib
DLLKernel32.dll
Unicode和ANSI namesFindNextFileW(Unicode)和FindNextFileA(ANSI)的
参见
文件管理函数
FindClose
FindFirstFile
FindFirstFileEx
GetFileAttributes
SetFileAttributes
符号链接
WIN32_FIND_DATA
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年9月3日
==英文原文==FindNextFile Function
Continues a file search from a previous call to the FindFirstFile or FindFirstFileEx function.
Syntax
C++
BOOL WINAPI FindNextFile(
__in HANDLE hFindFile,
__out LPWIN32_FIND_DATA lpFindFileData
);
Parameters
hFindFile [in]
The search handle returned by a previous call to the FindFirstFile or FindFirstFileEx function.
lpFindFileData [out]
A pointer to the WIN32_FIND_DATA structure that receives information about the found file or subdirectory.
The structure can be used in subsequent calls to FindNextFile to indicate from which file to continue the search.
Return Value
If the function succeeds, the return value is nonzero and the lpFindFileData parameter contains information about the next file or directory found.
If the function fails, the return value is zero and the contents of lpFindFileData are indeterminate. To get extended error information, call the GetLastError function.
If the function fails because no more matching files can be found, the GetLastError function returns ERROR_NO_MORE_FILES.
Remarks
This function uses the same search filters that were used to create the search handle passed in the hFindFile parameter. For additional information, see FindFirstFile and FindFirstFileEx.
The order in which the search returns the files, such as alphabetical order, is not guaranteed, and is dependent on the file system. If the data must be sorted, the application must do the ordering after obtaining all the results.
Note In rare cases, file attribute information on NTFS file systems may not be current at the time you call this function. To be assured of getting the current NTFS file system file attributes, call the GetFileInformationByHandle function.
The order in which this function returns the file names is dependent on the file system type. With the NTFS file system and CDFS file systems, the names are usually returned in alphabetical order. With FAT file systems, the names are usually returned in the order the files were written to the disk, which may or may not be in alphabetical order. However, as stated previously, these behaviors are not guaranteed.
If the path points to a symbolic link, the WIN32_FIND_DATA buffer contains information about the symbolic link, not the target.
Transacted Operations
If there is a transaction bound to the file enumeration handle, then the files that are returned are subject to transaction isolation rules.
Examples
For an example, see Listing the Files in a Directory .
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinBase.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll
Unicode and ANSI namesFindNextFileW (Unicode) and FindNextFileA (ANSI)
See Also
File Management Functions
FindClose
FindFirstFile
FindFirstFileEx
GetFileAttributes
SetFileAttributes
Symbolic Links
WIN32_FIND_DATA
Send comments about this topic to Microsoft
Build date: 9/3/2009
==原始网址==http://msdn.microsoft.com/en-us/library/aa364428(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:22:44