strW = HeapAlloc(GetProcessHeap(), 0, lenW*sizeof(WCHAR));
if (!strW)
return NULL;
- MultiByteToWideChar(cp, 0, str, count, strW, lenW);
+ if(!MultiByteToWideChar(cp, 0, str, count, strW, lenW))
+ {
+ HeapFree(GetProcessHeap(), 0, strW);
+ return NULL;
+ }
DPRINT("mapped %s -> %S\n", str, strW);
if(plenW) *plenW = lenW;
if(pCP) *pCP = cp;
(VOID*)&NewTextMetricExA,
Info[i].FontType, lParam);
}
+
+ if(Ret == 0)
+ break;
}
RtlFreeHeap(GetProcessHeap(), 0, Info);
mbchs[0] = (uChar & 0xff);
}
p = FONT_mbtowc(hdc, mbchs, len, NULL, NULL);
+ if(!p)
+ return GDI_ERROR;
c = p[0];
}
else
/* FIXME the flags */
/* FIXME the pdv */
/* FIXME NtGdiRemoveFontResource handle flags and pdv */
+ DPRINT("RemoveFontResourceExW\n");
return 0;
}