

![]() | 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: |
24 messages in net.java.dev.jna.usersRe: [jna-users] Re: Mapping Struct to...| From | Sent On | Attachments |
|---|---|---|
| thex...@email.com | Nov 1, 2008 1:46 am | |
| Timothy Wall | Nov 1, 2008 5:04 am | |
| thex...@email.com | Nov 1, 2008 8:40 am | |
| Timothy Wall | Nov 1, 2008 11:14 am | |
| Timothy Wall | Nov 1, 2008 11:17 am | |
| thex...@email.com | Nov 2, 2008 12:30 am | |
| Timothy Wall | Nov 2, 2008 7:42 am | |
| thex...@email.com | Nov 3, 2008 2:02 am | |
| Timothy Wall | Nov 3, 2008 3:49 am | |
| thex...@email.com | Nov 3, 2008 4:51 am | |
| Timothy Wall | Nov 3, 2008 6:22 am | |
| thex...@email.com | Nov 3, 2008 7:47 am | |
| Timothy Wall | Nov 3, 2008 8:21 am | |
| thex...@email.com | Nov 3, 2008 11:19 pm | |
| Timothy Wall | Nov 4, 2008 5:33 am | |
| Timothy Wall | Nov 4, 2008 5:34 am | |
| thex...@email.com | Nov 4, 2008 2:33 pm | |
| Timothy Wall | Nov 5, 2008 5:44 am | |
| thex...@email.com | Nov 5, 2008 8:15 am | |
| Timothy Wall | Nov 5, 2008 9:19 am | |
| thex...@email.com | Nov 5, 2008 3:22 pm | |
| Timothy Wall | Nov 5, 2008 7:00 pm | |
| thex...@email.com | Nov 6, 2008 3:36 am | |
| thex...@email.com | Nov 6, 2008 10:55 pm |

![]() | 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] Re: Mapping Struct to Java | Actions... |
|---|---|---|
| From: | Timothy Wall (twal...@dev.java.net) | |
| Date: | Nov 1, 2008 11:14:49 am | |
| List: | net.java.dev.jna.users | |
See what "sizeof(INVENTORYITEM)" returns in C#, and ensure that Structure.size() returns the same thing in Java. If there are any #pack directives in the header to change the structure layout, it might also cause the size to be different than the default.
On Nov 1, 2008, at 11:41 AM, thex...@email.com wrote:
One other thing to look at is to ensure that your inputs to GetInventoryItem are correct. What do the docs say might cause the structure to be zero-filled?
There are no docs. All I got are the dll and some C# examples like this:
[DllImport("FFACE.dll", EntryPoint = "GetInventoryItem")] public static extern INVENTORYITEM InventoryItem(int index);
and the working statment:
INVENTORYITEM x = FFACE.Inventory.InventoryItem(1);
Thats about it. Next to that I got the fface.h file (which is outdated).
The C# and the JNA run against the same dll and the dll access a running application. I do let both run with the same running process of that application. I am using the same parameters in C# and JNA.
I tried even to change the JNA method to use a single parameter only aswell as the C# implementation does. The return value still was empty.
The C compiler automatically generates the second argument if you omit it. JNA will do no such thing, so your declaration of the function *must* include the second argument.







