Here is a small utility i wrote that allows you to edit the api files that come with the API Viewer 2004.
The APIViewer2004 is a nice upgrade from MS's old api viewer made by Christoph Von Wittich, but both are getting long in the tooth. I still use APIViewer2004 to this day but it hasnt been updated since 2008 (that i know of). Many new api calls, constants, enums, and types have been added to the Win32 API since that time. However, the APIViewer2004 has no ability to edit or add to the existing file databases. I decided to write this small utility to be able to add functions, types, consts, and enums to the existing APIViewer2004 files. So i sat down and reverse-engineered that database format and cobbled together this little utility. It only uses Intrinsic VB controls and could use some help on the GUI design. But as this was intended originally just for my own use so i wasnt that worried about the looks. I thought others might find it useful so i went through, tidied up the code a bit and decided to release it. After figuring out the database format, i think i will come up with a better database format and perhaps a new Add-In unless someone else beats me to it, it is not high on the list of priorities but i may do it sometime.
What this code can help you with:
1. Show how to load and save the api databases
2. Add more API calls to your own api viewer
3. how not to design a GUI
If any bugs are found, improvements made etc, i would appreciate a heads up! enjoy...
Last edited by vbLewis; Feb 26th, 2018 at 10:24 AM.
Reason: credit,screenshot
would be good if there was someway to link to a community database file that everyone could add functions etc then the ability to grab any new updates and import to the local database.
would be good if there was someway to link to a community database file that everyone could add functions etc then the ability to grab any new updates and import to the local database.
k_zeon,
I like that idea. One possibility would be to have a repository on github, with a 'master' file. then if someone would want to add api calls they could just do a merge request to get them added to the main file. The program could then just update its database from github every so often.
Nice job and thanks for sharing.
I noticed that only the first few contstants show a value when clicked.
In your DisplayDatabase function, I added debug.print lstFields.Listcount.
For Contants, I got -12603.
Running the ApiGuide app it shows Constants count as 52933.
Nice job and thanks for sharing.
I noticed that only the first few contstants show a value when clicked.
In your DisplayDatabase function, I added debug.print lstFields.Listcount.
For Contants, I got -12603.
Running the ApiGuide app it shows Constants count as 52933.
Yes, it is a listbox limitation. (32767 items) If you look under 'Case 2' in the DisplayDatabase function you can see a note in the comments. I will probably update the app to use krool's excellent listbox once i get some more time and decide what direction i want to go with it. Thanks for checking it out!
Ive decided i will make a new Addin, with a new UI and a new database format, with the ability to import the old databases.
Some new functionality that ive thought about adding, that are missing or limited in the old version:
1. Complete relationship between all types to allow including any needed extra datatypes for a selected function or type. (the old one has this in limited form)
2. include information that allows for filtering by Minimum-OS, Maximum-OS (if deprecated), dll or lib, aliases, subs or function...
3. ability to insert all selected items into a selected bas, frm, or cls automatically, or create a new one.
4. Ability to search a folder and sub folders for files and parse all api related info, and after inspection add to database.
5. ability to to define constants other than long or string.
6. Perhaps include example code samples for api calls, as hinted by gibra.
7. as k_zeon suggested , the ability to submit new data and also to update from the web would be nice.
8. I would really like the ability to scrape MSDN win32 API site and also have links to each related item.
9. The database would have fixed length fields (for quick seeking and access) and remain open while the program is loaded. This would allow for keeping most of the data on disk instead of in memory as i suspect it could get quit large... would have to do tests on speed.
10. ability to give shoulder rubs and foot massages to tired programmers...
VBLewis
sounds a great addin. looking forward to it. I use the Win32 API quite a bit and sometimes the APIviewer2004 does not contain what i need. so have to spend time searching the internet for API declares etc. would be really great to be able to upload & Import API's to a local DB.
Ive decided i will make a new Addin, with a new UI and a new database format, with the ability to import the old databases.
Some new functionality that ive thought about adding, that are missing or limited in the old version:
1. Complete relationship between all types to allow including any needed extra datatypes for a selected function or type. (the old one has this in limited form)
2. include information that allows for filtering by Minimum-OS, Maximum-OS (if deprecated), dll or lib, aliases, subs or function...
3. ability to insert all selected items into a selected bas, frm, or cls automatically, or create a new one.
4. Ability to search a folder and sub folders for files and parse all api related info, and after inspection add to database.
5. ability to to define constants other than long or string.
6. Perhaps include example code samples for api calls, as hinted by gibra.
7. as k_zeon suggested , the ability to submit new data and also to update from the web would be nice.
8. I would really like the ability to scrape MSDN win32 API site and also have links to each related item.
9. The database would have fixed length fields (for quick seeking and access) and remain open while the program is loaded. This would allow for keeping most of the data on disk instead of in memory as i suspect it could get quit large... would have to do tests on speed.
10. ability to give shoulder rubs and foot massages to tired programmers...
any more ideas?
IMHO, there are two options to choose from:
(1) AccessDB + Krool's CommonControls or LaVolpe's controls or The trick's controls