On Dimi's Janitorial page he has the entry for:
dlls/commdlg/fontdlg.c: comdlg32: ChooseFontW: illegal call to HEAP_strdupWtoA
When I look at the actual call I see that it is inside a comment block (#if 0... #endif) Although the actual implentation of ChooseFontW does not make direct W->A calls, this whole setup for ChooseFont(A/W) is IMO a mess and just not right.
BOOL WINAPI ChooseFontW(LPCHOOSEFONTW lpChFont) { CHOOSEFONTA cf_a; LOGFONTA lf_a; CHAR style_a[LF_FACESIZE];
cf_a.lpLogFont = &lf_a; cf_a.lpszStyle = style_a;
if (ChooseFontWtoA(lpChFont, &cf_a) == FALSE) { COMDLG32_SetCommDlgExtendedError(CDERR_MEMALLOCFAILURE); return FALSE; }
if (ChooseFontA(&cf_a) == FALSE) { if (cf_a.lpTemplateName != NULL) HeapFree(GetProcessHeap(), 0, (LPSTR)(cf_a.lpTemplateName)); return FALSE; }
ChooseFontAtoW(&cf_a, lpChFont);
return TRUE; }
I would appreciate Any comments about this.