网站首页  词典首页

请输入您要查询的函数:

 

术语 getfileinformationbyhandleex
释义 GetFileInformationByHandleEx
语法:
C++
BOOL WINAPI GetFileInformationByHandleEx(
__in HANDLE hFile,
__in FILE_INFO_BY_HANDLE_CLASS FileInformationClass,
__out LPVOID lpFileInformation,
__in DWORD dwBufferSize
);
GetFileInformationByHandleEx功能
检索文件指定的文件资料。
有关此功能的更基本的版本,请GetFileInformationByHandle。
要设置文件中的信息使用的文件句柄,见SetFileInformationByHandle。
参数
hFile [in]
一个句柄,文件包含要检索的信息。
这种处理不应该是一个管道句柄。
FileInformationClass [in]
阿FILE_INFO_BY_HANDLE_CLASS枚举值,指定的资料类型检索。
要获取有效值的表,请参见备注部分。
lpFileInformation [out]
一个缓冲区,接收请求的文件信息的指针。返回的结构相对应的是FileInformationClass指定的类。对于一个有效的结构类型的表,请参见备注部分。
dwBufferSize [in]
该lpFileInformation缓冲区大小,以字节为单位。
返回值
如果函数成功,返回值为非零和文件资料,数据包含在所指出的缓冲区的lpFileInformation参数。
如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。
备注
如果FileInformationClass是FileStreamInfo和调用成功,但没有流产生,即由GetLastError函数返回的错误是ERROR_HANDLE_EOF。
某些文件信息略有不同类的行为在不同的操作系统版本。这些类支持的基本驱动程序,并返回任何信息,他们随时可能更改操作系统版本之间。
下表显示的有效文件的信息类类型与使用这功能,及其相应的数据结构类型。
FileInformationClass valuelpFileInformation类型
FileBasicInfoFILE_BASIC_INFO
FileStandardInfoFILE_STANDARD_INFO
FileNameInfoFILE_NAME_INFO
FileStreamInfoFILE_STREAM_INFO
FileCompressionInfoFILE_COMPRESSION_INFO
FileAttributeTagInfoFILE_ATTRIBUTE_TAG_INFO
FileIdBothDirectoryInfoFILE_ID_BOTH_DIR_INFO
FileIdBothDirectoryRestartInfoFILE_ID_BOTH_DIR_INFO
FileRemoteProtocolInfoFILE_REMOTE_PROTOCOL_INFORMATION
交易业务
如果有约束力的通话时间到线程交易,则函数返回孤立文件查看压缩文件的大小。有关更多信息,请参阅关于交互式NTFS。
要求:
client最低支持Vista
server最低支持 Windows Server 2008
RedistributableWindows SDK的在Windows Server 2003和Windows XP。
HeaderWinBase.h(头文件:winuser.h),在Windows Server 2003和Windows XP的FileExtd.h
LibraryKernel32.lib,在Windows Server 2003和Windows XP的FileExtd.lib
DLLKernel32.dll
参见
文件管理函数
SetFileInformationByHandle
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年9月3日
==英文原文==GetFileInformationByHandleEx Function
Retrieves file information for the specified file.
For a more basic version of this function, see GetFileInformationByHandle .
To set file information using a file handle, see SetFileInformationByHandle .
Syntax
C++
BOOL WINAPI GetFileInformationByHandleEx(
__in HANDLE hFile,
__in FILE_INFO_BY_HANDLE_CLASS FileInformationClass,
__out LPVOID lpFileInformation,
__in DWORD dwBufferSize
);
Parameters
hFile [in]
A handle to the file that contains the information to be retrieved.
This handle should not be a pipe handle.
FileInformationClass [in]
A FILE_INFO_BY_HANDLE_CLASS enumeration value that specifies the type of information to be retrieved.
For a table of valid values, see the Remarks section.
lpFileInformation [out]
A pointer to the buffer that receives the requested file information. The structure that is returned corresponds to the class that is specified by FileInformationClass. For a table of valid structure types, see the Remarks section.
dwBufferSize [in]
The size of the lpFileInformation buffer, in bytes.
Return Value
If the function succeeds, the return value is nonzero and file information data is contained in the buffer pointed to by the lpFileInformation parameter.
If the function fails, the return value is zero. To get extended error information, call GetLastError .
Remarks
If FileInformationClass is FileStreamInfo and the calls succeed but no streams are returned, the error that is returned by GetLastError is ERROR_HANDLE_EOF.
Certain file information classes behave slightly differently on different operating system releases. These classes are supported by the underlying drivers, and any information they return is subject to change between operating system releases.
The following table shows the valid file information class types and their corresponding data structure types for use with this function.
FileInformationClass valuelpFileInformation type
FileBasicInfoFILE_BASIC_INFO
FileStandardInfoFILE_STANDARD_INFO
FileNameInfoFILE_NAME_INFO
FileStreamInfoFILE_STREAM_INFO
FileCompressionInfoFILE_COMPRESSION_INFO
FileAttributeTagInfoFILE_ATTRIBUTE_TAG_INFO
FileIdBothDirectoryInfoFILE_ID_BOTH_DIR_INFO
FileIdBothDirectoryRestartInfoFILE_ID_BOTH_DIR_INFO
FileRemoteProtocolInfoFILE_REMOTE_PROTOCOL_INFORMATION

Transacted Operations
If there is a transaction bound to the thread at the time of the call, then the function returns the compressed file size of the isolated file view. For more information, see About Transactional NTFS .
Requirements
Minimum supported clientWindows Vista
Minimum supported serverWindows Server 2008
RedistributableWindows SDK on Windows Server 2003 and Windows XP.
HeaderWinBase.h (include Windows.h), FileExtd.h on Windows Server 2003 and Windows XP
LibraryKernel32.lib, FileExtd.lib on Windows Server 2003 and Windows XP
DLLKernel32.dll
See Also
File Management Functions
SetFileInformationByHandle
Send comments about this topic to Microsoft
Build date: 9/3/2009
==原始网址==http://msdn.microsoft.com/en-us/library/aa364953(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:25:11