wbemprox: Do not omit mandatory argument to DeviceIoControl.

This commit is contained in:
Thomas Faber 2014-07-19 20:52:03 +02:00 committed by Alexandre Julliard
parent 7e456b8f25
commit b5bcc63f64

View file

@ -1498,6 +1498,7 @@ static UINT64 get_freespace( const WCHAR *dir, UINT64 *disksize )
ULARGE_INTEGER free;
DISK_GEOMETRY_EX info;
HANDLE handle;
DWORD bytes_returned;
free.QuadPart = 512 * 1024 * 1024;
GetDiskFreeSpaceExW( dir, NULL, NULL, &free );
@ -1506,7 +1507,7 @@ static UINT64 get_freespace( const WCHAR *dir, UINT64 *disksize )
handle = CreateFileW( root, GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, 0 );
if (handle != INVALID_HANDLE_VALUE)
{
if (DeviceIoControl( handle, IOCTL_DISK_GET_DRIVE_GEOMETRY_EX, NULL, 0, &info, sizeof(info), NULL, NULL ))
if (DeviceIoControl( handle, IOCTL_DISK_GET_DRIVE_GEOMETRY_EX, NULL, 0, &info, sizeof(info), &bytes_returned, NULL ))
*disksize = info.DiskSize.QuadPart;
CloseHandle( handle );
}