错误C2664:'SomeAPI :: APIMethod(INT_PTR * p64)':无法将参数1从'long *'转换为'INT64 *' [英] error C2664: 'SomeAPI::APIMethod(INT_PTR* p64)': cannot convert argument 1 from 'long*' to 'INT64*'

查看:243
本文介绍了错误C2664:'SomeAPI :: APIMethod(INT_PTR * p64)':无法将参数1从'long *'转换为'INT64 *'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将应用程序从32位64位移植。 VS2013 .C ++。请帮助修复警告

Porting an app from 32 bit 64 bit . VS2013 .C ++ . pLEASE HELP TO FIX THE WARNINGS

推荐答案

你确实记得在64位模式下指针是64位。 INT_PTR和UINT_PTR是整数类型,总是与指针大小相同,因此它们在32位和64位构建之间更改它们的大小(这些Microsoft
类型的"行业标准"名称是ptrdiff_t,size_t, ssize_t)。

You do remember that in 64-bit mode pointers are 64-bit. INT_PTR and UINT_PTR are integer types that always have same size as a pointer, so they change their sizes between 32-bit and 64-bit builds ("industry-standard" names for these Microsoft types are ptrdiff_t, size_t, ssize_t).

Microsoft C / C ++编译器中的类型 long 是_always_ 32位,无论如何。

The type long in Microsoft C/C++ compilers is _always_ 32-bit, no matter what.

这就是为什么类型long和INT_PTR在64模式下不兼容。

So that's why types long and INT_PTR are NOT compatible in 64-mode.

有关64位兼容性的更多信息(和工具!),请再次访问  http:// www .viva64.com。

For more information (and tools!) about 64-bit compatibility, please visit again http://www.viva64.com .

问候,

- - pa

- - pa


这篇关于错误C2664:'SomeAPI :: APIMethod(INT_PTR * p64)':无法将参数1从'long *'转换为'INT64 *'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