I want to send some packets they are in hex format
01 00 00 00 AA 00 00 00 01
because how winsock works i first need to convert it to ascii right?
how could i do that every time i try it looses the NULLS - 00
help would be appreciated thanks...
using vb6 btw
this is the script i use to convert hex to ascii
Private Function HexToString(Value As String)
Dim szTemp As String
szTemp = Value
Dim szData As String
szData = ""
While Len(szTemp) > 0
szData = Chr(CLng("&h" & Right(szTemp, 2))) & szData
If (Len(szTemp) = 1) Then
szTemp = Left(szTemp, Len(szTemp) - 1)
Else
szTemp = Left(szTemp, Len(szTemp) - 2)
End If
Wend
HexToString = szData
End Function