Variant et ActiveX ? |
Sujet: Variant et ActiveX ? par hrun sur 28/9/2007 10:21:26 Bonjour j'aurais besoin d'un coup de main SVP jai un petit souci pour utiliser une fonction d'un ActiveX (cameraIP) avec windev. une partie du source en VB : Private Sub OpenLocation() Dim vSegs As Variant Dim VsegList() As Variant lret = MediaPlayBack1.GetSegmentList(vSegs) .... VsegList = vSegs comboSegment.Clear For i = 0 To UBound(VsegList) FormatDateTimeValue3D i, 0, VsegList, strTot FormatDateTimeValue3D i, 1, VsegList, strTot2 strTot = strTot + " ~ " + strTot2 comboSegment.AddItem strTot, i Next i .... cette fonction me permet de récupèrer la liste détaillée des enregistrements. En Windev ça marche pas : b est un Variant lret=MediaPlayBack1>>GetSegmentList(b) j'ai essayé les tableaux,l'oleautomation mais le lret me retourne une erreur à chaque fois. la doc de la caméra dit : HRESULT GetSegmentList (Variant *pvList,Long *plRet); Parameters pvList [out] The buffer that holds the returned data. It’s a three-dimension array (nx2x6 where n is the number of segments). pvList[n] contains the starting and ending time of each period. pvList[n][0] contains the starting time of the time segment, the six elements are long integers for Year, Month, Day, Hour, Minute, Second for this time. pvList[n][1] contains the ending time of the time segment, the six elements are long integers for Year, Month, Day, Hour, Minute, Second for this time. plRet [out] the return code of the function. 0 means success, others mean failed j'arrive à me connecter sur l'activeX,faire un peu tout, mais je bloque sur ce 'variant' un coup de main serait pas de refus merci ! |