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.

svn path=/trunk/; revision=16552
This commit is contained in:
Art Yerkes 2005-07-13 08:48:49 +00:00
parent 5f9eec4d04
commit 90be5e4d9b
6 changed files with 28 additions and 11 deletions

View file

@ -690,8 +690,8 @@ MmAllocateNonCachedMemory@4
MmAllocatePagesForMdl@28
MmBuildMdlForNonPagedPool@4
MmCanFileBeTruncated@8
MmCopyFromCaller@12
MmCopyToCaller@12
;MmCopyFromCaller@12
;MmCopyToCaller@12
MmCreateMdl@12
MmCreateSection@32
MmDbgTranslatePhysicalAddress@8

View file

@ -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*/

View file

@ -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 */

View file

@ -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;
}

View file

@ -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>

View file

@ -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>