mirror of
https://github.com/reactos/reactos.git
synced 2025-04-20 20:36:35 +00:00
[FORMAT] wmain(): Clean GetDiskFreeSpaceExW() calls up
This commit is contained in:
parent
982cf2be5e
commit
421dd31d49
1 changed files with 5 additions and 5 deletions
|
@ -367,7 +367,7 @@ int wmain(int argc, WCHAR *argv[])
|
||||||
WCHAR volumeName[1024] = {0};
|
WCHAR volumeName[1024] = {0};
|
||||||
WCHAR input[1024];
|
WCHAR input[1024];
|
||||||
DWORD serialNumber;
|
DWORD serialNumber;
|
||||||
ULARGE_INTEGER freeBytesAvailableToCaller, totalNumberOfBytes, totalNumberOfFreeBytes;
|
ULARGE_INTEGER totalNumberOfBytes, totalNumberOfFreeBytes;
|
||||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||||
|
|
||||||
/* Initialize the Console Standard Streams */
|
/* Initialize the Console Standard Streams */
|
||||||
|
@ -501,9 +501,9 @@ int wmain(int argc, WCHAR *argv[])
|
||||||
* Fallback to GetFreeDiskSpaceExW if we did not get any volume length. */
|
* Fallback to GetFreeDiskSpaceExW if we did not get any volume length. */
|
||||||
if (totalNumberOfBytes.QuadPart == 0 &&
|
if (totalNumberOfBytes.QuadPart == 0 &&
|
||||||
!GetDiskFreeSpaceExW(RootDirectory,
|
!GetDiskFreeSpaceExW(RootDirectory,
|
||||||
&freeBytesAvailableToCaller,
|
NULL,
|
||||||
&totalNumberOfBytes,
|
&totalNumberOfBytes,
|
||||||
&totalNumberOfFreeBytes))
|
NULL))
|
||||||
{
|
{
|
||||||
K32LoadStringW(GetModuleHandle(NULL), STRING_NO_VOLUME_SIZE, szMsg, ARRAYSIZE(szMsg));
|
K32LoadStringW(GetModuleHandle(NULL), STRING_NO_VOLUME_SIZE, szMsg, ARRAYSIZE(szMsg));
|
||||||
PrintWin32Error(szMsg, GetLastError());
|
PrintWin32Error(szMsg, GetLastError());
|
||||||
|
@ -612,10 +612,10 @@ int wmain(int argc, WCHAR *argv[])
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Print out some stuff including the formatted size
|
// Get and print out some stuff including the formatted size
|
||||||
//
|
//
|
||||||
if (!GetDiskFreeSpaceExW(RootDirectory,
|
if (!GetDiskFreeSpaceExW(RootDirectory,
|
||||||
&freeBytesAvailableToCaller,
|
NULL,
|
||||||
&totalNumberOfBytes,
|
&totalNumberOfBytes,
|
||||||
&totalNumberOfFreeBytes))
|
&totalNumberOfFreeBytes))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue