From e4174d5d574f3fec97f465ba178c21ef498fc99d Mon Sep 17 00:00:00 2001 From: Patrik Stridvall Date: Thu, 18 May 2000 00:51:52 +0000 Subject: [PATCH] GetRelAbs for some reason takes 2 parameters, even though the second one is ignored at least on Windows NT 3.51 according to Marcus Meissner. --- dlls/gdi/gdi32.spec | 2 +- include/wingdi.h | 2 +- objects/dc.c | 12 ++++++++++++ objects/dcvalues.c | 5 ----- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/dlls/gdi/gdi32.spec b/dlls/gdi/gdi32.spec index bf711fb49a..0e01cb8ea3 100644 --- a/dlls/gdi/gdi32.spec +++ b/dlls/gdi/gdi32.spec @@ -250,7 +250,7 @@ init MAIN_GdiInit @ stdcall GetRandomRgn(long long long) GetRandomRgn @ stdcall GetRasterizerCaps(ptr long) GetRasterizerCaps @ stdcall GetRegionData(long long ptr) GetRegionData -@ stdcall GetRelAbs(long) GetRelAbs +@ stdcall GetRelAbs(long long) GetRelAbs @ stdcall GetRgnBox(long ptr) GetRgnBox @ stdcall GetStockObject(long) GetStockObject @ stdcall GetStretchBltMode(long) GetStretchBltMode diff --git a/include/wingdi.h b/include/wingdi.h index 2d42ac42a4..ed20941881 100644 --- a/include/wingdi.h +++ b/include/wingdi.h @@ -3249,7 +3249,7 @@ INT WINAPI GetPixelFormat(HDC); INT WINAPI GetPolyFillMode(HDC); BOOL WINAPI GetRasterizerCaps(LPRASTERIZER_STATUS,UINT); DWORD WINAPI GetRegionData(HRGN,DWORD,LPRGNDATA); -INT WINAPI GetRelAbs(HDC); +INT WINAPI GetRelAbs(HDC,DWORD); INT WINAPI GetRgnBox(HRGN,LPRECT); INT WINAPI GetROP2(HDC); HGDIOBJ WINAPI GetStockObject(INT); diff --git a/objects/dc.c b/objects/dc.c index 163ecd7e4f..7f351e14a3 100644 --- a/objects/dc.c +++ b/objects/dc.c @@ -123,6 +123,7 @@ DC *DC_GetDCPtr( HDC hdc ) (ptr->wMagic == ENHMETAFILE_DC_MAGIC)) return (DC *)ptr; GDI_HEAP_UNLOCK( hdc ); + SetLastError( ERROR_INVALID_HANDLE ); return NULL; } @@ -1347,6 +1348,17 @@ UINT WINAPI SetBoundsRect(HDC hdc, const RECT* rect, UINT flags) return DCB_DISABLE; /* bounding rectangle always empty */ } + +/*********************************************************************** + * GetRelAbs (GDI32.218) + */ +INT WINAPI GetRelAbs( HDC hdc, DWORD dwIgnore ) +{ + DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC ); + if (!dc) return 0; + return dc->w.relAbsMode; +} + /*********************************************************************** * Death (GDI.121) * diff --git a/objects/dcvalues.c b/objects/dcvalues.c index 9bbe693c14..9afd47a079 100644 --- a/objects/dcvalues.c +++ b/objects/dcvalues.c @@ -163,11 +163,6 @@ DC_GET_VAL_32( INT, GetROP2, w.ROPmode ) */ DC_GET_VAL_16( INT16, GetRelAbs16, w.relAbsMode ) -/*********************************************************************** - * GetRelAbs (GDI32.218) - */ -DC_GET_VAL_32( INT, GetRelAbs, w.relAbsMode ) - /*********************************************************************** * GetStretchBltMode16 (GDI.88) */