[DLL C --> VB] tableau de Byte
Bonjour,
Je dois interfacer le monnayeur RM5 de Comestero via son interface port COM, à l'aide des 3 DLLs fournies.
Je rencontre un problème avec 2 fonctions qui prennent en paramètre un tableau de Byte.
====================================
Déclaration des fonctions dans la DLL "RM5.DLL"
====================================
Code:
1 2 3 4
|
Function Get_enable_word_Ex(Var HCom : Integer;Port as Byte; Offset as Byte;Echo as boolean; Var Abilitation as Array[0..7]Of Byte ):Boolean; StdCall
Function Set_enable_word_Ex(Var HCom : Integer;Port as Byte; Offset as Byte;Echo as boolean; Var Abilitazione as Array[0..7]Of Byte ):Boolean; StdCall |
================================
Déclaration des fonctions dans le code VB
================================
Code:
1 2 3 4
|
Private Declare Function Set_enable_word_Ex Lib "rm5.dll" (Hcom As Long, Port As Byte, Offset As Byte, Echo As Boolean, Abilitation() As Byte) As Boolean
Private Declare Function Get_enable_word_Ex Lib "rm5.dll" (Hcom As Long, Port As Byte, Offset As Byte, Echo As Boolean, Abilitazione() As Byte) As Boolean |
================================
Appel des fonctions dans VB
================================
Code:
1 2 3 4 5
|
'création du tableau de Byte de 0 à 7
Dim tablo(0 to 7) As Byte
'
MsgBox(Get_enable_word_Ex(HandleCom, PortCom, OffsetCom, EchoCom, tablo())) |
Là le code me renvoie toujours false. :(
Les déclarations sont elles exactes ?
J'ai bien passé le tableau de Byte ?
Merci pour toute aide