Closed as not planned
Description
From #77618 (comment):
I did however want to comment on the
compat_fn
macro - I was curious how that was implemented. It usesGetModuleHandleW
to find the module to pass toGetProcAddress
when it should instead be usingLoadLibraryW
. UsingGetModuleHandleW
assumes the module has already been loaded by the calling process. That may be a safe bet for certain functions that you want to “delay load” but certainly not all.LoadLibraryW
will just go the extra mile of also loading the module if it has not already been loaded. There's also no need to callFreeLibrary
for such APIs so it should be a pretty simple fix.