Antonio
This piece of code works ok in Xhb.com
Comando:=Chr(2) + Chr(1)
Ef:AddDataField(Comando)
Extension:=VtArrayWrapper(VT_UI1,(CHR(0) + CHR(0) + CHR(0) + CHR(0)))
Ef:AddDataField( Extension )
Ef:SendCommand()
It sends 13 bits to com1, like the OCX is intended to do..
--> Length 13: 02 D5 1B 02 01 1C 00 00 03 30 31 31 34
But....
Comando:=Chr(2) + Chr(1)
Ef:DO("AddDataField",COMANDO)
Extension:=VtArrayWrapper(VT_UI1,(CHR(0) + CHR(0) + CHR(0) + CHR(0)))
Ef:DO("AddDataField", Extension)
Ef:Do("SendCommand")
... sends only 11
--> Length 11: 02 D5 1B 02 01 1C 03 30 31 31 34
My definition of the Activex is like this...
Ef:=TActiveX():New( , "EpsonFPHostControlX.EpsonFPHostControl")
Ef:nWidth = 0
Ef:nHeight = 0
Ef:Do("OpenPort")
Quite simple, in Xhb Works Ok but I can't make it work in FWH only...
Any help will be appreciated.