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.