zoukankan      html  css  js  c++  java
  • Delay Load

    [MSDN: http://msdn.microsoft.com/en-us/library/151kt790.aspx]

    The Visual C++ linker now supports the delayed loading of DLLs. This relieves you of the need to use the Windows SDK functions LoadLibrary and GetProcAddress

    to implement DLL delayed loading.

    Before Visual C++ 6.0, the only way to load a DLL at run time was by using LoadLibrary and GetProcAddress; the operating system would load the DLL when the executable or DLL using it was loaded.

    Beginning with Visual C++ 6.0, when statically linking with a DLL, the linker provides options to delay load the DLL until the program calls a function in that DLL.

    An application can delay load a DLL using the /DELAYLOAD (Delay Load Import) linker option with a helper function (default implementation provided by Visual C++). The helper function will load the DLL at run time by calling LoadLibrary and GetProcAddress for you.

    You should consider delay loading a DLL if:

    • Your program may not call a function in the DLL.

    • A function in the DLL may not get called until late in your program's execution.

    The delayed loading of a DLL can be specified during the build of either a .EXE or .DLL project. A .DLL project that delays the loading of one or more DLLs should not itself call a delay-loaded entry point in Dllmain.

  • 相关阅读:
    LeetCode 动态规划专题
    LeetCode 双指针、滑动窗口、单调队列专题
    LeetCode 单调栈专题
    LeetCode DFS搜索与回溯专题
    LeetCode树专题
    操作系统思维导图| IO管理篇
    2020-为什么换了工作
    深入浅出Spring MVC
    rocketmq初识
    线上故障处理手册
  • 原文地址:https://www.cnblogs.com/taoxu0903/p/1460537.html
Copyright © 2011-2022 走看看