function rav2offset(nthd:pimagentheaders;rva:cardinal):integer;stdcall;
var
psectionh:pimagesectionheader;
secnum,i:integer;
begin
result:=0;
secnum:=nthd^.FileHeader.NumberOfSections;
psectionh:=pimagesectionheader(dword(nthd)+sizeof(image_section_header));
for i:=0 to secnum-1 do begin
if (psectionh.VirtualAddress<=rva) and (rva<(psectionh.VirtualAddress+psectionh.SizeOfRawData)) then
result:=rva-psectionh.VirtualAddress+psectionh.PointerToRawData;
end;
end;
帖子浏览
|
用户名:学生 用户ID:110 用户级别:9名动江湖 注册时间:2008-09-17 论坛分数:18860 |
继续标记
|
本主题讨论树
- 标记一下 (64字) 【学生】 2010-10-08 06:53 阅读:11
回复本帖
请先 登录,再回复本帖。