[Lazarus] Library function trashing object

Leonardo M. Ramé l.rame at griensu.com
Fri Apr 19 21:15:27 CEST 2013


On 2013-04-19 21:08:29 +0200, Lubos Pintes wrote:
> I probably don't understand. You will be able to change it, I see no
> problem. It is a local variable which can be changed.
> 
> Dňa 19. 4. 2013 20:55 Leonardo M. Ramé wrote / napísal(a):
> >On 2013-04-19 20:52:04 +0200, Lubos Pintes wrote:
> >>I think you could not declare the second parameter of GetData as var
> >>parameter. Because it is then treated as address.
> >>I am not sure what corresponds to C++ unsigned long, perhaps LongWord?
> >>So try to change the second parameter so that it is not a var parameter.
> >>Dňa 19. 4. 2013 19:18 Leonardo M. Ramé wrote / napísal(a):
> >But I need the 2nd param to be changed by the function, that's why I
> >declare it as var.
> >
> 

Well, removing the "var" in the 2nd param, at least allowed avoid the
SIGSEGV. I don't know why, though.

-- 
Leonardo M. Ramé
http://leonardorame.blogspot.com




More information about the Lazarus mailing list