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/te…
==============================================================================
--- 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;
}