Dim intSectors, intBytes, intFreeC, intTotalC, intTotal ,intFreeb
' include this windows api
extern.Declare micLong, "GetDiskFreeSpace", "kernel32.dll", "GetDiskFreeSpaceA", micString+micByref, micLong+micByref, micLong+micByref,micLong+micByref,micLong+micByref
' set these values
intSectors = 255
intBytes = 255
intFreeC = 255
intTotalC = 255
' calculate the disk space, using C: in this example
intSpaceAvailable = extern.GetDiskFreeSpace("c:\", intSectors, intBytes, intFreeC, intTotalC)
' calculate the totals
intTotal = intTotalC * intSectors * intBytes
intFreeb = intFreeC * intSectors * intBytes
' show the outputs
msgBox intSectors
msgBox intBytes
msgBox intFreeC
msgBox intTotalC
msgbox intTotal
msgBox intFreeb
Wednesday, 19 October 2011
QTP Script: Get information about one of your disk drives
08:03
1 comment
Subscribe to:
Post Comments (Atom)
Great Blog with Good Information.
ReplyDeleteqtp online training
QTP Training in Chennai
automation testing training in bangalore