PEHeaders.TryGetDirectoryOffset(DirectoryEntry, Int32) 方法

定义

获取从映像开头到给定目录数据的偏移量(以字节为单位)。Gets the offset (in bytes) from the start of the image to the given directory data.

public:
 bool TryGetDirectoryOffset(System::Reflection::PortableExecutable::DirectoryEntry directory, [Runtime::InteropServices::Out] int % offset);
public bool TryGetDirectoryOffset (System.Reflection.PortableExecutable.DirectoryEntry directory, out int offset);
member this.TryGetDirectoryOffset : System.Reflection.PortableExecutable.DirectoryEntry * int -> bool
Public Function TryGetDirectoryOffset (directory As DirectoryEntry, ByRef offset As Integer) As Boolean

参数

directory
DirectoryEntry

PE 目录项。The PE directory entry.

offset
Int32

方法返回时,包含从映像开头到给定目录数据的偏移量。When the method returns, contains the offset from the start of the image to the given directory data.

返回

Boolean

如果找到目录数据,则为 true;否则为 falsetrue if the directory data is found; false otherwise.

适用于