24 messages in net.java.dev.jna.usersRe: [jna-users] Re: Mapping Struct to...
FromSent OnAttachments
thex...@email.comNov 1, 2008 1:46 am 
Timothy WallNov 1, 2008 5:04 am 
thex...@email.comNov 1, 2008 8:40 am 
Timothy WallNov 1, 2008 11:14 am 
Timothy WallNov 1, 2008 11:17 am 
thex...@email.comNov 2, 2008 12:30 am 
Timothy WallNov 2, 2008 7:42 am 
thex...@email.comNov 3, 2008 2:02 am 
Timothy WallNov 3, 2008 3:49 am 
thex...@email.comNov 3, 2008 4:51 am 
Timothy WallNov 3, 2008 6:22 am 
thex...@email.comNov 3, 2008 7:47 am 
Timothy WallNov 3, 2008 8:21 am 
thex...@email.comNov 3, 2008 11:19 pm 
Timothy WallNov 4, 2008 5:33 am 
Timothy WallNov 4, 2008 5:34 am 
thex...@email.comNov 4, 2008 2:33 pm 
Timothy WallNov 5, 2008 5:44 am 
thex...@email.comNov 5, 2008 8:15 am 
Timothy WallNov 5, 2008 9:19 am 
thex...@email.comNov 5, 2008 3:22 pm 
Timothy WallNov 5, 2008 7:00 pm 
thex...@email.comNov 6, 2008 3:36 am 
thex...@email.comNov 6, 2008 10:55 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [jna-users] Re: Mapping Struct to JavaActions...
From:Timothy Wall (twal@dev.java.net)
Date:Nov 4, 2008 5:33:21 am
List:net.java.dev.jna.users

On Nov 4, 2008, at 2:20 AM, thex@email.com wrote:

Hi Tim

My Yoga teacher once told me, that at desperated times one needs to step completly down and walk step by step up again.

A corollary might be "take someone with you". You become blind to familiar things.

Rechecked the tips and hints I got so far and detected, that I did not use the ByValue definition as you suggested in one of your very first postings.

Did apply that to my small example and now that works. I get the structure with the correct values from my sample dll now. With good hope for really being thru with this I did check the sources for the real dll and there I made the same mistake. I quickly applied the ByValue innner class to that JNA interface and gave it a try.

Results: I do get the proper values when the return value is an int. Verified that against the C# application that actually can read the delivered structure. The structure as return value always contains initiated values (all 0). No more access violation, exceptions or random values though.

So, by now I know that the JNA definition works, I know that there are the right values returned but I simply seem not able to get them copied to the structure.

Any ideas? The dll can't be a C# dll, as fas as I know C# can't export functions. Any alignment or markings at the structure that need to be detected before coping the values returned to the structure?

Post your interface definition and usage. If it worked in your test dll but not in your real dll, you probably lost something in translation.