i have both versions of delphi on the same machine. ran both tests at the same time. weird<br><br><div class="gmail_quote">On Tue, Feb 16, 2010 at 7:43 PM, Edward Koryagin <span dir="ltr">&lt;<a href="mailto:ed_iv2001@yahoo.co.nz">ed_iv2001@yahoo.co.nz</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Versions of comctrl32.dll ??<br>
<br>
Edward Koryagin<br>
<br>
<br>
--- On Tue, 16/2/10, Kyley Harris &lt;<a href="mailto:Kyley@harrissoftware.com">Kyley@harrissoftware.com</a>&gt; wrote:<br>
<br>
&gt; From: Kyley Harris &lt;<a href="mailto:Kyley@harrissoftware.com">Kyley@harrissoftware.com</a>&gt;<br>
<div class="im">&gt; Subject: Re: [DUG] Is it a bug in latest version of Delphi?<br>
</div>&gt; To: &quot;NZ Borland Developers Group - Delphi List&quot; &lt;<a href="mailto:delphi@delphi.org.nz">delphi@delphi.org.nz</a>&gt;<br>
&gt; Received: Tuesday, 16 February, 2010, 5:03 PM<br>
<div><div></div><div class="h5">&gt; the fact that it behaves different under<br>
&gt; delphi 7 and Delphi 2007 on the same machine implies that<br>
&gt; there is some strange mystery at work in the compiled code<br>
&gt; that is not obvious. its not a direct problem of the<br>
&gt; underlying windows API.<br>
&gt;<br>
&gt; As to using the GetLastError.. <br>
&gt; There is issue I have with relying on that<br>
&gt; rather than the -1. The MSDN documentation states that not<br>
&gt; all routines need to or are required to call SetLastError(0)<br>
&gt; on success, and only set it on failure. the value -1 is what<br>
&gt; you are supposed to analyze to determine IF you should check<br>
&gt; GetLastError. GetLastError is not the first test. Clearly<br>
&gt; microsoft does not intend the storage to be used for<br>
&gt; negative values even if some appear to work.<br>
&gt;<br>
&gt; if you rely on GetLastError rather than the -1.<br>
&gt; you may get a true value of &quot;3&quot; but getlasterror<br>
&gt; was not reset from some other call and you can get a false<br>
&gt; fail.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; On Tue, Feb 16, 2010 at 4:55 PM,<br>
&gt; Karl Reynolds &lt;<a href="mailto:kreynolds@chocfishsoft.co.nz">kreynolds@chocfishsoft.co.nz</a>&gt;<br>
&gt; wrote:<br>
&gt;<br>
&gt; On Tue, Feb 16, 2010 at 4:43 PM, Kyley<br>
&gt; Harris &lt;<a href="mailto:Kyley@harrissoftware.com">Kyley@harrissoftware.com</a>&gt;<br>
&gt; wrote:<br>
&gt;<br>
&gt; &gt; I&#39;ll add my cents..<br>
&gt;<br>
&gt; &gt; under Delphi 7, getlasterror returns error 1413 as<br>
&gt; Karl said.. under Delphi<br>
&gt;<br>
&gt; &gt; 2007 no errors whatsoever. whats clear is that<br>
&gt; Getlasterror is unlreliable<br>
&gt;<br>
&gt; &gt; in this situation as Microsoft says, because microsoft<br>
&gt; online help says the<br>
&gt;<br>
&gt; &gt; getlasterror value cannot be controlled depending on<br>
&gt; OS and device and only<br>
&gt;<br>
&gt; &gt; the -1 is reliable as an answer.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Except that -1 isn&#39;t reliable because, as already<br>
&gt; discussed, it could<br>
&gt;<br>
&gt; be a valid data value. I would in fact expect the code<br>
&gt; returned to<br>
&gt;<br>
&gt; vary by OS and device (and that&#39;s what RaiseLastOSError<br>
&gt; is for) but I<br>
&gt;<br>
&gt; really didn&#39;t expect there to be an OS or device on<br>
&gt; which an<br>
&gt;<br>
&gt; LB_GETITEMDATA request out of the range of the listbox<br>
&gt; wasn&#39;t an<br>
&gt;<br>
&gt; error! Evidently I&#39;m too trusting or something.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Under the circumstances, checking the bounds first seems<br>
&gt; necessary.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Cheers,<br>
&gt;<br>
&gt; Karl<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt;<br>
&gt; NZ Borland Developers Group - Delphi mailing list<br>
&gt;<br>
&gt; Post: <a href="mailto:delphi@delphi.org.nz">delphi@delphi.org.nz</a><br>
&gt;<br>
&gt; Admin: <a href="http://delphi.org.nz/mailman/listinfo/delphi" target="_blank">http://delphi.org.nz/mailman/listinfo/delphi</a><br>
&gt;<br>
&gt; Unsubscribe: send an email to <a href="mailto:delphi-request@delphi.org.nz">delphi-request@delphi.org.nz</a><br>
&gt; with Subject: unsubscribe<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Kyley Harris<br>
&gt; Harris Software<br>
&gt; +64-21-671-821<br>
&gt;<br>
&gt;<br>
&gt;<br>
</div></div>&gt; -----Inline Attachment Follows-----<br>
<div><div></div><div class="h5">&gt;<br>
&gt; _______________________________________________<br>
&gt; NZ Borland Developers Group - Delphi mailing list<br>
&gt; Post: <a href="mailto:delphi@delphi.org.nz">delphi@delphi.org.nz</a><br>
&gt; Admin: <a href="http://delphi.org.nz/mailman/listinfo/delphi" target="_blank">http://delphi.org.nz/mailman/listinfo/delphi</a><br>
&gt; Unsubscribe: send an email to <a href="mailto:delphi-request@delphi.org.nz">delphi-request@delphi.org.nz</a><br>
&gt; with Subject: unsubscribe<br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
NZ Borland Developers Group - Delphi mailing list<br>
Post: <a href="mailto:delphi@delphi.org.nz">delphi@delphi.org.nz</a><br>
Admin: <a href="http://delphi.org.nz/mailman/listinfo/delphi" target="_blank">http://delphi.org.nz/mailman/listinfo/delphi</a><br>
Unsubscribe: send an email to <a href="mailto:delphi-request@delphi.org.nz">delphi-request@delphi.org.nz</a> with Subject: unsubscribe<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Kyley Harris<br>Harris Software<br>+64-21-671-821<br>