Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MSCOMM32.OCX Problem.
Message
From
14/03/1997 00:51:04
 
General information
Forum:
Visual FoxPro
Category:
Third party products
Miscellaneous
Thread ID:
00023767
Message ID:
00024193
Views:
47
>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

Congratulations!
Your code is really working.
Probably I must initialize modem (ComForm.Testcom.OUTPUT="ATE1V1&C1&D3S7=30X4"+CHR(13))
Thank you very much ! I am happy ;))))
Denis
Previous
Reply
Map
View

Click here to load this message in the networking platform