Hi, I know it's not the ideal but I need to use Unity with a Zebra scanner and so I'm trying to integrate the C# SDK with it. The library is being read and the code compiles but at the very first function call I'm getting an error
ArgumentException: Value does not fall within the expected range.
System.Runtime.InteropServices.Marshal.ThrowExceptionForHR (System.Int32 errorCode) (at <599589bf4ce248909b8a14cbe4a2034e>:0)
(wrapper cominterop) CoreScanner.CCoreScannerClass.Open(int,System.Array,int16,int&)
(wrapper cominterop-invoke) CoreScanner.CCoreScannerClass.Open(int,System.Array,int16,int&)
I have no idea of what argument is wrong, the code is a simple "Open":
cCoreScannerClass = new CCoreScannerClass();
short scannerTypes = new short;
scannerTypes = 1;
short numberOfScannerTypes = 1;
cCoreScannerClass.Open(0, scannerTypes, numberOfScannerTypes, out status);
AFAIK it should work, Unity's C# shouldn't be that different from .NET.
Using Unity 2019 and the Zebra Scanner SDK (64bit) 3.04.0011