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:thex...@email.com (thex@email.com)
Date:Nov 5, 2008 3:22:13 pm
List:net.java.dev.jna.users

Hi Tim

Just trying to eliminate variables.

Thats one of the best approaches. ^^

You should be able to target either dll simply by changing the name passed to the loadLibrary call, and pass the dll name as an argument to main. That ensures that the java environment is identical in both cases.

Used this construct:

FFaceApi fface = null; Native.setProtected(true); for (int j=0; j < 7; j++) { fface = (FFaceApi) Native.loadLibrary( flipFlop ? "Test2" : "FFACE", FFaceApi.class); System.out.println(">>> "+(flipFlop ? "Test2" : "FFACE") +" "+fface.GetInventoryItem(1, 0)); }

When GetInventoryItem() returns a struct, the test2.dll returns steadily a properly filled structure while fface.dll returns random values. Changing GetInventoryItem()'s signature to return int's both dll deliver steadily the right value.

If one works and the other doesn't, then there must be something peculiar about the fface dll.

So, given these test results your conclusion is that there is something wrong with FFACE.dll? Dumb question: Does the evaluation of structure contents work aswell if the data is coming from another process? Saying process A is producing data, fface.dll is accessing that process and delivering data from there to Process B. No idea why it should work with int then, but just asking.

Regards, Armin