Page 1 of 1

inpout32 in Java (jnpout32reg)

Posted: Wed Apr 06, 2016 1:49 pm
by robinkramer
Hi everyone,

I am in desperate need for help. My name is Robin, and I am a student Human-Machine Communication at the University of Groningen in the Netherlands. For my master thesis I have written an experiment in Java, which I want to use for EEG-research. In order to do that, I need to send specific "event markers" to the EEG system via a parallel port.

I have searched and searched and finally found a Java implementation of inpout32, called jnpout32reg. However, I cannot get it to work. Then I downloaded Parallel Port Tester (http://download. cnet. com/Parallel-Port-Tester/ 3000-2086_4-75940249.html) which only works with inpout32.ddl and this works perfectly. I can even see the data being send to the EEG system. Is there some way to use inpout32.dll via Java, or is jnpout32reg the only possibility? And how would I go about to get this to work?

Thank you so much. My entire thesis depends on getting this to work.

Re: inpout32 in Java (jnpout32reg)

Posted: Thu Apr 07, 2016 1:25 am
by phil
Sorry, I don't know Java very well so I don't think I can help. The little I do know, I would have thought you would need to make use of JNI (java native interface) by writing a C/C++ DLL to interact between Java and the native InpOut32 DLL. Maybe someone else can.

It might be worth asking the author of InpOut32 at Logix4U as I only ported InpOut32 to 64bit Windows. However, they seem to be difficult to get in touch with these days :(

Thanks,
Phil

Re: inpout32 in Java (jnpout32reg)

Posted: Fri Apr 08, 2016 1:49 pm
by robinkramer
I have found the solution, but it is a workaround. Instead of using jnpout32, I used inpout32/inpoutx64 via a Python script, which, in turn, I executed from within Java. For more explanation see:
http:// stackoverflow. com/questions/36456252/parallel-port-communication-with-jnpout32pkg-jnpout32reg