VirtualBox

Changeset 3347 in kBuild


Ignore:
Timestamp:
May 23, 2020 8:28:25 AM (5 years ago)
Author:
bird
Message:

kWorker: Don't complain about not finding mscoree.dll. The CRT exit code checks for it to allow it before doing ExitProcess, so that mscoree.dll can do ExitProcess if present.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kWorker/kWorker.c

    r3338 r3347  
    12041204static int kwLdrModuleResolveAndLookup(const char *pszName, PKWMODULE pExe, PKWMODULE pImporter,
    12051205                                       const char *pszSearchPath, PKWMODULE *ppMod);
    1206 static PKWMODULE kwLdrModuleForLoadedNative(const char *pszName, KBOOL fEnsureCrtSlot);
     1206static PKWMODULE kwLdrModuleForLoadedNative(const char *pszName, KBOOL fEnsureCrtSlot, KBOOL fAlwaysPresent);
    12071207static char *kwSandboxDoGetEnvA(PKWSANDBOX pSandbox, const char *pchVar, KSIZE cchVar);
    12081208static KBOOL kwSandboxHandleTableEnter(PKWSANDBOX pSandbox, PKWHANDLE pHandle, HANDLE hHandle);
     
    20332033                                    if (!pImportMod)
    20342034                                    {
    2035                                         pImportMod = kwLdrModuleForLoadedNative(pszImport, K_TRUE /*fEnsureCrtSlot*/);
     2035                                        pImportMod = kwLdrModuleForLoadedNative(pszImport, K_TRUE /*fEnsureCrtSlot*/,
     2036                                                                                K_TRUE /*fAlwaysPresent*/);
    20362037                                        if (!pImportMod)
    20372038                                        {
     
    30563057 * @param   pszName         The name of the module.
    30573058 * @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.
    30583061 */
    3059 static PKWMODULE kwLdrModuleForLoadedNative(const char *pszName, KBOOL fEnsureCrtSlot)
     3062static PKWMODULE kwLdrModuleForLoadedNative(const char *pszName, KBOOL fEnsureCrtSlot, KBOOL fAlwaysPresent)
    30603063{
    30613064    /*
     
    31323135            kwErrPrintf("GetModuleFileNameA failed for '%s': %u!\n", pszName, GetLastError());
    31333136    }
    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);
    31363139    return NULL;
    31373140}
     
    54005403         * module list to for it to work.
    54015404         */
    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);
    54035407        if (pMod)
    54045408        {
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette