Converted the WinAPI to JNA