Skip to main content

Posts

Showing posts with the label hid

" The crash happened outside the Java Virtual Machine in native code.”how to solve this error (Java)?

Using the library in this link http://www.blog.kslemb.com/doku.php/en/projects/globx/java_hid I have been modfied this code to write on a HID terminal if (HIDHandle.equals(WinBase.INVALID_HANDLE_VALUE)) { return HID_DEVICE_NOT_OPENED; } /* Write Feature report */ boolean Status=Kernel32.INSTANCE.WriteFile(HIDHandle, buffer, (int)buffersize, null, null); if (Status == false) { debug("Write File: " + getSystemError(Kernel32.INSTANCE.GetLastError())); return HID_DEVICE_TRANSFER_FAILED; } else { return HID_DEVICE_SUCCESS; } This code would successfully writes on the HID device but then it would produce this error A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x7600d4d5, pid=4660, tid=3780 # # JRE version: 6.0_27-b07 # Java VM: Java HotSpot(TM) Client VM (20.2-b06 mixed mode, sharing windows-x86 ) # Problematic frame: # C [KERNELBASE.dll+0xd4d5] # # An error report file with more informati