Changeset 3347 in kBuild
- Timestamp:
- May 23, 2020 8:28:25 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kWorker/kWorker.c
r3338 r3347 1204 1204 static int kwLdrModuleResolveAndLookup(const char *pszName, PKWMODULE pExe, PKWMODULE pImporter, 1205 1205 const char *pszSearchPath, PKWMODULE *ppMod); 1206 static PKWMODULE kwLdrModuleForLoadedNative(const char *pszName, KBOOL fEnsureCrtSlot );1206 static PKWMODULE kwLdrModuleForLoadedNative(const char *pszName, KBOOL fEnsureCrtSlot, KBOOL fAlwaysPresent); 1207 1207 static char *kwSandboxDoGetEnvA(PKWSANDBOX pSandbox, const char *pchVar, KSIZE cchVar); 1208 1208 static KBOOL kwSandboxHandleTableEnter(PKWSANDBOX pSandbox, PKWHANDLE pHandle, HANDLE hHandle); … … 2033 2033 if (!pImportMod) 2034 2034 { 2035 pImportMod = kwLdrModuleForLoadedNative(pszImport, K_TRUE /*fEnsureCrtSlot*/); 2035 pImportMod = kwLdrModuleForLoadedNative(pszImport, K_TRUE /*fEnsureCrtSlot*/, 2036 K_TRUE /*fAlwaysPresent*/); 2036 2037 if (!pImportMod) 2037 2038 { … … 3056 3057 * @param pszName The name of the module. 3057 3058 * @param fEnsureCrtSlot Whether to ensure that it has a valid CRT slot. 3059 * @param fAlwaysPresent Whether the module is expected to always be present, 3060 * or not. If not, complain less. 3058 3061 */ 3059 static PKWMODULE kwLdrModuleForLoadedNative(const char *pszName, KBOOL fEnsureCrtSlot )3062 static PKWMODULE kwLdrModuleForLoadedNative(const char *pszName, KBOOL fEnsureCrtSlot, KBOOL fAlwaysPresent) 3060 3063 { 3061 3064 /* … … 3132 3135 kwErrPrintf("GetModuleFileNameA failed for '%s': %u!\n", pszName, GetLastError()); 3133 3136 } 3134 else 3135 kwErrPrintf("Module '%s' was not found by GetModuleHandleA !\n", pszName);3137 else if (fAlwaysPresent) 3138 kwErrPrintf("Module '%s' was not found by GetModuleHandleA/W!\n", pszName); 3136 3139 return NULL; 3137 3140 } … … 5400 5403 * module list to for it to work. 5401 5404 */ 5402 PKWMODULE pMod = kwLdrModuleForLoadedNative(g_aGetModuleHandleCache[i].pszName, K_FALSE); 5405 PKWMODULE pMod = kwLdrModuleForLoadedNative(g_aGetModuleHandleCache[i].pszName, K_FALSE, 5406 g_aGetModuleHandleCache[i].fAlwaysPresent); 5403 5407 if (pMod) 5404 5408 {
Note:
See TracChangeset
for help on using the changeset viewer.