Visual Basic - Llamada por Modem

Life is soft - evento anual de software empresarial
 
Vista:

Llamada por Modem

Publicado por victor avalos (4 intervenciones) el 19/03/2008 06:31:20
Necesito que alguien me ayude! tengo la siguiente aplicacion y lo que hago es invocar al phone dialer que trae windows XP para realizar una llamada telefonica via modem, y hasta ahi esta bien ya las realiza, pero necesito que cuando contesten en lugar de darle entrada por el micro para la voz se active una grabacion determinada!

Si alguien tiene alguna idea o sabe como hacerlo se lo agradeceria, aqui les dejo el codigo que use, o si alguien conoce una forma mas sencilla de hacerlo tambien seria de ayuda..


Option Explicit

Private Declare Function tapiRequestMakeCall& Lib "TAPI32.DLL" (ByVal DestAddress$, ByVal AppName$, ByVal CalledParty$, ByVal Comment$)
Private Const TAPIERR_NOREQUESTRECIPIENT = -2&
Private Const TAPIERR_REQUESTQUEUEFULL = -3&
Private Const TAPIERR_INVALDESTADDRESS = -4&

Private Sub Form_Load()
EnableDial
End Sub

Private Sub txtNumber_Change()
EnableDial
End Sub

Private Sub cmdDial_Click()
Dim buff As String
Dim nResult As Long

nResult = tapiRequestMakeCall&(Trim$(txtNumber), CStr(Caption), "Test Dial", "")

If nResult <> 0 Then
buff = "Error dialing number : "
Select Case nResult
Case TAPIERR_NOREQUESTRECIPIENT
buff = buff & "No Windows Telephony dialing application is running and none could be started."
Case TAPIERR_REQUESTQUEUEFULL
buff = buff & "The queue of pending Windows Telephony dialing requests is full."
Case TAPIERR_INVALDESTADDRESS
buff = buff & "The phone number is not valid."
Case Else
buff = buff & "Unknown error."
End Select
MsgBox buff
End If
End Sub

Private Sub cmdExit_Click()
Unload Me
End Sub

Private Sub EnableDial()
cmdDial.Enabled = Len(Trim$(txtNumber)) > 0
End Sub
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder