|
[求助]关于内联函数
inline只是告诉编译器你有内嵌意向,真正是否内嵌由编译器自行决定,无论是否release。 之前看到VS有一个__forceinline的关键字,不知道能不能强制内嵌,没有实验过。 其实,真正实践中,加不加inline没有太大意义,因为编译器会在合适的时候,把非inline声明的函数直接inline,而把inline声明的函数不内嵌,这都是编译器自行决定的,这个决定在绝大多数的情况下,是正确有效的,是对程序体积上或运行时间上的最优化结果,没有必要人工干预。 |
|
[讨论]VirtualProtect 触发异常HOOK
当然,修改的是地址所在页的整页属性 |
|
32位WIN7生成的应用不能在XP上运行
项目属性页->配置属性->常规->平台工具集,点选VS20XX-WindowsXP(V1XX_xp) 你是因为平台工具集没选,新的VS好像默认的平台工具集不面向XP,你如果需要开发在XP下能运行的程序,需要重选平台工具集。 示范请看附件图片: |
|
[原创]X64上恢复VS关键字__asm的使用
--Key File网上找得到,真实有效。 VS2013下用intel编译x64时还需要修改x64的toolsets环境。intel论坛也有。 另附一个问题:http://bbs.csdn.net/topics/390703933。不知道楼主有没有实验过。 |
|
[讨论]关于x64汇编调用api的问题
http://msdn.microsoft.com/zh-cn/library/ms235286(v=vs.90).aspx |
|
[讨论]Using STL in Kernel Driver Coding
联系到iforgiven,使用了他改造过的SigSTL,问题得到完美解决!谢谢iforgiven |
|
[讨论]Using STL in Kernel Driver Coding
drvcpplib里没有标准库模版。bazislib也没有。iforgiven帖子里的东西我感兴趣极了,正在联系ing... |
|
[求助]32位无符号随机函数
#include <stdlib.h> #pragma warning(push) #pragma warning(disable:4244) //warning C4244: “初始化”: 从“ULONG64”转换到“const unsigned int”,可能丢失数据 TULONG xrand(const TULONG mod) { //! 由于重要性不是很高,随机数的生成可以忽视多线程读写问题 static TULONG gk_xrand_seed = 0; const TULONG r = __rdtsc(); #if _WIN64 const int l = r % 0x40; gk_xrand_seed += _rotl64(r,l); #else const int l = r % 0x20; gk_xrand_seed += _lrotl(r,l); #endif return (mod) ? (gk_xrand_seed % mod) : (gk_xrand_seed); } #pragma warning(pop) 我这函数的随机性能如何?求评估 |
|
为什么DEBUGMAN关门了?
x!=1 2013-8-14 17:21:10 老大,debugman怎么维护这么久。。。 xIkUg 2013-8-14 17:25:34 嗯。。。暂时关闭了,等过段时间再开 |
|
|
|
[原创]发些个人库之 log 信息输出
google说了,调试信息输出允许用流,流使得信息输出更加方便简捷。 类如: xerr << "int:" << value << " lp:" << (void*)lp; xdbg << "xdbg"; xtrace << "xtrace"; 求超越 |
|
[原创]解决C++“在构造函数中调用构造函数”的问题
网上有new(this)CNestedConst()这样更优雅的办法。说是this->CNestedConst::CNestedConst()这样的调用只适用于VC。。。 |
|
[讨论]老问题:VS中定义的宏,如何查看它的值?无解?
楼主说嵌套宏不就得了。大家以为你是说宏的IDE提示。 貌似VS+VX也的确无法显示正确的值。 是这样的,因为宏只是作为单纯的字符串替换,IDE无法假定这个宏就是一个值,因为它可能是一句代码,一行字符串,甚至多行XXOO。所以没有IDE没有智能到识别一个宏为数值,其实真实原因是:没有必要,这样会拖慢IDE。 宏在某些情况下很方便,但现在的C++已经有很多更优雅的办法替换宏的写法。出现这样的嵌套宏,说明:要不你的代码写的够烂,要不你就是故意写的极端。所有的IDE都没有必要为这样罕见的情况做出处理。 当然,你如果写的是纯C的话。。。纯C本来支持就少,这想法还是早掐了。 如果是单纯的数值宏,建议使用ENUM,在某些情况下,ENUM的提示要好一些。 或者const也可以 |
|
[求助]汇编中快速转换高低位的问题
我来认错,楼上说的是对的。bsawp ax无法实现楼主的需求。只会把ax清零。只是奇怪为什么汇编里允许有这条指令。 |
|
[求助]汇编中快速转换高低位的问题
bswap ax |
|
[求助]md5算法实现求助啊
http://baike.baidu.com/view/7636.htm(参考百度百科自行实现) http://bbs.pediy.com/showthread.php?t=167370(源码,如果你有权限看的话。。。) 另外网上很多MD5的源码,自己搜索吧 |
操作理由
RANk
{{ user_info.golds == '' ? 0 : user_info.golds }}
雪币
{{ experience }}
课程经验
{{ score }}
学习收益
{{study_duration_fmt}}
学习时长
基本信息
荣誉称号:
{{ honorary_title }}
能力排名:
No.{{ rank_num }}
等 级:
LV{{ rank_lv-100 }}
活跃值:
在线值:
浏览人数:{{ visits }}
最近活跃:{{ last_active_time }}
注册时间:{{ user_info.create_date_jsonfmt }}
勋章
兑换勋章
证书
证书查询 >
能力值