<?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 — Program hanging the second time]]></title>
		<link>https://swforum.seekye.com/topic/10106/</link>
		<atom:link href="https://swforum.seekye.com/feed/rss/topic/10106/" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Program hanging the second time.]]></description>
		<lastBuildDate>Wed, 12 Sep 2018 21:04:44 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Program hanging the second time]]></title>
			<link>https://swforum.seekye.com/post/12996/#p12996</link>
			<description><![CDATA[<p>The plugin works great but the second time it hangs.<br />Do I need to close the device? Is there a way to close the connection?</p><p>Thanks!!</p><p>Here is the code:</p><p>DeviceList list = DeviceList.Local;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; hidDevice = list.GetHidDeviceOrNull(VendorId, ProductId);<br />&nbsp; &nbsp; &nbsp; &nbsp; if(hidDevice != null)<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Debug.Log(hidDevice.GetFriendlyName());<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DeviceStream deviceStream;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (hidDevice.TryOpen(out deviceStream))<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; deviceStream.WriteTimeout = 1000;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; deviceStream.Write(mStartData, 0, mStartData.Length);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; deviceStream.Close();<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; }</p>]]></description>
			<author><![CDATA[null@example.com (macy)]]></author>
			<pubDate>Wed, 12 Sep 2018 21:04:44 +0000</pubDate>
			<guid>https://swforum.seekye.com/post/12996/#p12996</guid>
		</item>
	</channel>
</rss>
