|
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.
|
|
|
|
|
Hi all,
when I try to send a mil from my application an exception is thrown...
" Transaction failed. The server response was: sorry, the sender name and auth login doesn't coinside (#5.7.1) "
What could be the reason for this?
Thanking you in advance...
Sebastian T Xavier
|
|
|
|
|
Sebastian T Xavier wrote: the sender name and auth login doesn't coinside
Its telling you something here. I suspect you are not authenticated properly for the mail server.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Thanks for the quick reply, actually this code segment was working for a long time. today only i got this exception.
I believe i haven't done any changes in settings
Thanks
Sebastian T Xavier
|
|
|
|
|
It's not your code that changed, it's the mail server you're using.
To increase security and prevent people from sending mail, such as spam, impersonating someone else, the server, apparently, now checks the outgoing sender name against the registered account. If they don't match, the server stops you from sending the email.
The bottom line is you are going to have to get with the people managing the mail server and find out what the requirements are. Then you're going to have to modify your code to fulfill those requirements.
|
|
|
|
|
Thanks for the help, I will investigate on it.
Thanks once again
|
|
|
|
|
Hii
I am working on SOAP Web service. when i try to call web service method then .NET throw the following error...
"Run-time exception thrown : System.Web.Services.Protocols.SoapHeaderException - The Soap request you send was invalid or malformed!"
Please suggest. How can i solve this problem.
Please suggest.
Thanks
~Khatri Mitesh
~Khatri Mitesh
khatrimitesh@hotmail.com
Bikaner (Rajasthan)
INDIA
|
|
|
|
|
~Khatri Mitesh~ wrote: The Soap request you send was invalid or malformed
Says it all really. Have you stepped into the code and looked at the actual values you are generating?
Bob
Ashfield Consultants Ltd
|
|
|
|
|
hi all
i use following statement for import drawing related classes
imports System.Drawing
i want to use 2D class but when i type . (after typing imports System.Drawing), then no intelligence is appeared related to 2D. Even when i Forcely type imports System.Drawing.2D , then it give error
how can i resolve this error ? Please suggest
|
|
|
|
|
|
Hi everyone,
I´m programming an application win forms and in some parts of my application I have a strong processing module, and I´ve decided do make a loading screen.
So, i´ve done it:
Private Sub ShowLoading()
Dim frmBlank As New frmBlank
frmBlank.Cursor = Cursors.WaitCursor
frmBlank.Show()
Dim frmLoading As New frmLoading
frmLoading.ShowDialog()
End Sub
Private Sub StartLoadingThread()
thread = New Threading.Thread(AddressOf ShowLoading)
thread.Start()
End Sub
Private Sub StopLoadingThread()
thread.Abort()
End Sub
But, the problems appear, when i abort the thread, the loading form closes, as it have to close, but the whole application minimizes.
I´m using the form in a Class Library, and it start maximized. THe whole think works as it have to work perfectly, but the problem is the application minimize.
Thanks everyone!
-----
LeandroAB
|
|
|
|
|
Why are you show the loading form on a seperate thread? From what you're describing, you wouldn't need any threading at all. Also, why is the "Loading..." form being shown as a dialog?? and I have no idea what frmBlank is for.
From your description, it should be a simple matter of creating and showing a "Loading..." form, doing your work, then destroying the "Loading..." form. Creating forms and show ing in anything other than the UI thread is not a good idea, as you've found out from your weird side-effects.
|
|
|
|
|
Let me try to explain more detailed my problem.
I have a very long process, and I don´t want to lock the screen without a message. So I did a loading form, that has only one label: "Loading..."
When i start the process, the form was displayed, and when the process ends, i have to close the form. Thats the reason that i habve to use a thread, because i have to continue with my process in background.
The frmBlank is only used to stay between the application and the loading form, without its the problem continues ocurring.
When i kill the thread, the forms closes automaticaly, but i´ve tried to close mannualy the form in the thread, and the problems continues ocurring.
I show the form as a dialog, to block the user access to the system during the process.
Thanks for your time.
-----
LeandroAB
|
|
|
|
|
LeandroABorges wrote: When i start the process, the form was displayed, and when the process ends, i have to close the form. Thats the reason that i habve to use a thread, because i have to continue with my process in background.
OK. It's the long-running process that goes on the background thread, not the "Loading..." form.
|
|
|
|
|
But how can i show the loading form, in many different process types without making a form for each process thread?
If i show the form in the thread, the process will stop, because it´s a dialog.
If i show the form where i call the thread, the problema is the same.
How i can tell the form that the process has finished and it can close?
-----
LeandroAB
|
|
|
|
|
LeandroABorges wrote: But how can i show the loading form, in many different process types without making a form for each process thread?
How about a Shared Sub? Call it whenever you launch a thread.
LeandroABorges wrote: If i show the form in the thread, the process will stop, because it´s a dialog.
No, it won't. The long-running process should be in its own thread. That will NOT hang the UI thread, so it's free to redraw itself whenever needed.
LeandroABorges wrote: If i show the form where i call the thread, the problema is the same.
No, it's not.
LeandroABorges wrote: How i can tell the form that the process has finished and it can close?
The "Loading..." form doesn't know anything about the thread process, so it'll have to be destroyed by the form that created it when you code determines that the process is complete. You might want to look into the BackgroundWorker component to help you with this.
|
|
|
|
|
Dave,
Thanks for your help, i´ve decided to do somethink more simple, i´m almost out of time.
I´ve disabled all the form (frm.enabled = false) and make some "Loading" label visible.
Thanks for your time.
-----
LeandroAB
|
|
|
|
|
Dear all,
i just want to write a program to create a PDF file from Crystal report for VS2005,
can add a password to the PDF file by coding ?
Many thanks for ur help!!!
Leo
|
|
|
|
|
It depends on if that functionality is built into the PDF SDK that you are using. The PDF format does support this because I have seen it done, but you need to find a library that allows you to add this functionality.
Or, the other option. Create the PDF file then encrypt it with your own program with the specified password. Then use your program as an in-between for the password protection. Once the file is decoded then send it to adobe reader.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my Blog
|
|
|
|
|
hi,
i write a code in vb.net for downloading a remote file from SSL ftp using REBEX tool..i can open the connection and get the file name from specific directory....but i can't download the file to local machine..how can i download the file using REBEX SSL/FTP???..i need that function name...
i already using the stream concepts...but i cant read a remote file ...i need that coding or any logic.....URGENT PLZ....
THANKS IN ADVANCE....
--ANTO
|
|
|
|
|
Well, if its a tool from someone called Rebex, I suggest asking them - after all, they wrote the software.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Just out of curiosity, I went to the REBEX site and I notice that the downloads contain EXAMPLES.
It's always URGENT and you should already have the codz
And I hope I'm not just feeding a troll - again
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
when i am improting excel file to datagrid some of the fields are missing in grid like for example some of the phone numbers missing in datagrid is there any solution for this
|
|
|
|
|
Some details on how you acheive the import would be useful!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi
I have a Base class which exposes some public properties, and I derive a second class.
I want the second class, not to have some of the public properties of its parent.
(I don't want to use Shadows statement to create a new empty property, I want to hide it completely)
Could you please help me?
|
|
|
|