Author: fireball
Date: Sat Aug 15 20:25:13 2009
New Revision: 42712
URL:
http://svn.reactos.org/svn/reactos?rev=42712&view=rev
Log:
- Implement GetSystemPaletteEntries.
Modified:
branches/arwinss/reactos/dll/win32/winent.drv/gdidrv.c
branches/arwinss/reactos/subsystems/win32/win32k/gdi/enum.c
branches/arwinss/reactos/subsystems/win32/win32k/gre/palobj.c
Modified: branches/arwinss/reactos/dll/win32/winent.drv/gdidrv.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winen…
==============================================================================
--- branches/arwinss/reactos/dll/win32/winent.drv/gdidrv.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/winent.drv/gdidrv.c [iso-8859-1] Sat Aug 15
20:25:13 2009
@@ -363,10 +363,9 @@
}
UINT CDECL RosDrv_GetSystemPaletteEntries( NTDRV_PDEVICE *physDev, UINT start, UINT
count,
- LPPALETTEENTRY entries )
-{
- UNIMPLEMENTED;
- return 0;
+ LPPALETTEENTRY entries )
+{
+ return RosGdiGetSystemPaletteEntries(physDev->hKernelDC, start, count, entries);
}
BOOL CDECL RosDrv_GetTextExtentExPoint( NTDRV_PDEVICE *physDev, LPCWSTR str, INT count,
Modified: branches/arwinss/reactos/subsystems/win32/win32k/gdi/enum.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
==============================================================================
--- branches/arwinss/reactos/subsystems/win32/win32k/gdi/enum.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/subsystems/win32/win32k/gdi/enum.c [iso-8859-1] Sat Aug 15
20:25:13 2009
@@ -86,11 +86,25 @@
return 0;
}
-UINT APIENTRY RosGdiGetSystemPaletteEntries( HDC physDev, UINT start, UINT count,
- LPPALETTEENTRY entries )
+UINT APIENTRY RosGdiGetSystemPaletteEntries( HDC hDC, UINT uStart, UINT uCount,
+ LPPALETTEENTRY lpEntries )
{
- UNIMPLEMENTED;
- return 0;
+ UINT uRes = 0;
+ NTSTATUS Status = STATUS_SUCCESS;
+
+ /* Call GRE function fully wrapped into SEH */
+ _SEH2_TRY
+ {
+ uRes = GreGetSystemPaletteEntries(hDC, uStart, uCount, lpEntries);
+ } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ Status = _SEH2_GetExceptionCode();
+ }
+ _SEH2_END;
+
+ if (!NT_SUCCESS(Status)) return 0;
+
+ return uRes;
}
BOOL APIENTRY RosGdiGetTextExtentExPoint( HDC physDev, LPCWSTR str, INT count,
Modified: branches/arwinss/reactos/subsystems/win32/win32k/gre/palobj.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
==============================================================================
--- branches/arwinss/reactos/subsystems/win32/win32k/gre/palobj.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/subsystems/win32/win32k/gre/palobj.c [iso-8859-1] Sat Aug 15
20:25:13 2009
@@ -231,11 +231,7 @@
UINT EntriesSize = 0;
UINT Ret = 0;
- if (Entries == 0)
- {
- SetLastWin32Error(ERROR_INVALID_PARAMETER);
- return 0;
- }
+ if (!Entries) return 0;
if (pe != NULL)
{
@@ -243,16 +239,12 @@
if (Entries != EntriesSize / sizeof(pe[0]))
{
/* Integer overflow! */
- SetLastWin32Error(ERROR_INVALID_PARAMETER);
return 0;
}
}
if (!(dc = DC_Lock(hDC)))
- {
- SetLastWin32Error(ERROR_INVALID_HANDLE);
return 0;
- }
palGDI = PALETTE_LockPalette(dc->hPalette);
if (palGDI != NULL)