Package ghidra.app.util.bin.format.pe
Class ResourceDataDirectory
java.lang.Object
ghidra.app.util.bin.format.pe.DataDirectory
ghidra.app.util.bin.format.pe.ResourceDataDirectory
- All Implemented Interfaces:
PeMarkupable
Points to the root resource directory.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intA flag indicating that a resources is a directory.static final intA flag indicating that a resources is a string.static final intThe size of a resource directory, in bytes.static final intThe size of a resource directory entry, in bytes.static final String[]A lookup table to obtain a string name for a resource type.static final byteAccelerator table.static final byteAnimated cursor resource.static final byteAnimated icon resource.static final byteBitmap resource.static final byte/** Hardware-dependent cursor resource.static final byteDialog box.static final bytestatic final byteFont resource.static final byteFont directory resource.static final byteHardware-independent cursor resource.static final byteHardware-independent icon resource.static final byteHTML resource.static final byteHardware-dependent icon resource.static final byteManifest resourcestatic final byteMenu resource.static final byteMessage-table entry.static final byteNot defined in documentation but PNGs and WAVs are both this typestatic final bytePlug and Play resource.static final byteApplication-defined resource (raw data).static final byteString-table entry.static final byteVersion resource.static final byteVXD resource.Fields inherited from class ghidra.app.util.bin.format.pe.DataDirectory
hasParsed, IMAGE_SIZEOF_IMAGE_DIRECTORY_ENTRY, ntHeader, reader, size, TITLE, virtualAddress -
Method Summary
Modifier and TypeMethodDescriptionstatic StringGets a program property name to represent PE resource property with the given key namevoidmarkup(Program program, boolean isBinary, TaskMonitor monitor, MessageLog log, NTHeader nt) Marks up a PE structure.booleanparse()Parses this data directory.toString()Methods inherited from class ghidra.app.util.bin.format.pe.DataDirectory
createDirectoryBookmark, createFragment, createTerminatedString, getPointer, getSize, getVirtualAddress, hasParsedCorrectly, processDataDirectory, setBookmark, setEolComment, setPlateComment, setPreComment, setSize, setVirtualAddress, va, validateSize, writeBytes
-
Field Details
-
IMAGE_SIZEOF_RESOURCE_DIRECTORY_ENTRY
public static final int IMAGE_SIZEOF_RESOURCE_DIRECTORY_ENTRYThe size of a resource directory entry, in bytes.- See Also:
-
IMAGE_SIZEOF_RESOURCE_DIRECTORY
public static final int IMAGE_SIZEOF_RESOURCE_DIRECTORYThe size of a resource directory, in bytes.- See Also:
-
IMAGE_RESOURCE_NAME_IS_STRING
public static final int IMAGE_RESOURCE_NAME_IS_STRINGA flag indicating that a resources is a string.- See Also:
-
IMAGE_RESOURCE_DATA_IS_DIRECTORY
public static final int IMAGE_RESOURCE_DATA_IS_DIRECTORYA flag indicating that a resources is a directory.- See Also:
-
PREDEFINED_RESOURCE_NAMES
A lookup table to obtain a string name for a resource type. -
RT_NOTDEFINED
public static final byte RT_NOTDEFINEDNot defined in documentation but PNGs and WAVs are both this type- See Also:
-
RT_CURSOR
public static final byte RT_CURSOR/** Hardware-dependent cursor resource.- See Also:
-
RT_BITMAP
public static final byte RT_BITMAPBitmap resource.- See Also:
-
RT_ICON
public static final byte RT_ICONHardware-dependent icon resource.- See Also:
-
RT_MENU
public static final byte RT_MENUMenu resource.- See Also:
-
RT_DIALOG
public static final byte RT_DIALOGDialog box.- See Also:
-
RT_STRING
public static final byte RT_STRINGString-table entry.- See Also:
-
RT_FONTDIR
public static final byte RT_FONTDIRFont directory resource.- See Also:
-
RT_FONT
public static final byte RT_FONTFont resource.- See Also:
-
RT_ACCELERATOR
public static final byte RT_ACCELERATORAccelerator table.- See Also:
-
RT_RCDATA
public static final byte RT_RCDATAApplication-defined resource (raw data).- See Also:
-
RT_MESSAGETABLE
public static final byte RT_MESSAGETABLEMessage-table entry.- See Also:
-
RT_GROUP_CURSOR
public static final byte RT_GROUP_CURSORHardware-independent cursor resource.- See Also:
-
RT_GROUP_ICON
public static final byte RT_GROUP_ICONHardware-independent icon resource.- See Also:
-
RT_VERSION
public static final byte RT_VERSIONVersion resource.- See Also:
-
RT_DLGINCLUDE
public static final byte RT_DLGINCLUDE- See Also:
-
RT_PLUGPLAY
public static final byte RT_PLUGPLAYPlug and Play resource.- See Also:
-
RT_VXD
public static final byte RT_VXDVXD resource.- See Also:
-
RT_ANICURSOR
public static final byte RT_ANICURSORAnimated cursor resource.- See Also:
-
RT_ANIICON
public static final byte RT_ANIICONAnimated icon resource.- See Also:
-
RT_HTML
public static final byte RT_HTMLHTML resource.- See Also:
-
RT_MANIFEST
public static final byte RT_MANIFESTManifest resource- See Also:
-
directoryMap
-
-
Method Details
-
getPeResourceProperty
Gets a program property name to represent PE resource property with the given key name- Parameters:
key- The key name- Returns:
- A program property name to represent PE resource property with the given key name
-
getRootDirectory
-
getDirectoryName
- Specified by:
getDirectoryNamein classDataDirectory
-
markup
public void markup(Program program, boolean isBinary, TaskMonitor monitor, MessageLog log, NTHeader nt) throws DuplicateNameException, CodeUnitInsertionException, IOException Description copied from interface:PeMarkupableMarks up a PE structure.- Parameters:
program- The program to markup.isBinary- True if the program is binary; otherwise, false.monitor- The monitor.log- The log.nt- The PE's NT Header structure.- Throws:
DuplicateNameExceptionCodeUnitInsertionExceptionIOException
-
parse
Description copied from class:DataDirectoryParses this data directory.- Specified by:
parsein classDataDirectory- Returns:
- True if parsing completed successfully; otherwise, false.
- Throws:
IOException- If there was an IO problem while parsing.
-
getResources
-
toString
- Overrides:
toStringin classDataDirectory- See Also:
-