Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MSComm Control
Message
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Title:
Miscellaneous
Thread ID:
00567453
Message ID:
00568361
Views:
171
> 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?

I can't duplicate the problem either, but I don't have anything installed on COM1.

As I asked before, does your manufacturer have an OPOS control? If so, does it work, or do you get similar behavior?
My blog
My consulting page
My home page

Member of the Trim Your Auto-Quote Campaign!
What's another word for thesaurus?
Previous
Reply
Map
View

Click here to load this message in the networking platform