

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
29 messages in net.java.dev.jna.usersAW: [jna-users] Struct with Union wit...| From | Sent On | Attachments |
|---|---|---|
| Wolfgang Pichler | Mar 25, 2009 5:58 am | |
| Timothy Wall | Mar 25, 2009 7:02 am | |
| Timothy Wall | Mar 25, 2009 7:06 am | |
| Wolfgang Pichler | Mar 25, 2009 7:21 am | |
| Timothy Wall | Mar 25, 2009 7:24 am | |
| Wolfgang Pichler | Mar 25, 2009 8:11 am | |
| Wolfgang Pichler | Mar 25, 2009 8:20 am | |
| Novatchkov Hristo | Mar 25, 2009 8:41 am | |
| Timothy Wall | Mar 25, 2009 9:59 am | |
| Timothy Wall | Mar 25, 2009 10:28 am | |
| Timothy Wall | Mar 25, 2009 10:38 am | |
| Hristo Novatchkov | Mar 25, 2009 11:40 am | |
| Wolfgang Pichler | Mar 25, 2009 12:02 pm | |
| LYou...@gkservices.com | Mar 25, 2009 12:11 pm | |
| Timothy Wall | Mar 25, 2009 12:52 pm | |
| Wolfgang Pichler | Mar 26, 2009 12:22 am | |
| Timothy Wall | Mar 26, 2009 4:46 am | |
| Wolfgang Pichler | Mar 26, 2009 5:23 am | |
| Timothy Wall | Mar 26, 2009 6:09 am | |
| Wolfgang Pichler | Mar 26, 2009 6:13 am | |
| Wolfgang Pichler | Mar 26, 2009 6:26 am | |
| Timothy Wall | Mar 26, 2009 6:40 am | |
| Wolfgang Pichler | Mar 26, 2009 12:22 pm | |
| Timothy Wall | Mar 26, 2009 1:00 pm | |
| Wolfgang Pichler | Mar 26, 2009 3:15 pm | |
| Timothy Wall | Mar 30, 2009 6:06 am | |
| Wolfgang Pichler | Mar 30, 2009 11:55 am | |
| Timothy Wall | Mar 30, 2009 12:14 pm | |
| Wolfgang Pichler | Mar 31, 2009 12:35 am |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | AW: [jna-users] Struct with Union with Structs... | Actions... |
|---|---|---|
| From: | Wolfgang Pichler (wpic...@callino.at) | |
| Date: | Mar 25, 2009 7:21:04 am | |
| List: | net.java.dev.jna.users | |
The code does not produce an exception or a crash... - but it does return wrong values.
I will return nulled values - but there are real values - as I have seen when I do directly use the registration structure instead of the union. It does look like it does not get initialized...
Regards, Wolfgang
-----Ursprüngliche Nachricht----- Von: Timothy Wall [mailto:twal...@dev.java.net] Gesendet: Mittwoch, 25. März 2009 15:07 An: use...@jna.dev.java.net Betreff: Re: [jna-users] Struct with Union with Structs...
On Mar 25, 2009, at 8:59 AM, Wolfgang Pichler wrote:
Here is the callback function IAXClient.INSTANCE.iaxc_set_event_callback(new IAXClient.FUNCTION() { @Override public int invoke(iaxc_event_struct.ByValue event) { if (event==null) { return 0; } switch(event.type) { case IAXClient.IAXC_EVENT_REGISTRATION: System.out.println("Event Raw: " + event.ev.toString());
event.ev.setType(IAXClient.iaxc_ev_registration.class); event.ev.read(); IAXClient.iaxc_ev_registration reg = (iaxc_ev_registration) event.ev.getTypedValue(IAXClient.iaxc_ev_registration.class); System.out.println("Event Reg: " + reg.reply); break;
Once you've called "read", you can simply access the corresponding union field. getTypedValue is a shortcut for setType + read. How exactly does this code fail?







