It is currently Thu Jun 20, 2013 4:46 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 28 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: TypeLib Explorer [Windows COM Stuff]
PostPosted: Sat Jul 31, 2010 12:57 pm 
Offline
User
User

Joined: Thu Aug 21, 2008 4:19 pm
Posts: 39
Location: Belgium
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/TypeLib%20Explorer.exe

Have fun.
[edit title by Rings]

_________________
http://www.RE-Applications.be


Last edited by RE-A on Sun Aug 01, 2010 5:47 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: TypeLib Explorer
PostPosted: Sat Jul 31, 2010 7:04 pm 
Offline
PureBasic Bullfrog
PureBasic Bullfrog
User avatar

Joined: Wed Jul 06, 2005 5:42 am
Posts: 6466
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.

_________________
Veni, vidi, vici.


Top
 Profile  
 
 Post subject: Re: TypeLib Explorer
PostPosted: Sat Jul 31, 2010 8:04 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat Feb 13, 2010 3:45 pm
Posts: 246
@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.

_________________
sorry for my bad english


Top
 Profile  
 
 Post subject: Re: TypeLib Explorer
PostPosted: Sat Jul 31, 2010 10:03 pm 
Offline
User
User

Joined: Thu Aug 21, 2008 4:19 pm
Posts: 39
Location: Belgium
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 :wink:

_________________
http://www.RE-Applications.be


Top
 Profile  
 
 Post subject: Re: TypeLib Explorer
PostPosted: Sat Jul 31, 2010 10:20 pm 
Offline
PureBasic Bullfrog
PureBasic Bullfrog
User avatar

Joined: Wed Jul 06, 2005 5:42 am
Posts: 6466
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.

_________________
Veni, vidi, vici.


Top
 Profile  
 
 Post subject: Re: TypeLib Explorer
PostPosted: Sat Jul 31, 2010 10:37 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat Feb 13, 2010 3:45 pm
Posts: 246
RE-A wrote:
Josh, I know, some generated source could be very big so just take what you need :wink:

maybe i'm wrong, but i don't see any possibility, dispinterfaces are needed. compare this interface and dispinterface:

Code:
   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.

_________________
sorry for my bad english


Top
 Profile  
 
 Post subject: Re: TypeLib Explorer
PostPosted: Sun Aug 01, 2010 6:29 am 
Offline
User
User

Joined: Thu Aug 21, 2008 4:19 pm
Posts: 39
Location: Belgium
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 8)

Josh, I give it a look.

_________________
http://www.RE-Applications.be


Top
 Profile  
 
 Post subject: Re: TypeLib Explorer
PostPosted: Sun Aug 01, 2010 8:59 am 
Offline
User
User

Joined: Thu Aug 21, 2008 4:19 pm
Posts: 39
Location: Belgium
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

_________________
http://www.RE-Applications.be


Top
 Profile  
 
 Post subject: Re: TypeLib Explorer
PostPosted: Sun Aug 01, 2010 4:14 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Tue Mar 02, 2004 1:20 pm
Posts: 684
Location: Cologne / Germany
@RE-A: Thanks a lot for this useful tool! Image

Greetings ... Kiffi

_________________
Sorry for my weird english


Top
 Profile  
 
 Post subject: Re: TypeLib Explorer
PostPosted: Sun Aug 01, 2010 4:31 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Wed Oct 29, 2003 4:35 pm
Posts: 9859
Location: Beyond the pale...
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 may look like a mule, but I'm not a complete ass.

eScript
Arctic Reports
nxSoftware


Top
 Profile  
 
 Post subject: Re: TypeLib Explorer
PostPosted: Sun Aug 01, 2010 4:45 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Tue Mar 02, 2004 1:20 pm
Posts: 684
Location: Cologne / Germany
TLBINF32.DLL, not TBLINF32.DLL

TLB stands for TypeLiB.

srod wrote:
Okay, where can I get a copy of TBLINF32.DLL ? :)

i guess in your System32-Folder. ;-)

Greetings ... Kiffi

_________________
Sorry for my weird english


Top
 Profile  
 
 Post subject: Re: TypeLib Explorer
PostPosted: Sun Aug 01, 2010 5:06 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Wed Oct 29, 2003 4:35 pm
Posts: 9859
Location: Beyond the pale...
Yes, just a typo.

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.

eScript
Arctic Reports
nxSoftware


Top
 Profile  
 
 Post subject: Re: TypeLib Explorer
PostPosted: Sun Aug 01, 2010 6:34 pm 
Offline
User
User

Joined: Thu Aug 21, 2008 4:19 pm
Posts: 39
Location: Belgium
srod, this dll it part of VB6.... I know you definitely don't want to install that :D but you can find it on the net, just google for it.

_________________
http://www.RE-Applications.be


Top
 Profile  
 
 Post subject: Re: TypeLib Explorer
PostPosted: Sun Aug 01, 2010 7:43 pm 
Offline
User
User

Joined: Thu Aug 21, 2008 4:19 pm
Posts: 39
Location: Belgium
Minor change, all referenced interfaces that does not exist in the typelib are changed to IUnknown.

_________________
http://www.RE-Applications.be


Top
 Profile  
 
 Post subject: Re: TypeLib Explorer
PostPosted: Sun Aug 01, 2010 7:58 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Wed Oct 29, 2003 4:35 pm
Posts: 9859
Location: Beyond the pale...
RE-A wrote:
srod, this dll it part of VB6.... I know you definitely don't want to install that :D 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! :)

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

eScript
Arctic Reports
nxSoftware


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 28 posts ]  Go to page 1, 2  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye