RE: Win32::OLE -- assignment to property of type IUnknown..how?
On Wed, 28 May 2008, Michael Ellery wrote: > > I have a COM component with a property defined like this (IDL): > > [propput, id(30), helpstring("property TestSuite")] HRESULT > TestSuite([in] IUnknown *pVal); Try adding a second line here: [propputref, id(30), helpstring("property TestSuite")] HRESULT TestSuite([in] IUnknown *pVal); (identical to the previous line, except propput => propputref). Not sure if this is enough, but maybe it is sufficient to get the required IDispatch glue generated for you. Cheers, -Jan ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Win32::OLE -- assignment to property of type IUnknown..how?
I have a COM component with a property defined like this (IDL): [propput, id(30), helpstring("property TestSuite")] HRESULT TestSuite([in] IUnknown *pVal); [propget, id(30), helpstring("property TestSuite")] HRESULT TestSuite([out, retval] IUnknown **ppVal); ..basically it gets/sets a dual interface object that is implemented in a different COM component. Using Win32::OLE, it doesn't let me do a normal property assignment -- i.e. this fails: $myObj->{TestSuite} = $someOtherObj; ..however, it DOES let me do by ref assigment: $myObj->LetProperty('TestSuite', $someOtherObj); Can someone explain why? I would prefer (for consistency with other properties) to use the SetProperty style of assignment instead of LetProperty - is there something I need to change in my IDL to make the SetProperty style work? Thanks, Mike Ellery ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs