reactos/win32ss/user/ntuser/misc/copy.c
Hermès Bélusca-Maïto 65ce146169 Create a branch for working on csrss and co.
svn path=/branches/ros-csrss/; revision=57561
2012-10-14 13:04:31 +00:00

36 lines
735 B
C

#include "win32k.h"
NTSTATUS _MmCopyFromCaller( PVOID Target, PVOID Source, UINT Bytes ) {
NTSTATUS Status = STATUS_SUCCESS;
_SEH2_TRY
{
ProbeForRead(Source,Bytes,1);
RtlCopyMemory(Target,Source,Bytes);
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
Status = _SEH2_GetExceptionCode();
}
_SEH2_END;
return Status;
}
NTSTATUS _MmCopyToCaller( PVOID Target, PVOID Source, UINT Bytes ) {
NTSTATUS Status = STATUS_SUCCESS;
_SEH2_TRY
{
/* ProbeForWrite(Target,Bytes,1); */
RtlCopyMemory(Target,Source,Bytes);
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
Status = _SEH2_GetExceptionCode();
}
_SEH2_END;
return Status;
}