Class VS_VERSION_CHILD
- java.lang.Object
-
- ghidra.app.util.bin.format.pe.resource.VS_VERSION_CHILD
-
- All Implemented Interfaces:
StructConverter
public class VS_VERSION_CHILD extends java.lang.Object implements StructConverter
A class to represent the VS_VERSION_CHILD data structure which generally corresponds to either StringFileInfo or VarFileInfo. Only a single instance of each childName is expected.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getChildName()
Returns the version child name.VS_VERSION_CHILD[]
getChildren()
Returns the array of childrenshort
getChildSize()
Returns the version child size.long
getNameRelativeOffset()
Return unicode name string offset relative to parent structure startlong
getRelativeOffset()
Return structure offset relative to parent structure startlong
getValueRelativeOffset()
Return value offset relative to parent structure start.boolean
hasChildren()
DataType
toDataType()
Returns a structure datatype representing the contents of the implementor of this interface.boolean
valueIsDWord()
boolean
valueIsUnicodeString()
-
-
-
Method Detail
-
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:
StructureDataType
-
getChildren
public VS_VERSION_CHILD[] getChildren()
Returns the array of children- Returns:
- the array of children
-
getRelativeOffset
public long getRelativeOffset()
Return structure offset relative to parent structure start- Returns:
- relative offset
-
getChildName
public java.lang.String getChildName()
Returns the version child name.- Returns:
- the version child name
-
getChildSize
public short getChildSize()
Returns the version child size.- Returns:
- the version child size
-
getValueRelativeOffset
public long getValueRelativeOffset()
Return value offset relative to parent structure start.- Returns:
- relative value offset or 0 if no value exists
-
getNameRelativeOffset
public long getNameRelativeOffset()
Return unicode name string offset relative to parent structure start- Returns:
- relative name offset or 0 if data type is unknown
-
valueIsUnicodeString
public boolean valueIsUnicodeString()
- Returns:
- true if value is unicode string
-
valueIsDWord
public boolean valueIsDWord()
- Returns:
- true if value is 4-byte integer value in memory
while string value return by
#getValue()
is a numeric hex string.
-
hasChildren
public boolean hasChildren()
- Returns:
- true if this child has children
-
-