GetFree.exe
Video Capture Help ] AVIFile Tutorial ] Licensing and Distribution ] Resources ] Awards ] Latest News ] Source Code ] Free Controls ]

 

GENERIC FUNCTIONS FOR GETTING DISK SPACE FROM VB
(latest version 1.03 updated 02/24/99)
Download (10k) VB source here!

Also check out the new GetFreeX dll in the Controls section.

This sample project demos how to safely use the new GetDiskFreeSpaceEx() API for large drives from VB5. GetDiskfreeEx() returns 3 ULARGE_INTEGER values which are not supported in Visual Basic.

Techniques demonstrated in this project
---------------------------------------
-Handling GetDiskFreeSpaceEx() API which returns
three 64bit long integers
-Using GetProcAddress() to determine at runtime
if newer APIs are available on the current platform

Useful functions in GetFree.bas
--------------------------------
ExistGetDiskFreeSpaceEx()
vbGetAvailableBytesAsString()
vbGetTotalBytesAsString()
vbGetAvailableKBytesAsString()
vbGetTotalKBytesAsString()
vbGetAvailableMBytesAsString()
vbGetTotalMBytesAsString()
vbGetPercentAvailable() - NEW!


You may freely use and modify this code in your
own programs. However, you may not redistribute
this archive without permission from Ray Mercer
<raymer@shrinkwrapvb.com>

Copyright (c) 1998-2000, Ray Mercer - All Rights Reserved