Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: Unable to Open STI_USBSCANNER

286 views
Skip to first unread message

Sean Liming (MVP)

unread,
Apr 24, 2009, 3:48:08 PM4/24/09
to

You need the XML file to make the connection with POS for .NET. Try changing
the following line:

<HardwareId From="HID\Vid_05e0&Pid_0300" To="HID\Vid_05e0&Pid_0300"/>

to

<HardwareId From="HID\Vid_05e0&amp;Pid_0300"
To="HID\Vid_05e0&amp;Pid_0300"/>


Or just create a seperate XML file for the Symbol scanner:

<PointOfServiceConfig Version="1.0">
<ServiceObject Name="STI_USBSCANNER" Type="Scanner" Override="yes">
<HardwareId From="HID\Vid_05e0&amp;Pid_0300"
To="HID\Vid_05e0&amp;Pid_0300"/>
</ServiceObject>
</PointOfServiceConfig>

--
Regards,

Sean Liming
www.sjjmicro.com / www.seanliming.com
Author: Windows Embedded for Point of Service / POS for .NET Step-by-Step
http://www.sjjmicro.com/WEPOS.html


"ryan" <ry...@discussions.microsoft.com> wrote in message
news:76908402-B23D-4716...@microsoft.com...
> 1. I installed Symbol OPOS driver, it works fine with the TestScan.exe and
> VB
> example.exe these two test program provided by symbol, but when i run the
> TestApp.exe in the pos.net sdk package, i click open STI_USBSCANNER, an
> exception throw out:
>
> POSControlException ErrorCode(Failure) ExtendedErrorCode(0) occurred:
> Method
> Open threw an exception. The device cannot perform the requested
> procedure.
> System.Reflection.TargetInvocationException: Exception has been thrown by
> the target of an invocation. --->
> System.Runtime.InteropServices.COMException
> (0x8000FFFF): Catastrophic failure (Exception from HRESULT: 0x8000FFFF
> (E_UNEXPECTED))
> --- End of inner exception stack trace ---
> at System.RuntimeType.InvokeDispMethod(String name, BindingFlags
> invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32
> culture, String[] namedParameters)
> at System.RuntimeType.InvokeMember(String name, BindingFlags
> bindingFlags, Binder binder, Object target, Object[] providedArgs,
> ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
> at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder
> binder, Object target, Object[] args, CultureInfo culture)
> at Microsoft.PointOfService.Legacy.LegacyProxy.InvokeMethod(String
> methodName, Object[]& parameters, Boolean[] byRef)
> System.Runtime.InteropServices.COMException (0x8000FFFF): Catastrophic
> failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))
> Opening device: STI_USBSCANNER
> Creating device: STI_USBSCANNER
>
> the symptom is as same as describe in this post:
> http://www.eggheadcafe.com/software/aspnet/29825382/pos-for-net-111-symbol.aspx
>
> 2.another question, when i try to specify the HardwareId attributes(same
> Override="yes") in the configuration.xml, there is always an error saying:
>
> Microsoft.PointOfService.PosLibraryException: Invalid library
> configuration
> file: The 'Override' attribute is not declared.The element 'ServiceObject'
> has invalid child element 'HardwareId'. List of possible elements
> expected:
> 'Device'.
>
> the configuration.xml is like this:
> <PointOfServiceConfig Version="1.0">
> <ServiceObject Name="Example Scanner" Type="Scanner" Override="yes">
> <Device HardwarePath="c:\windows\system32\STIOPOS.dll" Enabled="yes"
> PnP="no">
> <LogicalName Name="Scan0" />
> </Device>
> </ServiceObject>
> <ServiceObject Name="STI_USBSCANNER" Type="Scanner" Override="yes">
> <HardwareId From="HID\Vid_05e0&Pid_0300" To="HID\Vid_05e0&Pid_0300"/>
> </ServiceObject>
> </PointOfServiceConfig>
>
> any help is appreciate!

Sean Liming (MVP)

unread,
Apr 24, 2009, 6:58:21 PM4/24/09
to
I forgot to ask, is STI_USBSCANNER the name of the service object or is this
the OPOS driver.

If the later, then this line

<ServiceObject Name="STI_USBSCANNER" Type="Scanner" Override="yes">

should be changed to this:

<ServiceObject Name="Example Scanner" Type="Scanner" Override="yes">

The Example Scanner Service Object will be used with the scanner.
--
Regards,

