网站首页  词典首页

请输入您要查询的函数:

 

术语 getfiletype
释义 GetFileType
语法:
C++
DWORD WINAPI GetFileType(
__in HANDLE hFile
);
GetFileType功能
检索文件指定文件类型。
参数
hFile [in]
阿处理该文件。
返回值
该函数返回下列值之一。
返回代码/ valueDescription
FILE_TYPE_CHAR
0x0002The指定的文件是一个字符的文件,通常是LPT连接设备或控制台。
FILE_TYPE_DISK
0x0001The指定的文件是一个磁盘文件。
FILE_TYPE_PIPE
0x0003The指定的文件是一个插座,一个命名管道,或匿名管道。
FILE_TYPE_REMOTE
0x8000Unused。
FILE_TYPE_UNKNOWN
0x0000Either指定的文件类型是未知的,或者函数失败。
您可以区分“有效”回归FILE_TYPE_UNKNOWN,回归由于调用错误(例如,通过一个无效的句柄GetFileType通过调用GetLastError函数)。
如果函数工作,妥善FILE_TYPE_UNKNOWN归还,对GetLastError函数调用将返回NO_ERROR。
如果该函数返回FILE_TYPE_UNKNOWN一个在调用GetFileType造成的错误,GetLastError函数将返回错误代码。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinBase.h(头文件:winuser.h)
LibraryKernel32.lib
DLLKernel32.dll
参见
文件管理函数
GetFileSize
GetFileTime
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年9月3日
==英文原文==GetFileType Function
Retrieves the file type of the specified file.
Syntax
C++
DWORD WINAPI GetFileType(
__in HANDLE hFile
);
Parameters
hFile [in]
A handle to the file.
Return Value
The function returns one of the following values.
Return code/valueDescription
FILE_TYPE_CHAR
0x0002The specified file is a character file, typically an LPT device or a console.
FILE_TYPE_DISK
0x0001The specified file is a disk file.
FILE_TYPE_PIPE
0x0003The specified file is a socket, a named pipe, or an anonymous pipe.
FILE_TYPE_REMOTE
0x8000Unused.
FILE_TYPE_UNKNOWN
0x0000Either the type of the specified file is unknown, or the function failed.

You can distinguish between a "valid" return of FILE_TYPE_UNKNOWN and its return due to a calling error (for example, passing an invalid handle to GetFileType) by calling GetLastError .
If the function worked properly and FILE_TYPE_UNKNOWN was returned, a call to GetLastError will return NO_ERROR.
If the function returned FILE_TYPE_UNKNOWN due to an error in calling GetFileType, GetLastError will return the error code.
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
GetFileSize
GetFileTime
Send comments about this topic to Microsoft
Build date: 9/3/2009
==原始网址==http://msdn.microsoft.com/en-us/library/aa364960(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:38