Hi @Parth Gupta,
You will need to parse each of the PROJECTINFORMATION
and PROJECTREFERENCES
records to get to the PROJECTMODULES
record in the dir
stream. It's not as hard as it may seem. Each of the variable size sub-records have most of their fields defined as constant sizes. The fields in the sub-records that variable are all determined by previously found size fields.
For example, in the PROJECTINFORMATION record, the:
NameRecord (variable): A PROJECTNAME Record (section 2.3.4.2.1.6).
has a variable ProjectName field that is defined like this:
ProjectName (variable): An array of SizeOfProjectName bytes that specifies the VBA identifier name for the VBA project. MUST contain MBCS characters encoded using the code page specified in PROJECTCODEPAGE (section 2.3.4.2.1.5). MUST NOT contain null characters.
You'll see that SizeOfProjectName is the previous field in that record. The other variable fields are the same.
So although a bit tedious, it is possible to parse your way past the PROJECTINFORMATION
and PROJECTREFERENCES
records.
Does that help?
Tom