<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forums.obdev.at/app.php/feed/topic/5370" />

	<title>Objective Development Forums</title>
	
	<link href="https://forums.obdev.at/index.php" />
	<updated>2011-01-19T15:36:12+02:00</updated>

	<author><name><![CDATA[Objective Development Forums]]></name></author>
	<id>https://forums.obdev.at/app.php/feed/topic/5370</id>

		<entry>
		<author><name><![CDATA[eslavko]]></name></author>
		<updated>2011-01-19T15:36:12+02:00</updated>

		<published>2011-01-19T15:36:12+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=5370&amp;p=17335#p17335</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=5370&amp;p=17335#p17335"/>
		<title type="html"><![CDATA[Disconnected HID device?!?]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=5370&amp;p=17335#p17335"><![CDATA[
Hello....<br /><br />Just have question how to detect if device is disconnected?!?<br /><br />I had HID device and is acessed with windows HidD_GetFeature/HidD_SetFeature. (no dll's)<br />The function return false if not sucedded. But that can be state if device working corectly too. <br />For example. I wan't to read 64 bytes but wasn't ready, so I just answer with 0 instead 255 in usbFunctionSetup and in win I got call fail so I know that I need to retry.<br />Now I have timeout, if function doesn't return valid data in last second then I assume device disconnected. But that timeout can be too long in some case's to be practic.<br />Is there are some other way to check (already oppened) device still plugged in windows?<br />I mean some win api call? <br /><br />Thanks<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=4732">eslavko</a> — Wed Jan 19, 2011 3:36 pm</p><hr />
]]></content>
	</entry>
	</feed>
