windows-pr 0.9.1 → 0.9.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +5 -0
- data/lib/windows/com.rb +1 -1
- data/lib/windows/console.rb +2 -2
- data/lib/windows/debug.rb +1 -1
- data/lib/windows/error.rb +1 -1
- data/lib/windows/file.rb +10 -0
- data/lib/windows/library.rb +1 -1
- data/lib/windows/memory.rb +1 -1
- data/lib/windows/msvcrt/file.rb +1 -1
- data/lib/windows/msvcrt/io.rb +1 -1
- data/lib/windows/msvcrt/string.rb +1 -1
- data/lib/windows/network/management.rb +2 -2
- data/lib/windows/network/snmp.rb +2 -2
- data/lib/windows/registry.rb +1 -1
- data/lib/windows/security.rb +1 -1
- data/lib/windows/system_info.rb +7 -0
- data/lib/windows/thread.rb +1 -1
- data/lib/windows/time.rb +2 -2
- data/lib/windows/volume.rb +1 -1
- data/lib/windows/window.rb +1 -1
- data/windows-pr.gemspec +1 -1
- metadata +2 -2
data/CHANGES
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
= 0.9.2 - 5-Sep-2008
|
2
|
+
* Added some WoW64 functions to Windows::File and Windows::SystemInfo.
|
3
|
+
* All modules now rescue Windows::API::Error for failed function loads.
|
4
|
+
I was previously inconsistent on just what error I was rescuing.
|
5
|
+
|
1
6
|
= 0.9.1 - 28-Jul-2008
|
2
7
|
* Yet another refactoring of the multi_to_wide and wide_to_multi helper
|
3
8
|
methods in the Windows::Unicode module. In addition to a bug fix, they
|
data/lib/windows/com.rb
CHANGED
data/lib/windows/console.rb
CHANGED
@@ -105,7 +105,7 @@ module Windows
|
|
105
105
|
API.new('GetConsoleSelectionInfo', 'P', 'B')
|
106
106
|
API.new('GetCurrentConsoleFont' , 'LIP', 'B')
|
107
107
|
API.new('SetConsoleDisplayMode', 'LLP', 'B')
|
108
|
-
rescue
|
108
|
+
rescue Windows::API::LoadError
|
109
109
|
# Do nothing - not supported on current platform. It's up to you to
|
110
110
|
# check for the existence of the constant in your code.
|
111
111
|
end
|
@@ -113,7 +113,7 @@ module Windows
|
|
113
113
|
# Windows 2000 or later
|
114
114
|
begin
|
115
115
|
API.new('GetConsoleWindow', 'V', 'L')
|
116
|
-
rescue
|
116
|
+
rescue Windows::API::LoadError
|
117
117
|
# Do nothing - not supported on current platform. It's up to you to
|
118
118
|
# check for the existence of the constant in your code.
|
119
119
|
end
|
data/lib/windows/debug.rb
CHANGED
@@ -27,7 +27,7 @@ module Windows
|
|
27
27
|
API.new('DebugActiveProcessStop', 'L', 'B')
|
28
28
|
API.new('DebugBreakProcess', 'L', 'B')
|
29
29
|
API.new('DebugSetProcessKillOnExit', 'I', 'B')
|
30
|
-
rescue
|
30
|
+
rescue Windows::API::LoadError
|
31
31
|
# Do nothing - not supported on current platform. It's up to you to
|
32
32
|
# check for the existence of the constant in your code.
|
33
33
|
end
|
data/lib/windows/error.rb
CHANGED
data/lib/windows/file.rb
CHANGED
@@ -201,5 +201,15 @@ module Windows
|
|
201
201
|
API.new('UnlockFileEx', 'LLLLL', 'B')
|
202
202
|
API.new('WriteFile', 'LPLPP', 'B')
|
203
203
|
API.new('WriteFileEx', 'LPLPK', 'B')
|
204
|
+
|
205
|
+
# XP 64-bit and later
|
206
|
+
begin
|
207
|
+
API.new('Wow64DisableWow64FsRedirection', 'P', 'B')
|
208
|
+
API.new('Wow64EnableWow64FsRedirection', 'I', 'I')
|
209
|
+
API.new('Wow64RevertWow64FsRedirection', 'L', 'B')
|
210
|
+
rescue Windows::API::Error
|
211
|
+
# Do nothing - not supported on current platform. It's up to you to
|
212
|
+
# check for the existence of the constant in your code.
|
213
|
+
end
|
204
214
|
end
|
205
215
|
end
|
data/lib/windows/library.rb
CHANGED
@@ -36,7 +36,7 @@ module Windows
|
|
36
36
|
API.new('GetDllDirectory', 'LP', 'L')
|
37
37
|
API.new('GetModuleHandleEx', 'LPP', 'I')
|
38
38
|
API.new('SetDllDirectory', 'P', 'I')
|
39
|
-
rescue
|
39
|
+
rescue Windows::API::Error
|
40
40
|
# Do nothing - not supported on current platform. It's up to you to
|
41
41
|
# check for the existence of the constant in your code.
|
42
42
|
end
|
data/lib/windows/memory.rb
CHANGED
data/lib/windows/msvcrt/file.rb
CHANGED
@@ -32,7 +32,7 @@ module Windows
|
|
32
32
|
API.new('_chsize_s', 'IL', 'I', MSVCRT_DLL)
|
33
33
|
API.new('_mktemp_s', 'PL', 'L', MSVCRT_DLL)
|
34
34
|
API.new('_wmktemp_s', 'PL', 'L', MSVCRT_DLL)
|
35
|
-
rescue
|
35
|
+
rescue Windows::API::Error
|
36
36
|
# Ignore - you must check for it via 'defined?'
|
37
37
|
end
|
38
38
|
end
|
data/lib/windows/msvcrt/io.rb
CHANGED
@@ -190,7 +190,7 @@ module Windows
|
|
190
190
|
begin
|
191
191
|
API.new('GetNetScheduleAccountInformation', 'PLP', 'L', 'mstask')
|
192
192
|
API.new('SetNetScheduleAccountInformation', 'PPP', 'L', 'netapi32')
|
193
|
-
rescue
|
193
|
+
rescue Windows::API::Error
|
194
194
|
# Do nothing. Not supported on current platform.
|
195
195
|
end
|
196
196
|
|
@@ -515,7 +515,7 @@ module Windows
|
|
515
515
|
def SetNetScheduleAccountInformation(server, account, password)
|
516
516
|
SetNetScheduleAccountInformation.call(server, account, password) == NERR_Success
|
517
517
|
end
|
518
|
-
rescue
|
518
|
+
rescue Windows::API::Error
|
519
519
|
# Do nothing. It's up to you to check for their existence.
|
520
520
|
end
|
521
521
|
end
|
data/lib/windows/network/snmp.rb
CHANGED
@@ -79,10 +79,10 @@ module Windows
|
|
79
79
|
|
80
80
|
# Windows 2003 Server or later and/or WinSNMP 2.0 or later
|
81
81
|
begin
|
82
|
-
API.new('SnmpCreateSession', 'LLKP', 'wsnmp32')
|
82
|
+
API.new('SnmpCreateSession', 'LLKP', 'L', 'wsnmp32')
|
83
83
|
API.new('SnmpCleanupEx', 'V', 'I', 'wsnmp32')
|
84
84
|
API.new('SnmpStartupEx', 'PPPPP', 'L', 'wsnmp32')
|
85
|
-
rescue
|
85
|
+
rescue Windows::API::Error
|
86
86
|
# Do nothing. It's up to you to check for their existence.
|
87
87
|
end
|
88
88
|
end
|
data/lib/windows/registry.rb
CHANGED
@@ -120,7 +120,7 @@ module Windows
|
|
120
120
|
# Windows XP or later
|
121
121
|
begin
|
122
122
|
API.new('RegSaveKeyEx', 'LPPL', 'L', 'advapi32')
|
123
|
-
rescue
|
123
|
+
rescue Windows::API::Error
|
124
124
|
# Do nothing - not supported on current platform. It's up to you to
|
125
125
|
# check for the existence of the constant in your code.
|
126
126
|
end
|
data/lib/windows/security.rb
CHANGED
data/lib/windows/system_info.rb
CHANGED
@@ -34,5 +34,12 @@ module Windows
|
|
34
34
|
API.new('GetVersion', 'V', 'L')
|
35
35
|
API.new('GetVersionEx', 'P', 'B')
|
36
36
|
API.new('GetWindowsDirectory', 'PI', 'I')
|
37
|
+
|
38
|
+
# XP or later
|
39
|
+
begin
|
40
|
+
API.new('GetSystemWow64Directory', 'PI', 'I')
|
41
|
+
rescue Windows::API::Error
|
42
|
+
# Do nothing. Users must check for function.
|
43
|
+
end
|
37
44
|
end
|
38
45
|
end
|
data/lib/windows/thread.rb
CHANGED
data/lib/windows/time.rb
CHANGED
@@ -39,8 +39,8 @@ module Windows
|
|
39
39
|
# Windows XP or later
|
40
40
|
begin
|
41
41
|
API.new('GetSystemTimes', 'PPP', 'B')
|
42
|
-
|
43
|
-
rescue
|
42
|
+
API.new('TzSpecificLocalTimeToSystemTime', 'PPP', 'B')
|
43
|
+
rescue Windows::API::Error
|
44
44
|
# Do nothing. It's up to you to check your platform.
|
45
45
|
end
|
46
46
|
end
|
data/lib/windows/volume.rb
CHANGED
@@ -33,7 +33,7 @@ module Windows
|
|
33
33
|
# Windows XP or later
|
34
34
|
begin
|
35
35
|
API.new('GetVolumePathNamesForVolumeName', 'PPLL', 'B')
|
36
|
-
rescue
|
36
|
+
rescue Windows::API::Error
|
37
37
|
# Do nothing - not supported on current platform. It's up to you to
|
38
38
|
# check for the existence of the constant in your code.
|
39
39
|
end
|
data/lib/windows/window.rb
CHANGED
@@ -53,7 +53,7 @@ module Windows
|
|
53
53
|
# Windows XP or later
|
54
54
|
begin
|
55
55
|
API.new('GetLayeredWindowAttributes', 'LPBL', 'B', 'user32')
|
56
|
-
rescue
|
56
|
+
rescue Windows::API::Error
|
57
57
|
# Do nothing - not supported on current platform. It's up to you
|
58
58
|
# to check for the existence of the constant in your code.
|
59
59
|
end
|
data/windows-pr.gemspec
CHANGED
@@ -2,7 +2,7 @@ require "rubygems"
|
|
2
2
|
|
3
3
|
spec = Gem::Specification.new do |gem|
|
4
4
|
gem.name = "windows-pr"
|
5
|
-
gem.version = "0.9.
|
5
|
+
gem.version = "0.9.2"
|
6
6
|
gem.authors = ["Daniel J. Berger", "Park Heesob"]
|
7
7
|
gem.email = "djberg96@gmail.com"
|
8
8
|
gem.homepage = "http://www.rubyforge.org/projects/win32utils"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: windows-pr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel J. Berger
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2008-
|
13
|
+
date: 2008-09-05 00:00:00 -06:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|