Sean Liming
www.sjjmicro.com / www.seanliming.com
Author: Windows Embedded for Point of Service / POS for .NET Step-by-Step
http://www.sjjmicro.com/WEPOS.html

"Sean Liming (MVP)" <sean_...@sjjmicro.com> wrote in message
news:OZVg1WRx...@TK2MSFTNGP06.phx.gbl...

ryan

unread,
Apr 26, 2009, 11:46:01 PM4/26/09
to
Hi Sean

it's still not working with the following xml, because the the Override
attribute and <HardwareId> element are not recognized by the parser, I use
.NET reflector to see the code under Microsoft.PointOfService namespace, I
check the LoadGlobalConfigXml(bool cacheResults) method, the override
attribute is not exsit in the Config.xsd. <HardwareId> element is also not
under <ServiceOjbect> element.

so, this the exception generated:
throw new PosLibraryException(string.Format(CultureInfo.InvariantCulture,
resourceManager.GetString("IDS_BAD_CONFIG_XML"), new object[] {
xmlscValidationErrors + xmlrsValidationErrors }));


configuration.xml:


<PointOfServiceConfig Version="1.0">
<ServiceObject Name="Example Scanner" Type="Scanner" Override="yes">

<HardwareId From="HID\Vid_05e0&Pid_0300"
To="HID\Vid_05e0&Pid_0300"/>
</ServiceObject>
</PointOfServiceConfig>

same exception happened:


Microsoft.PointOfService.PosLibraryException: Invalid library configuration
file: The 'Override' attribute is not declared.The element 'ServiceObject'
has invalid child element 'HardwareId'. List of possible elements expected:
'Device'.

Config.xsd:

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
elementFormDefault="qualified">
<xsd:element name="PointOfServiceConfig">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="ServiceObject" minOccurs="0" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Device" minOccurs="0" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence minOccurs="0" maxOccurs="unbounded">
<xsd:choice>
<xsd:element name="Property" minOccurs="0" maxOccurs="unbounded">
<xsd:complexType>
<xsd:attribute name="Name" type="xsd:string" use="required" />
<xsd:attribute name="Value" type="xsd:string" />
</xsd:complexType>

</xsd:element>
<xsd:element name="LogicalName" minOccurs="0"
maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence />
<xsd:attribute name="Name" type="xsd:string" />
</xsd:complexType>

</xsd:element>
</xsd:choice>
</xsd:sequence>
<xsd:attribute name="HardwarePath" type="xsd:string" use="required"
/>
<xsd:attribute name="HardwareId" type="xsd:string" use="optional" />
<xsd:attribute name="Default" type="YesNo" use="optional" />
<xsd:attribute name="PnP" type="YesNo" use="optional" />
<xsd:attribute name="Enabled" type="YesNo" use="optional" />
</xsd:complexType>

<xsd:unique name="PropertyUnique">
<xsd:selector xpath="Property" />
<xsd:field xpath="@Name" />
</xsd:unique>
<xsd:unique name="LogicalNameUnique">
<xsd:selector xpath="LogicalName" />
<xsd:field xpath="@Name" />
</xsd:unique>

</xsd:element>
</xsd:sequence>
<xsd:attribute name="Type" type="xsd:string" use="required" />
<xsd:attribute name="Name" type="xsd:string" use="required" />
</xsd:complexType>

<xsd:unique name="DeviceUnique">
<xsd:selector xpath="Device" />
<xsd:field xpath="@HardwarePath" />
</xsd:unique>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="Version" type="SchemaVersion" use="required" />
</xsd:complexType>

<xsd:unique name="ServiceObjectUnique">
<xsd:selector xpath="ServiceObject" />
<xsd:field xpath="@Name" />
<xsd:field xpath="@Type" />
</xsd:unique>
</xsd:element>
<xsd:simpleType name="SchemaVersion">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="1.0" />
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="YesNo">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="yes" />
<xsd:enumeration value="no" />
</xsd:restriction>
</xsd:simpleType>
</xsd:schema>

Sean Liming

unread,
Apr 27, 2009, 10:44:26 AM4/27/09
to

The subtle trick here is that in the hardware ID '&' should be '&amp;'
Unless something is getting translated in the post.

Change the XML file, and it should work.

Regards,

Sean Liming
www.sjjmicro.com / www.seanliming.com
Author: Windows Embedded for Point of Service / POS for .NET Step-by-Step
http://www.sjjmicro.com/WEPOS.html


"ryan" <ry...@discussions.microsoft.com> wrote in message

news:F03918EC-6F53-4186...@microsoft.com...

ryan

