nicogalan Posted March 23, 2014 Posted March 23, 2014 Hello, I have coded a software, and its working fine on latin and english operative systems, but it does not work godd on Chinese Windoxs XPI have a module, for strings, conversion etc etc....Code is: st1 = HexToAsc("100404084A011004C8DC")Winsock2.SendData st1in latin server / client app, I receive very same string I sent.... I use winsock.GetData but on chinese windows xp it does not I receive this:100404084A0110040000 (C8DC is now 0000)what could the problem be?? unicode related?? thanks
evlncrn8 Posted March 23, 2014 Posted March 23, 2014 (edited) yeh i'd point the finger at unicode or right to left stuff... without seeing the actual code, its hard to say, but its a good place to start Edited March 23, 2014 by evlncrn8
nicogalan Posted March 23, 2014 Author Posted March 23, 2014 Thanks, there is not much to see in the code... here it is.... Private Sub Command7_Click() Winsock2.Connect End Sub Private Sub XT_Click() st1 = HexToAsc("100404084A011004C8DC") Winsock2.SendData st1 Timer1.Enabled = True End Sub Private Sub Timer1_Timer() Dim daAr() As Byte Dim daStrg As String Text3 = T1 If T1 >= 5 Then MsgBox "Timeout", vbCritical, "Timeout" Timer1.Enabled = False T1 = 0 Exit Sub End If If Winsock2.State = 7 And T1 >= 2 Then Winsock2.GetData daAr daStrg = StrConv(daAr, vbUnicode) Text1 = daStrg Text2 = StringToHex(daStrg) Text2 = Replace(Text2, " ", "") Timer1.Enabled = False T1 = 0 End If T1 = T1 + 1 End SubI connect, then send the data (data is converted to from hex to ascii by a function in module) then I call to timer, it waits for 2 seconds, and then reads reply... problem is sending data.... no matter about right to left, because if I invert string like this: st1 = HexToAsc("C8DC100404084A011004") 0000100404084A011004 is sent.... thanks
nicogalan Posted March 27, 2014 Author Posted March 27, 2014 problem solved... I found how to enable compatibility under chinese windows, and now, it works perfect thanks!!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now