<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Logaan's Site</title>
	<atom:link href="http://www.logaans-site.co.uk/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.logaans-site.co.uk</link>
	<description>In my own little world, world...world</description>
	<lastBuildDate>Thu, 29 Dec 2011 10:00:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Extract OcxState data</title>
		<link>http://www.logaans-site.co.uk/2011/08/07/extract-ocxstate-data/</link>
		<comments>http://www.logaans-site.co.uk/2011/08/07/extract-ocxstate-data/#comments</comments>
		<pubDate>Sun, 07 Aug 2011 11:45:31 +0000</pubDate>
		<dc:creator>Logaan</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.logaans-site.co.uk/?p=647</guid>
		<description><![CDATA[At work we have recently spent effort to remove our technical debt. So far we have introduced Unicode into the native code, migrated our VB6 to VB.NET, upgraded to .NET 4.0 and now we are working on 64bit support. However, we have used the Microsoft FlexGrid quite extensively in our VB6 (now VB.NET) components and [...]]]></description>
			<content:encoded><![CDATA[<p>At work we have recently spent effort to remove our technical debt. So far we have introduced Unicode into the native code, migrated our VB6 to VB.NET, upgraded to .NET 4.0 and now we are working on 64bit support.</p>
<p>However, we have used the Microsoft FlexGrid quite extensively in our VB6 (now VB.NET) components and it does not support 64bit, therefore we decided to build a compatible control which wraps the existing WinForms DataGridView control.</p>
<p>We discovered quite early on that the properties set through the designer of an ActiveX control does not generate designer code, but instead it is serialized as a resource and restored through the OcxState property.</p>
<p>Always being the one to reduce the workload I devised a way of extracting this information so that we can redo the designer set properties. I found out that I could give the control another OcxState from another ResX and I could just look at the changed properties.</p>
<p>In the project (download below) I created a form with the desired control on it, I hacked around with the designer generated code to allow me to override the OcxState.</p>
<pre class="brush: csharp; auto-links: false; title: ; notranslate">
private readonly AxHost.State state;

public DummyForm()
    : this(null)
{
}

public DummyForm(AxHost.State state)
{
    this.state = state;
    InitializeComponent();
}

//
// axMSFlexGrid1
//
this.axMSFlexGrid1.Location = new System.Drawing.Point(69, 75);
this.axMSFlexGrid1.Name = &quot;axMSFlexGrid1&quot;;
if (state == null)
    this.axMSFlexGrid1.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject(&quot;axMSFlexGrid1.OcxState&quot;)));
else
    this.axMSFlexGrid1.OcxState = state;
