stop exporting MmCopyFromCaller and kin and make a local version in the
last place we use it, now based on SEH.
we'll remove the copy from caller hack from ntoskrnl soon.
Modified: trunk/reactos/ntoskrnl/ntoskrnl.def
Added: trunk/reactos/subsys/win32k/include/mmcopy.h
Modified: trunk/reactos/subsys/win32k/include/win32k.h
Added: trunk/reactos/subsys/win32k/misc/copy.c
Modified: trunk/reactos/subsys/win32k/w32k.h
Modified: trunk/reactos/subsys/win32k/win32k.xml

Modified: trunk/reactos/ntoskrnl/ntoskrnl.def
--- trunk/reactos/ntoskrnl/ntoskrnl.def	2005-07-13 02:45:53 UTC (rev 16551)
+++ trunk/reactos/ntoskrnl/ntoskrnl.def	2005-07-13 08:48:49 UTC (rev 16552)
@@ -690,8 +690,8 @@
 MmAllocatePagesForMdl@28
 MmBuildMdlForNonPagedPool@4
 MmCanFileBeTruncated@8
-MmCopyFromCaller@12
-MmCopyToCaller@12
+;MmCopyFromCaller@12
+;MmCopyToCaller@12
 MmCreateMdl@12
 MmCreateSection@32
 MmDbgTranslatePhysicalAddress@8

Added: trunk/reactos/subsys/win32k/include/mmcopy.h
--- trunk/reactos/subsys/win32k/include/mmcopy.h	2005-07-13 02:45:53 UTC (rev 16551)
+++ trunk/reactos/subsys/win32k/include/mmcopy.h	2005-07-13 08:48:49 UTC (rev 16552)
@@ -0,0 +1,11 @@
+#ifndef NDK_MMCOPY_H
+#define NDK_MMCOPY_H
+
+#include <pseh/pseh.h>
+
+NTSTATUS _MmCopyFromCaller( PVOID Target, PVOID Source, UINT Bytes );
+
+#define MmCopyFromCaller(x,y,z) _MmCopyFromCaller((PCHAR)(x),(PCHAR)(y),(UINT)(z))
+#define MmCopyToCaller(x,y,z) MmCopyFromCaller(x,y,z)
+
+#endif/*NDK_MMCOPY_H*/

Modified: trunk/reactos/subsys/win32k/include/win32k.h
--- trunk/reactos/subsys/win32k/include/win32k.h	2005-07-13 02:45:53 UTC (rev 16551)
+++ trunk/reactos/subsys/win32k/include/win32k.h	2005-07-13 08:48:49 UTC (rev 16552)
@@ -54,8 +54,8 @@
 #include <include/window.h>
 #include <include/winpos.h>
 #include <include/winsta.h>
+#include <include/mmcopy.h>
 #include <eng/objects.h>
 #include <eng/misc.h>
 #include <dib/dib.h>
-
 /* EOF */

Added: trunk/reactos/subsys/win32k/misc/copy.c
--- trunk/reactos/subsys/win32k/misc/copy.c	2005-07-13 02:45:53 UTC (rev 16551)
+++ trunk/reactos/subsys/win32k/misc/copy.c	2005-07-13 08:48:49 UTC (rev 16552)
@@ -0,0 +1,13 @@
+#include "w32k.h"
+
+NTSTATUS _MmCopyFromCaller( PVOID Target, PVOID Source, UINT Bytes ) {
+    NTSTATUS Status = STATUS_SUCCESS;
+
+    _SEH_TRY {
+	RtlCopyMemory(Target,Source,Bytes);
+    } _SEH_HANDLE {
+	Status = _SEH_GetExceptionCode();
+    } _SEH_END;
+
+    return Status;
+}

Modified: trunk/reactos/subsys/win32k/w32k.h
--- trunk/reactos/subsys/win32k/w32k.h	2005-07-13 02:45:53 UTC (rev 16551)
+++ trunk/reactos/subsys/win32k/w32k.h	2005-07-13 08:48:49 UTC (rev 16552)
@@ -19,14 +19,6 @@
 #include <windows.h>
 #include <ndk/ntndk.h>
 
-/* FIXME: ReactOS will be R-Rated if I really write what I'm about to */
-NTSTATUS 
-STDCALL
-MmCopyFromCaller(PVOID Dest, const VOID *Src, ULONG NumberOfBytes);
-NTSTATUS 
-STDCALL
-MmCopyToCaller(PVOID Dest, const VOID *Src, ULONG NumberOfBytes);
-
 /* SEH Support with PSEH */
 #include <pseh/pseh.h>
 

Modified: trunk/reactos/subsys/win32k/win32k.xml
--- trunk/reactos/subsys/win32k/win32k.xml	2005-07-13 02:45:53 UTC (rev 16551)
+++ trunk/reactos/subsys/win32k/win32k.xml	2005-07-13 08:48:49 UTC (rev 16552)
@@ -58,6 +58,7 @@
 		<file>math.c</file>
 		<file>object.c</file>
 		<file>ssec.c</file>
+		<file>copy.c</file>
 	</directory>
 	<directory name="ntddraw">
 		<file>ddraw.c</file>