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
2cd36b6b
Commit
2cd36b6b
authored
May 26, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Remove the file parameter check again in LoadLibraryExW since some…
kernel32: Remove the file parameter check again in LoadLibraryExW since some broken apps pass garbage here.
parent
c7f01479
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
10 deletions
+24
-10
module.c
dlls/kernel32/module.c
+0
-6
module.c
dlls/kernel32/tests/module.c
+24
-4
No files found.
dlls/kernel32/module.c
View file @
2cd36b6b
...
...
@@ -922,12 +922,6 @@ 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 @
2cd36b6b
...
...
@@ -249,10 +249,24 @@ static void testLoadLibraryEx(void)
SetLastError
(
0xdeadbeef
);
hmodule
=
LoadLibraryExA
(
"testfile.dll"
,
hfile
,
0
);
ok
(
hmodule
==
0
,
"Expected 0, got %p
\n
"
,
hmodule
);
ok
(
GetLastError
()
==
ERROR_SHARING_VIOLATION
||
GetLastError
()
==
ERROR_INVALID_PARAMETER
||
/* win2k3 */
GetLastError
()
==
ERROR_FILE_NOT_FOUND
,
/* win9x */
"Unexpected last error, got %d
\n
"
,
GetLastError
());
todo_wine
{
ok
(
GetLastError
()
==
ERROR_SHARING_VIOLATION
||
GetLastError
()
==
ERROR_INVALID_PARAMETER
||
/* win2k3 */
GetLastError
()
==
ERROR_FILE_NOT_FOUND
,
/* win9x */
"Unexpected last error, got %d
\n
"
,
GetLastError
());
}
SetLastError
(
0xdeadbeef
);
hmodule
=
LoadLibraryExA
(
"testfile.dll"
,
(
HANDLE
)
0xdeadbeef
,
0
);
ok
(
hmodule
==
0
,
"Expected 0, got %p
\n
"
,
hmodule
);
todo_wine
{
ok
(
GetLastError
()
==
ERROR_SHARING_VIOLATION
||
GetLastError
()
==
ERROR_INVALID_PARAMETER
||
/* win2k3 */
GetLastError
()
==
ERROR_FILE_NOT_FOUND
,
/* win9x */
"Unexpected last error, got %d
\n
"
,
GetLastError
());
}
/* try to open a file that is locked */
SetLastError
(
0xdeadbeef
);
...
...
@@ -304,6 +318,12 @@ static void testLoadLibraryEx(void)
GetLastError
()
==
ERROR_SUCCESS
,
/* win9x */
"Expected 0xdeadbeef or ERROR_SUCCESS, got %d
\n
"
,
GetLastError
());
/* try invalid file handle */
SetLastError
(
0xdeadbeef
);
hmodule
=
LoadLibraryExA
(
path
,
(
HANDLE
)
0xdeadbeef
,
0
);
if
(
!
hmodule
)
/* succeeds on xp and older */
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"wrong error %u
\n
"
,
GetLastError
());
CloseHandle
(
hmodule
);
/* load kernel32.dll with no path */
...
...
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