[Win32k]
[reactos.git] / reactos / subsystems / win32 / win32k / ntuser / object.c
index cd5f591..4df5c8f 100644 (file)
@@ -22,7 +22,7 @@
 
 /* INCLUDES ******************************************************************/
 
-#include <w32k.h>
+#include <win32k.h>
 
 #define NDEBUG
 #include <debug.h>
@@ -177,6 +177,7 @@ UserHandleOwnerByType(USER_OBJECT_TYPE type)
         case otHook:
         case otCallProc:
         case otAccel:
+        case otSMWP:
             pi = GetW32ProcessInfo();
             break;
 
@@ -220,7 +221,7 @@ PVOID UserGetObject(PUSER_HANDLE_TABLE ht, HANDLE handle, USER_OBJECT_TYPE type
 
    if (!(entry = handle_to_entry(ht, handle )) || entry->type != type)
    {
-      SetLastWin32Error(ERROR_INVALID_HANDLE);
+      EngSetLastError(ERROR_INVALID_HANDLE);
       return NULL;
    }
    return entry->ptr;
@@ -283,7 +284,6 @@ BOOL FASTCALL UserCreateHandleTable(VOID)
    PVOID mem;
 
    //FIXME: dont alloc all at once! must be mapped into umode also...
-   //mem = ExAllocatePool(PagedPool, sizeof(USER_HANDLE_ENTRY) * 1024*2);
    mem = UserHeapAlloc(sizeof(USER_HANDLE_ENTRY) * 1024*2);
    if (!mem)
    {
@@ -329,10 +329,10 @@ UserCreateObject( PUSER_HANDLE_TABLE ht,
 
    switch (type)
    {
-//      case otWindow:
+      case otWindow:
 //      case otMenu:
-//      case otHook:
-//      case otCallProc:
+      case otHook:
+      case otCallProc:
       case otInputContext:
          Object = DesktopHeapAlloc(rpdesk, size);
          dt = TRUE;
@@ -419,10 +419,10 @@ UserDereferenceObject(PVOID object)
 
      switch (type)
      {
-//        case otWindow:
+        case otWindow:
 //        case otMenu:
-//        case otHook:
-//        case otCallProc:
+        case otHook:
+        case otCallProc:
         case otInputContext:
            return DesktopHeapFree(((PTHRDESKHEAD)object)->rpdesk, object);