Author: jimtabor
Date: Sat Feb 16 21:14:36 2008
New Revision: 32391
URL:
http://svn.reactos.org/svn/reactos?rev=32391&view=rev
Log:
- Patch by Stefan Ginsberg (stefan__100__ AT hotmail DOT com): Removed NtGdiStretchDIBits
and NtGdiAddFontResource. Replaced with correct API.
Modified:
trunk/reactos/dll/win32/gdi32/misc/stubs.c
trunk/reactos/dll/win32/gdi32/misc/stubsw.c
trunk/reactos/include/reactos/win32k/ntgdibad.h
trunk/reactos/subsystems/win32/win32k/objects/dibobj.c
trunk/reactos/subsystems/win32/win32k/objects/text.c
trunk/reactos/subsystems/win32/win32k/stubs/stubs.c
trunk/reactos/subsystems/win32/win32k/w32ksvc.db
Modified: trunk/reactos/dll/win32/gdi32/misc/stubs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/misc/stubs…
==============================================================================
--- trunk/reactos/dll/win32/gdi32/misc/stubs.c (original)
+++ trunk/reactos/dll/win32/gdi32/misc/stubs.c Sat Feb 16 21:14:36 2008
@@ -42,8 +42,8 @@
{
/* FIXME share memory */
- return NtGdiStretchDIBits(hdc, XDest, YDest, nDestWidth, nDestHeight, XSrc, YSrc,
- nSrcWidth, nSrcHeight, lpBits, lpBitsInfo, iUsage, dwRop);
+ return NtGdiStretchDIBitsInternal(hdc, XDest, YDest, nDestWidth, nDestHeight, XSrc,
YSrc,
+ nSrcWidth, nSrcHeight, (LPBYTE)lpBits,
(LPBITMAPINFO)lpBitsInfo, (DWORD)iUsage, dwRop, 0, 0, NULL);
}
/*
Modified: trunk/reactos/dll/win32/gdi32/misc/stubsw.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/misc/stubs…
==============================================================================
--- trunk/reactos/dll/win32/gdi32/misc/stubsw.c (original)
+++ trunk/reactos/dll/win32/gdi32/misc/stubsw.c Sat Feb 16 21:14:36 2008
@@ -215,18 +215,13 @@
*/
int
STDCALL
-GdiAddFontResourceW(LPCWSTR lpszFilename,FLONG fl,DESIGNVECTOR *pdv)
-{
- UNICODE_STRING Filename;
- //UNIMPLEMENTED;
- //SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- //return 0;
-
- /* FIXME handle fl parameter */
- RtlInitUnicodeString(&Filename, lpszFilename);
- return NtGdiAddFontResource ( &Filename, fl );
-}
-
+GdiAddFontResourceW(
+ LPCWSTR lpszFilename,
+ FLONG fl,
+ DESIGNVECTOR *pdv)
+{
+ return NtGdiAddFontResourceW((PWSTR)lpszFilename, 0, 0, fl, 0, pdv);
+}
/*
* @implemented
Modified: trunk/reactos/include/reactos/win32k/ntgdibad.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/win32k/ntg…
==============================================================================
--- trunk/reactos/include/reactos/win32k/ntgdibad.h (original)
+++ trunk/reactos/include/reactos/win32k/ntgdibad.h Sat Feb 16 21:14:36 2008
@@ -58,14 +58,6 @@
PFONTFAMILYINFO Info,
DWORD Size
);
-
-
-/* Use NtGdiAddFontResourceW */
-int
-STDCALL
-NtGdiAddFontResource(PUNICODE_STRING Filename,
- DWORD fl);
-
/* Use NtGdiCreateDIBitmapInternal */
HBITMAP
@@ -170,25 +162,6 @@
LPPOINT Point
);
-/* Use NtGdiStretchDIBitsInternal. */
-INT
-STDCALL
-NtGdiStretchDIBits (
- HDC hDC,
- INT XDest,
- INT YDest,
- INT DestWidth,
- INT DestHeight,
- INT XSrc,
- INT YSrc,
- INT SrcWidth,
- INT SrcHeight,
- CONST VOID * Bits,
- CONST BITMAPINFO * BitsInfo,
- UINT Usage,
- DWORD ROP
- );
-
#endif /* WIN32K_NTGDI_BAD_INCLUDED */
Modified: trunk/reactos/subsystems/win32/win32k/objects/dibobj.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/dibobj.c (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/dibobj.c Sat Feb 16 21:14:36 2008
@@ -722,19 +722,25 @@
return Result;
}
-INT STDCALL NtGdiStretchDIBits(HDC hDC,
- INT XDest,
- INT YDest,
- INT DestWidth,
- INT DestHeight,
- INT XSrc,
- INT YSrc,
- INT SrcWidth,
- INT SrcHeight,
- CONST VOID *Bits,
- CONST BITMAPINFO *BitsInfo,
- UINT Usage,
- DWORD ROP)
+INT
+APIENTRY
+NtGdiStretchDIBitsInternal(
+ HDC hDC,
+ INT XDest,
+ INT YDest,
+ INT DestWidth,
+ INT DestHeight,
+ INT XSrc,
+ INT YSrc,
+ INT SrcWidth,
+ INT SrcHeight,
+ LPBYTE Bits,
+ LPBITMAPINFO BitsInfo,
+ DWORD Usage,
+ DWORD ROP,
+ UINT cjMaxInfo,
+ UINT cjMaxBits,
+ HANDLE hcmXform)
{
HBITMAP hBitmap, hOldBitmap;
HDC hdcMem;
@@ -771,7 +777,7 @@
}
NtGdiSetDIBits(hdcMem, hBitmap, 0, BitsInfo->bmiHeader.biHeight, Bits,
- BitsInfo, Usage);
+ BitsInfo, (UINT)Usage);
/* Origin for DIBitmap may be bottom left (positive biHeight) or top
left (negative biHeight) */
Modified: trunk/reactos/subsystems/win32/win32k/objects/text.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/text.c (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/text.c Sat Feb 16 21:14:36 2008
@@ -436,22 +436,23 @@
return FT_RENDER_MODE_NORMAL;
}
-int
-STDCALL
-NtGdiAddFontResource(PUNICODE_STRING Filename, DWORD fl)
+INT
+APIENTRY
+NtGdiAddFontResourceW(
+ IN WCHAR *pwszFiles,
+ IN ULONG cwc,
+ IN ULONG cFiles,
+ IN FLONG fl,
+ IN DWORD dwPidTid,
+ IN OPTIONAL DESIGNVECTOR *pdv)
{
UNICODE_STRING SafeFileName;
PWSTR src;
NTSTATUS Status;
int Ret;
- /* Copy the UNICODE_STRING structure */
- Status = MmCopyFromCaller(&SafeFileName, Filename, sizeof(UNICODE_STRING));
- if(!NT_SUCCESS(Status))
- {
- SetLastNtError(Status);
- return 0;
- }
+ /* FIXME - Protect with SEH? */
+ RtlInitUnicodeString(&SafeFileName, pwszFiles);
/* Reserve for prepending '\??\' */
SafeFileName.Length += 4 * sizeof(WCHAR);
@@ -476,7 +477,7 @@
return 0;
}
- Ret = IntGdiAddFontResource(&SafeFileName, fl);
+ Ret = IntGdiAddFontResource(&SafeFileName, (DWORD)fl);
ExFreePool(SafeFileName.Buffer);
return Ret;
Modified: trunk/reactos/subsystems/win32/win32k/stubs/stubs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/st…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/stubs/stubs.c (original)
+++ trunk/reactos/subsystems/win32/win32k/stubs/stubs.c Sat Feb 16 21:14:36 2008
@@ -1558,26 +1558,6 @@
return 0;
}
-
-
-/*
- * @unimplemented
- */
-INT
-APIENTRY
-NtGdiAddFontResourceW(
- IN WCHAR *pwszFiles,
- IN ULONG cwc,
- IN ULONG cFiles,
- IN FLONG f,
- IN DWORD dwPidTid,
- IN OPTIONAL DESIGNVECTOR *pdv)
-{
- UNIMPLEMENTED;
- return 0;
-}
-
-
/*
* @unimplemented
*/
@@ -2984,33 +2964,6 @@
/*
* @unimplemented
*/
-INT
-APIENTRY
-NtGdiStretchDIBitsInternal(
- IN HDC hdc,
- IN INT xDst,
- IN INT yDst,
- IN INT cxDst,
- IN INT cyDst,
- IN INT xSrc,
- IN INT ySrc,
- IN INT cxSrc,
- IN INT cySrc,
- IN OPTIONAL LPBYTE pjInit,
- IN LPBITMAPINFO pbmi,
- IN DWORD dwUsage,
- IN DWORD dwRop4,
- IN UINT cjMaxInfo,
- IN UINT cjMaxBits,
- IN HANDLE hcmXform)
-{
- UNIMPLEMENTED;
- return 0;
-}
-
- /*
- * @unimplemented
- */
BOOL
APIENTRY
NtGdiUnloadPrinterDriver(
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 Feb 16 21:14:36 2008
@@ -679,7 +679,6 @@
NtGdiSetViewportOrgEx 4
NtGdiSetWindowExtEx 4
NtGdiSetWindowOrgEx 4
-NtGdiStretchDIBits 13
NtUserAcquireOrReleaseInputOwnership 1
NtUserBuildMenuItemList 4
NtUserCreateCursorIconHandle 2
@@ -719,7 +718,6 @@
NtUserSendMessageTimeout 8
NtUserSendNotifyMessage 4
NtUserSetScrollBarInfo 3
-NtGdiAddFontResource 2
NtGdiCreateDIBitmap 6
NtGdiGetAspectRatioFilterEx 2
NtGdiGetFontFamilyInfo 4