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

<channel>
	<title>Blog OnKeySoft</title>
	<atom:link href="http://blog.onkeysoft.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.onkeysoft.com</link>
	<description>To maintain the link...</description>
	<lastBuildDate>Sun, 23 Oct 2011 00:00:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Qualité audio des Smartphones en 2011</title>
		<link>http://blog.onkeysoft.com/2011/10/23/qualite-audio-des-smartphones-en-2011/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=qualite-audio-des-smartphones-en-2011</link>
		<comments>http://blog.onkeysoft.com/2011/10/23/qualite-audio-des-smartphones-en-2011/#comments</comments>
		<pubDate>Sat, 22 Oct 2011 23:46:42 +0000</pubDate>
		<dc:creator>remixtech</dc:creator>
				<category><![CDATA[Audio]]></category>
		<category><![CDATA[Smartphones]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[beats]]></category>
		<category><![CDATA[cowon]]></category>
		<category><![CDATA[dac]]></category>
		<category><![CDATA[Diaphonie stéréo]]></category>
		<category><![CDATA[Distorsion intermodulation]]></category>
		<category><![CDATA[dynamic range]]></category>
		<category><![CDATA[Galaxy]]></category>
		<category><![CDATA[gamme dynamique]]></category>
		<category><![CDATA[htc]]></category>
		<category><![CDATA[IMD]]></category>
		<category><![CDATA[IOS]]></category>
		<category><![CDATA[MiniDisc]]></category>
		<category><![CDATA[niveau de bruit]]></category>
		<category><![CDATA[noise level]]></category>
		<category><![CDATA[quality]]></category>
		<category><![CDATA[réponse en fréquence]]></category>
		<category><![CDATA[Samsung]]></category>
		<category><![CDATA[sensation xe]]></category>
		<category><![CDATA[Sony]]></category>
		<category><![CDATA[stereo crosstalk]]></category>
		<category><![CDATA[Taux de distorsion harmonique]]></category>
		<category><![CDATA[THD]]></category>

		<guid isPermaLink="false">http://blog.onkeysoft.com/?p=130</guid>
		<description><![CDATA[Introduction Ce petit article n’a pas la prétention d’être exempt d’erreurs, il est écrit par un physicien audiophile et non un ingénieur du son. Le but de celui-ci est avant tout de vulgariser des concepts qui peuvent sembler obscurs aux néophytes. Vous trouverez des informations bien plus précises sur des sites spécialisés et notamment sur [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_136" class="wp-caption aligncenter" style="width: 310px"><a href="http://blog.onkeysoft.com/wp-content/uploads/2011/10/htc-sensation-xe.jpg"><img class="size-medium wp-image-136" title="htc-sensation-xe" src="http://blog.onkeysoft.com/wp-content/uploads/2011/10/htc-sensation-xe-300x178.jpg" alt="" width="300" height="178" /></a><p class="wp-caption-text">HTC Sensation XE</p></div>
<h2>Introduction</h2>
<p>Ce petit article n’a pas la prétention d’être exempt d’erreurs, il est écrit par un physicien audiophile et non un ingénieur du son. Le but de celui-ci est avant tout de vulgariser des concepts qui peuvent sembler obscurs aux néophytes. Vous trouverez des informations bien plus précises sur des sites spécialisés et notamment sur GenerationMp3.</p>
<p>Le problème avec la mesure de la qualité audio d’un appareil, c’est qu’elle est très subjective. Chacun perçoit la musique de manière différente car nous n’avons pas la même éducation musicale, la même oreille et les mêmes attentes en ce qui concerne la musique. Difficile donc de juger si un son est « bon » ou bien s&#8217;il est « mauvais » . Parler de <em>&#8220;mauvais son&#8221;</em> et de <em>&#8220;bon son&#8221;</em> est un abus de langage, il vaut mieux parler de qualité de la sortie audio, c’est d&#8217;ailleurs le sujet de cet article</p>
<p>Pour les appareils électroniques, on considère que le signal n’est globalement pas abimé en étant stocké, ni même décompressé par le processeur (vers 44100Hz, 16Bit, Stereo). Le principal responsable de l&#8217;altération du signal est le composant DAC (le convertisseur digital vers analogique) qui contient aussi un amplificateur sur ce type d&#8217;appareil.</p>
<blockquote><p>Actuellement sur les Smartphones haut de gamme le son est de bonne qualité, on comparera le son avec un lecteur MP3 IAudio d’excellente facture : le Cowon IAudio 9.</p>
<div id="attachment_134" class="wp-caption aligncenter" style="width: 310px"><a href="http://blog.onkeysoft.com/wp-content/uploads/2011/10/MIIFTRACKPRO_Connectivity2.jpg"><img class="size-medium wp-image-134" title="Fast Track Pro " src="http://blog.onkeysoft.com/wp-content/uploads/2011/10/MIIFTRACKPRO_Connectivity2-300x214.jpg" alt="" width="300" height="214" /></a><p class="wp-caption-text">Fast Track Pro est le système utilisé.</p></div></blockquote>
<div class="mceTemp mceIEcenter">
<p style="text-align: left;">Donc pour juger la qualité d’une sortie audio on cherche à vérifier comment retranscrit le lecteur, un signal que l’on a créé et que l’on connait. Par là j’entends que l’on crée un fichier contenant un signal audio codé en numérique. On lit ce fichier avec le lecteur et en sortie on récupère le signal analogique soit :</p>
<ul>
<li>directement avec la prise jack (20000 Ohm)</li>
<li>avec un casque (ici AKG 32 Ohm) directement avec un microphone de très bonne qualité si l’on veut tenir compte de l&#8217;impédance ajoutée par celui-ci.</li>
</ul>
<p style="text-align: left;">Les tests suivants ont été réalisés à volume maximum ce qui permet d’accentuer la distorsion que l’appareil inflige au signal. En effet, certains lecteurs détériorent grandement le signal à volume max.</p>
<blockquote><p>Pour le test, le casque utilisé est de 32 Ohm, l’intensité est plus importante qu’un casque avec une plus haute impédance. L’amplificateur est plus sollicité donc travaille moins bien. De plus, on pousse le son à fond pour avoir une plus grande intensité. Ces tests sont réalisés par des professionnels. Vous trouverez à la fin de cette article les sources. Le logiciel utilisé est RightMark Audio.</p></blockquote>
<p style="text-align: left;">En comparant le signal donné et le signal que nous renvoit le casque on peut discuter quantitativement de la qualité d’une sortie audio. Les résultats doivent être reproductibles et comparables sinon cela n&#8217;a pas d’intérêt.</p>
<h2 style="text-align: left;">La réponse en fréquence</h2>
<p style="text-align: left;">Cette mesure ne permet pas de dire si le son est agréable, mais uniquement si le son qui sort des écouteurs est le son tel qu’il est enregistré sur le fichier audio. Pour comprendre cette partie, il faut savoir ce qu’est un signal audio. Très rapidement, un signal audio est une information provenant d’un émetteur et attendant un récepteur composé d’une multitude de signaux sinusoïdaux purs avec des fréquences différentes.</p>
<h3>Rappel sur la fréquence :</h3>
<p style="text-align: left;">Une fonction sinusoïdale est décrite par sa phase ϕ (&#8220;<em>décalage par rapport à l&#8217;origine</em>&#8220;), son amplitude Ĝ et sa fréquence (ici pulsation ω). On peut l&#8217;écrire de cette manière.</p>
<p style="text-align: left;"><a href="http://blog.onkeysoft.com/wp-content/uploads/2011/10/676d694b78ade3e5d1e3a3374248bf19.png"><img class="aligncenter size-full wp-image-142" title="676d694b78ade3e5d1e3a3374248bf19" src="http://blog.onkeysoft.com/wp-content/uploads/2011/10/676d694b78ade3e5d1e3a3374248bf19.png" alt="" width="177" height="24" /></a></p>
<blockquote>
<p style="text-align: left;">Ici, ce terme contient toutes les fonctions sinusoïdales, que ce soit un cosinus ou un sinus. Le cosinus étant juste un sinus déphasé. Mais c&#8217;est vrai que l&#8217;on s&#8217;en fiche, continuons&#8230;</p>
</blockquote>
<p style="text-align: left;">Voila deux signaux sinusoïdaux mais de fréquences différentes.</p>
<div id="attachment_144" class="wp-caption aligncenter" style="width: 310px"><a href="http://blog.onkeysoft.com/wp-content/uploads/2011/10/40lx3-frequence.jpg"><img class="size-medium wp-image-144" title="40lx3-frequence" src="http://blog.onkeysoft.com/wp-content/uploads/2011/10/40lx3-frequence-300x182.jpg" alt="" width="300" height="182" /></a><p class="wp-caption-text">Au-dessus fréquence basse (son grave), au-dessous fréquence élevée (son aiguë)</p></div>
<p style="text-align: left;">Un signal quelconque peut être décomposé en une somme de signaux sinusoïdaux. Par exemple : ci-dessous avec le signal audio composé en <strong>noir</strong> qui est en fait la somme pondérée des signaux en <span style="color: #008000;">vert</span>, <span style="color: #ff00ff;">rose</span>, <span style="color: #0000ff;">bleu</span>, <span style="color: #ff0000;">rouge</span> etc… Ainsi notre oreille perçoit le signal comme une somme de signaux sinusoïdaux de fréquences différentes.</p>
<div id="attachment_145" class="wp-caption aligncenter" style="width: 310px"><a href="http://blog.onkeysoft.com/wp-content/uploads/2011/10/400px-Fourier_dun_carr%C3%A9.svg_.png"><img class="size-medium wp-image-145" title="400px-Fourier_d'un_carré.svg" src="http://blog.onkeysoft.com/wp-content/uploads/2011/10/400px-Fourier_dun_carr%C3%A9.svg_-300x300.png" alt="" width="300" height="300" /></a><p class="wp-caption-text">Le signal noir est la somme pondérée des autres signaux...</p></div>
<p>&nbsp;</p>
<blockquote><p><a href="http://blog.onkeysoft.com/wp-content/uploads/2011/10/FFT.png"><img class="aligncenter size-medium wp-image-146" title="FFT" src="http://blog.onkeysoft.com/wp-content/uploads/2011/10/FFT-300x211.png" alt="" width="300" height="211" /></a></p>
<p>Grâce à un outil mathématique appelé &#8220;transformée de Fourier&#8221; on peut décomposer le signal du dessous en une somme de sinus de fréquences différentes avec une intensité différente. C’est ce qu’on voit au-dessus (à chaque pic correspond une intensité particulière pour une certaine fréquence). Plus le pic est grand plus la fréquence correspondante est &#8220;présente&#8221;.</p></blockquote>
<p style="text-align: left;">Revenons à nos moutons, on cherche à déterminer par rapport à un signal envoyé si toutes les fréquences sont bien restituées et dans les mêmes proportions. Si j’envoie un signal « plat »  et que les basses sont plus intenses que les aiguës c’est que le lecteur ne restitue pas correctement le son. C’est mauvais ou alors un équaliseur altère le signal.</p>
<p style="text-align: left;">Les limites de perception de l’oreille humaine se situent entre 20Hz et 20Khz. Mais globalement on se fiche de cette bande passante car la plupart des appareils électroniques sont capables de restituer un signal dans cette gamme de fréquence et puis l’oreille humaine ni verra que du feu même si l’on est entre 30 Hz et 19 KHz. Non ce qui nous intéresse c’est si la restitution est « uniforme ».</p>
<h4 style="text-align: left;">A propos de l&#8217;unité Décibel :</h4>
<p style="text-align: left;">Partout dans le monde, pour mesurer la puissance d’une onde sonore (ou plutôt pour comparer deux puissances) on utilise une unité appelée Décibel. C’est un nom un peu barbare en l’honneur de Mr Bell et inventé par les ingénieurs des laboratoires Bell pour quantifier l’atténuation d’un signal Audio sur une liaison téléphonique. C’est une fonction logarithmique (pourquoi, parce que notre oreille est un récepteur logarithmique !!) de rapport de puissance (ce que l’on envoie par rapport à ce que l’on reçoit). On multiplie enfin par <strong>10</strong> pour avoir une unité plus pratique (d’où le nom <strong>déci</strong>-bel).</p>
<div id="attachment_151" class="wp-caption aligncenter" style="width: 184px"><a href="http://blog.onkeysoft.com/wp-content/uploads/2011/10/b8f61cfcf6de49974ba046af0e41c847.png"><img class="size-full wp-image-151" title="b8f61cfcf6de49974ba046af0e41c847" src="http://blog.onkeysoft.com/wp-content/uploads/2011/10/b8f61cfcf6de49974ba046af0e41c847.png" alt="" width="174" height="44" /></a><p class="wp-caption-text">Gain en décibel, permettant de comparer deux puissances P1 et P0</p></div>
<p style="text-align: left;">Si la puissance du signal de sortie est égale au signal de puissance de l’entrée, le logarithme vaut 0 (en effet log(1)=0) et donc pas d’atténuation. Si la puissance du signal de sortie est 10 fois plus faible (log(10) = 1) donc on aura une atténuation de 10 dB (-10dB) et s’il est 100 fois plus faible -20dB, 1000 fois -30 dB.</p>
<p style="text-align: left;">Pour mesurer la réponse en fréquence on envoie donc un signal et on mesure l’atténuation (ou l’amplification) de certaines fréquences. On note [+ x dB, – y dB].</p>
<p style="text-align: left;"><strong>Exemple :</strong></p>
<div id="attachment_154" class="wp-caption aligncenter" style="width: 310px"><a href="http://blog.onkeysoft.com/wp-content/uploads/2011/10/gsmarena_a001.png"><img class="size-medium wp-image-154" title="gsmarena_a001" src="http://blog.onkeysoft.com/wp-content/uploads/2011/10/gsmarena_a001-300x187.png" alt="" width="300" height="187" /></a><p class="wp-caption-text">Pour le HTC Sensation, directement sur le jack (en blanc) et avec un casque (en vert)</p></div>
<p style="text-align: left;">On s’intéresse d’abord à la courbe blanche. Sur celle-ci nous voyons que la réponse en fréquence est plutôt bonne (attention c’est une échelle logarithmique) entre 40Hz et 15 Khz. +0.05 dB,-0.34dB au bord. Par contre quand on rajoute la résistance du casque c’est un peu moins bon +0.71 dB (pour les basses), -0.15 dB pour les aiguës. Comme on l’a vu c’est normal le courant augmente et l’amplificateur souffre.</p>
<p style="text-align: left;">Voici l’évolution de la réponse en fréquence pour quelques Smartphones :</p>
<table width="407" border="0" cellspacing="0" cellpadding="0">
<colgroup>
<col width="132" />
<col width="92" />
<col width="103" />
<col width="80" /> </colgroup>
<tbody>
<tr>
<td style="text-align: center;" width="132" height="20"><strong>Sans casque</strong></td>
<td style="text-align: center;" width="92"><strong>Réponse en fréquence (dB)</strong></td>
<td width="103"></td>
<td style="text-align: center;" width="80"><strong>Étendue<br />
</strong></td>
</tr>
<tr>
<td height="20">HTC Desire HD</td>
<td>0,09</td>
<td>-0,44</td>
<td>0,53</td>
</tr>
<tr>
<td height="20">HTC Sensation XE</td>
<td>0,05</td>
<td>-0,34</td>
<td>0,39</td>
</tr>
<tr>
<td height="20">Cowon IAudio 9</td>
<td>0,03</td>
<td>-0,16</td>
<td>0,19</td>
</tr>
<tr>
<td height="20">Apple IPhone 4S</td>
<td>0,02</td>
<td>-0,11</td>
<td>0,13</td>
</tr>
<tr>
<td height="20">Samsung Galaxy S II</td>
<td>0,04</td>
<td>-0,09</td>
<td>0,13</td>
</tr>
<tr>
<td height="20">Apple IPhone 4</td>
<td>0,01</td>
<td>-0,07</td>
<td>0,08</td>
</tr>
<tr>
<td height="20">LG Optimus 2X</td>
<td>0,01</td>
<td>-0,03</td>
<td>0,04</td>
</tr>
</tbody>
</table>
<div class="mceTemp mceIEcenter">
<div id="attachment_156" class="wp-caption aligncenter" style="width: 482px"><a href="http://blog.onkeysoft.com/wp-content/uploads/2011/10/etendue.png"><img class="size-full wp-image-156 " title="etendue" src="http://blog.onkeysoft.com/wp-content/uploads/2011/10/etendue.png" alt="" width="472" height="285" /></a><p class="wp-caption-text">Plus l&#39;étendue est faible plus la réponse en fréquence est bonne.  Les HTC sont les moins bons ici.</p></div>
</div>
<p style="text-align: left;">En charge les résultats sont tout de suite différents mais bien plus intéressants :</p>
<table width="407" border="0" cellspacing="0" cellpadding="0">
<colgroup>
<col width="132" />
<col width="92" />
<col width="103" />
<col width="80" /> </colgroup>
<tbody>
<tr>
<td style="text-align: center;" width="132" height="20"><strong>Avec casque</strong></td>
<td style="text-align: center;" width="92"><strong>Réponse en fréquence (dB)</strong></td>
<td width="103"></td>
<td style="text-align: center;" width="80"><strong>Étendue<br />
</strong></td>
</tr>
<tr>
<td height="20">Samsung Galaxy S II</td>
<td>1,05</td>
<td>-0,22</td>
<td>1,27</td>
</tr>
<tr>
<td height="20">HTC Sensation XE</td>
<td>0,71</td>
<td>-0,15</td>
<td>0,86</td>
</tr>
<tr>
<td height="20">HTC Desire HD</td>
<td>0,09</td>
<td>-0,44</td>
<td>0,53</td>
</tr>
<tr>
<td height="20">LG Optimus 2X</td>
<td>0,14</td>
<td>-0,04</td>
<td>0,18</td>
</tr>
<tr>
<td height="20">Apple IPhone 4S</td>
<td>0,05</td>
<td>-0,1</td>
<td>0,15</td>
</tr>
<tr>
<td height="20">Apple IPhone 4</td>
<td>0,01</td>
<td>-0,07</td>
<td>0,08</td>
</tr>
</tbody>
</table>
<div class="mceTemp mceIEcenter">
<div id="attachment_157" class="wp-caption aligncenter" style="width: 482px"><a href="http://blog.onkeysoft.com/wp-content/uploads/2011/10/etendeue-2.png"><img class="size-full wp-image-157 " title="etendeue 2" src="http://blog.onkeysoft.com/wp-content/uploads/2011/10/etendeue-2.png" alt="" width="472" height="266" /></a><p class="wp-caption-text">Le Samsung Galaxy S II est le moins bon. Je suis désolé je n&#39;ai pas de valeur pour le Cowon IAudio 9 avec un casque. Les téléphones d&#39;Apple se comportent très bien !</p></div>
</div>
<h2 style="text-align: left;">Le niveau de bruit :</h2>
<p style="text-align: left;">Quand le son sort de l’appareil celui-ci peut être perturbé par des signaux parasites qui peuvent venir par exemple du champ Électromagnétique environnant (le téléphone communique) si le blindage de l’appareil n’est pas terrible, cela peut venir aussi du processeur etc… (Rendez vous ici pour écouter ce bruit sur le Samsung Galaxy S II <a href="http://soundcloud.com/anandtech/galaxysii-cpu-edge-noise">http://soundcloud.com/anandtech/galaxysii-cpu-edge-noise</a> )<br />
Ici la mesure se fait en dB (A), c&#8217;est l&#8217;unité retenue pour représenter les niveaux sonores en tenant compte de la sensibilité (selon la fréquence) de l’oreille humaine (l&#8217;humain entend moins bien les graves que les aiguës). Alors on fixe comme origine 40 dB au dessus du seuil d&#8217;audibilité. C&#8217;est à dire qu&#8217;à 0 dB(A) on est 40 dB au dessus du seuil où l&#8217;on entend plus rien.</p>
<p style="text-align: left;">On classe ci-dessous  les appareils en fonction de leur niveau de bruit.</p>
<table width="224" border="0" cellspacing="0" cellpadding="0">
<colgroup>
<col width="132" />
<col width="92" /> </colgroup>
<tbody>
<tr>
<td style="text-align: center;" width="132" height="20"><strong>Sans casque</strong></td>
<td style="text-align: center;" width="92"><strong>Noise Level (dB(A))</strong></td>
</tr>
<tr>
<td height="20">Samsung Galaxy S II</td>
<td align="right">-91,4</td>
</tr>
<tr>
<td height="20">Apple IPhone 4S</td>
<td align="right">-91,2</td>
</tr>
<tr>
<td height="20">HTC Desire HD</td>
<td align="right">-90,6</td>
</tr>
<tr>
<td height="20">Cowon IAudio 9</td>
<td align="right">-90,5</td>
</tr>
<tr>
<td height="20">HTC Sensation XE</td>
<td align="right">-90,2</td>
</tr>
<tr>
<td height="20">Apple IPhone 4</td>
<td align="right">-90,1</td>
</tr>
<tr>
<td height="20">LG Optimus 2X</td>
<td align="right">-90,1</td>
</tr>
</tbody>
</table>
<div id="attachment_161" class="wp-caption aligncenter" style="width: 411px"><a href="http://blog.onkeysoft.com/wp-content/uploads/2011/10/niv-bruit.png"><img class="size-full wp-image-161 " title="niv bruit" src="http://blog.onkeysoft.com/wp-content/uploads/2011/10/niv-bruit.png" alt="" width="401" height="259" /></a><p class="wp-caption-text">Le Samsung Galaxy S II est ici le meilleur dans cette catégorie en tout cas sans charge. C&#39;est à dire sans casque.</p></div>
<table width="224" border="0" cellspacing="0" cellpadding="0">
<colgroup>
<col width="132" />
<col width="92" /> </colgroup>
<tbody>
<tr>
<td style="text-align: center;" width="132" height="20"><strong>Sans casque</strong></td>
<td style="text-align: center;" width="92"><strong>Noise Level (dB(A))</strong></td>
</tr>
<tr>
<td height="20">HTC Desire HD</td>
<td align="right">-93,2</td>
</tr>
<tr>
<td height="20">Apple IPhone 4S</td>
<td align="right">-91,3</td>
</tr>
<tr>
<td height="20">Apple IPhone 4</td>
<td align="right">-90,4</td>
</tr>
<tr>
<td height="20">Samsung Galaxy S II</td>
<td align="right">-90</td>
</tr>
<tr>
<td height="20">LG Optimus 2X</td>
<td align="right">-89,8</td>
</tr>
<tr>
<td height="20">HTC Sensation XE</td>
<td align="right">-89,1</td>
</tr>
</tbody>
</table>
<div id="attachment_165" class="wp-caption aligncenter" style="width: 461px"><a href="http://blog.onkeysoft.com/wp-content/uploads/2011/10/niv-bruit2.png"><img class="size-full wp-image-165 " title="niv bruit2" src="http://blog.onkeysoft.com/wp-content/uploads/2011/10/niv-bruit2.png" alt="" width="451" height="274" /></a><p class="wp-caption-text">Le HTC desire HD est roi. Et le HTC Sensation XE le moins bon.</p></div>
<p style="text-align: left;">Je tiens à modérer ces résultats, soyons honnêtes le HTC Sensation XE à un rapport signal bruit de -89 dB ce qui signifie que le bruit est 77 000 fois trop faible pour être entendu par l&#8217;être humain. Pour le Desire HD, c&#8217;est 200 000 fois&#8230;</p>
<h2 style="text-align: left;">La gamme dynamique :</h2>
<p style="text-align: left;">C’est la capacité qu’a un appareil à reproduire en même temps un son peu intense et très intense. Pour éviter la triche, on mesure uniquement les signaux qui ne subissent pas de distorsion (grossièrement de déformation). Par exemple si un appareil est capable de produire des sons pour une fréquence donnée de 9 dB(A) à 1 dB(A), la gamme dynamique vaut 8 dB(A). Plus cette gamme (dynamic range) est grande et mieux c’est !</p>
<table width="384" border="0" cellspacing="0" cellpadding="0">
<colgroup>
<col width="264" />
<col width="120" /> </colgroup>
<tbody>
<tr>
<td style="text-align: center;" width="264" height="21"><strong>Nom</strong></td>
<td style="text-align: center;" width="120"><strong>Dynamic Range (dB(A))</strong></td>
</tr>
<tr>
<td width="264" height="21">HTC Desire HD (Casque)</td>
<td align="right" width="120">92,90</td>
</tr>
<tr>
<td width="264" height="21">Samsung Galaxy S II</td>
<td align="right" width="120">91,90</td>
</tr>
<tr>
<td width="264" height="21">Apple iPhone 4S (Casque)</td>
<td align="right" width="120">91,30</td>
</tr>
<tr>
<td width="264" height="21">Apple iPhone 4S</td>
<td align="right" width="120">91,20</td>
</tr>
<tr>
<td width="264" height="21">Cowon Iaudio 9</td>
<td align="right" width="120">90,50</td>
</tr>
<tr>
<td width="264" height="21">Apple iPhone 4 (Casque)</td>
<td align="right" width="120">90,40</td>
</tr>
<tr>
<td width="264" height="21">HTC Desire HD</td>
<td align="right" width="120">90,40</td>
</tr>
<tr>
<td width="264" height="21">Samsung Galaxy S II (Casque)</td>
<td align="right" width="120">90,20</td>
</tr>
<tr>
<td width="264" height="21">HTC Sensation</td>
<td align="right" width="120">90,20</td>
</tr>
<tr>
<td width="264" height="21">HTC Sensation (Casque)</td>
<td align="right" width="120">90,10</td>
</tr>
<tr>
<td width="264" height="21">LG Optimus 2X</td>
<td align="right" width="120">90,10</td>
</tr>
<tr>
<td width="264" height="21">Apple iPhone 4</td>
<td align="right" width="120">90,00</td>
</tr>
<tr>
<td width="264" height="20">LG Optimus 2X (Casque)</td>
<td align="right" width="120">89,90</td>
</tr>
</tbody>
</table>
<div id="attachment_168" class="wp-caption aligncenter" style="width: 480px"><a href="http://blog.onkeysoft.com/wp-content/uploads/2011/10/Gamme-dynamique1.png"><img class="size-full wp-image-168 " title="Gamme dynamique" src="http://blog.onkeysoft.com/wp-content/uploads/2011/10/Gamme-dynamique1.png" alt="" width="470" height="368" /></a><p class="wp-caption-text">Avec un casque le HTC Desire HD est encore une fois le meilleur suivi des IPhone et du Samsung. Le HTC Sensation semble à la traine...</p></div>
<h2 style="text-align: left;">Le taux de distorsion harmonique :</h2>
<p style="text-align: left;">La distorsion harmonique, notée THD est une spécificité des amplificateurs (ou préamplificateurs). Comme nous l’avons vu tout à l’heure on peut décomposer n’importe quel signal audio sous forme de signaux sinusoïdaux. Le signal prépondérant est le fondamental (ce signal donne la hauteur de la note), les autres les harmoniques (elles donnent le timbre, la note LA du piano ne s&#8217;entend pas comme le LA d&#8217;une clarinette). En fait plus la quantité d’harmoniques est grande plus le signal est précis :</p>
<div id="attachment_172" class="wp-caption aligncenter" style="width: 482px"><a href="http://blog.onkeysoft.com/wp-content/uploads/2011/10/Synthesis_square.gif"><img class="size-full wp-image-172" title="Synthesis_square" src="http://blog.onkeysoft.com/wp-content/uploads/2011/10/Synthesis_square.gif" alt="" width="472" height="200" /></a><p class="wp-caption-text">Plus le nombre d&#39;harmoniques augmente plus le signal reconstitué est proche du signal carré.</p></div>
<p style="text-align: left;">Pour conclure le taux de distorsion harmonique est le résultat d’un calcul mathématique ayant pour but de comparer le signal de sortie (ce qui sort du jack) et le signal d’entrée (le fichier audio). Plus ce taux est important plus la différence est importante et donc plus l’amplificateur est médiocre.</p>
<table width="384" border="0" cellspacing="0" cellpadding="0">
<colgroup>
<col width="264" />
<col width="120" /> </colgroup>
<tbody>
<tr>
<td style="text-align: center;" width="264" height="21"><strong>Nom</strong></td>
<td style="text-align: center;" width="120"><strong>THD (%)</strong></td>
</tr>
<tr>
<td width="264" height="21">Apple iPhone 4S</td>
<td align="right" width="120">0,002</td>
</tr>
<tr>
<td width="264" height="21">Apple iPhone 4 (Casque)</td>
<td align="right" width="120">0,0036</td>
</tr>
<tr>
<td width="264" height="21">Samsung Galaxy S II</td>
<td align="right" width="120">0,0042</td>
</tr>
<tr>
<td width="264" height="21">Cowon Iaudio 9</td>
<td align="right">0,0048</td>
</tr>
<tr>
<td width="264" height="21">Apple iPhone 4S (Casque)</td>
<td align="right" width="120">0,0068</td>
</tr>
<tr>
<td width="264" height="21">Apple iPhone 4</td>
<td align="right" width="120">0,0068</td>
</tr>
<tr>
<td width="264" height="21">LG Optimus 2X (Casque)</td>
<td align="right" width="120">0,0098</td>
</tr>
<tr>
<td width="264" height="21">LG Optimus 2X</td>
<td align="right" width="120">0,011</td>
</tr>
<tr>
<td width="264" height="21">HTC Sensation</td>
<td align="right" width="120">0,012</td>
</tr>
<tr>
<td width="264" height="21">Samsung Galaxy S II (Casque)</td>
<td align="right" width="120">0,013</td>
</tr>
<tr>
<td width="264" height="21">HTC Desire HD</td>
<td align="right" width="120">0,014</td>
</tr>
<tr>
<td width="264" height="21">HTC Sensation (Casque)</td>
<td align="right" width="120">0,019</td>
</tr>
<tr>
<td width="264" height="20">HTC Desire HD (Casque)</td>
<td align="right" width="120">0,02</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<div id="attachment_170" class="wp-caption aligncenter" style="width: 528px"><a href="http://blog.onkeysoft.com/wp-content/uploads/2011/10/Gamme-dynamique2.png"><img class="size-full wp-image-170 " title="Distorsion Harmonique" src="http://blog.onkeysoft.com/wp-content/uploads/2011/10/Gamme-dynamique2.png" alt="" width="518" height="358" /></a><p class="wp-caption-text">On remarque que cette fois ci le Desire HD est en retrait en ayant le plus haut THD. Le HTC Sensation ne brille toujours pas. Par contre les IPhones sont vraiment bons.</p></div>
<h2 style="text-align: left;">Distorsion d&#8217;intermodulation + bruit :</h2>
<p style="text-align: left;">C’est un phénomène complexe qui est la conséquence de la non linéarité du DAC. Si on a un signal avec deux fréquences différentes en entrée nous n’obtenons pas deux fréquences en sortie mais une multitude de signaux. Au premier ordre on voit bien ci-dessous deux pics secondaires en plus des deux pics de base ) gauche et à droite.</p>
<p><a href="http://blog.onkeysoft.com/wp-content/uploads/2011/10/783px-RF_Intermodulation_at_280_MHz.jpg"><img class="aligncenter size-medium wp-image-173" title="783px-RF_Intermodulation_at_280_MHz" src="http://blog.onkeysoft.com/wp-content/uploads/2011/10/783px-RF_Intermodulation_at_280_MHz-300x229.jpg" alt="" width="300" height="229" /></a></p>
<p style="text-align: left;">C’est ce phénomène qui est mesuré par l&#8217;IMD. Plus ce nombre est faible moins la distorsion est importante, mieux c’est.</p>
<table width="384" border="0" cellspacing="0" cellpadding="0">
<colgroup>
<col width="264" />
<col width="120" /> </colgroup>
<tbody>
<tr>
<td style="text-align: center;" width="264" height="21"><strong>Nom</strong></td>
<td style="text-align: center;" width="120"><strong>IMD (%)</strong></td>
</tr>
<tr>
<td width="264" height="21">Cowon Iaudio 9</td>
<td align="right">0,0094</td>
</tr>
<tr>
<td width="264" height="21">Apple iPhone 4S</td>
<td align="right" width="120">0,012</td>
</tr>
<tr>
<td width="264" height="21">Apple iPhone 4</td>
<td align="right" width="120">0,012</td>
</tr>
<tr>
<td width="264" height="21">LG Optimus 2X</td>
<td align="right" width="120">0,016</td>
</tr>
<tr>
<td width="264" height="21">HTC Sensation</td>
<td align="right" width="120">0,021</td>
</tr>
<tr>
<td width="264" height="21">Samsung Galaxy S II</td>
<td align="right" width="120">0,066</td>
</tr>
<tr>
<td width="264" height="21">Apple iPhone 4S (Casque)</td>
<td align="right" width="120">0,071</td>
</tr>
<tr>
<td width="264" height="21">Apple iPhone 4 (Casque)</td>
<td align="right" width="120">0,092</td>
</tr>
<tr>
<td width="264" height="21">LG Optimus 2X (Casque)</td>
<td align="right" width="120">0,111</td>
</tr>
<tr>
<td width="264" height="21">HTC Desire HD</td>
<td align="right" width="120">0,517</td>
</tr>
<tr>
<td width="264" height="21">HTC Sensation (Casque)</td>
<td align="right" width="120">0,522</td>
</tr>
<tr>
<td width="264" height="21">Samsung Galaxy S II (Casque)</td>
<td align="right" width="120">0,647</td>
</tr>
<tr>
<td width="264" height="20">HTC Desire HD (Casque)</td>
<td align="right" width="120">0,728</td>
</tr>
</tbody>
</table>
</div>
<div class="mceTemp mceIEcenter">
<div id="attachment_174" class="wp-caption aligncenter" style="width: 490px"><a href="http://blog.onkeysoft.com/wp-content/uploads/2011/10/Gamme-dynamique3.png"><img class="size-full wp-image-174 " title="Dispersion intermodale" src="http://blog.onkeysoft.com/wp-content/uploads/2011/10/Gamme-dynamique3.png" alt="" width="480" height="318" /></a><p class="wp-caption-text">Le HTC Desire HD a encore de grandes difficultés ici. Le Samsung Galaxy S II galère aussi (c&#39;est relatif). L&#39;IPhone 4 est encore une fois très très bon.</p></div>
</div>
<div class="mceTemp mceIEcenter">
<h2 style="text-align: left;">Diaphonie Stéréo :</h2>
<p style="text-align: left;">Si on envoie un signal dans l&#8217;oreille droite. Le signal passe t’il aussi à gauche ? Et bien oui ! On compare dans ce test la puissance du signal à gauche par rapport à celui à droite. Plus ce rapport est faible, plus la stéréo est bonne !</p>
<table width="384" border="0" cellspacing="0" cellpadding="0">
<colgroup>
<col width="264" />
<col width="120" /> </colgroup>
<tbody>
<tr>
<td style="text-align: center;" width="264" height="21"><strong>Nom</strong></td>
<td style="text-align: center;" width="120"><strong>Stereo crosstalk (dB)</strong></td>
</tr>
<tr>
<td width="264" height="21">Apple iPhone 4S</td>
<td align="right" width="120">-93</td>
</tr>
<tr>
<td width="264" height="21">HTC Desire HD</td>
<td align="right" width="120">-92,6</td>
</tr>
<tr>
<td width="264" height="21">HTC Sensation</td>
<td align="right" width="120">-91,1</td>
</tr>
<tr>
<td height="21">Cowon Iaudio 9</td>
<td align="right">-90,3</td>
</tr>
<tr>
<td width="264" height="21">Samsung Galaxy S II</td>
<td align="right" width="120">-89,7</td>
</tr>
<tr>
<td width="264" height="21">Apple iPhone 4</td>
<td align="right" width="120">-89,6</td>
</tr>
<tr>
<td width="264" height="21">LG Optimus 2X</td>
<td align="right" width="120">-89,2</td>
</tr>
<tr>
<td width="264" height="21">HTC Sensation (Casque)</td>
<td align="right" width="120">-70,6</td>
</tr>
<tr>
<td width="264" height="21">Apple iPhone 4 (Casque)</td>
<td align="right" width="120">-68,4</td>
</tr>
<tr>
<td width="264" height="21">Apple iPhone 4S (Casque)</td>
<td align="right" width="120">-66,7</td>
</tr>
<tr>
<td width="264" height="21">Samsung Galaxy S II (Casque)</td>
<td align="right" width="120">-49,4</td>
</tr>
<tr>
<td width="264" height="21">LG Optimus 2X (Casque)</td>
<td align="right" width="120">-35,1</td>
</tr>
<tr>
<td width="264" height="20">HTC Desire HD (Casque)</td>
<td align="right" width="120">-17,9</td>
</tr>
</tbody>
</table>
</div>
<div class="mceTemp mceIEcenter" style="text-align: left;">
<dl id="attachment_176" class="wp-caption aligncenter" style="width: 487px;">
<dt class="wp-caption-dt"><a href="http://blog.onkeysoft.com/wp-content/uploads/2011/10/Gamme-dynamique4.png"><img class="size-full wp-image-176 " title="Stereo Crosstalk" src="http://blog.onkeysoft.com/wp-content/uploads/2011/10/Gamme-dynamique4.png" alt="" width="477" height="438" /></a></dt>
<dd class="wp-caption-dd">Le HTC Sensation est une fois n&#8217;est pas coutume devant tout les autres ! Le HTC Desire HD par contre est bien plus mauvais. Le Samsung Galaxy S II est aussi en retrait.</dd>
</dl>
</div>
<div class="mceTemp mceIEcenter" style="text-align: left;">
<h2>Conclusion</h2>
<p>Pour finir comparons deux smartphones haut de gamme avec trois appareils (sans casque) :</p>
<ul>
<li>La Nintendo DS Lite réputée pour avoir un son très mauvais.</li>
<li>Le lecteur Mini Disc Sony MZ-R3 représentant le haut de gamme&#8230; Il y a 15 ans.</li>
<li>Le Cowon IAudio 9, un excellent lecteur contemporain.</li>
</ul>
<table width="641" border="0" cellspacing="0" cellpadding="0">
<colgroup>
<col width="122" />
<col span="2" width="80" />
<col width="119" />
<col span="3" width="80" /> </colgroup>
<tbody>
<tr>
<td width="122" height="21"></td>
<td width="80">Etendue réponse en Fréquence (dB)</td>
<td width="80">Noise level (dB(A))</td>
<td width="119">Dynamic Range (dB(A))</td>
<td width="80">THD (%)</td>
<td width="80">IMD + Noise (%)</td>
<td width="80">Stereo CrossTalk (dB)</td>
</tr>
<tr>
<td height="21">Sensation</td>
<td align="right">0,39</td>
<td align="right">-90,2</td>
<td align="right">90,2</td>
<td align="right">0,012</td>
<td align="right">0,021</td>
<td align="right">-91,1</td>
</tr>
<tr>
<td height="21">IPhone 4S</td>
<td align="right">0,13</td>
<td align="right">-91,2</td>
<td align="right">91,2</td>
<td align="right">0,002</td>
<td align="right">0,012</td>
<td align="right">-93</td>
</tr>
<tr>
<td height="21">Nintendo DS Lite</td>
<td align="right">8,78</td>
<td align="right">-66</td>
<td align="right">64,5</td>
<td align="right">1,8</td>
<td align="right">3,836</td>
<td align="right">-69,1</td>
</tr>
<tr>
<td height="21">Mini Disc Sony MZ-R3</td>
<td align="right">1</td>
<td align="right">-86</td>
<td align="right">86,1</td>
<td align="right">1,658</td>
<td align="right">2,128</td>
<td align="right">-67,1</td>
</tr>
<tr>
<td height="21">Cowon Iaudio 9</td>
<td align="right">0,12</td>
<td align="right">-79</td>
<td align="right">79</td>
<td align="right">0,0058</td>
<td align="right">0,032</td>
<td align="right">-79,4</td>
</tr>
</tbody>
</table>
<div id="attachment_183" class="wp-caption aligncenter" style="width: 605px"><a href="http://blog.onkeysoft.com/wp-content/uploads/2011/10/Comparaison1.png"><img class="size-full wp-image-183 " title="Comparaison" src="http://blog.onkeysoft.com/wp-content/uploads/2011/10/Comparaison1.png" alt="" width="595" height="354" /></a><p class="wp-caption-text">Comparaison de deux smartphones avec trois autres appareils. Les unités sont modifiées pour être représentées sur le même graphique.</p></div>
<p>On voit sur ce graphique que relativement à la DS et au MiniDisc, les smartphones et le lecteur MP3 sont relativement proches. Globalement la qualité audio est là et je doute que l’oreille humaine avec un casque à moins de 500 € puisse y voir quelque chose. Ce n’est pas avec les écouteurs Beats de Dr. Dre que l’on verra une différence flagrante.</p>
<p>On a vu que la qualité Audio évolue avec l’impédance du casque. Plus l’impédance est faible, plus l&#8217;ampli abime le signal.</p>
<p>Comme je l’expliquais en introduction, la qualité audio dépend beaucoup de chacun et l&#8217;objectif principal est de se faire plaisir. Ce matériel n&#8217;est de toute manière pas adapté aux professionnels et il n&#8217;a même pas été conçu pour ça. Vous pouvez adapter le signal à vos goûts : si vous aimez les basses vous pouvez régler l’équaliseur en conséquence (c’est d’ailleurs ce que fait la technologie Beats de HTC) ou acheter des écouteurs favorisant les basses.</p>
<p>La qualité audio dépend aussi de beaucoup d&#8217;autres éléments que nous n&#8217;avons pas pris en compte, par exemple :</p>
<ul>
<li>Écoutez vous la musique dans un endroit bruyant ? Si vous êtes dans le métro, mais avec un casque très isolant, le bruit extérieur sera audible. Le Noise Level avec ses -80 dB(A) semble ridicule à côté&#8230;</li>
<li>Que vaut votre casque ? Si votre casque force sur les basses, la réponse en fréquence sera totalement différente&#8230;</li>
<li>Quelle est la qualité de vos fichiers musicaux ? Peut être écoutez vous du streaming ? La compression est souvent destructrice (lossy).</li>
<li>Avez vous une très bonne oreille ? Plus on vieillit, malheureusement, plus notre oreille perd en sensibilité. C&#8217;est un fait&#8230;</li>
<li><em>etc</em>&#8230;</li>
</ul>
<p>L&#8217;autre question à se poser est : êtes vous un puriste ?</p>
<ul>
<li>Avez vous un casque valant plusieurs centaines d&#8217;euros ou des intras à 500 € et un MP3 d&#8217;une très grand marque (souvent cher et moche <em>&#8216;Je rigole&#8217;</em>) ?</li>
<li>Écoutez vous constamment de la musique compressée en FLAC (lossless) et avez vous mis tout vos MP3 (lossy) à la corbeille ?</li>
</ul>
<p>Peut être que la qualité audio n&#8217;est pas l&#8217;élément principal à prendre en compte lors de l&#8217;achat de votre smartphone vu le peu de différences entre-eux. En tout cas cela ne semble pas être une question prépondérante lors de l&#8217;achat d&#8217;un téléphone.</p>
<h3>Sources :</h3>
<p><a href="http://www.gsmarena.com">GSMArena</a></p>
<p><a href="http://stereos.about.com/">About Stereos</a></p>
<p><a href="http://www.wikipedia.com">Wikipedia</a></p>
<p><a href="http://www.engadget.com">Engadget</a></p>
<p><a href="http://rmaa.elektrokrishna.com/">ElectroKrishna</a></p>
<p><a href="http://www.anandtech.com">ArnandTech</a></p>
<h2>Remarques :</h2>
<p>Si vous avez des remarques n&#8217;hésitez pas, je suis toujours à l&#8217;écoute. Je suis audiophile mais pas professionnel, les informations présentes ici sont donc à remettre dans leur contexte.</p>
<blockquote>
<p style="text-align: center;">Rémi MEVAERE</p>
</blockquote>
<p><img class="alignnone" title="Creative Commons" src="http://www.tetedequenelle.fr/wp-content/uploads/2009/06/cclogolarge1-300x71.png" alt="" width="153" height="36" /></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.onkeysoft.com/2011/10/23/qualite-audio-des-smartphones-en-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cours particuliers sur Lille</title>
		<link>http://blog.onkeysoft.com/2011/08/05/cours-particuliers-sur-lille/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=cours-particuliers-sur-lille</link>
		<comments>http://blog.onkeysoft.com/2011/08/05/cours-particuliers-sur-lille/#comments</comments>
		<pubDate>Fri, 05 Aug 2011 15:07:34 +0000</pubDate>
		<dc:creator>remixtech</dc:creator>
				<category><![CDATA[Etrangetés]]></category>

		<guid isPermaLink="false">http://blog.onkeysoft.com/?p=128</guid>
		<description><![CDATA[Vous cherchez un soutien en Mathématiques, en Physique ou en Chimie pour vous ou votre enfant sur Lille ? Vous trouverez sur le site suivant toutes les informations pour préparer votre future réussite. Mais aussi une banque de données, des informations sur le CESU, des documents me concernant et quelques conseils dans les matières que j’enseigne [...]]]></description>
			<content:encoded><![CDATA[<p>Vous cherchez un soutien en Mathématiques, en Physique ou en Chimie pour vous ou votre enfant sur Lille ? Vous trouverez sur le site suivant toutes les informations pour préparer votre future réussite. Mais aussi une banque de données, des informations sur le CESU, des documents me concernant et quelques conseils dans les matières que j’enseigne : Mathématiques, Physique, Chimie.</p>
<p style="text-align: center;"><a title="Cours particuliers sur Lille, Mathématiques, Physique, Chimie" href="http://www.coursparticuliers-lille.fr" target="_blank">http://www.coursparticuliers-lille.fr</a></p>
<p style="text-align: center;">
]]></content:encoded>
			<wfw:commentRss>http://blog.onkeysoft.com/2011/08/05/cours-particuliers-sur-lille/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Detecting a Delphi executable, DVCLAL, Manifest and PackageInfo</title>
		<link>http://blog.onkeysoft.com/2011/06/07/detecting-a-delphi-executable-dvclal-manifest-and-packageinfo/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=detecting-a-delphi-executable-dvclal-manifest-and-packageinfo</link>
		<comments>http://blog.onkeysoft.com/2011/06/07/detecting-a-delphi-executable-dvclal-manifest-and-packageinfo/#comments</comments>
		<pubDate>Tue, 07 Jun 2011 12:09:21 +0000</pubDate>
		<dc:creator>remixtech</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Delphi]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[delphi]]></category>
		<category><![CDATA[detection delphi]]></category>
		<category><![CDATA[DVCLAL]]></category>
		<category><![CDATA[manifest]]></category>
		<category><![CDATA[packageinfo]]></category>

		<guid isPermaLink="false">http://blog.onkeysoft.com/?p=119</guid>
		<description><![CDATA[I will try to improve my English in this post. I understand that I must work on it! In this post I will try to expose several ways to detect a Delphi application. First Part DVCLAL and licensing information Yesterday I was asking me a question. What information could we extract from a Delphi executable [...]]]></description>
			<content:encoded><![CDATA[<p>I will try to improve my English in this post. I understand that I must work on it! In this post I will try to expose several ways to detect a Delphi application.</p>
<h1>First Part DVCLAL and licensing information</h1>
<p>Yesterday I was asking me a question. What information could we extract from a Delphi executable about the compiler, the license and all these things?</p>
<p>First thing I done was just compiling a simple application form (Delphi XE) and watch if there is something in it.</p>
<p>I have three Executable:</p>
<ol>
<li>With a valid license</li>
<li>With the same valid license</li>
<li>With another valid license from a friend</li>
<li>Without license</li>
</ol>
<p><strong><span style="text-decoration: underline;">MD5</span></strong></p>
<ol>
<li>aa937b519d3dc7748658339d74beab71</li>
<li>3a052680d1baa16b53a7376e94d88bb6</li>
<li>eb66631ce3aa2ab2bfeb27779164dfa1</li>
<li>35f29fbcbf468dc1a683f742893d54b1</li>
</ol>
<p>The files are different, even the first and second (which are compiled with the same license in less than 2 minutes). Something is added in the file, like a date or a time.</p>
<p><strong><span style="text-decoration: underline;">DVCLAL – Resource Name for RC_DATA</span></strong></p>
<ol>
<li>000DEF00  26 3D 4F 38 C2 82 37 B8 F3 24 42 03 17 9B 3A      &amp;=O8Â‚7¸ó$B••›:</li>
<li>000DEF00  26 3D 4F 38 C2 82 37 B8 F3 24 42 03 17 9B 3A      &amp;=O8Â‚7¸ó$B••›:</li>
<li>000DEF00  26 3D 4F 38 C2 82 37 B8 F3 24 42 03 17 9B 3A      &amp;=O8Â‚7¸ó$B••›:</li>
<li>000DEF00  26 3D 4F 38 C2 82 37 B8 F3 24 42 03 17 9B 3A      &amp;=O8Â‚7¸ó$B••›:</li>
</ol>
<p>DVCLAL (Delphi Visual Component Library Access License) are the same for the three files, this is pretty strange.</p>
<p><a href="http://blog.onkeysoft.com/wp-content/uploads/2011/06/DVCLAL.png"><a href="http://blog.onkeysoft.com/wp-content/uploads/2011/06/DVCLAL.png"><img class="aligncenter size-full wp-image-120" title="DVCLAL" src="http://blog.onkeysoft.com/wp-content/uploads/2011/06/DVCLAL.png" alt="" width="546" height="170" /></a></a></p>
<p>To detect the change between file I am using the command line tool “compare” included in Windows. So as you can see the differences between file are exactly at the same offset and are equal. It is unbelievable to store huge license information in 16 bytes (word) or 32 bytes (dword).</p>
<p>In green this is the beginning of the executable (low offset). In MSDN documentation you can find info about PE (Portable Header which is the structure of executable files).</p>
<p>If we open it in Hex Edit.</p>
<p><a href="http://blog.onkeysoft.com/wp-content/uploads/2011/06/hexedit.png"><img class="aligncenter size-full wp-image-121" title="hexedit" src="http://blog.onkeysoft.com/wp-content/uploads/2011/06/hexedit.png" alt="" width="687" height="38" /></a></p>
<p>The PE chars follow by two null values are signature of the beginning of the executable. After that we have IMAGE_FILE_HEADER.</p>
<blockquote><p><strong>Syntax</strong></p>
<p>typedef struct _IMAGE_FILE_HEADER {</p>
<p>WORD  Machine;</p>
<p>WORD  NumberOfSections;</p>
<p>DWORD TimeDateStamp;</p>
<p>DWORD PointerToSymbolTable;</p>
<p>DWORD NumberOfSymbols;</p>
<p>WORD  SizeOfOptionalHeader;</p>
<p>WORD  Characteristics;</p>
<p>} IMAGE_FILE_HEADER, *PIMAGE_FILE_HEADER;</p></blockquote>
<p>&nbsp;</p>
<p>We have in HexEdit the first word which is 4C01, and the second one NumberOfSections 0A00. The DatetimeStamp is 14DEE84D. Clearly it’s the time information of the build.</p>
<blockquote><p>&nbsp;</p>
<p><strong>TimeDateStamp</strong></p>
<p>The low 32 bits of the time stamp of the image. This represents the date and time the image was created by the linker. The value is represented in the number of seconds elapsed since midnight (00:00:00), January 1, 1970, Universal Coordinated Time, according to the system clock.</p></blockquote>
<p>So let’s return to DVCLAL, and see when it is used by Delphi. So I search the string DVCLAL in Embarcadero folder. And the only file which is return is Sysutils.pas. (For copyright reasons I can’t share the code of the function in Delphi main pascal files)</p>
<p>The ALR function returns a pointer handle that can be used to obtain a pointer to the first byte of the specified resource in memory. Here the string DVCLAL.<br />
The GDAL function is testing the value of the DVCLAL and if there is a problem, the exe raise an exception.</p>
<p>The RPR function is testing the validity of DVCLAL and if there is a problem, raises an exception.</p>
<p>I don’t know if RPR is used in the last version of Delphi but in older version, when the exe was loading module he was launching the procedure RPR.</p>
<p>So in conclusion, just understand that DVCLAL is one way to detect Delphi app, but it is not secure, you could easily delete this value and nothing will appear.</p>
<h1>Manifest file attached to the executable and PackageInfo</h1>
<p>In the RC_DATA resource of Delphi executable you could find a Resource named PackageInfo. You will find more information in sysutils.pas. (Function GetPackageInfo)</p>
<blockquote><p>A variable of type <strong>PackageInfoTable</strong> provides information about initializing or finalizing a series of package units.</p></blockquote>
<p>The manifest file is in the resource type RC_Manifest with the name 1036 could help you to detect if the compiler is Delphi. (CodeGear Rad Studio in Assembly Name)</p>
<p><a href="http://blog.onkeysoft.com/wp-content/uploads/2011/06/ResHacker.png"><img src="http://blog.onkeysoft.com/wp-content/uploads/2011/06/ResHacker.png" alt="" title="ResHacker" width="453" height="358" class="aligncenter size-full wp-image-124" /></a></p>
<pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;yes&quot;?&gt;
&lt;assembly xmlns=&quot;urn:schemas-microsoft-com:asm.v1&quot; manifestVersion=&quot;1.0&quot;&gt;
  &lt;assemblyIdentity
    type=&quot;win32&quot;
    name=&quot;CodeGear RAD Studio&quot;
    version=&quot;15.0.3953.35171&quot;
    processorArchitecture=&quot;*&quot;/&gt;
  &lt;dependency&gt;
    &lt;dependentAssembly&gt;
      &lt;assemblyIdentity
        type=&quot;win32&quot;
        name=&quot;Microsoft.Windows.Common-Controls&quot;
        version=&quot;6.0.0.0&quot;
        publicKeyToken=&quot;6595b64144ccf1df&quot;
        language=&quot;*&quot;
        processorArchitecture=&quot;*&quot;/&gt;
    &lt;/dependentAssembly&gt;
  &lt;/dependency&gt;
  &lt;trustInfo xmlns=&quot;urn:schemas-microsoft-com:asm.v3&quot;&gt;
    &lt;security&gt;
      &lt;requestedPrivileges&gt;
        &lt;requestedExecutionLevel
          level=&quot;asInvoker&quot;
          uiAccess=&quot;false&quot;/&gt;
        &lt;/requestedPrivileges&gt;
    &lt;/security&gt;
  &lt;/trustInfo&gt;
&lt;/assembly&gt;
 </pre>
<p>So I hope it will help you if you need to detect Delphi application. But the Application could be crypt, the resource could be easily modified and the DVCLAL deleted.</p>
<p>Have a nice day <img src='http://blog.onkeysoft.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.onkeysoft.com/2011/06/07/detecting-a-delphi-executable-dvclal-manifest-and-packageinfo/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Listing, Adding, Editing, Deleting resources of EXE, DLL &#8230; Using Win32 API with Delphi</title>
		<link>http://blog.onkeysoft.com/2011/06/03/listing-adding-editing-deleting-resources-of-exe-dll-using-win32-api-with-delphi/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=listing-adding-editing-deleting-resources-of-exe-dll-using-win32-api-with-delphi</link>
		<comments>http://blog.onkeysoft.com/2011/06/03/listing-adding-editing-deleting-resources-of-exe-dll-using-win32-api-with-delphi/#comments</comments>
		<pubDate>Fri, 03 Jun 2011 00:39:52 +0000</pubDate>
		<dc:creator>remixtech</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Delphi]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[BeginUpdateReSource]]></category>
		<category><![CDATA[delphi]]></category>
		<category><![CDATA[DLL]]></category>
		<category><![CDATA[EndUpdateReSource]]></category>
		<category><![CDATA[EnumResNameProc]]></category>
		<category><![CDATA[EnumResourceTypes]]></category>
		<category><![CDATA[EXE]]></category>
		<category><![CDATA[LoadLibraryEx]]></category>
		<category><![CDATA[resource]]></category>
		<category><![CDATA[resourcetype]]></category>
		<category><![CDATA[UpdateResource]]></category>
		<category><![CDATA[Win32 Api]]></category>

		<guid isPermaLink="false">http://blog.onkeysoft.com/?p=107</guid>
		<description><![CDATA[Introduction Today, I tried to work with resources included in a File. The file is an executable like DLL or EXE. There are some useful functions in the Win32 API that could help us, you don&#8217;t need to fully understand PE_FILE and how work an executable to change the resources. I would like to show [...]]]></description>
			<content:encoded><![CDATA[<h2>Introduction</h2>
<p>Today, I tried to work with resources included in a File. The file is an executable like DLL or EXE. There are some useful functions in the Win32 API that could help us, you don&#8217;t need to fully understand PE_FILE and how work an executable to change the resources. I would like to show you how to use it in Delphi.</p>
<h2>First Step : Listing all the resources</h2>
<p>How to open an executable file ?</p>
<p>LoadLibraryEx is described on this page of <a href="http://msdn.microsoft.com/en-us/library/ms684179%28v=vs.85%29.aspx" target="_blank">MSDN</a></p>
<pre>
var
           hinstance: HMODULE;
begin
           hinstance := LoadLibraryEx(PChar('c:\the_file.exe'), 0, LOAD_LIBRARY_AS_DATAFILE);

           //HERE code with hinstance

           FreeLibrary(hinstance);
</pre>
<p>To list all the resources we will use the EnumResourceTypes (function also described in MSDN) which is calling the function <a href="http://msdn.microsoft.com/en-us/library/ms648041%28v=vs.85%29.aspx" target="_blank">CallbackEnumResTypes</a>.</p>
<blockquote>
<h3>EnumResourceTypes Function</h3>
<p>Enumerates resource types within a binary module.</p>
<h4>Syntax</h4>
<div>
<div>
<div id="CodeSnippetContainerCode0">
<div>
<pre>BOOL WINAPI EnumResourceTypes(
  __in_opt  HMODULE hModule,
  __in      ENUMRESTYPEPROC lpEnumFunc,
  __in      LONG_PTR lParam
);</pre>
</div>
</div>
</div>
</div>
<h4>Parameters</h4>
<dl>
<dt><em>hModule</em> [in, optional]</dt>
<dd>Type: <strong>HMODULE</strong>&nbsp;</p>
</dd>
<dt><em>lpEnumFunc</em> [in]</dt>
<dd>Type: <strong>ENUMRESTYPEPROC</strong>&nbsp;</p>
<p>A pointer to the callback function to be called for each enumerated resource type. For more information, see the <a href="http://msdn.microsoft.com/en-us/library/ms648041%28v=vs.85%29.aspx"><strong>EnumResTypeProc</strong></a> function.</p>
</dd>
<dt><em>lParam</em> [in]</dt>
<dd>Type: <strong>LONG_PTR</strong>&nbsp;</p>
<p>An application-defined value passed to the callback function.</p>
</dd>
</dl>
<h4>Return Value</h4>
<p>Type: <strong>BOOL</strong></p>
<p>Returns TRUE if successful; otherwise, FALSE. To get extended error information, call <a href="http://msdn.microsoft.com/en-us/library/ms679360%28v=vs.85%29.aspx"><strong>GetLastError</strong></a>.</p>
<h4>Remarks</h4>
<p>For each resource type found, <strong>EnumResourceTypes</strong> calls an application-defined callback function <em>lpEnumFunc</em>, passing each resource type it finds, as well as the various other parameters that were passed to <strong>EnumResourceTypes</strong>.</p></blockquote>
<pre> EnumResourceTypes(hinstance, @CallbackEnumResTypes, Integer(ListBox1.Items));

//The first parameter is the Hinstance of the Executable, the second one is pointing on a function which will received the result of EnumResourceTypes and the last one is what you want !! Here a pointer to Listbox1.Items </pre>
<p>The ResType parameter is described by <a href="http://msdn.microsoft.com/en-us/library/ms648029%28v=vs.85%29.aspx" target="_blank">MSDN</a></p>
<dl>
<dd>
<blockquote>
<h4>Type: <strong>LPTSTR</strong></h4>
<p>The type of resource for which the type is being enumerated.   Alternately, rather than a pointer, this parameter can be <a href="http://msdn.microsoft.com/en-us/library/ms648029%28v=vs.85%29.aspx"><strong>MAKEINTRESOURCE</strong></a>(ID), where ID is the integer identifier of the given resource type. For standard resource types, see <a href="http://msdn.microsoft.com/en-us/library/ms648009%28v=vs.85%29.aspx">Resource Types</a>. For more information, see the Remarks section   below.</p>
<p>The return value is the specified value in the low-order word and zero in the high-order word.</p></blockquote>
</dd>
</dl>
<p>What is stdcall ?  I have forgotten ! <img src='http://blog.onkeysoft.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<blockquote><p>When you declare a procedure or function, you can specify a calling  convention using one of the directives register, pascal, cdecl, stdcall,  and safecall. Calling conventions determine the order in which parameters are passed to  the routine. They also affect the removal of parameters from the stack,  the use of registers for passing parameters, and error and exception  handling. The default calling convention is register.</p>
<ul>
<li>register	Left-to-right	Routine	Yes</li>
<li>pascal	Left-to-right	Routine	No</li>
<li>cdecl	Right-to-left	Caller	No</li>
<li>stdcall	Right-to-left	Routine	No</li>
<li>safecall	Right-to-left	Routine	No</li>
</ul>
</blockquote>
<pre>
function CallbackEnumResTypes(HInstance: HMODULE; ResType: PChar; OutList: TStrings): Integer; stdcall;
begin

if HiWord(Cardinal(ResType)) &lt;&gt; 0 then
OutList.Add(ResType) // The HighWord &lt;&gt; 0 This is strange MSDN explain us that hi-order word must be zero
else
OutList.Add(Format('Resource Number %d: Description %s', [loword(Cardinal(ResType)), StockResourceType(ResType)]));

EnumResourceNames(HInstance, ResType, @enumResNamesProc, Integer(OutList));  // Enum all the Resources

Result := 1;   // Continue The enumeration
end;
</pre>
<p>So we have used a function name StockResourceType wich are giving us a String describing the Type of the <a href="http://msdn.microsoft.com/en-us/library/ms648009%28v=vs.85%29.aspx" target="_blank">Resource</a> (All the information on this page)</p>
<pre>

Function StockResourceType(ResType: PChar): string;
           const
           ResTypeNames: Array [1 .. 24] of String = ('RT_CURSOR',
           'RT_BITMAP',
           'RT_ICON',
           'RT_MENU',
           'RT_DIALOG',
           'RT_STRING',
           'RT_FONTDIR',
           'RT_FONT',
           'RT_ACCELERATOR',
           'RT_RCDATA',
           'RT_MESSAGETABLE',
           'RT_GROUP_CURSOR',
           'UNKNOWN',
           'RT_GROUP_ICON',
           'UNKNOWN',
           'RT_VERSION',
           'RT_DLGINCLUDE',
           'UNKNOWN', 'RT_PLUGPLAY',
           'RT_VXD',
           'RT_ANICURSOR',
           'RT_ANIICON',
           'RT_HTML',
           'RT_MANIFEST'
);
var
           ResID: Cardinal absolute ResType;
begin
           if ResID in [1 .. 24] then
                      Result := ResTypeNames[ResID]
           else
                      Result := 'UNKNOWN';
end;
</pre>
<p>What is absolute directive ?  I have forgotten ! <img src='http://blog.onkeysoft.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<blockquote><p>You can create a new variable that  resides at the same address as another variable. To do so, put the  directive absolute after the type name in the declaration of the new  variable, followed by the name of an existing (previously declared)  variable. We can here use Restype which is a Pchar in a particular address in a ResId function which is a Cardinal.</p></blockquote>
<p>For the Callback function EnumResourceNames, this is the same thing.</p>
<blockquote>
<div id="CodeSnippetContainerCode0">
<div>
<pre>BOOL CALLBACK EnumResNameProc(
  __in_opt  HMODULE hModule,
  __in      LPCTSTR lpszType,
  __in      LPTSTR lpszName,
  __in      LONG_PTR lParam
);</pre>
</div>
</div>
<h4>Parameters</h4>
<dl>
<dt><em>lpszType</em> [in]</dt>
<dd>
<h4>Type: <strong>LPCTSTR</strong></h4>
<p>The type of resource for which the name is being enumerated. Alternately, rather than a pointer, this parameter can be <code>MAKEINTRESOURCE(ID)</code>, where ID is an integer value representing a predefined resource type. For standard resource types, see <a href="http://msdn.microsoft.com/en-us/library/ms648009%28v=vs.85%29.aspx">Resource Types</a>. For more information, see the Remarks section below.</p>
</dd>
<dt><em>lpszName</em> [in]</dt>
<dd>
<h4>Type: <strong>LPTSTR</strong></h4>
<p>The name of a resource of the type being enumerated. Alternately, rather than a pointer, this parameter can be <code>MAKEINTRESOURCE(ID)</code>, where ID is the integer identifier of the resource. For more information, see the Remarks section below.</p>
</dd>
</dl>
</blockquote>
<pre>

function EnumResNamesProc(module: HMODULE; ResType, ResName: PChar; list: TStrings): Integer; stdcall;
begin
           if HiWord(Cardinal(ResName)) &lt;&gt; 0 then
                      list.Add('  ' + ResName)
           else
                      list.Add(Format('  #%d', [loword(Cardinal(ResName))]));
           Result := 1; // Continue !
end;
</pre>
<h2>Second Step : Adding, Editing, Deleting resources</h2>
<blockquote>
<h3>UpdateResource Function</h3>
<p>Adds, deletes, or replaces a resource in a portable executable (PE)  file. There are some restrictions on resource updates in files that  contain Resource Configuration (RC Config) data: <a href="http://msdn.microsoft.com/en-us/library/dd319070%28v=vs.85%29.aspx">language-neutral</a> (LN) files and language-specific resource (.mui) files.</p>
<h4>Syntax</h4>
<div>
<div>
<div id="CodeSnippetContainerCode0">
<div>
<pre>BOOL WINAPI UpdateResource(
  __in      HANDLE hUpdate,
  __in      LPCTSTR lpType,
  __in      LPCTSTR lpName,
  __in      WORD wLanguage,
  __in_opt  LPVOID lpData,
  __in      DWORD cbData
);</pre>
</div>
</div>
</div>
</div>
<h3>Parameters</h3>
<dl>
<dt><em>hUpdate</em> [in]</dt>
<dd>Type: <strong>HANDLE</strong>&nbsp;</p>
<p>A module handle returned by the <a href="http://msdn.microsoft.com/en-us/library/ms648030%28v=vs.85%29.aspx"><strong>BeginUpdateResource</strong></a> function, referencing the file to be updated.</p>
</dd>
<dt><em>lpType</em> [in]</dt>
<dd>Type: <strong>LPCTSTR</strong>&nbsp;</p>
<p>The resource type to be updated. Alternatively, rather than a pointer, this parameter can be <a href="http://msdn.microsoft.com/en-us/library/ms648029%28v=vs.85%29.aspx"><strong>MAKEINTRESOURCE</strong></a>(ID),  where ID is an integer value representing a predefined resource type.  If the first character of the string is a pound sign (#), then the  remaining characters represent a   decimal number that specifies the integer identifier of the resource  type. For example, the string &#8220;#258&#8243; represents the identifier 258.</p>
<p>For a list of predefined resource types, see <a href="http://msdn.microsoft.com/en-us/library/ms648009%28v=vs.85%29.aspx">Resource Types</a>.</p>
</dd>
<dt><em>lpName</em> [in]</dt>
<dd>Type: <strong>LPCTSTR</strong>&nbsp;</p>
<p>The name of the resource to be updated. Alternatively, rather than a pointer, this parameter can be <a href="http://msdn.microsoft.com/en-us/library/ms648029%28v=vs.85%29.aspx"><strong>MAKEINTRESOURCE</strong></a>(ID),  where ID is a resource ID. When creating a new resource do not use a  string that begins with a &#8216;#&#8217; character for this parameter.</p>
</dd>
<dt><em>wLanguage</em> [in]</dt>
<dd>Type: <strong>WORD</strong>&nbsp;</p>
<p>The <a href="http://msdn.microsoft.com/en-us/library/dd318691%28v=vs.85%29.aspx">language identifier</a> of the resource to be updated. For a list of the primary language  identifiers and sublanguage identifiers that make up a language  identifier, see the <a href="http://msdn.microsoft.com/en-us/library/dd373908%28v=vs.85%29.aspx"><strong>MAKELANGID</strong></a> macro.</p>
</dd>
<dt><em>lpData</em> [in, optional]</dt>
<dd>Type: <strong>LPVOID</strong>&nbsp;</p>
<p>The resource data to be inserted into the file indicated by <em>hUpdate</em>.  If the resource is one of the predefined types, the data must be valid  and properly aligned. Note that this is the raw binary data to be stored  in the file indicated by <em>hUpdate</em>, not the data provided by <a href="http://msdn.microsoft.com/en-us/library/ms648072%28v=vs.85%29.aspx"><strong>LoadIcon</strong></a>, <a href="http://msdn.microsoft.com/en-us/library/ms647486%28v=vs.85%29.aspx"><strong>LoadString</strong></a>, or other resource-specific load functions. All data containing strings or text must be in Unicode format. <em>lpData</em> must not point to ANSI data.</p>
<p>If <em>lpData</em> is NULL and <em>cbData</em> is 0, the specified resource is deleted from the file indicated by <em>hUpdate</em>.</p>
</dd>
<dt><em>cbData</em> [in]</dt>
<dd>Type: <strong>DWORD</strong>&nbsp;</p>
<p>The size, in bytes, of the resource data at <em>lpData</em>.</p>
</dd>
</dl>
<h4>Return Value</h4>
<p>Type: <strong>BOOL</strong></p>
<p>Returns TRUE if successful or FALSE otherwise. To get extended error information, call <a href="http://msdn.microsoft.com/en-us/library/ms679360%28v=vs.85%29.aspx"><strong>GetLastError</strong></a>.</p></blockquote>
<h3>Adding</h3>
<pre>var
           FileHandle: THandle;
           Filebuffer: ShortString;
           Test: PChar;</pre>
<pre>

Filebuffer := 'Something to add this is a string ! Not Unicode here <img src='http://blog.onkeysoft.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  ! ';
FileHandle := BeginUpdateReSource(PChar('c:\the_exe.exe'), False); // begin updating our resource
UpdateReSource(FileHandle, RT_RCDATA, 'THE_NAME_OF_THE_RESOURCE', 0, @Filebuffer[1], Length(Filebuffer));  // Updating the resource
EndUpdateReSource(FileHandle, False); // End of the update
</pre>
<h3>Editing</h3>
<pre>
UpdateReSource(FileHandle, RT_RCDATA, 'EXIST_NAME', 0,  @Filebuffer[1], Length(Filebuffer));  // Updating the resource, the EXIST_NAME resource exist !
</pre>
<h3>Removing</h3>
<pre>

Filebuffer := ''; // To delete just create something empty or clear !
UpdateReSource(FileHandle, RT_RCDATA, 'EXIST_NAME', 0,   @Filebuffer[1], Length(Filebuffer));  // Updating the resource, the  EXIST_NAME resource exist !
</pre>
<h2>Third Step : And for a bitmap ?</h2>
<p>This is a small piece of code which will give you an example of how to add a bitmap in resource&#8230; After that you will now how to add Cursor, Song etc&#8230;</p>
<pre>

var
           HInstance: THandle;
           bitmap: Pointer;
           FS: TFILESTREAM;
           dwSize: DWORD;
begin
           HInstance:= BeginUpdateResource(THE_EXECUTABLE_PATH, false);

           FS := TFileStream.Create(THE_BITMAP_PATH, fmOpenRead or fmShareDenyWrite); // Opening a TFileStream
           GetMem(bitmap, FS.Size + 1); // Get memory to add the Bitmap in memory
           FS.ReadBuffer(bitmap^, FS.Size); // Full this part of the Memory with Bitmap DATA
           dwSize := FS.Size; // Size of the Bitmap
           FS.Free; // Closing the TFileStream

           UpdateResource(HInstance, PWideChar(RT_BITMAP), '6805'  , LANG_SYSTEM_DEFAULT, bitmap, dwSize); // 6805 is the name, and the language is the default of my system

           EndUpdateResourceW(HInstance, false);
end;
</pre>
<p>I hope it will help you to use Resources.</p>
<p>Have a good week,</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.onkeysoft.com/2011/06/03/listing-adding-editing-deleting-resources-of-exe-dll-using-win32-api-with-delphi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Help Science with your computer : Folding@Home</title>
		<link>http://blog.onkeysoft.com/2011/05/29/help-science-with-your-computer-foldinghome/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=help-science-with-your-computer-foldinghome</link>
		<comments>http://blog.onkeysoft.com/2011/05/29/help-science-with-your-computer-foldinghome/#comments</comments>
		<pubDate>Sat, 28 May 2011 23:58:31 +0000</pubDate>
		<dc:creator>remixtech</dc:creator>
				<category><![CDATA[Geek things]]></category>
		<category><![CDATA[fah]]></category>
		<category><![CDATA[folding@home]]></category>

		<guid isPermaLink="false">http://blog.onkeysoft.com/?p=101</guid>
		<description><![CDATA[Folding@home is the most powerful distributed computing cluster in the world, according to Guinness,and one of the world&#8217;s largest distributed computing projects. The goal of the project is &#8220;to understand protein folding, misfolding, and related diseases.&#8221; I would like to share my experience about this program of distributed computing. First I have one powerful computer [...]]]></description>
			<content:encoded><![CDATA[<p>Folding@home is the most powerful distributed computing cluster in the world, according to Guinness,and one of the world&#8217;s largest distributed computing projects. The goal of the project is &#8220;to understand protein folding, misfolding, and related diseases.&#8221;</p>
<p>I would like to share my experience about this program of distributed computing. First I have one powerful computer (Quad Core CPU and 2 GPU) and one server (okay it&#8217;is not a powerfull one, but it is enough for me and my several websites).</p>
<div id="attachment_102" class="wp-caption aligncenter" style="width: 310px"><a href="http://blog.onkeysoft.com/wp-content/uploads/2011/05/fah_2.png"><img class="size-medium wp-image-102" title="fah_2" src="http://blog.onkeysoft.com/wp-content/uploads/2011/05/fah_2-300x141.png" alt="" width="300" height="141" /></a><p class="wp-caption-text">New software of Folding@Home V7</p></div>
<p>When I am coding, I am using a small part of the power of my system and my server is not overload <img src='http://blog.onkeysoft.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> . So my computers could be useful to help science and research like all the servers of Google which are also supporting this project ! In only two months, I am  in the top five percent position. Let&#8217;s see the graph.</p>
<div id="attachment_103" class="wp-caption aligncenter" style="width: 310px"><a href="http://blog.onkeysoft.com/wp-content/uploads/2011/05/fah.png"><img class="size-medium wp-image-103" title="fah" src="http://blog.onkeysoft.com/wp-content/uploads/2011/05/fah-300x190.png" alt="" width="300" height="190" /></a><p class="wp-caption-text">My rank in Folding@Home</p></div>
<p>Actually I am student and I can&#8217;t give money to charity association, and I don&#8217;t like this, I think this is the job of government. But I prefer being active on a global and worldwide project with a lot of peoples (1552132 peoples at this time, number of registration). This is, in my opinion, a form of donation !</p>
<p>Like me you could be a part of this adventure, don&#8217;t wait just click <a title="Folding @ Home" href="http://folding.stanford.edu/" target="_blank">here</a> !</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.onkeysoft.com/2011/05/29/help-science-with-your-computer-foldinghome/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Some functions and properties of TIDPop3</title>
		<link>http://blog.onkeysoft.com/2011/05/11/some-functions-et-properties-of-tidpop3/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=some-functions-et-properties-of-tidpop3</link>
		<comments>http://blog.onkeysoft.com/2011/05/11/some-functions-et-properties-of-tidpop3/#comments</comments>
		<pubDate>Wed, 11 May 2011 00:25:16 +0000</pubDate>
		<dc:creator>remixtech</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Delphi]]></category>
		<category><![CDATA[Indy components]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[delphi]]></category>
		<category><![CDATA[indy]]></category>
		<category><![CDATA[pop3]]></category>
		<category><![CDATA[pop3 server]]></category>
		<category><![CDATA[source code]]></category>
		<category><![CDATA[tidpop3]]></category>

		<guid isPermaLink="false">http://blog.onkeysoft.com/?p=95</guid>
		<description><![CDATA[In the last post which was dealing with Indy. We have seen how to configure TIDPop3. Let’s see how to use this component. In the uses dont forget to add the IDPop3 file which contains all the information for TIDPop3. uses Idpop3; type POP3Client: TIdPOP3; The first thing I do is write a procedure to [...]]]></description>
			<content:encoded><![CDATA[<p>In the last post which was dealing with Indy. We have seen how to configure TIDPop3. Let’s see how to use this component.</p>
<p>In the uses dont forget to add the IDPop3 file which contains all the information for TIDPop3.</p>
<pre>
uses
Idpop3;
type
POP3Client: TIdPOP3;
</pre>
<p>The first thing I do is write a procedure to retrieve the <strong>status </strong>from the TIDPop3 :</p>
<pre>
procedure Thread_POP3.POP3Status(ASender: TObject; const AStatus: TIdStatus; const AStatusText: string);
begin
Synchronize
( procedure begin
// USE AStatusText
end);
end;

// After the creation of POP3Client we can assign this event
POP3Client          := TIdPOP3.Create(nil);
POP3Client.OnStatus := POP3Status;
</pre>
<p>To connect to the server just use the procedure <strong>Connect</strong>, lets see other methods :</p>
<pre>
POP3Client.Connect; // Connection
POP3Client.login; // Use it to Connect
</pre>
<p>If you want to get the number of mails just use the function <strong>CheckMessages</strong>, and to get the mail the mail number I <strong>RetrieveMsgSize(I)</strong> :</p>
<pre>
FNbrMailsOnline := POP3Client.CheckMessages; // Retrieve the number of mails on the server
FTailleDernierMail := POP3Client.RetrieveMsgSize(FNbrMailsOnline); // Retrieve the size of the Last Mail
</pre>
<p>To delete a mail just do this :</p>
<pre>
POP3Client.Delete(I); // The mail will only be delete when you will disconnect
// If you want to cancel the deletion just use the
POP3Client.Reset; // Cancel the deletion
</pre>
<h2>Now let&#8217;s see how to retrieve mails :</h2>
<p>Tell Delphi where to find the TIDMessage class</p>
<pre>
uses
IDMessage;
type
Message: TIDMessage;
</pre>
<p>If you want to retrieve only the header of a mail (not the all mail, just the basics information) :</p>
<pre>
POP3Client.RetrieveHeader(Position_Mail, Message); // Retrieve only the header
POP3Client.Retrieve(Position_Mail, Message); // Retrieve the all mail
</pre>
<p>To retrieve a Raw Mail (the text without processing the mail in TIDMessage MIME parser) :</p>
<pre>
POP3Client.RetrieveRaw(Position_Mail, Down_MemStream);
</pre>
<p>And in conclusion, disconnection :</p>
<pre>
POP3Client.Disconnect; // Disconnection
</pre>
<p>Bye,</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.onkeysoft.com/2011/05/11/some-functions-et-properties-of-tidpop3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Peganza, Pascal Analyser 5 review</title>
		<link>http://blog.onkeysoft.com/2011/04/29/peganza-pascal-analyser-5-review/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=peganza-pascal-analyser-5-review</link>
		<comments>http://blog.onkeysoft.com/2011/04/29/peganza-pascal-analyser-5-review/#comments</comments>
		<pubDate>Fri, 29 Apr 2011 01:02:08 +0000</pubDate>
		<dc:creator>remixtech</dc:creator>
				<category><![CDATA[Delphi]]></category>
		<category><![CDATA[Reviews]]></category>
		<category><![CDATA[analysing]]></category>
		<category><![CDATA[delphi]]></category>
		<category><![CDATA[metrics]]></category>
		<category><![CDATA[pa]]></category>
		<category><![CDATA[pascal]]></category>
		<category><![CDATA[pascal analyser]]></category>
		<category><![CDATA[quality]]></category>
		<category><![CDATA[reports]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://blog.onkeysoft.com/?p=39</guid>
		<description><![CDATA[I’m in really good move since several days, I have never written so much in a blog. So let’s go for a new post about a fabulous tool named Pascal Analyser… Is this tool in Rad Studio IDE? &#160; When you are developing software and you want to build a solid code like a rock. [...]]]></description>
			<content:encoded><![CDATA[<p>I’m in really good move since several days, I have never written so much in a blog. So let’s go for a new post about a fabulous tool named Pascal Analyser…</p>
<h2>Is this tool in Rad Studio IDE?</h2>
<p>&nbsp;</p>
<p>When you are developing software and you want to build a solid code like a rock. You need some tools to give you “Metrics”. Metrics give you answers to the following questions:</p>
<ul>
<li>How much files in your project? How much modules, lines, constants, class, variables?</li>
<li>Give you information about complexity of your code. How much Comments/Total lines in your code? What is the complexity of functions or procedures? About objects programming: What is the complexity of methods per class, the number of children and lot of other things?</li>
</ul>
<p>To introduce the tool, let’s see what Delphi IDE offer in the feature Matrix :</p>
<p><a href="http://blog.onkeysoft.com/wp-content/uploads/2011/04/inDelphi.png"><img class="aligncenter size-large wp-image-40" title="Delphi Matrix" src="http://blog.onkeysoft.com/wp-content/uploads/2011/04/inDelphi-1024x214.png" alt="" width="1024" height="214" /></a></p>
<p>As you can see, this is not cool for the professional Delphi customers. Ok I think these functions are totally essential when you are developing software in a Team or when you are project manager. But this is also cool when you are independent developer and you want to keep a watch on the quality of the code. I hate Embarcadero for this; they are giving you ersatz of softwares, ersatz of Intraweb, AQTime, FinalBuilder… Why they aren’t reduce the price of Delphi and give a total liberty for their users to buy the tools they need… I hate this! Haaaaaa! So what is the solution for analyzing our code? Buying an extension of Delphi for 1300 €! Not sure, you could get really more in buying Peganza Analyser for only 120 € (see coupon at the end). But this is not the exact same software! Peganza Pascal Analyser is far more complete than Delphi IDE cause it don’t give only metrics it gives you a lot of other things. The goal is not the same, so now I will stop to compare original tool include in Delphi and Peganza Analyser.</p>
<h2>Review and tutorial of Peganza Pascal Analyser 5 :</h2>
<p>&nbsp;</p>
<p>To introduce and review this tool I will use the example of my software. After having setup my project and click <span style="text-decoration: underline;"><em>Analysis-&gt; Run!</em></span></p>
<h3><span style="text-decoration: underline;"><em><a href="http://blog.onkeysoft.com/wp-content/uploads/2011/04/pascalanalyser.png"><img class="aligncenter size-full wp-image-42" title="Pascal Analyser 5" src="http://blog.onkeysoft.com/wp-content/uploads/2011/04/pascalanalyser.png" alt="" width="817" height="460" /></a></em></span></h3>
<h3 style="padding-left: 30px;"><span style="text-decoration: underline;"><em><a href="http://blog.onkeysoft.com/wp-content/uploads/2011/04/pascalanalyser.png"></a></p>
<p></em></span></p>
<p>Reports – General</h3>
<p><em><strong>Status: </strong></em> This report presents important facts about the current analysis, e.g. selected compiler directives and search paths.</p>
<p><em><strong>Strong Warning: </strong></em>In this report you will see severe errors; they will often cause failures or erroneous results. (Property access in read/write methods or Ambiguous unit references). Sorry I haven’t this kind of problem in my software (It’s pretty good news), so no example. But sometimes it could happen if you are a bit dizzy !</p>
<p><strong><em>Warning reports: </em></strong>It will give you some advises to improve your code:</p>
<blockquote><p>Interfaced identifiers that are used, but not outside of unit (3, was 0):</p>
<p>TMailIMAPAccount = Class       Type, Interfaced        obj_mailaccount (98)</p></blockquote>
<p>If I double click on the line, it opens me Delphi IDE and I see directly what the problem is.</p>
<pre>

// -----------------------

// TMailAccount  IMAP4

// -----------------------

TMailIMAPAccount = class(TMailAccount)

private

public

procedure Assign(Source: TObject); override;

end;
</pre>
<p>I don&#8217;t use this Class, but I wrote it to be use in a near future. So it&#8217;s a false positive <img src='http://blog.onkeysoft.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ! When you have false positive you could delete them in adding
<pre> //PALOFF </pre>
<blockquote><p>Interfaced class identifiers that are public/published, but not used outside of unit (5, was 5):</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>Colonnes : Array (static)      Property                listview_tools\TList_Colonne (61)</p></blockquote>
<pre>

// Liste Colonne

TList_Colonne = class(TObjectList)

private

function GetColonne(Index: Integer): TColonne;

procedure SetColonne(Index: Integer; const Value: TColonne);

public

function NewOnlineColonne(TypeC: TColumnOnline; Position: Integer; Visible: Boolean; Size: Integer): TColonne_Online;

property Colonnes[index: integer]: TColonne read GetColonne write SetColonne; // PROBLEM HERE, the Class is public but not used...

end;
</pre>
<p>The problem is very simple to correct, the visibility of the property Colonnes is too high. The best way to correct it is to transfer it in private section.</p>
<blockquote><p>Variables that are set, but never referenced (9, was 9):</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>con_sasl_encours : tidsasl     ClassField              Thread_POP\Thread_POP3 (89)</p></blockquote>
<pre>

Thread_POP3 = class(tthread)

private

FProcessName: string;

con_sasl_encours:   tidsasl; // What is the problem...

// FThread origine

FThread_IM: TIMThread;

//...

protected

// ...

public

// ...

end;
</pre>
<p>If I delete the con_sasl_encours, the program can’t compile. The only time con_sasl_encours is used it is for :</p>
<pre>con_sasl_encours   := nil; </pre>
<p>So this object is totally useless, I can delete it. As you can see Peganza Analyser could help me to delete some objects totally useless. Maybe when I code it I had something in mind, but now, I dont know what it was&#8230; On my 22467 lines of code it is hard to find. Pascal Analyser could help you to clean your code.</p>
<p>Another one :</p>
<blockquote><p>Variables that are set, but never referenced (8, was 9):</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>Created : TDateTime            Var, Local              database_running\TDBB_RUN\Load_Main_Database (111)</p></blockquote>
<pre> function TDBB_RUN.Load_Main_Database(const Path_BDD: String; const Ident: String): boolean;

var

Created: TDateTime;

begin

Created    := sqlite3_column_double(Stmt, 1);

//....
</pre>
<p>Created is a double that is never used ! It is set but never used. So I could delete it (or not if it is planned to be used in the future but this is not probable, I can&#8217;t remember a variable that is declared two years ago lool) !</p>
<p>I will not give you an example for ALL the reports in the Warning reports. But we have seen that this tab could really help use to find useless code, or strange code. Sometimes we do some very strange thing like:</p>
<blockquote><p>for-loop variables read after loop (1, was 1):</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>I : Integer                    Var, Local              Thread_POP\Thread_POP3\Execute\delete_mails (991)</p></blockquote>
<pre>

try

for I := 0 to Liste_de_Mail.Count - 1 do

begin

// blablablblalaalal

end;

except

// Using of I

end;
</pre>
<p>This is an error from me, I was maybe drunk… The try except must be inside the loop and must be abort. So the code must be correct in :</p>
<pre>

for I := 0 to Liste_de_Mail.Count - 1 do

try

begin

// blablablblalaalal

except

Abort;

// Using of I

end;

end;
</pre>
<p>And the last one I would like to show you :</p>
<blockquote><p>Functions called as procedures (37, was 37):</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>configuration.sauvegarder_config at frm_principale (199)</p></blockquote>
<pre>

procedure Tfrm_main.FormDestroy(Sender: TObject);

begin

sauvegarder_config;

// ....

end;

// The function

function sauvegarder_config: boolean;

begin

// ....

end;
</pre>
<p>As you can see, Pascal Analyser gives us a good way to find which part of the software is missing. When I developed <em><strong>Sauvegarder_Config </strong></em>it was designed to give true if the function works properly and false if there is a problem. So it&#8217;s totally useless to code a function if I don&#8217;t use the result and use it like a Procedure. Here PA could really improves my software if I use it correctly, I&#8217;m forced to consider the result of the function.</p>
<p><em><strong>Optimization:</strong></em> By example the compiler of Delphi is optimized to work differently with constants and variables. So if you need speed and you are using variable for data which will not be modified it’s highly recommended to use constant instead. There are some other tricks to speed up your software. Pascal Analyser will help you to fix some leaks. Let’s see some examples:</p>
<blockquote><p>Missing &#8220;const&#8221; for unmodified string parameter (3, was 3):</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>BDD_Pass : String              ValParam                Thread_POP\Thread_POP3\Execute\Retrieve_Mails (594)</p></blockquote>
<pre> // Procedure pour télécharger des mails

procedure Retrieve_Mails(BDD_Path: String; BDD_Pass: String);

var </pre>
<p>Here it&#8217;s not a variable that I would communicate to the function but a constant. This value will not be modified.</p>
<blockquote><p>Array properties that are referenced/set within methods (1, was 0):</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>Accounts : Array (static)      Property                obj_mailaccount\TList_MailAccount (123)</p>
<p>Referenced/set (1):</p>
<p>Assign                         Proc, Method            obj_mailaccount\TList_MailAccount (121)</p></blockquote>
<p>For performance reasons it is faster to directly access the private array field.  However, if the Get- or Set-method performs side effects, it makes sense to  access the property.</p>
<pre>

// -----------------------

// TList_MailAccount

// -----------------------

TList_MailAccount = class(TObjectList)

private

function GetAccount(Index: integer): TMailAccount;

procedure SetAccount(Index: integer; const Value: TMailAccount);

public

procedure Assign(Source: TObject);

function NewPOPAccount: TMailPOPAccount;

property Accounts[index: integer]: TMailAccount read GetAccount write SetAccount;

end;

// Here Assign details

procedure TList_MailAccount.Assign(Source: TObject);

var //...

begin

//...

POPA.Assign(From.Accounts[I]); // THe problem is here

//...

end;
</pre>
<p>Must be change to</p>
<pre>

POPA.Assign(TMailPOPAccount(From.Items[I]));
</pre>
<p>And for the last example :</p>
<blockquote><p>Local subprograms with references to outer local variables (6, was 6):</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>GetIndex                       Proc, Local             frmpnl_show_offline_mail_\Tfrmpnl_show_offline_mail\offline_gridGetDisplText (368)</p></blockquote>
<pre>

procedure Tfrmpnl_show_offline_mail.offline_gridGetDisplText(Sender: TObject; ACol, ARow: Integer; var Value: string);

var

Mail_Offline: TMail_Offline;

Index:        Integer;

procedure GetIndex;

begin

Index        := strtoint(offline_grid.AllCells[1, ARow]);

Mail_Offline := TMail_Offline(Data_Liste.Objets[Index].Data);

end;
</pre>
<p>Using some local variables in inner routines cost a bit CPU cause the compiler need to do special stacks manipulation.</p>
<p>I change it in :</p>
<pre>

procedure Tfrmpnl_show_offline_mail.offline_gridGetDisplText(Sender: TObject; ACol, ARow: Integer; var Value: string);

var

Mail_Offline: TMail_Offline;

procedure GetIndex(Mail: TMail_Offline);

var Index:Integer;

begin

Index        := strtoint(offline_grid.AllCells[1, ARow]);

Mail := TMail_Offline(Data_Liste.Objets[Index].Data);

end;
</pre>
<p>I&#8217;m not an expert on this subject, I hope this is not totally stupid. If someone could tell me if the solution is correct&#8230;</p>
<p><em><strong>Memory:</strong></em></p>
<p class="MsoNormal"><span lang="EN-US">It allows you to manage all the objects you are creating in the memory; Pascal Analyser could make some test. Like telling you if you are making unprotected calls to free (Use Finally end) on local or non-local object. It will also count number of Create and Free and tell you if there is something strange… </span></p>
<p class="MsoNormal"><span lang="EN-US">It’s you work to interpret all the reports <img src='http://blog.onkeysoft.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  </span></p>
<p><em><strong>Code Reduction:</strong></em></p>
<p>This report pinpoints unnecessary code that could be deleted, resulting in a  smaller amount of code to maintain and search for errors.</p>
<p><em><strong>Convention Compliance/Inconsistent Case/Prefix:</strong></em></p>
<p class="MsoNormal"><span lang="EN-US">When you are coding in Delphi, there is some convention (not exhaustive):</span></p>
<ul>
<li><span lang="EN-US">Like user-define type names start with the letter T (TForm_Tool), pointer by P, Exception by E… </span></li>
<li><span lang="EN-US">Classfields must be declared in private section.</span></li>
<li><span lang="EN-US">Get, Set exposed by properties (write/read).</span></li>
<li><span lang="EN-US">Unsuitable names, numerals etc.</span></li>
<li><span lang="EN-US">Not the same name for different identifiers.</span></li>
<li><span lang="EN-US">Not too much long identifiers.</span></li>
</ul>
<ul></ul>
<p class="MsoNormal"><span lang="EN-US">Pascal Analyser gives you two other report one for inconsistent case (in fact when you are writing Buffer and bUFfer it is the same identifiers but it is most hard to read!). You could also detect which objects have not the right prefix.</span></p>
<h3 style="padding-left: 30px;">Reports – Metrics</h3>
<p>The next report is dedicated to Metrics. We have talk about this in the first part of this review/tutorial. The total metrics give you a rapid count of files, modules, lines and all kind of identifiers in Total/Local/Global/Interfaced/Unused. You could have this information for each module.</p>
<p><a href="http://blog.onkeysoft.com/wp-content/uploads/2011/04/metrics.png"><img class="aligncenter size-large wp-image-71" title="Pascal Analyser complexity" src="http://blog.onkeysoft.com/wp-content/uploads/2011/04/metrics-1024x549.png" alt="" width="575" height="308" /></a></p>
<p><em>Extract from the manual:</em></p>
<ol>
<li><em>Start with a value of 1 for the normal flow through a subprogram. </em></li>
<li><em>Add 1 for each of these keywords: IF, WHILE, REPEAT, FOR, AND, OR, XOR, GOTO. Note that PAL always counts AND, OR, XOR, even if they are used as arithmetic operators in the actual code.</em></li>
<li><em>Add 1 for each case label in a CASE statement. When the CASE does not have an ELSE, add 1 more.</em></li>
</ol>
<p>DP (Decision Point equivalent to McCabe’s metric) is a way to quantify the hardness to understand a function. If the subprogram or module has a DP &gt; 10 it is a kind complex subprogram, with PA you could see easily what are the most hardcore to understand function. But sometimes you need to work with long function, which will give you a high DP. You can consider the result with DP/LOC (Lines of Code), if the DP/LOC is too high it is not good. After you need to see if the function is commented enough (if you have a high DP/LOC but a high Cmt(Comment)/LOC this is not a real problem, cause you are documenting enough your function (this is a subjective view).</p>
<p>There is a lot of other statistics with metrics. The metrics here are not a lot, but enough to understand your program if you are self-developer.</p>
<p>Let’s compare with Delphi Metrics  :</p>
<p><a href="http://blog.onkeysoft.com/wp-content/uploads/2011/04/metricx-delphi.png"><img class="aligncenter size-medium wp-image-72" title="Delphi Metrics" src="http://blog.onkeysoft.com/wp-content/uploads/2011/04/metricx-delphi-300x228.png" alt="" width="300" height="228" /></a></p>
<p>This is really more complex and complete, I think this is not totally useful when your are independent developer. But if you are directing a project you will need more information, and this tool is great. But like every tool there are some limitations, by example in this particular situation Delphi Audits tell me that this code is never execute ! But this is an error, this code is always performed ! Sometimes just rewriting differently the code correct the problem.</p>
<pre>

Synchronize( procedure begin

// ...

end);
</pre>
<p>Personally I prefer Pascal Analyser. It&#8217;s more easy to find problem and to optimize my code. Pascal Analyser gives you also Object Oriented Metrics :</p>
<ul>
<li>Weighted Methods per Class (WMC)</li>
<li>Depth of Inheritance Tree (DIT)</li>
<li>Number of children (NOC)</li>
<li>Coupling between Object Classes (CBO)</li>
<li>Response for a Class (RFC)</li>
<li>Loack of Cohesion in Methods (LCOM)</li>
</ul>
<p>With all these metrics, without directly watching the code, you could know if your code is great, just ok or really bad ! Just test the software and open the manual to learn more about these metrics.</p>
<h3 style="padding-left: 30px;">And a lot of other tools !</h3>
<p>Pascal Analyser comes with a lot of other tools. It could give you some infos about Modules, Identifiers, Duplicate Identifiers name (yes it&#8217;s not good to give the same name to different variables, most hard to read), similarity. This software could also list :</p>
<ul>
<li>The Subprogram Index</li>
<li>Bindings</li>
<li>Third-party dependencies</li>
<li>Most called subprograms</li>
<li>Call Tree/ Reverse Call Tree/ Call Index</li>
<li>All the exceptions</li>
<li>All the todos</li>
<li>All the directives</li>
<li>All the conditional Symbols</li>
<li>The Brief Cross-reference</li>
<li>Interfaced identifiers that are used outside their units</li>
<li>And lof of other things !</li>
</ul>
<p>Just before conclusion, I will give a last function that I like a lot on this Analyser. In pascal you need to tell the compiler which files you want to include into your program with the <strong><em>uses</em></strong>, but sometimes you have some useless units in <strong><em>uses</em></strong> and it takes time to compiler to test if it useful or not. Here PA tells me directly which units I could delete easily. Example :</p>
<blockquote><p><span style="text-decoration: underline;"><em>Program ClientMail uses:</em></span></p>
<p>Used units:</p>
<p>sysutils in implementation</p>
<p>==&gt; ExceptionLog unnecessary</p>
<p>Forms in implementation</p>
<p>dateutils in implementation</p>
<p>frm_principale in implementation</p>
<p>==&gt; memstreamini unnecessary</p>
<p>==&gt; database unnecessary (has initialization)</p>
<p>==&gt; ressourcestrings unnecessary (used by unit with init)</p>
<p>==&gt; imail_type unnecessary</p>
<p>==&gt; obj_mailaccount unnecessary</p>
<p>==&gt; database_online unnecessary</p>
<p>==&gt; chemins unnecessary</p>
<p>==&gt; tools_strings unnecessary</p>
<p>==&gt; constantes unnecessary</p>
<p>==&gt; msgbox_tools unnecessary</p>
<p>==&gt; database_cfg unnecessary</p>
<p>==&gt; listview_tools unnecessary</p>
<p>==&gt; configuration unnecessary</p>
<p>frm_configuration in implementation</p>
<p>==&gt; Thread_Manager unnecessary</p>
<p>==&gt; database_mails unnecessary</p>
<p>==&gt; database_maj unnecessary</p>
<p>==&gt; frm_update_database unnecessary</p>
<p>==&gt; load_skin unnecessary</p>
<p>==&gt; combobox_tools unnecessary</p>
<p>==&gt; database_running unnecessary</p>
<p>==&gt; database_log unnecessary</p>
<p>==&gt; obj_standard unnecessary</p>
<p>==&gt; Thread_POP unnecessary</p>
<p>==&gt; Interface_manager unnecessary</p>
<p>==&gt; Treeview_tools unnecessary</p>
<p>==&gt; menu_tools unnecessary</p>
<p>==&gt; affichage unnecessary</p>
<p>==&gt; frmpnl_log_ unnecessary</p>
<p>==&gt; frmpnl_show_online_mail_ unnecessary</p>
<p>==&gt; frmpnl_threads_ unnecessary</p>
<p>==&gt; frmpnl_show_offline_mail_ unnecessary</p>
<p>==&gt; crypt_decrypt unnecessary</p>
<p>==&gt; frm_status unnecessary</p>
<p>==&gt; reinit unnecessary</p>
<p>frm_splashscreen in implementation</p>
<p>==&gt; frm_lecture_mail unnecessary</p></blockquote>
<h3 style="padding-left: 30px;">Conclusion !</h3>
<p>In conclusion this is a really valuable tool, you will save a lot of precious time if you maintain a high quality and reliable code. Maybe it will takes some hours to decrypt all the tools and use it correctly in your project (and correct some strange things), but after some times it will be automatic and you will do this naturally. You will write better code with less effort ! For me Pascal Analyser is a must have if you just have the professional version of Delphi.</p>
<p>I have negotiated a reduction just for you, use the coupon code &#8220;<span style="font-size: 11pt; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;">PALBLOG&#8221; when ordering and you will get 10% of reduction.</span></p>
<p style="text-align: center;"><span style="font-size: 11pt; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;"> <a href="http://peganza.com/">Click here to go to Peganza Website</a></p>
<p></span></p>
<p>&nbsp;</p>
<p><em><strong> </strong></em></p>
<div id="_mcePaste" class="mcePaste" style="position: absolute; left: -10000px; top: 3261px; width: 1px; height: 1px; overflow: hidden;">
<h3 style="padding-left: 30px;">Reports – General</h3>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.onkeysoft.com/2011/04/29/peganza-pascal-analyser-5-review/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Is Delphi dead ? (And why it&#8217;s not !)</title>
		<link>http://blog.onkeysoft.com/2011/04/22/if-delphi-is-dead-and-why-its-not/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=if-delphi-is-dead-and-why-its-not</link>
		<comments>http://blog.onkeysoft.com/2011/04/22/if-delphi-is-dead-and-why-its-not/#comments</comments>
		<pubDate>Fri, 22 Apr 2011 15:49:05 +0000</pubDate>
		<dc:creator>remixtech</dc:creator>
				<category><![CDATA[Delphi]]></category>
		<category><![CDATA[Not important things]]></category>
		<category><![CDATA[dead]]></category>
		<category><![CDATA[delphi]]></category>
		<category><![CDATA[fruityloops]]></category>
		<category><![CDATA[installaware]]></category>
		<category><![CDATA[kaspersky]]></category>
		<category><![CDATA[mediamonkey]]></category>

		<guid isPermaLink="false">http://blog.onkeysoft.com/?p=75</guid>
		<description><![CDATA[Then &#160; &#160; &#160; &#160; &#160; &#160; are compiled by a ghost !]]></description>
			<content:encoded><![CDATA[<h1 style="text-align: center;">
<p>Then</h1>
<p>&nbsp;</p>
<div id="attachment_76" class="wp-caption aligncenter" style="width: 240px"><a href="http://blog.onkeysoft.com/wp-content/uploads/2011/04/k.jpg"><img class="size-medium wp-image-76" title="Kaspersky" src="http://blog.onkeysoft.com/wp-content/uploads/2011/04/k-230x300.jpg" alt="" width="230" height="300" /></a><p class="wp-caption-text">Kaspersky protection softwares</p></div>
<p>&nbsp;</p>
<div id="attachment_77" class="wp-caption aligncenter" style="width: 277px"><a href="http://blog.onkeysoft.com/wp-content/uploads/2011/04/s1301809141737.jpeg"><img class="size-medium wp-image-77" title="Rad Studio XE" src="http://blog.onkeysoft.com/wp-content/uploads/2011/04/s1301809141737-267x300.jpg" alt="" width="267" height="300" /></a></dt>
<dt> <p class="wp-caption-text">Delphi and C++ Builder IDE</p></div>
<p>&nbsp;</p>
<div id="attachment_78" class="wp-caption aligncenter" style="width: 250px"><a href="http://blog.onkeysoft.com/wp-content/uploads/2011/04/fruity-loops-9.jpg"><img class="size-full wp-image-78" title="fruity-loops-9" src="http://blog.onkeysoft.com/wp-content/uploads/2011/04/fruity-loops-9.jpg" alt="" width="240" height="233" /></a><p class="wp-caption-text">Fruity Loops audio producing tools</p></div>
<p>&nbsp;</p>
<div id="attachment_79" class="wp-caption aligncenter" style="width: 238px"><a href="http://blog.onkeysoft.com/wp-content/uploads/2011/04/gI_InstallAwareStudioAdmin.png.jpg"><img class="size-full wp-image-79" title="gI_InstallAwareStudioAdmin.png" src="http://blog.onkeysoft.com/wp-content/uploads/2011/04/gI_InstallAwareStudioAdmin.png.jpg" alt="" width="228" height="250" /></a><p class="wp-caption-text">The great installer InstallAware</p></div>
<p>&nbsp;</p>
<div id="attachment_80" class="wp-caption aligncenter" style="width: 271px"><a href="http://blog.onkeysoft.com/wp-content/uploads/2011/04/mediamonkey_6523.jpg"><img class="size-medium wp-image-80" title="mediamonkey_6523" src="http://blog.onkeysoft.com/wp-content/uploads/2011/04/mediamonkey_6523-261x300.jpg" alt="" width="261" height="300" /></a><p class="wp-caption-text">Audio library manager MediaMonkey</p></div>
<p>&nbsp;</p>
<h1 style="text-align: center;">are compiled by a ghost !</p>
</h1>
]]></content:encoded>
			<wfw:commentRss>http://blog.onkeysoft.com/2011/04/22/if-delphi-is-dead-and-why-its-not/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to prepare a connection to POP3 server with Indy TIdPOP3</title>
		<link>http://blog.onkeysoft.com/2011/04/20/how-to-prepare-a-connection-to-pop3-server-with-indy-tidpop3/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-prepare-a-connection-to-pop3-server-with-indy-tidpop3</link>
		<comments>http://blog.onkeysoft.com/2011/04/20/how-to-prepare-a-connection-to-pop3-server-with-indy-tidpop3/#comments</comments>
		<pubDate>Wed, 20 Apr 2011 13:17:49 +0000</pubDate>
		<dc:creator>remixtech</dc:creator>
				<category><![CDATA[Indy components]]></category>
		<category><![CDATA[delphi]]></category>
		<category><![CDATA[indy]]></category>
		<category><![CDATA[pop3]]></category>
		<category><![CDATA[pop3 server]]></category>
		<category><![CDATA[source code]]></category>
		<category><![CDATA[tidpop3]]></category>

		<guid isPermaLink="false">http://blog.onkeysoft.com/?p=32</guid>
		<description><![CDATA[In this first post about Indy components, I will explain you how I prepare a connection to a POP3 Server. Indy components are a bit strange, sometimes buggy as Hell, sometimes very slow but this is also free components delivered with Delphi! I-Mail, my software is using Indy components, I have made several changes and [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.onkeysoft.com/wp-content/uploads/2011/04/fu_delphi.jpg"><img class="aligncenter size-full wp-image-35" title="Delphi Indy" src="http://blog.onkeysoft.com/wp-content/uploads/2011/04/fu_delphi.jpg" alt="" width="280" height="211" /></a></p>
<p>In this first post about Indy components, I will explain you how I prepare a connection to a POP3 Server. Indy components are a bit strange, sometimes buggy as Hell, sometimes very slow but this is also free components delivered with Delphi!<strong> </strong>I-Mail, my software is using Indy components, I have made several changes and discover some tricks and I would like to share my discovery with you.</p>
<p>You could find the last development snapshot of Indy on this <a href="http://indy.fulgan.com/" target="_blank">page</a>, and SSL dll files on this <a href="ftp://indy.fulgan.com/SSL/" target="_blank">page</a>.<br />
The goal of this small piece of code is to prepare the connection for a future communication with a TIDPop3 account. It is explain how to use SSL/TLS, APOP, SASL mechanisms.</p>
<pre>
function Thread_POP3.Prepare: boolean;
var
  POP3Client:     TIdPOP3;
  con_SSLHandler: TIdSSLIOHandlerSocketOpenSSL;
begin

  result := true;
  try
    // All the pointer point to nothing in memory !
    con_sasl_anonymous := nil;
    con_sasl_md5       := nil;
    con_sasl_sh1       := nil;
    con_sasl_otp       := nil;
    con_sasl_login     := nil;
    con_sasl_plain     := nil;
    con_sasl_key       := nil;
    con_user_pass      := nil;
    con_SSLHandler     := nil;
    con_sasl_encours   := nil;

    // First thing to do is to create the Object
    POP3Client := TIdPOP3.Create(nil);
    // I want to receover the event status !
    POP3Client.OnStatus := POP3Status;

    // Do you want to use a secure connection ? Dont forget to add SSL library in the folder
    if Do_You_Want_SSL / TLS then
    begin
      con_SSLHandler       := TIdSSLIOHandlerSocketOpenSSL.Create(); // Creating the SSL Handler
      POP3Client.IOHandler := con_SSLHandler; // We want to use the SSLHandler
      POP3Client.UseTLS    := TIdUseTLS(0); // Here No SLL IOHandler (0)
      { TIdUseTLS = (
        utNoTLSSupport,
        utUseImplicitTLS, // ssl iohandler req, allways tls
        utUseRequireTLS, // ssl iohandler req, user command only accepted when in tls
        utUseExplicitTLS // < user can choose to use tls
        ); }
    end;

    // Now it's time to fill all the property needed for connection
    with POP3Client do
    begin
      AutoLogin      := false; // If you don't want to login when connect
      ConnectTimeout := 2500; // How much time before TimeOut
      Username       := FAccount.Username; // Username on the Server
      Password       := FAccount.Password; // Password on the Server
      Host           := FAccount.Serveur; // Host
      Port           := FAccount.Port; // Port
      AuthType       := TIdPOP3AuthenticationType(0); // how do you want to authentificate
      { TIdPOP3AuthenticationType = (patUserPass, patAPOP, patSASL); }
    end;

    // WARNING : FAccount is a specifi object in my software, you need to replace these values by yours.

    // If we are using SASL login
    if POP3Client.AuthType = patSASL then
    begin

      con_user_pass := TIdUserPassProvider.Create(nil); // Username and Paswword Login

      with con_user_pass do
      begin
        Username := FAccount.Username;
        Password := FAccount.Password;
      end;

      // What sort of SASL Mechanism ?
      case FAccount.Authent_SASL of
        SASLAnonymous:
          begin // Anonymous
            con_sasl_anonymous                 := TIdSASLAnonymous.Create(nil);
            POP3Client.SASLMechanisms.Add.SASL := tidsasl(con_sasl_anonymous);
          end;

        SASLCRAMMD5:
          begin // Cramm MD5
            con_sasl_md5                       := TIdSASLCRAMMD5.Create(nil);
            con_sasl_md5.UserPassProvider      := con_user_pass;
            POP3Client.SASLMechanisms.Add.SASL := tidsasl(con_sasl_md5);
          end;

        SASLCRAMSHA1:
          begin // Cramm SH1
            con_sasl_sh1                       := TIdSASLCRAMSHA1.Create(nil);
            con_sasl_sh1.UserPassProvider      := con_user_pass;
            POP3Client.SASLMechanisms.Add.SASL := tidsasl(con_sasl_sh1);
          end;

        SASLOTP:
          begin // SASL Otp
            con_sasl_otp                       := TIdSASLOTP.Create(nil);
            con_sasl_otp.UserPassProvider      := con_user_pass;
            POP3Client.SASLMechanisms.Add.SASL := tidsasl(con_sasl_otp);
          end;

        SASLLogin:
          begin // SASL Login
            con_sasl_login                     := TIdSASLLogin.Create(nil);
            con_sasl_login.UserPassProvider    := con_user_pass;
            POP3Client.SASLMechanisms.Add.SASL := tidsasl(con_sasl_login);
          end;

        SASLPlain:
          begin // SASL Plain
            con_sasl_plain                     := TIdSASLPlain.Create(nil);
            con_sasl_plain.UserPassProvider    := con_user_pass;
            con_sasl_plain.LoginAs             := FAccount.Authent_LoginAs;
            POP3Client.SASLMechanisms.Add.SASL := tidsasl(con_sasl_plain);
          end;

        SASLSKey:
          begin // SASL Key
            con_sasl_key                       := TIdSASLSKey.Create(nil);
            con_sasl_key.UserPassProvider      := con_user_pass;
            POP3Client.SASLMechanisms.Add.SASL := tidsasl(con_sasl_key);
          end;
      end;

    end;
  except
    result := false;
  end;
end;
</pre>
<p><strong></strong></p>
<p><strong><br />
See you next week for a new tutorial.<br />
</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.onkeysoft.com/2011/04/20/how-to-prepare-a-connection-to-pop3-server-with-indy-tidpop3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>L&#8217;Europe, Noir désir</title>
		<link>http://blog.onkeysoft.com/2011/04/20/leurope-noir-desir/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=leurope-noir-desir</link>
		<comments>http://blog.onkeysoft.com/2011/04/20/leurope-noir-desir/#comments</comments>
		<pubDate>Wed, 20 Apr 2011 12:35:38 +0000</pubDate>
		<dc:creator>remixtech</dc:creator>
				<category><![CDATA[Musique]]></category>
		<category><![CDATA[des visages des figures]]></category>
		<category><![CDATA[l'europe]]></category>
		<category><![CDATA[musique]]></category>
		<category><![CDATA[noir désir]]></category>

		<guid isPermaLink="false">http://blog.onkeysoft.com/?p=29</guid>
		<description><![CDATA[&#160; &#160; Les sangliers sont lachés Je répète : les sangliers sont lachés. Les petits patrons font les grandes rivières de diamant. Deux fois. Les roses de l&#8217;Europe sont le festin de Satan. Je répète : les roses de l&#8217;Europe sont le festin de Satan. Nous travaillons actuellement pour l&#8217;Europe. x4 Voire pour le monde. [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp;</p>
<p style="text-align: center;"><iframe title="YouTube video player" width="480" height="390" src="http://www.youtube.com/embed/YUtPvT_cv-M" frameborder="0" allowfullscreen></iframe></p>
<p>&nbsp;</p>
<blockquote><p>Les sangliers sont lachés<br />
Je répète :<br />
les sangliers sont lachés.</p>
<p>Les petits patrons font les grandes rivières de diamant.<br />
Deux fois.</p>
<p>Les roses de l&#8217;Europe sont le festin de Satan.<br />
Je répète :<br />
les roses de l&#8217;Europe sont le festin de Satan.</p>
<p>Nous travaillons actuellement pour l&#8217;Europe. x4<br />
Voire pour le monde.</p>
<p>Chère vieille Europe, cher vieux continent, putain autoritaire,<br />
aristocrate et libertaire, bourgeoise et ouvrière,<br />
pourpre et pomponnée de grands siècles et colosses titubants.<br />
Regarde tes épaules voûtées, pas moyen d&#8217;épousseter d&#8217;un seul geste,<br />
d&#8217;un seul, les vieilles pellicules, les peaux mortes d&#8217;hier et tabula rasa&#8230;<br />
D&#8217;ici on pourrait croire à de la pourriture noble et en suspention.<br />
il flotte encore dans l&#8217;air de cette odeur de soufre. Sale vieille Europe,<br />
celle qui entre deux guerres et même encore pendant caressait pour son bien<br />
le ventre des pays de ses lointains ailleurs et la bite à la main<br />
arrosait de son sperme les sexes autochtones.<br />
On se relève de ça ? On se relève de tout même des chutes sans fond.<br />
Nous avons su monter nous avons su descendre, nous pouvons arrêter<br />
et nous pouvons reprendre&#8230;<br />
Europe des lumières ou alors des ténèbres ;<br />
à peine des lucioles dans les théâtres d&#8217;ombre.<br />
A peine une étincelle dans la nuit qui s&#8217;installe et puis se ressaisit,<br />
et puis l&#8217;aube nouvelle, après les crimes d&#8217;enfance,<br />
les erreurs de jeunesse on n&#8217;arrache plus les ailes des libellules d&#8217;or.</p>
<p>Nous travaillons actuellement pour l&#8217;Europe.<br />
Voire pour le monde.</p>
<p>Amnistie, amnistie ou alors amnésie, qu&#8217;est-ce que vous volez que ça foute,<br />
de toutes façons il faut bien avancer, pressons le pas camarade<br />
et puis réalisons réalisons, il en restera toujours quelque chose allez !<br />
Matérialiste alors ça fait qu&#8217;au moins on est sûr de n&#8217;pas de tromper,<br />
et du tangible alors jusqu&#8217;à l&#8217;indigestion, du rationnel alors<br />
et jusqu&#8217;à en crever, des logiques implacables mais toujours pas de sens&#8230;<br />
Eh princesse de l&#8217;Histoire dans sa marche forcée,<br />
on finit par se perdre en passant sous tes arches multiséculaires.</p>
<p>Voire pour le monde.<br />
Nous travaillons actuellement pour l&#8217;Europe.</p>
<p>On est passé de tes arcanes passées, passé de tes arcanes passées,<br />
on est passé de tes arcanes passées, aux charmes technocrates&#8230;<br />
Alors l&#8217;Europe alors l&#8217;Europe alors l&#8217;Europe.<br />
Bruxelles, Schengen, Stasbourg, Maastricht, PIB, PIB, CEE, Euratom, OCDE et GATT.<br />
Protégez-nous marché de cet AMI commun d&#8217;un monde si petit.<br />
Euromonnaie unique, Nasdaq et CAC 40, orgiaque, idyllique, faites de la poésie,<br />
soutenez la culture, produisez du spectacle et de l&#8217;entertainment<br />
comme on dit chez nos frères d&#8217;Outre-Atlantique et toc anciens Européens,<br />
nouveaux maîtres du monde pendant que le dragon asiatique rêve, fait ses étirements,<br />
il est beau et puissant, crache du feu gentillement.<br />
Pendant qu&#8217;Ernest Antoine Seillière fait son apparition et nous déclare sa flamme<br />
il nous aime et nous dit :<br />
&#8221; Nous ne sommes pas comme les politiques soumis à la pression de la rue. &#8221;<br />
Et on entend au loin résonner les clameurs de la foule,<br />
les beaux mouvements d&#8217;ensemble, les défilés glorieux et puis la lutte des classes.<br />
Et maintenant c&#8217;est sérieux, eh bébé, c&#8217;est sérieux, on ne croit plus en rien,<br />
nous montons de toutes pièces ce buisness et Basta, on chevauche pas Pégase<br />
ça c&#8217;était pour l&#8217;extase c&#8217;est fini.<br />
Extension, expansion si possible, mais pas de rêve à porter seulement des dynamiques.<br />
D&#8217;abord la thune, bébé et le reste suivra et le reste viendra c&#8217;est ce qu&#8217;on dit<br />
je crois en cette époque là bénie des globophages.<br />
Chère vieille Europe, ta tête connaît à peine tes jambes qui souvent<br />
ne comprennent pas tes bras comment ça marche encore déjà.<br />
Comment ça marche un corps étranger à son corps on n&#8217;sait pas on s&#8217;en fout<br />
on s&#8217;embrasse quand même et puis on a raison.<br />
Sale vieille Europe, te souviens-tu de la force brutale, occident mal luné,<br />
guerre brûlante, guerre froide, et enfin de guerre lasse et enfin de guerre lasse.</p>
<p>Nous travaillons actuellement pour l&#8217;Europe.</p>
<p>En veux-tu en voilà des écoles de la performance et voilà des patrons<br />
créateurs du Global buisness dialogue ou Electronic commerce<br />
pour s&#8217;asseoir en gloussant sur toutes les exceptions à commencer<br />
par ce truc machin culturel.</p>
<p>Histoires de producteurs et de consommateurs, du producteur au consommateur,<br />
du producteur au consommateur, et des intermédiaires à plus savoir qu&#8217;en foutre,<br />
toute ton âme s&#8217;est usée sur ce chemin sans fin et sur ce va et vient on y va,<br />
nous aussi, profiter, pas de raison, après tout ça ira,<br />
on n&#8217;en aura pour tout le monde, y&#8217;en aura pour tout le monde,<br />
on a dit pour tout le monde, pour tout le monde, pour tout l&#8217;monde et mon cul !</p>
<p>A quelle hauteur vas-tu ériger tes remparts ?<br />
Où vas-tu repousser tes nouveaux murs d&#8217;enceinte ?</p>
<p>Quelque chose est resté en travers de la gorge et nous voulons cracher<br />
c&#8217;est la moindre des choses mais vous pouvez, madame,<br />
vous adresser à nous car tout n&#8217;est pas perdu non tout n&#8217;est pas perdu<br />
de vos mythes d&#8217;aurore ici le soleil brille pour tous et on y croit.</p>
<p>Nous travaillons actuellement pour l&#8217;Europe.<br />
Voire pour le monde.</p>
<p>Quelque chose est resté en travers de la gorge et nous voulons cracher<br />
c&#8217;est la moindre des choses mais vous pouvez, madame,<br />
vous adresser à nous car tout n&#8217;est pas perdu non tout n&#8217;est pas perdu<br />
de vos mythes d&#8217;aurore ici le soleil brille pour tous et on y croit.</p>
<p>La vérole sur vos gueules<br />
Je répète :<br />
la vérole sur vos gueules.<br />
Les soupirs de la sainte et les cris de la fée<br />
ne sont plus entendus au banquet des banquiers.<br />
Une fois.<br />
La marmite de l&#8217;ermite est remplie de rubis.<br />
Je répète :<br />
la marmite de l&#8217;ermite est remplie de rubis.</p>
<p>La vieille Europe est la maquerelle des ballets roses.<br />
Deux fois.<br />
Quand les sirènes se taisent, les rapaces gueulent.<br />
Le rouge et le noir des tortures sont les fleurs du mal.<br />
Je répète :<br />
le rouge et le noir des tortures sont les fleurs du mal.</p>
<p>Le jour de l&#8217;Occident est la nuit de l&#8217;Orient.<br />
Deux fois.<br />
Le jour de l&#8217;Occident est la nuit de l&#8217;Orient.</p>
<p>Je ne suis pas chauvine mais la France est quand même la reine des fromages.<br />
Tryphon Tournesol est un zouave.<br />
Six fois.<br />
Le sang versé est la tasse de thé des géants de la foire.<br />
Deux fois.<br />
Il pleut des cordes sur la Concorde.<br />
Il pleut des cordes sur la Concorde.<br />
Les petites filles modèles sont les élues de l&#8217;Europe.<br />
Je répète :<br />
les petites filles modèles sont les élues de l&#8217;Europe.<br />
Merde à la sûreté.<br />
Deux fois.<br />
La folie des grandeurs tue les merles moqueurs.<br />
Je répète :<br />
la folie des grandeurs tue les merles moqueurs.<br />
Si vous ne trouvez plus rien cherchez autre chose.</p>
<p>Paix en Suisse.<br />
Je répète :<br />
paix en Suisse.<br />
Les noces de sang incendient l&#8217;horizon.<br />
Deux fois.<br />
Le rimel de l&#8217;Europe coule sur les plastrons.<br />
Deux fois.</p>
<p>La vie commence maintenant, et maintenant, et maintenant.</p>
<p>L&#8217;Europe est une petite déesse mortelle.<br />
Deux fois.</p>
<p>L&#8217;enfance de l&#8217;art est un lever de soleil.<br />
Je répète :<br />
l&#8217;enfance de l&#8217;art est un lever de soleil.</p>
<p>Nous travaillons actuellement pour l&#8217;Europe&#8230;</p>
<p>&nbsp;</p></blockquote>
<p><strong>Noir désir, &#8220;Des visage des figures&#8221;, Bertrand Cantat, Brigitte Fontaine</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.onkeysoft.com/2011/04/20/leurope-noir-desir/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
