how to find out free space for logical drives?


  • Hi all,<o:p></o:p>

    I am trying to get my hard disk free space for my application using windows store app, so i
    begun with GetDiskFreeSpaceEx(), But unfortunately this wrapper only returns
    for specfic drive(Primary partition eg.c:\) not for all the logical Partitions
    available in the system. So Please let me know how to find out free space for
    all the drives.<o:p></o:p>

    Note: I am passing first parameter(path) like this:<o:p></o:p>




    Wednesday, July 10, 2013 12:09 PM

All replies

  • I'm not sure what you mean by being unable to find all the logical partitions. GetDiskFreeSpaceEx should be able to target any directory. Can you provide clearer details on the scenario which fails and the error that is returned?

    Your app will need to have sufficient privileges to list the directory.


    Thursday, July 11, 2013 2:37 AM
  • Hi Rob,

    If I try to access C,D drive like below I am getting "Access Denied Error"

    GetDiskFreeSpaceEx(L"C:\\",,,) or  GetDiskFreeSpaceEx(L"D:\\",,,).

    That's what the reason i specified like below


    I don't have privilege to access these drives. So I am looking for alternate solution which satify my problem.



    • Edited by Muthazhagan Thursday, July 11, 2013 3:11 AM sentance correction
    Thursday, July 11, 2013 3:10 AM