GetDefaultPrinter A->W

Alexandre Julliard julliard at winehq.org
Tue Feb 17 14:41:19 CST 2004


Stefan Leichter <Stefan.Leichter at camLine.com> writes:

> +    if ((ptr = wcschr(buffer, (WCHAR) ',')) == NULL) {
> +	SetLastError (ERROR_INVALID_NAME);

You can't use wcs functions in Wine.

> +BOOL WINAPI GetDefaultPrinterA(LPSTR name, LPDWORD namesize)
> +{   DWORD insize = namesize ? *namesize : 0;
> +    WCHAR bufferW[1000] = {0};

Please don't allocate huge buffers on the stack. Use HeapAlloc to get
a buffer of reasonable size (based on the namesize parameter).

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list