Package ghidra.app.util.bin.format.pe
Class ImportByName
- java.lang.Object
-
- ghidra.app.util.bin.format.pe.ImportByName
-
- All Implemented Interfaces:
ByteArrayConverter,StructConverter
public class ImportByName extends java.lang.Object implements StructConverter, ByteArrayConverter
A class to represent theIMAGE_IMPORT_BY_NAMEdata structure defined inwinnt.h.typedef struct _IMAGE_IMPORT_BY_NAME { WORD Hint; BYTE Name[1]; };
-
-
Constructor Summary
Constructors Constructor Description ImportByName()DO NOT USE THIS CONSTRUCTOR, USE create*(GenericFactory ...) FACTORY METHODS INSTEAD.ImportByName(short hint, java.lang.String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description shortgetHint()java.lang.StringgetName()Returns an ASCIIZ string with the name of the imported function.intgetSizeOf()Returns the actual number of bytes consumed by this structure in memory.byte[]toBytes(DataConverter dc)Returns a byte array representing this implementor of this interface.DataTypetoDataType()Returns a structure datatype representing the contents of the implementor of this interface.
-
-
-
Field Detail
-
NAME
public static final java.lang.String NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getHint
public short getHint()
- Returns:
- the export ordinal for the imported function
-
getName
public java.lang.String getName()
Returns an ASCIIZ string with the name of the imported function.- Returns:
- an ASCIIZ string with the name of the imported function
-
toDataType
public DataType toDataType() throws DuplicateNameException
Description copied from interface:StructConverterReturns 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:
toDataTypein 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:ByteArrayConverterReturns a byte array representing this implementor of this interface.- Specified by:
toBytesin interfaceByteArrayConverter- Parameters:
dc- the data converter to use- Returns:
- a byte array representing this object
- See Also:
ByteArrayConverter.toBytes(ghidra.util.DataConverter)
-
getSizeOf
public int getSizeOf()
Returns the actual number of bytes consumed by this structure in memory.- Returns:
- the actual number of bytes consumed by this structure in memory
-
-