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
a389b33c
Commit
a389b33c
authored
Apr 11, 2018
by
Hans Leidekker
Committed by
Alexandre Julliard
Apr 11, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wtsapi32: Improve the stub for WTSQuerySessionInformationW.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
90681e3a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
0 deletions
+31
-0
Makefile.in
dlls/wtsapi32/Makefile.in
+1
-0
wtsapi.c
dlls/wtsapi32/tests/wtsapi.c
+16
-0
wtsapi32.c
dlls/wtsapi32/wtsapi32.c
+13
-0
wtsapi32.h
include/wtsapi32.h
+1
-0
No files found.
dlls/wtsapi32/Makefile.in
View file @
a389b33c
MODULE
=
wtsapi32.dll
MODULE
=
wtsapi32.dll
IMPORTLIB
=
wtsapi32
IMPORTLIB
=
wtsapi32
IMPORTS
=
advapi32
C_SRCS
=
\
C_SRCS
=
\
wtsapi32.c
wtsapi32.c
dlls/wtsapi32/tests/wtsapi.c
View file @
a389b33c
...
@@ -90,7 +90,23 @@ static void test_WTSEnumerateProcessesW(void)
...
@@ -90,7 +90,23 @@ static void test_WTSEnumerateProcessesW(void)
WTSFreeMemory
(
info
);
WTSFreeMemory
(
info
);
}
}
static
void
test_WTSQuerySessionInformationW
(
void
)
{
BOOL
ret
;
WCHAR
*
buf
;
DWORD
count
;
count
=
0
;
buf
=
NULL
;
ret
=
WTSQuerySessionInformationW
(
WTS_CURRENT_SERVER_HANDLE
,
WTS_CURRENT_SESSION
,
WTSUserName
,
&
buf
,
&
count
);
ok
(
ret
,
"got %u
\n
"
,
GetLastError
());
ok
(
buf
!=
NULL
,
"buf not set
\n
"
);
ok
(
count
==
(
lstrlenW
(
buf
)
+
1
)
*
sizeof
(
WCHAR
),
"got %u
\n
"
,
count
);
WTSFreeMemory
(
buf
);
}
START_TEST
(
wtsapi
)
START_TEST
(
wtsapi
)
{
{
test_WTSEnumerateProcessesW
();
test_WTSEnumerateProcessesW
();
test_WTSQuerySessionInformationW
();
}
}
dlls/wtsapi32/wtsapi32.c
View file @
a389b33c
...
@@ -233,6 +233,19 @@ BOOL WINAPI WTSQuerySessionInformationW(
...
@@ -233,6 +233,19 @@ BOOL WINAPI WTSQuerySessionInformationW(
FIXME
(
"Stub %p 0x%08x %d %p %p
\n
"
,
hServer
,
SessionId
,
WTSInfoClass
,
FIXME
(
"Stub %p 0x%08x %d %p %p
\n
"
,
hServer
,
SessionId
,
WTSInfoClass
,
Buffer
,
BytesReturned
);
Buffer
,
BytesReturned
);
if
(
WTSInfoClass
==
WTSUserName
)
{
WCHAR
*
username
;
DWORD
count
=
0
;
GetUserNameW
(
NULL
,
&
count
);
if
(
GetLastError
()
!=
ERROR_INSUFFICIENT_BUFFER
)
return
FALSE
;
if
(
!
(
username
=
heap_alloc
(
count
*
sizeof
(
WCHAR
))))
return
FALSE
;
GetUserNameW
(
username
,
&
count
);
*
Buffer
=
username
;
*
BytesReturned
=
count
*
sizeof
(
WCHAR
);
return
TRUE
;
}
return
FALSE
;
return
FALSE
;
}
}
...
...
include/wtsapi32.h
View file @
a389b33c
...
@@ -136,6 +136,7 @@ DECL_WINELIB_TYPE_AW(WTS_SERVER_INFO)
...
@@ -136,6 +136,7 @@ DECL_WINELIB_TYPE_AW(WTS_SERVER_INFO)
DECL_WINELIB_TYPE_AW
(
PWTS_SERVER_INFO
)
DECL_WINELIB_TYPE_AW
(
PWTS_SERVER_INFO
)
#define WTS_CURRENT_SERVER_HANDLE ((HANDLE)NULL)
#define WTS_CURRENT_SERVER_HANDLE ((HANDLE)NULL)
#define WTS_CURRENT_SESSION (~0u)
void
WINAPI
WTSCloseServer
(
HANDLE
);
void
WINAPI
WTSCloseServer
(
HANDLE
);
BOOL
WINAPI
WTSConnectSessionA
(
ULONG
,
ULONG
,
PSTR
,
BOOL
);
BOOL
WINAPI
WTSConnectSessionA
(
ULONG
,
ULONG
,
PSTR
,
BOOL
);
...
...
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