[python-win32] COM question
Jens B. Jorgensen
jens.jorgensen@tallan.com
Mon, 30 Sep 2002 11:19:30 -0500
Robert Olson wrote:
> I've tried on and off to use pythonCOM to access the control software
> for a Gentner AP device (cf www.clearone.com). I ran into problems,
> and ended up getting the following response from the vendor:
>
>> We have looked at the problem and and it relates to how automation works
>> with late binding languages such as VB. APServe was not written to be
>> friendly with these languages. The call "Unit.CreateMeter(CHANNEL_1,
>> METERTYPE_LVL, GRP_I, Meter)" last argument (meter) is passed in
>> "ByVal".
>> VB's code completion sees this APServe COM interface method as ByVal
>> because
>> VB does not allow the Interface pointer, Meter, to be "Set" through the
>> argument list via instantiation of the COM object, COMAPMeter.
>>
>> The call will work fine with launguges such as Visual C++ or Delphi.
>> We did
>> not intend to have users writing software utilizing that interface and
>> therefore did not add the support in APServe. Unfortunutly, I do not
>> know
>> of a work around for this problem. I am not familiar enough with
>> Python to
>> make any recomendations there either.
>
>
> I'm wondering if that explanation makes sense, and if there's a way
> python could still be used (I'm pretty shaky on the actual details of
> COM under the covers).
Python could certainly still be used. I'm pretty COM-savvy and I'm not
sure I understand at all the explanation above. However if you want to
get it working in Python you could always write a C++ extension module.
That should work just dandy. Naturally the problem is that if the
interface above is complex (and I'm guessing it is) you'll have a lot of
code to write although none of it should be that difficult.
>
> thanks,
> --bob
>
>
> _______________________________________________
> Python-win32 mailing list
> Python-win32@python.org
> http://mail.python.org/mailman/listinfo/python-win32
--
Jens B. Jorgensen
jens.jorgensen@tallan.com
"With a focused commitment to our clients and our people, we deliver value through customized technology solutions"