Could not change the value of the Barcode\UPC_EAN\ICSP\Addendum Add-on 2 parameter error

Could not change the value of the Barcode\UPC_EAN\ICSP\Addendum Add-on 2 parameter error

This question is answered

I've encountered the following error:

System.ComponentModel.Win32Exception was unhandled

ErrorCode=-2147467259
Message="Could not change the value of the Barcode\UPC_EAN\ICSP\Addendum Add-on 2 parameter."
NativeErrorCode=6
StackTrace:
at PsionTeklogix.Win32.ThrowException()
at PsionTeklogix.Barcode.ScannerServices.ScannerServicesDriver.SetRegistryValue()
at PsionTeklogix.Barcode.ScannerServices.ScannerServicesDriver.SetProperty()
at PsionTeklogixDemoApplications.ScannerTest.btnScanner_Click()
at System.Windows.Forms.Control.OnClick()
at System.Windows.Forms.Button.OnClick()
at System.Windows.Forms.ButtonBase.WnProc()
at System.Windows.Forms.Control._InternalWnProc()
at Microsoft.AGL.Forms.EVL.EnterMainLoop()
at System.Windows.Forms.Application.Run()
at PsionTeklogixDemoApplications.frmLaunchPad.Main()
InnerException:

running the following code (a modified version of the standard demo application shipped with the SDK):

' btnDisableScanner_Click - event handler
'
Private Sub btnScanner_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnScanner.Click
' Me.ScannerServicesDriver1.SetProperty("Barcode\EAN13\HHP\2 Digit Addendum", 1)

Me.ScannerServicesDriver1.SetProperty("Barcode\UPC_EAN\ICSP\Addendum Add-on 2", 1)
Me.ScannerServicesDriver1.SetProperty("Barcode\UPC_EAN\ICSP\Addendum Add-on 5", 1)
Me.ScannerServicesDriver1.SetProperty("Barcode\UPC_EAN\ICSP\Addendum", 1)
Me.ScannerServicesDriver1.ApplySettingChanges()

' MsgBox(Me.ScannerServicesDriver1.GetProperty("Barcode\EAN13\HHP\2 Digit Addendum"))

Me.Scanner1.Enabled = True
End Sub

I am running Windows 7 Ultimate (64bit), Visual Studio 2008, deploying to a Psion NEO device running Windows CE 5.0.

Can anyone tell me what is causing this error and how it can be resolved?

Verified Answer
All Replies
  • Good morning Richard,

    As a start, can we get your NEO device system properties?
    See the « Creating a System Properties file » knowledge base article for further details.

    Regards,
    Jacques

  • Richard,

    If your scan engine is indeed and Intermec ISCP imager your code - as per the below Mobile Devices SDK User Guide excerpt - should read:

        ' Retrieve the «Addendum Add-on 2» Intermec Imager scanner
        ' property and re-configure it only if needed.
        Try
            If (CInt(ScannerServicesDriver1.GetProperty( _
                "Barcode\UPC_EAN\ICSP\Addendum Add-on 2")) <> 1) Then

                Try
                    Me.ScannerServicesDriver1.SetProperty( _
                    "Barcode\UPC_EAN\ICSP\Addendum Add-on 2", 1)
                Catch ex As Exception
                    MessageBox.Show("SetProperty() failed with " _
                                    & ex.Message)
                    Me.Close()
                    Return
                End Try

                ' Apply the new setting change...
                Try
                    Me.ScannerServicesDriver1.ApplySettingChanges()
                Catch ex As Exception
                    MessageBox.Show("ApplySettingChanges() failed with " _
                                    & ex.Message)
                    Me.Close()
                    Return
                End Try

            End If

        Catch ex As Exception
            MessageBox.Show("GetProperty() failed with " & ex.Message)
            Me.Close()
            Return
        End Try

     vvvv 

    Kind regards,
    Jacques

  • System Properties:

    Windows CE - 5.0 Core
    Build type - Release
    Boot code - F309p
    OS code - F309p
    PCon code - F309p
    Keyboard Micro code - F309p
    Processor - PXA270
    Processor Speed - 312 MHz
    Ram - 128 MB
    Flash - 128 MB
    Scanner - Intermec EV15
    Scanner Firmware - EV15 A41P105_ CPU 1.0
    Keyboard - 26 key
    Display - NEC
    Orientation - Portrait
    MLB type - A
    MLB part number - 1002405-303A
    MLB Serial - PX2CUA190001
    Term Serial - PX0CUA190185
    Bluetooth - Installed (enabled)
    Bluetooth - LMP: 3.3164
    Bluetooth - HCI: 3.3164
    WiFi - Not Installed
    MAC Address -
    00:0E:22:04:00:30 - LANNDS1
    WiFi Driver Version - 0.256
    MMC/SD Slot - Memory Card

  • Thanks, we are only at the 'proof of concept' stage at the moment so my code is very rough-and-ready, final code would have proper error trapping in it.

  • Good afternoon Richard,

    While using the attached trivial VS2008 console application, few of my co-workers had no diffculties configuring - I.e. sensing and setting - the "Barcode\UPC_EAN\ICSP\Addendum Add-on 2" EV15 parameter.

    Upon execution, if Addendum Add-on 2 is On, the console application will switch it Off, and vice-versa.

      MDSDK v5.4 - VS2008 C# Configure EV15 UPC-EAN Addendum Add-on 2 [DEMO] Solution (compressed)

    Could you please give it a try and let us know how it goes from your end?

    Kind regards,
    Jacques

  • Sorry for the delay, I've only just got round to trying the sample code you have sent through, this fails with the following error, is there something that we are perhaps missing on the device itself, a library that the code is expecting to be present but isn't?

    System.MissingMethodException was unhandled
    Message="Can't find PInvoke DLL 'PtxSdkCommon.dll'."
    StackTrace:
    at PsionTeklogix.Barcode.ScannerServices.ScannerServicesDriver.get_IsScannerPresent()
    at Configure_EV15_UPC_EAN_Addendum_Add_on_2.Configure_EV15_UPC_EAN_Addendum_Add_on_2.Main()
    InnerException:

    This error occurs at the following line (highlighted):

    namespace Configure_EV15_UPC_EAN_Addendum_Add_on_2
    {
    class Configure_EV15_UPC_EAN_Addendum_Add_on_2
    {
    const string SettingName = @"Barcode\UPC_EAN\ICSP\Addendum Add-on 2";

    static void Main(string[] args)
    {
    if (!ScannerServicesDriver.IsScannerPresent)

  • Richard,

    Please read the following knowledge article on DLL deployment:  http://community.psion.com/knowledge/w/knowledgebase/1138.using-and-deploying-psion-librariesdlls.aspx

    You have to deploy the appropriate PtxSdkCommon.dll to the device in the same directory as your application.

  • Thanks for the prompt response, the PtxSdkCommon.dll file was included in the project but it was set to "copy if newer", changing this file to "copy always" solved the problem and the code executed as intended.