Page 1 of 2
TypeLib Explorer [Windows COM Stuff]
Posted: Sat Jul 31, 2010 12:57 pm
by RE-A
When I was using the other well-known PB compiler on the net, it had a nice tool created by someone from that community, that was able to enumerated all typelibs available on your system, included with all guids, progids, events, enumeration, structures, interfaces, comments, property names, types, ect….
If you program a lot of COM then this is (I hope) a good reference and code generator tool.
Make sure that you have an administrator account and that the TBLINF32.DLL is installed on your system.
Most of the generated code will compile fine but it is possible that some errors occur about the order of the interfaces or double creation of enumeration fields.
Maybe the next version could include procedures and some event handling routines.
Tested on Vista and WinXP (32 bit)
Download:
http://www.re-applications.be/downloads ... plorer.exe
Have fun.
[edit title by Rings]
Re: TypeLib Explorer
Posted: Sat Jul 31, 2010 7:04 pm
by netmaestro
Thanks for sharing, looks like it might be very useful. However, when I select one of the controls and press 'Create PB Code' the item becomes unselected and nothing happens. No code gets generated.
Re: TypeLib Explorer
Posted: Sat Jul 31, 2010 8:04 pm
by Josh
@netmaestro
i have no problems. works fine
@RE-A
thxs, looks very nice
what i see at my first quickcheck:
you create interfacecodes for interfaces and dispinterfaces. if i'm writing a application using earl binding, i need only the interfaces, but no dispinterfaces. so i think, you can reduce the generated code nearly to the half.
Re: TypeLib Explorer
Posted: Sat Jul 31, 2010 10:03 pm
by RE-A
netmaestro, I already made a minor bug fix so get the latest version (V1.1)
If that doesn't work, can you tell me what control it is?
Some of them take some time to process
Josh, I know, some generated source could be very big so just take what you need

Re: TypeLib Explorer
Posted: Sat Jul 31, 2010 10:20 pm
by netmaestro
It's all the controls. If I select one and press the Create button it unselects the item and nothing happens. I waited a minute or two but no code appears. I'm using Windows 7.
Re: TypeLib Explorer
Posted: Sat Jul 31, 2010 10:37 pm
by Josh
RE-A wrote:Josh, I know, some generated source could be very big so just take what you need

maybe i'm wrong, but i don't see any possibility, dispinterfaces are needed. compare this interface and dispinterface:
Code: Select all
Interface ExcelIVPageBreak Extends IDispatch
get_Application(a)
; a BYREF RHS INTEGER coclass Application
get_Creator(a)
; a BYREF RHS INTEGER enum XlCreator
get_Parent(a)
; a BYREF RHS INTEGER coclass Worksheet
Delete()
DragOff(a, b)
; a BYVAL Direction INTEGER enum XlDirection
; b BYVAL RegionIndex LONG (#VT_I4)
get_Type(a)
; a BYREF RHS INTEGER enum XlPageBreak
put_Type(a)
; a BYVAL RHS INTEGER enum XlPageBreak
get_Extent(a)
; a BYREF RHS INTEGER enum XlPageBreakExtent
get_Location(a)
; a BYREF RHS INTEGER dispinterface ExcelRange
putref_Location(a)
; a BYREF RHS INTEGER dispinterface ExcelRange
EndInterface
Interface ExcelVPageBreak Extends IDispatch
get_Application()
get_Creator()
get_Parent()
Delete()
DragOff(a, b)
;a [IN] BYVAL Direction INTEGER enum XlDirection
;b [IN] BYVAL RegionIndex LONG (#VT_I4)
get_Type()
put_Type()
get_Extent()
get_Location()
putref_Location()
EndInterface
i know, if the code for dispinterfaces is included, it's no difference for the exe. but when i'm looking at the generated code from excel, i have 35k lines and it can be confusing to find the correct interface. it's not guaranteed, that each interface has an "I" as prefix.
Re: TypeLib Explorer
Posted: Sun Aug 01, 2010 6:29 am
by RE-A
Could be a Win7 issue, I couldn't test it on a Win7 or 64 bit system because the only one have isn't available and I hope I won't get it soon... it’s paying itself back, running as a backup server with a customer
Josh, I give it a look.
Re: TypeLib Explorer
Posted: Sun Aug 01, 2010 8:59 am
by RE-A
Josh, to make a difference between an interface and a dispinterface I made a change in the interface header comment block.
Example:
; --------------------------------------------------------------------------------------------
; NAME: VPageBreak
; GUID: {00024402-0000-0000-C000-000000000046}
; TYPE: DISPINTERFACE
; --------------------------------------------------------------------------------------------
That should do it for now, a selection or option window could be useful, maybe when I find more time.
New version: 1.2
Re: TypeLib Explorer
Posted: Sun Aug 01, 2010 4:14 pm
by Kiffi
@RE-A: Thanks a lot for this useful tool!
Greetings ... Kiffi
Re: TypeLib Explorer
Posted: Sun Aug 01, 2010 4:31 pm
by srod
Okay, where can I get a copy of TBLINF32.DLL ?
I don't want to install VS.NET just to get my hands on this dll.
Re: TypeLib Explorer
Posted: Sun Aug 01, 2010 4:45 pm
by Kiffi
TLBINF32.DLL, not TBLINF32.DLL
TLB stands for
Type
Li
B.
srod wrote:Okay, where can I get a copy of TBLINF32.DLL ?

i guess in your System32-Folder.
Greetings ... Kiffi
Re: TypeLib Explorer
Posted: Sun Aug 01, 2010 5:06 pm
by srod
Yes, just a typo.
Right, I'll have a rummage around.
**EDIT : have searched the whole drive and I do not possess that dll.
Re: TypeLib Explorer
Posted: Sun Aug 01, 2010 6:34 pm
by RE-A
srod, this dll it part of VB6.... I know you definitely don't want to install that

but you can find it on the net, just google for it.
Re: TypeLib Explorer
Posted: Sun Aug 01, 2010 7:43 pm
by RE-A
Minor change, all referenced interfaces that does not exist in the typelib are changed to IUnknown.
Re: TypeLib Explorer
Posted: Sun Aug 01, 2010 7:58 pm
by srod
RE-A wrote:srod, this dll it part of VB6.... I know you definitely don't want to install that

but you can find it on the net, just google for it.
Yes I have done, but can find no 'reputable' looking site offering this dll. I am not about to download what purports to being tlbinf32.dll from some dodgy looking site - no sir!
