Unable to locate program Input Point k32getprocessmemoryinfo above dynamic link library kernel32.dll

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.