I'm struggling through the development of some python COM server code as a
relative newbie and running into an issue.  My win32com module is build 214.

My python COM server class:

class Controller:
        _public_methods_ = [    <snip> ]
        _reg_progid_ = "VPinMAME.Controller"
        _reg_clsid_ = "{F389C8B7-144F-4C63-A2E3-246D168F9D39}"
        _public_attrs_ = [      <snip>,
                                'Switch',
                                <snip>]

        _readonly_attrs_ = [    <snip> ]


        switch = [True]*128

lastSwitch = 0

        def Switch(self, number):
                return True

        def SetSwitch(self, number, value):
                return True



My client is a VB client.  The issue occurs when the client issues the
following:

Controller.Switch(mSw(x)) = False

mSw is an array.

If I print mSw(x) before making the COM call, it prints out the expected
value, but if I print it out again after the call, mSw(x) is " ".

I'm assuming the parameter is being passed by reference and something on the
python side is corrupting it.  To rule out the code that I used to have in
SetSwitch, I removed it all and now just return, but the corruption still
occurs.

Do I need to handle the params differently, or is this an issue with
win32com?  The values of the params are the expected values; so I know the
values aren't getting corrupted on the way in.

Thanks.
- Gerry

*
*
_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to