As a result of Curtiss Monroe and MCS' commitment to the retail
community, a complete set of OPOS control objects have been developed for public
use. These are referred to as the "Common Control Objects."
- All OPOS devices are supported.
- The Control Objects and most vendors' Service Objects are 32-bit
components. Therefore, applications that use them must be 32-bit
- An additional COM object declares all of the OPOS numeric constants.
- ATL-based, using dual interfaces so that the app can access them via IDispatch or COM
interfaces (of the form IOPOSCashDrawer_1_9, etc).
Releases through 1.11: Built using Microsoft Visual C++ 6.0, Service Pack 6.
- For Releases beginning 1.12: Built using Microsoft Visual
- Backward compatible with all releases of service objects. This means that they check for older SOs, and return the proper errors to the app if it
accesses unsupported properties or methods.
They have been tested with several major hardware vendors' Service Objects,
and this release addresses the known defects at the time of release.
- Event firing logic supports well-behaved service objects that fire events from the
thread that created the control, plus other service objects that fire them from other
- Self-contained, requiring only standard OS DLLs.
Specifically, they do not require MFC or ATL DLLs.
- For Releases through
1.11: Both MBCS and Unicode versions have been built and given limited testing. At this
time, only the MBCS versions are being posted.
- For Releases
beginning 1.12: Only the Unicode versions are built and posted.
- Source code for all control objects and the constants COM object is available.
- For future additions, it is easy to add new control objects or update old ones.
A custom generator was developed that reads a data file for each control to be built.
To add properties or methods, the procedure is update the data files, regenerate, and build the resulting projects.
- Beginning with Release 1.8, a set of debug CCOs provides enhanced tracing
of method calls, property gets/sets, and event firing.
How to Use the CCOs
- Download and install a recent version of the CCO runtime install file from
the CCO Current Version page.
- Use the CCOs in your application, just as you would with any other COM
- Visual Basic 6: Select the menu item Project / References, and check
the "OPOS xxx Control"s that you need. Then create and use an
instance of the control. For example, to use the Line Display, you can
add the line
Dim WithEvents LD As OPOSLineDisplay
in the general declarations, then add
Set LD = New OPOSLineDisplay
rc = LD.Open("MyLineDisplay")
within the form's code.
- Visual C++ 6, using MFC: Select the menu item Project / Add to Project
/ Components. Select the needed "OPOS xxx Control" from the
Registered ActiveX Controls folder. Insert the component, and repeat
this procedure for other OPOS device types.
Now, the simplest approach is to place an instance of the control on a
dialog, then use the ClassWizard to assign a member variable to this
instance, and to assign event handling functions to it.
Somewhat more challenging is to create the instance programmatically and
hook up event handlers for it.
- If you wish to use the OPOS constants, then you may find the OPOS Constant
library helpful. To use it from VB or VC:
- Visual Basic 6: Select the menu item Project / References, and check "OPOS 1.x Constants".
- Visual C++: Add the line
#import "path\Opos_Constants.dll" no_namespace
to a source file, replacing path with the installed location of the file (or putting this location in the Include section under the Directories tab of the Tools / Options menu).
Availability and Future
- Curtiss intends to maintain the control objects, and post corrections plus
new releases at this site as needed, for as long as he is affiliated with
- In order to supply control objects for new devices, the writers of
new device chapters may be requested to prepare the approximately 2-page data file
used to define some of the key attributes of the device to the generator.
Please maintain and respect personal and company references and copyrights in the source code and