Movatterモバイル変換
[0]ホーム
Python COM and IDispatchEx
Donavon Keithleykeithley at easystreet.com
Fri Apr 13 16:32:52 EDT 2001
I see that Python server objects expose IDispatchEx, but they don't seem tosupport expando behavior. The following attempt to add a member returns"member not found" (where pDispEx points to a Python object):DISPID id;HRESULT hr = pDispEx->GetDispID(CComBSTR("NewMember"), fdexNameEnsure, &id);Am I doing something wrong?On the client side, Python doesn't seem to query for IDispatchEx. My objectwill happily add new members through Invoke ("obj.NewMember = 123"), but"del(obj.NewMember)" fails with "AttributeError: delete non-existinginstance attribute". Member enumeration would also be nice.It seems that, in principle, Python objects should map pretty cleanly toIDispatchEx and vice versa. Is this planned for future versions?--Donavon Keithley(I'm running ActivePython build 203, Win32 Extensions build 135.)
More information about the Python-listmailing list
[8]ページ先頭