trace:winspool:AddPrinterA ((null),2,0x407c2c1c): stub trace:winspool:DEVMODEdupAtoW trace:winspool:AddPrinterW (L"",2,0x4026ac58)
Following these debug messages, we see that the name of the server on which the server is installed changes fromNULL to "". Currently we dont support remote printers and the the name must be NULL otherwise the function fails. It lies into wine/dlls/winspool/info.c : if(pName != NULL) { ERR("pName = %s - unsupported\n", debugstr_w(pName)); SetLastError(ERROR_INVALID_PARAMETER); return 0;
The file was updated to avoid HEAP_strdupAtoW calls. Matthew, could you look at this ?
===== Sylvain Petreolle spetreolle@users.sourceforge.net Fight against Spam ! http://www.euro.cauce.org/en/index.html ICQ #170597259
"Don't think you are. Know you are." Morpheus, in "Matrix".
___________________________________________________________ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com
Sylvain Petreolle wrote:
trace:winspool:AddPrinterA ((null),2,0x407c2c1c): stub trace:winspool:DEVMODEdupAtoW trace:winspool:AddPrinterW (L"",2,0x4026ac58)
Following these debug messages, we see that the name of the server on which the server is installed changes fromNULL to "".
In an attempt to revive this thread (since it broke printing for me too), it appears that if a NULL pointer is passed to:
RtlCreateUnicodeStringFromAsciiz(&pNameW,pName);
then it returns an empty string in pNameW.buffer, rather than NULL.
Since these conversion functions are apparently APIs in Win2000 and later, which I don't have, hopefully someone could add test cases to dlls/ntdll/test/rtlstr.c to test what that function should return when passed a null pointer?
Is really this function in Windows API ? a search with google returns only 40 answers. msdn doesnt even know it.
RtlCreateUnicodeStringFromAsciiz(&pNameW,pName);
then it returns an empty string in pNameW.buffer, rather than NULL.
Since these conversion functions are apparently APIs in Win2000 and later, which I don't have, hopefully someone could add test cases to dlls/ntdll/test/rtlstr.c to test what that function should return when passed a null pointer?
===== Sylvain Petreolle spetreolle@users.sourceforge.net Fight against Spam ! http://www.euro.cauce.org/en/index.html ICQ #170597259
"Don't think you are. Know you are." Morpheus, in "Matrix".
___________________________________________________________ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com
Sylvain Petreolle wrote:
Is really this function in Windows API ? a search with google returns only 40 answers. msdn doesnt even know it.
it's not part of the Win32 API, it's part of ntdll (NT system) and has been "documented" in winternal.h A+
"Duane Clark" dclark@akamail.com wrote:
In an attempt to revive this thread (since it broke printing for me too), it appears that if a NULL pointer is passed to:
RtlCreateUnicodeStringFromAsciiz(&pNameW,pName);
then it returns an empty string in pNameW.buffer, rather than NULL.
That's correct behaviour. We need to make checks for NULL everywhere when appropriate before RtlCreateUnicodeStringFromAsciiz calls to avoid this kind of bug.
--- Dmitry Timoshkov dmitry@baikal.ru a écrit : > "Duane Clark" dclark@akamail.com wrote:
In an attempt to revive this thread (since it broke printing for me
too), it appears that if a NULL pointer is passed to:
RtlCreateUnicodeStringFromAsciiz(&pNameW,pName);
then it returns an empty string in pNameW.buffer, rather than NULL.
That's correct behaviour. We need to make checks for NULL everywhere when appropriate before RtlCreateUnicodeStringFromAsciiz calls to avoid this kind of bug.
wouldnt be better for this issue that we revert the patch ?
===== Sylvain Petreolle spetreolle@users.sourceforge.net Fight against Spam ! http://www.euro.cauce.org/en/index.html ICQ #170597259
"Don't think you are. Know you are." Morpheus, in "Matrix".
___________________________________________________________ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com
"Sylvain Petreolle" spetreolle@yahoo.fr wrote:
In an attempt to revive this thread (since it broke printing for me
too), it appears that if a NULL pointer is passed to:
RtlCreateUnicodeStringFromAsciiz(&pNameW,pName);
then it returns an empty string in pNameW.buffer, rather than NULL.
That's correct behaviour. We need to make checks for NULL everywhere when appropriate before RtlCreateUnicodeStringFromAsciiz calls to avoid this kind of bug.
wouldnt be better for this issue that we revert the patch ?
I don't think so. The patch does the right thing. Just it doesn't take into account some not obvious cases, which can be relatively simply found and fixed.
Are you really saying that this function is tranforming every NULL string pointer to another one returning "\0" ? This is nonsense.
That's correct behaviour. We need to make checks for NULL
everywhere
when appropriate before RtlCreateUnicodeStringFromAsciiz calls to avoid this kind of bug.
wouldnt be better for this issue that we revert the patch ?
I don't think so. The patch does the right thing. Just it doesn't take into account some not obvious cases, which can be relatively simply found and fixed.
Its documented on MSDN. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/prntspo...
===== Sylvain Petreolle spetreolle@users.sourceforge.net Fight against Spam ! http://www.euro.cauce.org/en/index.html ICQ #170597259
"Don't think you are. Know you are." Morpheus, in "Matrix".
___________________________________________________________ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com