This is because getprocessmemoryinfo is different in different system versions. The official description is as follows:
remarks
starting with Windows 7 and Windows Server 2008 R2, psapi. h establishes version numbers for the psapi functions. the psapi version number affects the name used to call the function and the library that a program must load.
If psapi_version is 2 or greater, this function is defined as k32getprocessmemoryinfo in psapi. H and exported in kernel32.lib and kernel32.dll. if psapi_version is 1, this function is defined as getprocessmemoryinfo in psapi. H and exported in psapi. lib and psapi. DLL as a wrapper that CILS k32getprocessmemoryinfo.
programs that must run on earlier versions of Windows as well as Windows 7 and later versions shoshould always call this function as getprocessmemoryinfo. to ensure correct resolution of symbols, add psapi. lib to the targetlibs macro and compile the program with-dpsapi_version = 1. to use run-time dynamic linking, load psapi. DLL.
Solution:
You only need to add
# Ifndef psapi_version
# Define psapi_version 1
# Endif
# Include <psapi. h>
# Pragma comment (Lib, "psapi. lib ")
Unable to locate program Input Point k32getprocessmemoryinfo above dynamic link library kernel32.dll