Platform SDK: Win32 API |
Returns the total disk space and the free disk space.
mov dx, seg Buffer mov es, dx mov di, offset Buffer ;See below mov es:[di].ExtGetDskFreSpcStruc.ExtFree_Level, ExpectLevel mov cx, BufferSize ;See below mov dx, seg DriveName ;See below mov ds, dx mov dx, offset DriveName ;See below mov ax, 7303h ;Get_ExtFreeSpace int 21h jc error_handler ;carry set means error
Clears the carry flag and returns the total disk space and the free disk space of the specified drive, in the form of an ExtGetDskFreSpcStruc structure, to a buffer at ES:DI. It is recommended to initialize the buffer to the level value the application expects to receive.
When calling this function with DeviceIoControl, the dwloControlCode parameter must be set to VWIN32_DIOC_DOS_IOCTL (defined as 6 in VWIN32.H). For more information, see Using VWIN32 to Carry Out MS-DOS Functions.