网站首页  词典首页

请输入您要查询的函数:

 

术语 getdrivetype
释义 GetDriveType
语法:
C++
UINT WINAPI GetDriveType(
__in_opt LPCTSTR lpRootPathName
);
GetDriveType函数
确定是否一个磁盘驱动器是一个可移动,固定,光盘,RAM磁盘或网络驱动器。
要确定是否是一个USB驱动器类型驱动器,呼叫SetupDiGetDeviceRegistryProperty并指定SPDRP_REMOVAL_POLICY财产。
参数
lpRootPathName [中,可选]
为驱动器的根目录。
一个尾部反斜杠是必需的。如果该参数为NULL,则函数使用当前目录的根目录。
返回值
返回值指定的驱动器类型,它可以是下列值之一。
返回代码/ valueDescription
DRIVE_UNKNOWN
0The驱动器类型无法确定。
DRIVE_NO_ROOT_DIR
1The根路径是无效的,例如,没有量在指定的路径安装。
DRIVE_REMOVABLE
2The驱动器具有可移动媒体,例如,软盘驱动器,拇指驱动器或闪存卡阅读器。
DRIVE_FIXED
3The驱动器有固定媒体,例如,硬盘驱动器或闪存驱动器。
DRIVE_REMOTE
4The驱动器是一个远程(网络)驱动器。
DRIVE_CDROM
调取驱动器是CD - ROM驱动器。
DRIVE_RAMDISK
6The驱动器是RAM磁盘。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinBase.h(头文件:winuser.h)
LibraryKernel32.lib
DLLKernel32.dll
Unicode和ANSI namesGetDriveTypeW(Unicode)和GetDriveTypeA(ANSI)的
参见
GetDiskFreeSpace
卷管理功能
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年9月3日
==英文原文==GetDriveType Function
Determines whether a disk drive is a removable, fixed, CD-ROM, RAM disk, or network drive.
To determine whether a drive is a USB-type drive, call SetupDiGetDeviceRegistryProperty and specify the SPDRP_REMOVAL_POLICY property.
Syntax
C++
UINT WINAPI GetDriveType(
__in_opt LPCTSTR lpRootPathName
);
Parameters
lpRootPathName [in, optional]
The root directory for the drive.
A trailing backslash is required. If this parameter is NULL, the function uses the root of the current directory.
Return Value
The return value specifies the type of drive, which can be one of the following values.
Return code/valueDescription
DRIVE_UNKNOWN
0The drive type cannot be determined.
DRIVE_NO_ROOT_DIR
1The root path is invalid; for example, there is no volume mounted at the specified path.
DRIVE_REMOVABLE
2The drive has removable media; for example, a floppy drive, thumb drive, or flash card reader.
DRIVE_FIXED
3The drive has fixed media; for example, a hard drive or flash drive.
DRIVE_REMOTE
4The drive is a remote (network) drive.
DRIVE_CDROM
5The drive is a CD-ROM drive.
DRIVE_RAMDISK
6The drive is a RAM disk.

Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinBase.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll
Unicode and ANSI namesGetDriveTypeW (Unicode) and GetDriveTypeA (ANSI)
See Also
GetDiskFreeSpace
Volume Management Functions
Send comments about this topic to Microsoft
Build date: 9/3/2009
==原始网址==http://msdn.microsoft.com/en-us/library/aa364939(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:23:16