[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: varptr to structs returns bad pointer value
[Thread Prev] | [Thread Next]
- Subject: Re: varptr to structs returns bad pointer value
- From: Jussi Lahtinen <jussi.lahtinen@xxxxxxxxx>
- Date: Tue, 4 Mar 2025 02:20:32 +0200
- To: user@xxxxxxxxxxxxxxxxxxxxxx
> > VarPtr() tries to return the memory address of where the value of a > variable is stored. > > So when you write: > > dataSet = varptr(myData) > > you get the the address of where the value of 'mydata' is stored, not > the address of the 'new MyStruct' object or the address of its contents. > > To get the address of a Gambas object contents, you must use the > 'Object.Data()' static method on the object reference. > > dataSet = Object.Data(myData) But if it is set "myData = New Struct", then will Gambas return an address to something that works like structure in C or Gambas object that works differently..? IE is the pointer usable for external library anyway? Jussi
Re: varptr to structs returns bad pointer value | Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx> |
Re: varptr to structs returns bad pointer value | vuott@xxxxxxxxxxxx |
Re: varptr to structs returns bad pointer value | Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx> |