I'm a little bit stumped on how to progress here. We develop a POS-Application and use Pos for .Net 1.14.1. So far everything worked fine. But now we have a SelfCheckout POS from Toshiba with a light on it. After some reading I found out that Pos for .Net doesn't support the Lights
Class. But I saw that from Toshiba there is a OPOSLights.ocx.
Now my question is what do I have to do to get the PosExplorer
to recognize the Light?
Do I have to write my own Service Object
or do I have to somehow install the .ocx file?
I would very much appreciate it if somebody could point me in the right direction.
Before doing that, make sure the ocx is vendor-specific.
Right-click the OPOSLights.ocx file to display the file properties, and if the ProductName is OPOS Common Controls (CRM/MCS)
on the details tab, it is not vendor-specific but Common CO.
Or if you are using OPOS_CCOs_1.14.001.msi
or OposCCOs-1_14_001.zip
to install ocx it is Common CO.
You have three options, but only the first if the OCX is vendor-specific.
Applications that use Lights incorporate OPOSLights.ocx
directly instead of POS for.NET
and use it via the COM Interop function of .NET.
They are explained at the top of these pages.
Interoperability Overview (C# Programming Guide)
Exposing COM Components to the .NET Framework
COM Interop Sample: .NET Client and COM Server
An application that uses Lights, instead of POS for.NET, uses Lights in a way that is close to the normal functionality of .NET by using the Common CO PIA(Primary Interop Assembly)
.
Get and install the Common CO MSI installer from here,
MCS: OPOS Common Control Objects - Current Version : 1.14.001 CCO Installer (Windows Installer MSI)
Or use CO as it is and add only PIA from here,
OPOS & Microsoft.NET : OPOS for .NET Assemblies 1.14.001
and use Lights in the same way as there is a sample of using POSPrinter with PIA here.
OPOS & Microsoft.NET : POSPrinter1 Application
Here is a POS for.NET ServiceObject sample that allows you to call OPOS from POS for.NET even for devices that do not support COM Interop with POS for.NET. You can create and use your own POS for.NET ServiceObject by extracting only the device.
kunif/AltCCOInterop
Alternative way to call OPOS control from POS for.NET