<?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/"
	xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Tech notes in the dust...</title>
	<atom:link href="http://airobo.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://airobo.wordpress.com</link>
	<description>The smallest bit of computer tech is well-known.</description>
	<lastBuildDate>Sun, 22 Mar 2009 08:40:45 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='airobo.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/3381c77a9dcbeb2295eb5f8b69616025?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Tech notes in the dust...</title>
		<link>http://airobo.wordpress.com</link>
	</image>
			<item>
		<title>C++ : The new and delete operators</title>
		<link>http://airobo.wordpress.com/2009/03/21/cxx-the-new-and-delete-operators/</link>
		<comments>http://airobo.wordpress.com/2009/03/21/cxx-the-new-and-delete-operators/#comments</comments>
		<pubDate>Sat, 21 Mar 2009 13:47:50 +0000</pubDate>
		<dc:creator>airobo</dc:creator>
				<category><![CDATA[C++]]></category>

		<guid isPermaLink="false">http://airobo.wordpress.com/?p=48</guid>
		<description><![CDATA[malloc/free of C has a counterpart in C++: new/delete, respectively.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=airobo.wordpress.com&blog=5855342&post=48&subd=airobo&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>If you have been accustomed to C, you may encounter the way heap memory is allocated:</p>
<p style="text-align:center;"><strong><span style="color:#000080;">char* c = (char*)malloc(sizeof(char) * x);</span></strong></p>
<p>In C++, due to the existence of classes and constructors/destructors, <strong><em>malloc</em></strong> and <strong><em>free</em></strong> alone won&#8217;t suffice; it won&#8217;t be able to call the constructor and destructor, respectively. So, the keyword <strong><em>new</em></strong> was made to allocate the memory and call the constructor. The previous item will now look like this:</p>
<p style="text-align:center;"><strong><span style="color:#000080;">char* c = new char[x];</span></strong></p>
<p>Notice that<strong> <span style="color:#003366;">sizeof(char)</span></strong> is gone. Why? Because <em>new</em> will, in order to return the correct pointer type, need to know the type of data you are allocating, and the operator determines the size of an element from the type. The general syntax of the new keyword is:</p>
<p style="text-align:center;"><strong><span style="color:#666699;">&lt;data type&gt;* x = new &lt;data type&gt;[y];</span></strong></p>
<p>where <em>x</em> is the pointer to store the address of the allocated memory, and<em> y</em> is the number of elements. When y = 1, the [y] part can be omitted:</p>
<p style="text-align:center;"><strong><span style="color:#666699;">&lt;data type&gt;* x = new &lt;data type&gt;;</span></strong></p>
<p>Notice <em>new</em>&#8217;s two forms: the former, with the square brackets, is called <em>vector new</em>; the one without the brackets is called <em>scalar new</em>.</p>
<p>On the other hand, <strong><em>delete</em> </strong>does the reverse: it calls the destructor before putting the memory back to the heap. The <em>delete</em> operator has two forms:</p>
<p style="text-align:center;"><strong><span style="color:#000080;">delete</span></strong> &#8211; for single-element allocations (scalar)</p>
<p style="text-align:center;"><strong><span style="color:#000080;">delete[]</span></strong> &#8211; for multi-element (array) allocations (vector)</p>
<p>To avoid being too technical, as I&#8217;ve done in some posts, the versions with the square brackets are for array (vector) allocations/deallocations, while the versions without the brackets are for one-element (scalar) allocations/deallocations.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/airobo.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/airobo.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/airobo.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/airobo.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/airobo.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/airobo.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/airobo.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/airobo.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/airobo.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/airobo.wordpress.com/48/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=airobo.wordpress.com&blog=5855342&post=48&subd=airobo&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://airobo.wordpress.com/2009/03/21/cxx-the-new-and-delete-operators/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/36a40b1f7a273d45a1df33273f132ce4?s=96&#38;d=identicon" medium="image">
			<media:title type="html">airobo</media:title>
		</media:content>
	</item>
		<item>
		<title>Microcontrollers: Which is the best?</title>
		<link>http://airobo.wordpress.com/2009/03/21/microcontrollers-which-is-the-best/</link>
		<comments>http://airobo.wordpress.com/2009/03/21/microcontrollers-which-is-the-best/#comments</comments>
		<pubDate>Sat, 21 Mar 2009 05:34:02 +0000</pubDate>
		<dc:creator>airobo</dc:creator>
				<category><![CDATA[Embedded systems]]></category>

		<guid isPermaLink="false">http://airobo.wordpress.com/?p=45</guid>
		<description><![CDATA[Picking a microcontroller in an embedded-system application requires careful review.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=airobo.wordpress.com&blog=5855342&post=45&subd=airobo&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>This question arises in many places: circuit design, physical dimensions, and cost, to name a few. For my case (or rather, opinion), here are the important criteria to check for:</p>
<ul>
<li>The volume of data going in and out</li>
<li>Size constraints</li>
<li>Environment of the embedded-system</li>
</ul>
<p>A processor handling massive amounts of data per unit time requires more power both computationally and electrically, a faster clock (which also needs more electrical power), and, perhaps, ventilation for applications reaching very high clock rates. Size constraints will always depend where the embedded-system is meant to be placed. A system containing many components in a confined area requires more careful designing and construction. Environmental factors are among the most important: humidity, temperature, and electrical spikes, to name a few. Generally, processors packing more processing power are less forgiving in terms of environmental extremes.</p>
<p>Generally, those processors whose only task is to control equipment through commands issued by a more powerful processor are more rugged in build, since although they have to handle quite large volumes of command/response data, they are spared of the more complex computations such as PIDs that are common in industrial automation, since controlling equipment is their only task. A small program may be added to handle the case that the I/O controller be separated (i.e., the communications link severed) from its controlling station or computer; but that is little.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/airobo.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/airobo.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/airobo.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/airobo.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/airobo.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/airobo.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/airobo.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/airobo.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/airobo.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/airobo.wordpress.com/45/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=airobo.wordpress.com&blog=5855342&post=45&subd=airobo&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://airobo.wordpress.com/2009/03/21/microcontrollers-which-is-the-best/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/36a40b1f7a273d45a1df33273f132ce4?s=96&#38;d=identicon" medium="image">
			<media:title type="html">airobo</media:title>
		</media:content>
	</item>
		<item>
		<title>Linux and Industrial Automation</title>
		<link>http://airobo.wordpress.com/2009/03/16/linux-and-industrial-automation/</link>
		<comments>http://airobo.wordpress.com/2009/03/16/linux-and-industrial-automation/#comments</comments>
		<pubDate>Mon, 16 Mar 2009 15:00:54 +0000</pubDate>
		<dc:creator>airobo</dc:creator>
				<category><![CDATA[Embedded systems]]></category>

		<guid isPermaLink="false">http://airobo.wordpress.com/?p=40</guid>
		<description><![CDATA[Linux can be used in virtually any aspect, even in control.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=airobo.wordpress.com&blog=5855342&post=40&subd=airobo&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>The well-known Linux operating system is used from desktop computers to high-grade corporate servers, mainly due to reliability, which in turn stems from the large community support base of Linux, since it&#8217;s open-source. Personally, I prefer Linux over Windows, although many of my software tools require Windows XP to run.</p>
<p>Linux has also been used in embedded-systems devices because of its stability. For me, I would think of having a normal desktop computer controlling the machinery, through a man-machine interface (MMI.) That is because remote control is always surpassed by local control of a human operator near the machinery &#8211; a basic automation rule. And desktops can pack more power and flexibility in terms of processing power than embedded-systems can.</p>
<p>It&#8217;s easy to make an interface circuit between the computer and the machinery controls using off-the-shelf components. You can program the microcontroller with just the necessary code for interfacing to the desktop, using the all-classical COM or LPT ports. I like the LPT port, since you can manipulate the 8 bits individually, and they all appear at the hardware port at the same time.</p>
<p>As for the desktop software part, technologies such as remote-procedure calls (RPC), streaming compression and encryption, and even Web servers can be used in tandem. Linux handles networking extremely well, and provides RPC for seamless calling of remote procedures and functions.</p>
<p>Local-operator controls can be designed with cross-platform kits like <a href="http://www.qtsoftware.com" target="_blank">Qt</a>, or with the native looks of Linux. The graphical UI is left at the discretion of the end-user.</p>
<p>Linux has a lot of uses, indeed. More may be waiting.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/airobo.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/airobo.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/airobo.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/airobo.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/airobo.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/airobo.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/airobo.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/airobo.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/airobo.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/airobo.wordpress.com/40/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=airobo.wordpress.com&blog=5855342&post=40&subd=airobo&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://airobo.wordpress.com/2009/03/16/linux-and-industrial-automation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/36a40b1f7a273d45a1df33273f132ce4?s=96&#38;d=identicon" medium="image">
			<media:title type="html">airobo</media:title>
		</media:content>
	</item>
		<item>
		<title>.NET Framework runtimes and legacy computers</title>
		<link>http://airobo.wordpress.com/2009/03/08/net-framework-runtimes-and-legacy-computers/</link>
		<comments>http://airobo.wordpress.com/2009/03/08/net-framework-runtimes-and-legacy-computers/#comments</comments>
		<pubDate>Sun, 08 Mar 2009 05:02:42 +0000</pubDate>
		<dc:creator>airobo</dc:creator>
				<category><![CDATA[.NET]]></category>

		<guid isPermaLink="false">http://airobo.wordpress.com/?p=35</guid>
		<description><![CDATA[The .NET Framework may be nice, but it has big drawbacks.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=airobo.wordpress.com&blog=5855342&post=35&subd=airobo&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>We may have heard of the .NET runtime in one form or another. Some applications require it in order to run, and many user-interface components out there rely on that framework. But I&#8217;ve found out, to my disappointment, that Windows 2000 (or XP) and earlier do not have it pre-installed.</p>
<p>The .NET framework is a significant installation on any machine (a check in the Control Panel applet will easily show how bloated it is, ~100 MB for v2.0), and though speed and performance isn&#8217;t much of an issue on newer computers, I tried installing it on an older computer I have at home, and my computer&#8217;s slowing to a crawl. Besides, I think v2.0 of the network requires Windows 98 or later &#8211; it&#8217;s fine, since it&#8217;s built with MSVC 2005 and that compiler has a minimum OS requirement of Windows 98, to say the least. The real thing I don&#8217;t like is v3.5 . It&#8217;s built with MSVC 2008, and, as I&#8217;ve said in an earlier post, requires Windows 2000 or later.</p>
<p>One important item to point: in industrial automation, the time used for executing MSIL code often isn&#8217;t tolerable.</p>
<p>I guess the v3.5 runtime is bloated more than twofold over v2.0. The latter&#8217;s already fine for me, so why install a newer one?</p>
<p>There aren&#8217;t any issues with the .NET framework under Vista, since they&#8217;re pre-installed. To say, though, I, like many other users, don&#8217;t like Vista &#8211; it&#8217;s bloated on two sides: disk usage and memory usage, and the more important issue is compatibility.</p>
<p>Even with the v2.0 framework installed on my machine, I still stick with developing native C++ code, with a VC2005 compiler (since I recently began hating VC2008), and I can use Adobe Flash for my UI needs.</p>
<p>And I&#8217;m making all of my DLLs in my libraries in native x86/x64 code.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/airobo.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/airobo.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/airobo.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/airobo.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/airobo.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/airobo.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/airobo.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/airobo.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/airobo.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/airobo.wordpress.com/35/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=airobo.wordpress.com&blog=5855342&post=35&subd=airobo&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://airobo.wordpress.com/2009/03/08/net-framework-runtimes-and-legacy-computers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/36a40b1f7a273d45a1df33273f132ce4?s=96&#38;d=identicon" medium="image">
			<media:title type="html">airobo</media:title>
		</media:content>
	</item>
		<item>
		<title>A brainteaser: brainf*ck</title>
		<link>http://airobo.wordpress.com/2009/02/13/brainf-ck/</link>
		<comments>http://airobo.wordpress.com/2009/02/13/brainf-ck/#comments</comments>
		<pubDate>Fri, 13 Feb 2009 15:46:42 +0000</pubDate>
		<dc:creator>airobo</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://airobo.wordpress.com/?p=26</guid>
		<description><![CDATA[Brainf*ck wasn't intended for practical use, but novel programs arise...<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=airobo.wordpress.com&blog=5855342&post=26&subd=airobo&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I came across a programming problem one day; it was a problem used in ACM 2005. The problem: making a brainf*ck interpreter. It&#8217;s really going to f*** up your brain if you program in it manually, hence the name.</p>
<p>I found a fun use of it: encoding of text files. It&#8217;s easily capable of bloating a text file&#8217;s size, while making the result jumbled. It uses only one cell out of the standard&#8217;s 32768.</p>
<p><a href="http://airobo.files.wordpress.com/2009/02/wordpress_2-13-20091.doc" target="_blank">I attach an MS-Word file that has both encoder and decoder programs in one file. Instructions are there as well. Click on this sentence to download the file.</a></p>
<p>Here are a few programs written in Brainf*ck:</p>
<p>-&gt;++++++++&lt;[.&gt;.&lt;-]            % Prints all ASCII characters in reverse, while emitting a beep for each character</p>
<p>++++++++++&gt;++++++++++++++++++++++++++++++++++++++++++++++++&lt;[&gt;.+&lt;-]     % Prints the numbers 0-9</p>
<p>++++++++++++++&gt;+++++++&lt;[&gt;.&lt;-]        % Beeps 14 times.</p>
<p>Enjoy! <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/airobo.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/airobo.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/airobo.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/airobo.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/airobo.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/airobo.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/airobo.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/airobo.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/airobo.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/airobo.wordpress.com/26/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=airobo.wordpress.com&blog=5855342&post=26&subd=airobo&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://airobo.wordpress.com/2009/02/13/brainf-ck/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/36a40b1f7a273d45a1df33273f132ce4?s=96&#38;d=identicon" medium="image">
			<media:title type="html">airobo</media:title>
		</media:content>
	</item>
		<item>
		<title>Visual C++ 2005/2008 and Manifests&#8230;</title>
		<link>http://airobo.wordpress.com/2009/01/18/vc-2005-2008-and-manifests/</link>
		<comments>http://airobo.wordpress.com/2009/01/18/vc-2005-2008-and-manifests/#comments</comments>
		<pubDate>Sun, 18 Jan 2009 11:48:10 +0000</pubDate>
		<dc:creator>airobo</dc:creator>
				<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://airobo.wordpress.com/?p=19</guid>
		<description><![CDATA[Manifests solve the "DLL hell" problem, but they might actually create more problems than solutions.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=airobo.wordpress.com&blog=5855342&post=19&subd=airobo&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>It is interesting to see how Microsoft put a lot of effort in isolating DLLs to solve the long-hated problem of &#8220;DLL hell&#8221; (wherein a program depends on an <em>exact</em> version of a DLL, no newer, no older.) This, however, also brings a problem: security updates may not be propogated to older DLLs.</p>
<p>Take the Visual C Runtime DLL, msvcr80.dll , as an example. Its internal structures haven&#8217;t changed with every build. The problem here is that side-by-side lookups in XP and Vista check the versions to the build number, and ignore the DLL if its version numbers are different, even a build number. So there is a possibility that security updates with newer builds (e.g., 8.0.50767.163 from 8.0.50767.42) will not be propagated to the older versions.</p>
<p>Worse, if the application has no manifest (e.g., legacy apps) or the version numbers indicated in the manifest and the DLL&#8217;s numbers do not match, the result will  be an initialization failure at start-up (because the CRT DLL will fail the initialization routines upon detecting either of the two conditions mentioned.)</p>
<p>Like I&#8217;ve mentioned in a previous entry, having two different CRTs in the same application will most likely catch the end-user by surprise, through such messages as fatal CRT memory corruption. I&#8217;m still developing the &#8220;proxy&#8221; CRT (this one is NOT the actual CRT; the actual CRT is Windows&#8217; system CRT, msvcrt.dll .) Note that I do not use manifests in the &#8220;proxy&#8221; CRT DLL; let all applications, older or newer, get the security update.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/airobo.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/airobo.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/airobo.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/airobo.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/airobo.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/airobo.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/airobo.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/airobo.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/airobo.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/airobo.wordpress.com/19/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=airobo.wordpress.com&blog=5855342&post=19&subd=airobo&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://airobo.wordpress.com/2009/01/18/vc-2005-2008-and-manifests/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/36a40b1f7a273d45a1df33273f132ce4?s=96&#38;d=identicon" medium="image">
			<media:title type="html">airobo</media:title>
		</media:content>
	</item>
		<item>
		<title>Visual Studio 2008 and Application Compatibility</title>
		<link>http://airobo.wordpress.com/2009/01/04/vs2008-and-appcompat/</link>
		<comments>http://airobo.wordpress.com/2009/01/04/vs2008-and-appcompat/#comments</comments>
		<pubDate>Sun, 04 Jan 2009 14:07:18 +0000</pubDate>
		<dc:creator>airobo</dc:creator>
				<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://airobo.wordpress.com/?p=11</guid>
		<description><![CDATA[Now that Visual C++ 2008 stopped supporting the entire Win9x series, there are important implications in legacy systems using these outdated Windows versions.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=airobo.wordpress.com&blog=5855342&post=11&subd=airobo&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I&#8217;ve noticed that Microsoft has stopped supporting the entire Win9x series (those that run on top of DOS &#8211; Win95, Win98, WinME) in VS 2008. Also, a few global variables have been removed (such as _winver). In my opinion, these allowed the programmer to get OS version numbers right using the CRT. That&#8217;s easy, at least for me.</p>
<p>If I&#8217;m not mistaken, VS 2003 was the last to support Win95; and VS 2005 (which I am using) was the last to support Win98/WinME. With VS 2008, you are forced to target Win2000 or later (WinNT 4.0 is not supported). But maybe the developers of Visual Studio should be aware that these &#8220;legacy&#8221; Windows OSes are not yet shelved up for indefinite storage (maybe Win95 on the shelf will not be a big suprise, but Win98 systems still exist up to this day, in PCs used for automation, for instance.)</p>
<p>Windows 98 was used in automation computers, since this ran on top of DOS, and DOS allows a program to directly access the hardware via simple memory location reads/writes. This functionality is important with certain applications of automation wherein direct hardware control is a must; an example maybe a part of a power plant.</p>
<p>Windows NT/2000/XP have the additional advantage of security; although this helps prevent hackers from breaking into the PC and turn it into a &#8220;zombie,&#8221; these security checks may unnecessarily slow down the program, and <em>may sometimes become detrimental</em> .</p>
<p>Note that I think Windows 95 is not used on a single computer (Even most Win9x-only devices don&#8217;t support Windows 95.)</p>
<p>Well, we are at the mercy of Microsoft, since they can do whatever they want &#8211; even breaking compatibility with existing applications (this is what they did in Windows Vista, using User Account Control.) But Microsoft shouldn&#8217;t do that breaking &#8211; eventually, customers will not buy a new version of their Windows operating system if they know their current applications won&#8217;t work on that new version of the OS; it&#8217;s very likely Microsoft&#8217;s efforts on improvement (such as security) will go to waste, since customers aren&#8217;t going to use the new version.</p>
<p>You may think of me as a hypocrite (since I&#8217;m now using Visual Studio 2008), but I&#8217;m trying to generate a Visual C++ 2008 CRT DLL proxy to the system CRT using Visual C++ 2005 (because this version, at least, supports Windows 98/ME in any case. I still have that copy installed on my PC, although only the Express Edition.)</p>
<p>I like compiler upgrades for their security, but I don&#8217;t like them if they are going to break support for Windows versions that are still in use (Windows 98, 2000, XP, Vista), and a workaround is virtually impossible.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/airobo.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/airobo.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/airobo.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/airobo.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/airobo.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/airobo.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/airobo.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/airobo.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/airobo.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/airobo.wordpress.com/11/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=airobo.wordpress.com&blog=5855342&post=11&subd=airobo&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://airobo.wordpress.com/2009/01/04/vs2008-and-appcompat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/36a40b1f7a273d45a1df33273f132ce4?s=96&#38;d=identicon" medium="image">
			<media:title type="html">airobo</media:title>
		</media:content>
	</item>
		<item>
		<title>On the Visual C++ .NET DLLs&#8230;</title>
		<link>http://airobo.wordpress.com/2009/01/02/on-the-visual-c-net-dlls/</link>
		<comments>http://airobo.wordpress.com/2009/01/02/on-the-visual-c-net-dlls/#comments</comments>
		<pubDate>Fri, 02 Jan 2009 14:58:43 +0000</pubDate>
		<dc:creator>airobo</dc:creator>
				<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://airobo.wordpress.com/?p=6</guid>
		<description><![CDATA[Visual C++ 2002 introduced new CRT DLL filenames, but many applications still rely on the trusty Windows CRT DLL, msvcrt.dll , and CRT code hasn't changed very much.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=airobo.wordpress.com&blog=5855342&post=6&subd=airobo&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>One would notice that many applications compiled with Visual C++ 2002 or later would have the Visual C runtime DLLs in their private folders. As mentioned in <a href="http://kobyk.wordpress.com" target="_blank">KK</a>&#8217;s blog, this approach doesn&#8217;t allow for central servicing.</p>
<p>Examine the code of one differential CRT DLL (say, msvcr90.dll), and that of the Windows CRT DLL (msvcrt.dll) &#8211; many of the functions haven&#8217;t changed through the years. This results in duplicated code in two different binary images, which wastes space. Exception handling can change, yes, but many of them still reference C Library functions (which hasn&#8217;t changed).</p>
<p>In that light, I decided to write a &#8220;proxy&#8221; DLL to make them use the Windows OS CRT.</p>
<p>There is one more common issue when using &#8220;legacy&#8221; DLLs (those compiled with VC6) with images produced by the VC7+ compilers: Heap corruption. Each CRT instance has its own heap, and even passing pointers between two different instances of the same identical CRT DLL is very likely going to result in a runtime failure. Examine again a differential CRT DLL with the Windows CRT DLL, and you will find that memory allocation functions (such as operator new[] and operator delete[]) are duplicated. To eliminate this problem, I also decided to use the Windows CRT&#8217;s memory heap instead and provide code-wraps and forwards required by the new VC7+ code.</p>
<p>By the way, I would greatly appreciate contributions in finding the functions that have been added after VC6. <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/airobo.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/airobo.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/airobo.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/airobo.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/airobo.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/airobo.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/airobo.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/airobo.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/airobo.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/airobo.wordpress.com/6/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=airobo.wordpress.com&blog=5855342&post=6&subd=airobo&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://airobo.wordpress.com/2009/01/02/on-the-visual-c-net-dlls/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/36a40b1f7a273d45a1df33273f132ce4?s=96&#38;d=identicon" medium="image">
			<media:title type="html">airobo</media:title>
		</media:content>
	</item>
		<item>
		<title>Visual C++ 2005 and MSVCRT.DLL</title>
		<link>http://airobo.wordpress.com/2008/12/15/visual-c-2005-and-msvcrtdll/</link>
		<comments>http://airobo.wordpress.com/2008/12/15/visual-c-2005-and-msvcrtdll/#comments</comments>
		<pubDate>Mon, 15 Dec 2008 12:40:29 +0000</pubDate>
		<dc:creator>airobo</dc:creator>
				<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://airobo.wordpress.com/?p=3</guid>
		<description><![CDATA[Thanks to KK for his help.  
I just notice a few things while linking to msvcrt.lib in the 2008 WDK:
~ If you were statically linking to the C++ library (libcpmt.lib), there is this error of this unresolved external symbol:
__calloc_crt referenced in __Getctype
so I browsed through libcmt.lib. Alas, my problems got worse, so I was [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=airobo.wordpress.com&blog=5855342&post=3&subd=airobo&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><em>Thanks to <a href="http://kobyk.wordpress.com" target="_blank">KK</a> for his help. <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </em></p>
<p>I just notice a few things while linking to msvcrt.lib in the 2008 WDK:</p>
<p>~ If you were statically linking to the C++ library (libcpmt.lib), there is this error of this unresolved external symbol:</p>
<p>__calloc_crt referenced in __Getctype</p>
<p>so I browsed through libcmt.lib. Alas, my problems got worse, so I was forced to write my own copy of this function.</p>
<p>My code appears here, in blue:</p>
<p><span style="color:#0000ff;">#include &lt;stdlib.h&gt;</span></p>
<p><span style="color:#0000ff;">#include &lt;malloc.h&gt;</span></p>
<p><span style="color:#0000ff;">extern &#8220;C&#8221; void* __cdecl _calloc_crt(size_t a, size_t b)</span></p>
<p><span style="color:#0000ff;">{</span></p>
<p style="padding-left:30px;"><span style="color:#0000ff;">return calloc(a, b);</span></p>
<p><span style="color:#0000ff;">}</span></p>
<p>I notice this code works perfectly I use it, but as always, no piece of code is correct for everyone.</p>
<p>~ Also, you may get an unresolved function at runtime:</p>
<p><span style="color:#ff0000;"><strong>_except_handler4_common </strong>could not be located in Msvcrt.dll .</span></p>
<p>It is because, as was mentioned in KK&#8217;s blog, this (plus a bunch more) is only available in the Vista version of the CRT DLL. So, I pilled some .obj files from libcmt.lib and compiled them into one library; they work as expected. I will post the library online some time.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/airobo.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/airobo.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/airobo.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/airobo.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/airobo.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/airobo.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/airobo.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/airobo.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/airobo.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/airobo.wordpress.com/3/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=airobo.wordpress.com&blog=5855342&post=3&subd=airobo&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://airobo.wordpress.com/2008/12/15/visual-c-2005-and-msvcrtdll/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/36a40b1f7a273d45a1df33273f132ce4?s=96&#38;d=identicon" medium="image">
			<media:title type="html">airobo</media:title>
		</media:content>
	</item>
	</channel>
</rss>