<?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:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>The Road to Delphi - a Blog about programming</title>
	<atom:link href="http://theroadtodelphi.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://theroadtodelphi.wordpress.com</link>
	<description>Delphi - Lazarus - Delphi Prism</description>
	<lastBuildDate>Sun, 19 May 2013 08:22:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='theroadtodelphi.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://1.gravatar.com/blavatar/f9bd64a7290b1be6581ec56573b23959?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>The Road to Delphi - a Blog about programming</title>
		<link>http://theroadtodelphi.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://theroadtodelphi.wordpress.com/osd.xml" title="The Road to Delphi - a Blog about programming" />
	<atom:link rel='hub' href='http://theroadtodelphi.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Added support for RAD Studio XE4 in the Delphi IDE Theme Editor.</title>
		<link>http://theroadtodelphi.wordpress.com/2013/04/25/added-support-for-rad-studio-xe4-in-the-delphi-ide-theme-editor/</link>
		<comments>http://theroadtodelphi.wordpress.com/2013/04/25/added-support-for-rad-studio-xe4-in-the-delphi-ide-theme-editor/#comments</comments>
		<pubDate>Thu, 25 Apr 2013 06:42:28 +0000</pubDate>
		<dc:creator>Rodrigo</dc:creator>
				<category><![CDATA[Delphi]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://theroadtodelphi.wordpress.com/?p=3397</guid>
		<description><![CDATA[This entry is just for announce which the Delphi IDE Theme Editor now supports RAD Studio XE4. Installer of the Delphi IDE Theme Editor<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=theroadtodelphi.wordpress.com&#038;blog=9574973&#038;post=3397&#038;subd=theroadtodelphi&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>This entry is just for announce which the <em><a href="http://code.google.com/p/delphi-ide-theme-editor/">Delphi IDE Theme Editor</a></em> now supports RAD Studio XE4.</p>
<p><a href="http://theroadtodelphi.files.wordpress.com/2013/04/ditexe4.png"><img class="aligncenter size-full wp-image-3398" alt="DITEXE4" src="http://theroadtodelphi.files.wordpress.com/2013/04/ditexe4.png?w=611&#038;h=411" width="611" height="411" /></a></p>
<p><a href="http://dl.dropbox.com/u/12733424/Blog/Delphi%20IDE%20Theme%20Editor/Setup_DelphiIDEThemeEditor.exe" rel="nofollow">Installer of the Delphi IDE Theme Editor</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/theroadtodelphi.wordpress.com/3397/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/theroadtodelphi.wordpress.com/3397/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=theroadtodelphi.wordpress.com&#038;blog=9574973&#038;post=3397&#038;subd=theroadtodelphi&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://theroadtodelphi.wordpress.com/2013/04/25/added-support-for-rad-studio-xe4-in-the-delphi-ide-theme-editor/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		<georss:point>-33.636934 -70.679350</georss:point>
		<geo:lat>-33.636934</geo:lat>
		<geo:long>-70.679350</geo:long>
		<media:content url="http://0.gravatar.com/avatar/6d57f4fcc68e1154d6a1ee145cbe5c97?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">theroadtodelphi</media:title>
		</media:content>

		<media:content url="http://theroadtodelphi.files.wordpress.com/2013/04/ditexe4.png" medium="image">
			<media:title type="html">DITEXE4</media:title>
		</media:content>
	</item>
		<item>
		<title>Added support to TSMBIOS for SMBIOS 2.8 spec.</title>
		<link>http://theroadtodelphi.wordpress.com/2013/04/12/added-support-to-tsmbios-for-smbios-2-8-spec/</link>
		<comments>http://theroadtodelphi.wordpress.com/2013/04/12/added-support-to-tsmbios-for-smbios-2-8-spec/#comments</comments>
		<pubDate>Fri, 12 Apr 2013 16:41:52 +0000</pubDate>
		<dc:creator>Rodrigo</dc:creator>
				<category><![CDATA[Delphi]]></category>
		<category><![CDATA[FreePascal]]></category>
		<category><![CDATA[SMBios]]></category>
		<category><![CDATA[FPC]]></category>
		<category><![CDATA[SMBIOS]]></category>

		<guid isPermaLink="false">http://theroadtodelphi.wordpress.com/?p=3392</guid>
		<description><![CDATA[A few weeks ago (3 Apr 2013) a new update to the System Management BIOS (SMBIOS) Reference Specification was introduced by the DMTF. So the TSMBIOS project was updated to support the SMBIOS 2.8. The following changes was added to &#8230; <a href="http://theroadtodelphi.wordpress.com/2013/04/12/added-support-to-tsmbios-for-smbios-2-8-spec/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=theroadtodelphi.wordpress.com&#038;blog=9574973&#038;post=3392&#038;subd=theroadtodelphi&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>A few weeks ago (3 Apr 2013) a new update to the System Management BIOS (SMBIOS) Reference Specification was introduced by the <a href="http://dmtf.org/standards/smbios">DMTF.</a> So the <a href="http://code.google.com/p/tsmbios/">TSMBIOS</a> project was updated to support the SMBIOS 2.8. </p>
<p>The following changes was added to the 2.8 version:</p>
<ul>
<li>Processor Information (Type 4):</li>
</ul>
<blockquote>
<ol>
<li>SMBIOSCR00106: processor family name correction (48h)</li>
<li>SMBIOSCR00107: new processor family types</li>
<li>SMBIOSCR00108: new processor family type</li>
<li>SMBIOSCR00110: correct typo in table 24 (processor upgrade)</li>
<li>SMBIOSCR00118: new processor family types</li>
<li>SMBIOSCR00121: new processor family type</li>
<li>SMBIOSCR00122: new processor upgrade type</li>
<li>SMBIOSCR00125: add new Intel socket type</li>
</ol>
</blockquote>
<ul>
<li>Memory Device (Type 17):</li>
</ul>
<blockquote>
<ol>
<li>SMBIOSCR00109: add minimum, maximum and configured voltages</li>
<li>SMBIOSCR00114: add LRDIMM to memory device list</li>
</ol>
</blockquote>
<ul>
<li>Other:</li>
</ul>
<blockquote>
<ol>
<li>SMBIOSCR00116: correct/clarify structure length fields</li>
<li>SMBIOSCR00120: add new supported processor architectures</li>
<li>SMBIOSCR00123: update referenced specifications</li>
<li>Wording updates for clarity and consistency</li>
</ol>
</blockquote>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/theroadtodelphi.wordpress.com/3392/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/theroadtodelphi.wordpress.com/3392/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=theroadtodelphi.wordpress.com&#038;blog=9574973&#038;post=3392&#038;subd=theroadtodelphi&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://theroadtodelphi.wordpress.com/2013/04/12/added-support-to-tsmbios-for-smbios-2-8-spec/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<georss:point>-33.636934 -70.679350</georss:point>
		<geo:lat>-33.636934</geo:lat>
		<geo:long>-70.679350</geo:long>
		<media:content url="http://0.gravatar.com/avatar/6d57f4fcc68e1154d6a1ee145cbe5c97?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">theroadtodelphi</media:title>
		</media:content>
	</item>
		<item>
		<title>Getting Processor Info using Object Pascal (Delphi / FPC) and the TSMBIOS</title>
		<link>http://theroadtodelphi.wordpress.com/2013/03/27/getting-processor-info-using-object-pascal-delphi-fpc-and-the-tsmbios/</link>
		<comments>http://theroadtodelphi.wordpress.com/2013/03/27/getting-processor-info-using-object-pascal-delphi-fpc-and-the-tsmbios/#comments</comments>
		<pubDate>Wed, 27 Mar 2013 15:45:43 +0000</pubDate>
		<dc:creator>Rodrigo</dc:creator>
				<category><![CDATA[Delphi]]></category>
		<category><![CDATA[FreePascal]]></category>
		<category><![CDATA[SMBios]]></category>
		<category><![CDATA[FPC]]></category>
		<category><![CDATA[SMBIOS]]></category>

		<guid isPermaLink="false">http://theroadtodelphi.wordpress.com/?p=3244</guid>
		<description><![CDATA[The SMBIOS expose the info about the installed processors in the table type 4. Check the next snippet that shows how obtain such data using the TSMBIOS (remember, if you are using FPC, you can use this library in Windows &#8230; <a href="http://theroadtodelphi.wordpress.com/2013/03/27/getting-processor-info-using-object-pascal-delphi-fpc-and-the-tsmbios/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=theroadtodelphi.wordpress.com&#038;blog=9574973&#038;post=3244&#038;subd=theroadtodelphi&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><a href="http://theroadtodelphi.files.wordpress.com/2013/03/new_core_i7.png"><img src="http://theroadtodelphi.files.wordpress.com/2013/03/new_core_i7.png?w=100&#038;h=86" alt="New_Core_I7" width="100" height="86" class="alignleft size-thumbnail wp-image-3246" /></a> The <a href="http://www.dmtf.org/standards/smbios">SMBIOS</a> expose the info about the installed processors in the table <a href="http://www.dmtf.org/sites/default/files/standards/documents/DSP0134_2.7.1.pdf">type 4</a>. Check the next snippet that shows how obtain such data using the <a href="http://code.google.com/p/tsmbios/">TSMBIOS </a>(remember, if you are using FPC, you can use this library in Windows and Linux). </p>
<pre class="brush: delphi; title: ; wrap-lines: false; notranslate">
{$IFDEF FPC}{$mode objfpc}{$H+}
{$ELSE}
{$APPTYPE CONSOLE}
{$ENDIF}

uses
  Classes,
  TypInfo,
  SysUtils,
  uSMBIOS;

function SetToString(Info: PTypeInfo; const Value): String;
var
  LTypeInfo  : PTypeInfo;
  LIntegerSet: TIntegerSet;
  I: Integer;

begin
  Result := '';

    Integer(LIntegerSet) := 0;
    case GetTypeData(Info)^.OrdType of
      otSByte, otUByte: Integer(LIntegerSet)  := Byte(Value);
      otSWord, otUWord: Integer(LIntegerSet)  := Word(Value);
      otSLong, otULong: Integer(LIntegerSet)  := Integer(Value);
    end;

  LTypeInfo  := GetTypeData(Info)^.CompType{$IFNDEF FPC}^{$ENDIF};
  for I := 0 to SizeOf(Integer) * 8 - 1 do
    if I in LIntegerSet then
    begin
      if Result &lt;&gt; '' then Result := Result + ',';
      Result := Result + GetEnumName(LTypeInfo, I);
    end;
end;


procedure GetProcessorInfo;
Var
  SMBios             : TSMBios;
  LProcessorInfo     : TProcessorInformation;
  LSRAMTypes         : TCacheSRAMTypes;
begin
  SMBios:=TSMBios.Create;
  try
      WriteLn('Processor Information');
      if SMBios.HasProcessorInfo then
      for LProcessorInfo in SMBios.ProcessorInfo do
      begin
        WriteLn('Manufacturer       '+LProcessorInfo.ProcessorManufacturerStr);
        WriteLn('Socket Designation '+LProcessorInfo.SocketDesignationStr);
        WriteLn('Type               '+LProcessorInfo.ProcessorTypeStr);
        WriteLn('Familiy            '+LProcessorInfo.ProcessorFamilyStr);
        WriteLn('Version            '+LProcessorInfo.ProcessorVersionStr);
        WriteLn(Format('Processor ID       %x',[LProcessorInfo.RAWProcessorInformation^.ProcessorID]));
        WriteLn(Format('Voltaje            %n',[LProcessorInfo.GetProcessorVoltaje]));
        WriteLn(Format('External Clock     %d  Mhz',[LProcessorInfo.RAWProcessorInformation^.ExternalClock]));
        WriteLn(Format('Maximum processor speed %d  Mhz',[LProcessorInfo.RAWProcessorInformation^.MaxSpeed]));
        WriteLn(Format('Current processor speed %d  Mhz',[LProcessorInfo.RAWProcessorInformation^.CurrentSpeed]));
        WriteLn('Processor Upgrade   '+LProcessorInfo.ProcessorUpgradeStr);
        WriteLn(Format('External Clock     %d  Mhz',[LProcessorInfo.RAWProcessorInformation^.ExternalClock]));

        if SMBios.SmbiosVersion&gt;='2.3' then
        begin
          WriteLn('Serial Number      '+LProcessorInfo.SerialNumberStr);
          WriteLn('Asset Tag          '+LProcessorInfo.AssetTagStr);
          WriteLn('Part Number        '+LProcessorInfo.PartNumberStr);
          if SMBios.SmbiosVersion&gt;='2.5' then
          begin
            WriteLn(Format('Core Count         %d',[LProcessorInfo.RAWProcessorInformation^.CoreCount]));
            WriteLn(Format('Cores Enabled      %d',[LProcessorInfo.RAWProcessorInformation^.CoreEnabled]));
            WriteLn(Format('Threads Count      %d',[LProcessorInfo.RAWProcessorInformation^.ThreadCount]));
            WriteLn(Format('Processor Characteristics %.4x',[LProcessorInfo.RAWProcessorInformation^.ProcessorCharacteristics]));
          end;
        end;
        Writeln;

        if (LProcessorInfo.RAWProcessorInformation^.L1CacheHandle&gt;0) and (LProcessorInfo.L2Chache&lt;&gt;nil)  then
        begin
          WriteLn('L1 Cache Handle Info');
          WriteLn('--------------------');
          WriteLn('  Socket Designation    '+LProcessorInfo.L1Chache.SocketDesignationStr);
          WriteLn(Format('  Cache Configuration   %.4x',[LProcessorInfo.L1Chache.RAWCacheInformation^.CacheConfiguration]));
          WriteLn(Format('  Maximum Cache Size    %d Kb',[LProcessorInfo.L1Chache.GetMaximumCacheSize]));
          WriteLn(Format('  Installed Cache Size  %d Kb',[LProcessorInfo.L1Chache.GetInstalledCacheSize]));
          LSRAMTypes:=LProcessorInfo.L1Chache.GetSupportedSRAMType;
          WriteLn(Format('  Supported SRAM Type   [%s]',[SetToString(TypeInfo(TCacheSRAMTypes), LSRAMTypes)]));
          LSRAMTypes:=LProcessorInfo.L1Chache.GetCurrentSRAMType;
          WriteLn(Format('  Current SRAM Type     [%s]',[SetToString(TypeInfo(TCacheSRAMTypes), LSRAMTypes)]));

          WriteLn(Format('  Error Correction Type %s',[ErrorCorrectionTypeStr[LProcessorInfo.L1Chache.GetErrorCorrectionType]]));
          WriteLn(Format('  System Cache Type     %s',[SystemCacheTypeStr[LProcessorInfo.L1Chache.GetSystemCacheType]]));
          WriteLn(Format('  Associativity         %s',[LProcessorInfo.L1Chache.AssociativityStr]));
        end;

        if (LProcessorInfo.RAWProcessorInformation^.L2CacheHandle&gt;0)  and (LProcessorInfo.L2Chache&lt;&gt;nil)  then
        begin
          WriteLn('L2 Cache Handle Info');
          WriteLn('--------------------');
          WriteLn('  Socket Designation    '+LProcessorInfo.L2Chache.SocketDesignationStr);
          WriteLn(Format('  Cache Configuration   %.4x',[LProcessorInfo.L2Chache.RAWCacheInformation^.CacheConfiguration]));
          WriteLn(Format('  Maximum Cache Size    %d Kb',[LProcessorInfo.L2Chache.GetMaximumCacheSize]));
          WriteLn(Format('  Installed Cache Size  %d Kb',[LProcessorInfo.L2Chache.GetInstalledCacheSize]));
          LSRAMTypes:=LProcessorInfo.L2Chache.GetSupportedSRAMType;
          WriteLn(Format('  Supported SRAM Type   [%s]',[SetToString(TypeInfo(TCacheSRAMTypes), LSRAMTypes)]));
          LSRAMTypes:=LProcessorInfo.L2Chache.GetCurrentSRAMType;
          WriteLn(Format('  Current SRAM Type     [%s]',[SetToString(TypeInfo(TCacheSRAMTypes), LSRAMTypes)]));

          WriteLn(Format('  Error Correction Type %s',[ErrorCorrectionTypeStr[LProcessorInfo.L2Chache.GetErrorCorrectionType]]));
          WriteLn(Format('  System Cache Type     %s',[SystemCacheTypeStr[LProcessorInfo.L2Chache.GetSystemCacheType]]));
          WriteLn(Format('  Associativity         %s',[LProcessorInfo.L2Chache.AssociativityStr]));
        end;

        if (LProcessorInfo.RAWProcessorInformation^.L3CacheHandle&gt;0) and (LProcessorInfo.L3Chache&lt;&gt;nil) then
        begin
          WriteLn('L3 Cache Handle Info');
          WriteLn('--------------------');
          WriteLn('  Socket Designation    '+LProcessorInfo.L3Chache.SocketDesignationStr);
          WriteLn(Format('  Cache Configuration   %.4x',[LProcessorInfo.L3Chache.RAWCacheInformation^.CacheConfiguration]));
          WriteLn(Format('  Maximum Cache Size    %d Kb',[LProcessorInfo.L3Chache.GetMaximumCacheSize]));
          WriteLn(Format('  Installed Cache Size  %d Kb',[LProcessorInfo.L3Chache.GetInstalledCacheSize]));
          LSRAMTypes:=LProcessorInfo.L3Chache.GetSupportedSRAMType;
          WriteLn(Format('  Supported SRAM Type   [%s]',[SetToString(TypeInfo(TCacheSRAMTypes), LSRAMTypes)]));
          LSRAMTypes:=LProcessorInfo.L3Chache.GetCurrentSRAMType;
          WriteLn(Format('  Current SRAM Type     [%s]',[SetToString(TypeInfo(TCacheSRAMTypes), LSRAMTypes)]));

          WriteLn(Format('  Error Correction Type %s',[ErrorCorrectionTypeStr[LProcessorInfo.L3Chache.GetErrorCorrectionType]]));
          WriteLn(Format('  System Cache Type     %s',[SystemCacheTypeStr[LProcessorInfo.L3Chache.GetSystemCacheType]]));
          WriteLn(Format('  Associativity         %s',[LProcessorInfo.L3Chache.AssociativityStr]));
        end;

        Readln;
      end
      else
      Writeln('No Processor Info was found');
  finally
   SMBios.Free;
  end;
end;        
</pre>
<p><a href="http://theroadtodelphi.files.wordpress.com/2013/03/processorinfo2.png"><img src="http://theroadtodelphi.files.wordpress.com/2013/03/processorinfo2.png?w=611" alt="ProcessorInfo2"   class="aligncenter size-full wp-image-3254" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/theroadtodelphi.wordpress.com/3244/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/theroadtodelphi.wordpress.com/3244/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=theroadtodelphi.wordpress.com&#038;blog=9574973&#038;post=3244&#038;subd=theroadtodelphi&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://theroadtodelphi.wordpress.com/2013/03/27/getting-processor-info-using-object-pascal-delphi-fpc-and-the-tsmbios/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<georss:point>-33.636934 -70.679350</georss:point>
		<geo:lat>-33.636934</geo:lat>
		<geo:long>-70.679350</geo:long>
		<media:content url="http://0.gravatar.com/avatar/6d57f4fcc68e1154d6a1ee145cbe5c97?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">theroadtodelphi</media:title>
		</media:content>

		<media:content url="http://theroadtodelphi.files.wordpress.com/2013/03/new_core_i7.png?w=150" medium="image">
			<media:title type="html">New_Core_I7</media:title>
		</media:content>

		<media:content url="http://theroadtodelphi.files.wordpress.com/2013/03/processorinfo2.png" medium="image">
			<media:title type="html">ProcessorInfo2</media:title>
		</media:content>
	</item>
		<item>
		<title>Vcl Styles Utils updated to fix QC #114040, #114032 (XE2 and XE3)</title>
		<link>http://theroadtodelphi.wordpress.com/2013/03/21/vcl-styles-utils-updated-to-fix-qc-114040-114032-xe2-and-xe3/</link>
		<comments>http://theroadtodelphi.wordpress.com/2013/03/21/vcl-styles-utils-updated-to-fix-qc-114040-114032-xe2-and-xe3/#comments</comments>
		<pubDate>Fri, 22 Mar 2013 02:55:42 +0000</pubDate>
		<dc:creator>Rodrigo</dc:creator>
				<category><![CDATA[Delphi]]></category>
		<category><![CDATA[Delphi XE2]]></category>
		<category><![CDATA[Delphi XE3]]></category>
		<category><![CDATA[VCL Styles]]></category>
		<category><![CDATA[Vcl Styles]]></category>

		<guid isPermaLink="false">http://theroadtodelphi.wordpress.com/?p=3223</guid>
		<description><![CDATA[I just commit in the Vcl Styles Project two new fixes to patch the QC 114040 and QC 114032 (these issues exist in Delphi XE2 and XE3), both reports are related to the Highlight colors used to draw the TColorBox &#8230; <a href="http://theroadtodelphi.wordpress.com/2013/03/21/vcl-styles-utils-updated-to-fix-qc-114040-114032-xe2-and-xe3/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=theroadtodelphi.wordpress.com&#038;blog=9574973&#038;post=3223&#038;subd=theroadtodelphi&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I just <a href="http://code.google.com/p/vcl-styles-utils/source/detail?r=61">commit</a> in the <a href="http://code.google.com/p/vcl-styles-utils/">Vcl Styles Project</a> two new fixes to patch the <a href="http://qc.embarcadero.com/wc/qcmain.aspx?d=114040">QC 114040</a> and <a href="http://qc.embarcadero.com/wc/qcmain.aspx?d=114032">QC 114032</a> (these issues exist in Delphi XE2 and XE3), both reports are related to the Highlight colors used to draw the <a href="http://docwiki.embarcadero.com/Libraries/XE3/en/Vcl.ExtCtrls.TColorBox">TColorBox</a> and <a href="http://docwiki.embarcadero.com/Libraries/XE3/en/Vcl.ComCtrls.TComboBoxEx">TComboBoxEx</a> components when the Vcl Styles are active.</p>
<h2>QC 114032</h2>
<p>As you can see in the below image the <a href="http://docwiki.embarcadero.com/Libraries/XE3/en/Vcl.ExtCtrls.TColorBox">TColorBox</a> component doesn&#8217;t use the proper highlight color, but the <a href="http://docwiki.embarcadero.com/Libraries/XE3/en/Vcl.ExtCtrls.TColorListBox">TColorListBox</a> uses the highlight color of the current Vcl Style.</p>
<p><a href="http://theroadtodelphi.files.wordpress.com/2013/03/tcolorboxqc.png"><img class="aligncenter size-full wp-image-3229" alt="TColorBoxQC" src="http://theroadtodelphi.files.wordpress.com/2013/03/tcolorboxqc.png?w=611"   /></a></p>
<p>The <a href="http://docwiki.embarcadero.com/Libraries/XE3/en/Vcl.ExtCtrls.TColorBox">TColorBox</a> control doesn&#8217;t use a Style Hook, so the fix was done using a interposer class. To apply the path just add the <a href="http://code.google.com/p/vcl-styles-utils/source/browse/trunk/Common/Vcl.Styles.Fixes.pas">Vcl.Styles.Fixes</a> unit to your uses list after of the Vcl.ExtCtrls unit. And the result will be</p>
<p><a href="http://theroadtodelphi.files.wordpress.com/2013/03/tcolorboxfix.png"><img class="aligncenter size-full wp-image-3232" alt="TColorBoxFix" src="http://theroadtodelphi.files.wordpress.com/2013/03/tcolorboxfix.png?w=611"   /></a></p>
<h2>QC 114040</h2>
<p>The <a href="http://docwiki.embarcadero.com/Libraries/XE3/en/Vcl.ComCtrls.TComboBoxEx">TComboBoxEx</a> control have a similar issue.</p>
<p><a href="http://theroadtodelphi.files.wordpress.com/2013/03/tcomboboxexqc.png"><img src="http://theroadtodelphi.files.wordpress.com/2013/03/tcomboboxexqc.png?w=611" alt="TcomboboxExQc"   class="aligncenter size-full wp-image-3235" /></a></p>
<p>In this case fixing the Style Hook related to the  <a href="http://docwiki.embarcadero.com/Libraries/XE3/en/Vcl.ComCtrls.TComboBoxEx">TComboBoxEx</a> control was the key.</p>
<p><a href="http://theroadtodelphi.files.wordpress.com/2013/03/tcomboboxexfix.png"><img src="http://theroadtodelphi.files.wordpress.com/2013/03/tcomboboxexfix.png?w=611" alt="TcomboboxExFix"   class="aligncenter size-full wp-image-3236" /></a></p>
<p>To apply this fix, just register the <em>TComboBoxExStyleHookFix </em> style hook located in the <a href="http://code.google.com/p/vcl-styles-utils/source/browse/trunk/Common/Vcl.Styles.Fixes.pas">Vcl.Styles.Fixes</a> unit.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/theroadtodelphi.wordpress.com/3223/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/theroadtodelphi.wordpress.com/3223/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=theroadtodelphi.wordpress.com&#038;blog=9574973&#038;post=3223&#038;subd=theroadtodelphi&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://theroadtodelphi.wordpress.com/2013/03/21/vcl-styles-utils-updated-to-fix-qc-114040-114032-xe2-and-xe3/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<georss:point>-33.636934 -70.679350</georss:point>
		<geo:lat>-33.636934</geo:lat>
		<geo:long>-70.679350</geo:long>
		<media:content url="http://0.gravatar.com/avatar/6d57f4fcc68e1154d6a1ee145cbe5c97?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">theroadtodelphi</media:title>
		</media:content>

		<media:content url="http://theroadtodelphi.files.wordpress.com/2013/03/tcolorboxqc.png" medium="image">
			<media:title type="html">TColorBoxQC</media:title>
		</media:content>

		<media:content url="http://theroadtodelphi.files.wordpress.com/2013/03/tcolorboxfix.png" medium="image">
			<media:title type="html">TColorBoxFix</media:title>
		</media:content>

		<media:content url="http://theroadtodelphi.files.wordpress.com/2013/03/tcomboboxexqc.png" medium="image">
			<media:title type="html">TcomboboxExQc</media:title>
		</media:content>

		<media:content url="http://theroadtodelphi.files.wordpress.com/2013/03/tcomboboxexfix.png" medium="image">
			<media:title type="html">TcomboboxExFix</media:title>
		</media:content>
	</item>
		<item>
		<title>Getting Memory Device Info using Object Pascal (Delphi / FPC) and the TSMBIOS</title>
		<link>http://theroadtodelphi.wordpress.com/2013/03/18/getting-memory-device-info-using-object-pascal-delphi-fpc-and-the-tsmbios/</link>
		<comments>http://theroadtodelphi.wordpress.com/2013/03/18/getting-memory-device-info-using-object-pascal-delphi-fpc-and-the-tsmbios/#comments</comments>
		<pubDate>Tue, 19 Mar 2013 01:58:37 +0000</pubDate>
		<dc:creator>Rodrigo</dc:creator>
				<category><![CDATA[Delphi]]></category>
		<category><![CDATA[SMBios]]></category>
		<category><![CDATA[FPC]]></category>
		<category><![CDATA[SMBIOS]]></category>

		<guid isPermaLink="false">http://theroadtodelphi.wordpress.com/?p=3202</guid>
		<description><![CDATA[If you need to know what type of RAM is installed in your system or how is the manufacturer of your memory device, you can try reading the SPD (Serial presence detect) info directly (but not all the memory devices &#8230; <a href="http://theroadtodelphi.wordpress.com/2013/03/18/getting-memory-device-info-using-object-pascal-delphi-fpc-and-the-tsmbios/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=theroadtodelphi.wordpress.com&#038;blog=9574973&#038;post=3202&#038;subd=theroadtodelphi&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><a href="http://theroadtodelphi.files.wordpress.com/2013/03/dram-module.jpg"><img class="alignleft size-thumbnail wp-image-3204" alt="dram-module" src="http://theroadtodelphi.files.wordpress.com/2013/03/dram-module.jpg?w=100&#038;h=71" width="100" height="71" /></a>If you need to know what type of RAM is installed in your system or how is the manufacturer of your memory device, you can try reading the SPD (Serial presence detect) info directly (but not all the memory devices exposes the SPD info and reading the SPD require Kernel Mode access) , use the <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/aa394347%28v=vs.85%29.aspx">Win32_PhysicalMemory</a> WMI class (but depending of the manufacturer the WMI fails to get info about some memory properties like the <em>memory type</em>) or using the SMBIOS.</p>
<p>Using the <a href="http://www.dmtf.org/standards/smbios">SMBIOS </a> you can get most of the info related to the memory devices installed like manufacturer, type, speed, serial number and so on. The next snippet show how using the <a href="http://code.google.com/p/tsmbios/">TSMBIOS </a>and Delphi (or FPC) you can retrieve such data.</p>
<pre class="brush: delphi; title: ; wrap-lines: false; notranslate">
{$IFDEF FPC}{$mode objfpc}{$H+}
{$ELSE}
{$APPTYPE CONSOLE}
{$ENDIF}

uses
  Classes,
  SysUtils,
  uSMBIOS;

procedure GetMemoryDeviceInfo;
Var
  SMBios : TSMBios;
  LMemoryDevice  : TMemoryDeviceInformation;
begin
  SMBios:=TSMBios.Create;
  try
      WriteLn('Memory Device Information');
      WriteLn('-------------------------');

      if SMBios.HasMemoryDeviceInfo then
      for LMemoryDevice in SMBios.MemoryDeviceInformation do
      begin
        WriteLn(Format('Total Width    %d bits',[LMemoryDevice.RAWMemoryDeviceInfo^.TotalWidth]));
        WriteLn(Format('Data Width     %d bits',[LMemoryDevice.RAWMemoryDeviceInfo^.DataWidth]));
        WriteLn(Format('Size           %d Mbytes',[LMemoryDevice.GetSize]));
        WriteLn(Format('Form Factor    %s',[LMemoryDevice.GetFormFactor]));
        WriteLn(Format('Device Locator %s',[LMemoryDevice.GetDeviceLocatorStr]));
        WriteLn(Format('Bank Locator   %s',[LMemoryDevice.GetBankLocatorStr]));
        WriteLn(Format('Memory Type    %s',[LMemoryDevice.GetMemoryTypeStr]));
        WriteLn(Format('Speed          %d MHz',[LMemoryDevice.RAWMemoryDeviceInfo^.Speed]));
        WriteLn(Format('Manufacturer   %s',[LMemoryDevice.ManufacturerStr]));
        WriteLn(Format('Serial Number  %s',[LMemoryDevice.SerialNumberStr]));
        WriteLn(Format('Asset Tag      %s',[LMemoryDevice.AssetTagStr]));
        WriteLn(Format('Part Number    %s',[LMemoryDevice.PartNumberStr]));

        WriteLn;

        if LMemoryDevice.RAWMemoryDeviceInfo^.PhysicalMemoryArrayHandle&gt;0 then
        begin
          WriteLn('  Physical Memory Array');
          WriteLn('  ---------------------');
          WriteLn('  Location         '+LMemoryDevice.PhysicalMemoryArray.GetLocationStr);
          WriteLn('  Use              '+LMemoryDevice.PhysicalMemoryArray.GetUseStr);
          WriteLn('  Error Correction '+LMemoryDevice.PhysicalMemoryArray.GetErrorCorrectionStr);
          if LMemoryDevice.PhysicalMemoryArray.RAWPhysicalMemoryArrayInformation^.MaximumCapacity&lt;&gt;$80000000 then
            WriteLn(Format('  Maximum Capacity %d Kb',[LMemoryDevice.PhysicalMemoryArray.RAWPhysicalMemoryArrayInformation^.MaximumCapacity]))
          else
            WriteLn(Format('  Maximum Capacity %d bytes',[LMemoryDevice.PhysicalMemoryArray.RAWPhysicalMemoryArrayInformation^.ExtendedMaximumCapacity]));

          WriteLn(Format('  Memory devices   %d',[LMemoryDevice.PhysicalMemoryArray.RAWPhysicalMemoryArrayInformation^.NumberofMemoryDevices]));
        end;
        WriteLn;
      end
      else
      Writeln('No Memory Device Info was found');
  finally
   SMBios.Free;
  end;
end;

begin
 try
    GetMemoryDeviceInfo;
 except
    on E:Exception do
        Writeln(E.Classname, ':', E.Message);
 end;
 Writeln('Press Enter to exit');
 Readln;
end.
</pre>
<p><a href="http://theroadtodelphi.files.wordpress.com/2013/03/memoryinfo.png"><img class="aligncenter size-full wp-image-3212" alt="memoryInfo" src="http://theroadtodelphi.files.wordpress.com/2013/03/memoryinfo.png?w=611"   /></a></p>
<p>Note: Remember if you uses FPC, you can use this library in linux as well :)</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/theroadtodelphi.wordpress.com/3202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/theroadtodelphi.wordpress.com/3202/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=theroadtodelphi.wordpress.com&#038;blog=9574973&#038;post=3202&#038;subd=theroadtodelphi&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://theroadtodelphi.wordpress.com/2013/03/18/getting-memory-device-info-using-object-pascal-delphi-fpc-and-the-tsmbios/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		<georss:point>-33.636934 -70.679350</georss:point>
		<geo:lat>-33.636934</geo:lat>
		<geo:long>-70.679350</geo:long>
		<media:content url="http://0.gravatar.com/avatar/6d57f4fcc68e1154d6a1ee145cbe5c97?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">theroadtodelphi</media:title>
		</media:content>

		<media:content url="http://theroadtodelphi.files.wordpress.com/2013/03/dram-module.jpg?w=150" medium="image">
			<media:title type="html">dram-module</media:title>
		</media:content>

		<media:content url="http://theroadtodelphi.files.wordpress.com/2013/03/memoryinfo.png" medium="image">
			<media:title type="html">memoryInfo</media:title>
		</media:content>
	</item>
		<item>
		<title>Added new vcl style hook to the Vcl Styles Utils to fix  QC #108678, #108875 (XE2 and XE3)</title>
		<link>http://theroadtodelphi.wordpress.com/2013/03/12/added-new-vcl-style-hook-to-the-vcl-styles-utils-to-fix-qc-108678-108875-xe2-and-xe3/</link>
		<comments>http://theroadtodelphi.wordpress.com/2013/03/12/added-new-vcl-style-hook-to-the-vcl-styles-utils-to-fix-qc-108678-108875-xe2-and-xe3/#comments</comments>
		<pubDate>Tue, 12 Mar 2013 19:59:22 +0000</pubDate>
		<dc:creator>Rodrigo</dc:creator>
				<category><![CDATA[Delphi]]></category>
		<category><![CDATA[Delphi XE2]]></category>
		<category><![CDATA[Delphi XE3]]></category>
		<category><![CDATA[VCL Styles]]></category>
		<category><![CDATA[Vcl Styles]]></category>

		<guid isPermaLink="false">http://theroadtodelphi.wordpress.com/?p=3183</guid>
		<description><![CDATA[I just added a new vcl style hook (TListViewStyleHookFix) for the TListView component in the Vcl Styles Utils project to fix the QC #108678, #108875 (XE2 and XE3) The issue reported in both reports, is that the images are not &#8230; <a href="http://theroadtodelphi.wordpress.com/2013/03/12/added-new-vcl-style-hook-to-the-vcl-styles-utils-to-fix-qc-108678-108875-xe2-and-xe3/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=theroadtodelphi.wordpress.com&#038;blog=9574973&#038;post=3183&#038;subd=theroadtodelphi&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I just added a new vcl style hook (<a href="http://code.google.com/p/vcl-styles-utils/source/browse/trunk/Common/Vcl.Styles.Fixes.pas">TListViewStyleHookFix</a>) for the <a href="http://docwiki.embarcadero.com/Libraries/XE2/en/Vcl.ComCtrls.TListView">TListView</a> component in the <a href="http://code.google.com/p/vcl-styles-utils/">Vcl Styles Utils</a> project to fix the QC #<a href="http://qc.embarcadero.com/wc/qcmain.aspx?d=108678">108678</a>, #<a href="http://qc.embarcadero.com/wc/qcmain.aspx?d=108875">108875 </a>(XE2 and XE3)</p>
<p>The issue reported in both reports, is that the images are not displayed in the TListView header with the VCL Styles enabled.</p>
<p>When you uses the Windows Theme in a TListView with images in the header will look like so</p>
<p><a href="http://theroadtodelphi.files.wordpress.com/2013/03/lvwindows.png"><img class="aligncenter size-full wp-image-3189" alt="LVWindows" src="http://theroadtodelphi.files.wordpress.com/2013/03/lvwindows.png?w=611"   /></a></p>
<p>But if you enable the Vcl Styles, the images in the header are lost.</p>
<p><a href="http://theroadtodelphi.files.wordpress.com/2013/03/lvstyles2.png"><img class="aligncenter size-full wp-image-3191" alt="LVStyles2" src="http://theroadtodelphi.files.wordpress.com/2013/03/lvstyles2.png?w=611"   /></a></p>
<p>The issue is located in the <em>TListViewStyleHook.DrawHeaderSection</em> method, this method must paint the image and text of each section of the header of the ListView.</p>
<p>This is part of the code with the bug</p>
<pre class="brush: delphi; title: ; wrap-lines: false; notranslate">
  ...
  ...
  ImageList := SendMessage(Handle, HDM_GETIMAGELIST, 0, 0);
  Item.Mask := HDI_FORMAT or HDI_IMAGE;
  InflateRect(R, -2, -2);
  if (ImageList &lt;&gt; 0) and Header_GetItem(Handle, Index, Item) then
  begin
    if Item.fmt and HDF_IMAGE = HDF_IMAGE then
      ImageList_Draw(ImageList, Item.iImage, Canvas.Handle, R.Left, R.Top, ILD_TRANSPARENT);
    ImageList_GetIconSize(ImageList, IconWidth, IconHeight);
    Inc(R.Left, IconWidth + 5);
  end;
  ...
  ...
</pre>
<p>The problem with the above code is that the <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms644950%28v=vs.85%29.aspx">SendMessage </a>function with the <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/bb775332%28v=vs.85%29.aspx">HDM_GETIMAGELIST</a> message (which is used to get the current imagelist) is not using the proper Handle. The above code is passing the handle of the ListView, but must pass the handle of the Header control, the same applies to the call to the <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/bb775391%28v=vs.85%29.aspx">Header_GetItem</a> method. </p>
<p>The <em>TListViewStyleHookFix </em>introduces a new <em>DrawHeaderSection </em>method which passes the handle of the header control and fix the issue. You can use this Stylehook adding <em><a href="http://code.google.com/p/vcl-styles-utils/source/browse/trunk/Common/Vcl.Styles.Fixes.pas">Vcl.Styles.Fixes</a></em> unit to you uses clause and then register the hook on this way.</p>
<pre class="brush: delphi; title: ; wrap-lines: false; notranslate">
initialization
   TStyleManager.Engine.RegisterStyleHook(TListView, TListViewStyleHookFix);
</pre>
<p><a href="http://theroadtodelphi.files.wordpress.com/2013/03/lvstylesfix.png"><img src="http://theroadtodelphi.files.wordpress.com/2013/03/lvstylesfix.png?w=611" alt="LVStylesFix"   class="aligncenter size-full wp-image-3196" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/theroadtodelphi.wordpress.com/3183/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/theroadtodelphi.wordpress.com/3183/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=theroadtodelphi.wordpress.com&#038;blog=9574973&#038;post=3183&#038;subd=theroadtodelphi&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://theroadtodelphi.wordpress.com/2013/03/12/added-new-vcl-style-hook-to-the-vcl-styles-utils-to-fix-qc-108678-108875-xe2-and-xe3/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<georss:point>-33.636934 -70.679350</georss:point>
		<geo:lat>-33.636934</geo:lat>
		<geo:long>-70.679350</geo:long>
		<media:content url="http://0.gravatar.com/avatar/6d57f4fcc68e1154d6a1ee145cbe5c97?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">theroadtodelphi</media:title>
		</media:content>

		<media:content url="http://theroadtodelphi.files.wordpress.com/2013/03/lvwindows.png" medium="image">
			<media:title type="html">LVWindows</media:title>
		</media:content>

		<media:content url="http://theroadtodelphi.files.wordpress.com/2013/03/lvstyles2.png" medium="image">
			<media:title type="html">LVStyles2</media:title>
		</media:content>

		<media:content url="http://theroadtodelphi.files.wordpress.com/2013/03/lvstylesfix.png" medium="image">
			<media:title type="html">LVStylesFix</media:title>
		</media:content>
	</item>
		<item>
		<title>How distinguish when Windows was installed in Legacy BIOS or UEFI mode using Delphi?</title>
		<link>http://theroadtodelphi.wordpress.com/2013/02/19/how-distinguish-when-windows-was-installed-in-legacy-bios-or-uefi-mode-using-delphi/</link>
		<comments>http://theroadtodelphi.wordpress.com/2013/02/19/how-distinguish-when-windows-was-installed-in-legacy-bios-or-uefi-mode-using-delphi/#comments</comments>
		<pubDate>Tue, 19 Feb 2013 23:59:12 +0000</pubDate>
		<dc:creator>Rodrigo</dc:creator>
				<category><![CDATA[Delphi]]></category>
		<category><![CDATA[WinApi]]></category>
		<category><![CDATA[UEFI]]></category>
		<category><![CDATA[winapi]]></category>

		<guid isPermaLink="false">http://theroadtodelphi.wordpress.com/?p=3176</guid>
		<description><![CDATA[As part of the TSMBIOS project, I needed a method to distinguish when Windows was installed in Legacy BIOS or UEFI mode. The solution was provided by the GetFirmwareEnvironmentVariable function. The msdn documentation states Firmware variables are not supported on &#8230; <a href="http://theroadtodelphi.wordpress.com/2013/02/19/how-distinguish-when-windows-was-installed-in-legacy-bios-or-uefi-mode-using-delphi/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=theroadtodelphi.wordpress.com&#038;blog=9574973&#038;post=3176&#038;subd=theroadtodelphi&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>As part of the <a href="http://code.google.com/p/tsmbios/">TSMBIOS </a>project, I needed a method to distinguish when Windows was installed in Legacy BIOS or <a href="http://www.uefi.org/home/">UEFI </a>mode. The solution was provided by the <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms724325%28v=vs.85%29.aspx">GetFirmwareEnvironmentVariable </a>function.</p>
<p>The <a href="msdn.microsoft.com/en-us/library/windows/desktop/ms724325(v=vs.85).aspx">msdn </a>documentation states</p>
<blockquote><p> Firmware variables are not supported on a legacy BIOS-based system. The GetFirmwareEnvironmentVariable function will always fail on a legacy BIOS-based system, or if Windows was installed using legacy BIOS on a system that supports both legacy BIOS and UEFI. To identify these conditions, call the function with a dummy firmware environment name such as an empty string (&#8220;&#8221;) for the lpName parameter and a dummy GUID such as &#8220;{00000000-0000-0000-0000-000000000000}&#8221; for the lpGuid parameter. On a legacy BIOS-based system, or on a system that supports both legacy BIOS and UEFI where Windows was installed using legacy BIOS, the function will fail with ERROR_INVALID_FUNCTION. On a UEFI-based system, the function will fail with an error specific to the firmware, such as ERROR_NOACCESS, to indicate that the dummy GUID namespace does not exist.<br />
.</p></blockquote>
<p>So the Delphi code to detect such condition will be something like so</p>
<pre class="brush: delphi; title: ; wrap-lines: false; notranslate">
{$APPTYPE CONSOLE}

uses
  Windows,
  SysUtils;

function GetFirmwareEnvironmentVariableA(lpName, lpGuid: LPCSTR; pBuffer: Pointer;
  nSize: DWORD): DWORD; stdcall; external kernel32 name 'GetFirmwareEnvironmentVariableA';

begin
  try
    GetFirmwareEnvironmentVariableA('','{00000000-0000-0000-0000-000000000000}', nil,0);
    if (GetLastError = ERROR_INVALID_FUNCTION) then
      Writeln('Legacy BIOS')
    else
      Writeln('UEFI Boot Mode');
  except
    on E: Exception do
      Writeln(E.ClassName, ': ', E.Message);
  end;
  Readln;
end.
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/theroadtodelphi.wordpress.com/3176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/theroadtodelphi.wordpress.com/3176/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=theroadtodelphi.wordpress.com&#038;blog=9574973&#038;post=3176&#038;subd=theroadtodelphi&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://theroadtodelphi.wordpress.com/2013/02/19/how-distinguish-when-windows-was-installed-in-legacy-bios-or-uefi-mode-using-delphi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>-33.636934 -70.679350</georss:point>
		<geo:lat>-33.636934</geo:lat>
		<geo:long>-70.679350</geo:long>
		<media:content url="http://0.gravatar.com/avatar/6d57f4fcc68e1154d6a1ee145cbe5c97?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">theroadtodelphi</media:title>
		</media:content>
	</item>
		<item>
		<title>Added Linux support to the TSMBIOS Project</title>
		<link>http://theroadtodelphi.wordpress.com/2013/02/18/added-linux-support-to-the-tsmbios-project/</link>
		<comments>http://theroadtodelphi.wordpress.com/2013/02/18/added-linux-support-to-the-tsmbios-project/#comments</comments>
		<pubDate>Tue, 19 Feb 2013 02:22:26 +0000</pubDate>
		<dc:creator>Rodrigo</dc:creator>
				<category><![CDATA[Delphi]]></category>
		<category><![CDATA[FreePascal]]></category>
		<category><![CDATA[SMBios]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[FPC]]></category>
		<category><![CDATA[SMBIOS]]></category>

		<guid isPermaLink="false">http://theroadtodelphi.wordpress.com/?p=3162</guid>
		<description><![CDATA[Great news for the Free Pascal developers, I just added Linux support to the TSMBIOS project. Note : The TSMBIOS read the SMBIOS info using the /dev/mem device file  which provides access to system physical memory, so the code must &#8230; <a href="http://theroadtodelphi.wordpress.com/2013/02/18/added-linux-support-to-the-tsmbios-project/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=theroadtodelphi.wordpress.com&#038;blog=9574973&#038;post=3162&#038;subd=theroadtodelphi&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Great news for the Free Pascal developers, I just added Linux support to the <a href="http://code.google.com/p/tsmbios/">TSMBIOS</a> project.</p>
<p><a href="http://theroadtodelphi.files.wordpress.com/2013/02/linux_tsmbios.png"><img class="aligncenter size-full wp-image-3171" alt="Linux_TSMbios" src="http://theroadtodelphi.files.wordpress.com/2013/02/linux_tsmbios.png?w=611&#038;h=383" width="611" height="383" /></a></p>
<p>Note : The TSMBIOS read the SMBIOS info using the <strong>/dev/mem </strong>device file  which provides access to system physical memory, so the code must be executed using a user with the proper permissions.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/theroadtodelphi.wordpress.com/3162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/theroadtodelphi.wordpress.com/3162/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=theroadtodelphi.wordpress.com&#038;blog=9574973&#038;post=3162&#038;subd=theroadtodelphi&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://theroadtodelphi.wordpress.com/2013/02/18/added-linux-support-to-the-tsmbios-project/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>-33.636934 -70.679350</georss:point>
		<geo:lat>-33.636934</geo:lat>
		<geo:long>-70.679350</geo:long>
		<media:content url="http://0.gravatar.com/avatar/6d57f4fcc68e1154d6a1ee145cbe5c97?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">theroadtodelphi</media:title>
		</media:content>

		<media:content url="http://theroadtodelphi.files.wordpress.com/2013/02/linux_tsmbios.png" medium="image">
			<media:title type="html">Linux_TSMbios</media:title>
		</media:content>
	</item>
		<item>
		<title>Introducing TSMBIOS</title>
		<link>http://theroadtodelphi.wordpress.com/2013/02/12/introducing-tsmbios/</link>
		<comments>http://theroadtodelphi.wordpress.com/2013/02/12/introducing-tsmbios/#comments</comments>
		<pubDate>Wed, 13 Feb 2013 01:20:24 +0000</pubDate>
		<dc:creator>Rodrigo</dc:creator>
				<category><![CDATA[Delphi]]></category>
		<category><![CDATA[FreePascal]]></category>
		<category><![CDATA[SMBios]]></category>
		<category><![CDATA[FPC]]></category>
		<category><![CDATA[SMBIOS]]></category>

		<guid isPermaLink="false">http://theroadtodelphi.wordpress.com/?p=3106</guid>
		<description><![CDATA[A few weeks ago I started a new project called TSMBIOS, this is a library which allows access the SMBIOS using the Object Pascal language (Delphi or Free Pascal). What is the SMBIOS? SMBIOS stands for System Management BIOS , &#8230; <a href="http://theroadtodelphi.wordpress.com/2013/02/12/introducing-tsmbios/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=theroadtodelphi.wordpress.com&#038;blog=9574973&#038;post=3106&#038;subd=theroadtodelphi&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><a href="http://theroadtodelphi.files.wordpress.com/2013/02/logo.png"><img class="alignleft size-full wp-image-3111" alt="logo" src="http://theroadtodelphi.files.wordpress.com/2013/02/logo.png?w=611"   /></a>A few weeks ago I started a new project called <a href="http://code.google.com/p/tsmbios/">TSMBIOS</a>, this is a library which allows access the <a href="http://www.dmtf.org/standards/smbios">SMBIOS</a> using the Object Pascal language (Delphi or Free Pascal).</p>
<h2>What is the SMBIOS?</h2>
<p>SMBIOS stands for System Management BIOS , this standard is tightly related and developed by the <a href="http://www.dmtf.org/">DMTF</a> (Desktop Management Task Force).</p>
<p>The SMBIOS contains a description of the system&#8217;s hardware components, the information stored in the SMBIOS typically includes system manufacturer, model name, serial numbers, BIOS version, asset tag, processors, ports, device memory installed and so on.</p>
<p><strong>Note : The amount and accuracy of the SMBIOS information depends on the computer manufacturer.</strong></p>
<h2>Which are the advantages of use the SMBIOS?</h2>
<ul>
<li>You can retrieve the information without having to probe for the actual hardware. this is a good point in terms of speed and safeness.</li>
<li>The SMBIOS information is very well <a href="http://www.dmtf.org/standards/smbios">documented</a>.</li>
<li>You can avoid the use of undocumented functions to get hardware info (for example the RAM type and manufacturer).</li>
<li>Useful for create a Hardware ID (machine fingerprint).</li>
</ul>
<h2>How it works?</h2>
<p>The BIOS typically populates the SMBIOS structures at system boot time, and is not in control when the OS is running. Therefore, dynamically changing data is rarely represented in SMBIOS tables.</p>
<p>The SMBIOS Entry Point is located somewhere between the addresses <em>0xF0000</em> and <em>0xFFFFF, </em>in early Windows systems (Win95, Win98) it was possible access this space address directly, but after with the introduction of the NT Systems and the new security changes the BIOS was accessible through section <a href="http://technet.microsoft.com/en-us/library/cc787565%28v=ws.10%29.aspx">\Device\PhysicalMemory</a>, but this last method was disabled as well in Windows Server 2003 Service Pack 1, and replaced with 2 new WinApi functions the <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms724259%28v=vs.85%29.aspx">EnumSystemFirmwareTables </a>and <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms724379%28v=vs.85%29.aspx">GetSystemFirmwareTable</a>, Additionally  the WMI supports reading the entire contents of SMBIOS data i using the <strong><em>MSSMBios_RawSMBiosTables</em></strong> class inside of the <strong><em>root\wmi namespace.</em></strong></p>
<p><strong>Note : you can find more information about the <em>SMBIOS </em>Support in Windows on this <a href="http://msdn.microsoft.com/en-us/library/windows/hardware/gg463136.aspx">link</a>.</strong></p>
<p>The TSMBIOS can be compiled using a <em>WinApi</em> mode (uses the <em>GetSystemFirmwareTable</em> function) or using the <em>WMI</em> Mode (uses the <em>MSSMBios_RawSMBiosTable</em>s class)</p>
<p>If you uses the WinApi Mode you  don&#8217;t need use COM and the final size of the Application will be smaller, but the WinAPI functions was introduced in Windows Vista and Windows XP x64 (So in Windows Xp x86 will fail). Otherwise using the WMI mode you will need use COM (<em>CoInitialize </em>and <em>CoUninitialize</em>), but also you will get two additional advantages 1) The WMI will work even in Windows Xp x86 systems, 2) You can read then SMBIOS data of local and remote computers.</p>
<p>In order to use the TSMBIOS in your application only you must add the <em><a href="http://code.google.com/p/tsmbios/source/browse/trunk/Common/uSMBIOS.pas">uSMBIOS </a></em>unit to your uses clause, then create a instance for the <em>TSMBios</em> class using the proper constructor</p>
<pre class="brush: delphi; title: ; wrap-lines: false; notranslate">
// Default constructor, used for populate the TSMBIOS class  using the current mode selected (WMI or WinApi)
constructor Create; overload;
// Use this constructor to load the SMBIOS data from a previously saved file.
constructor Create(const FileName : string); overload;
{$IFDEF USEWMI}
// Use this constructor to read the SMBIOS from a remote machine.
constructor Create(const RemoteMachine, UserName, Password : string); overload;
{$ENDIF}
</pre>
<p>and finally use the property which expose the SMBIOS info which you need. In this case as is show in the sample code the <em>BatteryInformation </em> property is used to get all the info of the batteries installed on the system.</p>
<pre class="brush: delphi; title: ; wrap-lines: false; notranslate">
{$APPTYPE CONSOLE}

uses
  Classes,
  SysUtils,
  uSMBIOS in '..\..\Common\uSMBIOS.pas';

procedure GetBatteryInfo;
Var
  SMBios : TSMBios;
  LBatteryInfo  : TBatteryInformation;
begin
  SMBios:=TSMBios.Create;
  try
      WriteLn('Battery Information');
      WriteLn('-------------------');
      if SMBios.HasBatteryInfo then
      for LBatteryInfo in SMBios.BatteryInformation do
      begin
        WriteLn('Location           '+LBatteryInfo.GetLocationStr);
        WriteLn('Manufacturer       '+LBatteryInfo.GetManufacturerStr);
        WriteLn('Manufacturer Date  '+LBatteryInfo.GetManufacturerDateStr);
        WriteLn('Serial Number      '+LBatteryInfo.GetSerialNumberStr);
        WriteLn('Device Name        '+LBatteryInfo.GetDeviceNameStr);
        WriteLn('Device Chemistry   '+LBatteryInfo.GetDeviceChemistry);
        WriteLn(Format('Design Capacity    %d mWatt/hours',[LBatteryInfo.RAWBatteryInfo.DesignCapacity*LBatteryInfo.RAWBatteryInfo.DesignCapacityMultiplier]));
        WriteLn(Format('Design Voltage     %d mVolts',[LBatteryInfo.RAWBatteryInfo.DesignVoltage]));
        WriteLn('SBDS Version Number  '+LBatteryInfo.GetSBDSVersionNumberStr);
        WriteLn(Format('Maximum Error in Battery Data %d%%',[LBatteryInfo.RAWBatteryInfo.MaximumErrorInBatteryData]));
        WriteLn(Format('SBDS Version Number           %.4x',[LBatteryInfo.RAWBatteryInfo.SBDSSerialNumber]));
        WriteLn('SBDS Manufacture Date  '+LBatteryInfo.GetSBDSManufactureDateStr);
        WriteLn('SBDS Device Chemistry  '+LBatteryInfo.GetSBDSDeviceChemistryStr);
        WriteLn(Format('OEM Specific                  %.8x',[LBatteryInfo.RAWBatteryInfo.OEM_Specific]));
        WriteLn;
      end
      else
      Writeln('No Battery Info was found');
  finally
   SMBios.Free;
  end;
end;

begin
 try
    GetBatteryInfo;
 except
    on E:Exception do
        Writeln(E.Classname, ':', E.Message);
 end;
 Writeln('Press Enter to exit');
 Readln;
end.
</pre>
<h2>TSMBIOS Features</h2>
<ul>
<li>Source Full documented compatible with the help insight feature, available since Delphi 2005.</li>
<li>Supports SMBIOS Version from 2.1 to 2.7.1</li>
<li>Supports Delphi 5, 6, 7, 2005, BDS/Turbo 2006 and RAD Studio 2007, 2009, 2010, XE, XE2, XE3, XE4.</li>
<li>Compatible with FPC 2.6.0 (Windows and Linux)</li>
<li>SMBIOS Data can be obtained using WinApi, WMI or loading a saved SMBIOS dump</li>
<li>SMBIOS Data can be saved and load to a file</li>
<li>SMBIOS Data can be obtained from remote machines</li>
</ul>
<h3>SMBIOS Tables supported</h3>
<ul>
<li><a href="http://code.google.com/p/tsmbios/wiki/BIOSInformation" rel="nofollow"> BIOS Information (Type 0)</a></li>
<li><a href="http://code.google.com/p/tsmbios/wiki/SystemInformation" rel="nofollow">System Information (Type 1)</a></li>
<li><a href="http://code.google.com/p/tsmbios/wiki/Baseboard" rel="nofollow">Baseboard (or Module) Information (Type 2)</a></li>
<li><a href="http://code.google.com/p/tsmbios/wiki/SystemEnclosure" rel="nofollow">System Enclosure or Chassis (Type 3)</a></li>
<li><a href="http://code.google.com/p/tsmbios/wiki/ProcessorInformation" rel="nofollow">Processor Information (Type 4)</a></li>
<li><a href="http://code.google.com/p/tsmbios/wiki/CacheInformation" rel="nofollow">Cache Information (Type 7)</a></li>
<li><a href="http://code.google.com/p/tsmbios/wiki/PortConnector" rel="nofollow">Port Connector Information (Type 8)</a></li>
<li><a href="http://code.google.com/p/tsmbios/wiki/SystemSlots" rel="nofollow">System Slots (Type 9)</a></li>
<li>OEM Strings (Type 11)</li>
<li><a href="http://code.google.com/p/tsmbios/wiki/SystemConfiguration" rel="nofollow">System Configuration Options (Type 12)</a></li>
<li><a href="http://code.google.com/p/tsmbios/wiki/BIOSLanguage" rel="nofollow">BIOS Language Information (Type 13)</a></li>
<li><a href="http://code.google.com/p/tsmbios/wiki/PhysicalMemoryArray" rel="nofollow">Physical Memory Array (Type 16)</a></li>
<li><a href="http://code.google.com/p/tsmbios/wiki/MemoryDevice" rel="nofollow">Memory Device (Type 17) </a></li>
<li><a href="http://code.google.com/p/tsmbios/wiki/MemoryArrayMappedAddress" rel="nofollow">Memory Array Mapped Address (Type 19)</a></li>
<li><a href="http://code.google.com/p/tsmbios/wiki/MemoryDeviceMappedAddress" rel="nofollow">Memory Device Mapped Address (Type 20)</a></li>
<li><a href="http://code.google.com/p/tsmbios/wiki/BuiltInPointingDevice" rel="nofollow">Built-in Pointing Device (Type 21)</a></li>
<li><a href="http://code.google.com/p/tsmbios/wiki/PortableBattery" rel="nofollow">Portable Battery (Type 22)</a></li>
<li><a href="http://code.google.com/p/tsmbios/wiki/VoltageProbe" rel="nofollow">Voltage Probe (Type 26)</a></li>
<li><a href="http://code.google.com/p/tsmbios/wiki/CoolingDevice" rel="nofollow">Cooling Device (Type 27)</a></li>
<li><a href="http://code.google.com/p/tsmbios/wiki/TemperatureProbe" rel="nofollow">Temperature Probe (Type 28)</a></li>
<li><a href="http://code.google.com/p/tsmbios/wiki/ElectricalCurrentProbe" rel="nofollow">Electrical Current Probe (Type 29)</a></li>
</ul>
<h3>The TSMBIOS is a Open Source project is hosted in the <a href="http://code.google.com/p/tsmbios/">code google site</a>.</h3>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/theroadtodelphi.wordpress.com/3106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/theroadtodelphi.wordpress.com/3106/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=theroadtodelphi.wordpress.com&#038;blog=9574973&#038;post=3106&#038;subd=theroadtodelphi&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://theroadtodelphi.wordpress.com/2013/02/12/introducing-tsmbios/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<georss:point>-33.636934 -70.679350</georss:point>
		<geo:lat>-33.636934</geo:lat>
		<geo:long>-70.679350</geo:long>
		<media:content url="http://0.gravatar.com/avatar/6d57f4fcc68e1154d6a1ee145cbe5c97?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">theroadtodelphi</media:title>
		</media:content>

		<media:content url="http://theroadtodelphi.files.wordpress.com/2013/02/logo.png" medium="image">
			<media:title type="html">logo</media:title>
		</media:content>
	</item>
		<item>
		<title>Delphi XE3 &#8211; Vcl Styles Additions</title>
		<link>http://theroadtodelphi.wordpress.com/2012/12/17/delphi-xe3-vcl-styles-additions/</link>
		<comments>http://theroadtodelphi.wordpress.com/2012/12/17/delphi-xe3-vcl-styles-additions/#comments</comments>
		<pubDate>Mon, 17 Dec 2012 19:08:31 +0000</pubDate>
		<dc:creator>Rodrigo</dc:creator>
				<category><![CDATA[Delphi]]></category>
		<category><![CDATA[Delphi XE3]]></category>
		<category><![CDATA[VCL Styles]]></category>
		<category><![CDATA[Vcl Styles]]></category>

		<guid isPermaLink="false">http://theroadtodelphi.wordpress.com/?p=3095</guid>
		<description><![CDATA[Alexey Sharagin from Embarcadero just wrote a blog article titled Tuning VCL Styles for Forms and Controls, which shows some features related to the VCL Styles introduced in Delphi XE3.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=theroadtodelphi.wordpress.com&#038;blog=9574973&#038;post=3095&#038;subd=theroadtodelphi&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><a href="http://blogs.embarcadero.com/sharagin/">Alexey Sharagin</a> from Embarcadero just wrote a blog article titled <em><a href="http://blogs.embarcadero.com/sharagin/2012/12/16/adjustvclstyle/">Tuning VCL Styles for Forms and Controls</a></em>, which shows some features related to the VCL Styles introduced in Delphi XE3.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/theroadtodelphi.wordpress.com/3095/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/theroadtodelphi.wordpress.com/3095/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=theroadtodelphi.wordpress.com&#038;blog=9574973&#038;post=3095&#038;subd=theroadtodelphi&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://theroadtodelphi.wordpress.com/2012/12/17/delphi-xe3-vcl-styles-additions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>-33.636934 -70.679350</georss:point>
		<geo:lat>-33.636934</geo:lat>
		<geo:long>-70.679350</geo:long>
		<media:content url="http://0.gravatar.com/avatar/6d57f4fcc68e1154d6a1ee145cbe5c97?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">theroadtodelphi</media:title>
		</media:content>
	</item>
	</channel>
</rss>
