[ros-diffs] [greatlrd] 28730: fix implement of GetTextFaceW checking if the param is vaild or not

greatlrd at svn.reactos.org greatlrd at svn.reactos.org
Sat Sep 1 02:23:48 CEST 2007


Author: greatlrd
Date: Sat Sep  1 04:23:48 2007
New Revision: 28730

URL: http://svn.reactos.org/svn/reactos?rev=28730&view=rev
Log:
fix implement of GetTextFaceW checking if the param is vaild or not

Modified:
    trunk/reactos/dll/win32/gdi32/objects/text.c

Modified: trunk/reactos/dll/win32/gdi32/objects/text.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/objects/text.c?rev=28730&r1=28729&r2=28730&view=diff
==============================================================================
--- trunk/reactos/dll/win32/gdi32/objects/text.c (original)
+++ trunk/reactos/dll/win32/gdi32/objects/text.c Sat Sep  1 04:23:48 2007
@@ -318,15 +318,22 @@
 /*
  * @implemented
  */
-int
-STDCALL
-GetTextFaceW(
-	HDC	hDC,
-	int	nCount,
-	LPWSTR	lpFaceName
-	)
-{
-	return NtGdiGetTextFaceW(hDC, nCount, lpFaceName, FALSE);
+INT
+STDCALL
+GetTextFaceW(HDC hDC,
+             int nCount,
+             LPWSTR	lpFaceName)
+{
+    INT retValue = 0;
+    if ((!lpFaceName) || (nCount))
+    {
+        retValue = NtGdiGetTextFaceW(hDC,nCount,lpFaceName,0);
+    }
+    else
+    {
+        SetLastError(ERROR_INVALID_PARAMETER);
+    }
+    return retValue;
 }
 
 




More information about the Ros-diffs mailing list