locked
OPOS Driver with OKI PT330 RRS feed

  • Question

  • I use TestApp of POSfor.NET SDK for test OKI PT330 printer, device is showed under PosPrinter node but if I try to Open connection the next exception is raised

    POSControlException ErrorCode(Failure) ExtendedErrorCode(0) occurred: Method Open threw an exception.  The device cannot perform the requested procedure.
    System.Reflection.TargetInvocationException: Eccezione generata dalla destinazione di una chiamata. ---> System.Runtime.InteropServices.COMException: Errore irreparabile (Eccezione da HRESULT: 0x8000FFFF (E_UNEXPECTED))
       --- Fine della traccia dello stack dell'eccezione interna ---
       in System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters)
       in System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
       in Microsoft.PointOfService.Legacy.LegacyProxy.InvokeMethod(String methodName, Object[]& parameters, Boolean[] byRef)
    System.Runtime.InteropServices.COMException (0x8000FFFF): Errore irreparabile (Eccezione da HRESULT: 0x8000FFFF (E_UNEXPECTED))
    Created instance of device: PT330-331USBPRT

    I work with Visual Studio 2013 in Windows 7 64bit virtual machine, POSfor.NET 1.14 (same test and results with non virtual machine)

    Service Object Manager shows the PosPrinter with name PT330-331USBPRT, upos 1.13.1 and legacy true, in fact the manufacturer provide only OPOS Driver. I've installed 32bit version because 64bit version is not recognized.

    Anyone can suggest me the way for resolve this problem?

    Tuesday, April 21, 2015 1:20 PM

All replies

  • There might be some incompatibility with 1.14. Try using POS for .NET 1.12 SDK - http://www.microsoft.com/en-us/download/details.aspx?id=5355 , this will imply that .NET Framework 3.5 is needed.


    Sean Liming - Book Author: Starter Guide SIM (WEI), Pro Guide to WE8S & WES 7, Pro Guide to POS for .NET - www.annabooks.com / www.seanliming.com

    Tuesday, April 21, 2015 3:04 PM
    Answerer
  • Thanks for the reply, below my tests.

    I use 4 apps for testing:

    1) POSPrinter1 founded in MonroeCS site

    2) MyWinformApp1 that use directly printer ocx

    3) TestApp of POSfor.NET SDK

    4) MyWinformApp2 that use POSfor.NET

    I downgrade to POSfor.NET 1.12, OPOS Common Control Objects 1.14.001 (can't downgrade it but i think is not necessary).

    1) Printing OK

    2) Printing OK but has slowdowns, however ends regularly

    3) Exception when try to open connection:

    System.Runtime.InteropServices.COMException (0x80040154): Recupero della class factory COM per il componente con CLSID {CCB90152-B81E-11D2-AB74-0040054C3719} non riuscito a causa del seguente errore: 80040154.
       in System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck)
       in System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache)
       in System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache)
       in System.Activator.CreateInstance(Type type, Boolean nonPublic)
       in Microsoft.PointOfService.Management.Explorer.GenerateLegacyProxy(String progId, String deviceName, String deviceType, Boolean strictErrorChecking)
       in Microsoft.PointOfService.Management.Explorer.CreateInstance(DeviceInfo device)
       in Microsoft.PointOfService.PosExplorer.CreateInstance(DeviceInfo device)
       in TestApplication.MainForm.OpenDevice(TreeNode node)

    4) Printing stops after a few lines, log say:

    PosException] Microsoft.PointOfService.PosControlException: Method PrintNormal threw an exception.  The Service Object timed out waiting for a response from the device, or the Control timed out waiting for a response from the Service Object

    So I reinstall POSfor.NET 1.14, same results

    Finally I reinstall OPOS Common Control Objects 1.14.001 with repair option, now the situation is:

    1) Printing OK

    2) Printing OK but has slowdowns, however ends regularly

    3) Printing OK

    4) Printing stops after a few lines, same timeout exception

    Seems to be important the packages installation order that have to be

    A) OPOS Driver

    B) POSfor.NET v1.14

    C) OPOS Common Control Objects 1.14.001

    I don't know why, I think that OPOS CCO is a layer between OPOS Driver and POSfor.NET but maybe wrong.

    Now I will study SDK TestApp source code for find differences from my app, have you some suggestions to avoid the timeout problem? 

    Thanks in advance.

    Tuesday, April 21, 2015 7:50 PM
  • I suggest that you contact Monroe about this situation. They have more experience dealing with OPOS drivers.

    Sean Liming - Book Author: Starter Guide SIM (WEI), Pro Guide to WE8S & WES 7, Pro Guide to POS for .NET - www.annabooks.com / www.seanliming.com

    Wednesday, April 22, 2015 4:15 AM
    Answerer