SetProperty of a COM object.. [message #50299] |
Tue, 26 September 2006 13:04 |
yingjie, Peng
Messages: 11 Registered: March 2006
|
Junior Member |
|
|
Hi all,
As we already know, COM object methods that have been defined using
the propget and propput attributes are accessible via the
IDLcomIDispatch object's GetProperty and SetProperty methods. What I
encountered is a COM object method that's defined as propget and
propputref. That means if I use the following codes,
object -> GetProperty, keyword= var1
I can retrieve the value of the keyword and store into var1, but the
type is Objref, an object. The problem is now if I try to set the value
of keyword to var2 with the same type (objref) as below:
object -> SetProperty, keyword= var2
I got the following error message:
SETPROPERTY: Object reference expression not allowed in this context:
var2
It's really strange to me and does anybody know what's the problem..
Thanks very much for your kind assistance!
Best Regards,
Yingjie, Peng
CESR, Toulouse
France
|
|
|