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

Karl Reynolds kreynolds at chocfishsoft.co.nz
Tue Feb 16 16:18:39 NZDT 2010


>  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



More information about the Delphi mailing list