BOOL
WINAPI
TextOutA(
- HDC hdc,
- int nXStart,
- int nYStart,
- LPCSTR lpString,
- int cchString)
+ _In_ HDC hdc,
+ _In_ INT nXStart,
+ _In_ INT nYStart,
+ _In_reads_(cchString) LPCSTR lpString,
+ _In_ INT cchString)
{
ANSI_STRING StringA;
UNICODE_STRING StringU;
- BOOL ret;
+ BOOL bResult;
- if (NULL != lpString)
+ if (lpString != NULL)
{
RtlInitAnsiString(&StringA, (LPSTR)lpString);
RtlAnsiStringToUnicodeString(&StringU, &StringA, TRUE);
}
else
+ {
StringU.Buffer = NULL;
+ }
+
+ bResult = TextOutW(hdc, nXStart, nYStart, StringU.Buffer, cchString);
- ret = TextOutW(hdc, nXStart, nYStart, StringU.Buffer, cchString);
RtlFreeUnicodeString(&StringU);
- return ret;
+ return bResult;
}
BOOL
WINAPI
TextOutW(
- HDC hdc,
- int nXStart,
- int nYStart,
- LPCWSTR lpString,
- int cchString)
+ _In_ HDC hdc,
+ _In_ INT nXStart,
+ _In_ INT nYStart,
+ _In_reads_(cchString) LPCWSTR lpString,
+ _In_ INT cchString)
{
- return NtGdiExtTextOutW(hdc, nXStart, nYStart, 0, NULL, (LPWSTR)lpString, cchString, NULL, 0);
+ return NtGdiExtTextOutW(hdc,
+ nXStart,
+ nYStart,
+ 0, NULL,
+ (LPWSTR)lpString,
+ cchString,
+ NULL,
+ 0);
}
*/
BOOL
WINAPI
-PolyTextOutA( HDC hdc, const POLYTEXTA *pptxt, INT cStrings )
+PolyTextOutA(
+ _In_ HDC hdc,
+ _In_reads_(cStrings) const POLYTEXTA *pptxt,
+ _In_ INT cStrings)
{
for (; cStrings>0; cStrings--, pptxt++)
- if (!ExtTextOutA( hdc, pptxt->x, pptxt->y, pptxt->uiFlags, &pptxt->rcl, pptxt->lpstr, pptxt->n, pptxt->pdx ))
+ {
+ if (!ExtTextOutA(hdc,
+ pptxt->x,
+ pptxt->y,
+ pptxt->uiFlags,
+ &pptxt->rcl,
+ pptxt->lpstr,
+ pptxt->n,
+ pptxt->pdx))
+ {
return FALSE;
+ }
+ }
+
return TRUE;
}
*/
BOOL
WINAPI
-PolyTextOutW( HDC hdc, const POLYTEXTW *pptxt, INT cStrings )
+PolyTextOutW(
+ _In_ HDC hdc,
+ _In_reads_(cStrings) const POLYTEXTW *pptxt,
+ _In_ INT cStrings)
{
for (; cStrings>0; cStrings--, pptxt++)
- if (!ExtTextOutW( hdc, pptxt->x, pptxt->y, pptxt->uiFlags, &pptxt->rcl, pptxt->lpstr, pptxt->n, pptxt->pdx ))
+ {
+ if (!ExtTextOutW(hdc,
+ pptxt->x,
+ pptxt->y,
+ pptxt->uiFlags,
+ &pptxt->rcl,
+ pptxt->lpstr,
+ pptxt->n,
+ pptxt->pdx))
+ {
return FALSE;
+ }
+ }
+
return TRUE;
}
*/
DWORD
WINAPI
-GdiGetCodePage(HDC hdc)
+GdiGetCodePage(
+ _In_ HDC hdc)
{
PDC_ATTR pdcattr;
/*
* @unimplemented
*/
-int
+INT
WINAPI
GetTextCharacterExtra(
- HDC hdc
-)
+ _In_ HDC hdc)
{
PDC_ATTR pdcattr;
/*
* @implemented
*/
-int
+INT
WINAPI
-GetTextCharset(HDC hdc)
+GetTextCharset(
+ _In_ HDC hdc)
{
/* MSDN docs say this is equivalent */
return NtGdiGetTextCharsetInfo(hdc,NULL,0);
}
-
/*
* @implemented
*/
BOOL
WINAPI
GetTextMetricsA(
- HDC hdc,
- LPTEXTMETRICA lptm
-)
+ _In_ HDC hdc,
+ _Out_ LPTEXTMETRICA lptm)
{
TMW_INTERNAL tmwi;
BOOL
WINAPI
GetTextMetricsW(
- HDC hdc,
- LPTEXTMETRICW lptm
-)
+ _In_ HDC hdc,
+ _Out_ LPTEXTMETRICW lptm)
{
TMW_INTERNAL tmwi;
- if (! NtGdiGetTextMetricsW(hdc, &tmwi, sizeof(TMW_INTERNAL)))
+ if (!NtGdiGetTextMetricsW(hdc, &tmwi, sizeof(TMW_INTERNAL)))
{
return FALSE;
}
BOOL
APIENTRY
GetTextExtentPointA(
- HDC hdc,
- LPCSTR lpString,
- int cchString,
- LPSIZE lpSize
-)
+ _In_ HDC hdc,
+ _In_reads_(cchString) LPCSTR lpString,
+ _In_ INT cchString,
+ _Out_ LPSIZE lpsz)
{
ANSI_STRING StringA;
UNICODE_STRING StringU;
RtlInitAnsiString(&StringA, (LPSTR)lpString);
RtlAnsiStringToUnicodeString(&StringU, &StringA, TRUE);
- ret = GetTextExtentPointW(hdc, StringU.Buffer, cchString, lpSize);
+ ret = GetTextExtentPointW(hdc, StringU.Buffer, cchString, lpsz);
RtlFreeUnicodeString(&StringU);
BOOL
APIENTRY
GetTextExtentPointW(
- HDC hdc,
- LPCWSTR lpString,
- int cchString,
- LPSIZE lpSize
-)
+ _In_ HDC hdc,
+ _In_reads_(cchString) LPCWSTR lpString,
+ _In_ INT cchString,
+ _Out_ LPSIZE lpsz)
{
- return NtGdiGetTextExtent(hdc, (LPWSTR)lpString, cchString, lpSize, 0);
+ return NtGdiGetTextExtent(hdc, (LPWSTR)lpString, cchString, lpsz, 0);
}
* @implemented
*/
BOOL
-APIENTRY
+WINAPI
GetTextExtentExPointW(
- HDC hdc,
- LPCWSTR lpszStr,
- int cchString,
- int nMaxExtent,
- LPINT lpnFit,
- LPINT alpDx,
- LPSIZE lpSize
-)
+ _In_ HDC hdc,
+ _In_reads_(cchString) LPCWSTR lpszString,
+ _In_ INT cchString,
+ _In_ INT nMaxExtent,
+ _Out_opt_ LPINT lpnFit,
+ _Out_writes_to_opt_(cchString, *lpnFit) LPINT lpnDx,
+ _Out_ LPSIZE lpSize)
{
/* Windows doesn't check nMaxExtent validity in unicode version */
- if(nMaxExtent < -1)
+ if (nMaxExtent < -1)
+ {
DPRINT("nMaxExtent is invalid: %d\n", nMaxExtent);
+ }
return NtGdiGetTextExtentExW (
- hdc, (LPWSTR)lpszStr, cchString, nMaxExtent, (PULONG)lpnFit, (PULONG)alpDx, lpSize, 0 );
+ hdc, (LPWSTR)lpszString, cchString, nMaxExtent, (PULONG)lpnFit, (PULONG)lpnDx, lpSize, 0 );
}
*/
BOOL
WINAPI
-GetTextExtentExPointWPri(HDC hdc,
- LPWSTR lpwsz,
- ULONG cwc,
- ULONG dxMax,
- ULONG *pcCh,
- PULONG pdxOut,
- LPSIZE psize)
+GetTextExtentExPointWPri(
+ _In_ HDC hdc,
+ _In_reads_(cwc) LPWSTR lpwsz,
+ _In_ ULONG cwc,
+ _In_ ULONG dxMax,
+ _Out_opt_ ULONG *pcCh,
+ _Out_writes_to_opt_(cwc, *pcCh) PULONG pdxOut,
+ _In_ LPSIZE psize)
{
- return NtGdiGetTextExtentExW(hdc,lpwsz,cwc,dxMax,pcCh,pdxOut,psize,0);
+ return NtGdiGetTextExtentExW(hdc, lpwsz, cwc, dxMax, pcCh, pdxOut, psize, 0);
}
/*
* @implemented
*/
BOOL
-APIENTRY
+WINAPI
GetTextExtentExPointA(
- HDC hdc,
- LPCSTR lpszStr,
- int cchString,
- int nMaxExtent,
- LPINT lpnFit,
- LPINT alpDx,
- LPSIZE lpSize
-)
+ _In_ HDC hdc,
+ _In_reads_(cchString) LPCSTR lpszStr,
+ _In_ INT cchString,
+ _In_ INT nMaxExtent,
+ _Out_opt_ LPINT lpnFit,
+ _Out_writes_to_opt_ (cchString, *lpnFit) LPINT lpnDx,
+ _Out_ LPSIZE lpSize)
{
NTSTATUS Status;
LPWSTR lpszStrW;
- BOOL rc = 0;
+ BOOL bResult = FALSE;
- if(nMaxExtent < -1)
+ if (nMaxExtent < -1)
{
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}
- Status = HEAP_strdupA2W ( &lpszStrW, lpszStr );
+ Status = HEAP_strdupA2W(&lpszStrW, lpszStr);
if (!NT_SUCCESS (Status))
- SetLastError (RtlNtStatusToDosError(Status));
- else
{
- rc = NtGdiGetTextExtentExW (
- hdc, lpszStrW, cchString, nMaxExtent, (PULONG)lpnFit, (PULONG)alpDx, lpSize, 0 );
-
- HEAP_free ( lpszStrW );
+ SetLastError(RtlNtStatusToDosError(Status));
+ return FALSE;
}
- return rc;
+ bResult = NtGdiGetTextExtentExW(hdc,
+ lpszStrW,
+ cchString,
+ nMaxExtent,
+ (PULONG)lpnFit,
+ (PULONG)lpnDx,
+ lpSize,
+ 0);
+
+ HEAP_free(lpszStrW);
+
+ return bResult;
}
* @implemented
*/
BOOL
-APIENTRY
+WINAPI
GetTextExtentPoint32A(
- HDC hdc,
- LPCSTR lpString,
- int cchString,
- LPSIZE lpSize
-)
+ _In_ HDC hdc,
+ _In_reads_(cchString) LPCSTR lpString,
+ _In_ INT cchString,
+ _Out_ LPSIZE lpSize)
{
ANSI_STRING StringA;
UNICODE_STRING StringU;
* @implemented
*/
BOOL
-APIENTRY
+WINAPI
GetTextExtentPoint32W(
- HDC hdc,
- LPCWSTR lpString,
- int cchString,
- LPSIZE lpSize
-)
+ _In_ HDC hdc,
+ _In_reads_(cchString) LPCWSTR lpString,
+ _In_ int cchString,
+ _Out_ LPSIZE lpSize)
{
return NtGdiGetTextExtent(hdc, (LPWSTR)lpString, cchString, lpSize, 0);
}
*/
BOOL
WINAPI
-GetTextExtentExPointI(HDC hdc,
- LPWORD pgiIn,
- int cgi,
- int nMaxExtent,
- LPINT lpnFit,
- LPINT alpDx,
- LPSIZE lpSize)
-{
- return NtGdiGetTextExtentExW(hdc,pgiIn,cgi,nMaxExtent,(ULONG *)lpnFit, (PULONG) alpDx,lpSize,GTEF_INDICES);
+GetTextExtentExPointI(
+ _In_ HDC hdc,
+ _In_reads_(cgi) LPWORD pgiIn,
+ _In_ INT cgi,
+ _In_ INT nMaxExtent,
+ _Out_opt_ LPINT lpnFit,
+ _Out_writes_to_opt_(cwchString, *lpnFit) LPINT lpnDx,
+ _Out_ LPSIZE lpSize)
+{
+ return NtGdiGetTextExtentExW(hdc,
+ pgiIn,
+ cgi,
+ nMaxExtent,
+ (PULONG)lpnFit,
+ (PULONG)lpnDx,
+ lpSize,
+ GTEF_INDICES);
}
/*
*/
BOOL
WINAPI
-GetTextExtentPointI(HDC hdc,
- LPWORD pgiIn,
- int cgi,
- LPSIZE lpSize)
+GetTextExtentPointI(
+ _In_ HDC hdc,
+ _In_reads_(cgi) LPWORD pgiIn,
+ _In_ int cgi,
+ _Out_ LPSIZE lpSize)
{
- return NtGdiGetTextExtent(hdc,pgiIn,cgi,lpSize,GTEF_INDICES);
+ return NtGdiGetTextExtent(hdc, pgiIn, cgi, lpSize, GTEF_INDICES);
}
/*
BOOL
WINAPI
ExtTextOutA(
- HDC hdc,
- int X,
- int Y,
- UINT fuOptions,
- CONST RECT *lprc,
- LPCSTR lpString,
- UINT cchString,
- CONST INT *lpDx
-)
+ _In_ HDC hdc,
+ _In_ INT x,
+ _In_ INT y,
+ _In_ UINT fuOptions,
+ _In_opt_ const RECT *lprc,
+ _In_reads_opt_(cch) LPCSTR lpString,
+ _In_ UINT cch,
+ _In_reads_opt_(cch) const INT *lpDx)
{
ANSI_STRING StringA;
UNICODE_STRING StringU;
RtlInitAnsiString(&StringA, (LPSTR)lpString);
RtlAnsiStringToUnicodeString(&StringU, &StringA, TRUE);
- ret = ExtTextOutW(hdc, X, Y, fuOptions, lprc, StringU.Buffer, cchString, lpDx);
+ ret = ExtTextOutW(hdc, x, y, fuOptions, lprc, StringU.Buffer, cch, lpDx);
RtlFreeUnicodeString(&StringU);
BOOL
WINAPI
ExtTextOutW(
- HDC hdc,
- int X,
- int Y,
- UINT fuOptions,
- CONST RECT *lprc,
- LPCWSTR lpString,
- UINT cchString,
- CONST INT *lpDx
-)
+ _In_ HDC hdc,
+ _In_ INT x,
+ _In_ INT y,
+ _In_ UINT fuOptions,
+ _In_opt_ const RECT *lprc,
+ _In_reads_opt_(cwc) LPCWSTR lpString,
+ _In_ UINT cwc,
+ _In_reads_opt_(cwc) const INT *lpDx)
{
- return NtGdiExtTextOutW(hdc, X, Y, fuOptions, (LPRECT)lprc, (LPWSTR)lpString, cchString, (LPINT)lpDx, 0);
+ return NtGdiExtTextOutW(hdc,
+ x,
+ y,
+ fuOptions,
+ (LPRECT)lprc,
+ (LPWSTR)lpString,
+ cwc,
+ (LPINT)lpDx,
+ 0);
}
*/
INT
WINAPI
-GetTextFaceW(HDC hDC,
- INT nCount,
- PWSTR pFaceName)
+GetTextFaceW(
+ _In_ HDC hdc,
+ _In_ INT cwcMax,
+ _Out_writes_to_opt_(cwcMax, return) LPWSTR pFaceName)
{
/* Validate parameters */
- if (pFaceName && nCount <= 0)
+ if (pFaceName && cwcMax <= 0)
{
/* Set last error and return failure */
GdiSetLastError(ERROR_INVALID_PARAMETER);
}
/* Forward to kernel */
- return NtGdiGetTextFaceW(hDC, nCount, pFaceName, FALSE);
+ return NtGdiGetTextFaceW(hdc, cwcMax, pFaceName, FALSE);
}
/*
* @implemented
*/
-int
+INT
WINAPI
-GetTextFaceA( HDC hdc, INT count, LPSTR name )
+GetTextFaceA(
+ _In_ HDC hdc,
+ _In_ INT cchMax,
+ _Out_writes_to_opt_(cchMax, return) LPSTR lpName)
{
INT res;
LPWSTR nameW;
/* Validate parameters */
- if (name && count <= 0)
+ if (lpName && cchMax <= 0)
{
/* Set last error and return failure */
GdiSetLastError(ERROR_INVALID_PARAMETER);
{
return 0;
}
+
GetTextFaceW( hdc, res, nameW );
- if (name)
+ if (lpName)
{
- if (count && !WideCharToMultiByte( CP_ACP, 0, nameW, -1, name, count, NULL, NULL))
- name[count-1] = 0;
- res = strlen(name);
+ if (cchMax && !WideCharToMultiByte( CP_ACP, 0, nameW, -1, lpName, cchMax, NULL, NULL))
+ lpName[cchMax-1] = 0;
+ res = strlen(lpName);
}
else
+ {
res = WideCharToMultiByte( CP_ACP, 0, nameW, -1, NULL, 0, NULL, NULL);
+ }
+
HeapFree( GetProcessHeap(), 0, nameW );
return res;
}
*/
INT
WINAPI
-GetTextFaceAliasW(HDC hdc,
- int cChar,
- LPWSTR pszOut)
+GetTextFaceAliasW(
+ _In_ HDC hdc,
+ _In_ INT cwcMax,
+ _Out_writes_to_opt_(cwcMax, return) LPWSTR pszOut)
{
- if ( pszOut && !cChar )
+ if (pszOut && !cwcMax)
{
GdiSetLastError(ERROR_INVALID_PARAMETER);
return 0;
}
- return NtGdiGetTextFaceW(hdc,cChar,pszOut,TRUE);
+
+ return NtGdiGetTextFaceW(hdc, cwcMax, pszOut, TRUE);
}
BOOL
WINAPI
GetFontResourceInfoW(
- LPCWSTR lpFileName,
- DWORD *pdwBufSize,
- void* lpBuffer,
- DWORD dwType
-)
+ _In_z_ LPCWSTR lpFileName,
+ _Inout_ DWORD *pdwBufSize,
+ _Out_writes_to_(*pdwBufSize, *pdwBufSize) PVOID lpBuffer,
+ _In_ DWORD dwType)
{
BOOL bRet;
UNICODE_STRING NtFileName;
RtlFreeHeap(RtlGetProcessHeap(), 0, NtFileName.Buffer);
- if (!bRet)
- {
- return FALSE;
- }
-
- return TRUE;
+ return bRet;
}
/*
* @unimplemented
*/
-int
+INT
WINAPI
SetTextCharacterExtra(
- HDC hdc,
- int CharExtra
-)
+ _In_ HDC hdc,
+ _In_ INT nCharExtra)
{
- INT cExtra;
PDC_ATTR pdcattr;
+ INT nOldCharExtra;
- if (CharExtra == 0x80000000)
+ if (nCharExtra == 0x80000000)
{
SetLastError(ERROR_INVALID_PARAMETER);
return 0x80000000;
#if 0
if (GDI_HANDLE_GET_TYPE(hdc) == GDI_OBJECT_TYPE_METADC)
{
- return MFDRV_SetTextCharacterExtra( hdc, CharExtra ); // Wine port.
+ return MFDRV_SetTextCharacterExtra( hdc, nCharExtra ); // Wine port.
}
#endif
}
}
- cExtra = pdcattr->lTextExtra;
- pdcattr->lTextExtra = CharExtra;
- return cExtra;
+ nOldCharExtra = pdcattr->lTextExtra;
+ pdcattr->lTextExtra = nCharExtra;
+ return nOldCharExtra;
}
/*
*/
UINT
WINAPI
-GetTextAlign(HDC hdc)
+GetTextAlign(
+ _In_ HDC hdc)
{
PDC_ATTR pdcattr;
*/
COLORREF
WINAPI
-GetTextColor(HDC hdc)
+GetTextColor(
+ _In_ HDC hdc)
{
PDC_ATTR pdcattr;
*/
UINT
WINAPI
-SetTextAlign(HDC hdc,
- UINT fMode)
+SetTextAlign(
+ _In_ HDC hdc,
+ _In_ UINT fMode)
{
PDC_ATTR pdcattr;
- INT OldMode;
+ INT fOldMode;
/* Get the DC attribute */
pdcattr = GdiGetDcAttr(hdc);
}
#endif
- OldMode = pdcattr->lTextAlign;
+ fOldMode = pdcattr->lTextAlign;
pdcattr->lTextAlign = fMode; // Raw
if (pdcattr->dwLayout & LAYOUT_RTL)
{
}
pdcattr->flTextAlign = fMode & TA_MASK;
- return OldMode;
+ return fOldMode;
}
COLORREF
WINAPI
SetTextColor(
- HDC hdc,
- COLORREF crColor
-)
+ _In_ HDC hdc,
+ _In_ COLORREF crColor)
{
PDC_ATTR pdcattr;
- COLORREF OldColor = CLR_INVALID;
+ COLORREF crOldColor = CLR_INVALID;
/* Get the DC attribute */
pdcattr = GdiGetDcAttr(hdc);
}
#endif
- OldColor = (COLORREF) pdcattr->ulForegroundClr;
- pdcattr->ulForegroundClr = (ULONG) crColor;
+ crOldColor = (COLORREF) pdcattr->ulForegroundClr;
+ pdcattr->ulForegroundClr = (ULONG)crColor;
- if ( pdcattr->crForegroundClr != crColor )
+ if (pdcattr->crForegroundClr != crColor)
{
pdcattr->ulDirty_ |= (DIRTY_TEXT|DIRTY_LINE|DIRTY_FILL);
pdcattr->crForegroundClr = crColor;
}
- return OldColor;
+
+ return crOldColor;
}
/*
BOOL
WINAPI
SetTextJustification(
- HDC hdc,
- int extra,
- int breaks
-)
+ _In_ HDC hdc,
+ _In_ INT nBreakExtra,
+ _In_ INT nBreakCount)
{
PDC_ATTR pdcattr;
if (GDI_HANDLE_GET_TYPE(hDC) != GDI_OBJECT_TYPE_DC)
{
if (GDI_HANDLE_GET_TYPE(hDC) == GDI_OBJECT_TYPE_METADC)
- return MFDRV_SetTextJustification( hdc, extra, breaks )
+ return MFDRV_SetTextJustification( hdc, nBreakExtra, nBreakCount )
else
{
SetLastError(ERROR_INVALID_HANDLE);
}
}
- pdcattr->cBreak = breaks;
- pdcattr->lBreakExtra = extra;
+ pdcattr->cBreak = nBreakCount;
+ pdcattr->lBreakExtra = nBreakExtra;
return TRUE;
}
*/
UINT
WINAPI
-GetStringBitmapA(HDC hdc,
- LPSTR psz,
- BOOL DoCall,
- UINT cj,
- BYTE *lpSB)
+GetStringBitmapA(
+ _In_ HDC hdc,
+ _In_ LPSTR psz,
+ _In_ BOOL bDoCall,
+ _In_ UINT cj,
+ _Out_writes_(cj) BYTE *lpSB)
{
NTSTATUS Status;
PWSTR pwsz;
- UINT retValue = 0;
+ UINT uResult = 0;
- if (DoCall)
+ if (!bDoCall)
{
- Status = HEAP_strdupA2W ( &pwsz, psz );
- if ( !NT_SUCCESS (Status) )
- {
- SetLastError (RtlNtStatusToDosError(Status));
- }
- else
- {
- retValue = NtGdiGetStringBitmapW(hdc, pwsz, 1, lpSB, cj);
- HEAP_free ( pwsz );
- }
+ return 0;
}
- return retValue;
+ Status = HEAP_strdupA2W(&pwsz, psz);
+ if (!NT_SUCCESS(Status))
+ {
+ SetLastError (RtlNtStatusToDosError(Status));
+ }
+ else
+ {
+ uResult = NtGdiGetStringBitmapW(hdc, pwsz, 1, lpSB, cj);
+ HEAP_free(pwsz);
+ }
+
+ return uResult;
}
*/
UINT
WINAPI
-GetStringBitmapW(HDC hdc,
- LPWSTR pwsz,
- BOOL doCall,
- UINT cj,
- BYTE *lpSB)
+GetStringBitmapW(
+ _In_ HDC hdc,
+ _In_ LPWSTR pwsz,
+ _In_ BOOL bDoCall,
+ _In_ UINT cj,
+ _Out_writes_(cj) BYTE *lpSB)
{
- UINT retValue = 0;
-
- if (doCall)
+ if (!bDoCall)
{
- retValue = NtGdiGetStringBitmapW(hdc, pwsz, 1, lpSB, cj);
+ return 0;
}
- return retValue;
+ return NtGdiGetStringBitmapW(hdc, pwsz, 1, lpSB, cj);
}
*/
BOOL
WINAPI
-GetETM(HDC hdc,
- EXTTEXTMETRIC *petm)
+GetETM(
+ _In_ HDC hdc,
+ _Out_ EXTTEXTMETRIC *petm)
{
- BOOL Ret = NtGdiGetETM(hdc, petm);
+ BOOL bResult;
+
+ bResult = NtGdiGetETM(hdc, petm);
- if (Ret && petm)
+ if (bResult && petm)
+ {
petm->emKernPairs = (WORD)GetKerningPairsA(hdc, 0, 0);
+ }
- return Ret;
+ return bResult;
}