</pre>
<p>I used the ResXResourceReader and the ResourceSet classes to get the OcxState from my desired ResX source (the project that has the state in it I want to know). Then using reflection I compared the default state of the control (using the OcxState that the designer created) to the state I desired (with my own OcxState extracted from another ResX) and I now know what properties were changed on the designer.</p>
<p>In this project I have referenced the Microsoft FlexGrid but in theory it could be any ActiveX control.</p>
<p><a href="http://www.logaans-site.co.uk/wp-content/uploads/2011/08/GetOcxState.zip">Download Project</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.logaans-site.co.uk/2011/08/07/extract-ocxstate-data/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AssocQueryString (ANSI version) does not work in XP or Vista</title>
		<link>http://www.logaans-site.co.uk/2011/03/26/assocquerystring-ansi-version-does-not-work-in-xp-or-vista/</link>
		<comments>http://www.logaans-site.co.uk/2011/03/26/assocquerystring-ansi-version-does-not-work-in-xp-or-vista/#comments</comments>
		<pubDate>Sat, 26 Mar 2011 19:04:30 +0000</pubDate>
		<dc:creator>Logaan</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.logaans-site.co.uk/?p=597</guid>
		<description><![CDATA[This is going back awhile but colleague and I had a hell of a time recently trying to solve a problem where the Windows API method &#8220;AssocQueryString&#8221; did not seem to work in XP. After creating a test application in various different configurations and testing it on several platforms we found that the ANSI version [...]]]></description>
			<content:encoded><![CDATA[<p>This is going back awhile but colleague and I had a hell of a time recently trying to solve a problem where the Windows API method &#8220;AssocQueryString&#8221; did not seem to work in XP.</p>
<p>After creating a test application in various different configurations and testing it on several platforms we found that the ANSI version of AssocQueryString just did not work.</p>
<p>It was not until this evidence came to light that we finally found a connect article (in the depths of my browser history) describing this issue.</p>
<p>Our codebase might be quite rare (it is still currently 100% ANSI) and I would expect many to already be using Unicode&#8230; the workaround was to use it in Unicode and use conversions to interact with the rest of the codebase.</p>
<p>So yeah&#8230; hopefully others might find this elightening and save hours of hair pulling.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.logaans-site.co.uk/2011/03/26/assocquerystring-ansi-version-does-not-work-in-xp-or-vista/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to invoke a method on a COM object in C#</title>
		<link>http://www.logaans-site.co.uk/2011/02/14/how-to-invoke-a-method-on-a-com-object-in-c/</link>
		<comments>http://www.logaans-site.co.uk/2011/02/14/how-to-invoke-a-method-on-a-com-object-in-c/#comments</comments>
		<pubDate>Mon, 14 Feb 2011 15:05:40 +0000</pubDate>
		<dc:creator>Logaan</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Code Snippet]]></category>

		<guid isPermaLink="false">http://www.logaans-site.co.uk/?p=609</guid>
		<description><![CDATA[Where I work we often need to invoke methods on a COM object that has been developed in VB6 or in .NET. I wrote this helper class for speed it along.]]></description>
			<content:encoded><![CDATA[<p>Where I work we often need to invoke methods on a COM object that has been developed in VB6 or in .NET. I wrote this helper class for speed it along.</p>
<pre class="brush: csharp; auto-links: false; title: ; notranslate">
public static class ActiveX
{
    public static object Invoke(string @namespace, string @class, string method, params object[] parameters)
    {
        var progId = string.Format(&quot;{0}.{1}&quot;, @namespace, @class);
        return Invoke(progId, method, parameters);
    }

    public static object Invoke(string progId, string method, params object[] parameters)
    {
        var type = Type.GetTypeFromProgID(progId);
        var comObject = Activator.CreateInstance(type);

        return type.InvokeMember(method, BindingFlags.InvokeMethod, null, comObject, parameters);
    }
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.logaans-site.co.uk/2011/02/14/how-to-invoke-a-method-on-a-com-object-in-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Generic attributes would be awesome</title>
		<link>http://www.logaans-site.co.uk/2010/08/14/generic-attributes-would-be-awesome/</link>
		<comments>http://www.logaans-site.co.uk/2010/08/14/generic-attributes-would-be-awesome/#comments</comments>
		<pubDate>Sat, 14 Aug 2010 17:16:58 +0000</pubDate>
		<dc:creator>Logaan</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.logaans-site.co.uk/?p=589</guid>
		<description><![CDATA[Generic attributes would be awesome]]></description>
			<content:encoded><![CDATA[<p>Generic attributes would be awesome</p>
]]></content:encoded>
			<wfw:commentRss>http://www.logaans-site.co.uk/2010/08/14/generic-attributes-would-be-awesome/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Profile for Saitek Cyborg v3.0 Mouse</title>
		<link>http://www.logaans-site.co.uk/2010/07/29/profile-for-saitek-cyborg-v3-0-mouse/</link>
		<comments>http://www.logaans-site.co.uk/2010/07/29/profile-for-saitek-cyborg-v3-0-mouse/#comments</comments>
		<pubDate>Thu, 29 Jul 2010 18:02:05 +0000</pubDate>
		<dc:creator>Logaan</dc:creator>
				<category><![CDATA[Games]]></category>

		<guid isPermaLink="false">http://www.logaans-site.co.uk/?p=582</guid>
		<description><![CDATA[I have been looking for a new mouse for several weeks now and recently bought the Saitek Cyborg v3.0 Mouse. Unless you did not know, I love the Saitek Cyborg kit to bits, more for thier profiling software than anything else. I have bought a couple of keyboards specifically for gaming but never a mouse. [...]]]></description>
			<content:encoded><![CDATA[<p>I have been looking for a new mouse for several weeks now and recently bought the Saitek Cyborg v3.0 Mouse. Unless you did not know, I love the Saitek Cyborg kit to bits, more for thier profiling software than anything else.</p>
<p>I have bought a couple of keyboards specifically for gaming but never a mouse. My main requirement for the mouse was to have very good movement tracking (acceleration, dpi etc) and a dynamic DPI setting and I settled on the Saitek mouse after looking through many other models of mouse highly recommended by gamers.</p>
<p>This mouse has 7 buttons:</p>
<ul>
<li>Left, right and middle</li>
<li>Forwards and backwards</li>
<li>An extra thumb button</li>
<li>And a mode selector button</li>
</ul>
<p>There are 3 modes on the mouse, which means you can profile up any button on the mouse to do something other than its default action. The other nice thing is that you can specify the desired DPI that you wish in each mode.</p>
<p>I have a profile that represents High, Medium and Low DPI and I use that extra thumb button as an additional shift state to allow me to boost the mouse senstivity should I need. The nice thing is that I can run around with high sensitivity then look down a scope and hold the thumb button to increase my accuracy.</p>
<p>The wire is nice and long but it does feel a little light and slightly cheap (it wasn&#8217;t cheap). This might be because I am more used to a wireless with batteries in it.</p>
<p><a href="http://www.logaans-site.co.uk/wp-content/uploads/2010/07/CyborgV3Mouse.pr0">Grab my profile here</a> and here&#8217;s a preview:</p>
<p><a href="http://www.logaans-site.co.uk/wp-content/uploads/2009/01/CyborgV3Mouse.png"><img class="aligncenter size-medium wp-image-581" title="Cyborg V3 Mouse Preview" src="http://www.logaans-site.co.uk/wp-content/uploads/2009/01/CyborgV3Mouse-300x194.png" alt="" width="300" height="194" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.logaans-site.co.uk/2010/07/29/profile-for-saitek-cyborg-v3-0-mouse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://www.logaans-site.co.uk/wp-content/uploads/2010/07/CyborgV3Mouse.pr0" length="8086" type="audio/mpeg" />
		</item>
		<item>
		<title>Moving profile folders to another drive</title>
		<link>http://www.logaans-site.co.uk/2010/01/24/moving-profile-folders-to-another-drive/</link>
		<comments>http://www.logaans-site.co.uk/2010/01/24/moving-profile-folders-to-another-drive/#comments</comments>
		<pubDate>Sun, 24 Jan 2010 15:09:23 +0000</pubDate>
		<dc:creator>Logaan</dc:creator>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Tips and Tricks]]></category>

		<guid isPermaLink="false">http://www.logaans-site.co.uk/?p=558</guid>
		<description><![CDATA[I use the Run app in windows an awful lot. I know the new start menu in Vista/7 offer a more advanced indexed version of the run command but I just can&#8217;t shake the habit. Also it doesn&#8217;t do the common folders a developer is looking for, such as Desktop, Temp folder etc etc. The [...]]]></description>
			<content:encoded><![CDATA[<p>I use the Run app in windows an awful lot. I know the new start menu in Vista/7 offer a more advanced indexed version of the run command but I just can&#8217;t shake the habit. Also it doesn&#8217;t do the common folders a developer is looking for, such as Desktop, Temp folder etc etc.</p>
<p>The main problem with it after you have moved all of the profile folders to another drive, is that you cannot get to folders like the desktop, Windows just cannot find them anymore. I know you could probably go into the registry and start hacking around and telling Windows where else to go for the user folders but that just never sat quite right with me.</p>
<p>So here is a neat little trick I found, goto the user folder (C:\Users\Logaan) and create a shortcut with the same name as the folder you wish to get to.</p>
<p>Its so simple and I cannot believe that I found this years ago.</p>
<p>Its so cool you can even create links to other folders that you cannot usually get to in this fashion.</p>
<p>Enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.logaans-site.co.uk/2010/01/24/moving-profile-folders-to-another-drive/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Composite WPF Presentation Model item template</title>
		<link>http://www.logaans-site.co.uk/2010/01/06/composite-wpf-presentation-model-item-template/</link>
		<comments>http://www.logaans-site.co.uk/2010/01/06/composite-wpf-presentation-model-item-template/#comments</comments>
		<pubDate>Wed, 06 Jan 2010 18:16:33 +0000</pubDate>
		<dc:creator>Logaan</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Item Template]]></category>
		<category><![CDATA[VS2008]]></category>

		<guid isPermaLink="false">http://www.logaans-site.co.uk/?p=555</guid>
		<description><![CDATA[Neat little template I designed for use at work which is an improvement over the ViewModel code snippet. Download PresentationModel item template How to use It is a bit unusual the way I have written this. Instead of specifying the file name for the item, it is the view name that is to be used. [...]]]></description>
			<content:encoded><![CDATA[<p>Neat little template I designed for use at work which is an improvement over the ViewModel code snippet.</p>
<p><a href="http://www.logaans-site.co.uk/wp-content/uploads/2010/01/PresentationModel.zip">Download PresentationModel item template</a></p>
<p><strong>How to use</strong></p>
<p>It is a bit unusual the way I have written this. Instead of specifying the file name for the item, it is the view <em>name </em>that is to be used.</p>
<p>When prompted for the ViewName, specifying &#8220;MainWindow&#8221; will create:</p>
<p>A xaml user control called MainWindowView.xaml.</p>
<p>An interface called IMainWindowView.</p>
<p>An interface called IMainWindowViewModel.</p>
<p>A class called MainWindowViewModel.</p>
<p>(Some of this is very similar to the ViewModel code snippet)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.logaans-site.co.uk/2010/01/06/composite-wpf-presentation-model-item-template/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Interface Properties</title>
		<link>http://www.logaans-site.co.uk/2009/11/25/interface-properties/</link>
		<comments>http://www.logaans-site.co.uk/2009/11/25/interface-properties/#comments</comments>
		<pubDate>Wed, 25 Nov 2009 17:09:27 +0000</pubDate>
		<dc:creator>Logaan</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Code Snippet]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.logaans-site.co.uk/?p=540</guid>
		<description><![CDATA[Basically rip-offs of the prop and propg code snippets you get with Visual Studio but without the scope or accessor keywords. iprop ipropg]]></description>
			<content:encoded><![CDATA[<p>Basically rip-offs of the <em>prop </em>and <em>propg </em>code snippets you get with Visual Studio but without the scope or accessor keywords.</p>
<p><strong>iprop</strong></p>
<pre class="brush: xml; auto-links: false; title: ; notranslate">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?&gt;
&lt;CodeSnippets  xmlns=&quot;http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet&quot;&gt;
	&lt;CodeSnippet Format=&quot;1.0.0&quot;&gt;
		&lt;Header&gt;
			&lt;Title&gt;iprop&lt;/Title&gt;
			&lt;Shortcut&gt;iprop&lt;/Shortcut&gt;
			&lt;Description&gt;Code snippet for an automatically implemented property on an interface&lt;/Description&gt;
			&lt;Author&gt;Alex Boyne-Aitken&lt;/Author&gt;
			&lt;SnippetTypes&gt;
				&lt;SnippetType&gt;Expansion&lt;/SnippetType&gt;
			&lt;/SnippetTypes&gt;
		&lt;/Header&gt;
		&lt;Snippet&gt;
			&lt;Declarations&gt;
				&lt;Literal&gt;
					&lt;ID&gt;type&lt;/ID&gt;
					&lt;ToolTip&gt;Property type&lt;/ToolTip&gt;
					&lt;Default&gt;int&lt;/Default&gt;
				&lt;/Literal&gt;
				&lt;Literal&gt;
					&lt;ID&gt;property&lt;/ID&gt;
					&lt;ToolTip&gt;Property name&lt;/ToolTip&gt;
					&lt;Default&gt;MyProperty&lt;/Default&gt;
				&lt;/Literal&gt;
			&lt;/Declarations&gt;
			&lt;Code Language=&quot;csharp&quot;&gt;&lt;![CDATA[$type$ $property$ { get; set; }$end$]]&gt;
			&lt;/Code&gt;
		&lt;/Snippet&gt;
	&lt;/CodeSnippet&gt;
&lt;/CodeSnippets&gt;
</pre>
<p><strong>ipropg</strong></p>
<pre class="brush: xml; auto-links: false; title: ; notranslate">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?&gt;
&lt;CodeSnippets  xmlns=&quot;http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet&quot;&gt;
	&lt;CodeSnippet Format=&quot;1.0.0&quot;&gt;
		&lt;Header&gt;
			&lt;Title&gt;ipropg&lt;/Title&gt;
			&lt;Shortcut&gt;ipropg&lt;/Shortcut&gt;
			&lt;Description&gt;Code snippet for an automatically implemented property with a 'get' accessor for interfaces&lt;/Description&gt;
			&lt;Author&gt;Alex Boyne-Aitken&lt;/Author&gt;
			&lt;SnippetTypes&gt;
				&lt;SnippetType&gt;Expansion&lt;/SnippetType&gt;
			&lt;/SnippetTypes&gt;
		&lt;/Header&gt;
		&lt;Snippet&gt;
			&lt;Declarations&gt;
				&lt;Literal&gt;
					&lt;ID&gt;type&lt;/ID&gt;
					&lt;ToolTip&gt;Property type&lt;/ToolTip&gt;
					&lt;Default&gt;int&lt;/Default&gt;
				&lt;/Literal&gt;
				&lt;Literal&gt;
					&lt;ID&gt;property&lt;/ID&gt;
					&lt;ToolTip&gt;Property name&lt;/ToolTip&gt;
					&lt;Default&gt;MyProperty&lt;/Default&gt;
				&lt;/Literal&gt;
			&lt;/Declarations&gt;
			&lt;Code Language=&quot;csharp&quot;&gt;&lt;![CDATA[$type$ $property$ { get; }$end$]]&gt;
			&lt;/Code&gt;
		&lt;/Snippet&gt;
	&lt;/CodeSnippet&gt;
&lt;/CodeSnippets&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.logaans-site.co.uk/2009/11/25/interface-properties/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to learn Programming</title>
		<link>http://www.logaans-site.co.uk/2009/11/12/how-to-learn-programming/</link>
		<comments>http://www.logaans-site.co.uk/2009/11/12/how-to-learn-programming/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 17:45:22 +0000</pubDate>
		<dc:creator>Logaan</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tips and Tricks]]></category>

		<guid isPermaLink="false">http://www.logaans-site.co.uk/?p=532</guid>
		<description><![CDATA[Read a fantastic article on Life Hacker on how to teach yourself computer programming: http://lifehacker.com/5401954/programmer-101-teach-yourself-how-to-code My only comment would be pick a language that is based on C-like syntax (rather than use Python or VB) because although the syntax may seem harder, the syntax is more transferrable to other languages and it would give you [...]]]></description>
			<content:encoded><![CDATA[<p>Read a fantastic article on Life Hacker on how to teach yourself computer programming: <a href="http://lifehacker.com/5401954/programmer-101-teach-yourself-how-to-code">http://lifehacker.com/5401954/programmer-101-teach-yourself-how-to-code</a></p>
<p>My only comment would be pick a language that is based on C-like syntax (rather than use Python or VB) because although the syntax may seem harder, the syntax is more transferrable to other languages and it would give you a head start.</p>
<p>In my personal experience, a book only served as a reference. I found books that taught me how to do something soon became too basic for my needs and often there are plenty of guides on the internet that is a good replacement. Instead you will find much of my library consists of reference books, hint, tips and advanced topics.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.logaans-site.co.uk/2009/11/12/how-to-learn-programming/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CyTS library stalling</title>
		<link>http://www.logaans-site.co.uk/2009/11/07/cyts-library-stalling/</link>
		<comments>http://www.logaans-site.co.uk/2009/11/07/cyts-library-stalling/#comments</comments>
		<pubDate>Sat, 07 Nov 2009 17:48:19 +0000</pubDate>
		<dc:creator>Logaan</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Teamspeak]]></category>

		<guid isPermaLink="false">http://www.logaans-site.co.uk/?p=513</guid>
		<description><![CDATA[On our guild website, we have a block in the portal that shows who is currently on teamspeak. This uses the CyTS library to connect and get such information and occasionally it would cause the portal to stop loading. In each case I would get home, load it up and not find any problems at [...]]]></description>
			<content:encoded><![CDATA[<p>On our guild website, we have a block in the portal that shows who is currently on teamspeak. This uses the CyTS library to connect and get such information and occasionally it would cause the portal to stop loading.</p>
<p>In each case I would get home, load it up and not find any problems at all. Well today was a different matter, I was able to pin point the exact issue. For some reason the library connects to the server but then stalls when receiving information from the server.</p>
<p>I should tell you know, this is not a perfect fix but it does the job. I did look into other options like switch socket blocking on and off and such other approaches, but it seems that if <em>fgets</em> reads more than 1 byte, it stalls. This is a bug in PHP that has hung around for a while.</p>
<p>I have changed the <em>_readcall</em> function to read the first byte, check it for failure then continue with the rest.</p>
<pre class="brush: php; title: ; notranslate">
function _readcall()
{
	if (!is_resource($this-&gt;sCon))
		return false;

	// HACK : Workaround to fail fast
	$first = fgets($this-&gt;sCon, 1);

	if($first === false)
		return false;

	$sRead = '';
	do
	{
		$cRead = $first.fgets($this-&gt;sCon);
		$first = '';

		$sRead .= $cRead;
	} while ($cRead != CYTS_SYN &amp;&amp; $cRead != CYTS_OK &amp;&amp; strtoupper(substr($cRead, 0, 5)) != &quot;ERROR&quot;);
	return $sRead;
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.logaans-site.co.uk/2009/11/07/cyts-library-stalling/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

