Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
2bda84a4
Commit
2bda84a4
authored
Aug 17, 2016
by
Hugh McMaster
Committed by
Alexandre Julliard
Aug 17, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Implement GetConsoleScreenBufferInfoEx.
Signed-off-by:
Hugh McMaster
<
hugh.mcmaster@outlook.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
95f8270b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
10 deletions
+39
-10
console.c
dlls/kernel32/console.c
+32
-3
console.c
dlls/kernel32/tests/console.c
+7
-7
No files found.
dlls/kernel32/console.c
View file @
2bda84a4
...
...
@@ -3356,9 +3356,38 @@ BOOL WINAPI GetConsoleFontInfo(HANDLE hConsole, BOOL maximize, DWORD numfonts, C
BOOL
WINAPI
GetConsoleScreenBufferInfoEx
(
HANDLE
hConsole
,
CONSOLE_SCREEN_BUFFER_INFOEX
*
csbix
)
{
FIXME
(
"(%p %p): stub!
\n
"
,
hConsole
,
csbix
);
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
FALSE
;
BOOL
ret
;
if
(
csbix
->
cbSize
!=
sizeof
(
CONSOLE_SCREEN_BUFFER_INFOEX
))
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
SERVER_START_REQ
(
get_console_output_info
)
{
req
->
handle
=
console_handle_unmap
(
hConsole
);
wine_server_set_reply
(
req
,
csbix
->
ColorTable
,
sizeof
(
csbix
->
ColorTable
));
if
((
ret
=
!
wine_server_call_err
(
req
)))
{
csbix
->
dwSize
.
X
=
reply
->
width
;
csbix
->
dwSize
.
Y
=
reply
->
height
;
csbix
->
dwCursorPosition
.
X
=
reply
->
cursor_x
;
csbix
->
dwCursorPosition
.
Y
=
reply
->
cursor_y
;
csbix
->
wAttributes
=
reply
->
attr
;
csbix
->
srWindow
.
Left
=
reply
->
win_left
;
csbix
->
srWindow
.
Top
=
reply
->
win_top
;
csbix
->
srWindow
.
Right
=
reply
->
win_right
;
csbix
->
srWindow
.
Bottom
=
reply
->
win_bottom
;
csbix
->
dwMaximumWindowSize
.
X
=
min
(
reply
->
width
,
reply
->
max_width
);
csbix
->
dwMaximumWindowSize
.
Y
=
min
(
reply
->
height
,
reply
->
max_height
);
csbix
->
wPopupAttributes
=
reply
->
popup_attr
;
csbix
->
bFullscreenSupported
=
FALSE
;
}
}
SERVER_END_REQ
;
return
ret
;
}
BOOL
WINAPI
SetConsoleScreenBufferInfoEx
(
HANDLE
hConsole
,
CONSOLE_SCREEN_BUFFER_INFOEX
*
csbix
)
...
...
dlls/kernel32/tests/console.c
View file @
2bda84a4
...
...
@@ -2957,34 +2957,34 @@ static void test_GetConsoleScreenBufferInfoEx(HANDLE std_output)
SetLastError
(
0xdeadbeef
);
ret
=
pGetConsoleScreenBufferInfoEx
(
NULL
,
&
csbix
);
ok
(
!
ret
,
"got %d, expected zero
\n
"
,
ret
);
todo_wine
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"got %u, expected 87
\n
"
,
GetLastError
());
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"got %u, expected 87
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
ret
=
pGetConsoleScreenBufferInfoEx
(
std_input
,
&
csbix
);
ok
(
!
ret
,
"got %d, expected zero
\n
"
,
ret
);
todo_wine
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"got %u, expected 87
\n
"
,
GetLastError
());
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"got %u, expected 87
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
ret
=
pGetConsoleScreenBufferInfoEx
(
std_output
,
&
csbix
);
ok
(
!
ret
,
"got %d, expected zero
\n
"
,
ret
);
todo_wine
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"got %u, expected 87
\n
"
,
GetLastError
());
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"got %u, expected 87
\n
"
,
GetLastError
());
csbix
.
cbSize
=
sizeof
(
CONSOLE_SCREEN_BUFFER_INFOEX
);
SetLastError
(
0xdeadbeef
);
ret
=
pGetConsoleScreenBufferInfoEx
(
NULL
,
&
csbix
);
ok
(
!
ret
,
"got %d, expected zero
\n
"
,
ret
);
todo_wine
ok
(
GetLastError
()
==
ERROR_INVALID_HANDLE
,
"got %u, expected 6
\n
"
,
GetLastError
());
ok
(
GetLastError
()
==
ERROR_INVALID_HANDLE
,
"got %u, expected 6
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
ret
=
pGetConsoleScreenBufferInfoEx
(
std_input
,
&
csbix
);
ok
(
!
ret
,
"got %d, expected zero
\n
"
,
ret
);
todo_wine
ok
(
GetLastError
()
==
ERROR_INVALID_HANDLE
,
"got %u, expected 6
\n
"
,
GetLastError
());
ok
(
GetLastError
()
==
ERROR_INVALID_HANDLE
,
"got %u, expected 6
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
ret
=
pGetConsoleScreenBufferInfoEx
(
std_output
,
&
csbix
);
todo_wine
ok
(
ret
,
"got %d, expected non-zero
\n
"
,
ret
);
todo_wine
ok
(
GetLastError
()
==
0xdeadbeef
,
"got %u, expected 0xdeadbeef
\n
"
,
GetLastError
());
ok
(
ret
,
"got %d, expected non-zero
\n
"
,
ret
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"got %u, expected 0xdeadbeef
\n
"
,
GetLastError
());
}
START_TEST
(
console
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment