该书上所讲的挂接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)
--------------------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)
解决方案 »
- 这程序怎么写?
- Excel插件弹出的无模态对话框, Edit控件不能输入?
- 如何得到接收消息的窗口句柄,我的程序在一对话框中只有两个按纽
- 为什么我在tab control控件中添加前三个对话框正常,但再添加一个,就显示不出来了呢?急
- 读取数据库数据时,利用进度条的问题
- 急求解,在使用 STL 中 map 时,编译总是出现很警告错误
- 帮忙看看这段代码:关于树型控件。快!!!
- 疑问
- 在vc或vb中,有办法操作powerpoint演示文稿吗?
- 在vc上编opengl 出不来图像
- 是不是msdn写错了?
- 菜鸟问题 SQL Server中域类型为char 8字节,若输入内容不满8字节,会自动用空格补满长度,这样不方便,有好办法吗
files.--》你没有使用最新的SDK平台头文件和库文件。
--------------------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)这又是什么错呢?