LPSIZE lpSize
)
{
- return NtGdiGetTextExtent(hdc, (LPWSTR)lpString, cchString, lpSize, 0);
+ return NtGdiGetTextExtent(hdc, (LPWSTR)lpString, cchString, lpSize, 1);
}
LPSIZE lpSize
)
{
+
+ if(nMaxExtent < -1)
+ {
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return FALSE;
+ }
+
return NtGdiGetTextExtentExW (
hdc, (LPWSTR)lpszStr, cchString, nMaxExtent, (PULONG)lpnFit, (PULONG)alpDx, lpSize, 0 );
}
LPWSTR lpszStrW;
BOOL rc = 0;
+ if(nMaxExtent < -1)
+ {
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return FALSE;
+ }
+
Status = HEAP_strdupA2W ( &lpszStrW, lpszStr );
if (!NT_SUCCESS (Status))
SetLastError (RtlNtStatusToDosError(Status));
res = GetTextFaceW(hdc, 0, NULL);
nameW = HeapAlloc( GetProcessHeap(), 0, res * 2 );
+ if (nameW == NULL)
+ {
+ return 0;
+ }
GetTextFaceW( hdc, res, nameW );
if (name)