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
731306bf
Commit
731306bf
authored
Sep 02, 2008
by
James Hawkins
Committed by
Alexandre Julliard
Sep 03, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Fix two tests that fail in win2k3 and modify LoadLibraryEx to match this behavior.
parent
b1ff9621
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
9 deletions
+16
-9
module.c
dlls/kernel32/module.c
+6
-0
module.c
dlls/kernel32/tests/module.c
+10
-9
No files found.
dlls/kernel32/module.c
View file @
731306bf
...
...
@@ -922,6 +922,12 @@ HMODULE WINAPI LoadLibraryExW(LPCWSTR libnameW, HANDLE hfile, DWORD flags)
UNICODE_STRING
wstr
;
HMODULE
res
;
if
(
hfile
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
0
;
}
if
(
!
libnameW
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
...
...
dlls/kernel32/tests/module.c
View file @
731306bf
...
...
@@ -245,13 +245,12 @@ static void testLoadLibraryEx(void)
SetLastError
(
0xdeadbeef
);
hmodule
=
LoadLibraryExA
(
"testfile.dll"
,
hfile
,
0
);
ok
(
hmodule
==
0
,
"Expected 0, got %p
\n
"
,
hmodule
);
todo_wine
{
ok
(
GetLastError
()
==
ERROR_SHARING_VIOLATION
,
"Expected ERROR_SHARING_VIOLATION, got %d
\n
"
,
GetLastError
());
}
ok
(
GetLastError
()
==
ERROR_SHARING_VIOLATION
||
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
/* win2k3 */
"Expected ERROR_SHARING_VIOLATION or ERROR_INVALID_PARAMETER, got %d
\n
"
,
GetLastError
());
/*
has nothing to do with hFile
*/
/*
try to open a file that is locked
*/
SetLastError
(
0xdeadbeef
);
hmodule
=
LoadLibraryExA
(
"testfile.dll"
,
NULL
,
0
);
ok
(
hmodule
==
0
,
"Expected 0, got %p
\n
"
,
hmodule
);
...
...
@@ -261,12 +260,14 @@ static void testLoadLibraryEx(void)
"Expected ERROR_SHARING_VIOLATION, got %d
\n
"
,
GetLastError
());
}
/*
one last try with hFile
*/
/*
lpFileName does not matter
*/
SetLastError
(
0xdeadbeef
);
hmodule
=
LoadLibraryExA
(
NULL
,
hfile
,
0
);
ok
(
hmodule
==
0
,
"Expected 0, got %p
\n
"
,
hmodule
);
ok
(
GetLastError
()
==
ERROR_MOD_NOT_FOUND
,
"Expected ERROR_MOD_NOT_FOUND, got %d
\n
"
,
GetLastError
());
ok
(
GetLastError
()
==
ERROR_MOD_NOT_FOUND
||
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
/* win2k3 */
"Expected ERROR_MOD_NOT_FOUND or ERROR_INVALID_PARAMETER, got %d
\n
"
,
GetLastError
());
CloseHandle
(
hfile
);
...
...
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