# java.lang.UnsatisfiedLinkError



## Dominicana (19. Mai 2007)

Hallo Java-Gemeinde

Habe mir vor ein paar Tagen eine USB-Relais-Karte von Quancom zugelegt (zum Schalten von bis zu 8 Niederspannungssignalen mit einer Spannung bis 30V oder 1A durch einen PC). Das mitgelieferte Programm funktioniert, ist aber nicht für meine Ansprüche ausgelegt. Mitgelieferte Programmierbeispiele (in C/C++, VB, Delphi, Java) versprechen viel, halten aber wenig, jedenfalls in Java.


> QUANCOM Measurement and Automation boards:
> 
> This sample shows how to program the USBREL8/LC Card under Sun Java for Windows. This part of the sample writes to the outputs or relays.
> 
> ...


*digital_out.java :*

```
/*
 * digital_out.java
 *
 * Sample project for writing the digital output channels or relays of the USBREL8 Card
 *
 * Author: Michael Reimer, QUANCOM Informationssysteme GmbH, Germany
 * 
 *  Website: [url]http://www.quancom.de[/url]
 * 
 *  Information: 
 *  [url]http://www.quancom.de/qprod01/eng/pb/usbrel8.htm[/url]
 * 
 * Copyright (c), QUANCOM Informationssysteme GmbH, Germany
 *
 *
 * Created on 17. Juni 2003, 21:49
 */

import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import java.util.*;
import com.quancom.qlib32.*;

/**
 *
 * @author  Michael Reimer
 */
public class digital_out {
    
    static qlib32 qlib;
    int handle = 0;
    ArrayList list = new ArrayList();                    
    
    /** Creates a new instance of digital_out */
    public digital_out() {
        String s;
        int i;        
        int lines = 0;
        
        JFrame frame = new JFrame("USBREL8: Digital-Out Sample");                                                  
        frame.setSize(400, 450);
        Container content = frame.getContentPane();
        content.setBackground(Color.white);
        content.setLayout(new GridLayout(4,8));                
        
        qlib = new qlib32();
        
        CheckboxListener myListener = new CheckboxListener(this);
           
        for (i=0;i<8;i++)
            {                
                list.add(i, new JCheckBox("CH"+i));   
                content.add((JCheckBox)list.get(i));                
                ((JCheckBox)list.get(i)).addItemListener(myListener);
    
            }                               
        
       	handle = qlib.QAPIExtOpenCard(qlib.USBREL8,0);

	if ( handle ==0 )
	   {
                JOptionPane.showMessageDialog(content, "USBREL8 Card not opened", "digital_out", JOptionPane.ERROR_MESSAGE );       		
                System.exit(0);
	   }
                
	qlib.QAPIExtWriteDO32(handle,0,lines,0);       
        
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);        
        frame.addWindowListener(new ExitListener());            
        frame.pack();        
        frame.setVisible(true);                    
    }
    
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {                   
         
        digital_out obj = new digital_out();
        
        
    }
    
}

class ExitListener extends WindowAdapter {
  public void windowClosing(WindowEvent event) {
    System.exit(0);
  }
}

class CheckboxListener implements ItemListener {
    
    int handle;
    digital_out d;
    
    public CheckboxListener(digital_out d1)
    {
        d = d1;     
    }
    
    public void UpdateLines()
     { 
        int lines = 0;
        int i;        
                
        if (d.handle != 0 )
        {
        for (i=0;i<8;i++)
            {                        
                if ( ((JCheckBox)d.list.get(i)).isSelected()) 
                {
                    lines = lines | (1<<i);
                }
                
            }               
        
	d.qlib.QAPIExtWriteDO32(d.handle,0,lines,0);       
        }
        
    }
                                   
    public void itemStateChanged(ItemEvent e) {
        
        UpdateLines();        
      
    }

}
```
Dazu kommt noch *qlib32 :*

