从winapi中特定地址的文件中读取 [英] Read from file at specific address in winapi
问题描述
大家好,
我想从特定的exe文件中读取PE信息,这需要从文件中的特定地址读取,并且必须指定读取所需的数据长度。 br />
所以,如何从文件中的特定地址读取?
我的要求是节省内存。 (我想将数据存储在堆栈中)
注意:我使用的函数是ReadFile()和CreateFile()。
Hello guys,
I want to read the PE information from specific exe file, and this required to read from specific address from the file and must specify the length of the data required to read.
So, How can I read from specific address from the file?
The reason of my demand is to save memory. ( I want to store the data in the stack)
Note: the function I used is ReadFile() and CreateFile().
推荐答案
那么,如何从文件中的特定地址读取?
So, How can I read from specific address from the file?
使用SetFilePointerEx [ ^ ]功能。
Using SetFilePointerEx[^] function.
并且必须指定读取所需数据的长度
and must specify the length of the data required to read
由<提供code> ReadFile function。
That''s provided by ReadFile
function.
这篇关于从winapi中特定地址的文件中读取的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!