[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: varptr to structs returns bad pointer value


>
> 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

Follow-Ups:
Re: varptr to structs returns bad pointer valueBenoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
Re: varptr to structs returns bad pointer valuevuott@xxxxxxxxxxxx
References:
Re: varptr to structs returns bad pointer valueBenoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>