```
// ---------------------------------------------------------------------------------------------------------------------
// Copyright QUANCOM Informationssysteme GmbH, Germany
//
// Internet: [url]http://www.quancom.de[/url] 
//
// qlib32.java - Java QLIB32 Interface Class for Windows 
//
// Version 1.9.8s
// --------------------------------------------------------------------------------------------------------
package com.quancom.qlib32;

import java.lang.*;
import java.awt.*;

public class qlib32 {


/*
**	Debugging-Konstanten fuer QAPIExt...-Funktionen
*/

public static final int DBG_NONE = 0;		/* nichts debuggen		*/
public static final int DBG_NULL_PTR = 1;	/* NULL-Pointer pruefen		*/
public static final int DBG_FUNC_DEFINED = 2;	/* gueltige Funktionen pruefen	*/
public static final int DBG_VALID_CARD_ID = 4;	/* gueltige Karten-ID pruefen	*/
public static final int DBG_MAKE_LOG= 8;	/* Log-File erzeugen            */
public static final int DBG_FULL_DEBUG = 0xF;	/* alles pruefen und aufzeichnen*/

/*
**	general constants
*/

public static final int BUS_ISA	= 1;
public static final int BUS_PCI	= 2;
public static final int BUS_VLB	= 3;
public static final int BUS_PAR	= 4;
public static final int BUS_USB	= 5;
public static final int BUS_UNKNOWN = 6;

public static final int FEATURE_AD = 0x00000001; 		/*  Karte besitzt AD-Kanaele */
public static final int FEATURE_DA = 0x00000002; 		/*  Karte besitzt DA-Kanaele */
public static final int FEATURE_DI = 0x00000004; 		/*  Karte besitzt Digitaleingaenge */
public static final int FEATURE_DO = 0x00000008; 		/*  Karte besitzt Digitalausgaenge */
public static final int FEATURE_DX = 0x00000010;		/*  Karte besitzt beliebige DI/Os */
public static final int FEATURE_WD = 0x00000020;  		/*  Karte besitzt Watchdog */
public static final int FEATURE_CT = 0x00000040;  		/*  Karte besitzt Counter/Timer */
public static final int FEATURE_8253 = 0x00000080; 		/*  Karte besitzt 8253/54 */
public static final int FEATURE_8255 = 0x00000100; 		/*  Karte besitzt 8255 */
public static final int FEATURE_WD_ST = 0x00000200;  		/*  Karte besitzt Watchdog Status Register */
public static final int FEATURE_READSTRING = 0x00000400;
public static final int FEATURE_WRITESTRING = 0x00000800;					
public static final int LIST_DEFAULT_VALUE = 0x80000000;  	/* Resourcenwert ist Defaultwert */
public static final int LIST_RESOURCE_NOT_USED = 0x40000000; 	/* Resource wird nicht verwendet */
public static final int LIST_AUTO_RESOURCE = 0x20000000; 	/* Resourcenwert wird auto. vergeben (PCI) */
public static final int LIST_EOL = 0x00000000;			/* Ende der Liste */

public static final int VC_QIS = 2;                             /* Hersteller-ID: QUANCOM Informationssysteme GmbH */
public static final int VC_KOLTER = 3;                          /* Hersteller-ID: Kolter Electronic */

/*
**	constants for QAPIExtReadAD and QAPIExtConvertDWToVoltage functions
*/

  //  voltage

public static final int MODE_BI_5V = 0;
public static final int MODE_BI_10V = 1;
public static final int MODE_BI_3V3 = 2;
public static final int MODE_BI_2V5 = 6;
public static final int MODE_BI_1V25 = 7;
public static final int MODE_UNI_10V = 3;
public static final int MODE_UNI_5V = 4;
public static final int MODE_UNI_3V3 = 5;
public static final int MODE_UNI_2V5 = 8;
public static final int MODE_UNI_1V25 = 9;

  //  current

public static final int MODE_0_TO_20MA = 100;
public static final int MODE_4_TO_20MA = 101;

  //  temperature

public static final int MODE_0_TO_100_DEGREE = 200;

  //  Filter (darf mit zuvor genannten Werten ODER-verknuepft werden

public static final int MODE_FILTER = 0x80000000;

  //  Rueckgabewert bei Fehler (falscher Modus-Wert)

public static final int MODE_INVALID = 0x4d414a41;

/*
**  Fehlercodes
*/

public static final int QAPI_ERROR_INVALID_CHANNEL = 0xffffff00;  /*  Parameter-Wert Channel unzulaessig */
public static final int QAPI_ERROR_AD_TIMEOUT = 0xffffff01;   /*  kein AD-Wert lesbar */

/*
**  Fehlermeldungen und Sprache ( mr. 17.04.2002 )
*/

public static final int QAPI_MESSAGES_ON = 0;
public static final int QAPI_MESSAGES_OFF = 1;


/*
**	Jobs
*/

public static final int JOB_READ_8255 = 0;
public static final int JOB_WRITE_8255 = 1;

public static final int JOB_ENABLE_WATCHDOG = 2;
public static final int JOB_DISABLE_WATCHDOG = 3;
public static final int JOB_RETRIGGER_WATCHDOG = 4;
public static final int JOB_STATUS_WATCHDOG = 72;
public static final int JOB_RELAYON_WATCHDOG = 93;

public static final int JOB_READ_8253 = 5;
public static final int JOB_WRITE_8253 = 6;

public static final int JOB_ENABLE_IRQ = 7;
public static final int JOB_DISABLE_IRQ = 8;
public static final int JOB_ENABLE_IRQ_A = 7;
public static final int JOB_DISABLE_IRQ_A = 8;
public static final int JOB_ENABLE_IRQ_B = 9;
public static final int JOB_DISABLE_IRQ_B = 10;

public static final int JOB_IOREAD_BYTE =  11;
public static final int JOB_IOREAD_WORD =  12;
public static final int JOB_IOREAD_LONG =  13;
public static final int JOB_IOWRITE_BYTE = 14;
public static final int JOB_IOWRITE_WORD = 15;
public static final int JOB_IOWRITE_LONG = 16;

public static final int JOB_RESET_IN_FFS = 17;
public static final int JOB_READ_IN_FFS = 18;
public static final int JOB_ENABLE_IN_FFS = 84;
public static final int JOB_DISABLE_IN_FFS = 89;

public static final int JOB_ENABLE_TIMEOUT = 19;
public static final int JOB_DISABLE_TIMEOUT = 20;
public static final int JOB_RESET_TIMEOUT_STATUS = 21;
public static final int JOB_READ_TIMEOUT_STATUS = 22;
public static final int JOB_SET_WATCHDOG_TIME = 24;

public static final int JOB_READ_DIP_SWITCH = 85;
public static final int JOB_SET_LED = 88;

public static final int JOB_WDOG3_INITIALIZE = 23;
public static final int JOB_WDOG3_SET_WATCHDOG_TIME = 24;
public static final int JOB_WDOG3_SET_RELAIS_TIME = 25;
public static final int JOB_WDOG3_SET_REPEAT_TIME = 26;
public static final int JOB_WDOG3_RELAIS_INVERSION = 27;

/* mr 20.10.2000 */

public static final int JOB_DOWNLOAD = 28;

/* mr 22.10.2000 Jobs für UNITIMER */

public static final int JOB_UNITIMER_RELAIS1 = 29;
public static final int JOB_UNITIMER_RELAIS2 = 30;
public static final int JOB_UNITIMER_OUT0 = 31;
public static final int JOB_UNITIMER_OUT1 = 32;
public static final int JOB_UNITIMER_OUT2 = 33;
public static final int JOB_UNITIMER_OUT3 = 34;
public static final int JOB_UNITIMER_OUT4 = 35;
public static final int JOB_UNITIMER_OUT5 = 36;
public static final int JOB_UNITIMER_OUT6 = 37;
public static final int JOB_UNITIMER_OUT7 = 38;	
public static final int JOB_UNITIMER_GETLCAREG = 39;
public static final int JOB_UNITIMER_SETLCAREG = 40;
public static final int JOB_UNITIMER_GETCNTA = 41;
public static final int JOB_UNITIMER_GETCNTB = 42;
public static final int JOB_UNITIMER_GETCNTAB =	43;	
public static final int JOB_UNITIMER_GETCTREG =	44;
public static final int JOB_UNITIMER_SETCTREG =	45;
public static final int JOB_UNITIMER_INITIALIZE = 46;
public static final int JOB_UNITIMER_SETCNTMODE = 47;
public static final int JOB_UNITIMER_UNIT7 = 48;

/* mr 27.11.2000 Jobs für PAR48IO */

public static final int JOB_PAR48IO_INPUT = 0;
public static final int JOB_PAR48IO_OUTPUT = 1;

public static final int JOB_PAR48IO_LATCH = 49;
public static final int JOB_PAR48IO_READCNT = 50;
public static final int JOB_PAR48IO_SETMODE = 51;
public static final int JOB_PAR48IO_WRITE = 52;
public static final int JOB_PAR48IO_READ = 54;

public static final int JOB_PAR48IO_RESET_TO_0 = 58;
public static final int JOB_PAR48IO_RESET_TO_1 = 59;
public static final int JOB_PAR48IO_IOMODE0_7 = 60;
public static final int JOB_PAR48IO_IOMODE00_07 = 60;
public static final int JOB_PAR48IO_IOMODE8_15 = 61;
public static final int JOB_PAR48IO_IOMODE08_15 = 61;
public static final int JOB_PAR48IO_IOMODE16_23 = 62;
public static final int JOB_PAR48IO_IOMODE24_31 = 63;
public static final int JOB_PAR48IO_IOMODE32_39 = 64;
public static final int JOB_PAR48IO_IOMODE40_47 = 65;

/* mr 29.11.2000 Jobs für OPTOLCA */
			
public static final int JOB_OPTOLCA_SETEXTRAMEMORY = 66;
public static final int JOB_OPTOLCA_GETEXTRAMEMORY = 67;
public static final int JOB_OPTOLCA_SM_START = 68;
public static final int JOB_OPTOLCA_SM_STOP = 69;
public static final int JOB_OPTOLCA_SM_SSR = 70;

/* mr 22.04.2002 Jobs für GPIB, PCIGPIB und USBGPIB */

public static final int JOB_REGW = 			73;
public static final int JOB_REGR = 			74;
public static final int JOB_READSRQ = 			75;
public static final int JOB_SERIALPOLL = 		76;
public static final int JOB_GTL = 			77;	
public static final int JOB_GET = 			78;
public static final int JOB_SDC = 			79;
public static final int JOB_LLO = 			80;	
public static final int JOB_DCL = 			81;
public static final int JOB_REN = 			90;
public static final int JOB_RESET = 			91;
public static final int JOB_TIMEOUT = 			92;
public static final int JOB_READ_TIMEOUT =		127;

/*  Jobs für PAR2DA Modul mr 03.06.2002 */

public static final int JOB_PAR2DA_ENABLE1 =      82;
public static final int JOB_PAR2DA_ENABLE2 =      83; 

/*  Jobs für schnellen Memory Zugriff mr 20.10.2002  */

public static final int JOB_FASTMEM_INIT = 		86; 
public static final int JOB_FASTMEM_RELEASE = 		87; 

/* mr 25.11.2002 Jobs für PCITTL32IO */

public static final int JOB_PCITTL32_INPUT = 		0;
public static final int JOB_PCITTL32_OUTPUT = 		1;
		
public static final int JOB_PCITTL32_IOMODE0_7 =	60;
public static final int JOB_PCITTL32_IOMODE00_07 = 	60;
public static final int JOB_PCITTL32_IOMODE8_15 =	61;
public static final int JOB_PCITTL32_IOMODE08_15 = 	61;
public static final int JOB_PCITTL32_IOMODE16_23 = 	62;
public static final int JOB_PCITTL32_IOMODE24_31 = 	63;
public static final int JOB_PCITTL32_IOMODE32_39 = 	64;
public static final int JOB_PCITTL32_IOMODE40_47 = 	65;

/* jobs für PCIEXT64 mr. 28.06.2004 */

public static final int JOB_PCIEXT64_READ_TEMPERATURE = 94;
public static final int JOB_PCIEXT64_ENABLE = 95;
public static final int JOB_PCIEXT64_DISABLE = 96;
public static final int JOB_PCIEXT64_CARD_DETECT_STATUS = 97;
public static final int JOB_PCIEXT64_RESET_ACTIVE = 98;
public static final int JOB_PCIEXT64_ACTIVE = 99;
public static final int JOB_PCIEXT64_PCI_CONFIGSPACE = 100;

/*  nächster job 101L              */

// Jobs für PCIWDOG3 & 4 mr. 27.09.2004

public static final int JOB_LOAD_WATCHDOG =				101;			
public static final int JOB_CLEAR_LOG =					102;								
public static final int JOB_READ_LOG =					103;											
public static final int JOB_TIME_SET =					104;											
public static final int JOB_TIME_GET =					105;								
public static final int JOB_SEND_SMS =					106;								
public static final int JOB_GOTO_IDLE =					107; 	
public static final int JOB_EEPROM_WRITE =				108;	
public static final int JOB_READ_DEFAULT_TIMEOUT =		109;
public static final int JOB_WRITE_DEFAULT_TIMEOUT =		110;
public static final int JOB_LOCK_DEVICE =				111;		
public static final int JOB_UNLOCK_DEVICE =				112;		
public static final int JOB_GETSTATUS =					113;		
public static final int JOB_GETSTATUS_STRING =			114;
public static final int JOB_SHUTDOWN =					115;
public static final int JOB_GETVERSION =				116;
public static final int JOB_IRQ_GET_DATA_RESULTCODE =	118;
public static final int JOB_IRQ_GET_DATA_EMAILADDRESS =	119;
public static final int JOB_IRQ_GET_DATA_EMAILTEXT =	120;
public static final int JOB_GET_EMAILTEXT =				121;
public static final int JOB_GET_EMAILADDRESS =			122;		
public static final int JOB_IRQ_GET_DATA_RESULTTYPE =	124;
public static final int JOB_GET_SHUTDOWNUSERABORTTIME = 125;
public static final int JOB_CANCEL_SHUTDOWN =			126;
public static final int JOB_READ_FLASH_MEMORY_BYTE =	128;
public static final int JOB_READ_FLASH_MEMORY_WORD =	129;
public static final int JOB_GET_PHASETEXT =				130;
public static final int JOB_READ_LOG_ENTRY =			131;
public static final int JOB_GET_PHASE =					132;
public static final int JOB_READ_WATCHDOG_TIMER =		133;
public static final int JOB_READ_RELAY_TIMER =			134;
public static final int JOB_READ_OPTOCOUPLER_INPUTS =	135;
public static final int JOB_READ_SMS_STATUS = 136;
public static final int JOB_READ_SMS_STATUS_STRING	=	137;
public static final int JOB_READ_TEMPERATURE_VALUES =	138;
public static final int JOB_READ_VOLTAGE_VALUES		=	139;

// Jobs für PCITTL64 mr. 23.05.2005

public static final int JOB_PCITTL64_INPUT			= 0;
public static final int JOB_PCITTL64_OUTPUT			= 1;

public static final int JOB_PCITTL64_IOMODE0_7		= 140;
public static final int JOB_PCITTL64_IOMODE8_15		= 141;
public static final int JOB_PCITTL64_IOMODE16_23	= 142;		
public static final int JOB_PCITTL64_IOMODE24_31	= 143;
public static final int JOB_PCITTL64_IOMODE32_39	= 144;
public static final int JOB_PCITTL64_IOMODE40_47	= 145;
public static final int JOB_PCITTL64_IOMODE48_55	= 146;
public static final int JOB_PCITTL64_IOMODE56_63	= 147;

// Jobs für USB-FLASH			

public static final int JOB_USB_FLASH_DEVICE		= 148;

// Jobs für PCIWDOG3 mr. 25.10.2005

public static final int JOB_SET_LOG_LEVEL			= 149;
public static final int JOB_GET_LOG_LEVEL			= 150;

// Jobs for USBAD8DAC2 mr. 18.11.2005

public static final int JOB_USBAD8DAC2_IOMODE0_7	= 151;
public static final int JOB_USBAD8DAC2_IOMODE8_15	= 152;
public static final int JOB_USBAD8DAC2_IOMODE16_23	= 153;

public static final int JOB_USBAD8DAC2_INPUT		= 0;
public static final int JOB_USBAD8DAC2_OUTPUT		= 1;

// Jobs for TTL ports  mr. 17.01.2005 ( DDR = Data Direction Register )
	
public static final int JOB_WRITE_DDR				= 154;
public static final int JOB_READ_DDR				= 155;

public static final int JOB_IOMODE0_7				= 156;
public static final int JOB_IOMODE8_15				= 157;
public static final int JOB_IOMODE16_23				= 158;		
public static final int JOB_IOMODE24_31				= 159;
public static final int JOB_IOMODE32_39				= 160;
public static final int JOB_IOMODE40_47				= 161;
public static final int JOB_IOMODE48_55				= 162;
public static final int JOB_IOMODE56_63				= 163;
	
public static final int JOB_INPUT					= 0;
public static final int JOB_OUTPUT					= 1;

public static final int JOB_USB_SET_FLASH_MODE		= 164;

public static final int JOB_INVALID = 			0x4d414a41;


/*  List of error codes for function QAPIGetLastError()*/

public static final int  ERROR_NONE = 0; 
public static final int  ERROR_GETLASTERROR = 1;
public static final int  ERROR_WSAGETLASTERROR = 2;
public static final int  ERROR_QLIB_INTERNAL = 3;
public static final int  ERROR_QLIB_BUFFER_TO_SMALL = 4;
public static final int  ERROR_QLIB_CONNECTION  = 5;
public static final int  ERROR_QLIB_CONNECTION_TIMEOUT = 6;
public static final int  ERROR_QLIB_CONNECTION_LOGIN_FAILED = 7;
public static final int  ERROR_QLIB_CONNECTION_DISCONNECTED = 8;
public static final int  ERROR_QLIB_ILLEGAL_PARAMETER = 9;
public static final int  ERROR_EXCEPTION = 10;
public static final int  ERROR_LOADING_WINSOCK = 11;
public static final int  ERROR_QLIB_CARDID_NOT_VALID = 12;
public static final int  ERROR_QLIB_FUNCTION_NOT_SUPPORTED = 13;
public static final int  ERROR_GPIB_TIMEOUT = 14;
public static final int  ERROR_GPIB_ERR = 15;
public static final int  ERROR_QLIB_UNABLE_TO_LOAD_QMULTI = 16;
public static final int  ERROR_QLIB_QMULTI_HAS_WRONG_VERSION  = 17;
public static final int  ERROR_QLIB_QMULTI_DIRECTIO = 18;
public static final int  ERROR_QLIB_FASTMEM_MAP_FAILED = 19;
public static final int  ERROR_QLIB_FASTMEM_UNMAP_FAILED = 20;
public static final int  ERROR_QLIB_DEVICE_BUSY = 21;
public static final int  ERROR_QLIB_DEVICE_NOT_PRESENT = 22;
public static final int  ERROR_QLIB_DEVICE_CLOSED = 23;
public static final int  ERROR_QLIB_IRQ_DISABLED  = 24;
public static final int  ERROR_QLIB_IRQ_ALREADY_ENABLED = 25;
public static final int  ERROR_QLIB_IRQ_ALREADY_DISABLED = 26;
public static final int  ERROR_QLIB_IRQ_NOT_AVAILABLE = 27;
public static final int  ERROR_QLIB_TIMEOUT = 28;
public static final int  ERROR_QLIB_RESET_ERROR = 29;
public static final int  ERROR_QLIB_INVALID_DATA = 30;
public static final int  ERROR_INVALID_LOG_DATA = 31;
public static final int  ERROR_QLIB_FILE_NOT_FOUND = 32;
public static final int  ERROR_QLIB_FILE_HEX_FORMAT_REQUIRED = 33;
public static final int  ERROR_QLIB_WRITE_FLASH_FAILED = 34;
public static final int  ERROR_QLIB_VERIFY_FLASH_FAILED = 35;
public static final int  ERROR_QLIB_UNABLE_INITIALIZE_DEVICE = 36;
public static final int  ERROR_QLIB_NOT_SUPPORTED_IN_REMOTE_MODE = 37; 
public static final int  ERROR_QLIB_COUNTER_OVERFLOW = 38; 
public static final int  ERROR_QLIB_SIGNAL_OUT_OF_RANGE = 39;	  
 
/*
**  List of valid card id's
*/

public static final int PAR8DA = 			0;         
public static final int UNITIMER = 			1;         
public static final int PAR12AD = 			2;
public static final int PDAC4 = 			3;
public static final int PAD12 = 			4;
public static final int PAD16 = 			5;
public static final int PAD12DAC4 = 		6;
public static final int PAD16DAC4 = 		7;
public static final int PUNIREL = 			8;
public static final int ADGVT12 = 			9;
public static final int ADGVT16 = 			10;
public static final int PAR16AD = 			11;
public static final int PREL8 =  			12;
public static final int PREL16 =    	   		13;
public static final int POPTOREL16 = 			14;
public static final int POPTO16IN = 			15;
public static final int PWDOG = 			16;
public static final int POPTOLCA = 			17;
public static final int WATCHDOG = 			18;
public static final int PTTL24IO = 			19;
public static final int PROTO1 = 			20;
public static final int PROTO2 = 			21;
public static final int PAR8R =      			22;
public static final int PAR8O =        			23;
public static final int PAR48IO =      			24;
public static final int PAR2DA =       			25;
public static final int DAC4 = 				26;
public static final int OPTORELTTL =   			27;
public static final int OPTOREL16 =    			28;
public static final int OPTOMOS =      			29;
public static final int OPTOLCALC =    			30;
public static final int OPTOLCA =      			31;
public static final int OPTO16IN =     			32;
public static final int DAC4UI =       			33;
public static final int DAC16BITDUAL = 			34;
public static final int ADI1 = 				35;
public static final int ADI2 = 				36;
public static final int AD12BIT = 			37;
public static final int C3X32BIT = 			38;
public static final int R220V = 			39;
public static final int REL16 = 			40;
public static final int REL8 = 				41;
public static final int REL8UM = 			42;
public static final int TIMER9 = 			43;
public static final int TIMER9LCA = 			44;
public static final int TTL24IO = 			45;
public static final int WATCHDOG3 = 			46;
public static final int MFB51 = 			47;
public static final int TAP14PCI = 			48;
public static final int TAP14ISA = 			49;
public static final int USBWDOG1 = 			50;	
public static final int USBWDOG2 = 			51;
public static final int USBWDOG3 =                  	52;
public static final int GPIB =                          53;
public static final int PCIGPIB = 			54;
public static final int USBGPIB = 			55;
public static final int PCITTL32 = 			56;
public static final int PCIOPTOREL16 = 			57;
public static final int PCIOPTO16IO =                   58;
public static final int PCIOPTO16IOLC = 		59;
public static final int PCIREL16 = 			60;
public static final int PCIPROTO = 			61;
public static final int USBOPTOREL16 = 			62;
public static final int USBOPTO16IO = 			63;
public static final int USBREL8 = 			64;
public static final int USBOPTO8 = 			65;
public static final int PCIAD16DAC4 = 			66;
public static final int USBREL8LC = 			67;
public static final int USBOPTO8LC = 			68;
public static final int LOGICANALYZER = 		69;
public static final int TASTMAUS1	=			70;
public static final int PCIWDOG3 =				71;
public static final int PCIWDOG4      = 72;
public static final int USBOPTOREL32  = 73;
public static final int USBOPTOIO32   = 74;
public static final int PCIEXT64      = 75;
public static final int PCITTL64      = 76;
public static final int USBFLASH      = 77;
public static final int USBAD8LC      = 78;
public static final int USBOPTOIN64   = 79;
public static final int USBOPTOOUT64  = 80;
public static final int USBREL64      = 81;
public static final int PCITTL64FIFO  = 82;
public static final int PCIDAC416     = 83;
public static final int USBAD8DAC2    = 84;
public static final int SEROPTOREL32  = 85;
public static final int SERREL64	  = 86;
public static final int ETHOPTOREL32  = 87;
public static final int ETHREL64 	  = 88;
public static final int USBOPTOREL8   = 89;
public static final int USBOPTOIO8	  = 90;
public static final int USBAD8DAC214  = 91;
public static final int USBTTL24	  = 92;
public static final int ETHOPTO64IN   = 93;
public static final int ETHOPTO64OUT  = 94;
public static final int ETHOPTO32IO   = 95;
public static final int ETHOPTOREL16  = 96;
public static final int ETHOPTO16IO   = 97;
public static final int ETHOPTOREL8   = 98;
public static final int ETHOPTO8IO    = 99;
public static final int SEROPTO64IN   = 100;
public static final int SEROPTO64OUT  = 101;
public static final int SEROPTO32IO   = 102;
public static final int SEROPTOREL16  = 103;
public static final int SEROPTO16IO   = 104;
public static final int SEROPTOREL8   = 105;
public static final int SEROPTO8IO    = 106;
public static final int LASTCARD      = 106;


public static final int DEFAULTGPIB = 			0x8000;


/*
**	Defines für Abwärtskompatibilität
*/

public static final int POPTOREL = POPTOREL16;
public static final int WATCHDOG1 = WATCHDOG;
public static final int WATCHDOG2 = WATCHDOG;
public static final int PWDOG1 = PWDOG;
public static final int PWDOG2 = PWDOG;
public static final int PWDOG2N = PWDOG;

public static final int WATCHDOG12 = WATCHDOG;
public static final int PWDOG12 = PWDOG;
public static final int USBWDOG	 = USBWDOG1;
	

public native	int QAPIVersion(int type);
public native	int QAPIInitialize(int para1, int para2, int para3, int para4);
public native	void QAPIExtSetDebugLevel(int dbgval);
public native	void QAPIExtEnableIRQ(int cdl,int mode);
public native	int QAPIExtNumOfCards();
//public native	LPCARDDATAS  QAPIExtGetCardInfo(int cardnum);
//public native	int QAPIExtGetCardInfoEx(int cardnum,LPCARDDATAS lpcd);
//public native	void QAPIExtReleaseCardInfo(LPCARDDATAS lpcd);
public native	int QAPIExtOpenCard(int cardnum,int devnum);
public native	void QAPIExtCloseCard(int cdl);
public native	int QAPIExtReadAD(int cdl,int channel,int mode);
public native	void QAPIExtWriteDA(int cdl,int channel,int value,int mode);
public native	void QAPIExtLatchDA(int cdl);
public native	float QAPIExtConvertDWToVoltage(int cdl,int value,int mode);
public native	int QAPIExtConvertVoltageToDW(int cdl,float value,int mode);
public native	int QAPIExtReadDI1(int cdl,int channel,int mode);
public native	int QAPIExtReadDI8(int cdl,int channel,int mode);
public native	int QAPIExtReadDI16(int cdl,int channel,int mode);
public native	int QAPIExtReadDI32(int cdl,int channel,int mode);
public native	void QAPIExtWriteDO1(int cdl,int channel,int value,int mode);
public native	void QAPIExtWriteDO8(int cdl,int channel,int value,int mode);
public native	void QAPIExtWriteDO16(int cdl,int channel,int value,int mode);
public native	void QAPIExtWriteDO32(int cdl,int channel,int value,int mode);
public native	void QAPIExtWrite8255(int cdl,int chipnum,int reg,int value);
public native	int QAPIExtRead8255(int cdl,int chipnum,int reg);
public native	void QAPIExtWrite8253(int cdl,int chipnum,int reg,int value);
public native	int QAPIExtRead8253(int cdl,int chipnum,int reg);
public native	int QAPIExtWatchdog(int cdl,int job);
public native	int QAPIExtSpecial(int cdl,int jobcode,int para1,int para2);
public native	int QAPIExtReadString(int cdl, int device, String buffer, int maxsize, int mode);
public native	int QAPIExtWriteString(int cdl, int device, String buffer, int maxsize, int mode);
public native	int QAPIExtWriteStringEx(int cdl, int device, String buffer, int maxsize, int mode, int bEnableREN);
public native	int   QAPINumOfCards();
//public native	LPCARDDATAS  QAPIGetCardInfo(int cardnum);
//public native	int	QAPIGetCardInfoEx(int cardnum,LPCARDDATAS lpcd);
public native	int	QAPIGetAD(int cardnum,int channel);
public native	float	QAPIConvertDWToVoltage (int cardnum,int value, int mode);
public native	int	QAPIConvertVoltageToDW (int cardnum,float value, int mode);
public native	void	QAPIPutDA(int cardnum,int channel,int value);
public native	int	QAPIGetDI(int cardnum,int channel);
public native	void	QAPIPutDO(int cardnum,int channel,int value);
public native	int	QAPIRead8253(int cardnum,int reg);
public native	void	QAPIWrite8253(int cardnum,int reg,int value);
public native	int	QAPIRead8255(int cardnum,int reg);
public native	void	QAPIWrite8255(int cardnum,int reg,int value);
public native	int	QAPISpecial(int cardnum,int jobcode,int para1,int para2);
public native	int	QAPIReadString(int cardnum, int device, String buffer, int maxsize, int mode);
public native	int	QAPIWriteString(int cardnum, int device, String buffer, int maxsize, int mode);
public native	int	QAPIWriteStringEx(int cardnum, int device, String buffer, int maxsize, int mode, int bEnableREN);
public native	void	QAPIWatchdogEnable();
public native	void	QAPIWatchdogDisable();
public native	void	QAPIWatchdogRetrigger();
public native	void	QAPIWatchdogLoad();
public native  	int	QAPIWatchdogStatus();	
public native  	int	QAPIConnect(String  ip, int port, String  username, String  password, int timeout);
public native  	int	QAPIDisconnect();
public native  	int	QAPIGetLastError();
public native  	int	QAPIGetLastErrorCode();
public native  	String	QAPIGetLastErrorString();
public native  	int	QAPIGetLastErrorStringEx(String  buffer, int buffersize);
public native  	int	QAPIWaitIRQ(int cardnum, int devnum);
public native  	int	QAPIGetConnectionMode(int nType, StringBuffer  buffer, int buffersize);


	static 	{
		System.loadLibrary("qlib32"); 	// win32: qlib32.dll                                               
		}
}
```

