Re: PropertyBag (?) implementation
Jason S <email@example.com> wrote:
(b) implement an object (is this IPropertyBag?) which has
X.setprop(BSTR n,VARIANT v) ==> sets property "n" to value v
X.getprop(BSTR n) ==> returns v
If you want the object to be script-friendly, I recommend implementing
IDispatch and, for the cases where you want to be able to add arbitrary
properties at run-time, IDispatchEx.
(c) am I allowed to implement IDispatch by constructing a type library
/ type info on-the-fly?
Yes. Moreover, you are allowed not to support type info at all. Scripts
never read it anyway.
e.g. I have no static IDL methods besides
IDispatch, but when constructing my object, I give it fields X, Y, and
Z, and return type info so the fields put_X, put_Y, put_Z, get_X,
get_Y, get_Z are implemented by handling Invoke() correctly?
I'm not sure what type info has to do with implementing Invoke,
correctly or otherwise. Just implement it any way you want.
With best wishes,
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925