- Timestamp:
- Feb 25, 2011, 7:28:08 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/odincrt/dos.cpp
r21425 r21579 38 38 return stricmp(fullFname, modFname) == 0 && stricmp(fullExt, modExt) == 0; 39 39 } 40 40 41 static BOOL walkModules(QSPTRREC *pPtrRec, USHORT hmteStart, 41 42 PCSZ pszModname, PHMODULE pHmod) … … 43 44 QSLREC *pLibRec = pPtrRec->pLibRec; 44 45 45 while (pLibRec) { 46 // It happens that for some modules ctObj is > 0 but pbjInfo is 47 // NULL. This seems to be an OS/2 FP13 bug. Here is the solution from 48 // winimagepe2lx.cpp. We need it too because of pNextRec. 46 while (pLibRec) 47 { 48 // It happens that for some modules ctObj is > 0 but pObjInfo is 49 // NULL and pNextRec points right to the object table instead of the 50 // next record. This seems to be an OS/2 FP13 bug. Here is the solution 51 // from winimagepe2lx.cpp. We need it too because of pNextRec. 49 52 if (pLibRec->ctObj > 0 && pLibRec->pObjInfo == NULL) 50 53 { … … 73 76 return TRUE; 74 77 } 78 79 // break the loop since we already walked the module in question 80 break; 75 81 } 76 82 pLibRec = (QSLREC *)pLibRec->pNextRec; … … 89 95 *pHmod = NULLHANDLE; 90 96 91 // In LIBPATHSTRICT=T mode, there m ey be more than one module with the97 // In LIBPATHSTRICT=T mode, there may be more than one module with the 92 98 // given name loaded into the memory. For this reason, when looking for a 93 99 // module by its basename, we first walk the modules belonging to the … … 105 111 QSPTRREC *pPtrRec = (QSPTRREC *)buf; 106 112 QSPREC *pProcRec = pPtrRec->pProcRec; 113 114 // first walk the EXE's imported modules 107 115 if (!walkModules(pPtrRec, pProcRec->hMte, pszModname, pHmod)) 108 116 { 109 arc = ERROR_INVALID_NAME; 110 for (USHORT i = 0; i < pProcRec->cLib; ++i) { 117 arc = ERROR_MOD_NOT_FOUND; 118 119 // next, walk the modules loaded by the process 120 for (USHORT i = 0; i < pProcRec->cLib; ++i) 121 { 111 122 USHORT hmte = pProcRec->pLibRec[i]; 112 123 if (walkModules(pPtrRec, hmte, pszModname, pHmod))
Note:
See TracChangeset
for help on using the changeset viewer.