Module: Vigilem::Win32API::Types::PVOID
- Extended by:
- FFI::DataConverter
- Defined in:
- lib/vigilem/win32_api/types.rb
Class Method Summary collapse
-
.from_native(value, ctx) ⇒ Bignum, Integer
Converts the specified value from the native type.
-
.to_native(value, ctx) ⇒ ::FFI::Pointer
Converts the specified value to the native type.
Class Method Details
.from_native(value, ctx) ⇒ Bignum, Integer
Converts the specified value from the native type.
31 32 33 |
# File 'lib/vigilem/win32_api/types.rb', line 31 def from_native(value, ctx) value.address end |
.to_native(value, ctx) ⇒ ::FFI::Pointer
Converts the specified value to the native type.
37 38 39 40 41 42 43 44 45 46 |
# File 'lib/vigilem/win32_api/types.rb', line 37 def to_native(value, ctx) case when value.kind_of?(::FFI::Pointer) value when value.kind_of?(::FFI::Struct) value.to_ptr else ::FFI::Pointer.new(value.to_i) end end |