[DllImport("kernel32.dll", SetLastError = true)]
        static extern bool GetDiskFreeSpaceEx(
            string lpDirectoryName,
            out ulong lpFreeBytesAvaliable,
            out ulong lpTotalNumberOfBytes,
            out ulong lpTotalNumberOfFreeBytes);
        // Returns free disk space from directory.
        public static ulong GetFreeDiskSpace(string directory)
        {
            ulong a, b, c;
            if (GetDiskFreeSpaceEx(directory, out a, out b, out c))
            {
                Debug.WriteLine(a);
            }
            return a;
        }
I'm developing a Windows Store App. Why a variable contains 0 when I call:
GetFreeDiskSpace("C:\\");
?
The line with Debug.WriteLine(a) isn't executed.
 
     
     
    