GetLogicalDriveStrings<br>The GetLogicalDriveStrings function fills a buffer with strings that specify valid drives in the system. <br><br>DWORD GetLogicalDriveStrings(<br> DWORD nBufferLength, // size of buffer<br> LPTSTR lpBuffer // drive strings buffer<br>);<br>Parameters<br>nBufferLength <br>[in] Specifies the maximum size, in characters, of the buffer pointed to by lpBuffer. This size does not include the terminating null character. <br>lpBuffer <br>[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. <br>c:/<null>d:/<null><null> <br>Return Values<br>If the function succeeds, the return value is the length, in characters, of the strings copied to the buffer, not including the terminating null character. Note that an ANSI-ASCII null character uses one byte, but a Unicode null character uses two bytes. <br><br>If the buffer is not large enough, the return value is greater than nBufferLength. It is the size of the buffer required to hold the drive strings. <br><br>If the function fails, the return value is zero. To get extended error information, use the GetLastError function. <br><br>Remarks<br>Each string in the buffer may be used wherever a root directory is required, such as for the GetDriveType and GetDiskFreeSpace functions. <br><br>Requirements <br> Windows NT/2000: Requires Windows NT 3.1 or later.<br> Windows 95/98: Requires Windows 95 or later.<br> Header: Declared in Winbase.h; include Windows.h.<br> Library: Use Kernel32.lib.<br> Unicode: Implemented as Unicode and ANSI versions on Windows NT/2000.<br><br>See Also<br>File I/O Overview, File I/O Functions, GetDriveType, GetDiskFreeSpace, GetLogicalDrives <br><br>Built on Wednesday, July 19, 2000