- 1、本文档共16页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 5、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 6、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 7、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 8、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
win32调试api 第二部分(The second part API Win32 debugging)
win32调试api 第二部分(The second part API Win32 debugging)
The second part API Win32 debugging
--------------------------------------------------------------------------------
We continue to debug Win32 API topic. In this chapter, we will learn how to modify the program being debugged.
Download the example
Theory:
In the previous chapter, we learned how to load the debug process and how to deal with in the course of events. For practical purposes, our program should have the ability to modify the program being debugged. There are several API functions for this purpose.
The ReadProcessMemory function allows you to read the specified process memory. The function prototype is as follows:
ReadProcessMemory proto hProcess:DWORD, lpBaseAddress:DWORD, lpBuffer:DWORD, nSize:DWORD, lpNumberOfBytesRead:DWORD
HProcess to handle the reading process.
In the process of lpBaseAddress target to read memory start address. For example, if you want to read 4 bytes in the target process starting at address 401000h, this parameter should be set to 401000h.
LpBuffer receive buffer address
NSize want to read the number of bytes.
The number of bytes read the lpNumberOfBytesRead records the actual address of the variable. If you do not care about this value, can fill in NULL.
WriteProcessMemory is a function corresponding to the ReadProcessMemory, you can write the target process through its memory. The parameters and the same ReadProcessMemory.
Understand the next two functions need some process context related background knowledge. In the multi task operating system such as Windows, the same time may run several programs. Windows assigns each thread a time slice, when time finished, Windows will freeze the current thread and switch to the next thread with the highest priority. Prior to the handover, Windows will save the current process of the contents of the registers, such as back up and running again in this thread, Windows can restore the last thread to run * *. Save the register called the
您可能关注的文档
- model-test03(model-test03).doc
- mtk芯片组手机维修完全手册图解资料(MTK chip set mobile phone repair completely manual graphic data).doc
- model_test02(model_test02).doc
- milestone入门使用攻略 (转自 wang16336)(Milestone introduction Raiders (from wang16336)).doc
- my days of the week五年级上册第二单元(我每周的五年级上册第二单元天).doc
- mybase使用指南(MyBase Guide).doc
- mysql-innodb-体系结构深入理解(Deep understanding of mysql-innodb- architecture).doc
- mysql配置优化(MySQL configuration optimization).doc
- mysql练习题及答案(MySQL exercises and answers).doc
- n-gage qd典型问答综合(QD典型问答综合).doc
文档评论(0)