Class ResourceDirectory
- java.lang.Object
-
- ghidra.app.util.bin.format.pe.resource.ResourceDirectory
-
- All Implemented Interfaces:
StructConverter
public class ResourceDirectory extends java.lang.Object implements StructConverter
typedef struct _IMAGE_RESOURCE_DIRECTORY { DWORD Characteristics; DWORD TimeDateStamp; WORD MajorVersion; WORD MinorVersion; WORD NumberOfNamedEntries; WORD NumberOfIdEntries; };
-
-
Constructor Summary
Constructors Constructor Description ResourceDirectory(FactoryBundledWithBinaryReader reader, int index, int resourceBase, boolean isFirstLevel, NTHeader ntHeader)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getCharacteristics()
Theoretically, this field could hold flags for the resource, but appears to always be 0.java.util.List<ResourceDirectoryEntry>
getEntries()
short
getMajorVersion()
Theoretically these fields would hold a version number for the resource.short
getMinorVersion()
Theoretically these fields would hold a version number for the resource.int
getNumberOfIdEntries()
Returns the number of array elements that use integer IDs, and which follow this structure.int
getNumberOfNamedEntries()
Returns the number of array elements that use names and that follow this structure.int
getTimeDataStamp()
Returns the time/date stamp describing the creation time of the resource.DataType
toDataType()
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
-
SIZEOF
public static final int SIZEOF
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ResourceDirectory
public ResourceDirectory(FactoryBundledWithBinaryReader reader, int index, int resourceBase, boolean isFirstLevel, NTHeader ntHeader) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
getEntries
public java.util.List<ResourceDirectoryEntry> getEntries()
-
getCharacteristics
public int getCharacteristics()
Theoretically, this field could hold flags for the resource, but appears to always be 0.- Returns:
- the flags for the resource
-
getTimeDataStamp
public int getTimeDataStamp()
Returns the time/date stamp describing the creation time of the resource.- Returns:
- the time/date stamp describing the creation time of the resource
-
getNumberOfNamedEntries
public int getNumberOfNamedEntries()
Returns the number of array elements that use names and that follow this structure.- Returns:
- the number of array elements that use names and that follow this structure
-
getNumberOfIdEntries
public int getNumberOfIdEntries()
Returns the number of array elements that use integer IDs, and which follow this structure.- Returns:
- the number of array elements that use integer IDs, and which follow this structure
-
getMajorVersion
public short getMajorVersion()
Theoretically these fields would hold a version number for the resource. These field appear to always be set to 0.- Returns:
- the major version number
-
getMinorVersion
public short getMinorVersion()
Theoretically these fields would hold a version number for the resource. These field appear to always be set to 0.- Returns:
- the minor version number
-
toDataType
public DataType toDataType() throws DuplicateNameException, java.io.IOException
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 existsjava.io.IOException
- See Also:
StructureDataType
-
-