锐英源软件
第一信赖

精通

英语

开源

擅长

开发

培训

胸怀四海 

第一信赖

当前位置:锐英源 / 开源技术 / 语音识别开源 / GetWindowLongPtr没声明

服务方向

人工智能数据处理
人工智能培训
kaldi数据准备
小语种语音识别
语音识别标注
语音识别系统
语音识别转文字
kaldi开发技术服务
软件开发
运动控制卡上位机
机械加工软件
软件开发培训
Java 安卓移动开发
VC++
C#软件
汇编和破解
驱动开发

联系方式

固话:0371-63888850
手机:138-0381-0136
Q Q:396806883
微信:ryysoft

GetWindowLongPtr没声明

重点

我遇到此问题,在VC6下死活没解决,升级到VS2010下编译通过,当然VS2010下也有新问题,也不容易解决,总之升级旧代码不是那么容易的。有困难联系QQ396806883.


I'm using the examples of the Programming Application For Windows By Jeffery Richter. I'm using Microsoft Visual Studio 6.0. 我正在使用Jeffery Richter撰写的Windows编程应用程序示例。
It gives the following errors. 我正在使用Microsoft Visual Studio 6.0。

You are not using the latest Platform SDK header/library
files. This may prevent the project from building correctly.
error C2065: 'GetWindowLongPtr' : undeclared identifier
error C2065: 'GWLP_HINSTANCE' : undeclared identifier
error C2501: 'PCTSTR' : missing storage-class or type specifier

I have installed SDK for http://www.microsoft.com/msdownload/platformsdk/sdkupdate/psdk-full.htm 我已经为http://www.microsoft.com/msdownload/platformsdk/sdkupdate/psdk-full.htm安装了SDK
This Windows Server 2003 Platform SDK.After installation i have included the Executable,Libarary and Include directories in the visual studio. But no use. Still I'm getting the same errors. 此Windows Server 2003平台SDK。安装后,我在Visual Studio中包含了Executable,Libarary和Include目录。但是没用。

 

VC6 is old, 11 years is a lifetime in software development.  GetWindowLongPtr() was introduced in the Win32 API well after VC6 (and the SDK headers it has) was released.  It was necessary to support the 64-bit version of Windows, GetWindowLong() cannot return 8 byte pointer values. You are liable to run into many other problems like this.  The compiler itself has seen many updates since VC6 to make it C++ standard compliant.  It has an I/O stream implementation that's desperately obsolete.  Etcetera.  You can get the current version of the compiler for free, download the  VC6很老,在软件开发中已经有11年的生命。 VC6(及其包含的SDK标头)发布后,Win32 API中就很好地引入了GetWindowLongPtr()。必须支持64位版本的Windows,否则GetWindowLong()无法返回8字节的指针值。 您可能会遇到类似这样的许多其他问题。自VC6以来,编译器本身已进行了许多更新,以使其符合C ++标准。它具有一个非常过时的I / O流实现。 Etcetera。您可以免费获得编译器的当前版本,请下载VS2008 Express版本。推荐的。

 

 

Hello Syed, 你好,赛德,

>> error C2501: 'PCTSTR' : missing storage-class or type specifiers

Make sure you have included windows.h. BTW, take "Include directories" from tools > options menu and move the latest platform SDK include paths to top. Hopefully it will solve the problem. If not, please don't hesitate to post the code. 确保已包含windows.h。进入“包含目录”,把最新的SDK包含路径放到顶部。

 

 

Include directories" from tools > options menu and move the latest platform SDK include paths to top. Hopefully it will solve the problem. If not, please don't hesitate to post the code. I did this and its working fine.Thanks for your help raj. Can anybody tell what was the problem? Really i didnt get. “工具>选项菜单中的“包含目录””,然后将最新的平台SDK包含路径移至顶部。

 

友情链接
版权所有 Copyright(c)2004-2024 锐英源软件
统一社会信用代码:91410105098562502G 豫ICP备08007559号 最佳分辨率 1440*900
地址:郑州市金水区文化路97号郑州大学北区院内南门附近