hhctrl: Add beginnings of the Help viewer

Dmitry Timoshkov dmitry at baikal.ru
Mon Aug 1 03:11:17 CDT 2005


"James Hawkins" <truiken at gmail.com> wrote:

> Changelog
> * Add beginnings of the Help viewer.

> +    count = MultiByteToWideChar(CP_ACP, 0, ansi, -1, NULL, 0);
> +    unicode = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, count * sizeof(WCHAR));
> +    MultiByteToWideChar(CP_ACP, 0, ansi, -1, unicode, count);

If you know that you are going to fill the whole buffer with
something why do you use HEAP_ZERO_MEMORY? Please avoid using
HEAP_ZERO_MEMORY, it's almost always a bad practice.

-- 
Dmitry.




More information about the wine-devel mailing list