What is CommX |
sysFire has added a new member to its catalog of Greenleaf Software communications programming tools. CommX is an ActiveX control that simplifies three different aspects of working with serial ports under Win32:
|
It’s complete |
Like all Greenleaf products, CommX comes with full documentation, technical support directly from sysFire and a 30-day money-back guarantee from sysFire LLC, producer of the Greenleaf communications software products. |
Why use a control? |
As Microsoft’s operating systems and programming tools have matured, programmers have found that they have been able to drop most of their third-party programming tools. Vendors of libraries covering user interfaces, database access, and Internet tools have found their libraries somewhat redundant. Microsoft has made some products obsolete by adding functionality to Windows itself, or by developing new classes and code for MFC. However, Microsoft has yet to turn its attention to the problems faced by developers when working with RS-232 ports. MFC essentially offers developers no help whatsoever in this area, and the Win32 communications API is actually worse than that for Win16 in ease of use! The Win16 communications API made working with serial ports a fairly straightforward job. Despite a few implementation bugs, programmers at least found it simple to set up, read and write from ports. Under Win32, a modified API virtually mandates that developers using serial ports have to set up a multithreaded, event driven interface. This raises the complexity bar quite a bit! Even worse, we have seen absolutely no support added for two basic programming problems: file transfers and terminal emulation. Programmers working in those areas find themselves starting on the ground floor with no help from Microsoft. Even the much heralded .NET CLR (Common Language Runtime) does no more For Windows. |
Greenleaf Port Control |
CommX ships with three easy to use ActiveX controls. The Port control provides a single point of interface for everything having to do with simple serial port communications. This includes:
The actual interface to the serial port is managed in several threads running independently of your main program. The design of Microsoft’s Win32 comm driver requires independent I/O threads so that your main thread is not blocked due to various conditions. This multithreading also allows for efficient event driven programming. For example, instead of polling a port for input data, you can direct the CommX Port control to generate events whenever new data appears. Likewise, you can generate events when a modem hangs up or detects an incoming call. The Port control also offers easy setup using the built in property pages. A combo box offers a list of available ports, differentiating between those connected to modems, mice, or nothing. All standard properties such as baud rate, handshaking, parity, etc. can be set up using a single interface, which may relieve the developer of a substantial amount of coding. In addition, these properties are persistent, making it easy to set them up at design time. |
The Terminal Control |
Performing terminal emulation under Windows is a difficult task. For reasons known only to Microsoft, Windows doesn’t supply a basic text display control that acts like a terminal screen. Even worse, standard fonts used by Windows don’t supply the line drawing characters used by many programmers when performing PC-ANSI emulation. Overcoming these problems, and adding niceties such as colored text blocks, colored backgrounds, and screen scrolling presents the programmer with a big job. Even once a programmer overcomes these difficulties by developing a complicated new control, the problem of parsing the input is still present. Converting ANSI escape sequences into terminal commands represents yet another big programming task. Greenleaf takes care of all these problems for you with an easy to use Terminal control. For programming environments like Visual Basic, creating a terminal emulator can now be done by simply dropping the control on a form and adding a single line of code to initialize the port! Some of the features offered by this control include:
Using the Terminal control in your program is so easy that you can add it to your program and be up and running in minutes, not days or weeks. |
The File Transfer Control |
The most widely used protocol for RS-232 file transfers is undoubtedly ZModem. Unfortunately, ZModem is not a simple, clean protocol. Implementing ZModem on your own can be a task that soon takes on nightmare proportions. This is clearly a job for a library component, which is where Greenleaf’s CommX File Transfer Control comes into play. The File Transfer Control is based on the same body of code that has been finely tuned over the years in best-selling products like Greenleaf CommLib and Comm++. C and C++ programmers have been using this code successfully for years. Placing the code in an ActiveX control makes it even easier to use. Like the other two controls in CommX, most of the options and features in this control can be setup using either the built-in property page, or programmatically. The persistence of the features makes design time setup a breeze, and makes it easy to modify and save features. Some of these options and features include:
In addition, the File Transfer Control has a standard progress window that integrates seamlessly with existing programs. The progress window provides valuable feedback that gives end users the assurance that their communications software is really working! |
Summary |
Greenleaf CommX takes the pain out of serial communications programming. The three ActiveX controls in this package simplify serial port access, terminal emulation, and file transfers. Developers will save literally months of time by letting Greenleaf CommX implement these functions instead of reinventing the wheel. And ActiveX technology means that integrating the controls with their programs is a breeze. The leverage you get from the purchase price of Greenleaf CommX makes your buying decision a no-brainer. |