VirtualBox

Ignore:
Timestamp:
Jul 2, 2015 11:01:09 AM (9 years ago)
Author:
vboxsync
Message:

SUPHardNt: Need another hack to make VBoxRT.dll load when executing testcases, at least on server 2012.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/Support/win/SUPR3HardenedMain-win.cpp

    r56733 r56746  
    452452 *                              directory.  If set to false, the application
    453453 *                              directory is also searched.
    454  */
    455 DECLHIDDEN(void *) supR3HardenedWinLoadLibrary(const char *pszName, bool fSystem32Only)
     454 * @param   fMainFlags          The main flags (giving the location), if the DLL
     455 *                              being loaded is loaded from the app bin
     456 *                              directory and import other DLLs from there. Pass
     457 *                              0 (= SUPSECMAIN_FLAGS_LOC_APP_BIN) if not
     458 *                              applicable.  Ignored if @a fSystem32Only is set.
     459 *
     460 *                              This is only needed to load VBoxRT.dll when
     461 *                              executing a testcase from the testcase/ subdir.
     462 */
     463DECLHIDDEN(void *) supR3HardenedWinLoadLibrary(const char *pszName, bool fSystem32Only, uint32_t fMainFlags)
    456464{
    457465    WCHAR wszPath[RTPATH_MAX];
     
    476484                if (g_fSupLibHardenedDllSearchUserDirs)
    477485                    fFlags |= LOAD_LIBRARY_SEARCH_USER_DIRS;
     486                if ((fMainFlags & SUPSECMAIN_FLAGS_LOC_MASK) != SUPSECMAIN_FLAGS_LOC_APP_BIN)
     487                    fFlags |= LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR;
    478488            }
    479489        }
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