Iterating through properties of a VB com object at runtime 
Author Message
 Iterating through properties of a VB com object at runtime

Hi,

Is it possible to iterate through and assign values to properties of a
VB COM object at runtime from a VB or VBS client. E.g. :

For Each property in myObject.Properties
    property.value = ...
Next

I know that this should be avaliable through the IUnknown interface,
but how does it work?

Thanks,

Avner Silberman



Fri, 21 Nov 2003 16:19:33 GMT  
 Iterating through properties of a VB com object at runtime
Hi,

In VB, add a reference to TypeLib Information. There're objects and methods
for enumerating properties.
--
HTH,
Alexander Shirshov, MCSD


Quote:
> Hi,

> Is it possible to iterate through and assign values to properties of a
> VB COM object at runtime from a VB or VBS client. E.g. :

> For Each property in myObject.Properties
>     property.value = ...
> Next

> I know that this should be avaliable through the IUnknown interface,
> but how does it work?

> Thanks,

> Avner Silberman



Fri, 21 Nov 2003 17:56:00 GMT  
 Iterating through properties of a VB com object at runtime
Thank you!

This opens up alot of possibilities for me.

Regards,

Avner

Quote:

> Hi,

> In VB, add a reference to TypeLib Information. There're objects and methods
> for enumerating properties.
> --
> HTH,
> Alexander Shirshov, MCSD



> > Hi,

> > Is it possible to iterate through and assign values to properties of a
> > VB COM object at runtime from a VB or VBS client. E.g. :

> > For Each property in myObject.Properties
> >     property.value = ...
> > Next

> > I know that this should be avaliable through the IUnknown interface,
> > but how does it work?

> > Thanks,

> > Avner Silberman



Sat, 22 Nov 2003 07:49:07 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Iterate through an object's properties (any object)

2. Q: Iterate a controls properties at runtime?

3. Call VB DLL or COM object from within VB COM object or EXE

4. Iterating through the properties of an object?

5. Iterating through the properties of an object

6. com object will not read registry when com object called from asp (vb works fine)

7. COM-Object in ASP with COM-Object as parameter

8. COM-Object in ASP with COM-Object as Parameter

9. Access a COM object of a COM object?

10. Accessing a COM object of a COM object

11. COM Object-Out of stack space on executing/shell exe from com object

12. Accesing the properties of a com object

 

 
Powered by phpBB® Forum Software