diff --git a/reactos/drivers/dd/videoprt/Makefile b/reactos/drivers/dd/videoprt/Makefile index 9c9cd2e0cd7..af5928b3b82 100644 --- a/reactos/drivers/dd/videoprt/Makefile +++ b/reactos/drivers/dd/videoprt/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.2 2003/11/05 22:31:50 gvg Exp $ +# $Id: Makefile,v 1.3 2003/11/30 19:15:21 gvg Exp $ PATH_TO_TOP = ../../.. @@ -6,7 +6,7 @@ TARGET_TYPE = export_driver TARGET_NAME = videoprt -TARGET_CFLAGS += -Wall -Werror +TARGET_CFLAGS += -Wall -Werror -I$(PATH_TO_TOP)/ntoskrnl/include TARGET_OBJECTS = videoprt.o diff --git a/reactos/drivers/dd/videoprt/videoprt.c b/reactos/drivers/dd/videoprt/videoprt.c index 76edd9c99e9..43ca6a9343c 100644 --- a/reactos/drivers/dd/videoprt/videoprt.c +++ b/reactos/drivers/dd/videoprt/videoprt.c @@ -1,4 +1,4 @@ -/* $Id: videoprt.c,v 1.12 2003/11/05 22:31:50 gvg Exp $ +/* $Id: videoprt.c,v 1.13 2003/11/30 19:15:21 gvg Exp $ * * VideoPort driver * Written by Rex Jolliff @@ -9,7 +9,8 @@ #include #include -#include "../../../ntoskrnl/include/internal/v86m.h" +#include "internal/v86m.h" +#include "internal/ps.h" #define NDEBUG #include @@ -704,12 +705,17 @@ VideoPortInt10(IN PVOID HwDeviceExtension, KV86M_REGISTERS Regs; NTSTATUS Status; PEPROCESS CallingProcess; + PEPROCESS OldProcess; + PETHREAD CurrentThread; DPRINT("VideoPortInt10\n"); CallingProcess = PsGetCurrentProcess(); if (CallingProcess != Csrss) { + CurrentThread = PsGetCurrentThread(); + OldProcess = CurrentThread->OldProcess; + CurrentThread->OldProcess = NULL; KeAttachProcess(Csrss); } @@ -726,6 +732,7 @@ VideoPortInt10(IN PVOID HwDeviceExtension, if (CallingProcess != Csrss) { KeDetachProcess(); + CurrentThread->OldProcess = OldProcess; } return(Status);