[YAROTOWS] Reintegrate the branch. For a brighter future.
[reactos.git] / reactos / subsystems / win32 / win32k / eng / mem.c
index e7aec7e..1fb81b3 100644 (file)
@@ -12,9 +12,9 @@
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
  *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program; if not, write to the Free Software Foundation, Inc.,
+ *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 /* $Id$
  *
@@ -27,7 +27,7 @@
  *                 3/7/1999: Created
  */
 
-#include <w32k.h>
+#include <win32k.h>
 
 #define NDEBUG
 #include <debug.h>
@@ -79,6 +79,7 @@ EngAllocUserMem(SIZE_T cj, ULONG Tag)
     }
 
   /* TODO: Add allocation info to AVL tree (stored inside W32PROCESS structure) */
+  //hSecure = EngSecureMem(NewMem, cj);
 
   return NewMem;
 }
@@ -166,6 +167,7 @@ HackUnsecureVirtualMemory(
 HANDLE APIENTRY
 EngSecureMem(PVOID Address, ULONG Length)
 {
+    return (HANDLE)-1; // HACK!!!
   return MmSecureVirtualMemory(Address, Length, PAGE_READWRITE);
 }
 
@@ -175,7 +177,8 @@ EngSecureMem(PVOID Address, ULONG Length)
 VOID APIENTRY
 EngUnsecureMem(HANDLE Mem)
 {
-  return MmUnsecureVirtualMemory((PVOID) Mem);
+    if (Mem == (HANDLE)-1) return;  // HACK!!!
+  MmUnsecureVirtualMemory((PVOID) Mem);
 }
 
 /* EOF */