本文整理汇总了C#中Address类的典型用法代码示例。如果您正苦于以下问题:C#Address类的具体用法?C#Address怎么用?C#Address使用的例子?这里精选的类代码示例或许可以为您提供帮助。
示例1:Relocate publicoverrideRelocationResultsRelocate(AddressaddrLoad) { ImageMapimageMap=imgLoadedMap; ImageReaderrdr=newLeImageReader(exe.RawImage,(uint)exe.e_lfaRelocations);
varrelocations=newRelocationDictionary(); inti=exe.e_cRelocations; while(i!=0) { uintoffset=rdr.ReadLeUInt16(); ushortsegOffset=rdr.ReadLeUInt16(); offset+=segOffset*0x0010u;
ushortseg=(ushort)(imgLoaded.ReadLeUInt16(offset)+addrLoad.Selector); imgLoaded.WriteLeUInt16(offset,seg); relocations.AddSegmentReference(offset,seg);
imageMap.AddSegment(Address.SegPtr(seg,0),seg.ToString("X4"),AccessMode.ReadWriteExecute); --i; } //Foundthestartaddress.
AddressaddrStart=Address.SegPtr((ushort)(exe.e_cs+addrLoad.Selector),exe.e_ip); imageMap.AddSegment(Address.SegPtr(addrStart.Selector,0),addrStart.Selector.ToString("X4"),AccessMode.ReadWriteExecute);
returnnewRelocationResults(
newList
{newEntryPoint(addrStart,arch.CreateProcessorState())},
relocations); }
原文链接:http://www.jxszl.com/biancheng/C/556482.html