Re: I give up...
Posted by Sean Malloy-2 on May 21, 2004; 10:26am
URL: https://forum.world.st/I-give-up-tp3370619p3370623.html
> I think it's because the sqlite library is using the 'cdecl' calling
> convention, rather than 'stdcall' (not that they bother to /tell/ you that
> anywhere, not even in the source -- it must be a flag to the compiler).
If you
> change SqliteLibrary>>resultForQuery:on:do: to read:
>
> ===================
> resultForQuery: aString on: sqliteRef do: operation
> | descriptor callback error |
> descriptor := ExternalDescriptor fromString: 'cdecl: sdword void* dword
char**
> char**'.
> callback := ExternalCallback
> block: [ :a1 :a2 :a3 :a4 | operation value: a2 value: a3 value: a4. 0]
> descriptor: descriptor.
> error := ExternalAddress new.
> self apiExec: sqliteRef sql: aString callback: callback asParameter with:
nil
> error: error.
> self checkError: error.
> ===================
>
> then you should be able to move on to the next stage of trying to make
sense of
> the LPVOIDs (which /always/ confuse me).
Chris,
I've just leveled up. Bonus round time!
Thanks. That was it!!
Regards,
Sean