Wednesday, September 10, 2008

Getting the properties and methods available with an object

Getting the properties and methods available with an object
I'm unable to instantiate TLI.TLIApplication from TlbInf32.dll


The answer for how to determine the properties / methods / events

available to an object or within a .dll was/is? to use

windows\system\TlbInf32.dll by starting off like so:

Set oTLI = CreateObject("TLI.TLIApplication")

If I do this from my VBScript file, I get the error: Could not locate

automation class named "TLI.TLIApplication". Code: 80020009 Source:


At the same time, if I go into my VB5CCE and set Project/References to

find Typelib Information (which is located for me in

c:\windows\system32\TlbInf32.dll on my WinXP Pro, SP 2 system) and then


Dim foo As TLI.TypeLibInfo

Set foo = New TLI.TypeLibInfo

MsgBox TypeName(foo)

Then VB is happy with that and the MsgBox shows: TypeLibInfo

Now, I have neither VB 5 nor the VB 6 development environment

installed. All there is, is me and my trusty VB5CCE, and version 5.6

of WScript. Just in case, I closed down VB5CCE to do the test, and I

also did

Regsvr32 c:\windows\system32\tlbinf32.dll.

After that I plied it with /u several times, then a last time without

/u, and regsvr32 was continually happy. The tblinf32.dll file itself

is dated 1/16/1997 at 132608 bytes and version

I hope someone has an idea on this cause I am stumped,


Csaba Gabor from Vienna

Re: Getting the properties and methods available with an object
I don't know if this will help, but you

might try checking it in an object

browser to confirm the details of the

object model. Your code should work with

the VB6 version (1.10.8169, June, 98) but

you apparently have the VB5 version, which

could be slightly different. I know that there

are incompatibilities between the two versions,

(installing v. 6 over v. 5 can reportedly cause

malfunctions in software that uses v. 5) but I

don't know what exactly those incompatibilities

Re: Getting the properties and methods available with an object
ekkehard.horner wrote: 

I'd like to thank everyone for their response (Ekkehard, Mayayana, JW).

As a result, my biggest problem is solved, but there are still some

remnants which it would be good to clear up.

Ekkehard, your response reminded me that I have an old machine, and so

I looked at it and got it's TlbInf32.inf info from it. It is version (size: 153600, with a date of 14 July 1998). I unregistered

the earlier version in c:\windows\system32 and registered the new one

(which I had in a different directory). At this point, the sample code

below ran as expected. Cool, and thanks.

Unfortunately, PHP is not so happy with this setup. Now, I can make

things work within PHP by stuffing VBScript into an

MSScriptControl.ScriptControl but that's not right.

Microsoft says that TlbInf32.dll is redistributable at:

so I am hoping that someone will redistribute a more recent version to

me so I can see if it is PHP that is buggy, the .dll, or my



Csaba Gabor from Vienna

Mayayana, thanks for the warnings - I hope that does not account for

the behaviour that I am seeing.

No comments: