Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
MSComm Control
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Titre:
Divers
Thread ID:
00567453
Message ID:
00568136
Vues:
43
I tried a different approach and used some code from Microsoft (article "Q139526"):

PUBLIC ComForm
ComForm = CREATEOBJECT('Form')
ComForm.AddObject("Testcom","Olecontrol","MSCOMMLib.MSComm")
ComForm.Testcom.CommPort = 2 && Use Comm2, The second Serial Port.
ComForm.Testcom.Settings = "14400,N,8,1" && 14.4 Kbaud, No Parity,
&& 8 data Bits, 1 Stop Bit
ComForm.Testcom.PortOpen = .T.
ComForm.Testcom.Output = "ATDT555-1234" + chr(13) && Dialing the number
* The chr(13) is needed to complete the modem command sequence
ComForm.Testcom.PortOpen = .F.
***** End Code *****

I've made some changes (commport should be 1 instead of 2, and baud rate should be 9600) and the result was absolutely the same error message: "OLE IDispatch exception code 0 from Mscomm: could not set comm state, there may be one or more invalid communications parameters..."

There is something to do with security options in Windows 2000? Or there is some problem with this piece of code?

Thank you,

Joaquim

>>With VFP 7.0 in Windows 2000 i am trying to send data to a POS display
>>connected to serial port 1 with the following code:
>
>My personal preference is to use OPOS ActiveX controls for working with POS equipment whenever possible. Does your manufacturer ship one?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform