<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: &#8216;Undocumented&#8217; Win32 in Delphi 2005</title>
	<atom:link href="http://blogs.teamb.com/rudyvelthuis/2005/05/11/4270/feed" rel="self" type="application/rss+xml" />
	<link>http://blogs.teamb.com/rudyvelthuis/2005/05/11/4270</link>
	<description>Rudy Velthuis</description>
	<pubDate>Sat, 11 Feb 2012 15:22:16 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
		<item>
		<title>By: sebastien</title>
		<link>http://blogs.teamb.com/rudyvelthuis/2005/05/11/4270#comment-17</link>
		<dc:creator>sebastien</dc:creator>
		<pubDate>Thu, 18 Aug 2005 06:40:36 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.teamb.com/rudyvelthuis/2005/05/11/657/#comment-17</guid>
		<description>&#60;quote&#62;&lt;br&gt;To me, it is not entirely clear how this could be exploited, but I'm sure that one day, someone will come up with some nifty solution to a problem, using class helpers.&lt;br&gt;&#60;/quote&#62;&lt;br&gt;&lt;br&gt;Suppose you get a third party component not really well written, that does not do any kind of check of its arguments (sound familiar ?). And of course, you have not paid to get the source of this crappy peace of ****&lt;br&gt;&lt;br&gt;Now you was dressed up with Design By Contract in your earlies, so you take the pain to add some assertions _before_ calling the method of this component and maybe some assertions after returning from the method.&lt;br&gt;&lt;br&gt;I think you then get something like this (inspired from the sample given by Marco Cantu in Essential Delphi 8 for .NET) :&lt;br&gt;&lt;br&gt;Let's the component doc says :&lt;br&gt;TMyBuggyComponent :&lt;br&gt;Text : string : blabla&lt;br&gt;procedure DoSomething(arg: TObject) : blabla...&lt;br&gt;&lt;br&gt;You then could write :&lt;br&gt;&#60;code&#62;&lt;br&gt;uses MyBuggyComponent;&lt;br&gt;&lt;br&gt;type&lt;br&gt;    TMyBuggyComponentClassHelper = class Helper for TMyBuggyComponent&lt;br&gt;    public&lt;br&gt;      procedure DoSomething(const arg: string);&lt;br&gt;    end;&lt;br&gt;&lt;br&gt;procedure TMyBuggyComponentClassHelper.DoSomething(const arg: string);&lt;br&gt;begin&lt;br&gt;     assert(arg &#60;&#62; '');&lt;br&gt;     inherited DoSomething(arg);&lt;br&gt;     assert(Text &#60;&#62; '');&lt;br&gt;end;&lt;br&gt;&#60;/code&#62;&lt;br&gt;</description>
		<content:encoded><![CDATA[<p>&lt;quote&gt;<br />
<br />To me, it is not entirely clear how this could be exploited, but I&#8217;m sure that one day, someone will come up with some nifty solution to a problem, using class helpers.<br />
<br />&lt;/quote&gt;</p>
<p>Suppose you get a third party component not really well written, that does not do any kind of check of its arguments (sound familiar ?). And of course, you have not paid to get the source of this crappy peace of ****</p>
<p>Now you was dressed up with Design By Contract in your earlies, so you take the pain to add some assertions _before_ calling the method of this component and maybe some assertions after returning from the method.</p>
<p>I think you then get something like this (inspired from the sample given by Marco Cantu in Essential Delphi 8 for .NET) :</p>
<p>Let&#8217;s the component doc says :<br />
<br />TMyBuggyComponent :<br />
<br />Text : string : blabla<br />
<br />procedure DoSomething(arg: TObject) : blabla&#8230;</p>
<p>You then could write :<br />
<br />&lt;code&gt;<br />
<br />uses MyBuggyComponent;</p>
<p>type<br />
<br />    TMyBuggyComponentClassHelper = class Helper for TMyBuggyComponent<br />
<br />    public<br />
<br />      procedure DoSomething(const arg: string);<br />
<br />    end;</p>
<p>procedure TMyBuggyComponentClassHelper.DoSomething(const arg: string);<br />
<br />begin<br />
<br />     assert(arg &lt;&gt; &#8221;);<br />
<br />     inherited DoSomething(arg);<br />
<br />     assert(Text &lt;&gt; &#8221;);<br />
<br />end;<br />
<br />&lt;/code&gt;<br />
</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrea Raimondi</title>
		<link>http://blogs.teamb.com/rudyvelthuis/2005/05/11/4270#comment-14</link>
		<dc:creator>Andrea Raimondi</dc:creator>
		<pubDate>Wed, 25 May 2005 07:01:29 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.teamb.com/rudyvelthuis/2005/05/11/657/#comment-14</guid>
		<description>I'm unsure if this applies only to D2005 or Delphi 7 too... anyway: you can overload constructors even without marking the parent constructor as &#34;overload&#34;.&lt;br&gt;&lt;br&gt;It compiles, at least :-)&lt;br&gt;&lt;br&gt;Cheers,&lt;br&gt;&lt;br&gt;Andrew</description>
		<content:encoded><![CDATA[<p>I&#8217;m unsure if this applies only to D2005 or Delphi 7 too&#8230; anyway: you can overload constructors even without marking the parent constructor as &quot;overload&quot;.</p>
<p>It compiles, at least :-)</p>
<p>Cheers,</p>
<p>Andrew</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gerrit Beuze</title>
		<link>http://blogs.teamb.com/rudyvelthuis/2005/05/11/4270#comment-11</link>
		<dc:creator>Gerrit Beuze</dc:creator>
		<pubDate>Wed, 11 May 2005 09:34:54 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.teamb.com/rudyvelthuis/2005/05/11/657/#comment-11</guid>
		<description>You might want to check these, but here's a list from memory:&lt;br&gt;&lt;br&gt;#1 default array properties (indexers) can be overloaded (have the same name as long as the array parameter list is &#34;different&#34;&lt;br&gt;&lt;br&gt;#2 identifier escape char &#38; is supported: you might have var &#38;object: TObject;&lt;br&gt;&lt;br&gt;#3 static class methods supported&lt;br&gt;&lt;br&gt;#4 method directive &#34;final&#34; supported (check this!)&lt;br&gt;&lt;br&gt;#5 method directive &#34;inline&#34; supported (but not for .NET !)&lt;br&gt;&lt;br&gt;#6 &#34;class&#34; properties supported: class property InstanceCount: Integer read GetInstanceCount;&lt;br&gt;&lt;br&gt;#7 Compiler hint directive &#34;experimental&#34; supported&lt;br&gt;&lt;br&gt;#8 classes can contain &#34;const&#34; declarations&lt;br&gt;&lt;br&gt;#9 classes can contain &#34;class var&#34; declarations (static fields)&lt;br&gt;&lt;br&gt;#10 classes support the &#34;abstract&#34; and &#34;sealed&#34; directives&lt;br&gt;&lt;br&gt;Gerrit Beuze&lt;br&gt;ModelMaker Tools&lt;br&gt;&lt;a rel="nofollow" target="_new" href="http://www.modelmakertools.com"&gt;http://www.modelmakertools.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</description>
		<content:encoded><![CDATA[<p>You might want to check these, but here&#8217;s a list from memory:</p>
<p>#1 default array properties (indexers) can be overloaded (have the same name as long as the array parameter list is &quot;different&quot;</p>
<p>#2 identifier escape char &amp; is supported: you might have var &amp;object: TObject;</p>
<p>#3 static class methods supported</p>
<p>#4 method directive &quot;final&quot; supported (check this!)</p>
<p>#5 method directive &quot;inline&quot; supported (but not for .NET !)</p>
<p>#6 &quot;class&quot; properties supported: class property InstanceCount: Integer read GetInstanceCount;</p>
<p>#7 Compiler hint directive &quot;experimental&quot; supported</p>
<p>#8 classes can contain &quot;const&quot; declarations</p>
<p>#9 classes can contain &quot;class var&quot; declarations (static fields)</p>
<p>#10 classes support the &quot;abstract&quot; and &quot;sealed&quot; directives</p>
<p>Gerrit Beuze<br />
<br />ModelMaker Tools<br />
<br /><a rel="nofollow" target="_new" href="http://www.modelmakertools.com">http://www.modelmakertools.com</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rossen Assenov</title>
		<link>http://blogs.teamb.com/rudyvelthuis/2005/05/11/4270#comment-2</link>
		<dc:creator>Rossen Assenov</dc:creator>
		<pubDate>Wed, 11 May 2005 09:16:55 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.teamb.com/rudyvelthuis/2005/05/11/657/#comment-2</guid>
		<description>Nested type declarations are also available in Win32 :&lt;br&gt;&lt;br&gt;type &lt;br&gt;  TOuterClass = class&lt;br&gt;  strict private&lt;br&gt;    type&lt;br&gt;      TInnerClass = class&lt;br&gt;      end;&lt;br&gt;  public&lt;br&gt;  end;      &lt;br&gt;</description>
		<content:encoded><![CDATA[<p>Nested type declarations are also available in Win32 :</p>
<p>type<br />
<br />  TOuterClass = class<br />
<br />  strict private<br />
<br />    type<br />
<br />      TInnerClass = class<br />
<br />      end;<br />
<br />  public<br />
<br />  end;<br />
</p>
]]></content:encoded>
	</item>
</channel>
</rss>

