Return 32-bit module in GetModuleHandle16() if appropriate.

This commit is contained in:
Ulrich Weigand 1999-04-25 11:02:33 +00:00 committed by Alexandre Julliard
parent 14eadf5ad2
commit 287f1f0eab

View file

@ -1399,15 +1399,15 @@ HMODULE16 WINAPI GetModuleHandle16( LPCSTR name )
return hModule; return hModule;
} }
/* FIXME: need to add ... /* If the extension of 'name' is '.EXE' and the base filename of 'name'
* 5. If the extension of 'name' is '.EXE' and the base filename of 'name' * matches the base filename of the module filename of some 32-bit module:
* matches the base filename of the module filename of some 32-bit module: * Return the corresponding 16-bit dummy module handle.
* Return the corresponding 16-bit dummy module handle.
*/ */
if(len >= 4 && !strcasecmp(name+len-4, ".EXE")) if (len >= 4 && !strcasecmp(name+len-4, ".EXE"))
{ {
FIXME(module, "Should return the 16-bit dummy module of some 32-bit module (if it exists)\n"); HMODULE hModule = GetModuleHandleA( name );
return 0; if ( hModule )
return MapHModuleLS( hModule );
} }
if (!strcmp(tmpstr,"MSDOS")) if (!strcmp(tmpstr,"MSDOS"))