+ Reply to Thread
Results 1 to 2 of 2

Thread: How to get used disk space of a specified drive?

  1. #1
    Junior Member
    Join Date
    Feb 2012
    Posts
    48

    How to get used disk space of a specified drive?

    How to get used disk space of a specified drive?

    I want to display tray icon notification if disk space running out of space on certain percentage which is configurable.

    I want to get the disk space of each drive on the system.

    How can I do this?

  2. #2
    Example:

    Code:
    void GetDiskSpace()
    {
           ULARGE_INTEGER lFreeBytesAvailable, lTotalNumberOfBytes, lTotalNumberOfFreeBytes ;
    	GetDiskFreeSpaceEx("D:\\", &lFreeBytesAvailable, &lTotalNumberOfBytes, &lTotalNumberOfFreeBytes) ;
    }
    You can use above code with GetLogicalDriveStrings API.

+ Reply to Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts