D
dufus
I have something I'm writing as a windows form right now but it will
eventually be a Windows Service. For a test, I have a submit button
and it's action is to call something that dials out on a usb phone
device. While that device is dialing and waiting for DTMF input from
the call recipient, I need to pause the program and wait for the
callee to hang up. The device I call has a bunch of handlers that
handle the keys being entered, etc. I need to have these handlers
able to listen for events while the button click sub is waiting but be
able to continue when a hangup event occurs. I'm not asking for
someone to write code for me but just looking for some of the words I
can search for on the internet or some pointers... Thanks very
much. Chris
I've attached a bit of the code...
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
AddHandler CWay2callDriver.OnLineCurrentDrop, AddressOf OnLineDrop
Dim xError As CWay2callDriver.Errors = DirectCast(w2cDrv.Device.[Call]
("w" & strNumber, True, True), CWay2callDriver.Errors) 'So this is
where it calls out....
'I need to sort of pause here and not actually end the sub. I tried
adding a do/while but it is in such a tight loop that the events never
fire when things happen on the dialer.
End Sub
Private Sub OnLineDrop(ByVal deviceID As UShort)
MyHangUpCall = 0
w2cDrv.Device.HangUp(False)
w2cDrv.Device.Close(0)
'close the device
' handle errors ...
w2cDrv.ShutdownDriver(0)
boolCallFinished = True
End Sub
eventually be a Windows Service. For a test, I have a submit button
and it's action is to call something that dials out on a usb phone
device. While that device is dialing and waiting for DTMF input from
the call recipient, I need to pause the program and wait for the
callee to hang up. The device I call has a bunch of handlers that
handle the keys being entered, etc. I need to have these handlers
able to listen for events while the button click sub is waiting but be
able to continue when a hangup event occurs. I'm not asking for
someone to write code for me but just looking for some of the words I
can search for on the internet or some pointers... Thanks very
much. Chris
I've attached a bit of the code...
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
AddHandler CWay2callDriver.OnLineCurrentDrop, AddressOf OnLineDrop
Dim xError As CWay2callDriver.Errors = DirectCast(w2cDrv.Device.[Call]
("w" & strNumber, True, True), CWay2callDriver.Errors) 'So this is
where it calls out....
'I need to sort of pause here and not actually end the sub. I tried
adding a do/while but it is in such a tight loop that the events never
fire when things happen on the dialer.
End Sub
Private Sub OnLineDrop(ByVal deviceID As UShort)
MyHangUpCall = 0
w2cDrv.Device.HangUp(False)
w2cDrv.Device.Close(0)
'close the device
' handle errors ...
w2cDrv.ShutdownDriver(0)
boolCallFinished = True
End Sub