Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #25245

Re: JNI and GetFieldID

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.pionier.net.pl!news.supermedia.pl!newsfeed2.atman.pl!newsfeed.atman.pl!.POSTED!not-for-mail
From "Borneq" <borneq@antyspam.hidden.pl>
Newsgroups comp.lang.java.programmer
Subject Re: JNI and GetFieldID
Date Sun, 8 Sep 2013 12:29:16 +0200
Organization ATMAN - ATM S.A.
Lines 26
Message-ID <l0hjht$nvr$1@node1.news.atman.pl> (permalink)
References <l0a6jn$9t4$1@node1.news.atman.pl> <gb2pfa-s33.ln1@s.simpson148.btinternet.com> <l0d1ak$5s5$1@node1.news.atman.pl> <l0g277$75f$1@node1.news.atman.pl> <7cstfa-3nc.ln1@s.simpson148.btinternet.com>
NNTP-Posting-Host 91.239.205.62
Mime-Version 1.0
Content-Type text/plain; format=flowed; charset="utf-8"; reply-type=response
Content-Transfer-Encoding 8bit
X-Trace node1.news.atman.pl 1378636157 24571 91.239.205.62 (8 Sep 2013 10:29:17 GMT)
X-Complaints-To usenet@atman.pl
NNTP-Posting-Date Sun, 8 Sep 2013 10:29:17 +0000 (UTC)
X-Priority 3
X-MSMail-Priority Normal
X-Newsreader Microsoft Outlook Express 6.00.2900.5931
X-MimeOLE Produced By Microsoft MimeOLE V6.00.2900.6157
Xref csiph.com comp.lang.java.programmer:25245

Show key headers only | View raw


Użytkownik "Steven Simpson" <ss@domain.invalid> napisał w wiadomości 
news:7cstfa-3nc.ln1@s.simpson148.btinternet.com...
> If the callbacks are C, they will usually have a (void *) parameter to 
> pass context.  (If they don't, I'd say they're shoite, or they're not what 
> one supposes they're for.)  The context will have to include the JNIEnv 
> pointer at least, and the details of the Java callback.
>
> Suppose that the library you're wrapping defines a callback:
>
>   typedef void foo_callback1(void *, int, const char *);
>   void foo_do_something(foo_obj *, foo_callback1 *cb, void *ctxt);

Thanks for answer and examples ;-)
I want wrap library UnAceV2.dll which is provided without sources. 
(http://www.winace.com/) I can't change foo_callback and foo_do_something 
parameters.
The callback function is
INT __stdcall StateProc(pACEStateCallbackProcStruc State)
the do_something function is
INT __stdcall ACEListProc(LPSTR ArchiveName, pACEListStruc List);

Inside StateProc I can call my_callback function, and ACEListProc will be 
called inside native function. Native function can store env and others 
parameters. But how within StateProc refer to this env and other parameters? 
This parameters must be stored globally in data segment?

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

JNI and GetFieldID "Borneq" <borneq@antyspam.hidden.pl> - 2013-09-05 17:05 +0200
  Re: JNI and GetFieldID Mark <i@dontgetlotsofspamanymore.invalid> - 2013-09-06 10:25 +0100
  Re: JNI and GetFieldID Steven Simpson <ss@domain.invalid> - 2013-09-06 16:36 +0300
    Re: JNI and GetFieldID "Borneq" <borneq@antyspam.hidden.pl> - 2013-09-06 18:53 +0200
      Re: JNI and GetFieldID "Borneq" <borneq@antyspam.hidden.pl> - 2013-09-06 20:44 +0200
        Re: JNI and GetFieldID Steven Simpson <ss@domain.invalid> - 2013-09-06 22:34 +0300
          Re: JNI and GetFieldID "Borneq" <borneq@antyspam.hidden.pl> - 2013-09-06 23:06 +0200
      Re: JNI and GetFieldID "Borneq" <borneq@antyspam.hidden.pl> - 2013-09-07 22:27 +0200
        Re: JNI and GetFieldID Steven Simpson <ss@domain.invalid> - 2013-09-08 10:24 +0100
          Re: JNI and GetFieldID "Borneq" <borneq@antyspam.hidden.pl> - 2013-09-08 12:29 +0200
            Re: JNI and GetFieldID "Borneq" <borneq@antyspam.hidden.pl> - 2013-09-08 22:45 +0200
            Re: JNI and GetFieldID Steven Simpson <ss@domain.invalid> - 2013-09-13 13:31 +0100
              Re: JNI and GetFieldID "Borneq" <borneq@antyspam.hidden.pl> - 2013-09-14 18:50 +0200
              Re: JNI and GetFieldID "Chris Uppal" <chris.uppal@metagnostic.REMOVE-THIS.org> - 2013-09-19 15:02 +0100

csiph-web