

![]() | 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: |
8 messages in net.java.dev.jna.usersRe: [jna-users] Passing a Null Array ...| From | Sent On | Attachments |
|---|---|---|
| Timothy Wall | Jul 17, 2008 10:18 am | |
| Wayne Meissner | Jul 17, 2008 3:57 pm | |
| Nikolas Lotz | Jul 18, 2008 1:49 am | |
| RWAD...@UP.COM | Jul 18, 2008 5:07 am | |
| Timothy Wall | Jul 18, 2008 5:41 am | |
| Timothy Wall | Jul 18, 2008 7:20 am | |
| Timothy Wall | Jul 18, 2008 7:53 am | |
| RWAD...@UP.COM | Jul 18, 2008 8:21 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: | Re: [jna-users] Passing a Null Array Pointer | Actions... |
|---|---|---|
| From: | RWAD...@UP.COM (RWAD...@UP.COM) | |
| Date: | Jul 18, 2008 8:21:04 am | |
| List: | net.java.dev.jna.users | |
After some more digging, I think this may have been red herring. It looks like the problem is an array of structures inside a structure, which I'll start a separate thread for.
_______________________________
Hardware /nm./: the part of the computer you can kick.
Timothy Wall <twal...@dev.java.net> 07/18/2008 09:54 AM Please respond to use...@jna.dev.java.net
To use...@jna.dev.java.net cc
Subject Re: [jna-users] Passing a Null Array Pointer
I just checked this against the current test suite, and "null" works as a substitute for Structure[]. Are you certain it's not your native code that is choking when it gets a null pointer?
On Jul 18, 2008, at 8:08 AM, RWAD...@UP.COM wrote:
I'm having difficulty passing a null pointer to an array as an argument to a C function. The Java declaration is:
voidefm111_det_enty_rop_at_loca(FacilityTypeStructure fac_type, intin_rl_nbr, PropoStructure in_propo[], ShortByReference sop_count, ObjectPointAndOrientationStructure sop[]);
It works fine when I use an actual array as the third argument (PropoStructure in_propo[]), but I need to be able to test the use case where the array pointer is null. More specifically, where the C code says
if (in_propo == (Propo_Struct *)NULL) {...}
I tried substituting a Java null as the third argument, but that causes a JVM crash. I didn't see anything in the forum that covers this exact scenario, but I'm guessing one of the JNA memory or pointer classes must be what I want. I just can't figure out how to do it.
Any ideas? . This message and any attachments contain information from Union Pacific which may be confidential and/or privileged. If you are not the intended recipient, be aware that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited by law. If you receive this message in error, please contact the sender immediately and delete the message and any attachments.
--------------------------------------------------------------------- To unsubscribe, e-mail: user...@jna.dev.java.net For additional commands, e-mail: user...@jna.dev.java.net
.
This message and any attachments contain information from Union Pacific which
may be confidential and/or privileged.
If you are not the intended recipient, be aware that any disclosure, copying,
distribution or use of the contents of this message is strictly prohibited by
law. If you receive this message in error, please contact the sender immediately
and delete the message and any attachments.







