Re: GetDefaultPrinter A->W
Stefan Leichter <Stefan.Leichter(a)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(a)winehq.org
Am Dienstag, 17. Februar 2004 21:41 schrieb Alexandre Julliard:
Stefan Leichter <Stefan.Leichter(a)camLine.com> 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 ntdll. @ cdecl wcschr(wstr long) NTDLL_wcschr what is wrong with this function? Thanks Stefan
Stefan Leichter <Stefan.Leichter(a)camLine.com> 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 instead. -- Alexandre Julliard julliard(a)winehq.org
participants (2)
-
Alexandre Julliard -
Stefan Leichter