---- Timothy Wall <twal...@dev.java.net> wrote:
In almost all C programs, the only difference is whether you pass the
structure ("by value") or a pointer to the structure. Usually if you
pass the structure by value, changes made by the called function
won't be visible to the caller. Structure by value is also not
currently supported by JNA, at least not directly, since it's highly
dependent on compiler specifics and has a whole host of corner cases
that'd be a pain to support, and the usage is not that common.
After my previous email suggesting "in-lining" the structure fields, I
had a second thought. Is it possible to add support for by-value
structs by subclassing Structure and over-riding some choice methods?
(And what would they be...) I understand that it wouldn't be adding
support for all compilers and all cases, just my particular situation.
I'm just wondering if there is a solution less ugly than in-lining
those fields.
- Ben