unread,
Apr 27, 2009, 8:45:01 PM4/27/09
to
Sean, I know this, this is not the problem, it's still not working with the
following xml

<PointOfServiceConfig Version="1.0">
<ServiceObject Type="Scanner" Name="Example Scanner" Override="yes">


<HardwareId From="HID\Vid_05e0&Pid_0300" To="HID\Vid_05e0&Pid_0300"/>
</ServiceObject>
</PointOfServiceConfig>

exception:


Microsoft.PointOfService.PosLibraryException: Invalid library configuration
file:
The 'Override' attribute is not declared.
The element 'ServiceObject' has invalid child element 'HardwareId'. List of
possible elements expected: 'Device'.

best regards
ryan


"Sean Liming" wrote:

>
> The subtle trick here is that in the hardware ID '&' should be '&'

ryan

unread,
Apr 27, 2009, 8:51:03 PM4/27/09
to
I already add '&' in the <HardwareId> element, it's just not showing on the
post.

ryan

unread,
Apr 28, 2009, 2:07:01 AM4/28/09
to
This problem was finally find the answer:

i delete the configuration.xml under folder

C:\Documents and Settings\All Users\Application Data\Microsoft\Point Of
Service\Configuration

add a new configuration.xml under folder

C:\Program Files\Common Files\Microsoft Shared\Point Of Service\Control
Configurations

then, the override attribute and <HardwareId> element can be recognized.

Sylvester La Blanc MSFT

unread,
May 10, 2009, 12:04:20 PM5/10/09
to
In article <76908402-B23D-4716...@microsoft.com>,
ryan <ry...@discussions.microsoft.com> wrote:

> Microsoft.PointOfService.PosLibraryException: Invalid library configuration
> file: The 'Override' attribute is not declared.The element 'ServiceObject'
> has invalid child element 'HardwareId'. List of possible elements expected:
> 'Device'.
>

> the configuration.xml is like this:

> <PointOfServiceConfig Version="1.0">
> <ServiceObject Name="Example Scanner" Type="Scanner" Override="yes">

> <Device HardwarePath="c:\windows\system32\STIOPOS.dll" Enabled="yes"
> PnP="no">
> <LogicalName Name="Scan0" />
> </Device>
> </ServiceObject>

> <ServiceObject Name="STI_USBSCANNER" Type="Scanner" Override="yes">


> <HardwareId From="HID\Vid_05e0&Pid_0300" To="HID\Vid_05e0&Pid_0300"/>
> </ServiceObject>
> </PointOfServiceConfig>
>

> any help is appreciate!

I suspect you may have a problem with the control object (CO) that is
installed by Symbol. As I recall they had a small issue with the CO
provided. And it sounds like the the scanner is already configured and
working as OPOS (using the "STI_USBSCANNER" device name).

My recommendation would be to install the common control object (after
installing Symbol's Service Object) to get the latest Scanner CO. You
can get the latest CCO (for free) from:

http://monroecs.com/oposccos_current.htm

Let me know how this works for you.
--
This posting is provided "As Is" with no warranties, and confers no rights.
X-Face: 3bv|Grp$j"BCYpET|y@@/5=;j9@Zuc[XSbP7Ui8#`J0J|PX0c!m9=]McR9PPq
\TvMOAvJUes)hkN;<}cLH#}@F~*t`[>9@,;4`@OEs?BpPKrJ+x.E{1i.AEbJ6ul-~X/1
6Hqa0bJ4m]?L@j?dy.l_=|b[iZjr>!x:P_&p"[OI@^'^-U[^6FHdTI5~"Ak[Vp%?ba?/
CcQZS+nKY[D!H~08:[_F8^I{%c#yh8;#u7$m0^dZ3DOr=6=!*`"(z3%$HUBVFlfAn4H0
\<f:HYfWP:g<P:3gp?6d,ge~y

ryan

unread,
May 10, 2009, 8:48:01 PM5/10/09
to
Yes sylvester, it works after reinstall the common co. it also has problems
with the Symbol OPOS driver version 3.24, if somebody has problems with this
driver, try to contact with the support of Motorola to get the driver version
3.27, then it should work fine, and also reinstall the common co. then I
think most of the symbol problems can be solved.

Sylvester La Blanc MSFT

unread,
May 18, 2009, 10:51:01 PM5/18/09
to
In article <A38273B1-768D-46ED...@microsoft.com>,
ryan <ry...@discussions.microsoft.com> wrote:

Glad to hear you got it working!

- Sylvester

0 new messages