Author: tkreuzer
Date: Tue Dec 15 14:01:55 2009
New Revision: 44601
URL:
http://svn.reactos.org/svn/reactos?rev=44601&view=rev
Log:
[SHELL32]
Fix a prototype. Convert RtlLargeInteger to native int64. Fixes 64bit built.
Modified:
branches/ros-amd64-bringup/reactos/dll/win32/shell32/drive.c
branches/ros-amd64-bringup/reactos/dll/win32/shell32/she_ocmenu.c
Modified: branches/ros-amd64-bringup/reactos/dll/win32/shell32/drive.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
==============================================================================
--- branches/ros-amd64-bringup/reactos/dll/win32/shell32/drive.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/dll/win32/shell32/drive.c [iso-8859-1] Tue Dec 15
14:01:55 2009
@@ -18,11 +18,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#define LARGEINT_PROTOS
-#define LargeIntegerDivide RtlLargeIntegerDivide
-#define ExtendedIntegerMultiply RtlExtendedIntegerMultiply
-#define ConvertUlongToLargeInteger RtlConvertUlongToLargeInteger
-#define LargeIntegerSubtract RtlLargeIntegerSubtract
#define MAX_PROPERTY_SHEET_PAGE 32
#define WIN32_NO_STATUS
@@ -291,26 +286,25 @@
static
-LARGE_INTEGER
-GetFreeBytesShare(LARGE_INTEGER TotalNumberOfFreeBytes, LARGE_INTEGER
TotalNumberOfBytes)
-{
- LARGE_INTEGER Temp, Result, Remainder;
-
- if (TotalNumberOfFreeBytes.QuadPart == 0LL)
+ULONGLONG
+GetFreeBytesShare(ULONGLONG TotalNumberOfFreeBytes, ULONGLONG TotalNumberOfBytes)
+{
+ ULONGLONG Temp;
+
+ if (TotalNumberOfFreeBytes == 0LL)
{
- return ConvertUlongToLargeInteger(0);
- }
-
- Temp = LargeIntegerDivide(TotalNumberOfBytes, ConvertUlongToLargeInteger(100),
&Remainder);
- if (Temp.QuadPart >= TotalNumberOfFreeBytes.QuadPart)
+ return 0;
+ }
+
+ Temp = TotalNumberOfBytes / 100;
+ if (Temp >= TotalNumberOfFreeBytes)
{
- Result = ConvertUlongToLargeInteger(1);
- }else
+ return 1;
+ }
+ else
{
- Result = LargeIntegerDivide(TotalNumberOfFreeBytes, Temp, &Remainder);
- }
-
- return Result;
+ return TotalNumberOfFreeBytes / Temp;
+ }
}
static
@@ -343,20 +337,20 @@
HBRUSH hMagBrush;
RECT rect;
LONG horzsize;
- LARGE_INTEGER Result;
+ LONGLONG Result;
WCHAR szBuffer[20];
hBlueBrush = CreateSolidBrush(RGB(0, 0, 255));
hMagBrush = CreateSolidBrush(RGB(255, 0, 255));
SendDlgItemMessageW(hwndDlg, 14006, WM_GETTEXT, 20, (LPARAM)szBuffer);
- Result.QuadPart = _wtoi(szBuffer);
+ Result = _wtoi(szBuffer);
CopyRect(&rect, &drawItem->rcItem);
horzsize = rect.right - rect.left;
- Result.QuadPart = (Result.QuadPart * horzsize) / 100;
-
- rect.right = drawItem->rcItem.right - Result.QuadPart;
+ Result = (Result * horzsize) / 100;
+
+ rect.right = drawItem->rcItem.right - Result;
FillRect(drawItem->hDC, &rect, hBlueBrush);
rect.left = rect.right;
rect.right = drawItem->rcItem.right;
@@ -400,7 +394,7 @@
if(GetDiskFreeSpaceExW(szDrive, &FreeBytesAvailable,
(PULARGE_INTEGER)&TotalNumberOfBytes, (PULARGE_INTEGER)&TotalNumberOfFreeBytes))
{
WCHAR szResult[128];
- LARGE_INTEGER Result;
+ LONGLONG Result;
#ifdef IOCTL_DISK_GET_LENGTH_INFO_IMPLEMENTED
HANDLE hVolume;
DWORD BytesReturned = 0;
@@ -427,13 +421,13 @@
if (StrFormatByteSizeW(FreeBytesAvailable.QuadPart, szResult, sizeof(szResult) /
sizeof(WCHAR)))
SendDlgItemMessageW(hwndDlg, 14005, WM_SETTEXT, (WPARAM)NULL,
(LPARAM)szResult);
- Result = GetFreeBytesShare(TotalNumberOfFreeBytes, TotalNumberOfBytes);
+ Result = GetFreeBytesShare(TotalNumberOfFreeBytes.QuadPart,
TotalNumberOfBytes.QuadPart);
/* set free bytes percentage */
- swprintf(szResult, L"%02d%%", Result.QuadPart);
+ swprintf(szResult, L"%02d%%", Result);
SendDlgItemMessageW(hwndDlg, 14006, WM_SETTEXT, (WPARAM)0, (LPARAM)szResult);
/* store used share amount */
- Result = LargeIntegerSubtract(ConvertUlongToLargeInteger(100), Result);
- swprintf(szResult, L"%02d%%", Result.QuadPart);
+ Result = 100 - Result;
+ swprintf(szResult, L"%02d%%", Result);
SendDlgItemMessageW(hwndDlg, 14004, WM_SETTEXT, (WPARAM)0, (LPARAM)szResult);
if (DriveType == DRIVE_FIXED)
{
Modified: branches/ros-amd64-bringup/reactos/dll/win32/shell32/she_ocmenu.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
==============================================================================
--- branches/ros-amd64-bringup/reactos/dll/win32/shell32/she_ocmenu.c [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/dll/win32/shell32/she_ocmenu.c [iso-8859-1] Tue Dec
15 14:01:55 2009
@@ -81,7 +81,7 @@
#define MRUF_STRING_LIST 0
-typedef int (WINAPI *CREATEMRULISTPROCW)(
+typedef HANDLE (WINAPI *CREATEMRULISTPROCW)(
LPMRUINFO lpmi
);