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
0d2ff50e
Commit
0d2ff50e
authored
Mar 25, 2014
by
Stefan Leichter
Committed by
Alexandre Julliard
Mar 26, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wtsapi32: Extend the parameter check of WTSEnumerateProcessesW.
parent
cb9c2d42
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
9 deletions
+5
-9
wtsapi.c
dlls/wtsapi32/tests/wtsapi.c
+0
-8
wtsapi32.c
dlls/wtsapi32/wtsapi32.c
+5
-1
No files found.
dlls/wtsapi32/tests/wtsapi.c
View file @
0d2ff50e
...
...
@@ -45,41 +45,33 @@ static void test_WTSEnumerateProcessesW(void)
info
=
NULL
;
SetLastError
(
0xdeadbeef
);
ret
=
WTSEnumerateProcessesW
(
WTS_CURRENT_SERVER_HANDLE
,
1
,
1
,
&
info
,
&
count
);
todo_wine
ok
(
!
ret
,
"expected WTSEnumerateProcessesW to fail
\n
"
);
todo_wine
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"expected ERROR_INVALID_PARAMETER got: %d
\n
"
,
GetLastError
());
if
(
info
)
WTSFreeMemory
(
info
);
info
=
NULL
;
SetLastError
(
0xdeadbeef
);
ret
=
WTSEnumerateProcessesW
(
WTS_CURRENT_SERVER_HANDLE
,
0
,
0
,
&
info
,
&
count
);
todo_wine
ok
(
!
ret
,
"expected WTSEnumerateProcessesW to fail
\n
"
);
todo_wine
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"expected ERROR_INVALID_PARAMETER got: %d
\n
"
,
GetLastError
());
if
(
info
)
WTSFreeMemory
(
info
);
info
=
NULL
;
SetLastError
(
0xdeadbeef
);
ret
=
WTSEnumerateProcessesW
(
WTS_CURRENT_SERVER_HANDLE
,
0
,
2
,
&
info
,
&
count
);
todo_wine
ok
(
!
ret
,
"expected WTSEnumerateProcessesW to fail
\n
"
);
todo_wine
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"expected ERROR_INVALID_PARAMETER got: %d
\n
"
,
GetLastError
());
if
(
info
)
WTSFreeMemory
(
info
);
SetLastError
(
0xdeadbeef
);
ret
=
WTSEnumerateProcessesW
(
WTS_CURRENT_SERVER_HANDLE
,
0
,
1
,
NULL
,
&
count
);
ok
(
!
ret
,
"expected WTSEnumerateProcessesW to fail
\n
"
);
todo_wine
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"expected ERROR_INVALID_PARAMETER got: %d
\n
"
,
GetLastError
());
info
=
NULL
;
SetLastError
(
0xdeadbeef
);
ret
=
WTSEnumerateProcessesW
(
WTS_CURRENT_SERVER_HANDLE
,
0
,
1
,
&
info
,
NULL
);
ok
(
!
ret
,
"expected WTSEnumerateProcessesW to fail
\n
"
);
todo_wine
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"expected ERROR_INVALID_PARAMETER got: %d
\n
"
,
GetLastError
());
if
(
info
)
WTSFreeMemory
(
info
);
...
...
dlls/wtsapi32/wtsapi32.c
View file @
0d2ff50e
...
...
@@ -87,7 +87,11 @@ BOOL WINAPI WTSEnumerateProcessesW(HANDLE hServer, DWORD Reserved, DWORD Version
FIXME
(
"Stub %p 0x%08x 0x%08x %p %p
\n
"
,
hServer
,
Reserved
,
Version
,
ppProcessInfo
,
pCount
);
if
(
!
ppProcessInfo
||
!
pCount
)
return
FALSE
;
if
(
!
ppProcessInfo
||
!
pCount
||
Reserved
!=
0
||
Version
!=
1
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
*
pCount
=
0
;
*
ppProcessInfo
=
NULL
;
...
...
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