Fixed bug in JNI library resulting in the DLLMain entry point never being called. Bad calling convention was to blame.