Sub SendHRDmessage(messagee As String)
Dim nSize,nSanity1, nSanity2,nChecksum, nZero, lngt,i As Int
'StringToBytes (bc As String) As Byte()
Dim bc As ByteConverter
Dim header(4) As Int
Dim strMessage, S As String
nZero = 0
strMessage = messagee & " "
bc.LittleEndian = True
lngt=bc.StringToBytes(strMessage,"UNICODE").Length
Dim bytData(lngt) As Byte
bytData = bc.StringToBytes(strMessage,"UNICODE")
lngt = 16 + bytData.Length - 2
Dim byAll(lngt) As Byte
header(0) = lngt
header(1) = 0x1234ABCD
header(2) = 0xABCD1234
header(3) = nZero
bc.ArrayCopy(bc.IntsToBytes(header),0,byAll,0,16)
bc.ArrayCopy(bytData,2,byAll,16,bytData.Length-2)
sHRDanswer = ""
'bCmdDone = False
AStreams3.Write(byAll)
ToastMessageShow(bytData, True)
End Sub