Jump to content
Excelsior Forums


  • Content count

  • Joined

  • Last visited


Community Reputation

0 Neutral

About oelke

  • Rank
  • Birthday 01/01/1
  1. oelke

    xFunction.dll crashes JAVA

    How exactly would I write the Argument line then? Now I use "Argument arg1=new Argument(ThumbPic, Argument.CSTRING); " to set the first Parameter to "ThumbPic". How can I do that with type "char*"?
  2. oelke

    xFunction.dll crashes JAVA

    I try to call a function from a DLL with xFunction but it always crashes JAVA in xfunction.dll. I'm not sure if I call the function correctly as I haven't found a similar sample for it. The function in the DLL looks like this: /* Return pointer to template or NULL if any error happened pDib - pointer to DIB (device-independent bitmap) of the fingerprint image (uncompressed, 8 bit per pixel, 256 color, grayscale, 500 dpi) (input) size - size ot the memory block, returned the function (output) quality - quality of the fingerprint image in the range 0...100 (output) */ char* WINAPI enroll(char* pDib, int &size, int& quality); I have tried to call the function in JAVA like this: xFunction f = new xFunction("sndFingerPrint", "CSTRING _enroll@12(CSTRING, int*, int*)"); Argument arg1=new Argument(ThumbPic, Argument.CSTRING); Pointer arg2=Pointer.create("int* "); Pointer arg3=Pointer.create("int* "); String returnStr =(String) f.invoke(arg1, arg2, arg3); mySize = ((Integer)arg2.deref()).intValue(); myQuality = ((Integer)arg3.deref()).intValue(); The xfunction.dll crashes with the call of f.invoke so I think it might have something to do with the parameter types I'm using. Am I doing anything wrong here? The first parameter actually is a 120 KB bitmap filled in a Java String. Maybe xFunction has a problem with that? I hope someone can help me getting this to work. Best Regards, Andreas Oelke