[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: vuott@xxxxxxxxxxxx
- Date: Mon, 3 Mar 2025 01:24:28 +0100 (CET)
- To: Jussi Lahtinen <jussi.lahtinen@xxxxxxxxx>
- Cc: User <user@xxxxxxxxxxxxxxxxxxxxxx>
He should try:Private Extern myFunction(data As Pointer) In "mylib"Public Struct myStruct result As Long msg As StringEnd StructPrivate myData As Struct MystructPublic Sub doit2() myFunction(VarPtr(myData)) End ---------------------------------------------------------------------------------- 2 mar 2025, 22:43 da jussi.lahtinen@xxxxxxxxx: >> >> >> No this does not pass the correct pointer, I am trying to pass a generic structure, I want to use pointers. >> >> > I see, it wasn't clear from the example code you gave. I agree with your implementation plan. > > >> >> I am sorry but varptr(xxx) should return a pointer to the actual memory containing the structure. >> >> > I agree, but this isn't in the documentation and it seems it is not implemented [cannot find it under void SUBR_varptr(ushort code) > ]. For the reasons Benoit knows, this is not raising error either. I don't know enough about the implementation details to say more. > Maybe this can be added. > > Jussi > >
Re: varptr to structs returns bad pointer value | Jussi Lahtinen <jussi.lahtinen@xxxxxxxxx> |
Re: varptr to structs returns bad pointer value | Brian G <brian@xxxxxxxxxxxxxxxx> |
Re: varptr to structs returns bad pointer value | Jussi Lahtinen <jussi.lahtinen@xxxxxxxxx> |