Syntax
VMUINT vm_fs_get_disk_free_space(
    VMCHAR drive_letter
);
ContentsIndex
PreviousUpNext
vm_fs_get_disk_free_space
Example
Syntax
VMUINT vm_fs_get_disk_free_space(
    VMCHAR drive_letter
);
Description

Checks the available free space on the specified drive. It returns the size of the available free space in bytes.

Parameters
Parameters 
Description 
VMCHAR drive_letter 
[IN] The drive letter string terminated by '0'. 
Returns

The size of the available free space in bytes. If the return value is 0, it 

indicates that the specified drive does not exist. 

 

If the return value is 0xFFFFFFFF, it indicates the size of the available 

free space exceeds the limitation of the return type (VMUINT, 32-bit) of this 

function can represent. In this case, the vm_fs_get_disk_info() should be used. 

 

Example
VMINT sys_drive = -1;
VMUINT sys_drive_size = 0;
if ((sys_drive = vm_fs_get_system_drive()) >= 0)
{
    VMCHAR drive_str[2] = {0};

    sprintf(drive_str, "%c", (VMCHAR)sys_drive);
    sys_drive_size = vm_fs_get_disk_free_space(vm_ucs2_string(drive_str));
}
File

vmfs.h

Group
Created with a commercial version of Doc-O-Matic. In order to make this message disappear you need to register this software. If you have problems registering this software please contact us at support@toolsfactory.com.