TLBINF32 not working when program is compiled...
Posted on 2005-04-07
I've a strange problem I can't really solve...
I'm using the the TLBINF32 to browse for available properties of an object. Simplified the codes looks like this :
Dim t As New TLI.TLIApplication
Dim interfacei As TLI.InterfaceInfo
Dim xTypeInfo As TLI.TypeInfo
Dim memberX As TLI.MemberInfo
Set interfacei = t.InterfaceInfoFromObject(App)
MsgBox ("Write registry :" + CStr(interfacei.Name))
MsgBox ("Continue " + CStr(interfacei.MajorVersion))
For Each memberX In interfacei.Members
MsgBox ("Member " + CStr(memberX.Name))
This code is working fine when running the program in the IDE of VB6. But once the program is compiled, I can only retrieve the name of the object. Retrieving the members will throw me an error 445 - Object doesn't support this action.
In the example provided i use the App-object but it could be any class defined in the same program. Such as " Dim xObject as New MyObject" where MyObject is defined as a class in the SAME project.
I further notice that when retrieving the name I get "_App" as name when the program is runned in th IDE, where I receive "App" when the program is compiled.
I already tried to put all the functionality of the TLBINF32 library in a seperate ActiveX DLL with a wrapper class, but the result stays the same.
Can anybody explain me why this is ? Is there a work around ? Most examples I find on the net starts from the "TypeLibInfoFromFile" to retrieve the information which is not useable for me as I need to "scan" running objects in the same program.
I'm working with the TLBINF32.DLL versiion 22.214.171.124 (6.00.9782)
I'm using VB6 with SP5, My machine is an XP Pro with SP2.