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.
SyntaxUINT GetDriveTypeA(
[in, optional] LPCSTR lpRootPathName
);
Parameters
[in, optional] lpRootPathName
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 valueThe return value specifies the type of drive, which can be one of the following values.
Return code/value DescriptionIn Windows 8 and Windows Server 2012, this function is supported by the following technologies.
Technology Supported Server Message Block (SMB) 3.0 protocol No SMB 3.0 Transparent Failover (TFO) No SMB 3.0 with Scale-out File Shares (SO) No Cluster Shared Volume File System (CsvFS) Yes Resilient File System (ReFS) YesSMB does not support volume management functions.
Note
The fileapi.h header defines GetDriveType as an alias that automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that is not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
Requirements Requirement Value Minimum supported client Windows XP [desktop apps | UWP apps] Minimum supported server Windows Server 2003 [desktop apps | UWP apps] Target Platform Windows Header fileapi.h (include Windows.h) Library Kernel32.lib DLL Kernel32.dll See alsoRetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4