网站首页  词典首页

请输入您要查询的函数:

 

术语 getfileinformationbyhandle
释义 GetFileInformationByHandle
语法:
C++
BOOL WINAPI GetFileInformationByHandle(
__in HANDLE hFile,
__out LPBY_HANDLE_FILE_INFORMATION lpFileInformation
);
GetFileInformationByHandle功能
检索文件指定的文件资料。
有关此功能的更先进的版本,请GetFileInformationByHandleEx。
要设置文件中的信息使用的文件句柄,见SetFileInformationByHandle。
参数
hFile [in]
一个句柄,文件包含要检索的信息。
这种处理不应该是一个管道句柄。
lpFileInformation [out]
一个 BY_HANDLE_FILE_INFORMATION结构,接收文件的信息的指针。
返回值
如果函数成功,返回值为非零和文件资料,数据包含在所指出的缓冲区的lpFileInformation参数。
如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。
备注
根据不同的操作系统的底层网络组件和类型的服务器连接的GetFileInformationByHandle功能可能会失败,返回的部分信息,或给定文件的完整信息。
您可以比较VolumeSerialNumber和BY_HANDLE_FILE_INFORMATION返回FileIndex成员结构,以确定是否两个路径映射到相同的目标,例如,您可以比较两个文件路径和确定它们是否映射到相同的目录中。
交易业务
如果有约束力的通话时间到线程交易,则函数返回孤立文件查看压缩文件的大小。有关更多信息,请参阅关于交互式NTFS。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinBase.h(头文件:winuser.h)
LibraryKernel32.lib
DLLKernel32.dll
参见
文件管理函数
GetFileInformationByHandleEx
SetFileInformationByHandle
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年9月3日
==英文原文==GetFileInformationByHandle Function
Retrieves file information for the specified file.
For a more advanced version of this function, see GetFileInformationByHandleEx .
To set file information using a file handle, see SetFileInformationByHandle .
Syntax
C++
BOOL WINAPI GetFileInformationByHandle(
__in HANDLE hFile,
__out LPBY_HANDLE_FILE_INFORMATION lpFileInformation
);
Parameters
hFile [in]
A handle to the file that contains the information to be retrieved.
This handle should not be a pipe handle.
lpFileInformation [out]
A pointer to a BY_HANDLE_FILE_INFORMATION structure that receives the file information.
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
Depending on the underlying network components of the operating system and the type of server connected to, the GetFileInformationByHandle function may fail, return partial information, or full information for the given file.
You can compare the VolumeSerialNumber and FileIndex members returned in the BY_HANDLE_FILE_INFORMATION structure to determine if two paths map to the same target; for example, you can compare two file paths and determine if they map to the same directory.
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 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinBase.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll
See Also
File Management Functions
GetFileInformationByHandleEx
SetFileInformationByHandle
Send comments about this topic to Microsoft
Build date: 9/3/2009
==原始网址==http://msdn.microsoft.com/en-us/library/aa364952(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:30:44