win32-service 2.2.0 → 2.3.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,4 @@
1
- require 'ffi' unless defined?(FFI)
1
+ require "ffi" unless defined?(FFI)
2
2
 
3
3
  module Windows
4
4
  module ServiceFunctions
@@ -22,54 +22,54 @@ module Windows
22
22
  ffi_lib :kernel32
23
23
 
24
24
  attach_pfunc :CloseHandle, [:handle], :bool
25
- attach_pfunc :CreateEvent, :CreateEventA, [:ptr, :int, :int, :str], :handle
26
- attach_pfunc :CreateThread, [:ptr, :size_t, :ptr, :ptr, :dword, :ptr], :handle, :blocking => true
25
+ attach_pfunc :CreateEvent, :CreateEventA, %i{ptr int int str}, :handle
26
+ attach_pfunc :CreateThread, %i{ptr size_t ptr ptr dword ptr}, :handle, blocking: true
27
27
  attach_pfunc :EnterCriticalSection, [:ptr], :void
28
- attach_pfunc :FormatMessage, :FormatMessageA, [:ulong, :ptr, :ulong, :ulong, :str, :ulong, :ptr], :ulong
28
+ attach_pfunc :FormatMessage, :FormatMessageA, %i{ulong ptr ulong ulong str ulong ptr}, :ulong
29
29
  attach_pfunc :GetCurrentProcess, [], :handle
30
30
  attach_pfunc :InitializeCriticalSection, [:ptr], :void
31
31
  attach_pfunc :LeaveCriticalSection, [:ptr], :void
32
32
  attach_pfunc :SetEvent, [:handle], :bool
33
- attach_pfunc :WaitForSingleObject, [:handle, :dword], :dword, :blocking => true
34
- attach_pfunc :WaitForMultipleObjects, [:dword, :ptr, :int, :dword], :dword
33
+ attach_pfunc :WaitForSingleObject, %i{handle dword}, :dword, blocking: true
34
+ attach_pfunc :WaitForMultipleObjects, %i{dword ptr int dword}, :dword
35
35
 
36
36
  ffi_lib :advapi32
37
37
 
38
- callback :handler_ex, [:ulong, :ulong, :ptr, :ptr], :void
38
+ callback :handler_ex, %i{ulong ulong ptr ptr}, :void
39
39
 
40
- attach_pfunc :AdjustTokenPrivileges, [:handle, :int, :ptr, :dword, :ptr, :ptr], :bool
40
+ attach_pfunc :AdjustTokenPrivileges, %i{handle int ptr dword ptr ptr}, :bool
41
41
  attach_pfunc :CloseServiceHandle, [:handle], :bool
42
42
 
43
43
  attach_pfunc :ChangeServiceConfig, :ChangeServiceConfigA,
44
- [:handle, :dword, :dword, :dword, :str, :str, :ptr, :ptr, :str, :str, :str],
44
+ %i{handle dword dword dword str str ptr ptr str str str},
45
45
  :bool
46
46
 
47
- attach_pfunc :ChangeServiceConfig2, :ChangeServiceConfig2A, [:handle, :dword, :ptr], :bool
47
+ attach_pfunc :ChangeServiceConfig2, :ChangeServiceConfig2A, %i{handle dword ptr}, :bool
48
48
 
49
49
  attach_pfunc :CreateService, :CreateServiceA,
50
- [:handle, :string, :string, :dword, :dword, :dword, :dword,
51
- :string, :string, :ptr, :pointer, :string, :string],
50
+ %i{handle string string dword dword dword dword
51
+ string string ptr pointer string string},
52
52
  :handle
53
53
 
54
- attach_pfunc :ControlService, [:handle, :dword, :ptr], :bool
54
+ attach_pfunc :ControlService, %i{handle dword ptr}, :bool
55
55
  attach_pfunc :DeleteService, [:handle], :bool
56
56
 
57
57
  attach_pfunc :EnumServicesStatusEx, :EnumServicesStatusExA,
58
- [:handle, :int, :dword, :dword, :ptr, :dword, :ptr, :ptr, :ptr, :string],
58
+ %i{handle int dword dword ptr dword ptr ptr ptr string},
59
59
  :bool
60
60
 
