<?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 &#187; microsoft</title>
	<atom:link href="http://alax.info/blog/tag/microsoft/feed" rel="self" type="application/rss+xml" />
	<link>http://alax.info/blog</link>
	<description>Software Production Line</description>
	<lastBuildDate>Tue, 03 Aug 2010 09:48:06 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Microsoft.Jet.OLEDB.4.0 ProgID is not available (Windows 7 but probably not only)</title>
		<link>http://alax.info/blog/1086</link>
		<comments>http://alax.info/blog/1086#comments</comments>
		<pubDate>Fri, 30 Oct 2009 08:56:38 +0000</pubDate>
		<dc:creator>Roman</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[COM]]></category>
		<category><![CDATA[environment]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[ole]]></category>
		<category><![CDATA[oledb]]></category>
		<category><![CDATA[registry]]></category>
		<category><![CDATA[win7]]></category>

		<guid isPermaLink="false">http://alax.info/blog/?p=1086</guid>
		<description><![CDATA[It was a sort of ridiculous problem: an attempt to instantiate a Microsoft.Jet.OLEDB.4.0 object failed with error. Still some applications are still running without problems connecting to Jet daabases, how comes?
There has been a number of posts on Internet, but none of the top ones appeared to be relevant.
The problem is reproduced extremely simple:

int _tmain(int [...]]]></description>
			<content:encoded><![CDATA[<p>It was a sort of ridiculous problem: an attempt to instantiate a Microsoft.Jet.OLEDB.4.0 object failed with error. Still some applications are still running without problems connecting to Jet daabases, how comes?</p>
<p>There has been <a href="http://www.google.com/search?q=Microsoft.Jet.OLEDB.4.0">a number of posts on Internet</a>, but none of the top ones appeared to be relevant.</p>
<p>The problem is reproduced extremely simple:</p>
<pre>
<pre style="background: #ffffff none repeat scroll 0% 0%; color: #000000; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;"><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>
    ATLVERIFY<span style="color: #808030;">(</span>SUCCEEDED<span style="color: #808030;">(</span>CoInitialize<span style="color: #808030;">(</span><span style="color: #7d0045;">NULL</span><span style="color: #808030;">)</span><span style="color: #808030;">)</span><span style="color: #808030;">)</span><span style="color: #800080;">;</span>
    <span style="color: #800080;">{</span>
        <span style="color: #696969;">//CoLoadLibrary(L"C:\\Program Files (x86)\\Common Files\\System\\Ole DB\\oledb32.dll", TRUE);</span>
        CComPtr<span style="color: #800080;">&lt;</span>IDBInitialize<span style="color: #800080;">&gt;</span> pDbInitialize<span style="color: #800080;">;</span>
        <span style="color: #800000; font-weight: bold;">const</span> HRESULT nResult <span style="color: #808030;">=</span> pDbInitialize<span style="color: #808030;">.</span>CoCreateInstance<span style="color: #808030;">(</span><span style="color: #800000;">L"</span><span style="color: #0000e6;">Microsoft.Jet.OLEDB.4.0</span><span style="color: #800000;">"</span><span style="color: #808030;">,</span> <span style="color: #7d0045;">NULL</span><span style="color: #808030;">,</span> CLSCTX_INPROC_SERVER<span style="color: #808030;">)</span><span style="color: #800080;">;</span>
        _tprintf<span style="color: #808030;">(</span>_T<span style="color: #808030;">(</span><span style="color: #800000;">"</span><span style="color: #0000e6;">nResult 0x</span><span style="color: #0f69ff;">%08x</span><span style="color: #0f69ff;">\n</span><span style="color: #800000;">"</span><span style="color: #808030;">)</span><span style="color: #808030;">,</span> nResult<span style="color: #808030;">)</span><span style="color: #800080;">;</span>
    <span style="color: #800080;">}</span>
    CoUninitialize<span style="color: #808030;">(</span><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></pre>
</pre>
<p>Oops, the code gives error REGDB_E_CLASSNOTREG 0&#215;80040154 &#8220;Class not registered&#8221;. It looked like system was unable to locate one of the internally used DLLs &#8211; oledb32.dll, and if we help by uncommenting the line commented in the code snippet above, the error changes to  ERROR_MOD_NOT_FOUND 0&#215;8007007e &#8220;The specified module could not be found&#8221;.</p>
<p>The problem appears to be that one of the system components, which is involved, &#8220;Microsoft OLE DB Data Conversion Library&#8221; is registered with the system using a <a href="http://msdn.microsoft.com/en-us/library/ms724884%28VS.85%29.aspx">REG_EXPAND_SZ</a> value, to be located using path &#8220;%CommonProgramFiles(x86)%\System\Ole DB\oledb32.dll&#8221;. It is obvious that <strong>CommonProgramFiles(x86)</strong> is placeholder to be expanded, but does the expansion succeed?</p>
<p><span id="more-1086"></span></p>
<p>On my system there was no such environment string, so expansion failed. There however was <strong>CommonProgramFiles</strong>, and it pointed to correct location. So, this hot fix makes it work right:</p>
<pre><span style="color: #603000;">BOOL</span> UpdateEnvironmentVariables<span style="color: #808030;">(</span><span style="color: #808030;">)</span>
<span style="color: #800080;">{</span>
    <span style="color: #603000;">CString</span> sCommonProgramFilesX86<span style="color: #800080;">;</span>
    sCommonProgramFilesX86<span style="color: #808030;">.</span><span style="color: #400000;">GetEnvironmentVariable</span><span style="color: #808030;">(</span>_T<span style="color: #808030;">(</span><span style="color: #800000;">"</span><span style="color: #0000e6;">CommonProgramFiles(x86)</span><span style="color: #800000;">"</span><span style="color: #808030;">)</span><span style="color: #808030;">)</span><span style="color: #800080;">;</span>
    <span style="color: #800000; font-weight: bold;">if</span><span style="color: #808030;">(</span>sCommonProgramFilesX86<span style="color: #808030;">.</span>IsEmpty<span style="color: #808030;">(</span><span style="color: #808030;">)</span><span style="color: #808030;">)</span>
    <span style="color: #800080;">{</span>
        <span style="color: #603000;">CString</span> sCommonProgramFiles<span style="color: #800080;">;</span>
        sCommonProgramFiles<span style="color: #808030;">.</span><span style="color: #400000;">GetEnvironmentVariable</span><span style="color: #808030;">(</span>_T<span style="color: #808030;">(</span><span style="color: #800000;">"</span><span style="color: #0000e6;">CommonProgramFiles</span><span style="color: #800000;">"</span><span style="color: #808030;">)</span><span style="color: #808030;">)</span><span style="color: #800080;">;</span>
        <span style="color: #800000; font-weight: bold;">if</span><span style="color: #808030;">(</span><span style="color: #808030;">!</span>sCommonProgramFiles<span style="color: #808030;">.</span>IsEmpty<span style="color: #808030;">(</span><span style="color: #808030;">)</span><span style="color: #808030;">)</span>
        <span style="color: #800080;">{</span>
            ATLVERIFY<span style="color: #808030;">(</span><span style="color: #400000;">SetEnvironmentVariable</span><span style="color: #808030;">(</span>_T<span style="color: #808030;">(</span><span style="color: #800000;">"</span><span style="color: #0000e6;">CommonProgramFiles(x86)</span><span style="color: #800000;">"</span><span style="color: #808030;">)</span><span style="color: #808030;">,</span> sCommonProgramFiles<span style="color: #808030;">)</span><span style="color: #808030;">)</span><span style="color: #800080;">;</span>
            <span style="color: #800000; font-weight: bold;">return</span> TRUE<span style="color: #800080;">;</span>
        <span style="color: #800080;">}</span>
    <span style="color: #800080;">}</span>
    <span style="color: #800000; font-weight: bold;">return</span> FALSE<span style="color: #800080;">;</span>
<span style="color: #800080;">}</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>
    ATLVERIFY<span style="color: #808030;">(</span>SUCCEEDED<span style="color: #808030;">(</span>CoInitialize<span style="color: #808030;">(</span><span style="color: #7d0045;">NULL</span><span style="color: #808030;">)</span><span style="color: #808030;">)</span><span style="color: #808030;">)</span><span style="color: #800080;">;</span>
    <span style="color: #800080;">{</span>
        UpdateEnvironmentVariables<span style="color: #808030;">(</span><span style="color: #808030;">)</span><span style="color: #800080;">;</span>
        CComPtr<span style="color: #800080;">&lt;</span>IDBInitialize<span style="color: #800080;">&gt;</span> pDbInitialize<span style="color: #800080;">;</span>
        <span style="color: #800000; font-weight: bold;">const</span> HRESULT nResult <span style="color: #808030;">=</span> pDbInitialize<span style="color: #808030;">.</span>CoCreateInstance<span style="color: #808030;">(</span><span style="color: #800000;">L"</span><span style="color: #0000e6;">Microsoft.Jet.OLEDB.4.0</span><span style="color: #800000;">"</span><span style="color: #808030;">,</span> <span style="color: #7d0045;">NULL</span><span style="color: #808030;">,</span> CLSCTX_INPROC_SERVER<span style="color: #808030;">)</span><span style="color: #800080;">;</span>
        _tprintf<span style="color: #808030;">(</span>_T<span style="color: #808030;">(</span><span style="color: #800000;">"</span><span style="color: #0000e6;">nResult 0x</span><span style="color: #0f69ff;">%08x</span><span style="color: #0f69ff;">\n</span><span style="color: #800000;">"</span><span style="color: #808030;">)</span><span style="color: #808030;">,</span> nResult<span style="color: #808030;">)</span><span style="color: #800080;">;</span>
    <span style="color: #800080;">}</span>
    CoUninitialize<span style="color: #808030;">(</span><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></pre>
<p>I am under impression that the problem is not specific to Windows 7. I remember similar symptoms on Windows XP system, but they were not critical and not investigated to solution. It rather seems that OLE DB component is registering itself using a reference to environment variable which is not present on a number of systems.</p>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 81px; width: 1px; height: 1px;">
<h3 class="r"><a class="l" onmousedown="return rwt(this,'','','res','1','AFQjCNEiQBNPN2MLUciPFN3dRVUU-1FyJA','&amp;sig2=GPxd_FHW5MyBRM2Op0Da1A','0CAoQFjAA')" href="http://support.software602.com/kb/view.aspx?articleID=987">Error code 80040154. <em>Class not registered</em></a></h3>
</div>
]]></content:encoded>
			<wfw:commentRss>http://alax.info/blog/1086/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Microsoft MVP Award in DirectShow/Media Foundation</title>
		<link>http://alax.info/blog/973</link>
		<comments>http://alax.info/blog/973#comments</comments>
		<pubDate>Sat, 04 Jul 2009 08:21:31 +0000</pubDate>
		<dc:creator>Roman</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[award]]></category>
		<category><![CDATA[DirectShow]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[mvp]]></category>

		<guid isPermaLink="false">http://alax.info/blog/?p=973</guid>
		<description><![CDATA[As an appreciation of outstanding contributions in DShow/Media Foundation technical communities during the past year I was presented with the 2009 Microsoft® MVP Award, which I am very much pleased to receive.
In an intention to accompany the post with useful DirectShow related information, here is the link list of most important DirectShow resources on the [...]]]></description>
			<content:encoded><![CDATA[<p>As an appreciation of outstanding contributions in DShow/Media Foundation technical communities during the past year I was presented with the 2009 <a href="https://mvp.support.microsoft.com/">Microsoft® MVP Award</a>, which I am very much pleased to receive.</p>
<div class="wp-caption aligncenter" style="width: 510px"><a href="http://mvp.support.microsoft.com/" target="_blank"><img class=" " style="margin: 2px;" title="Microsoft Most Valuable Professional Award" src="http://mvp.support.microsoft.com/library/images/support/en-US/MVP_08Banner_EN.jpg" alt="Microsoft Most Valuable Professional Award" width="500" height="80" /></a><p class="wp-caption-text">// Microsoft Most Valuable Professional Award</p></div>
<p>In an intention to accompany the post with useful DirectShow related information, here is the link list of most important DirectShow resources on the Internet:</p>
<ul>
<li>Microsoft:
<ul>
<li><a href="http://msdn.microsoft.com/en-us/library/dd375467%28VS.85%29.aspx">DirectShow Reference</a> (do not underestimate official documentation, it is well done and really covers minor but important details)</li>
<li><a href="http://social.msdn.microsoft.com/forums/en-US/windowsdirectshowdevelopment/">DirectShow Development Forum</a></li>
</ul>
</li>
<li>Social:
<ul>
<li><a href="http://groups.google.com/groups/dir?sel=usenet%3Dmicrosoft.public.win32.programmer.directx">Microsoft.public.win32.programmer.directx.* Usenet Groups </a></li>
<li><a href="http://forum.wonderu.com/">DirectShow Forums in Russian</a></li>
</ul>
</li>
<li>Resources online:
<ul>
<li><a href="http://www.riseoftheants.com/mmx/faq.htm">Alessandro Angeli&#8217;s Programming FAQ</a> &#8211; frequently asked questions and answers</li>
<li><a href="http://tmhare.mvps.org/">The March Hare&#8217;s DShow Site</a> &#8211; links, downloads, information</li>
<li><a href="http://www.gdcl.co.uk/">GDCL (Geraint Davies Consulting Ltd) by Geraint Davies</a> &#8211; information and downloads, specifically popular for &#8220;bridge&#8221; solution (<a href="http://www.gdcl.co.uk/gmfbridge/index.htm">GMFBridge</a>) for connecting multiple graphs</li>
<li><a href="http://chrisnet.net/code.htm">Chris P.&#8217;s Code Samples</a> &#8211; especially audio related</li>
<li><a href="http://www.roujansky.com/">Michel Roujansky, Multimedia &amp; IT Consultant and Trainer</a> &#8211; DirectX and DirectShow consulting</li>
<li><a href="http://sourceforge.net/projects/directshownet/">DirectShow.NET Library</a> &#8211; for those who prefer interfacing to DirectShow from managed code, in particular C# (as the .NET questions keep being posted to other places, while they should go directly there)</li>
<li><a href="http://sourceforge.net/projects/guliverkli/">Gabest&#8217;s Guliverkli Project</a> &#8211; on SourceForge, a home of Media Player Classic and various filters</li>
<li><a href="http://blog.monogram.sk/janos/2009/06/14/monogram-graphstudio-0320/">Monogram Multimedia and Igor Jánoš</a> &#8211; with <a href="http://blog.monogram.sk/janos/2009/06/14/monogram-graphstudio-0320/">GraphStudio</a>, an important alternative to Windows SDK GraphEdit, and a home of useful DirectShow <a href="http://blog.monogram.sk/janos/directshow-filters/">filters</a></li>
</ul>
</li>
<li>Non-DirectShow but related:
<ul>
<li><a href="http://software.intel.com/en-us/intel-ipp/">Intel Integrated Performance Primitives Library</a> &#8211; a library with basic media related functions built with performance in mind, provided with sample code that covers a wide range of existing multimedia algorithms and tasks</li>
</ul>
</li>
</ul>
<p><span id="more-973"></span></p>
<div id="attachment_985" class="wp-caption alignleft" style="width: 310px"><a href="http://alax.info/blog/wp-content/uploads/2009/07/img_1056a.jpg"><img class="size-medium wp-image-985" title="Microsoft MVP Award Souvenir and Certificate" src="http://alax.info/blog/wp-content/uploads/2009/07/img_1056a-300x186.jpg" alt="Microsoft MVP Award Souvenir and Certificate" width="300" height="186" /></a><p class="wp-caption-text">Microsoft MVP Award Souvenir and Certificate</p></div>
]]></content:encoded>
			<wfw:commentRss>http://alax.info/blog/973/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows Shell integration and Windows Live Messenger: things that should have never been done</title>
		<link>http://alax.info/blog/958</link>
		<comments>http://alax.info/blog/958#comments</comments>
		<pubDate>Wed, 24 Jun 2009 12:52:13 +0000</pubDate>
		<dc:creator>Roman</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[extension]]></category>
		<category><![CDATA[folder]]></category>
		<category><![CDATA[live]]></category>
		<category><![CDATA[messenger]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://alax.info/blog/?p=958</guid>
		<description><![CDATA[If you drag a file over Windows Live Messenger&#8217;s My Sharing Folders shell name space item, it would immediately interrupt dragging with an error message box, even if you never planned to drop onto this folder:

This should definitely be rather implemented a different way. If you ever tried to drag something using slow PC touchpad, [...]]]></description>
			<content:encoded><![CDATA[<p>If you drag a file over <a href="http://download.live.com/messenger">Windows Live Messenger</a>&#8217;s <em>My Sharing Folders</em> shell name space item, it would immediately interrupt dragging with an error message box, even if you never planned to drop onto this folder:</p>
<p><img class="alignnone size-full wp-image-957" title="Windows Live Messenger" src="http://alax.info/blog/wp-content/uploads/2009/06/24-image001.png" alt="Windows Live Messenger" width="698" height="388" /></p>
<p>This should definitely be rather implemented a different way. If you ever tried to drag something using slow PC touchpad, you probably have an idea of how annoying such an interruption could be.</p>
<p>Windows Live Messenger was pre-installed. To disable shared folders feature, I wanted to find a proper setting in options, but it did not appear to be easy enough: Help button, Show the menu bar, Tools, Options, Sharing Folders on the left, oops! it was not helpful.</p>
<p>Going another way of finding DLL that hosts the shell extension revealed file named: <em>C:\Program Files\Windows Live\Messenger\fsshext.8.5.1302.1018.dll</em>. Once unregistered, the folder went away from the shell (process restart needed, typically logoff/logon):</p>
<pre>C:\&gt;regsvr32 /u "C:\Program Files\Windows Live\Messenger\fsshext.8.5.1302.1018.dll"</pre>
]]></content:encoded>
			<wfw:commentRss>http://alax.info/blog/958/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Downloading Windows 7 Beta 32-bit</title>
		<link>http://alax.info/blog/787</link>
		<comments>http://alax.info/blog/787#comments</comments>
		<pubDate>Mon, 02 Feb 2009 23:39:12 +0000</pubDate>
		<dc:creator>Roman</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[crap]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[seven]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://alax.info/blog/?p=787</guid>
		<description><![CDATA[I decided to download a beta of Windows 7, so many people shared their positive impressions of. I am not quite sure I will have time to actually evaluate it, but for the case I would feel like, it is always nice to have the .ISO image ready for a try.
There was nothing worth a [...]]]></description>
			<content:encoded><![CDATA[<p>I decided to download <a href="https://www.microsoft.com/betaexperience/productkeys/win7-32/enus/default.aspx">a beta of Windows 7</a>, so many people shared their positive impressions of. I am not quite sure I will have time to actually evaluate it, but for the case I would feel like, it is always nice to have the .ISO image ready for a try.</p>
<p>There was nothing worth a word until I reached the download screen which opened an extremely awful Java applet that pretended to be a download manager. It seemed to be a new spin of technology and sort of I don&#8217;t need a nice download manager anymore because direct HTTP links are out of fashion. It started pumping bytes (actually thanks for that) and I my attempt to copy/paste a direct link into my <a href="http://www.downthemall.net/">DownThemAll</a> <a href="http://mozilla.org">FireFox</a> plugin was vain.</p>
<p>At some 20% the download froze without a notice. The download did not even ungray the resume buttons before I restarted FireFox process and then any attempt to resume led to weird message boxes. Frankly at this point I almost lost the desire to actually complete the download. But left a last chance to have it completed by IE. Internet Explorer (expectedly!) preferred ActiveX control to Java applet. It&#8217;s GUI was a bit less scary and it took over incomplete download and&#8230;</p>
<p><a href="http://alax.info/blog/wp-content/uploads/2009/02/02-image001.png"><img class="alignnone size-medium wp-image-788" title="Window 7 Beta Download Manager Crash" src="http://alax.info/blog/wp-content/uploads/2009/02/02-image001-300x185.png" alt="" width="300" height="185" /></a></p>
<p>An attached debugger showed a call stack (oops, I did not save exact call stack) in Manager.exe process in C runtime module, in a CString class method&#8230; It went no further than this crashing at exactly the same point until I manually deleted the incomplete download, when it again repeated a weird message box and then finally restart the download from the start. That was enough for me and found a .torrent with the exactly the same file on <a href="http://thepiratebay.org">thepiratebay.org</a>, which I am quite sure will download without a problem.</p>
<p>Isn&#8217;t it incredibly stupid that significant amount of work was invested into unnecessary task, ugly user interface, buggy implementation (freeze, incapable download manager, weird messages, crash) with a solid residual of inability to conveniently download the thing, while the file could be just put onto regular MS download service?</p>
]]></content:encoded>
			<wfw:commentRss>http://alax.info/blog/787/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Frame-Pointer Omission /Oy</title>
		<link>http://alax.info/blog/672</link>
		<comments>http://alax.info/blog/672#comments</comments>
		<pubDate>Sat, 18 Oct 2008 18:34:35 +0000</pubDate>
		<dc:creator>Roman</dc:creator>
				<category><![CDATA[Seriously]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[compiler]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[optimization]]></category>

		<guid isPermaLink="false">http://alax.info/blog/?p=672</guid>
		<description><![CDATA[I just read a post on frame pointer omission (FPO) optimization, also known as /Oy compiler flag. And a comment from Vladimir Scherbina on problems getting the feature actually work. I wondered if there has been any improvement with a Visual Studio .NET 2008 SP1. latest compiler from Microsoft and briefly &#8211; the result is [...]]]></description>
			<content:encoded><![CDATA[<p>I just read a post on frame pointer omission (FPO) optimization, also known as /Oy compiler flag. And a comment from Vladimir Scherbina on problems getting the feature actually work. I wondered if there has been any improvement with a Visual Studio .NET 2008 SP1. latest compiler from Microsoft and briefly &#8211; the result is yes, the feature seems to be working.</p>
<p>This is the reference code for the feature:</p>
<pre>const volatile INT g_nValueA = 0;
const volatile INT g_nValueB = 0;

#pragma optimize("y", off)

__declspec(dllexport) __declspec(noinline) BOOL STDMETHODCALLTYPE A(const volatile INT&amp; nValue = g_nValueA)
{
	return nValue != 0;
}

#pragma optimize("y", on)

__declspec(dllexport) __declspec(noinline) BOOL STDMETHODCALLTYPE B(const volatile INT&amp; nValue = g_nValueB)
{
	return nValue != 0;
}

int _tmain(int argc, _TCHAR* argv[])
{
	A();
	B();
	return 0;
}</pre>
<p>The code is to be compiled in Release and function A is to be not optimized while B is subject for optimization and omitting the frame pointer.</p>
<p>Disassembly shows for A:</p>
<p><span id="more-672"></span></p>
<pre>__declspec(dllexport) __declspec(noinline) BOOL STDMETHODCALLTYPE A(const volatile INT&amp; nValue = g_nValueA)
{
00401000  push        ebp
00401001  mov         ebp,esp
	return nValue != 0;
00401003  mov         eax,dword ptr [nValue]
00401006  mov         ecx,dword ptr [eax]
00401008  xor         eax,eax
0040100A  test        ecx,ecx
0040100C  setne       al
}
0040100F  pop         ebp
00401010  ret         4</pre>
<p>and for B:</p>
<pre>__declspec(dllexport) __declspec(noinline) BOOL STDMETHODCALLTYPE B(const volatile INT&amp; nValue = g_nValueB)
{
	return nValue != 0;
00401020  mov         eax,dword ptr [esp+4]
00401024  mov         ecx,dword ptr [eax]
00401026  xor         eax,eax
00401028  test        ecx,ecx
0040102A  setne       al
}
0040102D  ret         4</pre>
<p>and the difference is what was actually expected. It looked as it finally got to work but a check with Visual Studio versions 2003 and 2005 shown that optiomization makes a difference on older versions too.</p>
]]></content:encoded>
			<wfw:commentRss>http://alax.info/blog/672/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Microsoft Visual Studio .NET Development Environment</title>
		<link>http://alax.info/blog/646</link>
		<comments>http://alax.info/blog/646#comments</comments>
		<pubDate>Mon, 15 Sep 2008 06:50:42 +0000</pubDate>
		<dc:creator>Roman</dc:creator>
				<category><![CDATA[Seriously]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Video]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[stupidity]]></category>
		<category><![CDATA[visual studio]]></category>

		<guid isPermaLink="false">http://alax.info/blog/?p=646</guid>
		<description><![CDATA[The other day I &#8220;wrote some code&#8221; to workaround an extremely stupid hardware issues. The depth of idiocy is just incredible: to release a bunch of hardware that just don&#8217;t work, release a number of firmware updates that just don&#8217;t fix the simplest thing: HTTP compatibility. If there was a single little try to see [...]]]></description>
			<content:encoded><![CDATA[<p>The other day I &#8220;wrote some code&#8221; to workaround an extremely stupid hardware issues. The depth of idiocy is just incredible: to release a bunch of hardware that just don&#8217;t work, release a number of firmware updates that just don&#8217;t fix the simplest thing: HTTP compatibility. If there was a single little try to see how this piece of crap comminicates with any WinHTTP based application, an error 12152 ERROR_WINHTTP_INVALID_SERVER_RESPONSE on the first second of execution would imminently come up and demonstrate that someone has to be fired without any hesitation.</p>
<p>Things, however, definitely went a different way with hardware still on the shelves and no firmware upgrades available on the website. Our customer got into trouble having already recommended his customer the buggy thing in amount of X and forwarded us the question of getting everything working. As we decided to make a step towards, I needed to &#8220;write some code&#8221; to settle the problem.</p>
<p>However, the story was about a different thing. So in order to put a comment into code that explains what kind of problem we are dealing with, I copy/pasted a fragment of HTTP request/response content from <a href="http://www.wireshark.org/">Wireshark</a> into source file being edited within MS Visual Studio .NET IDE. Wireshark copies text with some weird line endings, I knew that. I removed extra empty lines from pasted text and actually did not expect anything to go wrong. However who appeared to be wrong was me.</p>
<p>Initially there seemed to be no problem, I tried to compile code, fixed some compiler errors, even started application. I was somewhat confused that the application did not hit my breakpoint while it should. Then I noticed it did not even generate code for this line. As these things do happen with development environment, I re-opened IDE, deleting .NCB for the project and Rebuilt All. The problem however did not go.  After further code modification, the compiler started giving errors and shown wrong lines in build output, which did not match source code line numbers.</p>
<p>This started being completely stupid: I was to look at wrong identifier, search through entire source file for occurrences, see if this particular occurrence might be actually a problem for compiler and so on. I made it compiled successffully but under debugger there were still wrong line numbers which made it impossible to debug and set breakpoints.</p>
<p>At this point I remembered Wireshark and line endings. Just removing the comments did not worked. And since visually everything was OK with the source, there should be an easy way found to normalize text. And what I did was the following: I started new message in <a href="http://en.wikipedia.org/wiki/Mozilla_Thunderbird">Mozilla Thunderbird</a> and copy/pasted entire source file content into Thunderbird&#8217;s editor. Then copy/pasted back into Visual Studio and finally got the things fixed.</p>
]]></content:encoded>
			<wfw:commentRss>http://alax.info/blog/646/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Microsoft Forums, RSS</title>
		<link>http://alax.info/blog/642</link>
		<comments>http://alax.info/blog/642#comments</comments>
		<pubDate>Mon, 15 Sep 2008 06:19:56 +0000</pubDate>
		<dc:creator>Roman</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[stupidity]]></category>

		<guid isPermaLink="false">http://alax.info/blog/?p=642</guid>
		<description><![CDATA[It is amazing how it might come that Microsoft Forums&#8216; RSS feed appears broken on Google Reader with duplicated entries for each of the items.

Regardless of whose the bug is, it seems to me that it is the Microsoft&#8217;s one, both are sophisticated applications of a large scale while RSS thing is just nothing in [...]]]></description>
			<content:encoded><![CDATA[<p>It is amazing how it might come that <a href="http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=129&amp;SiteID=1">Microsoft Forums</a>&#8216; RSS feed appears broken on Google Reader with duplicated entries for each of the items.</p>
<p><a href="http://alax.info/blog/wp-content/uploads/2008/09/15-image001.png"><img class="alignnone size-medium wp-image-641" title="Microsoft Forums, RSS" src="http://alax.info/blog/wp-content/uploads/2008/09/15-image001-300x241.png" alt="" width="300" height="241" /></a></p>
<p>Regardless of whose the bug is, it seems to me that it is the Microsoft&#8217;s one, both are sophisticated applications of a large scale while RSS thing is just nothing in comparison. Was it really difficult to make the darn thing work?</p>
]]></content:encoded>
			<wfw:commentRss>http://alax.info/blog/642/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Buggy Microsoft Forums</title>
		<link>http://alax.info/blog/638</link>
		<comments>http://alax.info/blog/638#comments</comments>
		<pubDate>Tue, 09 Sep 2008 11:08:37 +0000</pubDate>
		<dc:creator>Roman</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[forum]]></category>
		<category><![CDATA[microsoft]]></category>

		<guid isPermaLink="false">http://alax.info/blog/?p=638</guid>
		<description><![CDATA[It seems that everything is buggy nowadays. Some things &#8211; more buggy, some are less. I did not expect Microsoft Forums website to be so&#8230; so&#8230; of so improper quality. Especially compared to variety of popular forum software, free phpbb, google news etc.
MS WYSIWYG post editor can stand no criticism at all, it is one [...]]]></description>
			<content:encoded><![CDATA[<p>It seems that everything is buggy nowadays. Some things &#8211; more buggy, some are less. I did not expect Microsoft Forums website to be so&#8230; so&#8230; of so improper quality. Especially compared to variety of popular forum software, free phpbb, google news etc.</p>
<p>MS WYSIWYG post editor can stand no criticism at all, it is one entire bug under FireFox browser. What I recently start getting is a view of the forum which seems to exclude weeks of recent data:</p>
<p><a href="http://alax.info/blog/wp-content/uploads/2008/09/09-image001.png"><img class="alignnone size-medium wp-image-639" title="MS Forums Bug" src="http://alax.info/blog/wp-content/uploads/2008/09/09-image001-300x166.png" alt="" width="300" height="166" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://alax.info/blog/638/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows Live ID is not alive</title>
		<link>http://alax.info/blog/384</link>
		<comments>http://alax.info/blog/384#comments</comments>
		<pubDate>Thu, 17 Apr 2008 07:25:37 +0000</pubDate>
		<dc:creator>Roman</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[microsoft]]></category>

		<guid isPermaLink="false">http://alax.info/blog/?p=384</guid>
		<description><![CDATA[I have been trying to download MSDN Community Distribution CD March 2008 for a week or so, which requires registration to access the download. OK, I was trying to register pressing Continue button to be taken to &#8220;Registration Required for This Download&#8221;. I had Passport account some time ago which I tried to use to [...]]]></description>
			<content:encoded><![CDATA[<p>I have been trying to download <a href="http://alax.info/blog/379">MSDN Community Distribution CD March 2008</a> for a week or so, which requires registration to access the download. OK, I was trying to register pressing Continue button to be taken to &#8220;Registration Required for This Download&#8221;. I had Passport account some time ago which I tried to use to <a href="https://login.live.com/">Sign In</a>, but it was rejected as non-existing. OK, it could expire or so, I was trying to <a href="https://accountservices.passport.net/reg.srf">Sign Up</a> also. But I wonder what could be  the reason to show &#8220;Windows Live ID is experiencing technical difficulties&#8221; for a week and be unable to sign up a new user?</p>
<p><a href="http://alax.info/blog/wp-content/uploads/2008/04/17-image006.png"><img class="alignnone size-medium wp-image-385" title="Sing Up for Windows Live ID " src="http://alax.info/blog/wp-content/uploads/2008/04/17-image006-300x168.png" alt="" width="300" height="168" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://alax.info/blog/384/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Fresh goodies from Microsoft</title>
		<link>http://alax.info/blog/379</link>
		<comments>http://alax.info/blog/379#comments</comments>
		<pubDate>Sun, 06 Apr 2008 16:39:23 +0000</pubDate>
		<dc:creator>Roman</dc:creator>
				<category><![CDATA[Seriously]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[microsoft]]></category>

		<guid isPermaLink="false">http://alax.info/blog/?p=379</guid>
		<description><![CDATA[
Windows XP Service Pack 3 Overview
Windows Server 2008 Enterprise (ISO, x86fre and amd64fre)
Windows Server 2008 Standard (ISO, x86fre and amd64fre)

Windows SDK for Windows Server 2008 and .NET Framework 3.5
Visual Studio Express Editions

Download the Visual Studio 2008 Express Edition All-in-One DVD
MSDN Library for Visual Studio 2008
MSDN Library for Visual Studio 2008 (ISO)


Visual Studio 2005 Professional Edition [...]]]></description>
			<content:encoded><![CDATA[<ul>
<li><a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=68C48DAD-BC34-40BE-8D85-6BB4F56F5110&amp;displaylang=en">Windows XP Service Pack 3 Overview</a></li>
<li><a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=13c7300e-935c-415a-a79c-538e933d5424&amp;DisplayLang=en">Windows Server 2008 Enterprise (ISO, x86fre and amd64fre)</a></li>
<li><a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=b6e99d4c-a40e-4fd2-a0f7-32212b520f50&amp;DisplayLang=en">Windows Server 2008 Standard (ISO, x86fre and amd64fre)<br />
</a></li>
<li><a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=F26B1AA4-741A-433A-9BE5-FA919850BDBF&amp;displaylang=en">Windows SDK for Windows Server 2008 and .NET Framework 3.5</a></li>
<li><a href="http://www.microsoft.com/express/download/">Visual Studio Express Editions</a>
<ul>
<li><a href="http://download.microsoft.com/download/8/B/5/8B5804AD-4990-40D0-A6AA-CE894CBBB3DC/VS2008ExpressENUX1397868.iso">Download the Visual Studio 2008 Express Edition All-in-One DVD</a></li>
<li><a href="http://www.microsoft.com/express/download/msdn/Default.aspx">MSDN Library for Visual Studio 2008</a></li>
<li><a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=6FF3BC60-32C8-4C22-8591-A20BF8DFF1A2&amp;displaylang=en">MSDN Library for Visual Studio 2008 (ISO)</a></li>
</ul>
</li>
<li><a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=b2c27a7f-d875-47d5-b226-e2578a116e12&amp;DisplayLang=en">Visual Studio 2005 Professional Edition 90-Day Trial (ISO, Registration Required)</a></li>
<li><a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=83c3a1ec-ed72-4a79-8961-25635db0192b&amp;DisplayLang=en">Visual Studio 2008 Professional Edition (90-day Trial) (ISO)</a></li>
<li><a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=b8704100-0127-4d88-9b5d-896b9b388313&amp;DisplayLang=en">MSDN Library (April 2007 Edition) &#8211; Includes Visual® Studio 2005 Service Pack 1 documentation</a></li>
<li><a href="http://msdn2.microsoft.com/en-us/directx/aa937788.aspx">DirectX Downloads</a>
<ul>
<li><a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=572BE8A6-263A-4424-A7FE-69CFF1A5B180&amp;displaylang=en">DirectX Software Development Kit (March 2008)</a></li>
</ul>
<p><a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=f50ef944-90c0-44e2-81bd-d7e149451fad&amp;DisplayLang=en">MSDN Community Distribution CD March 2008 (ISO, Registration Required)</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://alax.info/blog/379/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
