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
8c4a785d
Commit
8c4a785d
authored
Dec 04, 2015
by
Sebastian Lackner
Committed by
Alexandre Julliard
Dec 04, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Add test to check ObjectNameInformation for desktop objects.
Signed-off-by:
Sebastian Lackner
<
sebastian@fds-team.de
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6bfa3896
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
5 deletions
+20
-5
winstation.c
dlls/user32/tests/winstation.c
+20
-5
No files found.
dlls/user32/tests/winstation.c
View file @
8c4a785d
...
...
@@ -23,6 +23,9 @@
#include "wingdi.h"
#include "winuser.h"
#include "winnls.h"
#include "winternl.h"
static
NTSTATUS
(
WINAPI
*
pNtQueryObject
)(
HANDLE
,
OBJECT_INFORMATION_CLASS
,
PVOID
,
ULONG
,
PULONG
);
#define DESKTOP_ALL_ACCESS 0x01ff
...
...
@@ -388,12 +391,14 @@ static void test_enumdesktops(void)
static
void
test_getuserobjectinformation
(
void
)
{
HDESK
desk
;
WCHAR
bufferW
[
20
];
char
buffer
[
20
];
WCHAR
foobarTestW
[]
=
{
'f'
,
'o'
,
'o'
,
'b'
,
'a'
,
'r'
,
'T'
,
'e'
,
's'
,
't'
,
0
};
WCHAR
foobarTestW
[]
=
{
'\\'
,
'f'
,
'o'
,
'o'
,
'b'
,
'a'
,
'r'
,
'T'
,
'e'
,
's'
,
't'
,
0
};
WCHAR
DesktopW
[]
=
{
'D'
,
'e'
,
's'
,
'k'
,
't'
,
'o'
,
'p'
,
0
};
OBJECT_NAME_INFORMATION
*
name_info
;
WCHAR
bufferW
[
20
];
char
buffer
[
64
];
NTSTATUS
status
;
DWORD
size
;
HDESK
desk
;
BOOL
ret
;
desk
=
CreateDesktopA
(
"foobarTest"
,
NULL
,
NULL
,
0
,
DESKTOP_ALL_ACCESS
,
NULL
);
...
...
@@ -440,9 +445,16 @@ static void test_getuserobjectinformation(void)
ok
(
ret
,
"GetUserObjectInformationW returned %x
\n
"
,
ret
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"LastError is set to %08x
\n
"
,
GetLastError
());
ok
(
lstrcmpW
(
bufferW
,
foobarTestW
)
==
0
,
"Buffer is not set to 'foobarTest'
\n
"
);
ok
(
lstrcmpW
(
bufferW
,
foobarTestW
+
1
)
==
0
,
"Buffer is not set to 'foobarTest'
\n
"
);
ok
(
size
==
22
,
"size is set to %d
\n
"
,
size
);
/* 22 bytes in 'foobarTest\0' in Unicode */
/* ObjectNameInformation does not return the full desktop name */
name_info
=
(
OBJECT_NAME_INFORMATION
*
)
buffer
;
status
=
pNtQueryObject
(
desk
,
ObjectNameInformation
,
name_info
,
sizeof
(
buffer
),
NULL
);
ok
(
!
status
,
"expected STATUS_SUCCESS, got %08x
\n
"
,
status
);
todo_wine
ok
(
lstrcmpW
(
name_info
->
Name
.
Buffer
,
foobarTestW
)
==
0
,
"expected '
\\
foobarTest', got %s
\n
"
,
wine_dbgstr_w
(
name_info
->
Name
.
Buffer
));
/** Tests for UOI_TYPE **/
/* Get size, test size and return value/error code */
...
...
@@ -935,6 +947,9 @@ static void test_foregroundwindow(void)
START_TEST
(
winstation
)
{
HMODULE
hntdll
=
GetModuleHandleA
(
"ntdll.dll"
);
pNtQueryObject
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtQueryObject"
);
/* Check whether this platform supports WindowStation calls */
SetLastError
(
0xdeadbeef
);
...
...
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