It's my firts post in here so HELLO to everyone.
I have read down whole thread, but i cant figure out why my code not working:
_CommSwitch(12)
_Comm12()
;ConsoleWrite ("Com12:" & _CommPortConnection() &@CRLF)
_CommSendString("com 12 ok")
_CommSwitch(14)
_Comm14()
;ConsoleWrite ("Com14:" & _CommPortConnection() &@CRLF)
_CommSendString("com 14 ok")
_CommSwitch(12)
;ConsoleWrite ("Com12:" & _CommPortConnection() &@CRLF)
_CommSendString("com 12 ok 2")
_CommClosePort()
Func _Comm12()
Local $sportSetError
_CommSetDllPath("C:\Program Files (x86)\AutoIt3\Include\commg.dll")
_CommSetPort(12, $sportSetError, 38400, 8, 0, 1, 2)
If $sportSetError <> '' Then
MsgBox(262144, 'Setport error: ', $sportSetError)
EndIf
EndFunc
Func _Comm14()
Local $sportSetError
_CommSetDllPath("C:\Program Files (x86)\AutoIt3\Include\commg.dll")
_CommSetPort(14, $sportSetError, 38400, 8, 0, 1, 2)
If $sportSetError <> '' Then
MsgBox(262144, 'Setport error: ', $sportSetError)
EndIf
EndFunc
The problem is that i get msgbox :
I am runing on Win10 X64 but using 32bit version of dll and CommMG.
Thank You for Your chelp.
cnc_war