C
cadriansyah
i have a socket apllication written in .NET (VB) that send data
(microsoft sample)
Public Sub SendData(ByVal Data As String)
' Synclock ensure that no other threads try to use the stream
at the same time.
SyncLock client.GetStream
Dim writer As New IO.StreamWriter(client.GetStream)
writer.Write(Data & Chr(13) & Chr(10))
' Make sure all data is sent now.
writer.Flush()
End SyncLock
End Sub
.....
.....
client.SendData(strMessage)
.....
.....
# but when i receive from vb6 application #
Public Sub sockMain_DataArrival(ByVal bytesTotal As Long)
Dim strData As Variant
MDIForm1.sockMain.GetData strData
If Not IsNull(strData) Then
MsgBox strData
End If
End Sub
it returns NUMBER (numerical value)
what does it mean ?
how do i translate it ?
how do i find an equivalent function as thi one :
strMessage = Encoding.ASCII.GetString(readBuffer, 0, BytesRead - 2)
thank you
(microsoft sample)
Public Sub SendData(ByVal Data As String)
' Synclock ensure that no other threads try to use the stream
at the same time.
SyncLock client.GetStream
Dim writer As New IO.StreamWriter(client.GetStream)
writer.Write(Data & Chr(13) & Chr(10))
' Make sure all data is sent now.
writer.Flush()
End SyncLock
End Sub
.....
.....
client.SendData(strMessage)
.....
.....
# but when i receive from vb6 application #
Public Sub sockMain_DataArrival(ByVal bytesTotal As Long)
Dim strData As Variant
MDIForm1.sockMain.GetData strData
If Not IsNull(strData) Then
MsgBox strData
End If
End Sub
it returns NUMBER (numerical value)
what does it mean ?
how do i translate it ?
how do i find an equivalent function as thi one :
strMessage = Encoding.ASCII.GetString(readBuffer, 0, BytesRead - 2)
thank you