该书上所讲的挂接api的例子编译不通过,我查看了一下以前的贴,有很多都看不了,所以在这里再次问一问各位大虾们,为什么我编译的时候会出现以下错误:
--------------------Configuration: 22 LastMsgBoxInfoLib - Win32 Debug--------------------
Compiling...
APIHook.cpp
You are not using the latest Platform SDK header/library 
files. This may prevent the project from building correctly.
e:\yang\new\cmnhdr.h(212) : error C2065: 'GetWindowLongPtr' : undeclared identifier
e:\yang\new\cmnhdr.h(212) : error C2065: 'GWLP_HINSTANCE' : undeclared identifier
e:\yang\new\22-lastmsgboxinfolib\apihook.cpp(12) : fatal error C1083: Cannot open include file: '..\04-ProcessInfo\Toolhelp.h': No such file or directory
LastMsgBoxInfoLib.cpp
NOTE: WINVER has been defined as 0x0500 or greater which enables
Windows NT 5.0 and Windows 98 features. When these headers were released,
Windows NT 5.0 beta 1 and Windows 98 beta 2.1 were the current versions.
For this release when WINVER is defined as 0x0500 or greater, you can only
build beta or test applications.  To build a retail application,
set WINVER to 0x0400 or visit http://www.microsoft.com/msdn/sdk
to see if retail Windows NT 5.0 or Windows 98 headers are available.
See the SDK release notes for more information.
You are not using the latest Platform SDK header/library 
files. This may prevent the project from building correctly.
e:\yang\new\cmnhdr.h(212) : error C2065: 'GetWindowLongPtr' : undeclared identifier
e:\yang\new\cmnhdr.h(212) : error C2065: 'GWLP_HINSTANCE' : undeclared identifier
e:\yang\new\22-lastmsgboxinfolib\lastmsgboxinfolib.cpp(57) : error C2065: 'IDTRYAGAIN' : undeclared identifier
e:\yang\new\22-lastmsgboxinfolib\lastmsgboxinfolib.cpp(57) : error C2051: case expression not constant
e:\yang\new\22-lastmsgboxinfolib\lastmsgboxinfolib.cpp(58) : error C2065: 'IDCONTINUE' : undeclared identifier
e:\yang\new\22-lastmsgboxinfolib\lastmsgboxinfolib.cpp(58) : error C2051: case expression not constant
e:\yang\new\22-lastmsgboxinfolib\lastmsgboxinfolib.cpp(71) : error C2065: 'FORWARD_WM_COPYDATA' : undeclared identifier
Error executing cl.exe.22 LastMsgBoxInfoLib.dll - 10 error(s), 0 warning(s)

解决方案 »

  1.   

    You are not using the latest Platform SDK header/library 
    files.--》你没有使用最新的SDK平台头文件和库文件。
      

  2.   

    在那里可以找得到最新的SDK平台头文件和库文件呢?
      

  3.   

    下载了新的版本后又出现如下错误
    --------------------Configuration: 22 LastMsgBoxInfo - Win32 Debug--------------------
    Linking...
    LastMsgBoxInfo.obj : error LNK2001: unresolved external symbol __imp__LastMsgBoxInfo_HookAllApps@8
    ..\x86\Debug/22 LastMsgBoxInfo.exe : fatal error LNK1120: 1 unresolved externals
    Error executing link.exe.22 LastMsgBoxInfo.exe - 2 error(s), 0 warning(s)这又是什么错呢?