Bye bye NtUserCreateCursorHandle.
authorJérôme Gardou <jerome.gardou@reactos.org>
Wed, 14 Jul 2010 10:23:13 +0000 (10:23 +0000)
committerJérôme Gardou <jerome.gardou@reactos.org>
Wed, 14 Jul 2010 10:23:13 +0000 (10:23 +0000)
Thanks GedMurphy for explaining me how to suppress that.
Please clean win32k after this commit.

svn path=/trunk/; revision=48035

reactos/include/reactos/win32k/ntuser.h
reactos/subsystems/win32/win32k/ntuser/cursoricon.c
reactos/subsystems/win32/win32k/w32ksvc.db

index 778cd3d..fec4e9b 100644 (file)
@@ -3165,13 +3165,6 @@ NtUserBuildMenuItemList(
  ULONG nBufSize,
  DWORD Reserved);
 
  ULONG nBufSize,
  DWORD Reserved);
 
-/* Use ONEPARAM_ROUTINE_CREATEEMPTYCURSOROBJECT (0x21) ? */
-HANDLE
-NTAPI
-NtUserCreateCursorIconHandle(
-  PICONINFO IconInfo,
-  BOOL Indirect);
-
 
 /* Should be done in usermode and use NtUserGetCPD. */
 ULONG_PTR
 
 /* Should be done in usermode and use NtUserGetCPD. */
 ULONG_PTR
index 03f4431..03f0053 100644 (file)
@@ -491,85 +491,6 @@ IntCleanupCurIcons(struct _EPROCESS *Process, PPROCESSINFO Win32Process)
 
 }
 
 
 }
 
-/*
- * @implemented
- */
-HANDLE
-APIENTRY
-NtUserCreateCursorIconHandle(PICONINFO IconInfo OPTIONAL, BOOL Indirect)
-{
-    PCURICON_OBJECT CurIcon;
-    PSURFACE psurfBmp;
-    NTSTATUS Status;
-    HANDLE Ret;
-    DECLARE_RETURN(HANDLE);
-
-    DPRINT("Enter NtUserCreateCursorIconHandle\n");
-    UserEnterExclusive();
-
-    if (!(CurIcon = IntCreateCurIconHandle()))
-    {
-        SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
-        RETURN((HANDLE)0);
-    }
-
-    Ret = CurIcon->Self;
-
-    if (IconInfo)
-    {
-        Status = MmCopyFromCaller(&CurIcon->IconInfo, IconInfo, sizeof(ICONINFO));
-        if (NT_SUCCESS(Status))
-        {
-            /* Copy bitmaps and size info */
-            if (Indirect)
-            {
-                // FIXME: WTF?
-                CurIcon->IconInfo.hbmMask = BITMAP_CopyBitmap(CurIcon->IconInfo.hbmMask);
-                CurIcon->IconInfo.hbmColor = BITMAP_CopyBitmap(CurIcon->IconInfo.hbmColor);
-            }
-            if (CurIcon->IconInfo.hbmColor &&
-                    (psurfBmp = SURFACE_LockSurface(CurIcon->IconInfo.hbmColor)))
-            {
-                CurIcon->Size.cx = psurfBmp->SurfObj.sizlBitmap.cx;
-                CurIcon->Size.cy = psurfBmp->SurfObj.sizlBitmap.cy;
-                SURFACE_UnlockSurface(psurfBmp);
-                GDIOBJ_SetOwnership(CurIcon->IconInfo.hbmColor, NULL);
-            }
-            if (CurIcon->IconInfo.hbmMask &&
-                    (psurfBmp = SURFACE_LockSurface(CurIcon->IconInfo.hbmMask)))
-            {
-                if (CurIcon->IconInfo.hbmColor == NULL)
-                {
-                    CurIcon->Size.cx = psurfBmp->SurfObj.sizlBitmap.cx;
-                    CurIcon->Size.cy = psurfBmp->SurfObj.sizlBitmap.cy >> 1;
-                }
-                SURFACE_UnlockSurface(psurfBmp);
-                GDIOBJ_SetOwnership(CurIcon->IconInfo.hbmMask, NULL);
-            }
-
-            /* Calculate icon hotspot */
-            if (CurIcon->IconInfo.fIcon == TRUE)
-            {
-                CurIcon->IconInfo.xHotspot = CurIcon->Size.cx >> 1;
-                CurIcon->IconInfo.yHotspot = CurIcon->Size.cy >> 1;
-            }
-        }
-        else
-        {
-            SetLastNtError(Status);
-            /* FIXME - Don't exit here */
-        }
-    }
-
-    UserDereferenceObject(CurIcon);
-    RETURN(Ret);
-
-CLEANUP:
-    DPRINT("Leave NtUserCreateCursorIconHandle, ret=%i\n",_ret_);
-    UserLeave();
-    END_CLEANUP;
-}
-
 /*
  * @implemented
  */
 /*
  * @implemented
  */
index 0b90145..00701aa 100644 (file)
@@ -683,7 +683,6 @@ NtGdiOffsetViewportOrgEx                4
 NtGdiOffsetWindowOrgEx                  4
 #
 NtUserBuildMenuItemList                 4
 NtGdiOffsetWindowOrgEx                  4
 #
 NtUserBuildMenuItemList                 4
-NtUserCreateCursorIconHandle            2
 NtUserGetMenuDefaultItem                3
 NtUserGetLastInputInfo                  1
 NtUserGetMinMaxInfo                     3
 NtUserGetMenuDefaultItem                3
 NtUserGetLastInputInfo                  1
 NtUserGetMinMaxInfo                     3