Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MsComm
Message
From
05/12/2002 09:57:35
 
 
To
05/12/2002 09:35:50
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Re: MsComm
Miscellaneous
Thread ID:
00729864
Message ID:
00729874
Views:
12
>Hi!
>
>Can anybody tell me how to send a file to another modem?
>
>I think this can only be done using mscomm. But I don't know how to use it.
>

MSCOMM only provides a low-level view of the serial port; there's no concept of files, file transfers, protocols or the like in MSCOMM. You'd end up having to implement the transfer protocol at low-level in Fox code; not trivial, or optimal as far as performance.

I'd suggest that you do one of three things:

(1) Purchase a third-party package which uses the serial port at a higher level. Products like CommTools (available from www.hallogram.com if you don't have anywhere else to get it) implement serial communications at a much higher level, including provisions for transfer protocols, scripting, dialing and the like. Such packages allow you to implement file transfers without having to implement all the gory details on your own, and use services implemented in a language better suited to the low-level communications task.

(2) Automate or script a third-party product. Dedicated communications products like PCAnywhere, ProComm and the like already understand how to manage the serial port and have concepts of file transfer and the like built into them in much the same way as data manipulation is built into VFP. Both products mentioned support a scripting language, which would let you implement the task with a short script and call it from within your VFP app, placing the burden of managing the modem and file transfer on the third party package.

(3) Treat the connection as a network connection. You can make a connection either routed through the Internet or via direct dial-up; both are supported at the OS level by things like VPN, Dial-Up networking and the like. Relying on these operating system services to make the connection lets you treat your activity just like you would any network connection - you just copy files from one location to the other, without a care if the connection is by a piece of wire, a sattelite link, or carried in small envelopes by dyslexic carrier pigeons. All you're concerned with is that either the file copy worked o it didn't; the OS administered the link between the machines and assured the accuracy and validity of the connection. Nothing changes if you shift from modem to cable modem or to a long piece of string from your application's POV.


>It is possible to initialize the modem but I can't force it to dial the number.

If you really want to do this all yourself, there are examples of using MSCOMM to dial a modem in the Files section. Thumbscrews and other torture devices can also be purchased in the main lobby, right next to the descriptions of how the XMODEM protocol works... < g >
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform