hybridgroup / rubyserial

FFI Ruby library for RS-232 serial port communication
https://rubygems.org/gems/rubyserial
Other
154 stars 27 forks source link

Fix dereferencing of LPDWORD lpNumberOfBytesRead in ReadFile() and LPDWO... #18

Closed planteen closed 9 years ago

planteen commented 9 years ago

...RD lpNumberOfBytesWritten in WriteFile() calls to Windows FFI

zankich commented 9 years ago

@planteen if I remember correctly, the reason why we don't use read_int is because it does not work with Jruby. Did you test this with Jruby?

planteen commented 9 years ago

@zankich No, Ruby MRI (ruby 2.0.0p598 (2014-11-13) [i386-mingw32])

zankich commented 9 years ago

@planteen I don't have access to a windows machine at the moment, can you test this with Jruby?

planteen commented 9 years ago

@zankich Confirmed issue #19 was present with JRuby. Tested this fix with both jruby --2.0 and jruby --1.9. Fix resolved issue under both versions.

zankich commented 9 years ago

Great, thanks for the pull request!