You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The current AMF documentation recommends the following to load the AMF DLL on Windows:
The AMF run-time is supplied as part of the Windows driver installation. The AMF run-time DLL should be loaded dynamically using the LoadLibraryW Win32 function. The name of the DLL is defined by the AMF_DLL_NAME macro. Always pass the AMF_DLL_NAME macro to LoadLibraryW instead of the actual DLL name to ensure code portability as the name might be defined differently depending on the platform: HMODULE hAMFDll = LoadLibraryW(AMF_DLL_NAME);
Using LoadLibrary() (rather than LoadLibraryEx() with LOAD_LIBRARY_SEARCH_* flags) isn't ideal because it includes ton of unnecessary directories on the search path (including everything on PATH).
Describe the solution you'd like
Adjusting the documentation to advise developers to use a more specific search path like: LoadLibraryExW(AMF_DLL_NAME, NULL, LOAD_LIBRARY_SEARCH_SYSTEM32)
This will avoid matching a copy of the AMF runtime DLL located in some other unintended directory (particularly on a non-AMD system where there may be no legitimate AMF runtime DLL present at all).