<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[James's Programming Page — HIDSharp - adding event]]></title>
	<link rel="self" href="https://swforum.seekye.com/feed/atom/topic/10091/" />
	<updated>2016-10-23T18:32:15Z</updated>
	<generator>PunBB</generator>
	<id>https://swforum.seekye.com/topic/10091/</id>
		<entry>
			<title type="html"><![CDATA[Re: HIDSharp - adding event]]></title>
			<link rel="alternate" href="https://swforum.seekye.com/post/12955/#p12955" />
			<content type="html"><![CDATA[<p>The underlying system APIs all issue read commands. The canonical way to do this is to set the timeout to Timeout.Infinite (or some other large value), and to use BeginRead.</p><p>With BeginRead, you can either<br />(1) monitor the IAsyncResult to check for completion, and call EndRead on completion, or,<br />(2) use the callback in BeginRead to call EndRead and then queue the data for your application, using BeginInvoke for instance.</p>]]></content>
			<author>
				<name><![CDATA[Zer]]></name>
				<uri>https://swforum.seekye.com/user/2/</uri>
			</author>
			<updated>2016-10-23T18:32:15Z</updated>
			<id>https://swforum.seekye.com/post/12955/#p12955</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[HIDSharp - adding event]]></title>
			<link rel="alternate" href="https://swforum.seekye.com/post/12954/#p12954" />
			<content type="html"><![CDATA[<p>Dear All,<br />I am kind of newbie in programming, thus I want to ask you (advanced programmers) if there is any way (and if it is please point it out) to add an event which can be fired by this library when new data is available on particular USB device (maybe via DeviceLoader class).<br />For example: my hardware is sending data only when I press a button, and I do not want to directly pool for the button status on the PC application constantly. <br />I would like to have OnNewUSBDataAvailable event to which I can attach functions.</p><p>Is it possible to archive this ? and if yes, then how should this be implemneted? Guidance will be really appreciated.</p><p>Many thanks in advance and best regards,<br />Grzegorz</p>]]></content>
			<author>
				<name><![CDATA[dashko]]></name>
				<uri>https://swforum.seekye.com/user/14184/</uri>
			</author>
			<updated>2016-07-07T08:54:04Z</updated>
			<id>https://swforum.seekye.com/post/12954/#p12954</id>
		</entry>
</feed>
