<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments for JEDI Windows API</title>
	<atom:link href="http://blog.delphi-jedi.net/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.delphi-jedi.net</link>
	<description>Joint Endeavor of Delphi Innovators of Windows Programming</description>
	<lastBuildDate>Mon, 15 Mar 2010 07:44:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Comment on Site Recommendation: History of Windows by glh</title>
		<link>http://blog.delphi-jedi.net/2010/03/13/site-recommondation-history-of-windows/comment-page-1/#comment-36401</link>
		<dc:creator>glh</dc:creator>
		<pubDate>Mon, 15 Mar 2010 07:44:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.delphi-jedi.net/?p=697#comment-36401</guid>
		<description>Yes, it is known that the first versions Windows were development with use Pascal.
At Microsoft there was a product - QuickPascal.
Working out QuickPascal has been stopped in exchange for the termination of working out Borland TurboBasic.
PS. Sorry for computer translate.</description>
		<content:encoded><![CDATA[<p>Yes, it is known that the first versions Windows were development with use Pascal.<br />
At Microsoft there was a product &#8211; QuickPascal.<br />
Working out QuickPascal has been stopped in exchange for the termination of working out Borland TurboBasic.<br />
PS. Sorry for computer translate.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on What is GetEffectiveRightsFromAcl for? by &#160; What is GetEffectiveRightsFromAcl for? #2&#160;by&#160;JEDI Windows API</title>
		<link>http://blog.delphi-jedi.net/2008/09/10/what-is-geteffectiverightsfromacl-for/comment-page-1/#comment-36322</link>
		<dc:creator>&#160; What is GetEffectiveRightsFromAcl for? #2&#160;by&#160;JEDI Windows API</dc:creator>
		<pubDate>Sat, 13 Mar 2010 21:10:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.delphi-jedi.net/?p=260#comment-36322</guid>
		<description>[...] long time ago I wrote an article about this strange WinAPI function called GetEffectiveRightsFromAcl. There was a problem that I [...]</description>
		<content:encoded><![CDATA[<p>[...] long time ago I wrote an article about this strange WinAPI function called GetEffectiveRightsFromAcl. There was a problem that I [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Site Recommendation: History of Windows by Yogi Yang</title>
		<link>http://blog.delphi-jedi.net/2010/03/13/site-recommondation-history-of-windows/comment-page-1/#comment-36289</link>
		<dc:creator>Yogi Yang</dc:creator>
		<pubDate>Sat, 13 Mar 2010 10:42:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.delphi-jedi.net/?p=697#comment-36289</guid>
		<description>What you have highlited applies even today.

If EMB will slash prices of Delphi to 1/4 of what it is today it will surely bring in more users just as its ancestors (borland) did to enter the market and broke all records!</description>
		<content:encoded><![CDATA[<p>What you have highlited applies even today.</p>
<p>If EMB will slash prices of Delphi to 1/4 of what it is today it will surely bring in more users just as its ancestors (borland) did to enter the market and broke all records!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Security Library by Random Active Directory Notes &#124; RemkoWeijnen.nl</title>
		<link>http://blog.delphi-jedi.net/security-library/comment-page-1/#comment-36137</link>
		<dc:creator>Random Active Directory Notes &#124; RemkoWeijnen.nl</dc:creator>
		<pubDate>Wed, 10 Mar 2010 10:20:45 +0000</pubDate>
		<guid isPermaLink="false">http://jedi-apilib.sourceforge.net/blog/security-library/#comment-36137</guid>
		<description>[...] notes that I made while creating this stuff. The intention is to publish the whole unit in the Jedi Security Library when it&#8217;s [...]</description>
		<content:encoded><![CDATA[<p>[...] notes that I made while creating this stuff. The intention is to publish the whole unit in the Jedi Security Library when it&#8217;s [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Programming Habits by Wouter van Nifterick</title>
		<link>http://blog.delphi-jedi.net/2010/01/14/programming-habits/comment-page-1/#comment-35850</link>
		<dc:creator>Wouter van Nifterick</dc:creator>
		<pubDate>Sat, 06 Mar 2010 02:57:07 +0000</pubDate>
		<guid isPermaLink="false">http://blog.delphi-jedi.net/?p=612#comment-35850</guid>
		<description>Side note: you could use SysUtils.Win32Check to make your code a bit easier to read:

procedure MyImpersonateUserToken(UserName : String; out UserData : PUserData);
begin
  //get user token here
  Win32Check(GetUserToken);
  //get user information from token here and store it into UserData
  Win32Check(GetTokenInformation); 

  Win32Check(ImpersonateLoggedOnUser(token));
  ...
end;</description>
		<content:encoded><![CDATA[<p>Side note: you could use SysUtils.Win32Check to make your code a bit easier to read:</p>
<p>procedure MyImpersonateUserToken(UserName : String; out UserData : PUserData);<br />
begin<br />
  //get user token here<br />
  Win32Check(GetUserToken);<br />
  //get user information from token here and store it into UserData<br />
  Win32Check(GetTokenInformation); </p>
<p>  Win32Check(ImpersonateLoggedOnUser(token));<br />
  &#8230;<br />
end;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on JWSCL and FreeAndNil Second Attempt by Christian Wimmer</title>
		<link>http://blog.delphi-jedi.net/2010/02/25/jwscl-and-freeandnil-second-attempt/comment-page-1/#comment-35382</link>
		<dc:creator>Christian Wimmer</dc:creator>
		<pubDate>Fri, 26 Feb 2010 22:15:16 +0000</pubDate>
		<guid isPermaLink="false">http://blog.delphi-jedi.net/?p=665#comment-35382</guid>
		<description>Yes, I talked about this in comment #5. Unfortunately, increasing the size is not going to solve this problem. It just makes it less probably.</description>
		<content:encoded><![CDATA[<p>Yes, I talked about this in comment #5. Unfortunately, increasing the size is not going to solve this problem. It just makes it less probably.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on JWSCL and FreeAndNil Second Attempt by Ritsaert Hornstra</title>
		<link>http://blog.delphi-jedi.net/2010/02/25/jwscl-and-freeandnil-second-attempt/comment-page-1/#comment-35381</link>
		<dc:creator>Ritsaert Hornstra</dc:creator>
		<pubDate>Fri, 26 Feb 2010 21:59:17 +0000</pubDate>
		<guid isPermaLink="false">http://blog.delphi-jedi.net/?p=665#comment-35381</guid>
		<description>You should not set GuardPtr to the base address (what if there is a valid address in front and the pointer is accessed for some negative offset first (like a string, dyn array etc). You would not catch that. Place it somewhere in the middle of the whole page and you will protect yourself to positive and negative offsets.

You might want to allocate moe that a single page. Consider the following:

type
  TSomething = class
  public
    FA: array [0..9999999] of Byte;
    FB: Integer;
  end;

var
  L: TSomething;
begin
  L := nil;
  L.FB := 9999; 

// this might even succeed because you will acess the base pointer plus 9999999 + 1 + sizeof( Pointer ) = address 10000004. You will have the same problem with your guarded page...</description>
		<content:encoded><![CDATA[<p>You should not set GuardPtr to the base address (what if there is a valid address in front and the pointer is accessed for some negative offset first (like a string, dyn array etc). You would not catch that. Place it somewhere in the middle of the whole page and you will protect yourself to positive and negative offsets.</p>
<p>You might want to allocate moe that a single page. Consider the following:</p>
<p>type<br />
  TSomething = class<br />
  public<br />
    FA: array [0..9999999] of Byte;<br />
    FB: Integer;<br />
  end;</p>
<p>var<br />
  L: TSomething;<br />
begin<br />
  L := nil;<br />
  L.FB := 9999; </p>
<p>// this might even succeed because you will acess the base pointer plus 9999999 + 1 + sizeof( Pointer ) = address 10000004. You will have the same problem with your guarded page&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on JWSCL and FreeAndNil Second Attempt by Oliver</title>
		<link>http://blog.delphi-jedi.net/2010/02/25/jwscl-and-freeandnil-second-attempt/comment-page-1/#comment-35365</link>
		<dc:creator>Oliver</dc:creator>
		<pubDate>Fri, 26 Feb 2010 17:06:16 +0000</pubDate>
		<guid isPermaLink="false">http://blog.delphi-jedi.net/?p=665#comment-35365</guid>
		<description>I loves my CPP :mrgreen:

What can I say. A preprocessor could make a huge difference here, because it would allow to inject information into the debug builds at compile time that don&#039;t require extra magic in the compiler ...

This way you cannot only keep a list of allocated blocks without requiring the compiler to offer that, you can even tell where (source file and line) a certain block originated, whether it was freed, from where (source file and line) it was freed and in the latter case you can mark a pseudo-freed page as reserved (i.e. not committed) and catch the exception. The nice part about it is that you get bounds checking with a little extra of preprocessor help ;)</description>
		<content:encoded><![CDATA[<p>I loves my CPP <img src='http://blog.delphi-jedi.net/wp-includes/images/smilies/icon_mrgreen.gif' alt=':mrgreen:' class='wp-smiley' /> </p>
<p>What can I say. A preprocessor could make a huge difference here, because it would allow to inject information into the debug builds at compile time that don&#8217;t require extra magic in the compiler &#8230;</p>
<p>This way you cannot only keep a list of allocated blocks without requiring the compiler to offer that, you can even tell where (source file and line) a certain block originated, whether it was freed, from where (source file and line) it was freed and in the latter case you can mark a pseudo-freed page as reserved (i.e. not committed) and catch the exception. The nice part about it is that you get bounds checking with a little extra of preprocessor help <img src='http://blog.delphi-jedi.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on JWSCL and FreeAndNil Second Attempt by Christian Wimmer</title>
		<link>http://blog.delphi-jedi.net/2010/02/25/jwscl-and-freeandnil-second-attempt/comment-page-1/#comment-35334</link>
		<dc:creator>Christian Wimmer</dc:creator>
		<pubDate>Fri, 26 Feb 2010 09:10:19 +0000</pubDate>
		<guid isPermaLink="false">http://blog.delphi-jedi.net/?p=665#comment-35334</guid>
		<description>&quot;The best solution is to find your bad pointer before release. This is why I keep suggesting that FreeAndNil become MORE common, and Embarcadero add a compiler flag that injects code EVERY time a pointer is dereferenced – if it is nil, throw an exception&quot;, well, this approach would upset a lot of people who want fast processing. So I think we could wait for it a long time.

&quot;This would actually help catch attempting to use invalidated pointers.&quot;, and what about this code above? It has the same effect. It works now, we don&#039;t have to wait. 

&quot;You’ve just created a second class of invalided pointer that will ultimately need its own “Assigned” function, which basically just puts the whole thing back where it was started (because Assigned no longer works, it might even be a step backwards)&quot;. Well, everything it crackable if you have enough effort. If one doesn&#039;t like it then one can switch it off. I won&#039;t force it because it is merely an aid to find &quot;bad design&quot; accesses after freeing a pointer. If you create an adapted Assigned then you shoot yourself into the foot (You could have switched it off btw.). But how to make it fool proof? Easy, put it into the operating system. But then many applications won&#039;t work anymore...so we&#039;re stuck with it.

&quot;Additionally, have you taken in to account that object instance pointers have negative offset members, and can have positive offset fields that are larger than your single allocated block? Will referencing them perhaps risk getting past your trap?&quot; Well, it was a first design. I still can increase the memory block and set the GuardPointer address anywhere in the middle of the pages. So there should be enough room. My pages are 4096bytes that should be enough for at least 1000 methods pointers and variables in the vmt. Unfortunately, history repeats itself so we&#039;re are stuck (again) on predicting the future. We need to set some value and hope that it is sufficient. Recall that it is just an aid and not a fool proof concept. 

@GetNativeSystemInfo: Yes, I forgot to mention it. I added the other version for 32bit only so everybody can try it out.</description>
		<content:encoded><![CDATA[<p>&#8220;The best solution is to find your bad pointer before release. This is why I keep suggesting that FreeAndNil become MORE common, and Embarcadero add a compiler flag that injects code EVERY time a pointer is dereferenced – if it is nil, throw an exception&#8221;, well, this approach would upset a lot of people who want fast processing. So I think we could wait for it a long time.</p>
<p>&#8220;This would actually help catch attempting to use invalidated pointers.&#8221;, and what about this code above? It has the same effect. It works now, we don&#8217;t have to wait. </p>
<p>&#8220;You’ve just created a second class of invalided pointer that will ultimately need its own “Assigned” function, which basically just puts the whole thing back where it was started (because Assigned no longer works, it might even be a step backwards)&#8221;. Well, everything it crackable if you have enough effort. If one doesn&#8217;t like it then one can switch it off. I won&#8217;t force it because it is merely an aid to find &#8220;bad design&#8221; accesses after freeing a pointer. If you create an adapted Assigned then you shoot yourself into the foot (You could have switched it off btw.). But how to make it fool proof? Easy, put it into the operating system. But then many applications won&#8217;t work anymore&#8230;so we&#8217;re stuck with it.</p>
<p>&#8220;Additionally, have you taken in to account that object instance pointers have negative offset members, and can have positive offset fields that are larger than your single allocated block? Will referencing them perhaps risk getting past your trap?&#8221; Well, it was a first design. I still can increase the memory block and set the GuardPointer address anywhere in the middle of the pages. So there should be enough room. My pages are 4096bytes that should be enough for at least 1000 methods pointers and variables in the vmt. Unfortunately, history repeats itself so we&#8217;re are stuck (again) on predicting the future. We need to set some value and hope that it is sufficient. Recall that it is just an aid and not a fool proof concept. </p>
<p>@GetNativeSystemInfo: Yes, I forgot to mention it. I added the other version for 32bit only so everybody can try it out.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on JWSCL and FreeAndNil Second Attempt by Xepol</title>
		<link>http://blog.delphi-jedi.net/2010/02/25/jwscl-and-freeandnil-second-attempt/comment-page-1/#comment-35324</link>
		<dc:creator>Xepol</dc:creator>
		<pubDate>Fri, 26 Feb 2010 04:03:37 +0000</pubDate>
		<guid isPermaLink="false">http://blog.delphi-jedi.net/?p=665#comment-35324</guid>
		<description>The best solution is to find your bad pointer before release.  This is why I keep suggesting that FreeAndNil become MORE common, and Embarcadero add a compiler flag that injects code EVERY time a pointer is dereferenced - if it is nil, throw an exception.  Yes, it would be slow - but as with many other compiler flags, it is not intended for deployable apps - only to improve debugging.

This would actually help catch attempting to use invalidated pointers.

You&#039;ve just created a second class of invalided pointer that will ultimately need its own &quot;Assigned&quot; function, which basically just puts the whole thing back where it was started (because Assigned no longer works, it might even be a step backwards)

Additionally, have you taken in to account that object instance pointers have negative offset members, and can have positive offset fields that are larger than your single allocated block? Will referencing them perhaps risk getting past your trap?

Oh, and if I am reading this right, GetNativeSystemInfo is only supported on WOW64 leading to a small problem with the large number of 32 bit only systems still out there. (that is assuming your GetNativeSystemInfo isn&#039;t a front to provide similar functionality on win32 only systems) 

The whole problem is getting over thought.</description>
		<content:encoded><![CDATA[<p>The best solution is to find your bad pointer before release.  This is why I keep suggesting that FreeAndNil become MORE common, and Embarcadero add a compiler flag that injects code EVERY time a pointer is dereferenced &#8211; if it is nil, throw an exception.  Yes, it would be slow &#8211; but as with many other compiler flags, it is not intended for deployable apps &#8211; only to improve debugging.</p>
<p>This would actually help catch attempting to use invalidated pointers.</p>
<p>You&#8217;ve just created a second class of invalided pointer that will ultimately need its own &#8220;Assigned&#8221; function, which basically just puts the whole thing back where it was started (because Assigned no longer works, it might even be a step backwards)</p>
<p>Additionally, have you taken in to account that object instance pointers have negative offset members, and can have positive offset fields that are larger than your single allocated block? Will referencing them perhaps risk getting past your trap?</p>
<p>Oh, and if I am reading this right, GetNativeSystemInfo is only supported on WOW64 leading to a small problem with the large number of 32 bit only systems still out there. (that is assuming your GetNativeSystemInfo isn&#8217;t a front to provide similar functionality on win32 only systems) </p>
<p>The whole problem is getting over thought.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
