Printing bugfixes

Dmitry Timoshkov dmitry at baikal.ru
Fri Jan 2 23:34:18 CST 2004


"Mike Hearn" <mike at theoretic.com> wrote:

> +    num = sizeof(PrinterName);
> +    if (!GetDefaultPrinterW(PrinterName, &num))

> + WCHAR default_name[255];
> + DWORD default_name_size = sizeof(default_name);
> +
> + if (GetDefaultPrinterW(default_name, &default_name_size) == 0) {

You should pass the size of buffer in characters, not in bytes to
GetDefaultPrinter.

-- 
Dmitry.





More information about the wine-devel mailing list