Hi Thomas! On Wed, Feb 10, 2010 at 05:42:51PM +0100, Thomas Heller wrote:
Thanks for the reply! > Ok, the interface that you have is a pure dispinterface, which means that > all methods of the COM object are eventually called as IDispatch.Invoke() > calls. > > The Invoke() method packs all parameters into a DISPPARAM structure which > basically is an array of VARIANT instances. This explains the error that > you get - comtypes is trying to pack the POINTER parameter that you have > created into a VARIANT. This only works for 'automation-compatible' data > types > and your pointer is not one of those. Ok, that makes some sense. > I would guess that the 'mode_ptr' argument is an argument that must be passed > by reference (this is visual basic speak). Do you have sample VB code that > shows how this method is used? >From the documentation of this control, I get this prototype (I don't know if that's the right name): --- Function GetControlMode(lChanID As Long, plMode As Long) As Long Parameters lChanID - the channel identifier plMode - returns the control loop feedback status --- I found this other funcion, that seems similar and has a code example: --- Function GetMaxTravel(lChanID As Long, plMaxTravel As Long) As Long Parameters lChanID - the channel identifier plMaxTravel - returns the maximum travel (in microns) Example: Private Sub cmdGetTravel_Click() Dim sngMaxTravel As Single MG17Piezo1.GetMaxTravel CHAN1_ID, sngMaxTravel ' inform user of piezo max travel MsgBox "Maximum travel of piezo = " & sngMaxTravel --- Does this help? > However, it could be that comtypes is not able to call this method... I hope not! (crossing fingers... :-)) Bye & Good Luck! Pablo B. ------------------------------------------------------------------------------ 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 comtypes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/comtypes-users