Uploaded image for project: 'Core ReactOS'
  1. Core ReactOS
  2. CORE-14102

SDK/ROS, or GCC, misses __HrLoadAllImportsForDll() support?

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Duplicate
    • Fix Version/s: None
    • Component/s: NTCore
    • Labels:
      None

      Description

      Noticed while working on ROSTESTS-296, following ROSTESTS-293 discussion.

      I wanted to give __HrLoadAllImportsForDll() a try, but GCC + ROS gave:
      error: implicit declaration of function '__HrLoadAllImportsForDll'

      Could it (or similar) be supported, or is it MS VC++ specific?

      https://docs.microsoft.com/fr-fr/cpp/build/reference/linker-support-for-delay-loaded-dlls

      Linker Support for Delay-Loaded DLLs

      https://docs.microsoft.com/fr-fr/cpp/build/reference/loading-all-imports-for-a-delay-loaded-dll

      The __HrLoadAllImportsForDll function, which is defined in delayhlp.cpp, ...

      if (FAILED(__HrLoadAllImportsForDll("delay1.dll"))) {
         printf ( "failed on snap load, exiting\n" );
         exit(2);
      }

      https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/9mGyojfqCCU

      That function is (should be) in DelayImp.h and delayimp.lib.

      delayimp.h
      {{ 20 #define DELAYLOAD_VERSION 0x200}}

      delayimp.c

      apitests/sdk/delayimp.cpp

       422 #if defined(_DELAY_IMP_VER) && _DELAY_IMP_VER == 2 && defined(DELAYLOAD_SUPPORTS_UNLOADING)
       
       433         hr = __HrLoadAllImportsForDll(WINMM_DLLNAME);

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                bug zilla Bug Zilla
                Reporter:
                Serge Gautherie Serge Gautherie
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: