| |
|
|
|
Description:
GetDiskFreeSpaceEx supply data over the whole and the disengaged Speicherplatz one Laufwerks.
Deklaration:
DEF @GetDiskFreeSpaceEx(4) !kernel32,GetDiskFreeSpaceExA
Parameter:
1.Parameter: address one Strings or Memory-Variable with a Strings, the the Rootverzeichnis the abzufragenden Laufwerks contains. 2.Parameter: ULARGE_INTEGER Structure or 8 byte Memory-Variable, The whom for actually User available Speicherplatz contains.=> byte 0-3 = The downstairs 4 Bytes the Wertes the disengaged Speicherplatzes (0 To 2^32-1 Bytes). byte 4-7 = The oberen 4 Bytes the Wertes the disengaged Speicherplatzes. (2^32 Bytes To 2^64-1 Bytes). 3.Parameter: ULARGE_INTEGER Structure or 8 byte Memory-Variable, The whom whole Speicherplatz the Laufwerks contains.=> byte 0-3 = The downstairs 4 Bytes the Wertes the disengaged Speicherplatzes (0 To 2^32-1 Bytes). byte 4-7 = The oberen 4 Bytes the Wertes the disengaged Speicherplatzes. (2^32 Bytes To 2^64-1 Bytes). 4.Parameter: ULARGE_INTEGER Structure or 8 byte Memory-Variable, The whom whole disengaged Speicherplatz the Laufwerks contains.=> byte 0-3 = The downstairs 4 Bytes the Wertes the disengaged Speicherplatzes (0 To 2^32-1 Bytes). byte 4-7 = The oberen 4 Bytes the Wertes the disengaged Speicherplatzes. (2^32 Bytes To 2^64-1 Bytes).
Return Value:
1 with success, 0 with Error.
Examples:
DEF @GetDiskFreeSpaceEx(4) !"kernel32","GetDiskFreeSpaceExA"
Declare LWERK$,Free#,utterly#,utterly!,Free!,TotalFree!,TotalFree#
...because of bow in Profan wandele I Words and not LongInts circa...
Proc TransformWord detour über Word...
Parameters High&,Push%
Declare BitCount%,High!
Let BitCount%=0
While BitCount%<16
IF @TestBit(High&,BitCount%)=1
LET HIGH!=HIGH!+2^(BitCount%+Push%)
endif
inc BitCount%
Wend
Return HIGH!
Endproc
Windowstyle 31
Windowtitle "Diskspace"
Window 0,0-640,440
LET LWERK$="E:"
DIM Free#,8
DIM utterly#,8
DIM TOTALFREE#,8
Decimals 0
@GetDiskFreeSpaceEx(@ADDR(LWERK$),Free#,utterly#,TOTALFREE#)
LET FREE!=@Word(Free#,0)
TransformWord @Word(Free#,2),16
LET Free!=FREE!+@!(0)
TransformWord @Long(Free#,4),32
LET Free!=Free!+@!(0)
TransformWord @Long(Free#,6),40
LET Free!=Free!+@!(0)
LET utterly!=@Word(utterly#,0)
TransformWord @Word(utterly#,2),16
LET utterly!=utterly!+@!(0)
TransformWord @Long(utterly#,4),32
LET utterly!=utterly!+@!(0)
TransformWord @Long(utterly#,6),40
LET utterly!=utterly!+@!(0)
LET TOTALFREE!=@Word(TOTALFREE#,0)
TransformWord @Word(TOTALFREE#,2),16
LET TOTALFREE!=TOTALFREE!+@!(0)
TransformWord @Long(TOTALFREE#,4),32
LET TOTALFREE!=TOTALFREE!+@!(0)
TransformWord @Long(TOTALFREE#,6),40
LET TOTALFREE!=TOTALFREE!+@!(0)
Dispose Free#
Dispose utterly#
Dispose TOTALFREE#
PRINT "Frei for User=";Free!
Print "Größe the Platte=";Total!
Print "Insgesammt frei=";TOTALFREE!
While 0=0
Waitinput
Wend
[keywords:77dce4ae0a] Speicherplatz drive spare available verfügbarer to determine experienced read total [/keywords:77dce4ae0a] |
|
|
| |
|
|