TypeName equivalent for Library Name

rbulph
09-10-2003, 01:53 PM
Supposing you create an object from a dll with code such as:
Set objX=CreateObject("MyObjects.Class1")
TypeName(objX) will return "Class1". Is there any function that will return "MyObjects"? This would be useful with plug-ins where you may have an object from a collection of objects created from different dlls and you want to be able to access other classes from the dll that your object is created from. Otherwise you would just have to keep a store of all the dll names when you create the objects.

Bet there isn't.

Iceplug
09-10-2003, 06:13 PM
Set objX = New MyObjects.Class1 'unless I misunderstood...
You can make objX store the Library by using the Class1 initialize to store the name of the library that you are putting it into ("MyObjects").

rbulph
09-11-2003, 02:30 AM
Set objX = New MyObjects.Class1 'unless I misunderstood...
You can make objX store the Library by using the Class1 initialize to store the name of the library that you are putting it into ("MyObjects").

I can't create the object with "New" because it will be a plug-in and I don't know what it's called at the time I write the exe.

It's a fair point, though, that objX does of course know the library name, because it can use "App.Name". So I could just require a function in objX to return that. I'd still prefer to have a native function that I can use in the exe to return it in a similar manner to "TypeName" though...

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum