<?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>Fooling Around</title>
	<atom:link href="http://alax.info/blog/feed" rel="self" type="application/rss+xml" />
	<link>http://alax.info/blog</link>
	<description>// Software Production Line</description>
	<lastBuildDate>Wed, 02 May 2012 15:42:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Endangered species &#8211; Debugging Tools for Windows</title>
		<link>http://alax.info/blog/1363</link>
		<comments>http://alax.info/blog/1363#comments</comments>
		<pubDate>Wed, 02 May 2012 15:42:49 +0000</pubDate>
		<dc:creator>Roman</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[tools. windows. troubleshooting]]></category>

		<guid isPermaLink="false">http://alax.info/blog/?p=1363</guid>
		<description><![CDATA[A standalone redistributable installation before, Debugging Tools for Windows was finally absorbed into Windows SDK. MSDN quote from Download and Install Debugging Tools for Windows: Install Debugging Tools for Windows as a Standalone Component If you do not want an &#8230;<p class="read-more"><a href="http://alax.info/blog/1363">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>A standalone redistributable installation before, Debugging Tools for Windows was finally absorbed into Windows SDK. MSDN quote from <a href="http://msdn.microsoft.com/en-us/windows/hardware/gg463009.aspx">Download and Install Debugging Tools for Windows</a>:</p>
<blockquote><p>Install Debugging Tools for Windows as a Standalone Component</p>
<p>If you do not want an entire kit (WDK or SDK), you can install the Debugging Tools as a standalone component from the Windows SDK.</p>
<p>TO INTSTALL JUST DEBUGGING TOOLS: In the SDK installation wizard, select Debugging Tools, and clear other components that you don’t want. <strong><em>Note that .NET Framework 4.0 also will be installed.</em></strong></p>
<ul>
<li>Install Debugging Tools for Windows as a Standalone Component</li>
</ul>
<p>Install Debugging Tools for Windows without Installing .NET Framework</p>
<p><strong>If you do NOT want to install the .NET Framework, there are additional steps needed.</strong></p>
<blockquote><p>Start the install process on a different computer where it is okay to install the .NET Framework. The installer requires .NET Framework 4.0 or higher, and will install .NET if it is not already installed.</p>
<p>Install the Debugging Tools as a standalone component from the Windows SDK. In the installation wizard, select Debugging Tools, and clear other components that you don’t want.</p>
<p>After installation is complete, go to the program files directory and look for (%Program Files%)\Windows Kits\8.0\Debuggers\Redist.<br />
Copy and run the applicable MSIs on the computer that cannot have .NET.</p></blockquote>
</blockquote>
<p>Also, <a href="http://msdn.microsoft.com/en-us/windows/hardware/hh852363">Windows SDK for Windows 8 Consumer Preview</a> is not available as ISO download. So you have to use web downloader, install the gear, and having gone through this, the <code>.MSI</code> of interest are finally there.</p>
<p>You gotta be kidding me, though still thanks for not removing those completely.</p>
]]></content:encoded>
			<wfw:commentRss>http://alax.info/blog/1363/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enumerating Binary Resource Languages</title>
		<link>http://alax.info/blog/1362</link>
		<comments>http://alax.info/blog/1362#comments</comments>
		<pubDate>Tue, 01 May 2012 17:05:35 +0000</pubDate>
		<dc:creator>Roman</dc:creator>
				<category><![CDATA[ATL]]></category>
		<category><![CDATA[Source]]></category>
		<category><![CDATA[Utilities]]></category>
		<category><![CDATA[.rc]]></category>
		<category><![CDATA[.res]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[language]]></category>
		<category><![CDATA[resource]]></category>
		<category><![CDATA[utility]]></category>
		<category><![CDATA[Windows API]]></category>

		<guid isPermaLink="false">http://alax.info/blog/?p=1362</guid>
		<description><![CDATA[The small application is a goos sample and useful tool in the same time. It enumerates PE binary resources and counts languages used. Why? Normally you want single language of resources, however Visual Studio IDE does not show you languages &#8230;<p class="read-more"><a href="http://alax.info/blog/1362">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>The small application is a goos sample and useful tool in the same time. It enumerates PE binary resources and counts languages used. Why? Normally you want single language of resources, however Visual Studio IDE does not show you languages in a convenient way and it is so easy to make a language mess which does not bite you immediately but might bring you troubles later. Apart from this there was a suspicion that language mess might cause runtime bugs on <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms648049%28v=vs.85%29.aspx"><code>UpdateResource</code></a> API.</p>
<p>The application gets you a summary of languages used and returns with exit code (checkable using e.g. <code>errorlevel</code>) indicating number of languages.</p>
<p>Output is <code>TSV</code>: <code>LANGID</code>, Language Name, Resource Count:</p>
<pre style="color: #000000; background: #ffffff;"><span style="color: #e34adc;">C:</span>\<span style="color: #808030;">&gt;</span>ListResourceLanguages<span style="color: #808030;">.</span>exe C<span style="color: #800080;">:</span>\Windows\syswow64\shell32<span style="color: #808030;">.</span>dll
<span style="color: #008c00;">1049</span>    Russian <span style="color: #008c00;">545</span>
<span style="color: #008c00;">1033</span>    English <span style="color: #008c00;">3318</span></pre>
<p>Download links:</p>
<ul>
<li>Visual C++ .NET 2010 source code: <a href="http://alax.info/trac/public/browser/trunk/Utilities/ListResourceLanguages">Trac</a>, <a href="http://www.alax.info/svn/public/trunk/Utilities/ListResourceLanguages/">Subversion</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://alax.info/blog/1362/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Resource Tools: Custom Resource Types</title>
		<link>http://alax.info/blog/1361</link>
		<comments>http://alax.info/blog/1361#comments</comments>
		<pubDate>Mon, 30 Apr 2012 16:51:31 +0000</pubDate>
		<dc:creator>Roman</dc:creator>
				<category><![CDATA[Resource Tools]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[.rc]]></category>
		<category><![CDATA[.res]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[resource]]></category>
		<category><![CDATA[tool]]></category>
		<category><![CDATA[utility]]></category>

		<guid isPermaLink="false">http://alax.info/blog/?p=1361</guid>
		<description><![CDATA[This update for Resource Tools adds an option to access custom resource types, such as FILE, TYPELIB, REGISTRY etc. It lets enumerate the resource, and load/save them. The COM interafce adds new Items property; the code snippet below accesses type &#8230;<p class="read-more"><a href="http://alax.info/blog/1361">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>This update for <a href="http://alax.info/blog/352">Resource Tools</a> adds an option to access custom resource types, such as <code>FILE</code>, <code>TYPELIB</code>, <code>REGISTRY</code> etc. It lets enumerate the resource, and load/save them. The COM interafce adds new <code>Items</code> property; the code snippet below accesses type library of <code>image2.dll</code> and saves it into external tyle library file <code>image2.tlb</code>:</p>
<pre style="color: #000000; background: #ffffff;">image <span style="color: #808030;">=</span> <span style="color: #800000; font-weight: bold;">new</span> <span style="color: #797997;">ActiveXObject</span><span style="color: #808030;">(</span><span style="color: #800000;">"</span><span style="color: #0000e6;">AlaxInfo.ResourceTools.Image</span><span style="color: #800000;">"</span><span style="color: #808030;">)</span><span style="color: #800080;">;</span>
image<span style="color: #808030;">.</span>Initialize<span style="color: #808030;">(</span><span style="color: #800000;">"</span><span style="color: #0000e6;">C:</span><span style="color: #0f69ff;">\\</span><span style="color: #0000e6;">Windows</span><span style="color: #0f69ff;">\\</span><span style="color: #0000e6;">syswow64</span><span style="color: #0f69ff;">\\</span><span style="color: #0000e6;">imapi2.dll</span><span style="color: #800000;">"</span><span style="color: #808030;">)</span><span style="color: #800080;">;</span>
image<span style="color: #808030;">.</span>Items<span style="color: #808030;">(</span><span style="color: #800000;">"</span><span style="color: #0000e6;">TYPELIB</span><span style="color: #800000;">"</span><span style="color: #808030;">)</span><span style="color: #808030;">.</span>Item<span style="color: #808030;">(</span><span style="color: #008c00;">1</span><span style="color: #808030;">)</span><span style="color: #808030;">.</span>SaveToFile<span style="color: #808030;">(</span><span style="color: #0f4d75;">null</span><span style="color: #808030;">,</span> <span style="color: #800000;">"</span><span style="color: #0000e6;">imapi2.tlb</span><span style="color: #800000;">"</span><span style="color: #808030;">)</span><span style="color: #800080;">;</span></pre>
<p>Additionally, <code>image.EndUpdate(false)</code> call makes the object close all references to the underlying file so that it can be available for other operations (e.g. overwrite), and the COM object might be further re-initialized and reused.</p>
<p>Download links:</p>
<ul>
<li>Title: Alax.Info Resource Tools</li>
<li>Version: 1.0.7</li>
<li>Download (32-bit, Win32): <a href="http://www.alax.info/svn/public/trunk/ResourceTools/ResourceToolsSetup.msi">ResourceToolsSetup.msi</a></li>
<li>Download (64-bit, x64): <a href="http://www.alax.info/svn/public/trunk/ResourceTools/ResourceToolsSetup-x64.msi">ResourceToolsSetup-x64.msi</a></li>
<li>License: This software is free to use</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://alax.info/blog/1361/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LogProcessExceptions: Log Service Process Exceptions</title>
		<link>http://alax.info/blog/1359</link>
		<comments>http://alax.info/blog/1359#comments</comments>
		<pubDate>Sun, 29 Apr 2012 19:10:59 +0000</pubDate>
		<dc:creator>Roman</dc:creator>
				<category><![CDATA[ATL]]></category>
		<category><![CDATA[Seriously]]></category>
		<category><![CDATA[Utilities]]></category>
		<category><![CDATA[WTL]]></category>
		<category><![CDATA[.DMP]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[debugger]]></category>
		<category><![CDATA[exception]]></category>
		<category><![CDATA[minidump]]></category>
		<category><![CDATA[service]]></category>
		<category><![CDATA[support]]></category>
		<category><![CDATA[troubleshooting]]></category>
		<category><![CDATA[utility]]></category>

		<guid isPermaLink="false">http://alax.info/blog/?p=1359</guid>
		<description><![CDATA[One of the nasty issues with LogProcessExceptions utility was that it was unable to attach to service processes and track them to catch their exceptions. The actual problem was that the processes were not listed in first place, so there &#8230;<p class="read-more"><a href="http://alax.info/blog/1359">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>One of the nasty issues with <a href="http://alax.info/blog/1211">LogProcessExceptions</a> utility was that it was unable to attach to service processes and track them to catch their exceptions.</p>
<p>The actual problem was that the processes were not listed in first place, so there was nothing to attach to. Access and security requirements necessary for a process to debug another process are listed in MSDN <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms679295%28v=vs.85%29.aspx"><code>DebugActiveProcess</code></a> article:</p>
<blockquote><p>The debugger must have appropriate access to the target process, and it must be able to open the process for <code>PROCESS_ALL_ACCESS</code>. <code>DebugActiveProcess</code> can fail if the target process is created with a security descriptor that grants the debugger anything less than full access. If the debugging process has the <code>SE_DEBUG_NAME</code> privilege granted and enabled, it can debug any process.</p></blockquote>
<p>The utility did enable the <code>SE_DEBUG_NAME</code> privilege, however it was doing it prior to starting debugging session and after the process of interest was already pointed to by user.</p>
<p>This was insufficient because <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms682629%28v=vs.85%29.aspx"><code>EnumProcesses</code></a> only lists service processes (not actually exactly services, but processes running in different security context) in case debug privilege is already enable by the time of the API call. The utility now enabled the privilege well in advance and list the services, so can be effectively applied to those.</p>
<p><img class="alignnone size-full wp-image-1360" title="LogProcessExceptions - Process List" src="http://alax.info/blog/wp-content/uploads/2012/04/Image0011.png" alt="" width="513" height="400" /></p>
<p>Download links:</p>
<ul>
<li>Partial Visual C++ .NET 2010 source code: <a href="http://www.alax.info/trac/public/browser/trunk/Utilities/LogProcessExceptions">Trac</a>, <a href="http://www.alax.info/svn/public/trunk/Utilities/LogProcessExceptions/">Subversion</a></li>
<li>Binaries: Win32 – <a href="http://www.alax.info/svn/public/trunk/Utilities/LogProcessExceptions/_Bin/Win32/Release/LogProcessExceptions.exe">LogProcessExceptions.exe</a>, x64 – <a href="http://www.alax.info/svn/public/trunk/Utilities/LogProcessExceptions/_Bin/x64/Release/LogProcessExceptions.exe">LogProcessExceptions.exe</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://alax.info/blog/1359/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>COM Class to Send SMTP Email: x64, Attachments, HTML Content-Type</title>
		<link>http://alax.info/blog/1357</link>
		<comments>http://alax.info/blog/1357#comments</comments>
		<pubDate>Sat, 28 Apr 2012 17:45:37 +0000</pubDate>
		<dc:creator>Roman</dc:creator>
				<category><![CDATA[ATL]]></category>
		<category><![CDATA[Utilities]]></category>
		<category><![CDATA[COM]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[message]]></category>
		<category><![CDATA[SMTP]]></category>
		<category><![CDATA[ssl]]></category>
		<category><![CDATA[tls]]></category>
		<category><![CDATA[utilitiy]]></category>

		<guid isPermaLink="false">http://alax.info/blog/?p=1357</guid>
		<description><![CDATA[Here go the updates on the COM library which offers easy to use COM interface to send emails, including over secure TLS and SSL channels: x64 build Attachments property to enable attchments to the message being sent ContentType property to &#8230;<p class="read-more"><a href="http://alax.info/blog/1357">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>Here go the updates on the COM library which offers <a href="http://alax.info/blog/1331">easy to use COM interface to send emails</a>, including over secure TLS and SSL channels:</p>
<ul>
<li><code>x64</code> build</li>
<li><code>Attachments</code> property to enable attchments to the message being sent</li>
<li><code>ContentType</code> property to enable <code>text/html</code> bodies</li>
<li>subject non-English characters are correctly <code>UTF-8</code> encoded</li>
<li>empty <code>To</code>, <code>CC</code>, <code>BCC</code> fields are discarded</li>
<li>recent properties are put onto persistence map: <code>SecureSocketsLayer</code>, <code>TransportLayerSecurity</code>, <code>ContentType</code></li>
</ul>
<pre style="color: #000000; background: #ffffff;">message <span style="color: #808030;">=</span> <span style="color: #800000; font-weight: bold;">new</span> <span style="color: #797997;">ActiveXObject</span><span style="color: #808030;">(</span><span style="color: #800000;">"</span><span style="color: #0000e6;">AlaxInfo.EmailTools.Message</span><span style="color: #800000;">"</span><span style="color: #808030;">)</span><span style="color: #800080;">;</span>
message<span style="color: #808030;">.</span>ServerHost <span style="color: #808030;">=</span> <span style="color: #800000;">"</span><span style="color: #0000e6;">smtp.gmail.com</span><span style="color: #800000;">"</span><span style="color: #800080;">;</span>

<span style="color: #696969;">// ...</span>
message<span style="color: #808030;">.</span>Body <span style="color: #808030;">=</span> <span style="color: #800000;">"</span><span style="color: #0000e6;">See attached.</span><span style="color: #800000;">"</span>

attachment <span style="color: #808030;">=</span> message<span style="color: #808030;">.</span>Attachments<span style="color: #808030;">.</span>Add<span style="color: #808030;">(</span><span style="color: #808030;">)</span><span style="color: #800080;">;</span>
attachment<span style="color: #808030;">.</span>Type <span style="color: #808030;">=</span> <span style="color: #800000;">"</span><span style="color: #0000e6;">text/html</span><span style="color: #800000;">"</span><span style="color: #800080;">;</span>
attachment<span style="color: #808030;">.</span>Disposition <span style="color: #808030;">=</span> <span style="color: #800000;">"</span><span style="color: #0000e6;">attachment</span><span style="color: #800000;">"</span><span style="color: #800080;">;</span>
attachment<span style="color: #808030;">.</span>Name <span style="color: #808030;">=</span> <span style="color: #800000;">"</span><span style="color: #0000e6;">AutoBuildResults.html</span><span style="color: #800000;">"</span><span style="color: #800080;">;</span>
attachment<span style="color: #808030;">.</span>LoadFromFile<span style="color: #808030;">(</span><span style="color: #800000;">"</span><span style="color: #0000e6;">C:</span><span style="color: #0f69ff;">\\</span><span style="color: #0000e6;">AutoBuildResults.html</span><span style="color: #800000;">"</span><span style="color: #808030;">)</span><span style="color: #800080;">;</span>

attachment <span style="color: #808030;">=</span> message<span style="color: #808030;">.</span>Attachments<span style="color: #808030;">.</span>Add<span style="color: #808030;">(</span><span style="color: #808030;">)</span><span style="color: #800080;">;</span>
attachment<span style="color: #808030;">.</span>Type <span style="color: #808030;">=</span> <span style="color: #800000;">"</span><span style="color: #0000e6;">image/jpeg</span><span style="color: #800000;">"</span><span style="color: #800080;">;</span>
<span style="color: #696969;">//attachment.Disposition = "inline";</span>
attachment<span style="color: #808030;">.</span>Name <span style="color: #808030;">=</span> <span style="color: #800000;">"</span><span style="color: #0000e6;">picture.jpg</span><span style="color: #800000;">"</span><span style="color: #800080;">;</span>
attachment<span style="color: #808030;">.</span>LoadFromFile<span style="color: #808030;">(</span><span style="color: #800000;">"</span><span style="color: #0000e6;">C:</span><span style="color: #0f69ff;">\\</span><span style="color: #0000e6;">me.jpg</span><span style="color: #800000;">"</span><span style="color: #808030;">)</span><span style="color: #800080;">;</span>

<span style="color: #696969;">// ...</span>
message<span style="color: #808030;">.</span>Send<span style="color: #808030;">(</span><span style="color: #808030;">)</span><span style="color: #800080;">;</span></pre>
<h4>Download Information</h4>
<ul>
<li>Download (32-bit): <a href="http://www.alax.info/svn/public/trunk/Utilities/EmailTools/Win32/">EmailTools.dll</a></li>
<li>Download (64-bit): <a href="http://www.alax.info/svn/public/trunk/Utilities/EmailTools/x64/">EmailTools.dll</a></li>
<li>License: This software is free to use</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://alax.info/blog/1357/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>American Kestrel Partnership &#8212; The Peregrine Fund</title>
		<link>http://alax.info/blog/1354</link>
		<comments>http://alax.info/blog/1354#comments</comments>
		<pubDate>Tue, 24 Apr 2012 21:11:57 +0000</pubDate>
		<dc:creator>Roman</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Video]]></category>
		<category><![CDATA[ip video source]]></category>
		<category><![CDATA[kestrel]]></category>
		<category><![CDATA[live]]></category>
		<category><![CDATA[nestbox]]></category>
		<category><![CDATA[online]]></category>
		<category><![CDATA[ustream]]></category>

		<guid isPermaLink="false">http://alax.info/blog/?p=1354</guid>
		<description><![CDATA[As a part of American Kestrel Partnership project, Peregrine Fund put live cameras online to broadcast interior and exterior views of American Kestrel nest boxes in their campus in Boise, Idaho. One of the nestboxes is not only populated, four &#8230;<p class="read-more"><a href="http://alax.info/blog/1354">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>As a part of American Kestrel Partnership project, Peregrine Fund put live cameras online to broadcast interior and exterior views of American Kestrel nest boxes in their campus in Boise, Idaho. </p>
<p>One of the nestboxes is not only populated, four eggs have been laid recently and hatching is expected soon. The live picture is made possible by putting IP cameras and connecting them with to <a href="http://www.ustream.tv/">Ustream.tv</a> broadcasting service through <a href="http://www.adobe.com/products/flash-media-encoder.html">Adobe FMLE</a> software through my <a href="http://alax.info/blog/1223">IP Video Source</a> DirectShow driver for IP cameras (the IP camera video feed is streamed 24/7 through a virtual video device picked up by FMLE and re-encoded into uploadable stream forwarded to Ustream online service for further distribution).</p>
<p><iframe width="600" height="450" src="http://www.youtube.com/embed/vpUsHkjXAqU" frameborder="0" allowfullscreen></iframe></p>
<p>For more information, see:</p>
<ul>
<li><a href="http://kestrel.peregrinefund.org">American Kestrel Website</a></li>
<li><a href="http://www.peregrinefund.org/news-release/233">News Release: The Peregrine Fund launches new project, website to conserve American Kestrels</a></li>
<li><a href="http://boisestatepublicradio.org/post/citizen-scientists-get-chance-help-declining-kestrels">NPR news story about the project</a></li>
<li><a href="http://www.peregrinefund.org/american-kestrel">American Kestrel Partnership Project</a></li>
<li><a href="http://en.wikipedia.org/wiki/American_Kestrel">American Kestrel on Wikipedia</a></li>
<li><a href="http://www.ustream.tv/user/ThePeregrineFund">The Peregrine Fund on Ustream.tv</a></li>
</ul>
<p>Watch the pet on live cameras below:</p>
<h3>North Nestbox &#8211; Outside</h3>
<p><a href=http://ustre.am/Evbs>http://ustre.am/Evbs</a></p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="480" height="296" id="utv639704"><param name="flashvars" value="autoplay=false&amp;brand=embed&amp;cid=9652994&amp;v3=1"/><param name="allowfullscreen" value="true"/><param name="allowscriptaccess" value="always"/><param name="movie" value="http://www.ustream.tv/flash/viewer.swf"/><embed flashvars="autoplay=false&amp;brand=embed&amp;cid=9652994&amp;v3=1" width="480" height="296" allowfullscreen="true" allowscriptaccess="always" id="utv639704" name="utv_n_139754" src="http://www.ustream.tv/flash/viewer.swf" type="application/x-shockwave-flash" /></object><br /><a href="http://www.ustream.tv/" style="padding: 2px 0px 4px; width: 400px; background: #ffffff; display: block; color: #000000; font-weight: normal; font-size: 10px; text-decoration: underline; text-align: center;" target="_blank">Live stream videos at Ustream</a></p>
<h3>North Nestbox &#8211; Inside</h3>
<p><a href=http://ustre.am/J6jD>http://ustre.am/J6jD</a></p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="480" height="296" id="utv706221"><param name="flashvars" value="autoplay=false&amp;brand=embed&amp;cid=10749041&amp;v3=1"/><param name="allowfullscreen" value="true"/><param name="allowscriptaccess" value="always"/><param name="movie" value="http://www.ustream.tv/flash/viewer.swf"/><embed flashvars="autoplay=false&amp;brand=embed&amp;cid=10749041&amp;v3=1" width="480" height="296" allowfullscreen="true" allowscriptaccess="always" id="utv706221" name="utv_n_591901" src="http://www.ustream.tv/flash/viewer.swf" type="application/x-shockwave-flash" /></object><br /><a href="http://www.ustream.tv/" style="padding: 2px 0px 4px; width: 400px; background: #ffffff; display: block; color: #000000; font-weight: normal; font-size: 10px; text-decoration: underline; text-align: center;" target="_blank">Live broadcasting by Ustream</a></p>
<p><span id="more-1354"></span></p>
<h3>South Nestbox &#8211; Outside</h3>
<p><a href=http://ustre.am/JjP2>http://ustre.am/JjP2</a></p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="480" height="296" id="utv267903"><param name="flashvars" value="autoplay=false&amp;brand=embed&amp;cid=10800960&amp;v3=1"/><param name="allowfullscreen" value="true"/><param name="allowscriptaccess" value="always"/><param name="movie" value="http://www.ustream.tv/flash/viewer.swf"/><embed flashvars="autoplay=false&amp;brand=embed&amp;cid=10800960&amp;v3=1" width="480" height="296" allowfullscreen="true" allowscriptaccess="always" id="utv267903" name="utv_n_54229" src="http://www.ustream.tv/flash/viewer.swf" type="application/x-shockwave-flash" /></object><br /><a href="http://www.ustream.tv/" style="padding: 2px 0px 4px; width: 400px; background: #ffffff; display: block; color: #000000; font-weight: normal; font-size: 10px; text-decoration: underline; text-align: center;" target="_blank">Streaming Live by Ustream</a></p>
</td>
<td>
<h3>South Nestbox &#8211; Inside</h3>
<p><a href=http://ustre.am/JjP7>http://ustre.am/JjP7</a></p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="480" height="296" id="utv858790"><param name="flashvars" value="autoplay=false&amp;brand=embed&amp;cid=10800965&amp;v3=1"/><param name="allowfullscreen" value="true"/><param name="allowscriptaccess" value="always"/><param name="movie" value="http://www.ustream.tv/flash/viewer.swf"/><embed flashvars="autoplay=false&amp;brand=embed&amp;cid=10800965&amp;v3=1" width="480" height="296" allowfullscreen="true" allowscriptaccess="always" id="utv858790" name="utv_n_708958" src="http://www.ustream.tv/flash/viewer.swf" type="application/x-shockwave-flash" /></object><br /><a href="http://www.ustream.tv/" style="padding: 2px 0px 4px; width: 400px; background: #ffffff; display: block; color: #000000; font-weight: normal; font-size: 10px; text-decoration: underline; text-align: center;" target="_blank">Streaming Live by Ustream</a></p>
]]></content:encoded>
			<wfw:commentRss>http://alax.info/blog/1354/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enabling ATLTRACE output in Release configuration builds</title>
		<link>http://alax.info/blog/1351</link>
		<comments>http://alax.info/blog/1351#comments</comments>
		<pubDate>Sun, 01 Apr 2012 11:40:10 +0000</pubDate>
		<dc:creator>Roman</dc:creator>
				<category><![CDATA[ATL]]></category>
		<category><![CDATA[Source]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[OutputDebugString]]></category>
		<category><![CDATA[release]]></category>

		<guid isPermaLink="false">http://alax.info/blog/?p=1351</guid>
		<description><![CDATA[The original intent is pretty clear, as MSDN states: In release builds, ATLTRACE2 compiles to (void) 0. As simple as this, but once in a while you are in a situation where release build fails to work for unknown reason &#8230;<p class="read-more"><a href="http://alax.info/blog/1351">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>The original intent is pretty clear, as <a href="http://msdn.microsoft.com/en-us/library/dhxsse89.aspx">MSDN states</a>:</p>
<blockquote><p>In release builds, <strong>ATLTRACE2</strong> compiles to <strong>(void) 0</strong>.</p></blockquote>
<p>As simple as this, but once in a while you are in a situation where release build fails to work for unknown reason and you need additional information for troubleshooting, and then you remember that you had debug tracing code still nicely available in the source, it is just being stripped out by definition of <a href="http://msdn.microsoft.com/en-us/library/6xkxyz08.aspx">ATLTRACE</a>/<a href="http://msdn.microsoft.com/en-us/library/dhxsse89.aspx">ATLTRACE2</a> macros for release builds.</p>
<p>To avoid reinvention of the wheel and putting new tracing, it might make sense to just re-enable existing tracing (certainly, if putting debug build binary is out of question, which might be the case in production environment and/or to avoid the hassle of installing additional runtime).</p>
<p>The macros need to be #undef&#8217;ined and redefined appropriately with or without limiting scope by <a href="http://msdn.microsoft.com/en-us/library/2bs04eza%28v=vs.100%29.aspx">push_macro</a>/pop_macro #pragma&#8217;s. The trick with macro has to reach two goals, to pick file name, line and current symbol name using <a href="http://msdn.microsoft.com/en-us/library/b0084kay%28v=VS.71%29.aspx">__FILE__</a> and friend macros, and also accept variable number of arguments.</p>
<p>The trick ATL does and we can use too is to define a helper class, with constructor taking file name, line and symbol name values, and cast operator () taking actual tracing parameters and arguments. Internally the output can be mapped to <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/aa363362%28v=vs.85%29.aspx">OutputDebugString </a>API so that output could be seen using external tool such as <a href="http://technet.microsoft.com/en-us/sysinternals/bb896647">DebugView</a>.</p>
<p>When everything is well set, new the macros in question can be defined as follows:</p>
<pre style="color: #000000; background: #ffffff;"><span style="color: #004a43;">#</span><span style="color: #004a43; font-weight: bold;">pragma </span><span style="color: #bb7977; font-weight: bold;">push_macro(</span><span style="color: #0000e6; font-weight: bold;">"ATLTRACE"</span><span style="color: #bb7977; font-weight: bold;">)</span>
<span style="color: #004a43;">#</span><span style="color: #004a43; font-weight: bold;">pragma </span><span style="color: #bb7977; font-weight: bold;">push_macro(</span><span style="color: #0000e6; font-weight: bold;">"ATLTRACE2"</span><span style="color: #bb7977; font-weight: bold;">)</span>

<span style="color: #004a43;">#</span><span style="color: #004a43;">undef</span><span style="color: #004a43;"> ATLTRACE</span>
<span style="color: #004a43;">#</span><span style="color: #004a43;">undef</span><span style="color: #004a43;"> ATLTRACE2</span>

<span style="color: #004a43;">#</span><span style="color: #004a43;">define</span><span style="color: #004a43;"> ATLTRACE2 CAtlTrace</span><span style="color: #808030;">(</span><span style="color: #004a43;">__FILE__</span><span style="color: #808030;">,</span><span style="color: #004a43;"> __LINE__</span><span style="color: #808030;">,</span><span style="color: #004a43;"> __FUNCTION__</span><span style="color: #808030;">)</span>
<span style="color: #004a43;">#</span><span style="color: #004a43;">define</span><span style="color: #004a43;"> ATLTRACE ATLTRACE2</span>

<span style="color: #800000; font-weight: bold;">int</span> _tmain<span style="color: #808030;">(</span><span style="color: #800000; font-weight: bold;">int</span> argc<span style="color: #808030;">,</span> _TCHAR<span style="color: #808030;">*</span> argv<span style="color: #808030;">[</span><span style="color: #808030;">]</span><span style="color: #808030;">)</span>
<span style="color: #800080;">{</span>
    ATLTRACE<span style="color: #808030;">(</span><span style="color: #800000;">"</span><span style="color: #0000e6;">First: </span><span style="color: #0f69ff;">%d</span><span style="color: #0f69ff;">\n</span><span style="color: #800000;">"</span><span style="color: #808030;">,</span> __LINE__<span style="color: #808030;">)</span><span style="color: #800080;">;</span>
    ATLTRACE<span style="color: #808030;">(</span><span style="color: #800000;">L"</span><span style="color: #0000e6;">Second: </span><span style="color: #0f69ff;">%d</span><span style="color: #0f69ff;">\n</span><span style="color: #800000;">"</span><span style="color: #808030;">,</span> __LINE__<span style="color: #808030;">)</span><span style="color: #800080;">;</span>
    ATLTRACE2<span style="color: #808030;">(</span>atlTraceGeneral<span style="color: #808030;">,</span> <span style="color: #008c00;">2</span><span style="color: #808030;">,</span> <span style="color: #800000;">"</span><span style="color: #0000e6;">Third: </span><span style="color: #0f69ff;">%d</span><span style="color: #0f69ff;">\n</span><span style="color: #800000;">"</span><span style="color: #808030;">,</span> __LINE__<span style="color: #808030;">)</span><span style="color: #800080;">;</span>
    ATLTRACE2<span style="color: #808030;">(</span>atlTraceGeneral<span style="color: #808030;">,</span> <span style="color: #008c00;">2</span><span style="color: #808030;">,</span> <span style="color: #800000;">L"</span><span style="color: #0000e6;">Fourth: </span><span style="color: #0f69ff;">%d</span><span style="color: #0f69ff;">\n</span><span style="color: #800000;">"</span><span style="color: #808030;">,</span> __LINE__<span style="color: #808030;">)</span><span style="color: #800080;">;</span>
    <span style="color: #800000; font-weight: bold;">return</span> <span style="color: #008c00;">0</span><span style="color: #800080;">;</span>
<span style="color: #800080;">}</span>

<span style="color: #004a43;">#</span><span style="color: #004a43; font-weight: bold;">pragma </span><span style="color: #bb7977; font-weight: bold;">pop_macro(</span><span style="color: #0000e6; font-weight: bold;">"ATLTRACE2"</span><span style="color: #bb7977; font-weight: bold;">)</span>
<span style="color: #004a43;">#</span><span style="color: #004a43; font-weight: bold;">pragma </span><span style="color: #bb7977; font-weight: bold;">pop_macro(</span><span style="color: #0000e6; font-weight: bold;">"ATLTRACE"</span><span style="color: #bb7977; font-weight: bold;">)</span></pre>
<p>And the Release configuration output will be:</p>
<p><img class="alignnone size-full wp-image-1352" title="DebugView Output" src="http://alax.info/blog/wp-content/uploads/2012/04/Image001.png" alt="" width="772" height="343" /></p>
<p>Visual C++ .NET 2010 <a href="http://www.alax.info/trac/public/browser/trunk/Utilities/AtlTrace">source code</a> is available from SVN; in particular <strong>CAtlTrace</strong> class is <a href="http://www.alax.info/trac/public/browser/trunk/Utilities/AtlTrace/AtlTrace.cpp#L9">here</a>.</p>
<p>Bonus reading:</p>
<ul>
<li><a href="http://msdn.microsoft.com/en-us/library/2hfwwtbs%28v=vs.100%29.aspx">Debugging and Error Reporting Macros</a></li>
<li><a href="http://www.cprogramming.com/tutorial/visual_studio_trace_log_messages.html">Debugging with Visual Studio 2005/2008: Logging and Tracing</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://alax.info/blog/1351/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>So, how many EVRs you can do?</title>
		<link>http://alax.info/blog/1342</link>
		<comments>http://alax.info/blog/1342#comments</comments>
		<pubDate>Sat, 03 Mar 2012 21:52:12 +0000</pubDate>
		<dc:creator>Roman</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Utilities]]></category>
		<category><![CDATA[Video]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[direct3d]]></category>
		<category><![CDATA[evr]]></category>
		<category><![CDATA[microsoft]]></category>

		<guid isPermaLink="false">http://alax.info/blog/?p=1342</guid>
		<description><![CDATA[Direct3D based DirectShow video renderers – Video Mixing Renderer 9 and Enhanced Video Renderer – have been notoriously known for consuming resources in a way that you can run at most X simultaneously. There has been no comment published on &#8230;<p class="read-more"><a href="http://alax.info/blog/1342">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>Direct3D based DirectShow video renderers – <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/dd407344%28v=vs.85%29.aspx">Video Mixing Renderer 9</a> and <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms694916%28v=vs.85%29.aspx">Enhanced Video Renderer</a> – have been notoriously known for consuming resources in a way that you can run at most X simultaneously. There has been no comment published on the topic and questions (e.g. like this: <a href="http://social.msdn.microsoft.com/Forums/en/windowsdirectshowdevelopment/thread/1debfc45-caa3-4dcb-ab1d-c7162adaa1f7">How many VMR 9 can a PC support concurrently</a>) remain unanswered for a long time. Video Mixing Renderer 7 was a good alternative for some time in past until it was cut down to be unable to support hardware scaling (thanks Microsoft!).</p>
<p>The trendy way to render video nowadays is using Enhanced Video Renderer, a Media Foundation subsystem with an interface into DirectShow to take over state of the art video rendering capabilities. So, how many EVRs one can run simultaneously? Chances are that it is less than one could suppose.</p>
<p>The interesting part is that there is no obvious evidence on type of resource running out, which causing next EVR instance to fail to run. And not even run, the failure seem to be coming up at an earlier stage of just connecting pins in stopped state. The failure might be accompanied with errors like E_INVALIDARG, ERROR_FILE_NOT_FOUND, E_UNEXPECTED. The actual limit appear to be loosely correlating to parameters of video output, such as resolution and bitness.</p>
<p><img class="alignnone size-full wp-image-1344" title="Stress EVR" src="http://alax.info/blog/wp-content/uploads/2012/03/Image001.png" alt="" width="742" height="374" /></p>
<p>Desperately waiting for clarification, I am sharing the tool to estimate the limit:</p>
<ul>
<li>multiple EVR instances at once, hosted by multiple windows, which can be distributed across multiple monitors</li>
<li>choices of resolutions and formats</li>
<li>a double click on an individual renderer pops up property page set displaying effective frame rate</li>
<li>32- and 64-bit versions</li>
</ul>
<p><a href="http://alax.info/blog/wp-content/uploads/2012/03/Image002.png"><img class="alignnone size-large wp-image-1345" title="Stress EVR Live" src="http://alax.info/blog/wp-content/uploads/2012/03/Image002-800x391.png" alt="" width="620" height="303" /></a></p>
<p>A binary [<a href="http://www.alax.info/svn/public/trunk/Utilities/StressEvr/_Bin/Win32/Release%20Trace/StressEvr.exe">Win32</a>, <a href="http://www.alax.info/svn/public/trunk/Utilities/StressEvr/_Bin/x64/Release%20Trace/StressEvr.exe">x64</a>] and partial Visual C++ .NET 2010 <a href="http://www.alax.info/trac/public/browser/trunk/Utilities/StressEvr">partial source code</a> are available from SVN.</p>
]]></content:encoded>
			<wfw:commentRss>http://alax.info/blog/1342/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Arithmetics Problem Generator</title>
		<link>http://alax.info/blog/1340</link>
		<comments>http://alax.info/blog/1340#comments</comments>
		<pubDate>Thu, 23 Feb 2012 21:47:30 +0000</pubDate>
		<dc:creator>Roman</dc:creator>
				<category><![CDATA[Source]]></category>
		<category><![CDATA[generator]]></category>
		<category><![CDATA[math]]></category>

		<guid isPermaLink="false">http://alax.info/blog/?p=1340</guid>
		<description><![CDATA[Having no creativity to build problems myself yet trying to train 9 yo buddy in arithmetics, a small application is here to help generate problem to solve to get familiar with operator priorities and basic math. Tweaking code back and &#8230;<p class="read-more"><a href="http://alax.info/blog/1340">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>Having no creativity to build problems myself yet trying to train 9 yo buddy in arithmetics, a small application is here to help generate problem to solve to get familiar with operator priorities and basic math.</p>
<p>Tweaking code back and forth can make it more or less complex. Regular expression replace by pattern erases all answers from end of lines and the text is ready to be printed for the one being trained.</p>
<pre>180 - 70 - (6460 + 91 - 6) : 77 + (152 - 74 + 2733 - 67) : (4606 : 47) = <strong><span style="color: #ff0000;">?</span></strong>
(1747 - (153 - 66)) : (43 + 125 - (117 - 32)) - 13 * 1 = 7
21 + 145 - (155 - 79) - 120 : 10 - (99 + 560 : 56 - 96) = 65
2 * (270 + 40) : 62 + (139 - 60 + 8753) : (40 + 29) - (180 - (149 - 36 - (91 - 63))) = 43
(4071 - 12 + 2640 : 80) : (98 - (46 + 35 + 7) + 34) = 93
151 + 39 - 45 - (59 + 62 - 33 - (61 - (70 - 46))) = 94
1 * 11 * 4 - (185 - 73 - (118 + 54 + 14 - 89)) = 29
122 - 83 + 81 - (1 + 8) - (101 - 42 - 5 * 2) = 62
254 - 82 - 65 - ((3342 + 13) : 55 + 118 - 96) + (41 * 2 - 38) * 0 * 95 = 24
(1 * 35 + 204 - 87 - 79 + 4 + 5 - (16 + 2758) : (81 - 43)) * 2133 : 79 : 27 = 9</pre>
<p>A binary [<a href="http://www.alax.info/svn/public/trunk/Utilities/GenerateMathProblem01/Release/GenerateMathProblem01.exe">Win32</a>] and partial Visual C++ .NET 2010 <a href="http://www.alax.info/trac/public/browser/trunk/Utilities/GenerateMathProblem01">source code</a> are available from SVN.</p>
<p>If you just need an infinite source of things to crack, it&#8217;s here also: <a href="http://www.alax.info/svn/public/trunk/Utilities/GenerateMathProblem01/Release/01.txt">01.txt</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://alax.info/blog/1340/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oops, AMAP_3D_TARGET</title>
		<link>http://alax.info/blog/1335</link>
		<comments>http://alax.info/blog/1335#comments</comments>
		<pubDate>Mon, 13 Feb 2012 18:43:44 +0000</pubDate>
		<dc:creator>Roman</dc:creator>
				<category><![CDATA[Seriously]]></category>
		<category><![CDATA[Video]]></category>
		<category><![CDATA[3D]]></category>
		<category><![CDATA[DirectDraw]]></category>
		<category><![CDATA[DirectShow]]></category>
		<category><![CDATA[mixing]]></category>
		<category><![CDATA[renderer]]></category>

		<guid isPermaLink="false">http://alax.info/blog/?p=1335</guid>
		<description><![CDATA[Unfortunately, AMAP_3D_TARGET appears to be useless. Internally, surface allocation comes up with the following capabilities for the surface: DDSCAPS_VIDEOMEMORY &#124; DDSCAPS_LOCALVIDMEM &#124; DDSCAPS_OFFSCREENPLAIN &#124; DDSCAPS_3DDEVICE. Sadly, DirectDraw responds (might respond?) with E_NOTIMPL. While one can advance one step further by &#8230;<p class="read-more"><a href="http://alax.info/blog/1335">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>Unfortunately, <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/dd407394%28v=vs.85%29.aspx">AMAP_3D_TARGET</a> appears to be useless. Internally, surface allocation comes up with the following capabilities for the surface: <strong>DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE</strong>. Sadly, DirectDraw responds (might respond?) with <strong>E_NOTIMPL</strong>.</p>
<p>While one can advance one step further by removing <strong>DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM</strong>, another problem is hit that you are no longer able to create a surface with is both FourCC enabled and in the same time has 3D rendering capabilities. Remove your YUV four character code (such as NV12, YV12, YUY2 you would normally have as codec&#8217;s output) or fail miserably with <strong>DDERR_INVALIDPIXELFORMAT</strong>.</p>
<p>Back to the original problem, the <strong>AMAP_3D_TARGET</strong> flag failing to work makes it impossible to allocate 3D-enabled DirectDraw surface with DirectShow <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/dd407343%28v=vs.85%29.aspx">Video Mixing Renderer</a>. While it might sound as deprecated technology, it is yet a supported Windows SDK component, the most efficient video rendering component, the least hardware sensitive video rendering component, and &#8211; the most immediately important &#8211; the only way an SDK I am working with can deliver its video overlay.</p>
<p>So, there is no easy way to request a 3D enabled surface through a custom allocator-presenter, with a hook in the <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/dd390521%28v=vs.85%29.aspx">IVMRSurfaceAllocator::AllocateSurface</a> updating the allocation flags. It does not make much sense to replace the whole allocator-presenter either: while an earlier DirectShow/Windows SDK provides a decent base for custom allocator-presenter, it is going to eventually hit the same problems mentioned above. And you cannot blit from 3D surface into a plain offscreen surface either without getting <strong>E_FAIL</strong>.</p>
<p>What appears to still be possible is allocating an addition 3D enabled surface, such as within <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/dd390446%28v=vs.85%29.aspx">IVMRImagePresenter::StartPresenting</a> and using it as a replacement surface within <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/dd390445%28v=vs.85%29.aspx">IVMRImagePresenter::PresentImage</a>. Having a custom allocator-presenter receive video frame, you can blit the picture into 3D-enabled surface, do your thing and pass the updated <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/dd407392%28v=vs.85%29.aspx">VMRPRESENTATIONINFO</a> to default allocator-presenter so that it presents the additional update surface, not the original one.</p>
<p><span id="more-1335"></span></p>
<p><img class="alignnone size-full wp-image-1336" title="3D-enabled DirectDraw Surface with a Video Mixing Renderer through Custom Allocator-Presenter" src="http://alax.info/blog/wp-content/uploads/2012/02/Image001.png" alt="" width="576" height="423" /></p>
]]></content:encoded>
			<wfw:commentRss>http://alax.info/blog/1335/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

