TextOut functions take a character count, not a byte count. Rename cb to cch.

svn path=/trunk/; revision=38204
This commit is contained in:
Timo Kreuzer 2008-12-20 21:19:43 +00:00
parent 869fc7ead9
commit 54831b15db

View file

@ -12,7 +12,7 @@ TextOutA(
int nXStart, int nXStart,
int nYStart, int nYStart,
LPCSTR lpString, LPCSTR lpString,
int cbString) int cchString)
{ {
ANSI_STRING StringA; ANSI_STRING StringA;
UNICODE_STRING StringU; UNICODE_STRING StringU;
@ -25,7 +25,7 @@ TextOutA(
} else } else
StringU.Buffer = NULL; StringU.Buffer = NULL;
ret = TextOutW(hdc, nXStart, nYStart, StringU.Buffer, cbString); ret = TextOutW(hdc, nXStart, nYStart, StringU.Buffer, cchString);
RtlFreeUnicodeString(&StringU); RtlFreeUnicodeString(&StringU);
return ret; return ret;
} }
@ -41,9 +41,9 @@ TextOutW(
int nXStart, int nXStart,
int nYStart, int nYStart,
LPCWSTR lpString, LPCWSTR lpString,
int cbString) int cchString)
{ {
return NtGdiExtTextOutW(hdc, nXStart, nYStart, 0, NULL, (LPWSTR)lpString, cbString, NULL, 0); return NtGdiExtTextOutW(hdc, nXStart, nYStart, 0, NULL, (LPWSTR)lpString, cchString, NULL, 0);
} }
@ -143,7 +143,7 @@ APIENTRY
GetTextExtentPointA( GetTextExtentPointA(
HDC hdc, HDC hdc,
LPCSTR lpString, LPCSTR lpString,
int cbString, int cchString,
LPSIZE lpSize LPSIZE lpSize
) )
{ {
@ -154,7 +154,7 @@ GetTextExtentPointA(
RtlInitAnsiString(&StringA, (LPSTR)lpString); RtlInitAnsiString(&StringA, (LPSTR)lpString);
RtlAnsiStringToUnicodeString(&StringU, &StringA, TRUE); RtlAnsiStringToUnicodeString(&StringU, &StringA, TRUE);
ret = GetTextExtentPointW(hdc, StringU.Buffer, cbString, lpSize); ret = GetTextExtentPointW(hdc, StringU.Buffer, cchString, lpSize);
RtlFreeUnicodeString(&StringU); RtlFreeUnicodeString(&StringU);
@ -170,11 +170,11 @@ APIENTRY
GetTextExtentPointW( GetTextExtentPointW(
HDC hdc, HDC hdc,
LPCWSTR lpString, LPCWSTR lpString,
int cbString, int cchString,
LPSIZE lpSize LPSIZE lpSize
) )
{ {
return NtGdiGetTextExtent(hdc, (LPWSTR)lpString, cbString, lpSize, 0); return NtGdiGetTextExtent(hdc, (LPWSTR)lpString, cchString, lpSize, 0);
} }
@ -240,7 +240,7 @@ APIENTRY
GetTextExtentPoint32A( GetTextExtentPoint32A(
HDC hdc, HDC hdc,
LPCSTR lpString, LPCSTR lpString,
int cbString, int cchString,
LPSIZE lpSize LPSIZE lpSize
) )
{ {
@ -251,7 +251,7 @@ GetTextExtentPoint32A(
RtlInitAnsiString(&StringA, (LPSTR)lpString); RtlInitAnsiString(&StringA, (LPSTR)lpString);
RtlAnsiStringToUnicodeString(&StringU, &StringA, TRUE); RtlAnsiStringToUnicodeString(&StringU, &StringA, TRUE);
ret = GetTextExtentPoint32W(hdc, StringU.Buffer, cbString, lpSize); ret = GetTextExtentPoint32W(hdc, StringU.Buffer, cchString, lpSize);
RtlFreeUnicodeString(&StringU); RtlFreeUnicodeString(&StringU);
@ -267,11 +267,11 @@ APIENTRY
GetTextExtentPoint32W( GetTextExtentPoint32W(
HDC hdc, HDC hdc,
LPCWSTR lpString, LPCWSTR lpString,
int cbString, int cchString,
LPSIZE lpSize LPSIZE lpSize
) )
{ {
return NtGdiGetTextExtent(hdc, (LPWSTR)lpString, cbString, lpSize, 0); return NtGdiGetTextExtent(hdc, (LPWSTR)lpString, cchString, lpSize, 0);
} }
/* /*
@ -315,7 +315,7 @@ ExtTextOutA(
UINT fuOptions, UINT fuOptions,
CONST RECT *lprc, CONST RECT *lprc,
LPCSTR lpString, LPCSTR lpString,
UINT cbCount, UINT cchString,
CONST INT *lpDx CONST INT *lpDx
) )
{ {
@ -326,7 +326,7 @@ ExtTextOutA(
RtlInitAnsiString(&StringA, (LPSTR)lpString); RtlInitAnsiString(&StringA, (LPSTR)lpString);
RtlAnsiStringToUnicodeString(&StringU, &StringA, TRUE); RtlAnsiStringToUnicodeString(&StringU, &StringA, TRUE);
ret = ExtTextOutW(hdc, X, Y, fuOptions, lprc, StringU.Buffer, cbCount, lpDx); ret = ExtTextOutW(hdc, X, Y, fuOptions, lprc, StringU.Buffer, cchString, lpDx);
RtlFreeUnicodeString(&StringU); RtlFreeUnicodeString(&StringU);
@ -346,11 +346,11 @@ ExtTextOutW(
UINT fuOptions, UINT fuOptions,
CONST RECT *lprc, CONST RECT *lprc,
LPCWSTR lpString, LPCWSTR lpString,
UINT cbCount, UINT cchString,
CONST INT *lpDx CONST INT *lpDx
) )
{ {
return NtGdiExtTextOutW(hdc, X, Y, fuOptions, (LPRECT)lprc, (LPWSTR)lpString, cbCount, (LPINT)lpDx, 0); return NtGdiExtTextOutW(hdc, X, Y, fuOptions, (LPRECT)lprc, (LPWSTR)lpString, cchString, (LPINT)lpDx, 0);
} }