Jump to content
View in the app

A better way to browse. Learn more.

Tuts 4 You

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Problem with winsock.sendData on chinese operative systems VB6

Featured Replies

Posted

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 st1

in 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

 

 

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 by evlncrn8

  • Author

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 Sub

I 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


 


  • Author

problem solved...


 


I found how to enable compatibility under chinese windows, and now, it works perfect

 

thanks!!

 

 

 

oSrwjaA.jpg

Create an account or sign in to comment

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.