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