Search code examples
c#opospos-for-.net

Is it possible for an opos application to use pos for .NET driver


I will implement an fiscal printer driver for windows. What I want is to implement my driver according to opos but I could not find an opos sdk for windows. I can implement my driver using pos for .net.see link. What I want to know is if an application written to work with opos , does it run with my driver (pos for .net driver) ?


Solution

  • In theory, yes, but not directly with your POS for .Net driver. Taking the approach you have in mind, this could be acheived with the following steps:

    1. Implement a POS for .Net driver for your fiscal printer
    2. Create a wrapper which would provide the IOPOSFiscalPrinter SO interface implementaion (see Appendix A of the UnifiedPOS specification)
    3. Produce a COM callable wrapper (CCW) for it (http://msdn.microsoft.com/en-us/library/ms404285%28v=vs.110%29.aspx, 'Wrapping Managed Objects in a Native Application' section)
    4. Consume that SO/CCW from your application via a Common Control Object (http://monroecs.com/oposccos.htm)

    It may be worth considering implementation of the OPOS SO directly instead of wrapping your POS for .Net FiscalPrinter driver if you are not going to use this POS for .Net driver as such.

    Finally, if you're not bound to C# and .NET in your implementation, you can do this all in C++ thus eliminating the need for CCW. The Appendix A of UnifiedPOS provides all the required information for this. Curtiss Monroe's CCO sources are a great reference as to what is expected from your SO.