Understanding the Helper Function

The helper function for linker-supported delayed loading is what actually loads the DLL at run time. You can modify the helper function to customize its behavior by writing your own function and linking it to your program instead of using the supplied helper function in Delayimp.lib. One helper function serves all delay loaded DLLs.

The helper function performs the following actions:

The helper function can call back to a notification hook in your program after each of the following actions:

Each of these hook points can return a value that will alter normal processing of the helper routine in some manner except the return to the delay import load thunk.

The default helper code can be found in Delayhlp.cpp and Delayimp.h (in vc\include) and is compiled in Delayimp.lib (in vc\lib). You will need to include this library in your compilations unless you write your own helper function.

The following topics describe the helper function: