Author: gedmurphy
Date: Sat Dec 15 15:16:45 2007
New Revision: 31239
URL:
http://svn.reactos.org/svn/reactos?rev=31239&view=rev
Log:
remove the ros only NtUserGetCursorIconSize and implement NtUserGetIconSize in it's
place
Modified:
trunk/reactos/subsystems/win32/win32k/ntuser/cursoricon.c
trunk/reactos/subsystems/win32/win32k/ntuser/ntstubs.c
trunk/reactos/subsystems/win32/win32k/w32ksvc.db
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/cursoricon.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/cursoricon.c (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/cursoricon.c Sat Dec 15 15:16:45 2007
@@ -676,69 +676,54 @@
}
+/* for hints how the prototype might be, see
+
http://forum.grafika.cz/read.php?23,1816012,1816139,quote=1
+
http://www.cyber-ta.org/releases/malware-analysis/public/SOURCES/b47155634c…
*/
/*
* @implemented
*/
BOOL
-STDCALL
-NtUserGetCursorIconSize(
- HANDLE hCurIcon,
- BOOL *fIcon,
- SIZE *Size)
+NTAPI
+NtUserGetIconSize(
+ HANDLE hCurIcon,
+ DWORD dwUnknown2, // Most of the time Zero.
+ PLONG plcx, // &size.cx
+ PLONG plcy) // &size.cy
{
PCURICON_OBJECT CurIcon;
- PBITMAPOBJ bmp;
- PWINSTATION_OBJECT WinSta;
- NTSTATUS Status;
- BOOL Ret = FALSE;
- SIZE SafeSize;
- DECLARE_RETURN(BOOL);
-
- DPRINT("Enter NtUserGetCursorIconSize\n");
+ NTSTATUS Status = STATUS_SUCCESS;
+ BOOL bRet = FALSE;
+
+ DPRINT("Enter NtUserGetIconSize\n");
UserEnterExclusive();
- WinSta = IntGetWinStaObj();
- if(WinSta == NULL)
- {
- RETURN( FALSE);
- }
-
if (!(CurIcon = UserGetCurIconObject(hCurIcon)))
{
- ObDereferenceObject(WinSta);
- RETURN(FALSE);
- }
-
- /* Copy fields */
- Status = MmCopyToCaller(fIcon, &CurIcon->IconInfo.fIcon, sizeof(BOOL));
- if(!NT_SUCCESS(Status))
- {
- SetLastNtError(Status);
- goto done;
- }
-
- bmp = BITMAPOBJ_LockBitmap(CurIcon->IconInfo.hbmColor);
- if(!bmp)
- goto done;
-
- SafeSize.cx = bmp->SurfObj.sizlBitmap.cx;
- SafeSize.cy = bmp->SurfObj.sizlBitmap.cy;
- Status = MmCopyToCaller(Size, &SafeSize, sizeof(SIZE));
+ goto cleanup;
+ }
+
+ _SEH_TRY
+ {
+ ProbeForWrite(plcx, sizeof(LONG), 1);
+ RtlCopyMemory(plcx, &CurIcon->Size.cx, sizeof(LONG));
+ ProbeForWrite(plcy, sizeof(LONG), 1);
+ RtlCopyMemory(plcy, &CurIcon->Size.cy, sizeof(LONG));
+ }
+ _SEH_HANDLE
+ {
+ Status = _SEH_GetExceptionCode();
+ }
+ _SEH_END
+
if(NT_SUCCESS(Status))
- Ret = TRUE;
+ bRet = TRUE;
else
- SetLastNtError(Status);
-
- BITMAPOBJ_UnlockBitmap(bmp);
-
-done:
- ObDereferenceObject(WinSta);
- RETURN( Ret);
-
-CLEANUP:
- DPRINT("Leave NtUserGetCursorIconSize, ret=%i\n",_ret_);
+ SetLastNtError(Status); // maybe not, test this
+
+cleanup:
+ DPRINT("Leave NtUserGetIconSize, ret=%i\n", bRet);
UserLeave();
- END_CLEANUP;
+ return bRet;
}
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/ntstubs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/ntstubs.c (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/ntstubs.c Sat Dec 15 15:16:45 2007
@@ -758,21 +758,6 @@
return 0;
}
-/* for hints how the prototype might be, see
-
http://forum.grafika.cz/read.php?23,1816012,1816139,quote=1
-
http://www.cyber-ta.org/releases/malware-analysis/public/SOURCES/b47155634c…
*/
-BOOL
-NTAPI
-NtUserGetIconSize(
- HANDLE Handle,
- DWORD dwUnknown2, // Most of the time Zero.
- PLONG plcx, // &size.cx
- PLONG plcy) // &size.cy
-{
- UNIMPLEMENTED;
- return FALSE;
-}
-
DWORD
NTAPI
NtUserGetImeInfoEx(
Modified: trunk/reactos/subsystems/win32/win32k/w32ksvc.db
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/w3…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/w32ksvc.db (original)
+++ trunk/reactos/subsystems/win32/win32k/w32ksvc.db Sat Dec 15 15:16:45 2007
@@ -697,7 +697,6 @@
NtUserGetClientOrigin 2
NtUserGetClientRect 2
NtUserGetMenuDefaultItem 3
-NtUserGetCursorIconSize 3
NtUserGetLastInputInfo 1
NtUserGetMinMaxInfo 3
NtUserGetMonitorInfo 2