-
Notifications
You must be signed in to change notification settings - Fork 587
Expose References via VBA Parser object #839
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
|
||
| if check == 0x0016: | ||
| # REFERENCENAME | ||
| REFERENCENAME = "REFERENCENAME" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed the comments to constants because further down I didn't want to duplicate a string. But does have the side effect of changing the log output slightly. Is this OK?
| referenceregistered_sizeof_libid = struct.unpack("<L", dir_stream.read(4))[0] | ||
| referenceregistered_libid = dir_stream.read(referenceregistered_sizeof_libid) | ||
| log.debug('REFERENCE registered lib id: %s' % unicode2str(self.decode_bytes(referenceregistered_libid))) | ||
| referenceregistered_libid = unicode2str(self.decode_bytes(dir_stream.read(referenceregistered_sizeof_libid))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only wanted to call the decode once. Result is used in the log and also sent to the references list
| unused = referenceproject_id | ||
| unused = referenceproject_size | ||
| unused = referenceproject_libidabsolute | ||
| unused = referenceproject_libidrelative |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I think I need to leave the assignment unused = referenceproject_libidrelative because it isn't being used anywhere else.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Appreciate comments on approach before I go further and add test cases.
| referencecontrol_sizetwiddled = struct.unpack("<L", dir_stream.read(4))[0] # ignore | ||
| referencecontrol_sizeof_libidtwiddled = struct.unpack("<L", dir_stream.read(4))[0] | ||
| referencecontrol_libidtwiddled = dir_stream.read(referencecontrol_sizeof_libidtwiddled) | ||
| log.debug('REFERENCE control twiddled lib id: %s' % unicode2str(self.decode_bytes(referencecontrol_libidtwiddled))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still can't find an example of a twiddled library
Closes #838