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


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

Re: JNI and GetFieldID

From "Borneq" <borneq@antyspam.hidden.pl>
Newsgroups comp.lang.java.programmer
Subject Re: JNI and GetFieldID
Date 2013-09-06 23:06 +0200
Organization ATMAN - ATM S.A.
Message-ID <l0dg42$lbe$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> <l0d7po$cqp$1@node1.news.atman.pl> <8bnpfa-417.ln1@s.simpson148.btinternet.com>

Show all headers | View raw


Użytkownik "Steven Simpson" <ss@domain.invalid> napisał w wiadomości 
news:8bnpfa-417.ln1@s.simpson148.btinternet.com...
> Never learned to do that - looks too error-prone.  Instead of mucking 
> around in JNI, creating objects, accessing fields, etc, I prefer to do as 
> much as I can in Java, then declare the native methods as taking the 
> already dismantled fields as separate arguments.

But this is difficult, because I want to write JNI wrapper to UnACE - 
library for expanding .ace archives.
There are callbacks like
INT (__stdcall *StateCallbackProc)
                           (pACEStateCallbackProcStruc State);
where
 typedef union sACEStateCallbackProcStruc
                                       *pACEStateCallbackProcStruc;
typedef union sACEStateCallbackProcStruc
        {
          ULONG  StructureType;                 // indicates which of the 
fol-
                                                // lowing structures is used
          tACECallbackArchiveStruc      Archive;
          tACECallbackArchivedFileStruc ArchivedFile;
          tACECallbackRealFileStruc  RealFile;
          tACECallbackProgressStruc     Progress;
          tACECallbackCRCCheckStruc     CRCCheck;
        } tACEStateCallbackProcStruc;
where for example:
        typedef struct sACECallbackArchiveStruc
        {
          ULONG  StructureType;         // is ACE_CALLBACK_TYPE_ARCHIVE
          ULONG  Code;                  // see definition of
                                        // ACE_CALLBACK_TYPE_ARCHIVE
          ULONG  Operation;             // ACE_CALLBACK_OPERATION constant

          pACEGlobalDataStruc  GlobalData;      // see tACEGlobalDataStruc
          pACEArchiveDataStruc ArchiveData;     // see tACEArchiveDataStruc
        } tACECallbackArchiveStruc,
         *pACECallbackArchiveStruc;

There are structures reference inside other structures 

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