# WIN32OLE : how to get put-property types?

**URL:** <https://www.ruby-forum.com/t/win32ole-how-to-get-put-property-types/170013>\
**Category:** Ruby\
**Created:** [June 11, 2009, 11:00am UTC](https://www.ruby-forum.com/t/win32ole-how-to-get-put-property-types/170013 "2009-06-11T11:00:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bdamour](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/7feea3/32.png) [@bdamour](https://www.ruby-forum.com/u/bdamour)\
**Post date:** [June 11, 2009, 11:00am UTC](https://www.ruby-forum.com/t/win32ole-how-to-get-put-property-types/170013/1 "2009-06-11T11:00:28Z")

</div>

Hi,

I’m trying to make a generic COM web server that permits to interact  
with any COM object through a web browser…

I’ve tryed first to do that using Python, but the reflexivity wasn’t  
good enough (not working with COM object methods).

Ruby reflexivity works well with COM objects except with put properties.

I need to get the type of the property I want to set?

I try :

prop = obj.ole\_put\_methods.first  
prop.params  
=\> []  
prop.size\_params  
=\> 1 (not coherent with previous result)  
prop.return\_type  
=\> VOID

is there a lack in win32ole reflexivity?

---

<div class="post-metadata">

**Author:** ![bdamour](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/7feea3/32.png) [@bdamour](https://www.ruby-forum.com/u/bdamour)\
**Post date:** [June 11, 2009, 1:00pm UTC](https://www.ruby-forum.com/t/win32ole-how-to-get-put-property-types/170013/2 "2009-06-11T13:00:58Z")

</div>

On Jun 11, 11:00 am, Bruno Le hyaric [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I need to get the type of the property I want to set?
> 
> ## is there a lack in win32ole reflexivity?
> 
> Posted viahttp://www.ruby-forum.com/

Put property has VOID return type. Since it is put property it does  
not return any value.

Regards,  
Bosko

---

<div class="post-metadata">

**Author:** ![bdamour](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/7feea3/32.png) [@bdamour](https://www.ruby-forum.com/u/bdamour)\
**Post date:** [June 11, 2009, 2:47pm UTC](https://www.ruby-forum.com/t/win32ole-how-to-get-put-property-types/170013/3 "2009-06-11T14:47:05Z")

</div>

Ok, thank you for your quick answers

---

<div class="post-metadata">

**Author:** ![bdamour](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/7feea3/32.png) [@bdamour](https://www.ruby-forum.com/u/bdamour)\
**Post date:** [June 11, 2009, 1:40pm UTC](https://www.ruby-forum.com/t/win32ole-how-to-get-put-property-types/170013/4 "2009-06-11T13:40:53Z")

</div>

Hello,

Bruno Le hyaric wrote:

> =\> VOID
> 
> is there a lack in win32ole reflexivity?

If there is a get-property corresponding to the put-property, then

obj.ole\_get\_methods.find {|m|  
m.progid == prop.progid  
}.return\_type\_detail

But if there isn’t corresponding get-property,  
there is no way to get the type of put-property.

Regards,  
Masaki S.
