AutoXenon Posted October 11, 2022 Share Posted October 11, 2022 Local $apiSet = InputBox("Enter API Set","Enter name of API set to be queried","ext-ms-win-ntuser-rawinput-l1-1-0") If $apiSet Then Local $aCall = DllCall("api-ms-win-core-apiquery-l2-1-0.dll", "BOOL", "IsApiSetImplemented", "STR", $apiSet) MsgBox(0,$apiSet,$aCall[0]) EndIf From here: https://learn.microsoft.com/en-us/windows/win32/apiindex/windows-apisets Quote All versions of Windows share a common base of OS components that is called the core OS (in some contexts this common base is also called OneCore). In core OS components, Win32 APIs are organized into functional groups called API sets. The purpose of an API set is to provide an architectural separation from the host DLL in which a given Win32 API is implemented and the functional contract to which the API belongs. The decoupling that API sets provide between implementation and contracts offers many engineering advantages for developers. In particular, using API sets in your code can improve compatibility with Windows devices. API sets specifically address the following scenarios: Although the full breadth of the Win32 API is supported on PCs, only a subset of the Win32 API is available on other Windows 10 and/or Windows 11 devices such as HoloLens, Xbox, and other devices. The API set name provides a query mechanism to cleanly detect whether an API is available on any given device. Some Win32 API implementations exist in DLLs with different names across different Windows devices. Using API set names instead of DLL names when detecting API availability and delay loading APIs provide a correct route to the implementation no matter where the API is actually implemented. What do you guys think of adding this to autoit's Includes udfs? On one hand, this is only for Win10 and later, but on the other hand it's pretty significant for not taking for granted the assumption that the full set of Windows api features are available on all devices. argumentum 1 Link to comment Share on other sites More sharing options...
AutoXenon Posted October 11, 2022 Author Share Posted October 11, 2022 (edited) Hi, there appears to be a mistake. The code pasted here _is_ the demonstration example for how to detect API sets. The questions underneath are incidental "food for thoughts" but is not the main point of the thread. Edited October 11, 2022 by AutoXenon Jos 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now