Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
ad4605fc
Commit
ad4605fc
authored
Dec 08, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Added some tests for behavior of 64-bit user handles.
parent
d3f7f5eb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
0 deletions
+38
-0
win.c
dlls/user32/tests/win.c
+38
-0
No files found.
dlls/user32/tests/win.c
View file @
ad4605fc
...
...
@@ -5311,6 +5311,43 @@ static void test_thick_child_size(HWND parentWindow)
ok
(
UnregisterClass
(
className
,
GetModuleHandleA
(
0
)),
"UnregisterClass call failed
\n
"
);
}
static
void
test_handles
(
HWND
full_hwnd
)
{
HWND
hwnd
=
full_hwnd
;
BOOL
ret
;
RECT
rect
;
SetLastError
(
0xdeadbeef
);
ret
=
GetWindowRect
(
hwnd
,
&
rect
);
ok
(
ret
,
"GetWindowRect failed for %p err %u
\n
"
,
hwnd
,
GetLastError
()
);
#ifdef _WIN64
if
((
ULONG_PTR
)
full_hwnd
>>
32
)
hwnd
=
(
HWND
)((
ULONG_PTR
)
full_hwnd
&
~
0u
);
else
hwnd
=
(
HWND
)((
ULONG_PTR
)
full_hwnd
|
((
ULONG_PTR
)
~
0u
<<
32
));
SetLastError
(
0xdeadbeef
);
ret
=
GetWindowRect
(
hwnd
,
&
rect
);
ok
(
ret
,
"GetWindowRect failed for %p err %u
\n
"
,
hwnd
,
GetLastError
()
);
hwnd
=
(
HWND
)(((
ULONG_PTR
)
full_hwnd
&
~
0u
)
|
((
ULONG_PTR
)
0x1234
<<
32
));
SetLastError
(
0xdeadbeef
);
ret
=
GetWindowRect
(
hwnd
,
&
rect
);
ok
(
ret
,
"GetWindowRect failed for %p err %u
\n
"
,
hwnd
,
GetLastError
()
);
hwnd
=
(
HWND
)(((
ULONG_PTR
)
full_hwnd
&
0xffff
)
|
((
ULONG_PTR
)
0x9876
<<
16
));
SetLastError
(
0xdeadbeef
);
ret
=
GetWindowRect
(
hwnd
,
&
rect
);
ok
(
!
ret
,
"GetWindowRect succeeded for %p
\n
"
,
hwnd
);
ok
(
GetLastError
()
==
ERROR_INVALID_WINDOW_HANDLE
,
"wrong error %u
\n
"
,
GetLastError
()
);
hwnd
=
(
HWND
)(((
ULONG_PTR
)
full_hwnd
&
0xffff
)
|
((
ULONG_PTR
)
0x12345678
<<
16
));
SetLastError
(
0xdeadbeef
);
ret
=
GetWindowRect
(
hwnd
,
&
rect
);
ok
(
!
ret
,
"GetWindowRect succeeded for %p
\n
"
,
hwnd
);
ok
(
GetLastError
()
==
ERROR_INVALID_WINDOW_HANDLE
,
"wrong error %u
\n
"
,
GetLastError
()
);
#endif
}
START_TEST
(
win
)
{
...
...
@@ -5390,6 +5427,7 @@ START_TEST(win)
test_SetForegroundWindow
(
hwndMain
);
test_shell_window
();
test_handles
(
hwndMain
);
/* add the tests above this line */
UnhookWindowsHookEx
(
hhook
);
...
...
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