获取字符串形式的盘符可以用GetLogicalDriveStrings API:
The GetLogicalDriveStrings function fills a buffer with strings that specify valid drives in the system.
DWORD GetLogicalDriveStrings(
DWORD nBufferLength, // size of buffer
LPTSTR lpBuffer // drive strings buffer
);
Parameters
nBufferLength
[in] Specifies the maximum size, in characters, of the buffer pointed to by lpBuffer. This size does not include the terminating null character. If this parameter is zero, lpBuffer is not used.
lpBuffer
[out] Pointer to a buffer that receives a series of null-terminated strings, one for each valid drive in the system, that end with a second null character. The following example shows the buffer contents with <null> representing the terminating null character.
c:/<null>d:/<null><null>