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
574ef76b
Commit
574ef76b
authored
Apr 03, 1999
by
Marcus Meissner
Committed by
Alexandre Julliard
Apr 03, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added some SetLastError()s in GetProcAddress() and LoadLibrary().
parent
cc08b38f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
3 deletions
+17
-3
module.c
loader/module.c
+17
-3
No files found.
loader/module.c
View file @
574ef76b
...
...
@@ -1179,6 +1179,11 @@ HMODULE WINAPI LoadLibraryEx32W16( LPCSTR libname, HANDLE16 hf,
HMODULE
WINAPI
LoadLibraryExA
(
LPCSTR
libname
,
HFILE
hfile
,
DWORD
flags
)
{
HMODULE
hmod
;
if
(
!
libname
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
0
;
}
hmod
=
MODULE_LoadLibraryExA
(
libname
,
hfile
,
flags
);
if
(
hmod
>=
32
)
...
...
@@ -1188,6 +1193,7 @@ HMODULE WINAPI LoadLibraryExA(LPCSTR libname,HFILE hfile,DWORD flags)
/* Initialize DLL just loaded */
MODULE_InitializeDLLs
(
hmod
,
DLL_PROCESS_ATTACH
,
NULL
);
/* FIXME: check for failure, SLE(ERROR_DLL_INIT_FAILED) */
}
return
hmod
;
...
...
@@ -1365,21 +1371,29 @@ FARPROC MODULE_GetProcAddress(
BOOL
snoop
)
{
WINE_MODREF
*
wm
=
MODULE32_LookupHMODULE
(
hModule
);
FARPROC
retproc
;
if
(
HIWORD
(
function
))
TRACE
(
win32
,
"(%08lx,%s)
\n
"
,(
DWORD
)
hModule
,
function
);
else
TRACE
(
win32
,
"(%08lx,%p)
\n
"
,(
DWORD
)
hModule
,
function
);
if
(
!
wm
)
if
(
!
wm
)
{
SetLastError
(
ERROR_INVALID_HANDLE
);
return
(
FARPROC
)
0
;
}
switch
(
wm
->
type
)
{
case
MODULE32_PE
:
return
PE_FindExportedFunction
(
wm
,
function
,
snoop
);
retproc
=
PE_FindExportedFunction
(
wm
,
function
,
snoop
);
if
(
!
retproc
)
SetLastError
(
ERROR_PROC_NOT_FOUND
);
return
retproc
;
case
MODULE32_ELF
:
return
ELF_FindExportedFunction
(
wm
,
function
);
retproc
=
ELF_FindExportedFunction
(
wm
,
function
);
if
(
!
retproc
)
SetLastError
(
ERROR_PROC_NOT_FOUND
);
return
retproc
;
default:
ERR
(
module
,
"wine_modref type %d not handled.
\n
"
,
wm
->
type
);
SetLastError
(
ERROR_INVALID_HANDLE
);
return
(
FARPROC
)
0
;
}
}
...
...
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