Changeset 571 for trunk/src/kernel32/nameid.cpp
- Timestamp:
- Aug 19, 1999, 12:25:27 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/nameid.cpp
r550 r571 1 /* $Id: nameid.cpp,v 1. 6 1999-08-18 17:18:00sandervl Exp $ */1 /* $Id: nameid.cpp,v 1.7 1999-08-19 10:25:27 sandervl Exp $ */ 2 2 3 3 /* … … 30 30 int SYSTEM EXPORT ConvertNameId(ULONG hmod, char *name) 31 31 { 32 HMODULE hmodule;33 32 Win32Dll *module; 34 33 35 34 dprintf(("Convert %s in mod %X to id\n", name, hmod )); 36 35 37 hmodule = GetOS2ModuleHandle(hmod); 38 if( hmodule == 0 39 || hmodule == -1 40 || hmodule == OS2iGetModuleHandleA( NULL ) ) 36 if(hmod == 0 || hmod == -1 || hmod == WinExe->getInstanceHandle() ) 41 37 { 42 38 return WinExe->convertNameId(name); 43 39 } 44 40 45 module = Win32Dll::findModule(hmod ule);41 module = Win32Dll::findModule(hmod); 46 42 if(module == 0) 47 43 { … … 70 66 //****************************************************************************** 71 67 //****************************************************************************** 72 ULONG GetOS2ModuleHandle(ULONG hmod)73 {74 APIRET rc;75 char modname[128];76 HMODULE hmodule;77 78 if(hmod == 0 || hmod == -1) {79 return(0);80 }81 82 if(Win32QueryModuleName(hmod, modname, sizeof(modname)) == 0) {83 dprintf(("Can't determine handle of dll %X\n", hmod));84 return(0);85 }86 rc = DosQueryModuleHandle(modname, &hmodule);87 if(rc) {88 dprintf(("Can't determine handle of dll %s\n", modname));89 return(0);90 }91 return(hmodule);92 }93 /******************************************************************************/94 /******************************************************************************/
Note:
See TracChangeset
for help on using the changeset viewer.