Stevie
(Starting to like KiXtart)
2002-06-03 06:54 PM
Type Library Viewer for Kix?

Hi all,

Following in the spirit of my last post I'm posing a question: Could the kix community make use of a stand-alone type library viewer? If so, and if there's nothing else out there that people are using, then I was thinking of writing one.

For those of you not sure what that is, a type library viewer looks into DLL, EXE, and TLB files and extracts information on the objects, methods, properties and events contained within it. It basically would provide the same functionality as the "Object Browser" in Visual Studio, but as a stand-alone app.

From my perspective something like this would be pretty useful so that people writing scripts wouldn't have to refer to MSDN or other on-line sites for basic syntax information or to recall the name of a method you just can't quite remember.

Anyway, if there's already one out there then please let me know where to get it and I'll use it. Otherwise, I'll go ahead and write one.

Thanks.

Steve B


Chris S.
(MM club member)
2002-06-03 07:01 PM
Re: Type Library Viewer for Kix?

Here's a stand-alone that I've used:

http://www.allapi.net/agnet/apiguide.shtml

Includes info, parameters, and VB samples.


ShawnAdministrator
(KiX Supporter)
2002-06-03 07:42 PM
Re: Type Library Viewer for Kix?

Steve, another great idea ! I mostly use OLE View or fire-up VB Studio or the VBE. But OLE View is pretty crude, would be nice to have a stand-alone VBE-like interface. One that just presented the Automation interfaces and maybe even the embedded help text.

I've seen sample code (classes) for doing this at the codeproject, or was it codeguru, can't remember which one, but if your interested, have a boo or I can dig-up my old links.

Chris,

Does that util you pointed to list interpret COM typelibs, or just the win32 api's ?

-Shawn


Stevie
(Starting to like KiXtart)
2002-06-03 07:54 PM
Re: Type Library Viewer for Kix?

Yeah, I saw an example in an old MSDN library. A couple of months ago I actually did a crude mock-up of a viewer. Worked well--looked crappy.

After following the link provided by Chris it looks like a souped up version of the API Viewer. After looking at the screenshots it doesn't appear to support COM references--more of a database of API calls like Win32api.txt (with a lot more info, samples, etc.)

What I usually do is run VB and launch the object browser to figure out what methods, etc. I'm looking for. It's a pain though, and I'm guessing people might like the viewer.

I'll dig out my old code within the next couple of weeks (time is tight right now) and see if I can get something usable for everybody.

If I recall correctly, I used kixforms.dll as one of my test files and it worked fine [Wink]

[ 03 June 2002, 19:56: Message edited by: Steve B ]


Radimus
(KiX Supporter)
2002-06-03 08:30 PM
Re: Type Library Viewer for Kix?

please do it... I have to use the Force here (also referred to as guessing)

Needless to say, I end up posting it here for Shawn or Kent or others figure out for me.


Chris S.
(MM club member)
2002-06-03 08:45 PM
Re: Type Library Viewer for Kix?

Shawn & Steve, that's correct. That link is to the guide that is essentially a database of collected info. There is a link on another page for a API viewer, but I admit I haven't looked at it yet. I dl'd the quide during our previous discussion regarding "Block Input."

BrianTX
(Korg Regular)
2002-06-03 11:06 PM
Re: Type Library Viewer for Kix?

Microsoft has an object viewer...

Get it at:

http://www.microsoft.com/com/resources/oleview.asp

Brian


Stevie
(Starting to like KiXtart)
2002-06-04 05:53 PM
Re: Type Library Viewer for Kix?

Shawn had mentioned the OLE Viewer. I'm not partial to it myself since it doesn't contain the help text on each method/property/event and it contains a wealth of information on stuff that is of absolutely no interest to me like interface descriptors and CLSIDs.

What I have in mind in something more user-friendly that just shows the VB/Kix-type syntax for accessing each of the methods and properties and the help text (if any) that's included.


BrianTX
(Korg Regular)
2002-06-04 05:56 PM
Re: Type Library Viewer for Kix?

Try this one:

http://home.sprintmail.com/~mpryor/c-frame.htm?promo.htm

Brian


ShawnAdministrator
(KiX Supporter)
2002-06-04 11:38 PM
Re: Type Library Viewer for Kix?

