Point of service error message in Windows 7
My scanner application keeps throwing an error "Method open threw an exception. Could not read the device name key's default value or could not convert the Programmatic ID it holds int a valid class ID." The application has worked successfully over a long period on Windows XP, but since moving to Windows 7, I keep seeing this error message. The error occurs at the MyScanner.Open command below. Following some investigation, I thought that my application was looking at the wrong version of the .NET Framework (.NET 3.5) for Windows 7, so I created a new version of the application that is pointing to .NET Framework 4 and installed this on my Windows 7 machine. However, this has not fixed the problem and I am still seeing the error message. The device is a Motorola Symbol scanner, I have Microsoft POS for .NET 1.12 installed and my application.config file contains the following section: <runtime> <NetFx40_LegacySecurityPolicy enabled="true"/> </runtime> Me.SerialPort1.PortName = My.Settings.COMPort Me.SerialPort1.Open() Dim myExplorer As New PosExplorer For Each dev As DeviceInfo In myExplorer.GetDevices Debug.Print(dev.ServiceObjectName) If dev.ServiceObjectName = My.Settings.ServiceObjectName Then myScanner = DirectCast(myExplorer.CreateInstance(dev), Scanner) Exit For End If Next myScanner.Open() myScanner.Claim(1000) myScanner.DeviceEnabled = True myScanner.DataEventEnabled = True myScanner.DecodeData = True Also, when examining the error's InnerException, I see the following: "System.Reflection.targetInvocationException: Exception has been thrown by the target of an invocation. --> System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt." Can anyone help?
November 20th, 2012 6:55am

Hi, Please try to run the application in Compatibility Mode and see if it works. As the issue is related to the scanner application and it is developed by you, please check it with the help of MSDN forum: MSDN Forums http://social.msdn.microsoft.com/Forums/en-US/categories Thanks for your understanding and cooperation. Hope the issue will be resolved soon. Nicholas Li TechNet Community Support
Free Windows Admin Tool Kit Click here and download it now
November 27th, 2012 1:01pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics