TypeLib Explorer [Windows COM Stuff]
TypeLib Explorer [Windows COM Stuff]
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]
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]
Last edited by RE-A on Sun Aug 01, 2010 5:47 am, edited 1 time in total.
- netmaestro
- PureBasic Bullfrog
- Posts: 8451
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
Re: TypeLib Explorer
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.
BERESHEIT
Re: TypeLib Explorer
@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.
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.
sorry for my bad english
Re: TypeLib Explorer
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
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

- netmaestro
- PureBasic Bullfrog
- Posts: 8451
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
Re: TypeLib Explorer
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.
BERESHEIT
Re: TypeLib Explorer
maybe i'm wrong, but i don't see any possibility, dispinterfaces are needed. compare this interface and dispinterface:RE-A wrote:Josh, I know, some generated source could be very big so just take what you need
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
sorry for my bad english
Re: TypeLib Explorer
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.

Josh, I give it a look.
Re: TypeLib Explorer
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
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
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.

I don't want to install VS.NET just to get my hands on this dll.
I may look like a mule, but I'm not a complete ass.
Re: TypeLib Explorer
TLBINF32.DLL, not TBLINF32.DLL
TLB stands for TypeLiB.

Greetings ... Kiffi
TLB stands for TypeLiB.
i guess in your System32-Folder.srod wrote:Okay, where can I get a copy of TBLINF32.DLL ?

Greetings ... Kiffi
Hygge
Re: TypeLib Explorer
Yes, just a typo.
Right, I'll have a rummage around.
**EDIT : have searched the whole drive and I do not possess that dll.
Right, I'll have a rummage around.

**EDIT : have searched the whole drive and I do not possess that dll.
I may look like a mule, but I'm not a complete ass.
Re: TypeLib Explorer
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
Minor change, all referenced interfaces that does not exist in the typelib are changed to IUnknown.
Re: TypeLib Explorer
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!RE-A wrote:srod, this dll it part of VB6.... I know you definitely don't want to install thatbut you can find it on the net, just google for it.

I may look like a mule, but I'm not a complete ass.