Hmmm, for a "light-weight" viewer, that utility sure has alot of "known issues" and "caveats" and "possible dependencies" (like the VB runtimes?) ... [Wink]

Plus, it sounds like there are some known issues with the ITypeLib interface itself in that it states that there are "common issues" between this viewer and OLE Viewer.

But from a look-and-feel standpoint, I think this viewer has things pretty much nailed. Wonder Steve, if the viewer you were planning was going to be C++ or VB based, and that if you might have quite the coding challenge ahead of you, to make a more stable viewer. If its anything like your editor (great piece of work by the way) I'm sure it will be [Wink]

-Shawn

[ 04 June 2002, 23:48: Message edited by: Shawn ]


LonkeroAdministrator
(KiX Master Guru)
2002-06-05 02:04 AM
Re: Type Library Viewer for Kix?

mm...
sounds nice.

but then, would ask dll coders to add more specific help in the dll.
this way separate help-file is not needed.

cheers.

btw, have any of you used linux system as pdc with kixtart logonscripts?
I'm currently investigating possibilities our corp can expand in lan structure.
at the time being, I'm stuck with "experimental" code which incorporates NTFS Access Control Lists with linux posix ACL.
really intresting. maybe at some day even working...


Sealeopard
(KiX Master)
2002-06-05 04:03 PM
Re: Type Library Viewer for Kix?

I know from postings in the SAMBA discussion groups that some folks are using a SAMBA PDC with KiXtart login scripts.

Stevie
(Starting to like KiXtart)
2002-06-05 04:05 PM
Re: Type Library Viewer for Kix?

That last link is exactly the type of thing I had in mind.

Regarding the stability issue, I may have an idea on that. In all of the sample code I've been looking at, it all seems to derive from the same ultimate sample code. I've already fixed 2 bugs that I found in that sample code--and that's without really looking for bugs!

My guess is that whoever wrote that viewer just lifted the sample code and didn't change anything which is why it's not completely stable. My guess is that it shouldn't be hard to make it a bit more stable.

Regarding the language of choice, that brings up an interesting point. I was planning on making it in VB. There won't be any dependency issues since I can include the VB Runtimes and any and all DLLs that are necessary. I have seen some more examples in C++ that I could use but since the VB code was based off this code, I imagine the stability issues will still be there.

How about this...

I was thinking of writing this in C#. The upside is that I'm confident that it will be solid as far stability. The question is how many people who would use this app have the .NET runtime? Or a better question is how many people have access to the .NET runtime without requiring a download? It's a heavyweight runtime at 20+ MB. But it's included with Technet and MSDN and is freely downloadable off the web. I can even package 2 setups--one without the runtime and one with it included.

I've been working with .NET for about 6 months now and would like a real project to actually deploy to people. This seems like a good candidate. But at the same time I don't want to alienate too many people.

What do you all think?


Radimus
(KiX Supporter)
2002-06-05 04:10 PM
Re: Type Library Viewer for Kix?

well, I'd thing that some developers looking ahead would use/have the .NET, but I don't see many people jumping on the .NET corporate wise for at least a year or 2 (or more).

How many people here still post questions about wintendo machines (many probably on 486s and p100s)...


ShawnAdministrator
(KiX Supporter)
2002-06-06 12:40 AM
Re: Type Library Viewer for Kix?

Steve, from my standpoint (user), this would be my order of preference:

1) C++
2) VB
3) C#

Don't know about others, but I tend to be "on the move" quite a bit, like carrying my tools with me or at least be able to get them in & running real quick. C++ obviously no issue there. VB, at least you got a good chance of having the runtimes already there, C# w/ 20MB+ download, i mean, I got it here at home, but its nowhere to be found at the office. A 20MB download as needed doesn't really turn me on either (imho).

Now ... if I were in your shoes - I would go with whatever language you used to write your KixScripts Editor in. I mean, this viewer would obviously make a wonderful addition to your editor - so why not kill two birds with one stone here ? So if you implemented the viewer as a class, or as an ActiveX control in itself (with a stand-alone wrapper), that would make your life easier for sure - assuming of course at the end of day you wanted to roll it in.

