Sapi 5.4

38 views
Skip to first unread message

Stefan Plath

unread,
Jul 15, 2016, 8:54:39 AM7/15/16
to NativeLibs4Java
Hello,

I'm trying to use Microsoft sapi with Java and want to generate a jar via jnaerator.
I use this command: C:\tmp>java -jar jnaerator.jar -library sapiDir sapi.dll sapi.h -arch win64 -com -mode Directory  (or -mode StandaloneJar)
After some simple problems i always got the error:
C:\Program Files (x86)\Microsoft SDKs\Windows\v6.0A\Include\winnt.h:18:2070: error: #error Must define a target architecture.
But it says # SUCCESS: JNAeration completed ! and creates a jar (or directory if i use this mode).
In the jar/directory there is a java File with only some static attributes:

package sapidir;
import org.bridj.BridJ;
import org.bridj.CRuntime;
import org.bridj.ann.Library;
import org.bridj.ann.Runtime;
/**
 * Wrapper for library <b>sapiDir</b><br>
 * This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
 * a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
 * For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> or <a href="http://bridj.googlecode.com/">BridJ</a> .
 */
@Library("sapiDir")
@Runtime(CRuntime.class)
public class SapiDirLibrary {
    static {
        BridJ.register();
    }
    /** <i>native declaration : sapi.h</i> */
    public static final int SP_NORMAL_CONFIDENCE = (int)(0);
    /** <i>native declaration : sapi.h</i> */
    public static final int SP_MAX_WORD_LENGTH = (int)(128);
    /** <i>native declaration : sapi.h</i> */
    public static final int _SAPI_VER = (int)0x054;
    /** <i>native declaration : sapi.h</i> */
    public static final int SP_STREAMPOS_ASAP = (int)(0);
    /** <i>native declaration : sapi.h</i> */
    public static final int SP_STREAMPOS_REALTIME = (int)(-1);
    /** <i>native declaration : sapi.h</i> */
    public static final int SP_MAX_LANGIDS = (int)(20);
    /** <i>native declaration : sapi.h</i> */
    public static final int SPRP_NORMAL = (int)0;
    /** <i>native declaration : sapi.h</i> */
    public static final int SP_LOW_CONFIDENCE = (int)(-1);
    /** <i>native declaration : sapi.h</i> */
    public static final int SP_EMULATE_RESULT = (int)(0x40000000);
    /** <i>native declaration : sapi.h</i> */
    public static final int SP_MAX_PRON_LENGTH = (int)(384);
    /** <i>native declaration : sapi.h</i> */
    public static final int __REQUIRED_RPCSAL_H_VERSION__ = (int)100;
    /** <i>native declaration : sapi.h</i> */
    public static final int __REQUIRED_RPCNDR_H_VERSION__ = (int)500;
    /** <i>native declaration : sapi.h</i> */
    public static final int SP_HIGH_CONFIDENCE = (int)(+1);
    /** <i>native declaration : sapi.h</i> */
    public static final long SPFEI_ALL_EVENTS = (long)0xEFFFFFFFFFFFFFFFL;
    /** <i>native declaration : sapi.h</i> */
    public static final int DEFAULT_WEIGHT = (int)(1);
}

Has anyone an idea how to generate the jar, so that i can use the sapi lib?

Would be greate to get some help, because i'm realy new to jna / jnaerator.

Greetings,

Stefan
Reply all
Reply to author
Forward
0 new messages