diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec index 8aaf826d03d..f9e723820e7 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec @@ -291,7 +291,7 @@ type win32 @ stub RtlClearAllBits @ stdcall RtlClearBits(long long long) RtlClearBits @ stub RtlCompactHeap -@ stub RtlCompareMemory +@ stdcall RtlCompareMemory(ptr ptr long) RtlCompareMemory @ stub RtlCompareMemoryUlong @ stub RtlCompareString @ stdcall RtlCompareUnicodeString (ptr ptr long) RtlCompareUnicodeString diff --git a/dlls/ntdll/rtl.c b/dlls/ntdll/rtl.c index 4b379c4aabe..f3dd60ab345 100644 --- a/dlls/ntdll/rtl.c +++ b/dlls/ntdll/rtl.c @@ -502,6 +502,53 @@ NTSTATUS WINAPI RtlClearBits(DWORD x1,DWORD x2,DWORD x3) return 0; } +/****************************************************************************** + * RtlCopyMemory [NTDLL] + * + */ +#undef RtlCopyMemory +VOID WINAPI RtlCopyMemory( VOID *Destination, CONST VOID *Source, SIZE_T Length ) +{ + memcpy(Destination, Source, Length); +} + +/****************************************************************************** + * RtlMoveMemory [NTDLL] + */ +#undef RtlMoveMemory +VOID WINAPI RtlMoveMemory( VOID *Destination, CONST VOID *Source, SIZE_T Length ) +{ + memmove(Destination, Source, Length); +} + +/****************************************************************************** + * RtlFillMemory [NTDLL] + */ +#undef RtlFillMemory +VOID WINAPI RtlFillMemory( VOID *Destination, SIZE_T Length, BYTE Fill ) +{ + memset(Destination, Fill, Length); +} + +/****************************************************************************** + * RtlZeroMemory [NTDLL] + */ +#undef RtlZeroMemory +VOID WINAPI RtlZeroMemory( VOID *Destination, SIZE_T Length ) +{ + memset(Destination, 0, Length); +} + +/****************************************************************************** + * RtlCompareMemory [NTDLL] + */ +SIZE_T WINAPI RtlCompareMemory( const VOID *Source1, const VOID *Source2, SIZE_T Length) +{ + int i; + for(i=0; (i