Method: Phidgets::FFI.error_description
- Defined in:
- lib/phidgets-ffi/common.rb
.error_description(code) ⇒ String
Gets the description for an error code.
17 18 19 20 21 22 |
# File 'lib/phidgets-ffi/common.rb', line 17 def self.error_description(code) ptr = ::FFI::MemoryPointer.new(:string) Phidgets::FFI::Common.getErrorDescription(code, ptr) strPtr = ptr.get_pointer(0) strPtr.null? ? nil : strPtr.read_string end |