mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-02 13:27:35 +00:00
Get ELF_LoadLibraryExA back into a working state.
This commit is contained in:
parent
ca1661c3e1
commit
786c9a68f6
1 changed files with 10 additions and 3 deletions
13
loader/elf.c
13
loader/elf.c
|
@ -144,10 +144,17 @@ WINE_MODREF *ELF_LoadLibraryExA( LPCSTR libname, DWORD flags)
|
||||||
strcat(x,"."UNIX_DLL_ENDING);
|
strcat(x,"."UNIX_DLL_ENDING);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FIXME: make UNIX filename from DOS fn? */
|
/* grab just the last piece of the path/filename
|
||||||
|
which should be the name of the library we are
|
||||||
|
looking to load. increment by 1 to skip the DOS slash */
|
||||||
|
s = strrchr(t,'\\');
|
||||||
|
s++;
|
||||||
|
|
||||||
/* ... and open it */
|
/* ... and open the library pointed by s, while t points
|
||||||
dlhandle = ELFDLL_dlopen(t,RTLD_NOW);
|
points to the ENTIRE DOS filename of the library
|
||||||
|
t is returned by HeapAlloc() above and so is also used
|
||||||
|
with HeapFree() below */
|
||||||
|
dlhandle = ELFDLL_dlopen(s,RTLD_NOW);
|
||||||
if (!dlhandle) {
|
if (!dlhandle) {
|
||||||
HeapFree( GetProcessHeap(), 0, t );
|
HeapFree( GetProcessHeap(), 0, t );
|
||||||
SetLastError( ERROR_FILE_NOT_FOUND );
|
SetLastError( ERROR_FILE_NOT_FOUND );
|
||||||
|
|
Loading…
Reference in a new issue