<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[James's Programming Page — About HIDSharp V2.0.5 work on Mac system]]></title>
		<link>https://swforum.seekye.com/topic/10112/</link>
		<atom:link href="https://swforum.seekye.com/feed/rss/topic/10112/" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in About HIDSharp V2.0.5 work on Mac system.]]></description>
		<lastBuildDate>Mon, 17 Dec 2018 08:55:11 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: About HIDSharp V2.0.5 work on Mac system]]></title>
			<link>https://swforum.seekye.com/post/13015/#p13015</link>
			<description><![CDATA[<p>For example, No.1 serial number is&nbsp; 0x11111. and No.2 serial number is 0x22222;&nbsp; when I plug No.2 HID device(move No1 HID device), the HIDsharp api still get No.1 device serial number:0x111111, not the latest serial number:ox22222</p>]]></description>
			<author><![CDATA[null@example.com (andy.he)]]></author>
			<pubDate>Mon, 17 Dec 2018 08:55:11 +0000</pubDate>
			<guid>https://swforum.seekye.com/post/13015/#p13015</guid>
		</item>
		<item>
			<title><![CDATA[About HIDSharp V2.0.5 work on Mac system]]></title>
			<link>https://swforum.seekye.com/post/13014/#p13014</link>
			<description><![CDATA[<p>Sir,<br />&nbsp; &nbsp; We design one type HID device using at WIN and Mac system both;&nbsp; &nbsp;I have No.1 and No.2 HID device with different serial number,&nbsp; at windows platform when we plug and unplug HID, the operation system internal can be refreshed in time, so I can always get right serial number. But mac system is something difference, when I replace No1 with No2 Hid Device, the operation system already refresh device list, but HIDsharp related api can not get the latest one even I add list.changed.<br />Could you give me some advice on how to fix?<br />&nbsp; &nbsp;Thanks in advance</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DeviceList list = DeviceList.Local;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; list.Changed += (sender, e) =&gt; Console.Write(&quot;Device list changed.\n&quot;);&nbsp; &nbsp;//20181217<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; HidDevice[] hidDeviceList = list.GetHidDevices().ToArray();<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; List&lt;string&gt; arraylist = new List&lt;string&gt;();<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; arraylist.Clear(); //Clear buffer<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; foreach (HidDevice onehid in hidDeviceList)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ( onehid.VendorID == 0x0483 &amp;&amp; onehid.ProductID == 0x5710)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; arraylist.Add(onehid.GetSerialNumber());&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; continue;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (arraylist.Count() == 0)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; throw new Exception(&quot;not found device&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return arraylist.ToArray();</p>]]></description>
			<author><![CDATA[null@example.com (andy.he)]]></author>
			<pubDate>Mon, 17 Dec 2018 08:51:18 +0000</pubDate>
			<guid>https://swforum.seekye.com/post/13014/#p13014</guid>
		</item>
	</channel>
</rss>
