Skip to content
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

Make VBA Tools->References Information available #838

Open
AndrewJLockhart opened this issue Feb 7, 2024 · 2 comments · May be fixed by #839
Open

Make VBA Tools->References Information available #838

AndrewJLockhart opened this issue Feb 7, 2024 · 2 comments · May be fixed by #839

Comments

@AndrewJLockhart
Copy link

I am writing a command line tool that uses olevba.py. And need to dump out the information about the Tools->References.
The current currently reads this but doesn't make it accessible.

@decalage2
Copy link
Owner

Indeed olevba parses references (in VBA_Project.__init__) but does not store and expose the data through the API. For now the only way to get it is to use the option -l debug on the command line, and to filter lines mentioning "reference". For example:

$ olevba order_details_68671777.doc -l debug|grep -i "reference"
DEBUG    reference type = 0016
DEBUG    REFERENCE name: stdole
DEBUG    reference type = 000D
DEBUG    REFERENCE registered lib id: *\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\Windows\system32\stdole2.tlb#OLE Automation
DEBUG    reference type = 0016
DEBUG    REFERENCE name: Normal
DEBUG    reference type = 000E
DEBUG    REFERENCE project lib id absolute: *\CNormal
DEBUG    REFERENCE project lib id relative: *\CNormal
DEBUG    reference type = 0016
DEBUG    REFERENCE name: Office
DEBUG    reference type = 000D
DEBUG    REFERENCE registered lib id: *\G{2DF8D04C-5BFA-101B-BDE5-00AA0044DE52}#2.0#0#C:\Program Files\Common Files\Microsoft Shared\OFFICE11\MSO.DLL#Microsoft Office 11.0 Object Library
DEBUG    reference type = 0016
DEBUG    REFERENCE name: MSForms
DEBUG    reference type = 0033
DEBUG    REFERENCE original lib id: *\G{0D452EE1-E08F-101A-852E-02608C4D0BB4}#2.0#0#C:\WINDOWS\system32\FM20.DLL#Microsoft Forms 2.0 Object Library
DEBUG    reference type = 002F
DEBUG    REFERENCE control twiddled lib id: *\G{00000000-0000-0000-0000-000000000000}#0.0#0##
DEBUG    reference type = 000F

It would be possible to make that data available to the API, but that requires some work.

Just out of curiosity, what is your tool going to do with those references?

@AndrewJLockhart
Copy link
Author

AndrewJLockhart commented Feb 8, 2024 via email

@AndrewJLockhart AndrewJLockhart linked a pull request Feb 9, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants