Generate include files for Windows constants

The included program allows the generation of include files containing pre-processor definition for all of the constants within any type library. Type libraries may either be specific type library files (.olb,.tlb) or can be contained within .exe,.dll or .ocx files.
I typically need to know constants when working with COM or ActiveX objects in the 4GL. Often, the documentation for such objects refers to various property values by the name of the constant. This is because most documentation is geared towards development environments where the constant values will automatically be made available to the developer. Such is not the case for Progress.
If you're working with Excel, you will often record a macro to see what the VBA code looks like that performed some action. For example; you change a chart type and record this as a macro. The VBA will contain a line like "ActiveChart.ChartType = xl3DColumnClustered". This is easy enough to translate into Progress except we now have to look up the value of xl3DColumnClustered. If you have an include file that includes these definitions, your Progress code can look something like
ActiveChart:ChartType = {&xl3DColumnClustered}.
There are already collections of these values here on this site in the form of winconst.i. While this works great, it may not be up to date and it only contains the constants for common Microsoft applications.
The attached Progress program depends upon a Microsoft dll, TLBINF32.DLL. This dll is installed automatically by many MS development tools so you may already have it. If not, I've included it as it's freely distributable. It will need to be registered on your PC using regsvr32.
This dll has many more capabilities than are utilized by this Progress example. It could certainly be used to create a new, customizable, COM Object viewer to replace the one provided by Progress. I'll leave that to more enterprising souls than I. Documentation for this dll is available on MSDN.



AttachmentSize
TypeLibrary.zip61.87 KB