Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem using dialer in Win 2.6 and XP
Message
From
25/02/2003 14:50:29
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Title:
Problem using dialer in Win 2.6 and XP
Miscellaneous
Thread ID:
00757752
Message ID:
00757752
Views:
47
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
Map
View

Click here to load this message in the networking platform