Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MSCOMM32.OCX Problem.
Message
 
To
13/03/1997 12:25:40
General information
Forum:
Visual FoxPro
Category:
Third party products
Miscellaneous
Thread ID:
00023767
Message ID:
00024152
Views:
49
Hi Denis,

Here is some code you can cut & paste into a .PRG, and DO the .PRG
This will give you *some* feedback on the modem status. If the modem fails to reset, try the alternate line of code that is commented out.
This code runs on my PC on VFP 5.0 and Windows 95.

***** Top Code*****
ComForm = CREATEOBJECT('Form')
ComForm.AddObject("Testcom","Olecontrol","MSCOMMLib.MSComm")
ComForm.Testcom.CommPort = 2
ComForm.Testcom.Settings = "9600,N,8,1"
ComForm.Testcom.PortOpen = .T.
ComForm.Testcom.Sthreshold=1
ComForm.Testcom.InputLen=0


* standard modem reset
ComForm.Testcom.OUTPUT="AT&F"+CHR(13)

* US robotics and some other FAX modem reset
*ComForm.Testcom.OUTPUT="AT&F1"+CHR(13)

wait window "modem reset" timeout 2
cTestData=ComForm.Testcom.INPUT
IF ! "OK"$cTestData
wait window "Modem Failed to reset"
ENDIF

ComForm.Testcom.OUTPUT="ATE1V1&C1&D3S7=30X4"+CHR(13)
wait window "modem initialize" timeout 2
cTestData=ComForm.Testcom.INPUT
IF ! "OK"$cTestData
wait window "Modem Failed to initialize"
ENDIF
ComForm.Testcom.Output = "ATDP3716660" + chr(13)
wait window "dialing - press any key to exit"

ComForm.Testcom.DTREnable=.F.
wait window "disconnecting" timeout 3
ComForm.Testcom.DTREnable=.T.
ComForm.Testcom.PortOpen = .F.
***** End Code ***

HTH
Glenn
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform