10 messages in net.java.dev.jna.usersRe: [jna-users] String related questions
FromSent OnAttachments
Bartko ZoltanJul 12, 2007 4:49 am.java, .java
Bartko ZoltanJul 12, 2007 6:08 am 
Wayne MeissnerJul 12, 2007 6:09 am 
Timothy WallJul 12, 2007 8:03 am 
Timothy WallJul 12, 2007 8:38 am 
Bartko ZoltanJul 13, 2007 12:10 am 
Bartko ZoltanJul 13, 2007 1:05 am 
Timothy WallJul 13, 2007 7:11 am 
Oleksandr MaksymchukOct 22, 2007 4:25 am 
Timothy WallOct 22, 2007 6:34 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [jna-users] String related questionsActions...
From:Wayne Meissner (wmei@gmail.com)
Date:Jul 12, 2007 6:09:44 am
List:net.java.dev.jna.users

Bartko Zoltan wrote:

------------------------------------------------------------------------

package j2;

import com.sun.jna.Pointer; import com.sun.jna.WString; import com.sun.jna.ptr.PointerByReference;

/** * * @author bartkoz */ public class Main {

/** Creates a new instance of Main */ public Main() { }

/** * @param args the command line arguments */ public static void main(String[] args) { // TODO code application logic here String old = System.setProperty("jna.library.path", "/usr/lib");

HunSpell hunspell = HunSpell.INSTANCE;

Pointer pHunspell =
hunspell.Hunspell_create("/opt/openoffice.org2.2/share/dict/ooo/hu_HU.aff", "/opt/openoffice.org2.2/share/dict/ooo/hu_HU.dic"); String e = hunspell.Hunspell_get_dic_encoding(pHunspell);

int i = hunspell.Hunspell_spell(pHunspell, new WString("legyező")); int j = hunspell.Hunspell_spell(pHunspell, new WString("legzező"));

PointerByReference strings = null;

The above line is most likely your problem. It should be:

PointerByReference strings = new PointerByReference();

int k = hunspell.Hunspell_suggest(pHunspell, strings, "ábrak");

hunspell.Hunspell_destroy(pHunspell);

}

}

------------------------------------------------------------------------