-Shawn

oops, forgot about the MFC library, hmmm, ever consider ATL/WTL ? [Wink]

-Shawn

[ 06 June 2002, 01:30: Message edited by: Shawn ]


Stevie
(Starting to like KiXtart)
2002-06-06 07:45 PM
Re: Type Library Viewer for Kix?

Shawn,

Ultimately, the plan is to wrap it into the editor. For now, though, I wanted to make it a stand-alone app with no external dependencies.

With the editor it's going to be worked in to intellisense so that when you type 'CreateObject("' it will pop up a list of all registered tlb objects and whenever you type a "." after entering an object it will provide a list of properties and methods like in VB. That way you won't even have to launch a separate utility to get at the information.

But for now I just want to get this thing out there so people can use it.

I guess the C# idea isn't really going to fly...a pity. Oh, well. I'll try to dig up some old C samples. If I can't find them the quickest route will be to use my existing VB source.

Hopefully in a week or two...


ShawnAdministrator
(KiX Supporter)
2002-06-06 09:25 PM
Re: Type Library Viewer for Kix?

Steve, my two cents, I think the viewer rolled into the Editor would still be very usefull. Intellisense is great, in fact, it one of my favorite IDE features. But to me, intellisense alone is only half of the battle. The other half is browsing through the myriad of COM libraries and ProgIDs, looking for something that your not sure of, or looking for new possibilities that one didn't even know existed, yeah ?

Its your call, but could you imagine the Visual Basic Editor without the Object Viewer ? You know the score on that - using intellisense, one would have to create an instance of everything they wanted to browse, plus, maybe miss-out on the embedded help text buried inside TLB's (unless you were going to intellisense that as well).

Anyway, I'm really looking forward to seeing your finished product. Hopefully you will allow kixtart.org to be beta testers, hopefully even alpha testers [Wink]

-Shawn

[ 06 June 2002, 21:28: Message edited by: Shawn ]


ShawnAdministrator
(KiX Supporter)
2002-06-06 09:34 PM
Re: Type Library Viewer for Kix?

p.s.

Have you benchmarked your idea of droping-down a codesense window, listing all available progids, when autocompleting a CreateObject(... ? Just curious about the length of time it would take to do that.

-Shawn


ShawnAdministrator
(KiX Supporter)
2002-06-07 02:44 PM
Re: Type Library Viewer for Kix?

Steve, sorry for ranting off-topic there. Not being one to look a gift horse in the mouth, I should know better than that. And in regards to C# vs C/VB, I would use your viewer even if it was coded in COBOL or RPG4 [Wink]

Stevie
(Starting to like KiXtart)
2002-06-07 04:21 PM
Re: Type Library Viewer for Kix?

I know exactly what you mean. Dropping down the intellisense doesn't give the same level of information as the object browser and there's quite a bit more scrolling involved. And like you say, you need to type in every instance of every object you want to look at.

I'm sure it will be bundled with the Editor. In fact, what we're going to do in an upcoming version is allow users to add their own tools to the Editor. So things they use often while scripting can be placed directly under the tools menu.

Not only that, but I'm going to add yet another ActiveX control to allow an app to input text directly into the active script window. That way, users can build their own custom wizards or add-ins if they so choose.

Now I'm getting off topic...

As far as benchmarking, my preliminary look is that it will be fast enough to pop up the window almost immediately. I need to look at some objects with dozens or hundreds of members to see what would happen then.

As soon as I have something for everyone to look at, I'll definitely have you guys bang on it for a while. That would be great.

Steve


ShawnAdministrator
(KiX Supporter)
2002-06-07 05:53 PM
Re: Type Library Viewer for Kix?

If we could stay off-topic for just a sec, did you mean to say that you are going to add an ActiveX control for apps, or an ActiveX Interface ? ActiveX Interface ala custom COM snappin ? Because if that's the case, I'll send you a cheque right now for $29 USD !

[ 07 June 2002, 19:23: Message edited by: Shawn ]


ShawnAdministrator
(KiX Supporter)
2002-06-07 10:40 PM
Re: Type Library Viewer for Kix?

Ahhh, wait a sec, i think I know where your comming from now. So this ActiveX Control would call a user application (say, an .exe), and then take whatever was output from that, and insert it into the current editor insertion point ?

Stevie
(Starting to like KiXtart)
2002-06-10 05:05 PM
Re: Type Library Viewer for Kix?

Exactly. It will just take any string passed to it and insert it into the current cursor position. That way, if people are so inclined, they can make their own COM wizards or whatever and run it all right from within the app.

ShawnAdministrator
(KiX Supporter)
2002-06-10 05:22 PM
Re: Type Library Viewer for Kix?

Steve, would you consider exposing the codesense control (say, as a HWND or the Interface itself, if using the ActiveX version) to external COM snapins, so one could write things like custom syntax checkers and beautifiers ? If you didn't, I would understand your reasons why (support concerns, i guess).

[ 10 June 2002, 17:23: Message edited by: Shawn ]


Stevie
(Starting to like KiXtart)
2002-06-10 08:26 PM
Re: Type Library Viewer for Kix?

My initial thought is that I wouldn't be averse to the idea. The only reason I would be reluctant is that when I modify the CodeSense control, there could be a lot of impact if people are using existing snap-ins, i.e. they may not work anymore or the app could crash, etc.

I think I would rather provide explicit functionality than expose the entire control. But I'll have to think about that some more.


cj
(MM club member)
2002-06-12 10:11 AM
Re: Type Library Viewer for Kix?

I use a Type Library Documenter that creates a .HLP file from the .DLL, listing all the functions, properties etc etc. Doesn't work for all .DLL/.OCXs, but works enough that I can't live without it. [Smile]

I put a link on my downloads page

cj


ShawnAdministrator
(KiX Supporter)
2002-06-16 04:09 PM
Re: Type Library Viewer for Kix?

Boy, I could have really used that TypeLib Viewer this morning ... how goes the battle, Steve ?

Stevie
(Starting to like KiXtart)
2002-06-17 09:56 PM
Re: Type Library Viewer for Kix?

I've been bogged down on some other things. Should be coming in a week or two for initial testing.

Steve


Stevie
(Starting to like KiXtart)
2002-07-02 04:44 AM
Re: Type Library Viewer for Kix?

Hey All,

Beta 1 for TypeLib Viewer is done! It's sure to have problems so I'm giving you all first crack at it.

Current issues:
-When selecting Browse to bring up a list of registered type libraries there's often a delay of a couple of seconds while it builds the list. I need to add a status bar to the bottom of the main form to let you know the status e.g. "Please Wait..."

-The next version will offer the ability to sort members by function. So that all the properties are listed first then all the methods, etc. Instead of a large alphabetical list.

Also, what would be nice is if somebody out there could get a hold of the standard icons for Method, Property, Constant, Enumeration, etc. and I can include those next to the names of each member. A little easier on the eyes, I think.

Anyway, suggestions are welcome. You can download it at:

http://www.rwksystems.com/files/TypeLibViewer.exe

Let me know what you think.

Steve B


Stevie
(Starting to like KiXtart)
2002-07-02 04:52 AM
Re: Type Library Viewer for Kix?

Already found a bug!

Sometimes when exiting, the Viewer stays in the process list on the machine and has to be ended manually. Doesn't happen every time though. I'm too tired to figure out how to reproduce it. Hopefully someone will have figured it out by the time I wake up tomrrow. [Frown]

[ 02 July 2002, 04:53: Message edited by: Steve B ]


LonkeroAdministrator
(KiX Master Guru)
2002-07-02 01:38 PM
Re: Type Library Viewer for Kix?

I get my kixforms shown twice...
with the same name, same file and all.


ShawnAdministrator
(KiX Supporter)
2002-07-02 05:08 PM
Re: Type Library Viewer for Kix?

Steve,

NT4 SP6a IE4-SP2 - Get the following messagebox after install and running viewer:

prjTypeLib:

Component 'Mscomctl.ocx' or one of it's dependencies not correctly registered: a file is missing or invalid


Stevie
(Starting to like KiXtart)
2002-07-02 05:31 PM
Re: Type Library Viewer for Kix?

I can fix the dependency problem in the install.

Don't know about the duplicate problems, I'll have to reproduce it and hopefully will know more.


ShawnAdministrator
(KiX Supporter)
2002-07-02 05:39 PM
Re: Type Library Viewer for Kix?

Sweet - five stars for the Steve Man !!!

Chris S.
(MM club member)
2002-07-02 06:34 PM
Re: Type Library Viewer for Kix?

Steve, great job. It seems that your browse list is a little short however. I ran this wshBrowseForObjects script and it found 3234 (potentially) Scriptable Objects. Check it out and see if it makes sense to have your browser function behave more like this does.

Thanks, C.


Stevie
(Starting to like KiXtart)
2002-07-03 12:15 AM
Re: Type Library Viewer for Kix?

Installed the OCX and took a look.

It appears that this takes every registered Class and presents it in the browse list. Most all of these classes are associated with a Type Library.

In other words, if you were to go into the TL Viewer and open each item in the browse list, everything shown in the "TypeInfos" column are the same objects that appear in the wshBrowse list. For example, there are dozens of CDO objects in the wshBrowser. All of them belong to the same type library. If you were to go into the TL Viewer Browser and select "Microsoft PKMCDO for Microsoft Web Storage System" (you may or may not have this on your machine) you would see under the "TypeInfos" list several dozen objects which correspond to the objects in the wshBrowser.

So the question becomes do you want an exhaustive list of all objects up front or do you want to browse individual type libraries. To me, it's a bit more useful to break it down into type libraries. If I'm doing work in ADSI or Excel or Access or whatever I'd rather see only objects related to those things than every possible object installed in my system.

Having said that though, if I'm in the minority on this issue I'd be happy to make the change.

What does everybody else think?

Steve

[ 03 July 2002, 00:16: Message edited by: Steve B ]


LonkeroAdministrator
(KiX Master Guru)
2002-07-03 12:20 AM
Re: Type Library Viewer for Kix?

steve, keep it.
it's simpler and more easily browseable when there is real hierarchy in it.

[ 03 July 2002, 00:21: Message edited by: Lonkero ]


Stevie
(Starting to like KiXtart)
2002-07-03 02:59 AM
Re: Type Library Viewer for Kix?

It's been updated with a few fixes:
http://www.rwksystems.com/files/TypeLibViewer.exe

-It now terminates consistently.
-I added the MSCOMCTL.OCX file for NT support.

However, when testing it on my VM Windows NT machine I got a different error: "Error 429--ActiveX component can't create object" I've got a version discrepancy somewhere.

So, Shawn, you probably still won't be able to run it on your NT box. The only problem is that my VM box died so I need to rebuild it to begin debugging on NT. Hopefully, by tonight I can start testing. It may take another day or so to find a fix. I'd appreciate it if you would go ahead and try it and see if you get the same result.

Another day or so and we'll have a legitimate beta!

Steve

[ 03 July 2002, 02:59: Message edited by: Steve B ]


LonkeroAdministrator
(KiX Master Guru)
2002-07-05 12:07 AM
Re: Type Library Viewer for Kix?

steve, checked better that the double value is for different letter sizes in kixforms

new builds seem to have name Kixforms and some old one had KixForms (or vice versa)

but, anyway this is not a problem in your typelib viewer but in windows as it normally does not care about capitals and in this case it does.
anyway, the contents of both seem to be the same, so it's only the name which is stuck there.

cheers,


ShawnAdministrator
(KiX Supporter)
2002-07-04 06:08 PM
Re: Type Library Viewer for Kix?

Hi Steve,

Just tried it with NT4/IE6 and got the same error as you [Frown] [Wink]

-Shawn


LonkeroAdministrator
(KiX Master Guru)
2002-07-07 02:52 AM
Re: Type Library Viewer for Kix?

one lack discovered.
it has input information on member but not output.

cheers,


ShawnAdministrator
(KiX Supporter)
2002-07-07 07:03 AM
Re: Type Library Viewer for Kix?

Steve - great job by the way - what I like most about it, is that it's FAST. Might want to include .EXE's in your FILEOPEN dialog ... haven't found those COM ICON's yet, will keep my eye open ...

[ 07 July 2002, 07:08: Message edited by: Shawn ]


krabourn
(Hey THIS is FUN)
2002-07-07 04:03 PM
Re: Type Library Viewer for Kix?

I get "Error 429--ActiveX component can't create object" when I try to run TypeLibrary Viewer. My OS is Win XP.

Kdyer
(KiX Supporter)
2002-07-07 09:57 PM
Re: Type Library Viewer for Kix?

Steve,

A couple of suggestions:
(1) Have a count of objects found on a system when browsing.
(2) Have a search option to look for a string within the objects when browsing: something like -
"*" & "STRsearch" & "*" and that way you could look for something within the object list..

Good work!

Kent


Stevie
(Starting to like KiXtart)
2002-07-10 05:29 PM
Re: Type Library Viewer for Kix?

Hi all,

Just got back from vacation. It felt great to get away for awhile.

Regarding bugs: The 429 error (on XP) is related to the NT problem. Once I get it isolated it should work across the board.

About not showing the output for a function, for example, it only shows output if it's different than the default which is "as Variant" So if it's returning a string or boolean or whatever it will explicitly show that, but if it returns a Variant it's just assumed. If it would be better to always show the output that's an easy enough change to make. I may just go ahead and do that anyway.

Regarding changes: I'll include a count for # of items browsed in the next rev. I'll also include a search of the browse list so you don't have to scroll through the whole thing. Let me know if there are any other issues.

BTW--In addition to the COM icons, if someone can come up with a better icon for the app than that stupid "radioactive" icon I'd love to use it. I hate that icon, but historically I've used it on most beta software. Something a bit more related to the product would be in order here though. Any ideas?

Steve B

[ 10 July 2002, 18:07: Message edited by: Steve B ]


Stevie
(Starting to like KiXtart)
2002-07-16 04:44 AM
Re: Type Library Viewer for Kix?

Hey everybody,

Just updated the TypeLib viewer with the following fixes:

  • Now correctly works on NT systems
  • Error 429 "ActiveX component can't create object" is fixed
  • *.EXE is now added as a filetype from "File | Open..."
  • Counter is added from the browse menu showing how many items are listed
  • Search feature allows you to generate a subset from the main browse window
  • Default return types (e.g. "As Variant") are always listed
That's all I can think of right now. Anyway you can get it here
Hope it comes in handy.

Steve B

[ 16 July 2002, 04:49: Message edited by: Steve B ]


LonkeroAdministrator
(KiX Master Guru)
2002-08-16 02:58 PM
Re: Type Library Viewer for Kix?

I can think of one.
I added the viewer to sendto for easy access and didn't worky...

easy to add?


Stevie
(Starting to like KiXtart)
2002-08-19 07:33 PM
Re: Type Library Viewer for Kix?

Good catch. In the next release it'll worky. Would like to wait til there's a few more things to fix/update. Thanks for the info.

ez4me2c3d
(Fresh Scripter)
2002-10-01 04:09 PM
Re: Type Library Viewer for Kix?

Any updates to this Steve?

sorry i jumped in the ring way too late didn't i?

[ 01. October 2002, 16:10: Message edited by: ez4me2c3d ]


ShawnAdministrator
(KiX Supporter)
2002-10-01 04:11 PM
Re: Type Library Viewer for Kix?

Yeah Steve - I'm still waiting for those little object/method/property icon thingies to make their appearance. [Wink]

LonkeroAdministrator
(KiX Master Guru)
2002-10-01 04:37 PM
Re: Type Library Viewer for Kix?

anthony, for the beta suggestion you came too late as 1.0 has been released:
http://www.kixtart.org/cgi-bin/ultimatebb.cgi?ubb=get_topic;f=13;t=000300#000000

cheers.


Stevie
(Starting to like KiXtart)
2002-10-03 03:31 AM
Re: Type Library Viewer for Kix?

Hey Shawn,

Those property/method/object thingy icons will be put right into the viewer as soon as you can get them to me. [Wink]


ShawnAdministrator
(KiX Supporter)
2002-10-03 03:59 AM
Re: Type Library Viewer for Kix?

Steve - I did send them to you - long, long time ago ... guess you didn't get them ? I'll send them to you again if you want.

[edit]

Steve buddy - you have mail.

[ 03. October 2002, 04:07: Message edited by: Shawn ]