| |
|
|
| From Andreas Miethe ex XProfan12: CompileMarkSeparation $H Windows.ph
CLS
Proc DriveSize1WNT
'gibt die Groesse von CD,DVD,FLOPPY,Partition oder Festplatte zurueck (NT,XP,W2K)
DEF &IOCTL_DISK_GET_LENGTH_INFO $7405C
Parameters Drive$
Declare Result!,H&,C&
Declare INT64 Res
H& = ~CreateFile("\\\\.\\"+Drive$,~GENERIC_READ,~FILE_SHARE_WRITE | ~FILE_SHARE_READ, 0,~OPEN_EXISTING,0,0)
~DeviceIoControl(H&,&IOCTL_DISK_GET_LENGTH_INFO,0,0,Addr(Res),SizeOf(Res),Addr(C&),0)
~CloseHandle(h&)
Return Res
EndProc
Decimals 2
'Grösse der 1. Festplatte
Print Format$("%6.2f GB",DriveSize1WNT("Physicaldrive0")/1024^3)
Print Format$("%6.2f GB",DriveSize1WNT("Physicaldrive1")/1024^3)
'Grösse der CD -> Pfad anpassen
Print Format$("%6.2f GB",DriveSize1WNT("C:")/1024^3)
Print Format$("%6.2f GB",DriveSize1WNT("D:")/1024^3)
Print Format$("%6.2f GB",DriveSize1WNT("G:")/1024^3)
Print Format$("%6.2f GB",DriveSize1WNT("E:")/1024^3)
Waitinput
End
|
|
|
| |
|
|