Author: jimtabor
Date: Fri Jan 18 06:43:03 2008
New Revision: 31846
URL:
http://svn.reactos.org/svn/reactos?rev=31846&view=rev
Log:
Patch by Stefan100 stefan__100__ at
hotmail.com. Remove NtGdiGetTextExtentPoint32, update
all related.
Modified:
trunk/reactos/dll/win32/gdi32/objects/text.c
trunk/reactos/include/reactos/win32k/ntgdibad.h
trunk/reactos/subsystems/win32/win32k/objects/text.c
trunk/reactos/subsystems/win32/win32k/w32ksvc.db
Modified: trunk/reactos/dll/win32/gdi32/objects/text.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/objects/te…
==============================================================================
--- trunk/reactos/dll/win32/gdi32/objects/text.c (original)
+++ trunk/reactos/dll/win32/gdi32/objects/text.c Fri Jan 18 06:43:03 2008
@@ -271,7 +271,7 @@
LPSIZE lpSize
)
{
- return NtGdiGetTextExtentPoint32(hdc, lpString, cbString, lpSize);
+ return NtGdiGetTextExtent(hdc, (LPWSTR)lpString, cbString, lpSize, 0);
}
/*
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 Fri Jan 18 06:43:03 2008
@@ -59,15 +59,6 @@
DWORD Size
);
-/* The gdi32 call Should Use NtGdiGetTextExtent */
-BOOL
-NTAPI
-NtGdiGetTextExtentPoint32(
- HDC hDC,
- LPCWSTR String,
- int Count,
- LPSIZE
-);
/* Use NtGdiAddFontResourceW */
int
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 Fri Jan 18 06:43:03 2008
@@ -3729,90 +3729,6 @@
return NtGdiGetTextExtentExW(hdc, lpwsz, cwc, 0, NULL, NULL, psize, 0);
}
-BOOL
-STDCALL
-NtGdiGetTextExtentPoint32(HDC hDC,
- LPCWSTR UnsafeString,
- int Count,
- LPSIZE UnsafeSize)
-{
- PDC dc;
- PDC_ATTR Dc_Attr;
- LPWSTR String;
- SIZE Size;
- NTSTATUS Status;
- BOOLEAN Result;
- PTEXTOBJ TextObj;
-
- if (Count < 0)
- {
- SetLastWin32Error(ERROR_INVALID_PARAMETER);
- return FALSE;
- }
- if (0 == Count)
- {
- Size.cx = 0;
- Size.cy = 0;
- Status = MmCopyToCaller(UnsafeSize, &Size, sizeof(SIZE));
- if (! NT_SUCCESS(Status))
- {
- SetLastNtError(Status);
- return FALSE;
- }
- return TRUE;
- }
-
- String = ExAllocatePool(PagedPool, Count * sizeof(WCHAR));
- if (NULL == String)
- {
- SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
- return FALSE;
- }
-
- Status = MmCopyFromCaller(String, UnsafeString, Count * sizeof(WCHAR));
- if (! NT_SUCCESS(Status))
- {
- ExFreePool(String);
- SetLastNtError(Status);
- return FALSE;
- }
-
- dc = DC_LockDc(hDC);
- if (NULL == dc)
- {
- ExFreePool(String);
- SetLastWin32Error(ERROR_INVALID_HANDLE);
- return FALSE;
- }
- Dc_Attr = dc->pDc_Attr;
- if(!Dc_Attr) Dc_Attr = &dc->Dc_Attr;
- TextObj = TEXTOBJ_LockText(Dc_Attr->hlfntNew);
- if ( TextObj != NULL )
- {
- Result = TextIntGetTextExtentPoint (
- dc, TextObj, String, Count, 0, NULL, NULL, &Size);
- TEXTOBJ_UnlockText(TextObj);
- }
- else
- Result = FALSE;
- DC_UnlockDc(dc);
-
- ExFreePool(String);
- if (! Result)
- {
- return FALSE;
- }
-
- Status = MmCopyToCaller(UnsafeSize, &Size, sizeof(SIZE));
- if (! NT_SUCCESS(Status))
- {
- SetLastNtError(Status);
- return FALSE;
- }
-
- return TRUE;
-}
-
W32KAPI
INT
APIENTRY
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 Fri Jan 18 06:43:03 2008
@@ -719,7 +719,6 @@
NtGdiCreateDIBitmap 6
NtGdiGetAspectRatioFilterEx 2
NtGdiGetFontFamilyInfo 4
-NtGdiGetTextExtentPoint32 4
NtGdiOffsetViewportOrgEx 4
NtGdiOffsetWindowOrgEx 4
#