windows-pr 0.9.5 → 0.9.6
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +12 -0
- data/lib/windows/file.rb +10 -0
- data/lib/windows/security.rb +9 -1
- data/lib/windows/service.rb +2 -2
- data/lib/windows/unicode.rb +4 -3
- data/windows-pr.gemspec +2 -2
- metadata +4 -4
data/CHANGES
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
= 0.9.6 - 14-Nov-2008
|
2
|
+
* Updated the RegisterServiceCtrlHandler and RegisterServiceCtrlHandlerEx
|
3
|
+
protoypes in the Windows::Service module. Changed old 'P' prototype to 'K'
|
4
|
+
for callbacks.
|
5
|
+
* Added explicit ANSI and Wide character functions for GetFileSecurity and
|
6
|
+
SetFileSecurity in the Windows::Security module (since automatic unicode
|
7
|
+
generation is set to false for that particular module).
|
8
|
+
* Added IO reparse point tag constants to the Windows::File module.
|
9
|
+
* The multi_to_wide helper method in Windows::Unicode now returns the string
|
10
|
+
as-is if it's already a Unicode string.
|
11
|
+
* A couple 'P' prototypes were switched to 'S' in Windows::Unicode functions.
|
12
|
+
|
1
13
|
= 0.9.5 - 21-Oct-2008
|
2
14
|
* Fixed the rescue clauses for unsupported functions for the Windows::Console
|
3
15
|
and Windows::Debug modules. Thanks go to an anonymous user for the spot.
|
data/lib/windows/file.rb
CHANGED
@@ -187,6 +187,16 @@ module Windows
|
|
187
187
|
FileIdBothDirectoryRestartInfo = 11
|
188
188
|
FileIoPriorityHintInfo = 12
|
189
189
|
MaximumFileInfoByHandleClass = 13
|
190
|
+
|
191
|
+
# Reparse point tags
|
192
|
+
|
193
|
+
IO_REPARSE_TAG_DFS = 0x8000000A
|
194
|
+
IO_REPARSE_TAG_DFSR = 0x80000012
|
195
|
+
IO_REPARSE_TAG_HSM = 0xC0000004
|
196
|
+
IO_REPARSE_TAG_HSM2 = 0x80000006
|
197
|
+
IO_REPARSE_TAG_MOUNT_POINT = 0xA0000003
|
198
|
+
IO_REPARSE_TAG_SIS = 0x80000007
|
199
|
+
IO_REPARSE_TAG_SYMLINK = 0xA000000C
|
190
200
|
|
191
201
|
API.new('CopyFile', 'PPI', 'B')
|
192
202
|
API.new('CopyFileEx', 'PPKPPL', 'B')
|
data/lib/windows/security.rb
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
require 'windows/api'
|
2
2
|
|
3
|
+
# The auto_unicode option has been set to false because the majority of
|
4
|
+
# the methods defined here do not have explicit ANSI or Wide character
|
5
|
+
# versions.
|
6
|
+
|
3
7
|
module Windows
|
4
8
|
module Security
|
5
9
|
API.auto_namespace = 'Windows::Security'
|
@@ -365,6 +369,8 @@ module Windows
|
|
365
369
|
API.new('GetAce', 'LLP', 'B', 'advapi32')
|
366
370
|
API.new('GetAclInformation', 'PPLI', 'B', 'advapi32')
|
367
371
|
API.new('GetFileSecurity', 'PLPLP', 'B', 'advapi32')
|
372
|
+
API.new('GetFileSecurityA', 'PLPLP', 'B', 'advapi32')
|
373
|
+
API.new('GetFileSecurityW', 'PLPLP', 'B', 'advapi32')
|
368
374
|
API.new('GetLengthSid', 'P', 'L', 'advapi32')
|
369
375
|
API.new('GetSecurityDescriptorControl', 'PPP', 'B', 'advapi32')
|
370
376
|
API.new('GetSecurityDescriptorDacl', 'PPPP', 'B', 'advapi32')
|
@@ -396,7 +402,9 @@ module Windows
|
|
396
402
|
API.new('LookupPrivilegeValue', 'PPP', 'B', 'advapi32')
|
397
403
|
API.new('OpenProcessToken', 'LLP', 'B', 'advapi32')
|
398
404
|
API.new('OpenThreadToken', 'LLLP', 'B', 'advapi32')
|
399
|
-
API.new('SetFileSecurity', 'PPP', 'B', 'advapi32')
|
405
|
+
API.new('SetFileSecurity', 'PPP', 'B', 'advapi32')
|
406
|
+
API.new('SetFileSecurityA', 'PPP', 'B', 'advapi32')
|
407
|
+
API.new('SetFileSecurityW', 'PPP', 'B', 'advapi32')
|
400
408
|
API.new('SetSecurityDescriptorDacl', 'PIPI', 'B', 'advapi32')
|
401
409
|
API.new('SetSecurityDescriptorGroup', 'PPI', 'B', 'advapi32')
|
402
410
|
API.new('SetSecurityDescriptorOwner', 'PPI', 'B', 'advapi32')
|
data/lib/windows/service.rb
CHANGED
@@ -128,8 +128,8 @@ module Windows
|
|
128
128
|
API.new('QueryServiceLockStatus', 'LPLP', 'B', 'advapi32')
|
129
129
|
API.new('QueryServiceStatus', 'LP', 'B', 'advapi32')
|
130
130
|
API.new('QueryServiceStatusEx', 'LLPLP', 'B', 'advapi32')
|
131
|
-
API.new('RegisterServiceCtrlHandler', '
|
132
|
-
API.new('RegisterServiceCtrlHandlerEx', '
|
131
|
+
API.new('RegisterServiceCtrlHandler', 'PK', 'L', 'advapi32')
|
132
|
+
API.new('RegisterServiceCtrlHandlerEx', 'PKP', 'L', 'advapi32')
|
133
133
|
API.new('SetServiceBits', 'LLII', 'B', 'advapi32')
|
134
134
|
API.new('SetServiceStatus', 'LP', 'B', 'advapi32')
|
135
135
|
API.new('StartService', 'LLP', 'B', 'advapi32')
|
data/lib/windows/unicode.rb
CHANGED
@@ -76,10 +76,10 @@ module Windows
|
|
76
76
|
API.new('GetTextCharsetInfo', 'LPL', 'I', 'gdi32')
|
77
77
|
API.new('IsDBCSLeadByte', 'P', 'B')
|
78
78
|
API.new('IsDBCSLeadByteEx', 'IP', 'B')
|
79
|
-
API.new('IsTextUnicode', '
|
80
|
-
API.new('MultiByteToWideChar', '
|
79
|
+
API.new('IsTextUnicode', 'SIP', 'B', 'advapi32')
|
80
|
+
API.new('MultiByteToWideChar', 'ILSIPI', 'I')
|
81
81
|
API.new('TranslateCharsetInfo', 'PPL', 'B', 'gdi32')
|
82
|
-
API.new('WideCharToMultiByte', '
|
82
|
+
API.new('WideCharToMultiByte', 'ILSIPIPP', 'I')
|
83
83
|
|
84
84
|
# Convenient wrapper methods
|
85
85
|
|
@@ -92,6 +92,7 @@ module Windows
|
|
92
92
|
def multi_to_wide(string, encoding=nil)
|
93
93
|
return nil unless string
|
94
94
|
raise TypeError unless string.is_a?(String)
|
95
|
+
return string if IsTextUnicode(string, string.size, nil)
|
95
96
|
|
96
97
|
unless encoding
|
97
98
|
encoding = ($KCODE == 'UTF8') ? CP_UTF8 : CP_ACP
|
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.6"
|
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"
|
@@ -18,7 +18,7 @@ spec = Gem::Specification.new do |gem|
|
|
18
18
|
gem.require_path = "lib"
|
19
19
|
gem.extra_rdoc_files = ["MANIFEST", "README", "CHANGES"]
|
20
20
|
gem.add_dependency("windows-api", ">= 0.2.4")
|
21
|
-
gem.add_dependency("win32-api", ">= 1.2.
|
21
|
+
gem.add_dependency("win32-api", ">= 1.2.1")
|
22
22
|
end
|
23
23
|
|
24
24
|
if $0 == __FILE__
|
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.6
|
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-11-14 00:00:00 -07:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -31,7 +31,7 @@ dependencies:
|
|
31
31
|
requirements:
|
32
32
|
- - ">="
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: 1.2.
|
34
|
+
version: 1.2.1
|
35
35
|
version:
|
36
36
|
description: Windows functions and constants bundled via Win32::API
|
37
37
|
email: djberg96@gmail.com
|
@@ -167,7 +167,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
167
167
|
requirements: []
|
168
168
|
|
169
169
|
rubyforge_project: win32utils
|
170
|
-
rubygems_version: 1.3.
|
170
|
+
rubygems_version: 1.3.1
|
171
171
|
signing_key:
|
172
172
|
specification_version: 2
|
173
173
|
summary: Windows functions and constants bundled via Win32::API
|