Package ghidra.app.util.bin.format.pe
Class BoundImportDescriptor
- java.lang.Object
-
- ghidra.app.util.bin.format.pe.BoundImportDescriptor
-
- All Implemented Interfaces:
ByteArrayConverter
,StructConverter
public class BoundImportDescriptor extends java.lang.Object implements StructConverter, ByteArrayConverter
A class to represent theIMAGE_BOUND_IMPORT_DESCRIPTOR
data structure defined inwinnt.h
.typedef struct _IMAGE_BOUND_IMPORT_DESCRIPTOR { DWORD TimeDateStamp; WORD OffsetModuleName; WORD NumberOfModuleForwarderRefs; // Array of zero or more IMAGE_BOUND_FORWARDER_REF follows } IMAGE_BOUND_IMPORT_DESCRIPTOR, *PIMAGE_BOUND_IMPORT_DESCRIPTOR;
-
-
Field Summary
Fields Modifier and Type Field Description static int
IMAGE_SIZEOF_BOUND_IMPORT_DESCRIPTOR
The size of theIMAGE_BOUND_IMPORT_DESCRIPTOR
in bytes.static java.lang.String
NAME
The name to use when converting into a structure data type.
-
Constructor Summary
Constructors Constructor Description BoundImportDescriptor()
DO NOT USE THIS CONSTRUCTOR, USE create*(GenericFactory ...) FACTORY METHODS INSTEAD.BoundImportDescriptor(java.lang.String name, int timeDateStamp)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BoundImportForwarderRef
getBoundImportForwarderRef(int index)
Returns the forwarder ref at the specified indexjava.lang.String
getModuleName()
Returns the module name of the imported DLL.short
getNumberOfModuleForwarderRefs()
Returns the number of IMAGE_BOUND_FORWARDER_REF structures that immediately follow this structure.short
getOffsetModuleName()
Returns an offset to a string with the name of the imported DLL.int
getTimeDateStamp()
Returns the time/data stamp of the imported DLL.byte[]
toBytes(DataConverter dc)
Returns a byte array representing this implementor of this interface.DataType
toDataType()
Returns a structure datatype representing the contents of the implementor of this interface.java.lang.String
toString()
-
-
-
Field Detail
-
NAME
public static final java.lang.String NAME
The name to use when converting into a structure data type.- See Also:
- Constant Field Values
-
IMAGE_SIZEOF_BOUND_IMPORT_DESCRIPTOR
public static final int IMAGE_SIZEOF_BOUND_IMPORT_DESCRIPTOR
The size of theIMAGE_BOUND_IMPORT_DESCRIPTOR
in bytes.- See Also:
- Constant Field Values
-
-
Method Detail
-
getTimeDateStamp
public int getTimeDateStamp()
Returns the time/data stamp of the imported DLL.- Returns:
- the time/data stamp of the imported DLL
-
getOffsetModuleName
public short getOffsetModuleName()
Returns an offset to a string with the name of the imported DLL.- Returns:
- an offset to a string with the name
-
getNumberOfModuleForwarderRefs
public short getNumberOfModuleForwarderRefs()
Returns the number of IMAGE_BOUND_FORWARDER_REF structures that immediately follow this structure.- Returns:
- the number of IMAGE_BOUND_FORWARDER_REF structures that immediately follow this structure
-
getModuleName
public java.lang.String getModuleName()
Returns the module name of the imported DLL.- Returns:
- the module name of the imported DLL
-
getBoundImportForwarderRef
public BoundImportForwarderRef getBoundImportForwarderRef(int index)
Returns the forwarder ref at the specified index- Parameters:
index
- the index of the forwarder ref- Returns:
- the forwarder ref at the specified index
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
- See Also:
Object.toString()
-
toDataType
public DataType toDataType() throws DuplicateNameException
Description copied from interface:StructConverter
Returns a structure datatype representing the contents of the implementor of this interface.For example, given:
class A { int foo; double bar; }
The return value should be a structure data type with two data type components; an INT and a DOUBLE. The structure should contain field names and, if possible, field comments.
- Specified by:
toDataType
in interfaceStructConverter
- Returns:
- returns a structure datatype representing the implementor of this interface
- Throws:
DuplicateNameException
- when a datatype of the same name already exists- See Also:
StructConverter.toDataType()
-
toBytes
public byte[] toBytes(DataConverter dc)
Description copied from interface:ByteArrayConverter
Returns a byte array representing this implementor of this interface.- Specified by:
toBytes
in interfaceByteArrayConverter
- Parameters:
dc
- the data converter to use- Returns:
- a byte array representing this object
- See Also:
ByteArrayConverter.toBytes(ghidra.util.DataConverter)
-
-