[DUG] Is it a bug in latest version of Delphi?

Kyley Harris Kyley at harrissoftware.com
Tue Feb 16 16:45:08 NZDT 2010


Its not Friday is it?

On Tue, Feb 16, 2010 at 4:43 PM, Kyley Harris <Kyley at harrissoftware.com>wrote:

> I'll add my cents..
>
> under Delphi 7, getlasterror returns error 1413 as Karl said.. under Delphi
> 2007 no errors whatsoever. whats clear is that Getlasterror is unlreliable
> in this situation as Microsoft says, because microsoft online help says the
> getlasterror value cannot be controlled depending on OS and device and only
> the -1 is reliable as an answer.
> testing the index as Jolyon first said is the only guaranteed method to
> ensure there should be a correct data value.
>
> curious that the same code under D7 doesnt get the same result as d2007
> when they are both accessing api calls. some kind of registered handler
> hiding?
>
>
>
> On Tue, Feb 16, 2010 at 4:36 PM, Jolyon Smith <jsmith at deltics.co.nz>wrote:
>
>> But since we're talking about behavior in the OS not the VCL or compiler,
>> more pertinent perhaps is the OS:
>>
>> I'm running on a fully SP'd and updated Windows XP
>>
>> Are you running Vista/Windows 7 by any chance
>>
>>
>> > -----Original Message-----
>> > From: delphi-bounces at delphi.org.nz [mailto:delphi-
>> > bounces at delphi.org.nz] On Behalf Of Karl Reynolds
>> > Sent: Tuesday, 16 February 2010 4:19 p.m.
>> > To: NZ Borland Developers Group - Delphi List
>> > Subject: Re: [DUG] Is it a bug in latest version of Delphi?
>> >
>> > >  r := SendMessage(Listbox1.Handle, LB_GETITEMDATA, 100, 0);
>> > >  if GetLastError <> 0 then
>> > >    RaiseLastOSError;
>> > >
>> > >  if r = -1 then
>> > >    ShowMessage('oops');
>> > >
>> > >
>> > > Will yield only the "oops" message, no OS error.
>> >
>> > Tested this code too. I get a system error, "invalid index".
>> >
>> > How odd.
>> >
>> > Cheers,
>> > Karl
>> >
>> > _______________________________________________
>> > NZ Borland Developers Group - Delphi mailing list
>> > Post: delphi at delphi.org.nz
>> > Admin: http://delphi.org.nz/mailman/listinfo/delphi
>> > Unsubscribe: send an email to delphi-request at delphi.org.nz with
>> > Subject: unsubscribe
>>
>>
>> _______________________________________________
>> NZ Borland Developers Group - Delphi mailing list
>> Post: delphi at delphi.org.nz
>> Admin: http://delphi.org.nz/mailman/listinfo/delphi
>> Unsubscribe: send an email to delphi-request at delphi.org.nz with Subject:
>> unsubscribe
>>
>
>
>
> --
> Kyley Harris
> Harris Software
> +64-21-671-821
>



-- 
Kyley Harris
Harris Software
+64-21-671-821
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserver.123.net.nz/pipermail/delphi/attachments/20100216/d1ba01eb/attachment.html 


More information about the Delphi mailing list