Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[mingw] use delay loading for DLLs that are subject to side loading
* This reverts much of commits f6ac559 and 1947266 so that we call the Windows APIs directly again, while ensuring that, by the time we load the DLLs, sideloading mitigation has already been applied by the application. * This is a continuation of #1877, and should help prevent re-introducing side-loading issues when we link against new libraries, as well as allow us to drop some of the manual DLL hooking we've been doing to prevent it, to clean up the code. * Note that this is a bit more complex than what the stackoverflow post suggests, because we need to create delayloaded libs for both 32-bit and 64-bit, which use a different calling convention and therefore need to use different .def files. So there's a lot of gymkhana involved, with Makefiles and whatnot, to get us there. * Also simplify the use of CM_Get_DevNode_Registry_PropertyA() in dev.c since recent versions of MinGW now have support for it. * Also fix 2 small issues in net.c (potential overflow) and format.c (memory leak).
- Loading branch information