61
- attach_pfunc :GetServiceDisplayName, :GetServiceDisplayNameA, [:handle, :string, :ptr, :ptr], :bool
62
- attach_pfunc :GetServiceKeyName, :GetServiceKeyNameA, [:handle, :string, :ptr, :ptr], :bool
63
- attach_pfunc :LookupPrivilegeValue, :LookupPrivilegeValueA, [:string, :string, :ptr], :bool
64
- attach_pfunc :OpenSCManager, :OpenSCManagerA, [:ptr, :ptr, :dword], :handle
65
- attach_pfunc :OpenProcessToken, [:handle, :dword, :ptr], :bool
66
- attach_pfunc :OpenService, :OpenServiceA, [:handle, :string, :dword], :handle
67
- attach_pfunc :QueryServiceConfig, :QueryServiceConfigA, [:handle, :ptr, :dword, :ptr], :bool
68
- attach_pfunc :QueryServiceConfig2, :QueryServiceConfig2A, [:handle, :dword, :ptr, :dword, :ptr], :bool
69
- attach_pfunc :QueryServiceStatusEx, [:handle, :int, :ptr, :dword, :ptr], :bool
70
- attach_pfunc :RegisterServiceCtrlHandlerEx, :RegisterServiceCtrlHandlerExA, [:str, :handler_ex, :ptr], :handle
71
- attach_pfunc :SetServiceStatus, [:handle, :ptr], :bool
72
- attach_pfunc :StartService, :StartServiceA, [:handle, :dword, :ptr], :bool
73
- attach_pfunc :StartServiceCtrlDispatcher, :StartServiceCtrlDispatcherA, [:ptr], :bool, :blocking => true
61
+ attach_pfunc :GetServiceDisplayName, :GetServiceDisplayNameA, %i{handle string ptr ptr}, :bool
62
+ attach_pfunc :GetServiceKeyName, :GetServiceKeyNameA, %i{handle string ptr ptr}, :bool
63
+ attach_pfunc :LookupPrivilegeValue, :LookupPrivilegeValueA, %i{string string ptr}, :bool
64
+ attach_pfunc :OpenSCManager, :OpenSCManagerA, %i{ptr ptr dword}, :handle
65
+ attach_pfunc :OpenProcessToken, %i{handle dword ptr}, :bool
66
+ attach_pfunc :OpenService, :OpenServiceA, %i{handle string dword}, :handle
67
+ attach_pfunc :QueryServiceConfig, :QueryServiceConfigA, %i{handle ptr dword ptr}, :bool
68
+ attach_pfunc :QueryServiceConfig2, :QueryServiceConfig2A, %i{handle dword ptr dword ptr}, :bool
69
+ attach_pfunc :QueryServiceStatusEx, %i{handle int ptr dword ptr}, :bool
70
+ attach_pfunc :RegisterServiceCtrlHandlerEx, :RegisterServiceCtrlHandlerExA, %i{str handler_ex ptr}, :handle
71
+ attach_pfunc :SetServiceStatus, %i{handle ptr}, :bool
72
+ attach_pfunc :StartService, :StartServiceA, %i{handle dword ptr}, :bool
73
+ attach_pfunc :StartServiceCtrlDispatcher, :StartServiceCtrlDispatcherA, [:ptr], :bool, blocking: true
74
74
  end
75
75
  end
@@ -1,4 +1,4 @@
1
- require 'ffi' unless defined?(FFI)
1
+ require "ffi" unless defined?(FFI)
2
2
 
3
3
  module Windows
4
4
  module ServiceStructs
@@ -1,6 +1,6 @@
1
1
  module Win32
2
2
  class Service
3
- VERSION = "2.2.0"
3
+ VERSION = "2.3.2".freeze
4
4
  MAJOR, MINOR, TINY = VERSION.split(".")
5
5
  end
6
6
  end
data/lib/win32-daemon.rb CHANGED
@@ -1 +1 @@
1
- require_relative 'win32/daemon'
1
+ require_relative "win32/daemon"
data/lib/win32-service.rb CHANGED
@@ -1 +1 @@
1
- require_relative 'win32/service'
1
+ require_relative "win32/service"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: win32-service
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel J. Berger
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-11-20 00:00:00.000000000 Z
12
+ date: 2021-04-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ffi
@@ -95,20 +95,6 @@ dependencies:
95
95
  - - ">="
96
96
  - !ruby/object:Gem::Version
97
97
  version: '0'
98
- - !ruby/object:Gem::Dependency
99
- name: rake
100
- requirement: !ruby/object:Gem::Requirement
101
- requirements:
102
- - - ">="
103
- - !ruby/object:Gem::Version
104
- version: '0'
105
- type: :development
106
- prerelease: false
107
- version_requirements: !ruby/object:Gem::Requirement
108
- requirements:
109
- - - ">="
110
- - !ruby/object:Gem::Version
111
- version: '0'
112
98
  - !ruby/object:Gem::Dependency
113
99
  name: win32-security
114
100
  requirement: !ruby/object:Gem::Requirement
@@ -162,7 +148,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
162
148
  - !ruby/object:Gem::Version
163
149
  version: '0'
164
150
  requirements: []
165
- rubygems_version: 3.0.3
151
+ rubygems_version: 3.1.4
166
152
  signing_key:
167
153
  specification_version: 4
168
154
  summary: An interface for MS Windows services