I've got a DLL written in C (that I can't edit) that has some function prototype that looks like
#include <stdio.h>
void foo(FILE *bar);
I'd like to create a JNA interface to the DLL and it's unclear what I need to pass for the FILE *bar argument. I assume I need to pass an InputStream (which is my preference), but the JNA literature seems sparse on the subject.
What would the Java interface look like? and what do I really need to pass to foo?
Edit: foo assumes bar is the result of an fopen and calls operations like fscanf.
Edit 2: Ultimately, I have a string in Java that I need to read in C as if it were a file, (which might be a different question altogether). Ideally I'd like to avoid writing the file, which is why converting an InputStream to a C file pointer is so desirable (and evidently quite difficult).