Question concerning makepy.py for COM (long, code included)

Scott Anderson sanderson at ttm.com
Fri Feb 11 10:36:59 EST 2000


mhammond at skippinet.com.au wrote:
[...]
> Nope - once makepy is run, it is early-bound dispatch.

Gotcha. Thanks.

Next question then, since I'm getting the same error from static
dispatch as I am from dynamic: are OCX controls treated differently than
"normal" COM objects?

"ApplicationName" is a defined property of the control that I have
makepy'd, but I am unable to set it.

Here's what I'm getting: 

>>> x = Dispatch('API.APICtrl.1')
>>> x
<win32com.gen_py.API ActiveX Control module._DWSHSTAPI>
>>> x.ApplicationName = 'foo'
Traceback (innermost last):
  File "<stdin>", line 1, in ?
  File
"C:\dev\python\win32com\gen_py\DBD89B20-C44F-11CF-8C05-0004AC77A721x0x1x0.py",
line 50, in __setattr__
pywintypes.com_error: (-2147418113, 'Unexpected failure', None, None)

Thanks,

-scott




More information about the Python-list mailing list