lib/win32/event.rb in win32-event-0.6.0 vs lib/win32/event.rb in win32-event-0.6.1
- old
+ new
@@ -3,34 +3,37 @@
# The Win32 module serves as a namespace only.
module Win32
# The Event class encapsulates Windows event objects.
class Event < Ipc
+ typedef :ulong, :dword
+ typedef :uintptr_t, :handle
+
ffi_lib :kernel32
class SecurityAttributes < FFI::Struct
layout(
:nLength, :ulong,
:lpSecurityDescriptor, :pointer,
:bInheritHandle, :bool
)
end
- attach_function :CreateEvent, :CreateEventW, [:pointer, :bool, :bool, :buffer_in], :ulong
- attach_function :OpenEvent, :OpenEventW, [:ulong, :bool, :buffer_in], :ulong
- attach_function :SetEvent, [:ulong], :bool
- attach_function :ResetEvent, [:ulong], :bool
+ attach_function :CreateEvent, :CreateEventW, [:pointer, :bool, :bool, :buffer_in], :handle
+ attach_function :OpenEvent, :OpenEventW, [:ulong, :bool, :buffer_in], :handle
+ attach_function :SetEvent, [:handle], :bool
+ attach_function :ResetEvent, [:handle], :bool
private_class_method :CreateEvent, :OpenEvent, :SetEvent, :ResetEvent
INVALID_HANDLE_VALUE = 0xFFFFFFFF
EVENT_ALL_ACCESS = 0x1F0003
# This is the error raised if any of the Event methods fail.
class Error < StandardError; end
# The version of the win32-event library
- VERSION = '0.6.0'
+ VERSION = '0.6.1'
# The name of the Event object. The default is nil
#
attr_reader :name