Hi Thomas!
On Fri, 12 Feb 2010, Thomas Heller wrote:
> Exactly. I cannot provide a patch, but here's a code snippet that creates
> such a beast:
Yes! It works!!
This is the final working snippet:
<snip>
travel = c_float(0)
v = VARIANT()
v._.c_void_p = cast(pointer(travel), c_void_p)
v.vt = VT_BYREF | VT_R4
mode = c_int(0)
vm = VARIANT()
vm._.c_void_p = cast(pointer(mode), c_void_p)
vm.vt = VT_BYREF | VT_I4
try:
piezo1.GetMaxTravel(APTPiezoLib.CHAN1_ID, v)
piezo1.GetControlMode(APTPiezoLib.CHAN1_ID, vm)
except Exception, e:
print "Exception:", e
print travel.value, mode.value
</snip>
If you are not careful when setting the types you get a "Type Mismatch"
error (even though the protoypes in the help were the same, I had to use
different types for the two funcions there).
I wonder why you can't integrate this into the package. I'm fine as this,
as this will let me write the program I need, but it would be more user
friendly to be able use pointers as arguments for the method invocation.
But I don't understand COM internals, so it could be that implementing
that could lead to other problems.
Thank you very much for your help!
Bye & Good Luck!
Pablo.
P.S.: If you visit Canada and stay at a city I happen to be living in,
consider yourself invited to a drink. ;-)
------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
comtypes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/comtypes-users