[RTL/NDK/DDK/XDK]
[reactos.git] / reactos / lib / rtl / mem.c
index e5152b5..9544f7e 100644 (file)
@@ -46,11 +46,11 @@ RtlCompareMemory(IN const VOID *Source1,
 /*
  * @implemented
  */
-ULONG
+SIZE_T
 NTAPI
 RtlCompareMemoryUlong (
    PVOID Source,
-   ULONG Length,
+   SIZE_T Length,
    ULONG Value
 )
 /*
@@ -63,8 +63,8 @@ RtlCompareMemoryUlong (
  */
 {
    PULONG ptr = (PULONG)Source;
-   ULONG  len = Length / sizeof(ULONG);
-   ULONG i;
+   ULONG_PTR len = Length / sizeof(ULONG);
+   ULONG_PTR i;
 
    for (i = 0; i < len; i++)
    {
@@ -73,7 +73,7 @@ RtlCompareMemoryUlong (
       ptr++;
    }
 
-   return (ULONG)((PCHAR)ptr - (PCHAR)Source);
+   return (SIZE_T)((PCHAR)ptr - (PCHAR)Source);
 }
 
 
@@ -85,7 +85,7 @@ VOID
 NTAPI
 RtlFillMemory (
    PVOID Destination,
-   ULONG Length,
+   SIZE_T Length,
    UCHAR Fill
 )
 {
@@ -101,12 +101,12 @@ VOID
 NTAPI
 RtlFillMemoryUlong (
    PVOID Destination,
-   ULONG Length,
+   SIZE_T Length,
    ULONG Fill
 )
 {
    PULONG Dest  = Destination;
-   ULONG  Count = Length / sizeof(ULONG);
+   SIZE_T Count = Length / sizeof(ULONG);
 
    while (Count > 0)
    {
@@ -126,7 +126,7 @@ NTAPI
 RtlMoveMemory (
    PVOID    Destination,
    CONST VOID  * Source,
-   ULONG    Length
+   SIZE_T   Length
 )
 {
    memmove (
@@ -160,7 +160,7 @@ VOID
 NTAPI
 RtlZeroMemory (
    PVOID Destination,
-   ULONG Length
+   SIZE_T Length
 )
 {
    RtlFillMemory (