MCS

Home Up OPOS Background OPOS Releases Common Controls Hardware Vendors OPOS & Microsoft .NET

OPOS & Microsoft .NET
 

POS for .NET Shims

OPOS and Microsoft .NET

An Microsoft .NET application wishing to utilize retail devices has at least two available approaches.

OPOS Wrappers

For initial investigation, Curtiss Monroe made use of Microsoft .NET's COM interoperability support so that .NET applications can use the OPOS-like methods, properties, and events.

The TLBIMP utility generated an additional DLL per OPOS device type.  This DLL converts .NET requests into requests to the corresponding OPOS Common Control Object (CCO).  The CCO calls into an OPOS Service Object.  The Control Objects, Service Objects, plus supporting registry entries are unchanged.

POS for .NET

Microsoft has developed an architecture for support of retail peripherals for Microsoft .NET.  It is delivered with the Microsoft Windows Embedded for Point of Service (WEPOS) operating system. The Microsoft web site should be consulted for further information or to access the Microsoft POS for .Net SDK.

A new appendix has been added to UnifiedPOS 1.10 that describes the POS for .NET relationship to UnifiedPOS.

Example OPOS Wrappers and .NET Application

Note:  The following information is old but still technically relevant for using OPOS within .NET.  It was a proof-of-functionality that has not been pursued since 2002.  The Microsoft WEPOS approach is much more ambitious than just wrapping OPOS.

At a May 2002 meeting with Microsoft and the core OPOS team, Curtiss (representing RCS) presented an example with OPOS wrappers. That example has been slightly enhanced, and is presented here. All OPOS devices are placed in the namespace POS.Devices. This example consists of:

  • OPOS Wrappers for .NET
    This ZIP file contains one wrapper for each of the OPOS device types. For example, the POSPrinter wrapper is named OPOSPOSPrinter_1_6_001_C2N.dll, with the name including the OPOS device name, the Common Control Object which it wraps, and "C2N" (COM-to-NET).
  • POSPrinter1 Application
    This ZIP file contains a C# test application project.

A screenshot of the POSPrinter1 sample application follows. The following activities occur while running it:

  • Application startup: Instantiate the OPOS POSPrinter wrapper class and wire the StatusUpdateEvents. Display the OPOS Common Control Object's ControlObjectDescription and ControlObjectVersion properties.
  • Open: When this button is pressed, the application calls the Open and ClaimDevice methods, and sets the DeviceEnabled property. After opening the device, the application displays the ServiceObjectDescription and ServiceObjectVersion properties. After the NCR POSPrinter Service Object is enabled, it fires several StatusUpdateEvents.
  • Print: When this button is pressed, the application calls the PrintNormal method to print on the receipt station.
  • Close: When this button is pressed, the application calls the Close method.

The following screen shots are from Visual Studio .NET, with the POSPrinter1 solution loaded. The Solution Explorer shows the references, including a reference to the OPOS POSPrinter Common Control Object wrapper:

The Object Browser shows the classes and interfaces in the OPOS POSPrinter Common Control Object wrapper:

Last updated: 2006-10-17

 

Web Site navigation aids:  Table-of-Contents.  Search.
Send mail to webmaster@monroecs.com with questions or comments about this web site.
Copyright © 2008 Monroe Consulting Services, Inc.