Class BoundImportDescriptor

java.lang.Object
ghidra.app.util.bin.format.pe.BoundImportDescriptor
All Implemented Interfaces:
ByteArrayConverter, StructConverter

public class BoundImportDescriptor extends Object implements StructConverter, ByteArrayConverter
A class to represent the IMAGE_BOUND_IMPORT_DESCRIPTOR data structure defined in winnt.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 Details

    • NAME

      public static final String NAME
      The name to use when converting into a structure data type.
      See Also:
    • IMAGE_SIZEOF_BOUND_IMPORT_DESCRIPTOR

      public static final int IMAGE_SIZEOF_BOUND_IMPORT_DESCRIPTOR
      The size of the IMAGE_BOUND_IMPORT_DESCRIPTOR in bytes.
      See Also:
  • Constructor Details

    • BoundImportDescriptor

      public BoundImportDescriptor(String name, int timeDateStamp)
  • Method Details

    • 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 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 String toString()
      Overrides:
      toString in class Object
      See Also:
    • 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 interface StructConverter
      Returns:
      returns a structure datatype representing the implementor of this interface
      Throws:
      DuplicateNameException - when a datatype of the same name already exists
      See Also:
    • 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 interface ByteArrayConverter
      Parameters:
      dc - the data converter to use
      Returns:
      a byte array representing this object
      See Also: