Class 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 Detail

      • ResourceDirectory

        public ResourceDirectory​(FactoryBundledWithBinaryReader reader,
                                 int index,
                                 int resourceBase,
                                 boolean isFirstLevel,
                                 NTHeader ntHeader)
                          throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • 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 interface StructConverter
        Returns:
        returns a structure datatype representing the implementor of this interface
        Throws:
        DuplicateNameException - when a datatype of the same name already exists
        java.io.IOException
        See Also:
        StructureDataType