[Bug 8554] New: 'net' utility prints text to xterm, not to wineconsole

Wine Bugs wine-bugs at winehq.org
Thu May 31 18:09:05 CDT 2007


http://bugs.winehq.org/show_bug.cgi?id=8554

           Summary: 'net' utility prints text to xterm, not to wineconsole
           Product: Wine
           Version: 0.9.37.
          Platform: Other
        OS/Version: other
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: wine-programs
        AssignedTo: wine-bugs at winehq.org
        ReportedBy: lich at math.spbu.ru


If I type in xterm
$ wineconsole --backend=user cmd

and in console
c:\> net

the text will be printed in xterm, not in wineconsole.

The reason is hidden in AllocConsole - Windows keeps StdHandles values, 
allowing to use smth like:

HANDLE h = GetStdHandle(STD_OUTPUT_HANDLE);
FreeConsole();
AllocConsole();
WriteConsole(h....) // This will use NEW console!

This allows msvcrt to work correct when new console is created. From this point 
of view current implementation of msvcrt is correct, but does not work, because 
wine does not keep handles.

Proposed solution: do not use msvcrt and use output routines like in cmd - they 
contain some tricks with codepages output.

And it may be much better to unicodize net.exe utility. It will solve many 
possible problems in the future.

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the wine-bugs mailing list