Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / [DBP+Matrix1] Stringtable generator for VC++ dlls

Author
Message
Robert The Robot
12
Years of Service
User Offline
Joined: 8th Jan 2007
Location: Fireball XL5
Posted: 11th Sep 2011 17:31 Edited at: 11th Sep 2011 17:32
Wasn't too sure which board to post this in, so apologies if it's in the wrong place!

If you use VC++ Express edition, you'll know that you can't generate string tables automatically (it's one of the "more advanced" features available in the expensive full version). If your DLL contains just a few exported functions then it won't be a problem, but the plugin I've been developing is weighing in at around 100 commands and still growing.

I've therefore written the following DBP program that scans C++ source code files for functions you're exporting and generates a resource file "StringTable.rc" that you can just include with your C++ project and have DBP immediately recognise all your commands.



Note that this code makes extensive use of IanM's Matrix1 Utility plugins. A compiled exe and associated files are available for download in the attachment. It's pretty straightforward to use:

How to use:
1) Open the folder where "String Table Generator.exe|" is located
2) Copy in to this folder all relevant C++ code files
3) Open the file "DecoratedNames.txt" (in this folder), and paste in the list of decorated names from the DLL
4) Run the EXE.
5) You can specify which ID number the string table list will start at - type an integer >= 0.
6) Wait for program to finish (may take a while - please be patient)
7) The program will produce a file "StringTable.rc" - include this with your C++ project and recompile.


Known issues:
1) Program does not recognise /* */ comment blocks - if you've commented out a function like this, you may still get a String Table entry.

2) The program will fail to recognise a C++ declaration typed like this:

It instead expects to find this at the top of the code

(where EXPORT can be any text string) and this as the function declaration:


We spend our lives chasing dreams. Dark Basic lets us catch some of them.

Attachments

Login to view attachments

Login to post a reply

Server time is: 2019-10-16 22:54:58
Your offset time is: 2019-10-16 22:54:58