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
4c6a1983
Commit
4c6a1983
authored
Mar 22, 2012
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Mar 27, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
psapi: Add missing return value checks.
parent
db8d7603
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
7 deletions
+15
-7
psapi_main.c
dlls/psapi/tests/psapi_main.c
+15
-7
No files found.
dlls/psapi/tests/psapi_main.c
View file @
4c6a1983
...
...
@@ -178,15 +178,20 @@ static void test_GetProcessMemoryInfo(void)
DWORD
ret
;
SetLastError
(
0xdeadbeef
);
pGetProcessMemoryInfo
(
NULL
,
&
pmc
,
sizeof
(
pmc
));
ret
=
pGetProcessMemoryInfo
(
NULL
,
&
pmc
,
sizeof
(
pmc
));
ok
(
!
ret
,
"GetProcessMemoryInfo should fail
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_HANDLE
,
"expected error=ERROR_INVALID_HANDLE but got %d
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
pGetProcessMemoryInfo
(
hpSR
,
&
pmc
,
sizeof
(
pmc
));
todo_wine
ok
(
GetLastError
()
==
ERROR_ACCESS_DENIED
,
"expected error=ERROR_ACCESS_DENIED but got %d
\n
"
,
GetLastError
());
ret
=
pGetProcessMemoryInfo
(
hpSR
,
&
pmc
,
sizeof
(
pmc
));
todo_wine
ok
(
!
ret
,
"GetProcessMemoryInfo should fail
\n
"
);
todo_wine
ok
(
GetLastError
()
==
ERROR_ACCESS_DENIED
,
"expected error=ERROR_ACCESS_DENIED but got %d
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
pGetProcessMemoryInfo
(
hpQI
,
&
pmc
,
sizeof
(
pmc
)
-
1
);
ret
=
pGetProcessMemoryInfo
(
hpQI
,
&
pmc
,
sizeof
(
pmc
)
-
1
);
ok
(
!
ret
,
"GetProcessMemoryInfo should fail
\n
"
);
ok
(
GetLastError
()
==
ERROR_INSUFFICIENT_BUFFER
,
"expected error=ERROR_INSUFFICIENT_BUFFER but got %d
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
...
...
@@ -239,13 +244,16 @@ static void test_GetMappedFileName(void)
HANDLE
hfile
,
hmap
;
SetLastError
(
0xdeadbeef
);
pGetMappedFileNameA
(
NULL
,
hMod
,
szMapPath
,
sizeof
(
szMapPath
));
ret
=
pGetMappedFileNameA
(
NULL
,
hMod
,
szMapPath
,
sizeof
(
szMapPath
));
ok
(
!
ret
,
"GetMappedFileName should fail
\n
"
);
todo_wine
ok
(
GetLastError
()
==
ERROR_INVALID_HANDLE
,
"expected error=ERROR_INVALID_HANDLE but got %d
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
pGetMappedFileNameA
(
hpSR
,
hMod
,
szMapPath
,
sizeof
(
szMapPath
));
todo_wine
ok
(
GetLastError
()
==
ERROR_ACCESS_DENIED
,
"expected error=ERROR_ACCESS_DENIED but got %d
\n
"
,
GetLastError
());
ret
=
pGetMappedFileNameA
(
hpSR
,
hMod
,
szMapPath
,
sizeof
(
szMapPath
));
ok
(
!
ret
,
"GetMappedFileName should fail
\n
"
);
todo_wine
ok
(
GetLastError
()
==
ERROR_ACCESS_DENIED
,
"expected error=ERROR_ACCESS_DENIED but got %d
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
ret
=
pGetMappedFileNameA
(
hpQI
,
hMod
,
szMapPath
,
sizeof
(
szMapPath
));
...
...
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