Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
MSCOMM32.OCX Problem.
Message
De
12/03/1997 13:59:29
 
 
À
12/03/1997 10:09:22
Narendra Lilaramani
Gentech Business Machines Ltd
Ahmedabad, Inde
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Divers
Thread ID:
00023767
Message ID:
00023930
Vues:
28
>>>>Hi All.
>>>>I want use modem in my application.
>>>>I am write follow code:
>>>>
>>>> ***** Top Code*****
>>>> ComForm = CREATEOBJECT('Form') ComForm.AddObject("Testcom","Olecontrol","MSCOMMLib.MSComm")
>>>>
>>>>ThisForm.Testcom.CommPort = 2
>>>>ThisForm.Testcom.Settings = "28800,N,8,1"
>>>>
>>>>ThisForm.Testcom.PortOpen = .T.
>>>>ThisForm.Testcom.InputLen=0
>>>>ThisForm.Testcom.Output = "ATDP2559902" + chr(13)
>>>>
>>>> ThisForm.Testcom.PortOpen = .F.
>>>> ***** End Code *****
>>>>
>>>>But my modem do't deal... :(((.
>>>>Other property mscomm32 default.
>>>>Thanks.
>>>>Denis.
>>>
>>>Hi Denis,
>>>
>>>Add:
>>>ThisForm.Testcom.Rthreshold=1
>>>ThisForm.Testcom.Sthreshold=1
>>>
>>>Place before port close:
>>>Wait window 'dialing'
>>>
>>>Rthreshold sets the threshold for the number of characters in queue before action is taken. Sthreshold sets the threshold for number of characters in queue *before any are sent*. Default is 0, which means *never transmit*
>>>
>>>HTH
>>
>Hi Glenn,
>
>I think code should work without the modifications you have suggested.
>Actually Rthreshold & Sthreshold is used for Event driven Reading
>and Writing of Serial Port. Whereas Denis just simply writes
>to the port (He does not want to use ONComm Event). I don't think there is any problem in the code. May be There is some problem in Hardware setting.
>Denis, may be you can try this
>testcomm.output="AT"+chr(13) && modem should reply to this as "OK"
>Do while .t.
> reply=testcomm.input
> if reply="OK"
> exit
> endif
>enddo
>testcom.portopen=.f.

Hi Narendra,
If this code correct, and my other termianal programm is worked... May be I have a problem with mscomm32.ocx file :(((

Thanks.
Denis
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform