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
090e574a
Commit
090e574a
authored
Dec 01, 2022
by
Hans Leidekker
Committed by
Alexandre Julliard
Dec 08, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wtsapi32: Improve the stub for WTSQuerySessionInformation(WTSClientProtocolType).
parent
508b793e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
0 deletions
+34
-0
wtsapi.c
dlls/wtsapi32/tests/wtsapi.c
+10
-0
wtsapi32.c
dlls/wtsapi32/wtsapi32.c
+24
-0
No files found.
dlls/wtsapi32/tests/wtsapi.c
View file @
090e574a
...
...
@@ -192,6 +192,7 @@ 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
];
DWORD
count
,
tempsize
;
USHORT
*
protocol
;
BOOL
ret
;
SetLastError
(
0xdeadbeef
);
...
...
@@ -283,6 +284,15 @@ static void test_WTSQuerySessionInformation(void)
ok
(
!
stricmp
(
buf2
,
computername
),
"expected %s, got %s
\n
"
,
computername
,
buf2
);
ok
(
count
==
tempsize
+
1
,
"expected %lu, got %lu
\n
"
,
tempsize
+
1
,
count
);
WTSFreeMemory
(
buf2
);
count
=
0
;
protocol
=
NULL
;
ret
=
WTSQuerySessionInformationA
(
WTS_CURRENT_SERVER_HANDLE
,
WTS_CURRENT_SESSION
,
WTSClientProtocolType
,
(
char
**
)
&
protocol
,
&
count
);
ok
(
ret
,
"got %lu
\n
"
,
GetLastError
());
ok
(
protocol
!=
NULL
,
"protocol not set
\n
"
);
ok
(
count
==
sizeof
(
*
protocol
),
"got %lu
\n
"
,
count
);
WTSFreeMemory
(
protocol
);
}
static
void
test_WTSQueryUserToken
(
void
)
...
...
dlls/wtsapi32/wtsapi32.c
View file @
090e574a
...
...
@@ -418,6 +418,18 @@ 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
(
!
WTSQuerySessionInformationW
(
server
,
session_id
,
class
,
&
bufferW
,
count
))
return
FALSE
;
...
...
@@ -458,6 +470,18 @@ BOOL WINAPI WTSQuerySessionInformationW(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
=
(
WCHAR
*
)
protocol
;
*
count
=
sizeof
(
*
protocol
);
return
TRUE
;
}
if
(
class
==
WTSUserName
)
{
DWORD
size
=
UNLEN
+
1
;
...
...
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