mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-05 16:19:40 +00:00
Improved behaviour of GetModuleHandle16 w.r.t dummy modules.
Don't try to call WEP of dummy modules in FreeLibrary16().
This commit is contained in:
parent
df088c6949
commit
7b81ed4a3c
|
@ -1290,7 +1290,7 @@ static BOOL16 NE_FreeModule( HMODULE16 hModule, BOOL call_wep )
|
|||
if (pModule->flags & NE_FFLAGS_BUILTIN)
|
||||
return FALSE; /* Can't free built-in module */
|
||||
|
||||
if (call_wep)
|
||||
if (call_wep && !(pModule->flags & NE_FFLAGS_WIN32))
|
||||
{
|
||||
if (pModule->flags & NE_FFLAGS_LIBMODULE)
|
||||
{
|
||||
|
@ -1468,6 +1468,8 @@ HMODULE16 WINAPI GetModuleHandle16( LPCSTR name )
|
|||
{
|
||||
pModule = NE_GetPtr( hModule );
|
||||
if (!pModule) break;
|
||||
if (pModule->flags & NE_FFLAGS_WIN32) continue;
|
||||
if (pModule->flags & NE_FFLAGS_WIN32) continue;
|
||||
|
||||
name_table = (BYTE *)pModule + pModule->name_table;
|
||||
if ((*name_table == len) && !strncmp(name, name_table+1, len))
|
||||
|
@ -1519,6 +1521,7 @@ HMODULE16 WINAPI GetModuleHandle16( LPCSTR name )
|
|||
pModule = NE_GetPtr( hModule );
|
||||
if (!pModule) break;
|
||||
if (!pModule->fileinfo) continue;
|
||||
if (pModule->flags & NE_FFLAGS_WIN32) continue;
|
||||
|
||||
ofs = (OFSTRUCT*)((BYTE *)pModule + pModule->fileinfo);
|
||||
loadedfn = ((char*)ofs->szPathName) + strlen(ofs->szPathName);
|
||||
|
|
Loading…
Reference in a new issue