-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed as not planned
Closed as not planned
Copy link
Labels
O-windowsOperating system: WindowsOperating system: WindowsT-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
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.
Metadata
Metadata
Assignees
Labels
O-windowsOperating system: WindowsOperating system: WindowsT-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.