'Using delay load helper function hooks to specify alternate library directory
How to write and use hooks for the supplied helper function? I want to create a hook to specify alternate library directories to the helper, but I'm not able to implement it by following the docs or other questions I have found. Am I supposed to write a new helper function? Some sources claim that I only need to define the hooks and the behaviour inside the main script.
Answers to this question specify some code to be included in the main script, but when in my main script I write:
extern const PfnDliHook __pfnDliNotifyHook2 = delayHook;
extern const PfnDliHook __pfnDliFailureHook2 = delayHook;
I get:
Identifier PfnDliHook is not defined
Identifier PfnDliHook is not defined
And many more errors related to all helper variables (PDelayLoadInfo, dliStartProcessing, etc). Of course, I changed the code in that answer from c++ to c.
Other sources mention similar approaches, but again not much indication about how to implement. Same applies to the docs for Understand the delay load helper function and Error handling and notification.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
