Click here to Skip to main content
15,921,226 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionNetwork enabled app Pin
Ekjon15-Oct-08 11:08
Ekjon15-Oct-08 11:08 
AnswerRe: Network enabled app Pin
Dave Kreskowiak15-Oct-08 17:44
mveDave Kreskowiak15-Oct-08 17:44 
GeneralRe: Network enabled app Pin
Ekjon16-Oct-08 5:52
Ekjon16-Oct-08 5:52 
GeneralRe: Network enabled app Pin
Dave Kreskowiak16-Oct-08 6:36
mveDave Kreskowiak16-Oct-08 6:36 
GeneralRe: Network enabled app Pin
Ekjon16-Oct-08 6:56
Ekjon16-Oct-08 6:56 
GeneralRe: Network enabled app Pin
Dave Kreskowiak16-Oct-08 10:35
mveDave Kreskowiak16-Oct-08 10:35 
GeneralRe: Network enabled app Pin
Ekjon16-Oct-08 11:01
Ekjon16-Oct-08 11:01 
QuestionVB6 Winsock cannot receive NULL? Pin
Levisvv15-Oct-08 6:37
Levisvv15-Oct-08 6:37 
I am writing an interface to a Panasonic KX-TDA telephone system using Winsock.

I can connect to the PBX and it accepts my connection properly using TCP, then I can send the initial connect string as follows:

Mtosend = Chr$(&H0) & Chr$(&H25) & Chr$(&H60) & Chr$(&H23) & Chr$(&H80) & Chr$(&H2) & Chr$(&H7) & Chr$(&H80) & Chr$(&HA1) & Chr$(&H7) & Chr$(&H6) & Chr$(&H5) & Chr$(&H2B) & Chr$(&HC) & Chr$(&H0) & Chr$(&H81) & Chr$(&H5A) & Chr$(&HBE) & Chr$(&H14) & Chr$(&H28) & Chr$(&H12) & Chr$(&H6) & Chr$(&H7) & Chr$(&H2B) & Chr$(&HC) & Chr$(&H0) & Chr$(&H82) & Chr$(&H1D) & Chr$(&H81) & Chr$(&H48) & Chr$(&HA0) & Chr$(&H7) & Chr$(&HA0) & Chr$(&H5) & Chr$(&H3) & Chr$(&H3) & Chr$(&H0) & Chr$(&H8) & Chr$(&H0)
Winsock1.SendData Mtosend


When I monitor the connection using WireShark it appears that the PBX accepts the string properly and sends a reply back, I get 51 bytes of data back, but if I read it as a string it simply shows as a "NULL" string. If I read it into a byte array, using the following code I only get zero's:

Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
Dim DL As String
Dim DTS As String
Dim byteData(256) As Byte
Dim i As Integer

DL = CStr(bytesTotal)
DTS = ""
Winsock1.GetData byteData(), vbArray + vbByte, Val(Trim(DL))
For i = 0 To bytesTotal - 1
    DTS = DTS & " " & Right$(("00" & Hex$(byteData(i))), 2)
Next
MsgBox "TCP Rx: " & DTS & "  (bytes=" & DL & ")"
Exit Sub


But when I look at the trace in WireShark, the PBX did not send only zero's it sent a valid reply, The PBX returned string started the data with a null, but the rest was valid data. What am I doing wrong?

Please help.Confused | :confused:
QuestionMail sending failed Pin
Sebastian T Xavier15-Oct-08 5:19
Sebastian T Xavier15-Oct-08 5:19 
AnswerRe: Mail sending failed Pin
Ashfield15-Oct-08 5:21
Ashfield15-Oct-08 5:21 
GeneralRe: Mail sending failed Pin
Sebastian T Xavier15-Oct-08 5:29
Sebastian T Xavier15-Oct-08 5:29 
GeneralRe: Mail sending failed Pin
Dave Kreskowiak15-Oct-08 5:35
mveDave Kreskowiak15-Oct-08 5:35 
GeneralRe: Mail sending failed Pin
Sebastian T Xavier15-Oct-08 5:48
Sebastian T Xavier15-Oct-08 5:48 
QuestionError from web service Pin
~Khatri Mitesh~15-Oct-08 4:36
~Khatri Mitesh~15-Oct-08 4:36 
AnswerRe: Error from web service Pin
Ashfield15-Oct-08 5:20
Ashfield15-Oct-08 5:20 
QuestionIntellisense is not displayed Pin
sunil goyalG15-Oct-08 3:20
sunil goyalG15-Oct-08 3:20 
AnswerRe: Intellisense is not displayed Pin
EliottA15-Oct-08 3:49
EliottA15-Oct-08 3:49 
QuestionThread Minimize Application Pin
LeandroABorges15-Oct-08 2:15
LeandroABorges15-Oct-08 2:15 
AnswerRe: Thread Minimize Application Pin
Dave Kreskowiak15-Oct-08 3:20
mveDave Kreskowiak15-Oct-08 3:20 
GeneralRe: Thread Minimize Application Pin
LeandroABorges15-Oct-08 5:13
LeandroABorges15-Oct-08 5:13 
GeneralRe: Thread Minimize Application Pin
Dave Kreskowiak15-Oct-08 5:28
mveDave Kreskowiak15-Oct-08 5:28 
GeneralRe: Thread Minimize Application Pin
LeandroABorges15-Oct-08 5:39
LeandroABorges15-Oct-08 5:39 
GeneralRe: Thread Minimize Application Pin
Dave Kreskowiak15-Oct-08 7:05
mveDave Kreskowiak15-Oct-08 7:05 
GeneralRe: Thread Minimize Application Pin
LeandroABorges15-Oct-08 7:25
LeandroABorges15-Oct-08 7:25 
QuestionCreate a password protected PDF file Pin
Leo Lai15-Oct-08 0:14
Leo Lai15-Oct-08 0:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.