Re: GetDefaultPrinter A->W [resubmit]

2004-02-28 Thread Alexandre Julliard
Stefan Leichter <[EMAIL PROTECTED]> writes: > GetDefaultPrinterW breaks directly when namesize is a NULL pointer and > GetDefaultPrinterA jumps to the end without. Where do is this pointer > accessed when it is not vaild? You are right, I missed the fact that the W function would fail which wou

Re: GetDefaultPrinter A->W [resubmit]

2004-02-28 Thread Stefan Leichter
Am Freitag, 27. Februar 2004 01:23 schrieb Alexandre Julliard: > Stefan Leichter <[EMAIL PROTECTED]> writes: > > Hello, > > i sent this patch one week ago, but it does not get commited. Anything > > wrong with it? > > The handling of the buffer sizes looks very suspicious. For instance > you check

Re: GetDefaultPrinter A->W [resubmit]

2004-02-26 Thread Alexandre Julliard
Stefan Leichter <[EMAIL PROTECTED]> writes: > Hello, > i sent this patch one week ago, but it does not get commited. Anything wrong > with it? The handling of the buffer sizes looks very suspicious. For instance you check for namesize being NULL, but later on assign something to it anyway. Also

Re: GetDefaultPrinter A->W

2004-02-17 Thread Alexandre Julliard
Stefan Leichter <[EMAIL PROTECTED]> writes: > Please tell my why! It is exported from ntdll. > @ cdecl wcschr(wstr long) NTDLL_wcschr > what is wrong with this function? There's no prototype for it, and if you don't import ntdll you'll call the C library version which won't work. Use strchrW inst

Re: GetDefaultPrinter A->W

2004-02-17 Thread Stefan Leichter
Am Dienstag, 17. Februar 2004 21:41 schrieb Alexandre Julliard: > Stefan Leichter <[EMAIL PROTECTED]> writes: > > +if ((ptr = wcschr(buffer, (WCHAR) ',')) == NULL) { > > + SetLastError (ERROR_INVALID_NAME); > > You can't use wcs functions in Wine. Please tell my why! It is exported from ntdl

Re: GetDefaultPrinter A->W

2004-02-17 Thread Alexandre Julliard
Stefan Leichter <[EMAIL PROTECTED]> 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; >