kernel32: Implementation of GetLargestConsoleWindowSize.

Reijo T Sund sund at
Fri May 2 10:28:51 CDT 2008

Eric Pouech (Fri May 2 01:38:37 CDT 2008):
> first of all, implementing twice the same function is a bad idea
> you should wrap the two implementations into a single function, and have
> simple wrappers for handling the different return convention
> in the other items:
> - you never handle errors in return from server calls
> - where do the 2 (resp 3) factors come from ?

Kirill K. Smirnov (Fri May 2 04:47:48 CDT 2008):
> Fortunately, since you do not check error codes (as Eric pointed out),
> all variables get initialized to somehow sane values and this does not fail
> for curses.

Thank you very much for your comments.

I have now revised the patch to have a single helper function and
similar simple wrappers as there were with the fixed constants.

I also added the error handling for the server calls, and initialized
all variables to have sensible values even if the server calls fail,
so that the code should not fail for curses.

The factors 2 and 3 come from the fact that the client area is smaller
than the desktop area, and in addition to window frames also the
scrollbars and desktopbar should be taken into account. Please check
out the test code attached to bug report 10919:

I'll send the corrected version of the patch to the patches-list.


More information about the wine-devel mailing list