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
18ff9ce6
Commit
18ff9ce6
authored
Sep 07, 2023
by
Paul Gofman
Committed by
Alexandre Julliard
Sep 07, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wtsapi32: Handle WTSConnectState class in WTSQuerySessionInformationW().
parent
7c248ff4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
11 deletions
+28
-11
wtsapi.c
dlls/wtsapi32/tests/wtsapi.c
+15
-0
wtsapi32.c
dlls/wtsapi32/wtsapi32.c
+13
-11
No files found.
dlls/wtsapi32/tests/wtsapi.c
View file @
18ff9ce6
...
...
@@ -192,10 +192,25 @@ static void test_WTSQuerySessionInformation(void)
{
WCHAR
*
buf1
,
usernameW
[
UNLEN
+
1
],
computernameW
[
MAX_COMPUTERNAME_LENGTH
+
1
];
char
*
buf2
,
username
[
UNLEN
+
1
],
computername
[
MAX_COMPUTERNAME_LENGTH
+
1
];
WTS_CONNECTSTATE_CLASS
*
state
;
DWORD
count
,
tempsize
;
USHORT
*
protocol
;
BOOL
ret
;
count
=
0
;
ret
=
WTSQuerySessionInformationW
(
WTS_CURRENT_SERVER_HANDLE
,
WTS_CURRENT_SESSION
,
WTSConnectState
,
(
WCHAR
**
)
&
state
,
&
count
);
ok
(
ret
,
"got error %lu
\n
"
,
GetLastError
());
ok
(
count
==
sizeof
(
*
state
),
"got %lu
\n
"
,
count
);
ok
(
*
state
==
WTSActive
,
"got %d.
\n
"
,
*
state
);
WTSFreeMemory
(
state
);
count
=
0
;
ret
=
WTSQuerySessionInformationA
(
WTS_CURRENT_SERVER_HANDLE
,
WTS_CURRENT_SESSION
,
WTSConnectState
,
(
char
**
)
&
state
,
&
count
);
ok
(
ret
,
"got error %lu
\n
"
,
GetLastError
());
ok
(
count
==
sizeof
(
*
state
),
"got %lu
\n
"
,
count
);
ok
(
*
state
==
WTSActive
,
"got %d.
\n
"
,
*
state
);
WTSFreeMemory
(
state
);
SetLastError
(
0xdeadbeef
);
count
=
0
;
ret
=
WTSQuerySessionInformationW
(
WTS_CURRENT_SERVER_HANDLE
,
WTS_CURRENT_SESSION
,
WTSUserName
,
NULL
,
&
count
);
...
...
dlls/wtsapi32/wtsapi32.c
View file @
18ff9ce6
...
...
@@ -468,17 +468,8 @@ BOOL WINAPI WTSQuerySessionInformationA(HANDLE server, DWORD session_id, WTS_INF
return
FALSE
;
}
if
(
class
==
WTSClientProtocolType
)
{
USHORT
*
protocol
;
if
(
!
(
protocol
=
heap_alloc
(
sizeof
(
*
protocol
))))
return
FALSE
;
FIXME
(
"returning 0 protocol type
\n
"
);
*
protocol
=
0
;
*
buffer
=
(
char
*
)
protocol
;
*
count
=
sizeof
(
*
protocol
);
return
TRUE
;
}
if
(
class
==
WTSClientProtocolType
||
class
==
WTSConnectState
)
return
WTSQuerySessionInformationW
(
server
,
session_id
,
class
,
(
WCHAR
**
)
buffer
,
count
);
if
(
!
WTSQuerySessionInformationW
(
server
,
session_id
,
class
,
&
bufferW
,
count
))
return
FALSE
;
...
...
@@ -520,6 +511,17 @@ BOOL WINAPI WTSQuerySessionInformationW(HANDLE server, DWORD session_id, WTS_INF
return
FALSE
;
}
if
(
class
==
WTSConnectState
)
{
WTS_CONNECTSTATE_CLASS
*
state
;
if
(
!
(
state
=
heap_alloc
(
sizeof
(
*
state
))))
return
FALSE
;
*
state
=
WTSActive
;
*
buffer
=
(
WCHAR
*
)
state
;
*
count
=
sizeof
(
*
state
);
return
TRUE
;
}
if
(
class
==
WTSClientProtocolType
)
{
USHORT
*
protocol
;
...
...
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