Public Sub HangUpPhone(Comm As MSComm)
If Comm.PortOpen Then
Screen.MousePointer = vbHourglass
Comm.OutBufferCount = 0
Comm.InBufferCount = 0
Comm.RThreshold = 0
'*************************************
Dim Ret As Boolean
Ret = Comm.DTREnable
Comm.DTREnable = True
Pause (1)
Comm.DTREnable = False
Comm.Output = "+++" + vbCrLf '* 这三句必须插在Comm.DTREnable = False
Pause (1) '* 和Comm.DTREnable = Ret之间,否则"AT"
Comm.Output = "ATH0" + vbCrLf '* 指令不能控制MODEM...... sxmzmxh(深巷)原来的Comm.DTREnable = False,Comm.DTREnable = Ret 两句是在一起的....所以有可能不能控制MODEM,(初始化成&D2,&D3时例外)
'------------------------------
Pause (1)
Comm.DTREnable = Ret
'*************************************
Comm.RThreshold = 1
Pause (1)
Comm.PortOpen = False
Screen.MousePointer = vbNormal
End If
End Sub
'------------------------------------------------------------------