<?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 — HidSharp RegisterClass failed]]></title>
		<link>https://swforum.seekye.com/topic/10118/</link>
		<atom:link href="https://swforum.seekye.com/feed/rss/topic/10118/" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in HidSharp RegisterClass failed.]]></description>
		<lastBuildDate>Tue, 09 Jul 2019 07:54:02 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: HidSharp RegisterClass failed]]></title>
			<link>https://swforum.seekye.com/post/13068/#p13068</link>
			<description><![CDATA[<p>Further work on this has led to me reluctantly having to patch the code, as there are scenarios where we need to load two versions for different purposes in the same app-domain.</p><p>A quick change to WinHidManager allows this:</p><p>&nbsp; &nbsp; &nbsp;protected override void Run(Action readyCallback)<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; string className = &quot;HidSharpDeviceMonitor&quot; + Guid.NewGuid().ToString(&quot;N&quot;);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NativeMethods.WindowProc windowProc = DeviceMonitorWindowProc;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var wc = new NativeMethods.WNDCLASS() { ClassName = className, WindowProc = windowProc };<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; RunAssert(0 != NativeMethods.RegisterClass(ref wc), &quot;HidSharp RegisterClass failed.&quot;);</p><p>Mike</p>]]></description>
			<author><![CDATA[null@example.com (mike.hudgell)]]></author>
			<pubDate>Tue, 09 Jul 2019 07:54:02 +0000</pubDate>
			<guid>https://swforum.seekye.com/post/13068/#p13068</guid>
		</item>
		<item>
			<title><![CDATA[Re: HidSharp RegisterClass failed]]></title>
			<link>https://swforum.seekye.com/post/13031/#p13031</link>
			<description><![CDATA[<p>It was WIndows 10, but I know it was my error now, it appears we loaded two versions of the HIDSharp.dll by mistake and it looks like the second attempt to register the window failed and rippled to an app-domain failure.</p><p>We&#039;re now working on ensuring we don&#039;t load two versions which will sort the issue out.</p>]]></description>
			<author><![CDATA[null@example.com (mike.hudgell)]]></author>
			<pubDate>Fri, 08 Feb 2019 09:34:29 +0000</pubDate>
			<guid>https://swforum.seekye.com/post/13031/#p13031</guid>
		</item>
		<item>
			<title><![CDATA[Re: HidSharp RegisterClass failed]]></title>
			<link>https://swforum.seekye.com/post/13030/#p13030</link>
			<description><![CDATA[<p>Shouldn&#039;t be. What OS? Could you get line numbers with the debug version? Thanks!</p>]]></description>
			<author><![CDATA[null@example.com (Zer)]]></author>
			<pubDate>Thu, 07 Feb 2019 20:22:33 +0000</pubDate>
			<guid>https://swforum.seekye.com/post/13030/#p13030</guid>
		</item>
		<item>
			<title><![CDATA[HidSharp RegisterClass failed]]></title>
			<link>https://swforum.seekye.com/post/13029/#p13029</link>
			<description><![CDATA[<p>I&#039;m seeing an error on one machine where it throws an InvalidOperation Exception </p><p>&nbsp; at HidSharp.Platform.Windows.WinHidManager.Run(Action readyCallback)<br />&nbsp; &nbsp;at HidSharp.Platform.HidManager.RunImpl(Object readyEvent)<br />&nbsp; &nbsp;at System.Threading.ThreadHelper.ThreadStart_Context(Object state)<br />&nbsp; &nbsp;at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)<br />&nbsp; &nbsp;at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)<br />&nbsp; &nbsp;at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)<br />&nbsp; &nbsp;at System.Threading.ThreadHelper.ThreadStart(Object obj)&lt;/StackTrace&gt;&lt;ExceptionString&gt;System.InvalidOperationException: HidSharp RegisterClass failed.<br />&nbsp; &nbsp;at HidSharp.Platform.Windows.WinHidManager.Run(Action readyCallback)<br />&nbsp; &nbsp;at HidSharp.Platform.HidManager.RunImpl(Object readyEvent)<br />&nbsp; &nbsp;at System.Threading.ThreadHelper.ThreadStart_Context(Object state)<br />&nbsp; &nbsp;at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)<br />&nbsp; &nbsp;at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)<br />&nbsp; &nbsp;at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)<br />&nbsp; &nbsp;at System.Threading.ThreadHelper.ThreadStart(Object obj)</p><p>Is there any known issues around this?</p>]]></description>
			<author><![CDATA[null@example.com (mike.hudgell)]]></author>
			<pubDate>Thu, 07 Feb 2019 11:17:49 +0000</pubDate>
			<guid>https://swforum.seekye.com/post/13029/#p13029</guid>
		</item>
	</channel>
</rss>
