AddDllDirectory
AddDllDirectory is a function in the Windows API that modifies the DLL search order for the current process. When an application attempts to load a dynamic-link library (DLL), the operating system searches for the DLL in a predefined set of locations. By calling AddDllDirectory, an application can add a specific directory to this search path. This is particularly useful for applications that use custom DLLs located in non-standard directories, preventing the need to place these DLLs in the application's executable directory or the system directories.
When AddDllDirectory is called with a valid directory path, that path is prepended to the DLL search
It is important to note that directories added using AddDllDirectory are only effective for the process that