General information
Title:
Problem using dialer in Win 2.6 and XP
I have a FoxPro for Win 2.6a app that was running fine on a NT4 machine. It used the code from \GOODIES\FOXTOOLS\dialer.prg to allow a user to dial a phone through a modem connection.
The app declared 3 public vars
IF ATC("FOXTOOLS",csetlib) = 0
SET LIBRARY TO SYS(2004)+"FOXTOOLS.FLL" ADDITIVE
ENDIF
_opencomm = regfn("OpenComm","CII","I","USER.EXE")
_writecomm = regfn("WriteComm","ICI","I","USER.EXE")
_closecomm = regfn("CloseComm","I","I","USER.EXE")
and then in the code it looks for an open com port, gets an open handle and dials. At the end it closes the handle
nhandle = callfn(_opencomm,ccomport,256,256)
=INKEY(.5,"H")
cstring = "ATDT "+cphoneno+CHR(13)+CHR(10)
=callfn(_writecomm,nhandle,cstring, LEN(cstring))
WAIT WINDOW "Pickup the Phone Now to Talk when Someone Answers" TIMEOUT 90
cstring = "ATHO "+cphoneno+CHR(13)+CHR(10)
=callfn(_writecomm,nhandle,cstring, LEN(cstring))
=callfn(_closecomm,nhandle)
We ported this over to xp and it works once time each session. To get it work a second time, we need to reboot or clear the modem by switching it off. I have tried also to make sure that app hangs up by looking for an open handle and hangs up before it tries to connect again
cstring = "ATZ"+CHR(13)+CHR(10)
=callfn(_writecomm,open_hdl,cstring, LEN(cstring))
=callfn(_closecomm,open_hdl)
Has anyone seen this type of behavior in xp?
Thanks
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only