template <class character>
unsigned get_logical_drive_strings(unsigned size,
                                  character* buffer)

This function obtains a string listing the drives present in the system.


unsigned size

The size of the buffer pointed to by the next parameter.

character* buffer

A pointer to a buffer to hold the drive strings. Upon completion, this buffer holds a sequence of strings defining which drives are valid; with a double null signalling the end of the sequence. The string "a:\ c:\ d:\ f:\ " (with spaces replaced by nulls) is an example of how the output is presented.



If the value returned is greater than the specified buffer size, the given buffer was too small and the return value indicates the required buffer size. Otherwise, the value returned is the number of characters transferred to the buffer (not including the null terminator). If the function fails, zero is returned.


The returned strings are the names of the root directories of the drives.