remove the ros only NtUserGetCursorIconSize and implement NtUserGetIconSize in it's place

svn path=/trunk/; revision=31239
This commit is contained in:
Ged Murphy 2007-12-15 12:16:45 +00:00
parent 80a90cc261
commit a8d5e08510
3 changed files with 28 additions and 59 deletions

View file

@ -676,69 +676,54 @@ CLEANUP:
} }
/* 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/b47155634ccb2c30630da7e3666d3d07/b47155634ccb2c30630da7e3666d3d07.trace.html#NtUserGetIconSize */
/* /*
* @implemented * @implemented
*/ */
BOOL BOOL
STDCALL NTAPI
NtUserGetCursorIconSize( NtUserGetIconSize(
HANDLE hCurIcon, HANDLE hCurIcon,
BOOL *fIcon, DWORD dwUnknown2, // Most of the time Zero.
SIZE *Size) PLONG plcx, // &size.cx
PLONG plcy) // &size.cy
{ {
PCURICON_OBJECT CurIcon; PCURICON_OBJECT CurIcon;
PBITMAPOBJ bmp; NTSTATUS Status = STATUS_SUCCESS;
PWINSTATION_OBJECT WinSta; BOOL bRet = FALSE;
NTSTATUS Status;
BOOL Ret = FALSE;
SIZE SafeSize;
DECLARE_RETURN(BOOL);
DPRINT("Enter NtUserGetCursorIconSize\n"); DPRINT("Enter NtUserGetIconSize\n");
UserEnterExclusive(); UserEnterExclusive();
WinSta = IntGetWinStaObj();
if(WinSta == NULL)
{
RETURN( FALSE);
}
if (!(CurIcon = UserGetCurIconObject(hCurIcon))) if (!(CurIcon = UserGetCurIconObject(hCurIcon)))
{ {
ObDereferenceObject(WinSta); goto cleanup;
RETURN(FALSE);
} }
/* Copy fields */ _SEH_TRY
Status = MmCopyToCaller(fIcon, &CurIcon->IconInfo.fIcon, sizeof(BOOL));
if(!NT_SUCCESS(Status))
{ {
SetLastNtError(Status); ProbeForWrite(plcx, sizeof(LONG), 1);
goto done; 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
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));
if(NT_SUCCESS(Status)) if(NT_SUCCESS(Status))
Ret = TRUE; bRet = TRUE;
else else
SetLastNtError(Status); SetLastNtError(Status); // maybe not, test this
BITMAPOBJ_UnlockBitmap(bmp); cleanup:
DPRINT("Leave NtUserGetIconSize, ret=%i\n", bRet);
done:
ObDereferenceObject(WinSta);
RETURN( Ret);
CLEANUP:
DPRINT("Leave NtUserGetCursorIconSize, ret=%i\n",_ret_);
UserLeave(); UserLeave();
END_CLEANUP; return bRet;
} }

View file

@ -758,21 +758,6 @@ NtUserGetAtomName(
return 0; 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/b47155634ccb2c30630da7e3666d3d07/b47155634ccb2c30630da7e3666d3d07.trace.html#NtUserGetIconSize */
BOOL
NTAPI
NtUserGetIconSize(
HANDLE Handle,
DWORD dwUnknown2, // Most of the time Zero.
PLONG plcx, // &size.cx
PLONG plcy) // &size.cy
{
UNIMPLEMENTED;
return FALSE;
}
DWORD DWORD
NTAPI NTAPI
NtUserGetImeInfoEx( NtUserGetImeInfoEx(

View file

@ -697,7 +697,6 @@ NtUserGetClassLong 3
NtUserGetClientOrigin 2 NtUserGetClientOrigin 2
NtUserGetClientRect 2 NtUserGetClientRect 2
NtUserGetMenuDefaultItem 3 NtUserGetMenuDefaultItem 3
NtUserGetCursorIconSize 3
NtUserGetLastInputInfo 1 NtUserGetLastInputInfo 1
NtUserGetMinMaxInfo 3 NtUserGetMinMaxInfo 3
NtUserGetMonitorInfo 2 NtUserGetMonitorInfo 2