get_volume_information


template<class character>
bool get_volume_information(const character* root,
                            character* colume,
                            unsigned columename_size,
                            unsigned* serial,
                            unsigned* component,
                            unsigned* flags,
                            character* file_system_name,
                            unsigned name_size)

This function obtains information about a specified volume.

Parameters

const character* root

A pointer to the name of the root of the volume whose information is being queried. If this parameter is null, the root of the current drive/directory is used. If this parameter is a universal network name, the overall form of the name is "\\Servername\Sharename".

character* volume

A pointer to a buffer to hold the name of the volume.

unsigned volume_name_size

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

unsigned* serial

A pointer to a variable to hold the volume/serial number. If null is specified, no volume serial number information is returned.

unsigned* component

A pointer to a variable to hold the maximum component name length.

unsigned* flags

A pointer to a variable to hold the file system flags. A selection of flags from the enumeration file_system_support may be specified.

character* file_system_name

A pointer to a buffer to hold the file system name (e.g. FAT, NTFS). If the volume name is not supplied, this parameter is ignored.

unsigned name_size

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

Return

bool

true The function succeeded.
false The call failed.

Notes

If this function specifies a drive that has removeable storage (such as a floppy disk or compact disk), and no media is present, by default the system displays a message box asking for the media to be inserted. This message may be suppressed by calling the function set_error_mode.