[Python-au] IRtdServer with PythonCOM?

Christopher Nilsson python-au@slort.org
Sun, 1 Dec 2002 19:17:39 -0800


-----BEGIN PGP SIGNED MESSAGE-----

Hello all,

I'm trying to prototype a COM Automation server, using the wonderful pythonwin extensions. Until now, the extensions have taken care of a lot of problems without me needing to delve too deeply under the hood.

This server needs to implement the IRtdServer interface
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbaxl10/html/xlobjirtdserver.asp), since
I wish to provide real-time updates of information to an excel spreadsheet.

I'm fairly new to COM automation fun, so these are likely elementary questions:

1. As I understand it, the pythoncom makes IDispatch objects, so as long as my object implements the necessary methods, it should work as an IRtdServer object. Am I correct on this?

2. One of the IRtdServer methods has a parameter passed by reference (F$%* !!!).  This is the spec given by MS:
  expression.RefreshData(ByRef TopicCount As Long)

  Description:
    - expression   Required. An expression that returns an IRtdServer object.
    - TopicCount  Required Long. The RTD server must change the
      value of the TopicCount to the number of elements in the array returned.

  So, since python doesn't really believe in passing by reference like this, is it even possible to build an IRtdServer with python?

If anyone has tackled this one, I'd really appreciate some clarification.  Thanks.

Regards,
Chris.
-----BEGIN PGP SIGNATURE-----
Version: Hush 2.2 (Java)
Note: This signature can be verified at https://www.hushtools.com/verify

wlcEARECABcFAj3q0NUQHGxpemFyZEBodXNoLmNvbQAKCRDVHlODFrYTe/NGAKCJljTZ
pIuYRunU3Pfe4ao4ua49/wCcCWHOiAR7HfaXnYJN+GBFtEUAxg0=
=1gZ5
-----END PGP SIGNATURE-----