I have a bootloader that is written in Java that is using jssc and crashes I apologize for posting here as it's not entirely related to Arduino, but I would temporarily change the value of the jSSC_NATIVE_LIB_VERSION #define in the jssc_SerialNativeInterface.h file so that I could verify if the new DLL had loaded. which I've attached below.Ĭaveat: I found it rather difficult to test my changes to the DLL file as it seem like it would get cached in some cases and I could myself testing what I thought was new code only to find windows using the prior version.
I'm also not an expert in writing C++ driver code or Windows, so it would helpful if someone else could vet my code.
I was able to build a new version of the jSSC-2.8_x86_64.dll file using Visual Studio 2017 and splice it into the jssc.jar library file and it seems to work with Java 9 and Windows 10 (at least in the application in which I'm using JSSC.) However, I'm not really sure how to rebuild all the other native code modules. It boils down to the way memory was being allocated on the stack in the C++ functions Java_jssc_SerialNativeInterface_openPort() and Java_jssc_SerialNativeInterface_readBytes(). I've managed to create what I think is a reasonably good fix for the problem. I then ran Dependency Walker on the original jSSC-2.8_x86_64.dll file and it reported these DLLs which, as above, each depend on other DLLs that are not available in Windows 10:īased on this, I now think a proper fix will require eliminating the need for DLLs that are no longer available in Windows 10. UCRTBASED.DLL (because I compiled in DEBUG mode).VCRUNTIME140D.DLL (because I compiled in DEBUG mode).Eventually, I discovered a tool called Dependency Walker that let me analyze the DLLs that my revised jSSC-2.8_x86_64.dll relied on and found it needed these other DLLs and, in turn, these DLLs seem to depend on other DLLs that are missing in Windows 10 (and too numerous to list): However, when I deinstalled Visual Studio when the 30 day trial period was over, I found that my code would no longer work. The "fixed" code I attached below was built using a 30 day trial version of Visual Studio and was compiled in 圆4 DEBUG mode and seemed to work. Update: 11-8-2017 Since posting this I have discovered that the issue is more complex than I first thought.