Volume info - Petewg/harbour-core GitHub Wiki
/*
* File : volume.prg
* Purpose : prints disk(s)'s volume info
* Compile : hbmk2 -w3 -es2 -gtwvt -run volume hbwin.hbc
* Copyright 2014 Pete D.
* LGPL & CC Attribution-ShareAlike 4.0 International License.
*/
#require "hbwin"
PROCEDURE Main()
LOCAL cVolumeName, nSerial, nMaxComponentLenght, ;
nFileSystemFlags, cFileSystemName
LOCAL nLine, n
SetColor( "g++/n" )
CLS
nLine := 0
FOR n := 65 to (65 + 26)
IF wapi_GetVolumeInformation( chr(n) +":\", @cVolumeName, @nSerial, ;
@nMaxComponentLenght, @nFileSystemFlags, ;
@cFileSystemName )
? "Disk " + chr(n)
? "----------- "
? "Volume name :", ltrim( hb_valtostr( cVolumeName ) )
? "Serial number :", ltrim( hb_valtostr( nSerial ) )
? "Max Component Lenght:", ltrim( hb_valtostr( nMaxComponentLenght ) )
? "File System Flags :", ltrim( hb_valtostr( nFileSystemFlags ) )
? "File System Name :", ltrim( hb_valtostr( cFileSystemName ) )
?
nLine += 8
IF nLine > 16
WAIT ; CLS ; nLine := 0
ENDIF
ENDIF
NEXT
WAIT
RETURN
Back to Code-Snippets