WPF - Replace RtlCopyMemory p/invoke with NativeMethodWrapper.MemoryCopy

- RtlCopyMemory only works on x64, we could use the slower RtlMoveMemory, going with a native wrapper around RtlCopyMemory
- Renamed CopyMemoryUsingHandle to MemoryCopy (cannot be CopyMemory or RtlCopyMemory as macro with that name already exists)

https://github.com/cefsharp/CefSharp/pull/2885#issuecomment-529033351

Issue #2885
This commit is contained in:
amaitland
2019-09-07 09:00:33 +10:00
parent ce7021226d
commit b1b930605c
6 changed files with 10 additions and 18 deletions
+2 -2
View File
@@ -8,9 +8,9 @@
namespace CefSharp
{
void NativeMethodWrapper::CopyMemoryUsingHandle(IntPtr dest, IntPtr src, int numberOfBytes)
void NativeMethodWrapper::MemoryCopy(IntPtr dest, IntPtr src, int numberOfBytes)
{
CopyMemory(dest.ToPointer(), src.ToPointer(), numberOfBytes);
RtlCopyMemory(dest.ToPointer(), src.ToPointer(), numberOfBytes);
}
bool NativeMethodWrapper::IsFocused(IntPtr handle)