10 2015 档案
摘要:Expression(ptm!=NULL)就是用来提示出错的原因的,这里表示如果该指针为空就会错误。参考:http://bbs.csdn.net/topics/390366131http://bbs.csdn.net/topics/390503391/
阅读全文
摘要:GetExitCodeRetrieves the termination status of the specified thread.BOOL WINAPI GetExitCodeThread( _In_ HANDLE hThread, _Out_ LPDWORD lpExitCode);...
阅读全文
摘要:参考:http://qiusuoge.com/11496.htmlhttp://www.cnblogs.com/BoyXiao/archive/2011/01/01/1923828.htmlstdin是标准输入,stdout是标准输出,stderr是标准错误输出。大多数的命令行程序从stdin输入,...
阅读全文
摘要:WaitForSingleObjectWaits until the specified object is in the signaled state or the time-out interval elapses.DWORD WINAPI WaitForSingleObject( _In_ ...
阅读全文
摘要:如果我们有一个子函数,返回值是string类型对象: 那么我们在主函数中常使用char类型指针去接收它的返回对象: 当我们用: 输出p指向的字符数组时,会输出“sssssssssssssssssss”吗?答案是否定的: 我曾一度认为因为可以做类似如下的定义: 且可以输出正确的结果: 则上边的用p接收
阅读全文
摘要:CreateFileCreates or opens a file or I/O device. The most commonly used I/O devices are as follows: file, file stream, directory, physical disk, volum...
阅读全文
摘要:Creates or opens a file or I/O device. The most commonly used I/O devices are as follows: file, file stream, directory, physical disk, volume, console...
阅读全文
摘要:InitializerC++ Primer上说:如果未初始化的Built-in type是定义在function外部的,那么它将自动被初始化为“0”;如果uninitialized的built-in type对象是定义在function内部的,那么它就是undefined的,那么,对它拷贝和访问就都...
阅读全文
摘要:先贴一段代码:跟踪后看到:无论是给bool类型赋值为正整数 还是true,都会转变为1。那么float和double类型如何转换为bool类型?将bool类型赋值给int类型变量,就是借助了寄存器eax,将1byte的值放入eax,再从eax取出dword宽度的值即可。但是问题来了,程序在刚开始“初...
阅读全文
摘要:Common SectionsThe .text section is where all general-purpose code emitted by the compiler or assembler ends up. Since PE files run in 32-bit mode and...
阅读全文
摘要:---恢复内容开始---The format of an operating system's executable file is in many ways a mirror of the operating system.Winnt.h是一个非常重要的头文件,其中定义了大部分windows下的内...
阅读全文
摘要:我这里学习汇编语言的思路就是逆向C++源码。先从最简单的一个程序入手:为什么程序的开头两句总会是push ebpmov ebp,esp?先来看一个程序:这个程序调用fun()时,fun的汇编代码也是如此,开头调用这两句汇编:其实,这里ebp中保存的是你当前的函数(main函数)的栈基址,当你进入一个...
阅读全文
摘要:抛出问题:我在CPP文件中,打算输出一行阿拉伯字符:当试图运行时,会弹出以下提示:即便点击“是”,运行之后也是显示不出来的:为什么会出现这种情况?我们先拿txt文件做个解释:如果你在txt文件中输入阿拉伯文另存为ANSI格式后,再打开是这样的:但如果你另存为utf-8编码格式,就能正确显示:VS中的...
阅读全文

浙公网安备 33010602011771号