Reactos

[GDI32][NTGDI][SDK] Font/Text: Fix SAL2 annotations and const-ness (#7865)

I want to work in correct type info.
JIRA issue: CORE-17684
- Add and fix SAL2 annotations.
- Fix const-ness of function
parameters.
- Delete needless type casts.

authored by

Katayama Hirofumi MZ and committed by
GitHub
0ca6002b 530d26a1

+312 -300
+31 -31
sdk/include/psdk/ntgdi.h
··· 151 151 BOOL 152 152 APIENTRY 153 153 NtGdiGetFontResourceInfoInternalW( 154 - _In_reads_z_(cwc) LPWSTR pwszFiles, 154 + _In_reads_z_(cwc) PCWCH pwszFiles, 155 155 _In_ ULONG cwc, 156 156 _In_ ULONG cFiles, 157 157 _In_ UINT cjBuf, ··· 165 165 APIENTRY 166 166 NtGdiGetGlyphIndicesW( 167 167 _In_ HDC hdc, 168 - _In_reads_opt_(cwc) LPCWSTR pwc, 168 + _In_reads_opt_(cwc) PCWCH pwc, 169 169 _In_ INT cwc, 170 - _Out_writes_opt_(cwc) LPWORD pgi, 170 + _Out_writes_opt_(cwc) PWORD pgi, 171 171 _In_ DWORD iMode); 172 172 173 173 __kernel_entry ··· 176 176 APIENTRY 177 177 NtGdiGetGlyphIndicesWInternal( 178 178 _In_ HDC hdc, 179 - _In_reads_opt_(cwc) LPWSTR pwc, 179 + _In_reads_opt_(cwc) PCWCH pwc, 180 180 _In_ INT cwc, 181 - _Out_writes_opt_(cwc) LPWORD pgi, 181 + _Out_writes_opt_(cwc) PWORD pgi, 182 182 _In_ DWORD iMode, 183 183 _In_ BOOL bSubset); 184 184 ··· 235 235 NtGdiGetOutlineTextMetricsInternalW( 236 236 _In_ HDC hdc, 237 237 _In_ ULONG cjotm, 238 - _Out_writes_bytes_opt_(cjotm) OUTLINETEXTMETRICW *potmw, 239 - _Out_ TMDIFF *ptmd); 238 + _Out_writes_bytes_opt_(cjotm) POUTLINETEXTMETRICW potmw, 239 + _Out_ PTMDIFF ptmd); 240 240 241 241 _Success_(return != FALSE) 242 242 __kernel_entry ··· 342 342 HANDLE 343 343 APIENTRY 344 344 NtGdiAddFontMemResourceEx( 345 - _In_reads_bytes_(cjBuffer) PVOID pvBuffer, 345 + _In_reads_bytes_(cjBuffer) const VOID *pvBuffer, 346 346 _In_ DWORD cjBuffer, 347 - _In_reads_bytes_opt_(cjDV) DESIGNVECTOR *pdv, 347 + _In_reads_bytes_opt_(cjDV) const DESIGNVECTOR *pdv, 348 348 _In_ ULONG cjDV, 349 - _Out_ DWORD *pNumFonts); 349 + _Out_ PDWORD pNumFonts); 350 350 351 351 __kernel_entry 352 352 W32KAPI ··· 1598 1598 BOOL 1599 1599 APIENTRY 1600 1600 NtGdiRemoveFontResourceW( 1601 - _In_reads_(cwc) WCHAR *pwszFiles, 1601 + _In_reads_(cwc) PCWCH pwszFiles, 1602 1602 _In_ ULONG cwc, 1603 1603 _In_ ULONG cFiles, 1604 1604 _In_ ULONG fl, 1605 1605 _In_ DWORD dwPidTid, 1606 - _In_opt_ DESIGNVECTOR *pdv); 1606 + _In_opt_ const DESIGNVECTOR *pdv); 1607 1607 1608 1608 __kernel_entry 1609 1609 W32KAPI ··· 1663 1663 APIENTRY 1664 1664 NtGdiGetTextExtentExW( 1665 1665 _In_ HDC hdc, 1666 - _In_reads_opt_(cwc) LPWSTR pwsz, 1666 + _In_reads_opt_(cwc) PCWCH pwsz, 1667 1667 _In_ ULONG cwc, 1668 1668 _In_ ULONG dxMax, 1669 - _Out_opt_ ULONG *pcCh, 1669 + _Out_opt_ PULONG pcCh, 1670 1670 _Out_writes_to_opt_(cwc, *pcCh) PULONG pdxOut, 1671 - _Out_ LPSIZE psize, 1671 + _Out_ PSIZE psize, 1672 1672 _In_ FLONG fl); 1673 1673 1674 1674 __kernel_entry ··· 1679 1679 _In_ HDC hdc, 1680 1680 _In_ UINT wchFirst, 1681 1681 _In_ ULONG cwch, 1682 - _In_reads_opt_(cwch) PWCHAR pwch, 1682 + _In_reads_opt_(cwch) PCWCH pwch, 1683 1683 _In_ FLONG fl, 1684 1684 _Out_writes_bytes_(cwch * sizeof(ABC)) PVOID pvBuf); 1685 1685 ··· 1689 1689 APIENTRY 1690 1690 NtGdiGetCharacterPlacementW( 1691 1691 _In_ HDC hdc, 1692 - _In_reads_z_(nCount) LPWSTR pwsz, 1692 + _In_reads_(nCount) PCWCH pwsz, 1693 1693 _In_ INT nCount, 1694 1694 _In_ INT nMaxExtent, 1695 - _Inout_ LPGCP_RESULTSW pgcpw, 1695 + _Inout_opt_ LPGCP_RESULTSW pgcpw, 1696 1696 _In_ DWORD dwFlags); 1697 1697 1698 1698 __kernel_entry ··· 1986 1986 _In_ HDC hdc, 1987 1987 _In_ UINT wcFirst, 1988 1988 _In_ UINT cwc, 1989 - _In_reads_opt_(cwc) PWCHAR pwc, 1989 + _In_reads_opt_(cwc) PCWCH pwc, 1990 1990 _In_ FLONG fl, 1991 1991 _Out_writes_bytes_(cwc * sizeof(ULONG)) PVOID pvBuf); 1992 1992 ··· 2069 2069 _Out_ LPGLYPHMETRICS pgm, 2070 2070 _In_ ULONG cjBuf, 2071 2071 _Out_writes_bytes_opt_(cjBuf) PVOID pvBuf, 2072 - _In_ LPMAT2 pmat2, 2072 + _In_ const MAT2 *pmat2, 2073 2073 _In_ BOOL bIgnoreRotation); 2074 2074 2075 2075 __kernel_entry ··· 2457 2457 APIENTRY 2458 2458 NtGdiGetTextExtent( 2459 2459 _In_ HDC hdc, 2460 - _In_reads_(cwc) LPWSTR lpwsz, 2460 + _In_reads_(cwc) PCWCH lpwsz, 2461 2461 _In_ INT cwc, 2462 - _Out_ LPSIZE psize, 2462 + _Out_ PSIZE psize, 2463 2463 _In_ UINT flOpts); 2464 2464 2465 2465 _Success_(return != FALSE) ··· 2469 2469 APIENTRY 2470 2470 NtGdiGetTextMetricsW( 2471 2471 _In_ HDC hdc, 2472 - _Out_writes_bytes_(cj) TMW_INTERNAL *ptm, 2472 + _Out_writes_bytes_(cj) PTMW_INTERNAL ptm, 2473 2473 _In_ ULONG cj); 2474 2474 2475 2475 __kernel_entry ··· 2477 2477 INT 2478 2478 APIENTRY 2479 2479 NtGdiGetTextFaceW( 2480 - _In_ HDC hdc, 2481 - _In_ INT cChar, 2482 - _Out_writes_to_opt_(cChar, return) LPWSTR pszOut, 2480 + _In_ HDC hDC, 2481 + _In_ INT Count, 2482 + _Out_writes_to_opt_(Count, return) PWSTR FaceName, 2483 2483 _In_ BOOL bAliasName); 2484 2484 2485 2485 __kernel_entry ··· 2501 2501 _In_ INT y, 2502 2502 _In_ UINT flOpts, 2503 2503 _In_opt_ LPCRECT prcl, 2504 - _In_reads_opt_(cwc) LPCWSTR pwsz, 2504 + _In_reads_opt_(cwc) PCWCH pwsz, 2505 2505 _In_range_(0, 0xffff) UINT cwc, 2506 2506 _In_reads_opt_(_Inexpressible_(cwc)) const INT *pdx, 2507 2507 _In_ DWORD dwCodePage); ··· 2873 2873 W32KAPI 2874 2874 APIENTRY 2875 2875 NtGdiAddFontResourceW( 2876 - _In_reads_(cwc) WCHAR *pwszFiles, 2876 + _In_reads_(cwc) PCWCH pwszFiles, 2877 2877 _In_ ULONG cwc, 2878 2878 _In_ ULONG cFiles, 2879 2879 _In_ FLONG f, 2880 2880 _In_ DWORD dwPidTid, 2881 - _In_opt_ DESIGNVECTOR *pdv); 2881 + _In_opt_ const DESIGNVECTOR *pdv); 2882 2882 2883 2883 __kernel_entry 2884 2884 W32KAPI 2885 2885 HFONT 2886 2886 APIENTRY 2887 2887 NtGdiHfontCreate( 2888 - _In_reads_bytes_(cjElfw) ENUMLOGFONTEXDVW *pelfw, 2888 + _In_reads_bytes_(cjElfw) const ENUMLOGFONTEXDVW *pelfw, 2889 2889 _In_ ULONG cjElfw, 2890 2890 _In_ LFTYPE lft, 2891 2891 _In_ FLONG fl, 2892 - _In_ PVOID pvCliData); 2892 + _In_opt_ PVOID pvCliData); 2893 2893 2894 2894 __kernel_entry 2895 2895 W32KAPI
+7 -7
sdk/include/reactos/undocgdi.h
··· 34 34 35 35 BOOL WINAPI 36 36 GetTextExtentExPointWPri( 37 - HDC hdc, 38 - LPCWSTR lpwsz, 39 - INT cwc, 40 - INT dxMax, 41 - LPINT pcCh, 42 - LPINT pdxOut, 43 - LPSIZE psize); 37 + _In_ HDC hdc, 38 + _In_reads_(cwc) PCWCH lpwsz, 39 + _In_ INT cwc, 40 + _In_ INT dxMax, 41 + _Out_opt_ LPINT pcCh, 42 + _Out_writes_to_opt_(cwc, *pcCh) LPINT pdxOut, 43 + _In_ LPSIZE psize); 44 44 45 45 BOOL WINAPI 46 46 GetFontResourceInfoW(
+6 -6
win32ss/gdi/eng/stubs.c
··· 1087 1087 DWORD 1088 1088 APIENTRY 1089 1089 NtGdiGetGlyphIndicesWInternal( 1090 - IN HDC hdc, 1091 - IN OPTIONAL LPWSTR pwc, 1092 - IN INT cwc, 1093 - OUT OPTIONAL LPWORD pgi, 1094 - IN DWORD iMode, 1095 - IN BOOL bSubset) 1090 + _In_ HDC hdc, 1091 + _In_reads_opt_(cwc) PCWCH pwc, 1092 + _In_ INT cwc, 1093 + _Out_writes_opt_(cwc) PWORD pgi, 1094 + _In_ DWORD iMode, 1095 + _In_ BOOL bSubset) 1096 1096 { 1097 1097 UNIMPLEMENTED; 1098 1098 return 0;
+21 -21
win32ss/gdi/gdi32/objects/font.c
··· 672 672 nSet = lpResults->nGlyphs; 673 673 674 674 return NtGdiGetCharacterPlacementW( hdc, 675 - (LPWSTR)lpString, 675 + lpString, 676 676 nSet, 677 677 nMaxExtent, 678 678 lpResults, ··· 699 699 return NtGdiGetCharABCWidthsW( hdc, 700 700 FirstChar, 701 701 (ULONG)(LastChar - FirstChar + 1), 702 - (PWCHAR) NULL, 702 + NULL, 703 703 0, 704 - (PVOID)abcF); 704 + abcF); 705 705 } 706 706 707 707 /* ··· 724 724 return NtGdiGetCharWidthW( hdc, 725 725 iFirstChar, 726 726 (ULONG)(iLastChar - iFirstChar + 1), 727 - (PWCHAR) NULL, 727 + NULL, 728 728 0, 729 - (PVOID) pxBuffer); 729 + pxBuffer); 730 730 } 731 731 732 732 /* ··· 749 749 return NtGdiGetCharWidthW( hdc, 750 750 iFirstChar, 751 751 (ULONG)(iLastChar - iFirstChar + 1), 752 - (PWCHAR) NULL, 752 + NULL, 753 753 GCW_NOFLOAT, 754 - (PVOID) lpBuffer); 754 + lpBuffer); 755 755 } 756 756 757 757 /* ··· 774 774 return NtGdiGetCharWidthW( hdc, 775 775 iFirstChar, 776 776 (ULONG)(iLastChar - iFirstChar + 1), 777 - (PWCHAR) NULL, 777 + NULL, 778 778 GCW_NOFLOAT|GCW_WIN32, 779 - (PVOID) lpBuffer); 779 + lpBuffer); 780 780 } 781 781 782 782 ··· 800 800 return NtGdiGetCharABCWidthsW( hdc, 801 801 FirstChar, 802 802 (ULONG)(LastChar - FirstChar + 1), 803 - (PWCHAR) NULL, 803 + NULL, 804 804 GCABCW_NOFLOAT, 805 - (PVOID)lpabc); 805 + lpabc); 806 806 } 807 807 808 808 /* ··· 837 837 838 838 ret = NtGdiGetCharWidthW( hdc, 839 839 wstr[0], 840 - (ULONG) count, 841 - (PWCHAR) wstr, 840 + count, 841 + wstr, 842 842 GCW_NOFLOAT, 843 - (PVOID) lpBuffer); 843 + lpBuffer); 844 844 845 845 HeapFree(GetProcessHeap(), 0, str); 846 846 HeapFree(GetProcessHeap(), 0, wstr); ··· 880 880 881 881 ret = NtGdiGetCharWidthW( hdc, 882 882 wstr[0], 883 - (ULONG) count, 884 - (PWCHAR) wstr, 883 + count, 884 + wstr, 885 885 GCW_NOFLOAT|GCW_WIN32, 886 - (PVOID) lpBuffer); 886 + lpBuffer); 887 887 888 888 HeapFree(GetProcessHeap(), 0, str); 889 889 HeapFree(GetProcessHeap(), 0, wstr); ··· 920 920 HeapFree(GetProcessHeap(), 0, str); 921 921 return FALSE; 922 922 } 923 - ret = NtGdiGetCharWidthW( hdc, wstr[0], (ULONG) count, (PWCHAR) wstr, 0, (PVOID) pxBuffer); 923 + ret = NtGdiGetCharWidthW(hdc, wstr[0], count, wstr, 0, pxBuffer); 924 924 925 925 HeapFree(GetProcessHeap(), 0, str); 926 926 HeapFree(GetProcessHeap(), 0, wstr); ··· 1000 1000 HeapFree( GetProcessHeap(), 0, str ); 1001 1001 return FALSE; 1002 1002 } 1003 - ret = NtGdiGetCharABCWidthsW( hdc,wstr[0],(ULONG)count, (PWCHAR)wstr, 0, (PVOID)lpABCF); 1003 + ret = NtGdiGetCharABCWidthsW(hdc, wstr[0], count, wstr, 0, lpABCF); 1004 1004 1005 1005 HeapFree( GetProcessHeap(), 0, str ); 1006 1006 HeapFree( GetProcessHeap(), 0, wstr ); ··· 1666 1666 &Logfont.elfEnumLogfontEx ); 1667 1667 1668 1668 RtlCopyMemory( &Logfont.elfDesignVector, 1669 - (PVOID) &elfexd->elfDesignVector, 1669 + &elfexd->elfDesignVector, 1670 1670 sizeof(DESIGNVECTOR)); 1671 1671 1672 1672 return NtGdiHfontCreate( &Logfont, 0, 0, 0, NULL); ··· 1864 1864 UNICODE_STRING StringU; 1865 1865 HFONT ret; 1866 1866 1867 - RtlInitAnsiString(&StringA, (LPSTR)lpszFace); 1867 + RtlInitAnsiString(&StringA, lpszFace); 1868 1868 RtlAnsiStringToUnicodeString(&StringU, &StringA, TRUE); 1869 1869 1870 1870 ret = CreateFontW(nHeight,
+7 -8
win32ss/gdi/gdi32/objects/text.c
··· 249 249 UNICODE_STRING StringU; 250 250 BOOL ret; 251 251 252 - RtlInitAnsiString(&StringA, (LPSTR)lpString); 252 + /* FIXME: lpString can be non-NUL-terminated */ 253 + RtlInitAnsiString(&StringA, lpString); 253 254 RtlAnsiStringToUnicodeString(&StringU, &StringA, TRUE); 254 255 255 256 ret = GetTextExtentPointW(hdc, StringU.Buffer, cchString, lpsz); ··· 271 272 _In_ INT cchString, 272 273 _Out_ LPSIZE lpsz) 273 274 { 274 - return NtGdiGetTextExtent(hdc, (LPWSTR)lpString, cchString, lpsz, 0); 275 + return NtGdiGetTextExtent(hdc, lpString, cchString, lpsz, 0); 275 276 } 276 277 277 278 ··· 289 290 _Out_writes_to_opt_(cchString, *lpnFit) LPINT lpnDx, 290 291 _Out_ LPSIZE lpSize) 291 292 { 292 - 293 293 /* Windows doesn't check nMaxExtent validity in unicode version */ 294 294 if (nMaxExtent < -1) 295 295 { ··· 299 299 if (LoadLPK(LPK_GTEP)) 300 300 return LpkGetTextExtentExPoint(hdc, lpszString, cchString, nMaxExtent, lpnFit, lpnDx, lpSize, 0, 0); 301 301 302 - return NtGdiGetTextExtentExW ( 303 - hdc, (LPWSTR)lpszString, cchString, nMaxExtent, (PULONG)lpnFit, (PULONG)lpnDx, lpSize, 0 ); 302 + return NtGdiGetTextExtentExW(hdc, lpszString, cchString, nMaxExtent, (PULONG)lpnFit, (PULONG)lpnDx, lpSize, 0); 304 303 } 305 304 306 305 ··· 311 310 WINAPI 312 311 GetTextExtentExPointWPri( 313 312 _In_ HDC hdc, 314 - _In_reads_(cwc) LPCWSTR lpwsz, 313 + _In_reads_(cwc) PCWCH lpwsz, 315 314 _In_ INT cwc, 316 315 _In_ INT dxMax, 317 316 _Out_opt_ LPINT pcCh, 318 317 _Out_writes_to_opt_(cwc, *pcCh) LPINT pdxOut, 319 318 _In_ LPSIZE psize) 320 319 { 321 - return NtGdiGetTextExtentExW(hdc, (LPWSTR)lpwsz, cwc, dxMax, (PULONG)pcCh, (PULONG)pdxOut, psize, 0); 320 + return NtGdiGetTextExtentExW(hdc, lpwsz, cwc, dxMax, (PULONG)pcCh, (PULONG)pdxOut, psize, 0); 322 321 } 323 322 324 323 /* ··· 405 404 _In_ int cchString, 406 405 _Out_ LPSIZE lpSize) 407 406 { 408 - return NtGdiGetTextExtent(hdc, (LPWSTR)lpString, cchString, lpSize, 0); 407 + return NtGdiGetTextExtent(hdc, lpString, cchString, lpSize, 0); 409 408 } 410 409 411 410 /*
+98 -95
win32ss/gdi/ntgdi/font.c
··· 1 1 /* 2 - * PROJECT: ReactOS win32 kernel mode subsystem 3 - * LICENSE: GPL - See COPYING in the top level directory 4 - * FILE: win32ss/gdi/ntgdi/font.c 5 - * PURPOSE: Font 6 - * PROGRAMMERS: James Tabor <james.tabor@reactos.org> 7 - * Timo Kreuzer <timo.kreuzer@reactos.org> 8 - * Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com> 2 + * PROJECT: ReactOS win32 kernel mode subsystem 3 + * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later) 4 + * PURPOSE: Font 5 + * COPYRIGHT: Copyright (C) James Tabor <james.tabor@reactos.org> 6 + * Copyright (C) Timo Kreuzer <timo.kreuzer@reactos.org> 7 + * Copyright (C) Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com> 9 8 */ 10 9 11 10 /** Includes ******************************************************************/ ··· 15 14 #define NDEBUG 16 15 #include <debug.h> 17 16 18 - HFONT APIENTRY HfontCreate( IN PENUMLOGFONTEXDVW pelfw,IN ULONG cjElfw,IN LFTYPE lft,IN FLONG fl,IN PVOID pvCliData ); 17 + HFONT APIENTRY 18 + HfontCreate( 19 + _In_ const ENUMLOGFONTEXDVW *pelfw, 20 + _In_ ULONG cjElfw, 21 + _In_ LFTYPE lft, 22 + _In_ FLONG fl, 23 + _In_opt_ PVOID pvCliData); 19 24 20 25 /** Internal ******************************************************************/ 21 26 22 27 HFONT FASTCALL 23 - GreCreateFontIndirectW( LOGFONTW *lplf ) 28 + GreCreateFontIndirectW(_In_ const LOGFONTW *lplf) 24 29 { 25 30 if (lplf) 26 31 { ··· 38 43 39 44 RtlZeroMemory( &Logfont.elfDesignVector, sizeof(DESIGNVECTOR)); 40 45 41 - return HfontCreate((PENUMLOGFONTEXDVW)&Logfont, 0, 0, 0, NULL ); 46 + return HfontCreate(&Logfont, 0, 0, 0, NULL); 42 47 } 43 48 else return NULL; 44 49 } ··· 46 51 DWORD 47 52 FASTCALL 48 53 GreGetKerningPairs( 49 - HDC hDC, 50 - ULONG NumPairs, 51 - LPKERNINGPAIR krnpair) 54 + _In_ HDC hDC, 55 + _In_ ULONG NumPairs, 56 + _Out_writes_(NumPairs) LPKERNINGPAIR krnpair) 52 57 { 53 58 PDC dc; 54 59 PDC_ATTR pdcattr; ··· 102 107 } 103 108 104 109 /* 105 - 106 110 It is recommended that an application use the GetFontLanguageInfo function 107 111 to determine whether the GCP_DIACRITIC, GCP_DBCS, GCP_USEKERNING, GCP_LIGATE, 108 112 GCP_REORDER, GCP_GLYPHSHAPE, and GCP_KASHIDA values are valid for the ··· 112 116 MS must use a preset "compiled in" support for each language based releases. 113 117 ReactOS uses FreeType, this will need to be supported. ATM this is hard coded 114 118 for GCPCLASS_LATIN! 115 - 116 119 */ 117 120 #if 0 118 121 DWORD 119 122 FASTCALL 120 123 GreGetCharacterPlacementW( 121 - HDC hdc, 122 - LPCWSTR pwsz, 123 - INT nCount, 124 - INT nMaxExtent, 125 - LPGCP_RESULTSW pgcpw, 126 - DWORD dwFlags) 124 + _In_ HDC hdc, 125 + _In_reads_(nCount) PCWCH pwsz, 126 + _In_ INT nCount, 127 + _In_ INT nMaxExtent, 128 + _Inout_opt_ LPGCP_RESULTSW pgcpw, 129 + _In_ DWORD dwFlags) 127 130 { 128 131 GCP_RESULTSW gcpwSave; 129 132 UINT i, nSet, cSet; ··· 290 293 291 294 ULONG 292 295 FASTCALL 293 - FontGetObject(PTEXTOBJ plfont, ULONG cjBuffer, PVOID pvBuffer) 296 + FontGetObject( 297 + _Inout_ PTEXTOBJ plfont, 298 + _In_ ULONG cjBuffer, 299 + _Out_ PVOID pvBuffer) 294 300 { 295 301 ULONG cjMaxSize; 296 302 ENUMLOGFONTEXDVW *plf; ··· 326 332 327 333 DWORD 328 334 FASTCALL 329 - IntGetCharDimensions(HDC hdc, PTEXTMETRICW ptm, PDWORD height) 335 + IntGetCharDimensions( 336 + _In_ HDC hdc, 337 + _Out_opt_ PTEXTMETRICW ptm, 338 + _Out_opt_ PDWORD height) 330 339 { 331 340 PDC pdc; 332 341 PDC_ATTR pdcattr; ··· 354 363 DC_UnlockDc(pdc); 355 364 return 0; 356 365 } 357 - Good = TextIntGetTextExtentPoint(pdc, TextObj, alphabet, 52, 0, NULL, 0, &sz, 0); 366 + Good = TextIntGetTextExtentPoint(pdc, TextObj, alphabet, 52, 0, NULL, NULL, &sz, 0); 358 367 TEXTOBJ_UnlockText(TextObj); 359 368 DC_UnlockDc(pdc); 360 369 ··· 368 377 369 378 DWORD 370 379 FASTCALL 371 - IntGetFontLanguageInfo(PDC Dc) 380 + IntGetFontLanguageInfo(_In_ PDC Dc) 372 381 { 373 382 PDC_ATTR pdcattr; 374 383 FONTSIGNATURE fontsig; ··· 419 428 420 429 PTEXTOBJ 421 430 FASTCALL 422 - RealizeFontInit(HFONT hFont) 431 + RealizeFontInit(_In_ HFONT hFont) 423 432 { 424 433 NTSTATUS Status = STATUS_SUCCESS; 425 434 PTEXTOBJ pTextObj; ··· 440 449 441 450 static BOOL 442 451 IntCheckFontPathNames( 443 - _In_reads_(cwc) WCHAR *pwcFiles, 452 + _In_reads_(cwc) PCWCH pwcFiles, 444 453 _In_ ULONG cFiles, 445 454 _In_ ULONG cwc) 446 455 { ··· 463 472 INT 464 473 APIENTRY 465 474 NtGdiAddFontResourceW( 466 - _In_reads_(cwc) WCHAR *pwcFiles, 475 + _In_reads_(cwc) PCWCH pwcFiles, 467 476 _In_ ULONG cwc, 468 477 _In_ ULONG cFiles, 469 478 _In_ FLONG fl, 470 479 _In_ DWORD dwPidTid, 471 - _In_opt_ DESIGNVECTOR *pdv) 480 + _In_opt_ const DESIGNVECTOR *pdv) 472 481 { 473 482 UNICODE_STRING SafeFileName; 474 483 INT Ret; ··· 517 526 BOOL 518 527 APIENTRY 519 528 NtGdiRemoveFontResourceW( 520 - _In_reads_(cwc) WCHAR *pwszFiles, 529 + _In_reads_(cwc) PCWCH pwszFiles, 521 530 _In_ ULONG cwc, 522 531 _In_ ULONG cFiles, 523 532 _In_ ULONG fl, 524 533 _In_ DWORD dwPidTid, 525 - _In_opt_ DESIGNVECTOR *pdv) 534 + _In_opt_ const DESIGNVECTOR *pdv) 526 535 { 527 536 UNICODE_STRING SafeFileName; 528 537 BOOL Ret; ··· 571 580 HANDLE 572 581 APIENTRY 573 582 NtGdiAddFontMemResourceEx( 574 - IN PVOID pvBuffer, 575 - IN DWORD cjBuffer, 576 - IN DESIGNVECTOR *pdv, 577 - IN ULONG cjDV, 578 - OUT DWORD *pNumFonts) 583 + _In_reads_bytes_(cjBuffer) const VOID *pvBuffer, 584 + _In_ DWORD cjBuffer, 585 + _In_reads_bytes_opt_(cjDV) const DESIGNVECTOR *pdv, 586 + _In_ ULONG cjDV, 587 + _Out_ PDWORD pNumFonts) 579 588 { 580 589 _SEH2_VOLATILE PVOID Buffer = NULL; 581 590 HANDLE Ret; ··· 627 636 BOOL 628 637 APIENTRY 629 638 NtGdiRemoveFontMemResourceEx( 630 - IN HANDLE hMMFont) 639 + _In_ HANDLE hMMFont) 631 640 { 632 641 return IntGdiRemoveFontMemResource(hMMFont); 633 642 } ··· 639 648 DWORD 640 649 APIENTRY 641 650 NtGdiGetCharacterPlacementW( 642 - IN HDC hdc, 643 - IN LPWSTR pwsz, 644 - IN INT nCount, 645 - IN INT nMaxExtent, 646 - IN OUT LPGCP_RESULTSW pgcpw, 647 - IN DWORD dwFlags) 651 + _In_ HDC hdc, 652 + _In_reads_(nCount) PCWCH pwsz, 653 + _In_ INT nCount, 654 + _In_ INT nMaxExtent, 655 + _Inout_opt_ LPGCP_RESULTSW pgcpw, 656 + _In_ DWORD dwFlags) 648 657 { 649 658 UNIMPLEMENTED; 650 659 return 0; ··· 661 670 DWORD 662 671 APIENTRY 663 672 NtGdiGetFontData( 664 - HDC hDC, 665 - DWORD Table, 666 - DWORD Offset, 667 - LPVOID Buffer, 668 - DWORD Size) 673 + _In_ HDC hDC, 674 + _In_ DWORD Table, 675 + _In_ DWORD Offset, 676 + _Out_writes_bytes_(Size) PVOID Buffer, 677 + _In_ DWORD Size) 669 678 { 670 679 PDC Dc; 671 680 PDC_ATTR pdcattr; ··· 717 726 return Result; 718 727 } 719 728 720 - /* 721 - * @implemented 722 - */ 729 + /* @implemented */ 723 730 DWORD 724 731 APIENTRY 725 732 NtGdiGetFontUnicodeRanges( 726 - IN HDC hdc, 727 - OUT OPTIONAL LPGLYPHSET pgs) 733 + _In_ HDC hdc, 734 + _Out_opt_ LPGLYPHSET pgs) 728 735 { 729 736 PDC pDc; 730 737 PDC_ATTR pdcattr; ··· 794 801 ULONG 795 802 APIENTRY 796 803 NtGdiGetGlyphOutline( 797 - IN HDC hdc, 798 - IN WCHAR wch, 799 - IN UINT iFormat, 800 - OUT LPGLYPHMETRICS pgm, 801 - IN ULONG cjBuf, 802 - OUT OPTIONAL PVOID UnsafeBuf, 803 - IN LPMAT2 pmat2, 804 - IN BOOL bIgnoreRotation) 804 + _In_ HDC hdc, 805 + _In_ WCHAR wch, 806 + _In_ UINT iFormat, 807 + _Out_ LPGLYPHMETRICS pgm, 808 + _In_ ULONG cjBuf, 809 + _Out_writes_bytes_opt_(cjBuf) PVOID UnsafeBuf, 810 + _In_opt_ const MAT2 *pmat2, 811 + _In_ BOOL bIgnoreRotation) 805 812 { 806 813 ULONG Ret = GDI_ERROR; 807 814 PDC dc; ··· 878 885 879 886 DWORD 880 887 APIENTRY 881 - NtGdiGetKerningPairs(HDC hDC, 882 - ULONG NumPairs, 883 - LPKERNINGPAIR krnpair) 888 + NtGdiGetKerningPairs( 889 + _In_ HDC hDC, 890 + _In_ ULONG NumPairs, 891 + _Out_writes_(NumPairs) LPKERNINGPAIR krnpair) 884 892 { 885 893 PDC dc; 886 894 PDC_ATTR pdcattr; ··· 952 960 */ 953 961 ULONG 954 962 APIENTRY 955 - NtGdiGetOutlineTextMetricsInternalW (HDC hDC, 956 - ULONG Data, 957 - OUTLINETEXTMETRICW *otm, 958 - TMDIFF *Tmd) 963 + NtGdiGetOutlineTextMetricsInternalW( 964 + _In_ HDC hDC, 965 + _In_ ULONG Data, 966 + _Out_opt_ POUTLINETEXTMETRICW otm, 967 + _In_ PTMDIFF Tmd) 959 968 { 960 969 PDC dc; 961 970 PDC_ATTR pdcattr; ··· 1030 1039 BOOL 1031 1040 APIENTRY 1032 1041 NtGdiGetFontResourceInfoInternalW( 1033 - IN LPWSTR pwszFiles, 1034 - IN ULONG cwc, 1035 - IN ULONG cFiles, 1036 - IN UINT cjIn, 1037 - IN OUT LPDWORD pdwBytes, 1038 - OUT LPVOID pvBuf, 1039 - IN DWORD dwType) 1042 + _In_reads_(cwc) PCWCH pwszFiles, 1043 + _In_ ULONG cwc, 1044 + _In_ ULONG cFiles, 1045 + _In_ UINT cjIn, 1046 + _Inout_ PDWORD pdwBytes, 1047 + _Out_writes_bytes_(*pdwBytes) PVOID pvBuf, 1048 + _In_ DWORD dwType) 1040 1049 { 1041 1050 NTSTATUS Status = STATUS_SUCCESS; 1042 1051 DWORD dwBytes, dwBytesRequested; ··· 1138 1147 return bRet; 1139 1148 } 1140 1149 1141 - /* 1142 - * @unimplemented 1143 - */ 1150 + /* @unimplemented */ 1144 1151 BOOL 1145 1152 APIENTRY 1146 1153 NtGdiGetRealizationInfo( 1147 - IN HDC hdc, 1148 - OUT PREALIZATION_INFO pri, 1149 - IN HFONT hf) 1154 + _In_ HDC hdc, 1155 + _Out_ PREALIZATION_INFO pri, 1156 + _In_ HFONT hf) 1150 1157 { 1151 1158 PDC pDc; 1152 1159 PTEXTOBJ pTextObj; ··· 1209 1216 return Ret; 1210 1217 } 1211 1218 1212 - 1213 1219 HFONT 1214 1220 APIENTRY 1215 1221 HfontCreate( 1216 - IN PENUMLOGFONTEXDVW pelfw, 1217 - IN ULONG cjElfw, 1218 - IN LFTYPE lft, 1219 - IN FLONG fl, 1220 - IN PVOID pvCliData ) 1222 + const ENUMLOGFONTEXDVW *pelfw, 1223 + _In_ ULONG cjElfw, 1224 + _In_ LFTYPE lft, 1225 + _In_ FLONG fl, 1226 + _In_opt_ PVOID pvCliData) 1221 1227 { 1222 1228 HFONT hNewFont; 1223 1229 PLFONT plfont; ··· 1267 1273 HFONT 1268 1274 APIENTRY 1269 1275 NtGdiHfontCreate( 1270 - IN PENUMLOGFONTEXDVW pelfw, 1271 - IN ULONG cjElfw, 1272 - IN LFTYPE lft, 1273 - IN FLONG fl, 1274 - IN PVOID pvCliData ) 1276 + _In_reads_bytes_(cjElfw) const ENUMLOGFONTEXDVW *pelfw, 1277 + _In_ ULONG cjElfw, 1278 + _In_ LFTYPE lft, 1279 + _In_ FLONG fl, 1280 + _In_opt_ PVOID pvCliData) 1275 1281 { 1276 1282 ENUMLOGFONTEXDVW SafeLogfont; 1277 1283 NTSTATUS Status = STATUS_SUCCESS; ··· 1303 1309 1304 1310 return HfontCreate(&SafeLogfont, cjElfw, lft, fl, pvCliData); 1305 1311 } 1306 - 1307 - 1308 - /* EOF */
+68 -66
win32ss/gdi/ntgdi/freetype.c
··· 4630 4630 LPGLYPHMETRICS pgm, 4631 4631 ULONG cjBuf, 4632 4632 PVOID pvBuf, 4633 - LPMAT2 pmat2, 4633 + const MAT2 *pmat2, 4634 4634 BOOL bIgnoreRotation) 4635 4635 { 4636 4636 PDC_ATTR pdcattr; ··· 5151 5151 5152 5152 BOOL 5153 5153 FASTCALL 5154 - TextIntGetTextExtentPoint(PDC dc, 5155 - PTEXTOBJ TextObj, 5156 - LPCWSTR String, 5157 - INT Count, 5158 - ULONG MaxExtent, 5159 - LPINT Fit, 5160 - LPINT Dx, 5161 - LPSIZE Size, 5162 - FLONG fl) 5154 + TextIntGetTextExtentPoint( 5155 + _In_ PDC dc, 5156 + _In_ PTEXTOBJ TextObj, 5157 + _In_reads_(Count) PCWCH String, 5158 + _In_ INT Count, 5159 + _In_ ULONG MaxExtent, 5160 + _Out_ PINT Fit, 5161 + _Out_writes_to_opt_(Count, *Fit) PINT Dx, 5162 + _Out_ PSIZE Size, 5163 + _In_ FLONG fl) 5163 5164 { 5164 5165 PFONTGDI FontGDI; 5165 5166 FT_BitmapGlyph realglyph; ··· 6668 6669 } 6669 6670 6670 6671 LONG NTAPI 6671 - NtGdiGetFontFamilyInfo(HDC Dc, 6672 - const LOGFONTW *UnsafeLogFont, 6673 - PFONTFAMILYINFO UnsafeInfo, 6674 - LPLONG UnsafeInfoCount) 6672 + NtGdiGetFontFamilyInfo( 6673 + _In_ HDC Dc, 6674 + _In_ const LOGFONTW *UnsafeLogFont, 6675 + _Out_ PFONTFAMILYINFO UnsafeInfo, 6676 + _Inout_ PLONG UnsafeInfoCount) 6675 6677 { 6676 6678 NTSTATUS Status; 6677 6679 LOGFONTW LogFont; ··· 6786 6788 */ 6787 6789 static BOOL 6788 6790 IntGetTextDisposition( 6789 - OUT LONGLONG *pX64, 6790 - OUT LONGLONG *pY64, 6791 - IN LPCWSTR String, 6792 - IN INT Count, 6793 - IN OPTIONAL LPINT Dx, 6794 - IN OUT PFONT_CACHE_ENTRY Cache, 6795 - IN UINT fuOptions, 6796 - IN BOOL bNoTransform, 6797 - IN OUT PFONTLINK_CHAIN pChain) 6791 + _Out_ LONGLONG *pX64, 6792 + _Out_ LONGLONG *pY64, 6793 + _In_reads_(Count) PCWCH String, 6794 + _In_ INT Count, 6795 + _In_opt_ const INT *Dx, 6796 + _Inout_ PFONT_CACHE_ENTRY Cache, 6797 + _In_ UINT fuOptions, 6798 + _In_ BOOL bNoTransform, 6799 + _Inout_ PFONTLINK_CHAIN pChain) 6798 6800 { 6799 6801 LONGLONG X64 = 0, Y64 = 0; 6800 6802 INT i, glyph_index; ··· 6954 6956 BOOL 6955 6957 APIENTRY 6956 6958 IntExtTextOutW( 6957 - IN PDC dc, 6958 - IN INT XStart, 6959 - IN INT YStart, 6960 - IN UINT fuOptions, 6961 - IN OPTIONAL PRECTL lprc, 6962 - IN LPCWSTR String, 6963 - IN INT Count, 6964 - IN OPTIONAL LPINT Dx, 6965 - IN DWORD dwCodePage) 6959 + _In_ PDC dc, 6960 + _In_ INT XStart, 6961 + _In_ INT YStart, 6962 + _In_ UINT fuOptions, 6963 + _In_opt_ PRECTL lprc, 6964 + _In_reads_opt_(Count) PCWCH String, 6965 + _In_ INT Count, 6966 + _In_opt_ const INT *Dx, 6967 + _In_ DWORD dwCodePage) 6966 6968 { 6967 6969 /* 6968 6970 * FIXME: ··· 7273 7275 { 7274 7276 IntUnLockFreeType(); 7275 7277 /* Get the width of the space character */ 7276 - TextIntGetTextExtentPoint(dc, TextObj, L" ", 1, 0, NULL, 0, &spaceWidth, 0); 7278 + TextIntGetTextExtentPoint(dc, TextObj, L" ", 1, 0, NULL, NULL, &spaceWidth, 0); 7277 7279 IntLockFreeType(); 7278 7280 glyphSize.cx = spaceWidth.cx; 7279 7281 realglyph->left = 0; ··· 7500 7502 BOOL 7501 7503 APIENTRY 7502 7504 GreExtTextOutW( 7503 - IN HDC hDC, 7504 - IN INT XStart, 7505 - IN INT YStart, 7506 - IN UINT fuOptions, 7507 - IN OPTIONAL PRECTL lprc, 7508 - IN LPCWSTR String, 7509 - IN INT Count, 7510 - IN OPTIONAL LPINT Dx, 7511 - IN DWORD dwCodePage) 7505 + _In_ HDC hDC, 7506 + _In_ INT XStart, 7507 + _In_ INT YStart, 7508 + _In_ UINT fuOptions, 7509 + _In_opt_ PRECTL lprc, 7510 + _In_reads_opt_(Count) PCWCH String, 7511 + _In_ INT Count, 7512 + _In_opt_ const INT *Dx, 7513 + _In_ DWORD dwCodePage) 7512 7514 { 7513 7515 BOOL bResult; 7514 7516 DC *dc; ··· 7542 7544 BOOL 7543 7545 APIENTRY 7544 7546 NtGdiExtTextOutW( 7545 - IN HDC hDC, 7546 - IN INT XStart, 7547 - IN INT YStart, 7548 - IN UINT fuOptions, 7549 - IN OPTIONAL LPCRECT UnsafeRect, 7550 - IN LPCWSTR UnsafeString, 7551 - IN UINT Count, 7552 - IN OPTIONAL const INT *UnsafeDx, 7553 - IN DWORD dwCodePage) 7547 + _In_ HDC hDC, 7548 + _In_ INT XStart, 7549 + _In_ INT YStart, 7550 + _In_ UINT fuOptions, 7551 + _In_opt_ LPCRECT UnsafeRect, 7552 + _In_reads_opt_(Count) PCWCH UnsafeString, 7553 + _In_range_(0, 0xFFFF) UINT Count, 7554 + _In_reads_opt_(_Inexpressible_(cwc)) const INT *UnsafeDx, 7555 + _In_ DWORD dwCodePage) 7554 7556 { 7555 7557 BOOL Result = FALSE; 7556 7558 NTSTATUS Status = STATUS_SUCCESS; ··· 7558 7560 BYTE LocalBuffer[STACK_TEXT_BUFFER_SIZE]; 7559 7561 PVOID Buffer = LocalBuffer; 7560 7562 LPCWSTR SafeString = NULL; 7561 - LPINT SafeDx = NULL; 7563 + PINT SafeDx = NULL; 7562 7564 ULONG BufSize, StringSize, DxSize = 0; 7563 7565 7564 7566 /* Check if String is valid */ ··· 7667 7669 BOOL 7668 7670 APIENTRY 7669 7671 NtGdiGetCharABCWidthsW( 7670 - IN HDC hDC, 7671 - IN UINT FirstChar, 7672 - IN ULONG Count, 7673 - IN OPTIONAL PWCHAR UnSafepwch, 7674 - IN FLONG fl, 7675 - OUT PVOID Buffer) 7672 + _In_ HDC hDC, 7673 + _In_ UINT FirstChar, 7674 + _In_ ULONG Count, 7675 + _In_reads_opt_(Count) PCWCH UnSafepwch, 7676 + _In_ FLONG fl, 7677 + _Out_writes_bytes_(Count * sizeof(ABC)) PVOID Buffer) 7676 7678 { 7677 7679 LPABC SafeBuff; 7678 7680 LPABCFLOAT SafeBuffF = NULL; ··· 7870 7872 BOOL 7871 7873 APIENTRY 7872 7874 NtGdiGetCharWidthW( 7873 - IN HDC hDC, 7874 - IN UINT FirstChar, 7875 - IN UINT Count, 7876 - IN OPTIONAL PWCHAR UnSafepwc, 7877 - IN FLONG fl, 7878 - OUT PVOID Buffer) 7875 + _In_ HDC hDC, 7876 + _In_ UINT FirstChar, 7877 + _In_ UINT Count, 7878 + _In_reads_opt_(Count) PCWCH UnSafepwc, 7879 + _In_ FLONG fl, 7880 + _Out_writes_bytes_(Count * sizeof(ULONG)) PVOID Buffer) 7879 7881 { 7880 7882 NTSTATUS Status = STATUS_SUCCESS; 7881 7883 LPINT SafeBuff; ··· 8035 8037 APIENTRY 8036 8038 NtGdiGetGlyphIndicesW( 8037 8039 _In_ HDC hdc, 8038 - _In_reads_opt_(cwc) LPCWSTR pwc, 8040 + _In_reads_opt_(cwc) PCWCH pwc, 8039 8041 _In_ INT cwc, 8040 - _Out_writes_opt_(cwc) LPWORD pgi, 8042 + _Out_writes_opt_(cwc) PWORD pgi, 8041 8043 _In_ DWORD iMode) 8042 8044 { 8043 8045 PDC dc;
+2 -2
win32ss/gdi/ntgdi/gdibatch.c
··· 5 5 #include <debug.h> 6 6 7 7 BOOL FASTCALL IntPatBlt( PDC,INT,INT,INT,INT,DWORD,PEBRUSHOBJ); 8 - BOOL APIENTRY IntExtTextOutW(IN PDC,IN INT,IN INT,IN UINT,IN OPTIONAL PRECTL,IN LPCWSTR,IN INT,IN OPTIONAL LPINT,IN DWORD); 8 + BOOL APIENTRY IntExtTextOutW(IN PDC,IN INT,IN INT,IN UINT,IN OPTIONAL PRECTL,IN LPCWSTR,IN INT,IN OPTIONAL const INT *,IN DWORD); 9 9 10 10 11 11 // ··· 316 316 lprc, 317 317 (LPCWSTR)&pgO->String[pgO->Size/sizeof(WCHAR)], 318 318 pgO->cbCount, 319 - pgO->Size ? (LPINT)&pgO->Buffer : NULL, 319 + pgO->Size ? (const INT *)&pgO->Buffer : NULL, 320 320 pgO->iCS_CP ); 321 321 322 322 // Restore attributes and flags
+54 -56
win32ss/gdi/ntgdi/text.c
··· 13 13 #define NDEBUG 14 14 #include <debug.h> 15 15 16 - 17 16 /* 18 17 This is a hack. See CORE-1091. 19 18 ··· 28 27 29 28 VOID FASTCALL 30 29 IntTMWFixUp( 31 - HDC hDC, 32 - TMW_INTERNAL *ptm) 30 + _In_ HDC hDC, 31 + _Inout_ PTMW_INTERNAL ptm) 33 32 { 34 33 LOGFONTW lf; 35 34 HFONT hCurrentFont; ··· 59 58 60 59 BOOL FASTCALL 61 60 GreTextOutW( 62 - HDC hdc, 63 - int nXStart, 64 - int nYStart, 65 - LPCWSTR lpString, 66 - int cchString) 61 + _In_ HDC hdc, 62 + _In_ INT nXStart, 63 + _In_ INT nYStart, 64 + _In_reads_(cchString) PCWCH lpString, 65 + _In_ INT cchString) 67 66 { 68 67 return GreExtTextOutW(hdc, nXStart, nYStart, 0, NULL, lpString, cchString, NULL, 0); 69 68 } ··· 76 75 BOOL 77 76 FASTCALL 78 77 GreGetTextExtentW( 79 - HDC hDC, 80 - LPCWSTR lpwsz, 81 - INT cwc, 82 - LPSIZE psize, 83 - UINT flOpts) 78 + _In_ HDC hDC, 79 + _In_reads_(cwc) PCWCH lpwsz, 80 + _In_ INT cwc, 81 + _Out_ PSIZE psize, 82 + _In_ UINT flOpts) 84 83 { 85 84 PDC pdc; 86 85 PDC_ATTR pdcattr; ··· 124 123 return Result; 125 124 } 126 125 127 - 128 126 /* 129 127 fl : 130 128 GetTextExtentExPointW = 0 and everything else that uses this. ··· 133 131 BOOL 134 132 FASTCALL 135 133 GreGetTextExtentExW( 136 - HDC hDC, 137 - LPCWSTR String, 138 - ULONG Count, 139 - ULONG MaxExtent, 140 - PULONG Fit, 141 - PULONG Dx, 142 - LPSIZE pSize, 143 - FLONG fl) 134 + _In_ HDC hDC, 135 + _In_ PCWCH String, 136 + _In_ ULONG Count, 137 + _In_ ULONG MaxExtent, 138 + _Out_opt_ PULONG Fit, 139 + _Out_writes_to_opt_(Count, *Fit) PULONG Dx, 140 + _Out_ PSIZE pSize, 141 + _In_ FLONG fl) 144 142 { 145 143 PDC pdc; 146 144 PDC_ATTR pdcattr; ··· 175 173 String, 176 174 Count, 177 175 MaxExtent, 178 - (LPINT)Fit, 179 - (LPINT)Dx, 176 + (PINT)Fit, 177 + (PINT)Dx, 180 178 pSize, 181 179 fl); 182 180 TEXTOBJ_UnlockText(TextObj); ··· 203 201 204 202 DWORD 205 203 APIENTRY 206 - NtGdiGetCharSet(HDC hDC) 204 + NtGdiGetCharSet(_In_ HDC hDC) 207 205 { 208 206 PDC Dc; 209 207 PDC_ATTR pdcattr; ··· 226 224 BOOL 227 225 APIENTRY 228 226 NtGdiGetRasterizerCaps( 229 - OUT LPRASTERIZER_STATUS praststat, 230 - IN ULONG cjBytes) 227 + _Out_ LPRASTERIZER_STATUS praststat, 228 + _In_ ULONG cjBytes) 231 229 { 232 230 NTSTATUS Status = STATUS_SUCCESS; 233 231 RASTERIZER_STATUS rsSafe; ··· 265 263 INT 266 264 APIENTRY 267 265 NtGdiGetTextCharsetInfo( 268 - IN HDC hdc, 269 - OUT OPTIONAL LPFONTSIGNATURE lpSig, 270 - IN DWORD dwFlags) 266 + _In_ HDC hdc, 267 + _Out_opt_ LPFONTSIGNATURE lpSig, 268 + _In_ DWORD dwFlags) 271 269 { 272 270 PDC Dc; 273 271 INT Ret; ··· 324 322 BOOL 325 323 APIENTRY 326 324 NtGdiGetTextExtentExW( 327 - IN HDC hDC, 328 - IN OPTIONAL LPWSTR UnsafeString, 329 - IN ULONG Count, 330 - IN ULONG MaxExtent, 331 - OUT OPTIONAL PULONG UnsafeFit, 332 - OUT OPTIONAL PULONG UnsafeDx, 333 - OUT LPSIZE UnsafeSize, 334 - IN FLONG fl 335 - ) 325 + _In_ HDC hDC, 326 + _In_reads_opt_(Count) PCWCH UnsafeString, 327 + _In_ ULONG Count, 328 + _In_ ULONG MaxExtent, 329 + _Out_opt_ PULONG UnsafeFit, 330 + _Out_writes_to_opt_(Count, *UnsafeFit) PULONG UnsafeDx, 331 + _Out_ PSIZE UnsafeSize, 332 + _In_ FLONG fl) 336 333 { 337 334 PDC dc; 338 335 PDC_ATTR pdcattr; ··· 341 338 NTSTATUS Status; 342 339 BOOLEAN Result; 343 340 INT Fit; 344 - LPINT Dx; 341 + PINT Dx; 345 342 PTEXTOBJ TextObj; 346 343 347 344 if ((LONG)Count < 0) ··· 489 486 */ 490 487 BOOL 491 488 APIENTRY 492 - NtGdiGetTextExtent(HDC hdc, 493 - LPWSTR lpwsz, 494 - INT cwc, 495 - LPSIZE psize, 496 - UINT flOpts) 489 + NtGdiGetTextExtent( 490 + _In_ HDC hdc, 491 + _In_reads_(cwc) PCWCH lpwsz, 492 + _In_ INT cwc, 493 + _Out_ PSIZE psize, 494 + _In_ UINT flOpts) 497 495 { 498 496 return NtGdiGetTextExtentExW(hdc, lpwsz, cwc, 0, NULL, NULL, psize, flOpts); 499 497 } 500 498 501 499 BOOL 502 500 APIENTRY 503 - NtGdiSetTextJustification(HDC hDC, 504 - int BreakExtra, 505 - int BreakCount) 501 + NtGdiSetTextJustification( 502 + _In_ HDC hDC, 503 + _In_ INT BreakExtra, 504 + _In_ INT BreakCount) 506 505 { 507 506 PDC pDc; 508 507 PDC_ATTR pdcattr; ··· 528 527 INT 529 528 APIENTRY 530 529 NtGdiGetTextFaceW( 531 - IN HDC hDC, 532 - IN INT Count, 533 - OUT OPTIONAL LPWSTR FaceName, 534 - IN BOOL bAliasName 535 - ) 530 + _In_ HDC hDC, 531 + _In_ INT Count, 532 + _Out_writes_to_opt_(Count, return) PWSTR FaceName, 533 + _In_ BOOL bAliasName) 536 534 { 537 535 PDC Dc; 538 536 PDC_ATTR pdcattr; ··· 588 586 BOOL 589 587 APIENTRY 590 588 NtGdiGetTextMetricsW( 591 - IN HDC hDC, 592 - OUT TMW_INTERNAL * pUnsafeTmwi, 593 - IN ULONG cj) 589 + _In_ HDC hDC, 590 + _Out_ PTMW_INTERNAL pUnsafeTmwi, 591 + _In_ ULONG cj) 594 592 { 595 593 TMW_INTERNAL Tmwi; 596 594
+18 -8
win32ss/gdi/ntgdi/text.h
··· 129 129 _In_ DWORD dwFlags); 130 130 HANDLE FASTCALL IntGdiAddFontMemResource(PVOID Buffer, DWORD dwSize, PDWORD pNumAdded); 131 131 BOOL FASTCALL IntGdiRemoveFontMemResource(HANDLE hMMFont); 132 - ULONG FASTCALL ftGdiGetGlyphOutline(PDC,WCHAR,UINT,LPGLYPHMETRICS,ULONG,PVOID,LPMAT2,BOOL); 132 + ULONG FASTCALL ftGdiGetGlyphOutline(PDC, WCHAR, UINT, LPGLYPHMETRICS, ULONG, PVOID, const MAT2*, BOOL); 133 133 INT FASTCALL IntGetOutlineTextMetrics(PFONTGDI, UINT, OUTLINETEXTMETRICW*, BOOL); 134 134 BOOL FASTCALL TextIntUpdateSize(PDC,PTEXTOBJ,PFONTGDI,BOOL); 135 135 BOOL FASTCALL ftGdiGetRasterizerCaps(LPRASTERIZER_STATUS); 136 - BOOL FASTCALL TextIntGetTextExtentPoint(PDC,PTEXTOBJ,LPCWSTR,INT,ULONG,LPINT,LPINT,LPSIZE,FLONG); 136 + BOOL FASTCALL TextIntGetTextExtentPoint(PDC, PTEXTOBJ, PCWCH, INT, ULONG, PINT, PINT, PSIZE, FLONG); 137 137 BOOL FASTCALL ftGdiGetTextMetricsW(HDC,PTMW_INTERNAL); 138 138 DWORD FASTCALL IntGetFontLanguageInfo(PDC); 139 139 INT FASTCALL ftGdiGetTextCharsetInfo(PDC,PFONTSIGNATURE,DWORD); ··· 142 142 BOOL FASTCALL IntGdiGetFontResourceInfo(PUNICODE_STRING,PVOID,DWORD*,DWORD); 143 143 BOOL FASTCALL ftGdiRealizationInfo(PFONTGDI,PREALIZATION_INFO); 144 144 DWORD FASTCALL ftGdiGetKerningPairs(PFONTGDI,DWORD,LPKERNINGPAIR); 145 - BOOL NTAPI GreExtTextOutW(IN HDC,IN INT,IN INT,IN UINT,IN OPTIONAL RECTL*, 146 - IN LPCWSTR, IN INT, IN OPTIONAL LPINT, IN DWORD); 145 + BOOL 146 + APIENTRY 147 + GreExtTextOutW( 148 + _In_ HDC hDC, 149 + _In_ INT XStart, 150 + _In_ INT YStart, 151 + _In_ UINT fuOptions, 152 + _In_opt_ PRECTL lprc, 153 + _In_reads_opt_(Count) PCWCH String, 154 + _In_ INT Count, 155 + _In_opt_ const INT *Dx, 156 + _In_ DWORD dwCodePage); 147 157 DWORD FASTCALL IntGetCharDimensions(HDC, PTEXTMETRICW, PDWORD); 148 - BOOL FASTCALL GreGetTextExtentW(HDC,LPCWSTR,INT,LPSIZE,UINT); 149 - BOOL FASTCALL GreGetTextExtentExW(HDC,LPCWSTR,ULONG,ULONG,PULONG,PULONG,LPSIZE,FLONG); 150 - BOOL FASTCALL GreTextOutW(HDC,int,int,LPCWSTR,int); 151 - HFONT FASTCALL GreCreateFontIndirectW( LOGFONTW * ); 158 + BOOL FASTCALL GreGetTextExtentW(HDC, PCWCH, INT, PSIZE, UINT); 159 + BOOL FASTCALL GreGetTextExtentExW(HDC, PCWCH, ULONG, ULONG, PULONG, PULONG, PSIZE, FLONG); 160 + BOOL FASTCALL GreTextOutW(HDC, INT, INT, PCWCH, INT); 161 + HFONT FASTCALL GreCreateFontIndirectW(_In_ const LOGFONTW *lplf); 152 162 BOOL WINAPI GreGetTextMetricsW( _In_ HDC hdc, _Out_ LPTEXTMETRICW lptm); 153 163 154 164 #define IntLockProcessPrivateFonts(W32Process) \