

![]() | 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: |
13 messages in net.java.dev.jna.usersRe: [jna-users] Cannot pass any data ...| From | Sent On | Attachments |
|---|---|---|
| Daniel Horowitz | Jun 14, 2007 11:27 am | |
| Timothy Wall | Jun 14, 2007 11:29 am | |
| Daniel Horowitz | Jun 14, 2007 11:31 am | |
| Daniel Horowitz | Jun 14, 2007 11:39 am | |
| Timothy Wall | Jun 14, 2007 11:42 am | |
| Daniel Horowitz | Jun 14, 2007 11:52 am | |
| Timothy Wall | Jun 14, 2007 11:53 am | |
| Timothy Wall | Jun 14, 2007 12:03 pm | |
| Daniel Horowitz | Jun 14, 2007 12:13 pm | |
| Daniel Horowitz | Jun 14, 2007 12:22 pm | |
| Timothy Wall | Jun 14, 2007 12:30 pm | |
| Daniel Horowitz | Jun 14, 2007 2:11 pm | |
| Timothy Wall | Jun 14, 2007 2:23 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] Cannot pass any data to native dll | Actions... |
|---|---|---|
| From: | Daniel Horowitz (dani...@gmail.com) | |
| Date: | Jun 14, 2007 2:11:20 pm | |
| List: | net.java.dev.jna.users | |
Timothy, Ok. Things are sort of working now.
I upgraded to trunk, changed my interface to extend Library and I can call my function with ints and strings (sweet).
I foresee a problem though. I need to register a callback to my dll function. This callback will be a java function. In your example on the home-page, the interface extends StdCallLibrary. This is what got me in trouble in the first place. If I decorate my functions with __stdcall the trunk version of jna cant find my functions. Exactly how should i declare and expose my functions such that jna can find them with StdCallLibrary?
Thanks again your help, Dan H
On 6/14/07, Timothy Wall <twal...@dev.java.net> wrote:
You may need "Observer" permissions on the project in order to check out from SVN, or maybe you just need to make sure you're properly authenticated with the https. Try to download directly from the documents/files link (the "latest" folder has the most recently built jars).
On Jun 14, 2007, at 3:14 PM, Daniel Horowitz wrote:
Ok i decorated all my functions as __stdcall and changed my interface back to extend StdCallLibrary. Now I need to upgrade to trunk right?
The svn server is giving me a 400 error
$ svn checkout https://jna.dev.java.net/svn/jna/trunk jna svn: REPORT request failed on '/svn/jna/!svn/vcc/default' svn: REPORT of '/svn/jna/!svn/vcc/default': 400 Bad Request (https://jna.dev.jav a.net)
Can i get a binary of trunk from anywhere?
On 6/14/07, Timothy Wall <twal...@dev.java.net> wrote: On Jun 14, 2007, at 2:39 PM, Daniel Horowitz wrote:
Some more info that might clear things up -
I am compiling my dll with VS2005 and my project settings are
Calling convention - __cdecl Compile as - C++
Through reading the forms i tried __stdcall but then jna cant find any of my functions.
You have to either include undecorated exports (using gcc's --add- stdcall-alias or a DEF file) or update to the latest JNA on the trunk, which knows how to look for stdcall-decorated names based on the java interface.
Then I tried compile as C, and the compiler complained about my extern definitions being strings (very strange).
If you compile as C, you need to omit the 'extern "C"' bits, which are C++-only syntax. Typically header files surround C++ bits with #ifdef __cplusplus (see jna/native/dispatch.h for an example).







