On Wed, 09 Jan 2008, Michael Ellery wrote: > The VT_TYPE coming into my put_Some_VARIANT_Property was actually > VT_BSTR in this case, which I was not expecting. Simply wrapping int() > around the get call works fine, but a fix to Win32::OLE would be great. > > I think I'll also update my VARIANT processing on the put.
I think you should do that. I don't know if there is some normative text about this, but I've seen several references that say that the IDispatch::Invoke implementation is responsible for the coercion of all parameters to the expected type (if possible). E.g. the remarks section of the VariantChangeTypeEx() documentation says: | Typically, the implementer of IDispatch::Invoke determines which | member is being accessed and then calls VariantChangeType to get the | value of one or more arguments. | | For example, if the IDispatch call specifies a SetTitle member that | takes one string argument, the implementor would call | VariantChangeTypeEx to attempt to coerce the argument to VT_BSTR. [from http://msdn2.microsoft.com/en-us/library/aa909107.aspx] Cheers, -Jan _______________________________________________ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs