

![]() | 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: |
9 messages in net.java.dev.jna.usersRe: [jna-users] Need help for beginner| From | Sent On | Attachments |
|---|---|---|
| Hao Jiang | Feb 10, 2009 3:16 pm | |
| Daniel Kaufmann | Feb 10, 2009 4:58 pm | |
| Timothy Wall | Feb 10, 2009 5:00 pm | |
| Hao Jiang | Feb 11, 2009 9:08 am | |
| Hao Jiang | Feb 11, 2009 12:53 pm | |
| Timothy Wall | Feb 11, 2009 2:09 pm | |
| Timothy Wall | Feb 11, 2009 2:11 pm | |
| Hao Jiang | Feb 11, 2009 2:35 pm | |
| Hao Jiang | Feb 12, 2009 9:41 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] Need help for beginner | Actions... |
|---|---|---|
| From: | Daniel Kaufmann (dani...@gmail.com) | |
| Date: | Feb 10, 2009 4:58:22 pm | |
| List: | net.java.dev.jna.users | |
Hi Hao,
You can just need to declare Info function like this:
Info Info(Pointer p);
(Not sure if java will give you some conflict for having the same name for a class and a method, otherwise just change the structure class name)
By default a structure is returned by reference. For more information check this link: https://jna.dev.java.net/javadoc/overview-summary.html#structures Regards, Daniel
On 2/10/09, Hao Jiang <hji...@intermap.com> wrote:
Hi,
I just found this tool and hope it can solve my problem, I'm in a rush to finish some work so will really appreciate if someone can help me out
Basically I need to access 2 functions in a dll
int Load
( const char* aFilename,
Handle* aLayer,
int aLoadFlags);
typedef void* Handle;
here I translate it into java function
int load(String fName, PointerByReference pr, int flag);
It seems working, the return int is an error code which tells me no error.
Then I need to call this function
const Info* Info
(
Handle aLayer
);
Here Info is a structure and I've created class for it extends Structure, I translate this function in java like this
Pointer Info(Pointer p);
Call it after the first function
PointerByReference pr = new PointerByReference(); Int error = load("a.txt", pr, 0); Pointer p = Info(pr.pr.getPointer());
No error so far, I just have no idea how to continue to get structure (Info) out of Pointer (p)
Thanks for any help
Hao
*************************************************************************
PRIVILEGE AND CONFIDENTIALITY NOTICE:
The information in this email is intended for the named recipients only.
It may contain privileged and confidential information. If you have
received this communication in error, any use, copying or dissemination
of its contents is strictly prohibited. Please erase all copies of the
message along with any included attachments and notify Intermap
Technologies or the sender immediately by telephone at the number
indicated on this page.
*************************************************************************







