There is an unsaved comment in progress. You will lose your changes if you continue. Are you sure you want to reopen the work item?
Error 756 "This connection is already being dialed." on subsequent dials when a modem is not responding.
(Possibly related to 12104, but I suspect it isn't)
If a modem does not respond during a dial, the port is not closed when the dialer cleans up. This results in the error 756 "This connection is already being dialed." which will then continue to occur until the program is restarted.
In the RasDialer.RasDialCallback() function, you will find that e.State == RasConnectionState.OpenPort in this scenario. When this.Abort() is subsequently called, it calls RasHelper.Instance.IsConnectionActive(). The first problem is that this function does
not consider the connection "active" just because the port is open, and therefore does not attempt to hang it up.
The second problem is in the RasHelper.Instance.HangUp() function itself. It does not correctly handle the return code (ERROR_NO_CONNECTION) when called in this state. it throws an error when instead it should simply set the handle as invalid and continue.
Although the Hangup() function does not report SUCCESS in this case, it does actually close the port, which allows successive dials to be made without invoking the wrath of error 756.
To replicate the problem, attempt to dial through a modem that is physically switched off.
I have attached a patch to handle the scenario.