Das war erstmal der Java-Code. Die qlib32.dll ist in C:\Windows\System32 installiert, trotzdem bekomme ich : 





> java.lang.UnsatisfiedLinkError: QAPIExtOpenCard




Wenn mir jemand bei der Lösung des Problems helfen könnte, würde ich mich sehr freuen! Dom.


----------



## L-ectron-X (19. Mai 2007)

Wann die Exception auftritt kannst du hier nach lesen:
http://java.sun.com/j2se/1.5.0/docs/api/java/lang/UnsatisfiedLinkError.html


----------



## Dominicana (19. Mai 2007)

Hmm.... da steht das selbe, wie in meinem Kompendium :





> Ausgeworfen, wenn die Java Virtual Machine eine passende Native-Language-Definition von einer native deklarierten Methode nicht finden kann.


Aber wieso kann die JVM die >Native-Language-Definition< nicht finden? Wie/wo muß ich sie definieren/deklarieren?


----------



## madboy (19. Mai 2007)

nur n Schnellschuß aber vielleicht musst du das (ganz unten in qlib32)

```
static    { 
      System.loadLibrary("qlib32");    // win32: qlib32.dll                                                
      }
```
ändern weil du ein "win32"-System hast (was auch immer das bedeuten mag :wink: ).

Gruß,
madboy


----------



## Dominicana (20. Mai 2007)

*Wikipedia:*


> Win32 ist eine beliebte Abkürzung für die teilweise oder komplett 32-Bit-basierten Microsoft-Windows-Betriebssysteme Windows 95 (16/32 Bit), Windows 98 (16/32 Bit), Windows ME (16/32 Bit), Windows NT ab Version 4.0 (32 Bit), Windows 2000 (32 Bit), Windows XP (32/64 Bit) und Windows Vista (32/64 Bit).


Bloß gut, daß da nicht *//win128: qlib128.dll* stand  :wink:


----------



## madboy (20. Mai 2007)

Danke, schon wieder was gelernt! Sollte mir wohl auch n Windows installieren dass ich mitreden kann :wink:
Aber das ist ja das Schöne an Java: Menschen aller Betriebssysteme können sich treffen und mehr oder weniger (wie meiner grad) Kommentare von sich geben.



> Bloß gut, daß da nicht //win128: qlib128 stand


Hehehe, das dauert hoffentlich noch n Jährchen oder zwei.

Dir auf jeden Fall noch viel Erfolg!

Gruß,
madboy


----------

