Alright if my title was not clear enough, I am targeting the Windows OS and just wanted to know if there was some type of program that would let me know what "OS" or higher someone needs to run my application, for example:
Example functions used in application:
OpenFile - Minimum Supported Client: Windows XP
BCryptEncrypt - Minimum supported client: Windows Vista
Scan completed! Result: Minimum supported client: Windows Vista.
Such an API checker could exist. I'm not aware of any that exists though, and I suspect I know why.
It's almost certainly because it would be wrong too often.
For example, if your program uses
CreateProcess() to run PowerShell, it would fail on Windows 98, but how would a tool detect that you're calling a nonexistent program? Or, if your program is calling a COM interface that doesn't exist: that wouldn't be visible in the export or import tables, either. Same with functions that are loaded dynamically at runtime using
Note that this doesn't mean the problem is impossible to solve in practical cases. However, the program is impossible to solve for all cases, and requires some pretty heavy-duty static analysis to work for most practical cases. Only unrealistic cases, like the ones you mentioned, would be trivial.