本文整理汇总了C#中dnSpy.Contracts.Hex.HexBuffer类的典型用法代码示例。如果您正苦于以下问题:C# HexBuffer类的具体用法?C# HexBuffer怎么用?C# HexBuffer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
HexBuffer类属于dnSpy.Contracts.Hex命名空间,在下文中一共展示了HexBuffer类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: HexField
protected HexField(HexBuffer buffer, string parentName, string name, HexPosition start, int size) {
this.buffer = buffer;
this.parentName = parentName;
IsVisible = true;
Name = name;
Span = new HexSpan(start, (ulong)size);
}
开发者ID:0xd4d,项目名称:dnSpy,代码行数:7,代码来源:HexField.cs
示例2: Write
public static void Write(HexBuffer buffer, HexPosition position, byte[] data) {
if (buffer == null)
throw new ArgumentNullException(nameof(buffer));
if (data == null || data.Length == 0)
return;
buffer.Replace(position, data);
}
开发者ID:manojdjoshi,项目名称:dnSpy,代码行数:7,代码来源:HexBufferWriterHelper.cs
示例3: HexVersionImpl
public HexVersionImpl(HexBuffer buffer, int versionNumber, int reiteratedVersionNumber) {
if (buffer == null)
throw new ArgumentNullException(nameof(buffer));
Buffer = buffer;
VersionNumber = versionNumber;
ReiteratedVersionNumber = reiteratedVersionNumber;
}
开发者ID:manojdjoshi,项目名称:dnSpy,代码行数:7,代码来源:HexVersionImpl.cs
示例4: Create
public override HexBufferLineFormatter Create(HexBuffer buffer, HexBufferLineFormatterOptions options) {
if (buffer == null)
throw new ArgumentNullException(nameof(buffer));
if (options == null)
throw new ArgumentNullException(nameof(options));
return new HexBufferLineFormatterImpl(buffer, options);
}
开发者ID:0xd4d,项目名称:dnSpy,代码行数:7,代码来源:HexBufferLineFormatterFactoryServiceImpl.cs
示例5: MemoryVM
MemoryVM(ITheDebugger theDebugger, HexBufferFactoryService hexBufferFactoryService, HexBufferStreamFactoryService hexBufferStreamFactoryService) {
this.theDebugger = theDebugger;
this.hexBufferStreamFactoryService = hexBufferStreamFactoryService;
debuggerStream = new DebuggerHexBufferStream();
debuggerStream.UnderlyingStreamChanged += DebuggerStream_UnderlyingStreamChanged;
Buffer = hexBufferFactoryService.Create(debuggerStream, hexBufferFactoryService.DefaultMemoryTags, disposeStream: true);
theDebugger.OnProcessStateChanged += TheDebugger_OnProcessStateChanged;
InitializeHexStream();
}
开发者ID:0xd4d,项目名称:dnSpy,代码行数:9,代码来源:MemoryVM.cs
示例6: MetaDataTableNode
public MetaDataTableNode(HexBuffer buffer, MDTable mdTable, IMetaData md)
: base(HexSpan.FromBounds((ulong)mdTable.StartOffset, (ulong)mdTable.EndOffset)) {
Buffer = buffer;
TableInfo = mdTable.TableInfo;
var stringsHeapSpan = HexSpan.FromBounds((ulong)md.StringsStream.StartOffset, (ulong)md.StringsStream.EndOffset);
var guidHeapSpan = HexSpan.FromBounds((ulong)md.GuidStream.StartOffset, (ulong)md.GuidStream.EndOffset);
MetaDataTableVM = MetaDataTableVM.Create(this, buffer, Span.Start, mdTable, stringsHeapSpan, guidHeapSpan);
MetaDataTableVM.FindMetaDataTable = FindMetaDataTable;
}
开发者ID:0xd4d,项目名称:dnSpy,代码行数:9,代码来源:MetaDataTableNode.cs
示例7: MetaDataTableVM
protected MetaDataTableVM(object owner, HexBuffer buffer, HexPosition startOffset, MDTable mdTable, HexSpan stringsHeapSpan, HexSpan guidHeapSpan) {
this.buffer = buffer;
this.stringsHeapSpan = stringsHeapSpan;
this.guidHeapSpan = guidHeapSpan;
Owner = owner;
Span = new HexSpan(startOffset, (ulong)mdTable.Rows * mdTable.RowSize);
Rows = mdTable.Rows;
TableInfo = CreateTableInfo(mdTable.TableInfo);
Collection = new VirtualizedList<MetaDataTableRecordVM>((int)Rows, CreateItem);
}
开发者ID:0xd4d,项目名称:dnSpy,代码行数:10,代码来源:MetaDataTableVM.cs
示例8: StorageStreamNode
public StorageStreamNode(HexBuffer buffer, StreamHeader sh, int streamNumber, DotNetStream knownStream, IMetaData md)
: base(HexSpan.FromBounds((ulong)sh.StartOffset, (ulong)sh.EndOffset)) {
StreamNumber = streamNumber;
StorageStreamType = GetStorageStreamType(knownStream);
storageStreamVM = new StorageStreamVM(buffer, Span.Start, (int)(Span.Length - 8).ToUInt64());
var tblStream = knownStream as TablesStream;
if (tblStream != null)
newChild = new TablesStreamNode(buffer, tblStream, md);
}
开发者ID:0xd4d,项目名称:dnSpy,代码行数:10,代码来源:StorageStreamNode.cs
示例9: TablesStreamNode
public TablesStreamNode(HexBuffer buffer, TablesStream tblStream, IMetaData md)
: base(HexSpan.FromBounds((ulong)tblStream.StartOffset, (ulong)tblStream.MDTables[0].StartOffset)) {
tablesStreamVM = new TablesStreamVM(buffer, tblStream);
newChildren = new List<TreeNodeData>();
foreach (var mdTable in tblStream.MDTables) {
if (mdTable.Rows != 0)
newChildren.Add(new MetaDataTableNode(buffer, mdTable, md));
}
}
开发者ID:0xd4d,项目名称:dnSpy,代码行数:10,代码来源:TablesStreamNode.cs
示例10: ImageSectionHeaderVM
public ImageSectionHeaderVM(object owner, HexBuffer buffer, HexPosition startOffset)
: base(owner) {
NameVM = new StringHexField(buffer, Name, "Name", startOffset + 0, Encoding.UTF8, 8);
VirtualSizeVM = new UInt32HexField(buffer, Name, "VirtualSize", startOffset + 8);
VirtualAddressVM = new UInt32HexField(buffer, Name, "VirtualAddress", startOffset + 0x0C);
SizeOfRawDataVM = new UInt32HexField(buffer, Name, "SizeOfRawData", startOffset + 0x10);
PointerToRawDataVM = new UInt32HexField(buffer, Name, "PointerToRawData", startOffset + 0x14);
PointerToRelocationsVM = new UInt32HexField(buffer, Name, "PointerToRelocations", startOffset + 0x18);
PointerToLinenumbersVM = new UInt32HexField(buffer, Name, "PointerToLinenumbers", startOffset + 0x1C);
NumberOfRelocationsVM = new UInt16HexField(buffer, Name, "NumberOfRelocations", startOffset + 0x20);
NumberOfLinenumbersVM = new UInt16HexField(buffer, Name, "NumberOfLinenumbers", startOffset + 0x22);
CharacteristicsVM = new UInt32FlagsHexField(buffer, Name, "Characteristics", startOffset + 0x24);
CharacteristicsVM.Add(new BooleanHexBitField("TYPE_DSECT", 0));
CharacteristicsVM.Add(new BooleanHexBitField("TYPE_NOLOAD", 1));
CharacteristicsVM.Add(new BooleanHexBitField("TYPE_GROUP", 2));
CharacteristicsVM.Add(new BooleanHexBitField("TYPE_NO_PAD", 3));
CharacteristicsVM.Add(new BooleanHexBitField("TYPE_COPY", 4));
CharacteristicsVM.Add(new BooleanHexBitField("CNT_CODE", 5));
CharacteristicsVM.Add(new BooleanHexBitField("CNT_INITIALIZED_DATA", 6));
CharacteristicsVM.Add(new BooleanHexBitField("CNT_UNINITIALIZED_DATA", 7));
CharacteristicsVM.Add(new BooleanHexBitField("LNK_OTHER", 8));
CharacteristicsVM.Add(new BooleanHexBitField("LNK_INFO", 9));
CharacteristicsVM.Add(new BooleanHexBitField("TYPE_OVER", 10));
CharacteristicsVM.Add(new BooleanHexBitField("LNK_REMOVE", 11));
CharacteristicsVM.Add(new BooleanHexBitField("LNK_COMDAT", 12));
CharacteristicsVM.Add(new BooleanHexBitField("RESERVED", 13));
CharacteristicsVM.Add(new BooleanHexBitField("NO_DEFER_SPEC_EXC", 14));
CharacteristicsVM.Add(new BooleanHexBitField("GPREL", 15));
CharacteristicsVM.Add(new BooleanHexBitField("MEM_SYSHEAP", 16));
CharacteristicsVM.Add(new BooleanHexBitField("MEM_PURGEABLE", 17));
CharacteristicsVM.Add(new BooleanHexBitField("MEM_LOCKED", 18));
CharacteristicsVM.Add(new BooleanHexBitField("MEM_PRELOAD", 19));
CharacteristicsVM.Add(new IntegerHexBitField("Alignment", 20, 4, AlignInfos));
CharacteristicsVM.Add(new BooleanHexBitField("LNK_NRELOC_OVFL", 24));
CharacteristicsVM.Add(new BooleanHexBitField("MEM_DISCARDABLE", 25));
CharacteristicsVM.Add(new BooleanHexBitField("MEM_NOT_CACHED", 26));
CharacteristicsVM.Add(new BooleanHexBitField("MEM_NOT_PAGED", 27));
CharacteristicsVM.Add(new BooleanHexBitField("MEM_SHARED", 28));
CharacteristicsVM.Add(new BooleanHexBitField("MEM_EXECUTE", 29));
CharacteristicsVM.Add(new BooleanHexBitField("MEM_READ", 30));
CharacteristicsVM.Add(new BooleanHexBitField("MEM_WRITE", 31));
hexFields = new HexField[] {
NameVM,
VirtualSizeVM,
VirtualAddressVM,
SizeOfRawDataVM,
PointerToRawDataVM,
PointerToRelocationsVM,
PointerToLinenumbersVM,
NumberOfRelocationsVM,
NumberOfLinenumbersVM,
CharacteristicsVM,
};
}
开发者ID:manojdjoshi,项目名称:dnSpy,代码行数:55,代码来源:ImageSectionHeaderVM.cs
示例11: StorageStreamVM
public StorageStreamVM(HexBuffer buffer, HexPosition startOffset, int stringLen) {
IOffsetVM = new UInt32HexField(buffer, Name, "iOffset", startOffset + 0);
ISizeVM = new UInt32HexField(buffer, Name, "iSize", startOffset + 4);
RCNameVM = new StringHexField(buffer, Name, "rcName", startOffset + 8, Encoding.ASCII, stringLen);
hexFields = new HexField[] {
IOffsetVM,
ISizeVM,
RCNameVM,
};
}
开发者ID:0xd4d,项目名称:dnSpy,代码行数:11,代码来源:StorageStreamVM.cs
示例12: StorageHeaderVM
public StorageHeaderVM(HexBuffer buffer, HexPosition startOffset) {
FFlagsVM = new ByteFlagsHexField(buffer, Name, "fFlags", startOffset + 0);
FFlagsVM.Add(new BooleanHexBitField("ExtraData", 0));
PadVM = new ByteHexField(buffer, Name, "pad", startOffset + 1);
IStreamsVM = new UInt16HexField(buffer, Name, "iStreams", startOffset + 2);
hexFields = new HexField[] {
FFlagsVM,
PadVM,
IStreamsVM,
};
}
开发者ID:0xd4d,项目名称:dnSpy,代码行数:12,代码来源:StorageHeaderVM.cs
示例13: OnDocumentSaved
void OnDocumentSaved(HexBuffer buffer) {
lock (lockObj) {
object dictObj;
bool b = filenameToBuffer.TryGetValue(buffer.Name, out dictObj);
Debug.Assert(b);
if (!b)
return;
if (dictObj is WeakReference) {
Debug.Assert(((WeakReference)dictObj).Target == buffer);
return;
}
Debug.Assert(buffer == dictObj);
filenameToBuffer[buffer.Name] = new WeakReference(buffer);
}
}
开发者ID:manojdjoshi,项目名称:dnSpy,代码行数:15,代码来源:HexBufferService.cs
示例14: Create
public override WpfHexViewHost Create(HexBuffer buffer, string group, string subGroup, Guid? menuGuid) {
if (buffer == null)
throw new ArgumentNullException(nameof(buffer));
if (group == null)
throw new ArgumentNullException(nameof(group));
if (subGroup == null)
throw new ArgumentNullException(nameof(subGroup));
var roles = hexEditorFactoryService.CreateTextViewRoleSet(hexEditorFactoryService.DefaultRoles.Concat(new[] { group, subGroup }));
var options = new HexViewCreatorOptions {
MenuGuid = menuGuid,
};
var hexView = hexEditorFactoryService.Create(buffer, roles, options);
GetDefaultLocalOptions(hexView).WriteTo(hexView);
return hexEditorFactoryService.CreateHost(hexView, false);
}
开发者ID:manojdjoshi,项目名称:dnSpy,代码行数:16,代码来源:HexEditorGroupFactoryServiceImpl.cs
示例15: GetValidSpans
protected IEnumerable<HexSpan> GetValidSpans(HexBuffer buffer, HexPosition start, HexPosition upperBounds) {
var pos = start;
bool fullSpan = true;
while (pos < HexPosition.MaxEndPosition) {
var span = buffer.GetNextValidSpan(pos, upperBounds, fullSpan);
if (span == null)
break;
var newStart = HexPosition.Max(pos, span.Value.Start);
var newEnd = HexPosition.Min(upperBounds, span.Value.End);
if (newStart < newEnd)
yield return HexSpan.FromBounds(newStart, newEnd);
pos = span.Value.End;
fullSpan = false;
}
}
开发者ID:0xd4d,项目名称:dnSpy,代码行数:17,代码来源:HexSearchServiceImpl.cs
示例16: StorageSignatureVM
public StorageSignatureVM(HexBuffer buffer, HexPosition startOffset, int stringLen) {
LSignatureVM = new UInt32HexField(buffer, Name, "lSignature", startOffset + 0);
IMajorVerVM = new UInt16HexField(buffer, Name, "iMajorVer", startOffset + 4, true);
IMinorVerVM = new UInt16HexField(buffer, Name, "iMinorVer", startOffset + 6, true);
IExtraDataVM = new UInt32HexField(buffer, Name, "iExtraData", startOffset + 8);
IVersionStringVM = new UInt32HexField(buffer, Name, "iVersionString", startOffset + 0x0C);
VersionStringVM = new StringHexField(buffer, Name, "VersionString", startOffset + 0x10, Encoding.UTF8, stringLen);
hexFields = new HexField[] {
LSignatureVM,
IMajorVerVM,
IMinorVerVM,
IExtraDataVM,
IVersionStringVM,
VersionStringVM,
};
}
开发者ID:0xd4d,项目名称:dnSpy,代码行数:17,代码来源:StorageSignatureVM.cs
示例17: ImageOptionalHeader32VM
public ImageOptionalHeader32VM(HexBuffer buffer, HexPosition startOffset, HexPosition endOffset)
: base(buffer, startOffset, endOffset, 0x20, 0x58) {
BaseOfDataVM = new UInt32HexField(buffer, Name, "BaseOfData", startOffset + 0x18);
ImageBaseVM = new UInt32HexField(buffer, Name, "ImageBase", startOffset + 0x1C);
SizeOfStackReserveVM = new UInt32HexField(buffer, Name, "SizeOfStackReserve", startOffset + 0x48);
SizeOfStackCommitVM = new UInt32HexField(buffer, Name, "SizeOfStackCommit", startOffset + 0x4C);
SizeOfHeapReserveVM = new UInt32HexField(buffer, Name, "SizeOfHeapReserve", startOffset + 0x50);
SizeOfHeapCommitVM = new UInt32HexField(buffer, Name, "SizeOfHeapCommit", startOffset + 0x54);
var list = new List<HexField> {
MagicVM,
MajorLinkerVersionVM,
MinorLinkerVersionVM,
SizeOfCodeVM,
SizeOfInitializedDataVM,
SizeOfUninitializedDataVM,
AddressOfEntryPointVM,
BaseOfCodeVM,
BaseOfDataVM,
ImageBaseVM,
SectionAlignmentVM,
FileAlignmentVM,
MajorOperatingSystemVersionVM,
MinorOperatingSystemVersionVM,
MajorImageVersionVM,
MinorImageVersionVM,
MajorSubsystemVersionVM,
MinorSubsystemVersionVM,
Win32VersionValueVM,
SizeOfImageVM,
SizeOfHeadersVM,
CheckSumVM,
SubsystemVM,
DllCharacteristicsVM,
SizeOfStackReserveVM,
SizeOfStackCommitVM,
SizeOfHeapReserveVM,
SizeOfHeapCommitVM,
LoaderFlagsVM,
NumberOfRvaAndSizesVM,
};
AddDataDirs(list, endOffset);
}
开发者ID:0xd4d,项目名称:dnSpy,代码行数:45,代码来源:ImageOptionalHeader32VM.cs
示例18: ImageCor20HeaderVM
public ImageCor20HeaderVM(HexBuffer buffer, HexPosition startOffset) {
CbVM = new UInt32HexField(buffer, Name, "cb", startOffset + 0);
MajorRuntimeVersionVM = new UInt16HexField(buffer, Name, "MajorRuntimeVersion", startOffset + 4, true);
MinorRuntimeVersionVM = new UInt16HexField(buffer, Name, "MinorRuntimeVersion", startOffset + 6, true);
MetaDataVM = new DataDirVM(buffer, Name, "MetaData", startOffset + 8);
FlagsVM = new UInt32FlagsHexField(buffer, Name, "Flags", startOffset + 0x10);
FlagsVM.Add(new BooleanHexBitField(dnSpy_AsmEditor_Resources.HexNode_Cor20Header_Flags_IL_Only, 0));
FlagsVM.Add(new BooleanHexBitField(dnSpy_AsmEditor_Resources.HexNode_Cor20Header_Flags_32BitReqd, 1));
FlagsVM.Add(new BooleanHexBitField(dnSpy_AsmEditor_Resources.HexNode_Cor20Header_Flags_ILLibrary, 2));
FlagsVM.Add(new BooleanHexBitField(dnSpy_AsmEditor_Resources.HexNode_Cor20Header_Flags_StrongNameSigned, 3));
FlagsVM.Add(new BooleanHexBitField(dnSpy_AsmEditor_Resources.HexNode_Cor20Header_Flags_NativeEntryPoint, 4));
FlagsVM.Add(new BooleanHexBitField(dnSpy_AsmEditor_Resources.HexNode_Cor20Header_Flags_TrackDebugData, 16));
FlagsVM.Add(new BooleanHexBitField(dnSpy_AsmEditor_Resources.HexNode_Cor20Header_Flags_32BitPref, 17));
EntryPointTokenRVAVM = new UInt32HexField(buffer, Name, "EntryPoint Token/RVA", startOffset + 0x14);
ResourcesVM = new DataDirVM(buffer, Name, "Resources", startOffset + 0x18);
StrongNameSignatureVM = new DataDirVM(buffer, Name, "StrongNameSignature", startOffset + 0x20);
CodeManagerTableVM = new DataDirVM(buffer, Name, "CodeManagerTable", startOffset + 0x28);
VTableFixupsVM = new DataDirVM(buffer, Name, "VTableFixups", startOffset + 0x30);
ExportAddressTableJumpsVM = new DataDirVM(buffer, Name, "ExportAddressTableJumps", startOffset + 0x38);
ManagedNativeHeaderVM = new DataDirVM(buffer, Name, "ManagedNativeHeader", startOffset + 0x40);
hexFields = new HexField[] {
CbVM,
MajorRuntimeVersionVM,
MinorRuntimeVersionVM,
MetaDataVM.RVAVM,
MetaDataVM.SizeVM,
FlagsVM,
EntryPointTokenRVAVM,
ResourcesVM.RVAVM,
ResourcesVM.SizeVM,
StrongNameSignatureVM.RVAVM,
StrongNameSignatureVM.SizeVM,
CodeManagerTableVM.RVAVM,
CodeManagerTableVM.SizeVM,
VTableFixupsVM.RVAVM,
VTableFixupsVM.SizeVM,
ExportAddressTableJumpsVM.RVAVM,
ExportAddressTableJumpsVM.SizeVM,
ManagedNativeHeaderVM.RVAVM,
ManagedNativeHeaderVM.SizeVM,
};
}
开发者ID:0xd4d,项目名称:dnSpy,代码行数:43,代码来源:ImageCor20HeaderVM.cs
示例19: GetValidSpansReverse
protected IEnumerable<HexSpan> GetValidSpansReverse(HexBuffer buffer, HexPosition start, HexPosition lowerBounds) {
var pos = start;
bool fullSpan = true;
for (;;) {
var span = buffer.GetPreviousValidSpan(pos, lowerBounds, fullSpan);
if (span == null)
break;
var newStart = HexPosition.Max(lowerBounds, span.Value.Start);
var newEnd = HexPosition.Min(pos + 1, span.Value.End);
if (newStart < newEnd)
yield return HexSpan.FromBounds(newStart, newEnd);
if (span.Value.Start == 0)
break;
pos = span.Value.Start - 1;
fullSpan = false;
}
}
开发者ID:0xd4d,项目名称:dnSpy,代码行数:19,代码来源:HexSearchServiceImpl.cs
示例20: ImageOptionalHeaderVM
protected ImageOptionalHeaderVM(HexBuffer buffer, HexPosition startOffset, HexPosition endOffset, ulong offs1, ulong offs2) {
MagicVM = new UInt16HexField(buffer, Name, "Magic", startOffset + 0);
MajorLinkerVersionVM = new ByteHexField(buffer, Name, "MajorLinkerVersion", startOffset + 2, true);
MinorLinkerVersionVM = new ByteHexField(buffer, Name, "MinorLinkerVersion", startOffset + 3, true);
SizeOfCodeVM = new UInt32HexField(buffer, Name, "SizeOfCode", startOffset + 4);
SizeOfInitializedDataVM = new UInt32HexField(buffer, Name, "SizeOfInitializedData", startOffset + 8);
SizeOfUninitializedDataVM = new UInt32HexField(buffer, Name, "SizeOfUninitializedData", startOffset + 0x0C);
AddressOfEntryPointVM = new UInt32HexField(buffer, Name, "AddressOfEntryPoint", startOffset + 0x10);
BaseOfCodeVM = new UInt32HexField(buffer, Name, "BaseOfCode", startOffset + 0x14);
SectionAlignmentVM = new UInt32HexField(buffer, Name, "SectionAlignment", startOffset + offs1 + 0);
FileAlignmentVM = new UInt32HexField(buffer, Name, "FileAlignment", startOffset + offs1 + 4);
MajorOperatingSystemVersionVM = new UInt16HexField(buffer, Name, "MajorOperatingSystemVersion", startOffset + offs1 + 8, true);
MinorOperatingSystemVersionVM = new UInt16HexField(buffer, Name, "MinorOperatingSystemVersion", startOffset + offs1 + 0x0A, true);
MajorImageVersionVM = new UInt16HexField(buffer, Name, "MajorImageVersion", startOffset + offs1 + 0x0C, true);
MinorImageVersionVM = new UInt16HexField(buffer, Name, "MinorImageVersion", startOffset + offs1 + 0x0E, true);
MajorSubsystemVersionVM = new UInt16HexField(buffer, Name, "MajorSubsystemVersion", startOffset + offs1 + 0x10, true);
MinorSubsystemVersionVM = new UInt16HexField(buffer, Name, "MinorSubsystemVersion", startOffset + offs1 + 0x12, true);
Win32VersionValueVM = new UInt32HexField(buffer, Name, "Win32VersionValue", startOffset + offs1 + 0x14, true);
SizeOfImageVM = new UInt32HexField(buffer, Name, "SizeOfImage", startOffset + offs1 + 0x18);
SizeOfHeadersVM = new UInt32HexField(buffer, Name, "SizeOfHeaders", startOffset + offs1 + 0x1C);
CheckSumVM = new UInt32HexField(buffer, Name, "CheckSum", startOffset + offs1 + 0x20);
SubsystemVM = new UInt16FlagsHexField(buffer, Name, "Subsystem", startOffset + offs1 + 0x24);
SubsystemVM.Add(new IntegerHexBitField("Subsystem", 0, 16, SubsystemInfos));
DllCharacteristicsVM = new UInt16FlagsHexField(buffer, Name, "DllCharacteristics", startOffset + offs1 + 0x26);
DllCharacteristicsVM.Add(new BooleanHexBitField("Reserved1", 0));
DllCharacteristicsVM.Add(new BooleanHexBitField("Reserved2", 1));
DllCharacteristicsVM.Add(new BooleanHexBitField("Reserved3", 2));
DllCharacteristicsVM.Add(new BooleanHexBitField("Reserved4", 3));
DllCharacteristicsVM.Add(new BooleanHexBitField("Reserved5", 4));
DllCharacteristicsVM.Add(new BooleanHexBitField("High Entropy VA", 5));
DllCharacteristicsVM.Add(new BooleanHexBitField("Dynamic Base", 6));
DllCharacteristicsVM.Add(new BooleanHexBitField("Force Integrity", 7));
DllCharacteristicsVM.Add(new BooleanHexBitField("NX Compat", 8));
DllCharacteristicsVM.Add(new BooleanHexBitField("No Isolation", 9));
DllCharacteristicsVM.Add(new BooleanHexBitField("No SEH", 10));
DllCharacteristicsVM.Add(new BooleanHexBitField("No Bind", 11));
DllCharacteristicsVM.Add(new BooleanHexBitField("AppContainer", 12));
DllCharacteristicsVM.Add(new BooleanHexBitField("WDM Driver", 13));
DllCharacteristicsVM.Add(new BooleanHexBitField("Guard CF", 14));
DllCharacteristicsVM.Add(new BooleanHexBitField("Terminal Server Aware", 15));
LoaderFlagsVM = new UInt32HexField(buffer, Name, "LoaderFlags", startOffset + offs2 + 0);
NumberOfRvaAndSizesVM = new UInt32HexField(buffer, Name, "NumberOfRvaAndSizes", startOffset + offs2 + 4);
ulong doffs = offs2 + 8;
DataDir0VM = new DataDirVM(buffer, Name, "Export", startOffset + doffs + 0);
DataDir1VM = new DataDirVM(buffer, Name, "Import", startOffset + doffs + 8);
DataDir2VM = new DataDirVM(buffer, Name, "Resource", startOffset + doffs + 0x10);
DataDir3VM = new DataDirVM(buffer, Name, "Exception", startOffset + doffs + 0x18);
DataDir4VM = new DataDirVM(buffer, Name, "Security", startOffset + doffs + 0x20);
DataDir5VM = new DataDirVM(buffer, Name, "Base Reloc", startOffset + doffs + 0x28);
DataDir6VM = new DataDirVM(buffer, Name, "Debug", startOffset + doffs + 0x30);
DataDir7VM = new DataDirVM(buffer, Name, "Architecture", startOffset + doffs + 0x38);
DataDir8VM = new DataDirVM(buffer, Name, "Global Ptr", startOffset + doffs + 0x40);
DataDir9VM = new DataDirVM(buffer, Name, "TLS", startOffset + doffs + 0x48);
DataDir10VM = new DataDirVM(buffer, Name, "Load Config", startOffset + doffs + 0x50);
DataDir11VM = new DataDirVM(buffer, Name, "Bound Import", startOffset + doffs + 0x58);
DataDir12VM = new DataDirVM(buffer, Name, "IAT", startOffset + doffs + 0x60);
DataDir13VM = new DataDirVM(buffer, Name, "Delay Import", startOffset + doffs + 0x68);
DataDir14VM = new DataDirVM(buffer, Name, ".NET", startOffset + doffs + 0x70);
DataDir15VM = new DataDirVM(buffer, Name, "Reserved15", startOffset + doffs + 0x78);
}
开发者ID:0xd4d,项目名称:dnSpy,代码行数:62,代码来源:ImageOptionalHeaderVM.cs
注:本文中的dnSpy.Contracts.Hex.HexBuffer类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论