Reputation: 745
How can I fix this error?
Source for the test application
Am i missing something?
Upvotes: 0
Views: 2722
Reputation: 53
I also encountered this problem in the MCS sample application. I fixed this by registering the CCO (i.e. regsvr32 OPOSPOSPrinter.ocx). Make sure that the version of OPOSPOSPrinter.ocx is greater than or equal to the .NET assembly. In the sample application, I think the .NET assemblies are version for 1.12.
Upvotes: 1
Reputation: 216333
The error seems caused by missing information in the registry to resolve the interface for the library that control the POS device.
Usually these COM libraries have a setup program that takes care of the needed registration.
In lack of this, you could try to register manually the libraries with
regsvr32 libraryname.dll
Where, in place of libraryname.dll
, write the effective name of yours dll.
And remember to do this also on the deployment machines.
Of course, as pointed by JamieHennerley in its answer, the Platform target of your application should match the same bitness of the library
Upvotes: 1
Reputation: 194
In Visual Studio - Project Properties - Build tab - platform target =X86
That should hopefully fix the error
Upvotes: 0